@@ -32,6 +32,7 @@ import (
32
32
33
33
flag "github.com/spf13/pflag"
34
34
"github.com/u-root/u-root/pkg/flash"
35
+ "github.com/u-root/u-root/pkg/flash/op"
35
36
"github.com/u-root/u-root/pkg/flash/sfdp"
36
37
"github.com/u-root/u-root/pkg/spidev"
37
38
)
@@ -84,12 +85,12 @@ func run(args []string, spiOpen spiOpenFunc, input io.Reader, output io.Writer)
84
85
switch cmd {
85
86
case "id" :
86
87
// Wake it up, then get the id.
87
- // 0xab is not universally handled on all devices, but that's ok.
88
+ // PRDRES is not universally handled on all devices, but that's ok.
88
89
// but CE MUST drop, so we structure this as two separate
89
90
// transfers to ensure that happens.
90
91
transfers := []spidev.Transfer {
91
92
{
92
- Tx : []byte {0xab },
93
+ Tx : []byte {op . PRDRES },
93
94
Rx : make ([]byte , 1 ),
94
95
},
95
96
}
@@ -101,7 +102,7 @@ func run(args []string, spiOpen spiOpenFunc, input io.Reader, output io.Writer)
101
102
var id = []byte {0x9f , 0 , 0 , 0 }
102
103
transfers = []spidev.Transfer {
103
104
{
104
- Tx : []byte {0x9f , 0 , 0 , 0 },
105
+ Tx : []byte {op . ReadJEDECID , 0 , 0 , 0 },
105
106
Rx : id ,
106
107
},
107
108
}
0 commit comments