Replace hardcoded values with their correct definitions
authorFlorian Fainelli <florian@openwrt.org>
Wed, 18 Jul 2007 17:27:40 +0000 (17:27 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 18 Jul 2007 17:27:40 +0000 (17:27 +0000)
SVN-Revision: 8046

target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c
target/linux/adm5120-2.6/files/drivers/mtd/nand/rbmipsnand.c

index 44598825d9e572db159518a9a923470293a172ec..d0fa1f0bc8ecb161a35cdf0d4c7a19cf55364e59 100644 (file)
@@ -114,7 +114,7 @@ struct platform_device adm5120_flash1_device =      {
 struct resource adm5120_nand_resource[] = {
        [0] = {
                .start  = ADM5120_SRAM1_BASE,
-               .end    = ADM5120_SRAM1_BASE+0x1000-1,
+               .end    = ADM5120_SRAM1_BASE+ADM5120_MPMC_SIZE-1,
                .flags  = IORESOURCE_MEM,
        },
 };
index 9e6ae1b5778f0c4fd4d76e7093243f7aa26817e0..1c524d40a816d172cb588c42b700f2a5c6996632 100644 (file)
@@ -115,7 +115,7 @@ static int rbmips_probe(struct platform_device *pdev)
 
        }
        
-       data->io_base = ioremap(pdev->resource[0].start, 0x1000);
+       data->io_base = ioremap(pdev->resource[0].start, pdev->resource[0].end - pdev->resource[0].start + 1);
 
        if (data->io_base == NULL) {
                dev_err(&pdev->dev, "ioremap failed\n");