correct flash size and detection for sitecom targets (#6278), patch from rtz
authorFlorian Fainelli <florian@openwrt.org>
Sun, 6 Dec 2009 09:08:03 +0000 (09:08 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 6 Dec 2009 09:08:03 +0000 (09:08 +0000)
SVN-Revision: 18671

target/linux/rdc/files-2.6.30/arch/x86/mach-rdc321x/platform.c
target/linux/rdc/sitecom/config-2.6.30

index e319c02b33c7d829b5718d871429ea49fbe4ff31..f59cb15a7c8506a427c7ce42a815993eb9d80996 100644 (file)
@@ -161,15 +161,15 @@ static int __init rdc_board_setup(void)
 
        ROOT_DEV = 0;
        rdc_map_info.name = rdc_flash_device.name;
-       rdc_map_info.phys = 0xff000000;
-       rdc_map_info.size = 0x1000000;
+       rdc_map_info.size = 0x800000;   //8MB
+       rdc_map_info.phys = (u32) -rdc_map_info.size;
        rdc_map_info.bankwidth = 2;
        rdc_map_info.set_vpp = NULL;
        simple_map_init(&rdc_map_info);
        while (probe_flash_start(&rdc_map_info)) {
-               rdc_map_info.phys++;
-               if (--rdc_map_info.size)
+               if (rdc_map_info.size /= 2 < 0x100000)  //1MB
                        panic("Could not find start of flash!");
+               rdc_map_info.phys = (u32) -rdc_map_info.size;
        }
        rdc_flash_resource.start = rdc_map_info.phys;
        rdc_flash_data.width = rdc_map_info.bankwidth;
index e6bfa8886e92c465d7b4cdb38c9947461bbc0ecd..d756e87950c0119c92db476a02196fe7b3e79b68 100644 (file)
@@ -1,3 +1,2 @@
-# CONFIG_MTD_PHYSMAP is not set
 # CONFIG_MTD_R8610 is not set
 # CONFIG_MTD_RDC3210 is not set