rockbox/firmware/target
Marcin Bukat d8f099f937 rk27xx: restore the missing 0xd5 NAND device code
flash_init() identifies a chip by looking its READ ID device code up in
device_code[] and taking the capacity from device_info[] at the same
index. device_code[] had seven entries and device_info[] eight: 0xd5
(16 Gbit) was dropped when the table was transcribed from the OF. Every
code after the gap picked up the capacity one row up, so a 0xd7
(32 Gbit, 4 GiB) part was sized at 2 GiB.

On a generic rk2705 that halved total_phy_sec to 4194304, and the FTL
looked for its tables in the wrong place and read erased flash. With the
entry restored it reports 8388608, matching the chip and the host-side
dump of the same unit.

The OF's own table, as it appears in its NAND bootloader:

    76 79 f1 da dc d3 d5 d7  00 00 02 00  00 00 04 00 ...

A compile-time check now fails the build if the two tables differ in
length again. Also fixes two register addresses in the same loop that
were missing a digit (0x180E204/0x180E208 for 0x180E8204/0x180E8208);
they are stored for reference only and nothing reads them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: Ia70c249eea2e44ea34aef52d8ae20860b2b5db9d
2026-10-01 10:28:03 +02:00
..
arm rk27xx: restore the missing 0xd5 NAND device code 2026-10-01 10:28:03 +02:00
coldfire firmware: move iriver flash helper functions into target tree 2026-09-23 13:44:45 -04:00
hosted Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
mips usb: let controller drivers handle SET_ADDRESS requests 2026-09-26 13:23:01 -04:00