mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
o Add ONFI signature check.
o Add Micron chip found in Freescale Vybrid Family Phytec COSMIC board. Approved by: cognet (mentor)
This commit is contained in:
parent
2ca1ee5764
commit
8a57d93d59
3 changed files with 9 additions and 2 deletions
|
|
@ -122,7 +122,8 @@ MALLOC_DECLARE(M_NAND);
|
|||
|
||||
#define NAND_MAN_SAMSUNG 0xec
|
||||
#define NAND_MAN_HYNIX 0xad
|
||||
#define NAND_MAN_STMICRO 0x20
|
||||
#define NAND_MAN_STMICRO 0x20
|
||||
#define NAND_MAN_MICRON 0x2c
|
||||
|
||||
struct nand_id {
|
||||
uint8_t man_id;
|
||||
|
|
|
|||
|
|
@ -341,8 +341,12 @@ onfi_read_parameter(struct nand_chip *chip, struct onfi_params *params)
|
|||
|
||||
NANDBUS_READ_BUFFER(nandbus, params, sizeof(struct onfi_params));
|
||||
|
||||
if (memcmp(params->signature, "ONFI", sizeof(params->signature))) {
|
||||
device_printf(chip->dev, "Error: bad signature\n");
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
/* TODO */
|
||||
/* Check for signature */
|
||||
/* Check CRC */
|
||||
/* Use redundant page if necessary */
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ struct nand_params nand_ids[] = {
|
|||
0x80, 0x200, 0x10, 0x20, 0 },
|
||||
{ { NAND_MAN_STMICRO, 0xf1 }, "STMicro 128MB 3,3V 8-bit",
|
||||
0x80, 2048, 64, 0x40, 0 },
|
||||
{ { NAND_MAN_MICRON, 0xcc }, "Micron NAND 512MiB 3,3V 16-bit",
|
||||
0x200, 2048, 64, 0x40, 0 },
|
||||
};
|
||||
|
||||
struct nand_params *nand_get_params(struct nand_id *id)
|
||||
|
|
|
|||
Loading…
Reference in a new issue