]> git.sur5r.net Git - u-boot/commitdiff
CFI: geometry reversal for STMicro M29W320DT
authorRichard Retanubun <RichardRetanubun@RuggedCom.com>
Fri, 6 Mar 2009 15:09:37 +0000 (10:09 -0500)
committerStefan Roese <sr@denx.de>
Thu, 19 Mar 2009 14:00:32 +0000 (15:00 +0100)
Follow up to the flash_fixup_stm to fix geometry reversal
on STMicro M29W320ET flash chip. The M29W320DT has 4 erase region.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Stefan Roese <sr@denx.de>
drivers/mtd/cfi_flash.c

index a66feac14f5cf121721dd8fb45b418479855386a..391d169a481c63f72d96528dbdf4115d0d5d9570 100644 (file)
@@ -1806,8 +1806,9 @@ static void flash_fixup_stm(flash_info_t *info, struct cfi_qry *qry)
        if (qry->num_erase_regions > 1) {
                /* reverse geometry if top boot part */
                if (info->cfi_version < 0x3131) {
-                       /* CFI < 1.1, guess by device id (only M29W320ET now) */
-                       if (info->device_id == 0x2256) {
+                       /* CFI < 1.1, guess by device id (M29W320{DT,ET} only) */
+                       if (info->device_id == 0x22CA ||
+                           info->device_id == 0x2256) {
                                cfi_reverse_geometry(qry);
                        }
                }