recognize 8MiB swap chip

This commit is contained in:
bunnie 2024-10-27 23:24:42 +08:00
parent 38ad0363ce
commit bceb08afb8

View file

@ -98,7 +98,7 @@ impl SwapHal {
// density 38, memory type 25, mfg ID C2 ==> MX25U12832F
assert!(flash_id & 0xFF_FF_FF == 0x1820C2 || flash_id & 0xFF_FF_FF == 0x38_25_C2);
// KGD 5D, mfg ID 9D; remainder of bits are part of the EID
assert!(ram_id & 0xFF_FF == 0x5D9D);
assert!((ram_id & 0xFF_FF == 0x5D9D) || (ram_id & 0xFF_FF == 0x559d));
// setup FLASH
// - QE enable
@ -124,7 +124,7 @@ impl SwapHal {
// density 38, memory type 25, mfg ID C2 ==> MX25U12832F
assert!(flash_id & 0xFF_FF_FF == 0x1820C2 || flash_id & 0xFF_FF_FF == 0x38_25_C2);
// KGD 5D, mfg ID 9D; remainder of bits are part of the EID
assert!(ram_id & 0xFF_FF == 0x5D9D);
assert!((ram_id & 0xFF_FF == 0x5D9D) || (ram_id & 0xFF_FF == 0x559d));
// allocate the buf
let mut buf = RawPage { data: [0u8; 4096] };