ARM: LPC32XX: NAND related updates
authorKevin Wells <wellsk40@gmail.com>
Tue, 21 Dec 2010 16:43:03 +0000 (08:43 -0800)
committerKevin Wells <wellsk40@gmail.com>
Tue, 21 Dec 2010 16:43:03 +0000 (08:43 -0800)
NAND partitions for large page systems have been reorganized to use
less space (EA, FDI boards). Several data structure not marked as
__initdata are now correctly marked.

arch/arm/mach-lpc32xx/ea3250.c
arch/arm/mach-lpc32xx/fdi3250.c
arch/arm/mach-lpc32xx/phy3250.c

index 8afcceb..00ecc9c 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/amba/clcd.h>
 #include <linux/amba/pl022.h>
 #include <linux/amba/mmci.h>
+#include <mtd/mtd-abi.h>
 
 #include <asm/setup.h>
 #include <asm/mach-types.h>
@@ -602,7 +603,7 @@ static int __init ea3250_amba_devices_register(void)
                struct amba_device *d = amba_devs[i];
                amba_device_register(d, &iomem_resource);
        }
-       
+
        return 0;
 }
 device_initcall_sync(ea3250_amba_devices_register);
@@ -625,17 +626,13 @@ static struct mtd_partition __initdata ea3250_nand_partition[] = {
         {
                 .name   = "ea3250-boot",
                 .offset = 0,
-                .size   = (BLK_SIZE * 25)
+                .size   = (BLK_SIZE * 4),
+               .mask_flags   = MTD_WRITEABLE,
         },
         {
                 .name   = "ea3250-uboot",
                 .offset = MTDPART_OFS_APPEND,
-                .size   = (BLK_SIZE * 100)
-        },
-        {
-                .name   = "ea3250-ubt-prms",
-                .offset = MTDPART_OFS_APPEND,
-                .size   = (BLK_SIZE * 2)
+                .size   = (BLK_SIZE * 6)
         },
         {
                 .name   = "ea3250-kernel",
@@ -653,7 +650,7 @@ static struct mtd_partition * __init ea3250_nand_partitions(int size, int *num_p
         *num_partitions = ARRAY_SIZE(ea3250_nand_partition);
         return ea3250_nand_partition;
 }
-struct lpc32XX_nand_cfg lpc32xx_nandcfg =
+struct lpc32XX_nand_cfg __initdata lpc32xx_nandcfg =
 {
         .wdr_clks               = 14,
         .wwidth                 = 260000000,
@@ -687,7 +684,7 @@ static struct resource slc_nand_resources[] = {
 };
 
 static u64 lpc32xx_slc_dma_mask = 0xffffffffUL;
-static struct platform_device lpc32xx_slc_nand_device = {
+static struct platform_device __initdata lpc32xx_slc_nand_device = {
         .name           = "lpc32xx-nand",
         .id             = 0,
         .dev            = {
@@ -858,7 +855,7 @@ void __init ea3250_board_init(void)
 
        /* Register SPI driver */
        ea3250_spi_lcdc_drv_init();
-       
+
        /* Test clock needed for UDA1380 initial init */
        __raw_writel(LPC32XX_CLKPWR_TESTCLK2_SEL_MOSC |
                        LPC32XX_CLKPWR_TESTCLK_TESTCLK2_EN,
index c250933..dd82779 100644 (file)
@@ -329,12 +329,12 @@ static struct mtd_partition __initdata fdi3250_nand_partition[] = {
         {
                 .name   = "fdi3250-boot",
                 .offset = 0,
-                .size   = (BLK_SIZE * 25)
+                .size   = (BLK_SIZE * 4)
         },
         {
                 .name   = "fdi3250-uboot",
                 .offset = MTDPART_OFS_APPEND,
-                .size   = (BLK_SIZE * 102)
+                .size   = (BLK_SIZE * 6)
         },
         {
                 .name   = "fdi3250-kernel",
index 280415b..3c50131 100644 (file)
@@ -388,7 +388,7 @@ static int nandwp_enable(int enable)
 {
         if (enable != 0)
                gpio_set_value(NAND_WP_GPIO,0);
-        else 
+        else
                gpio_set_value(NAND_WP_GPIO,1);
 
         return 1;
@@ -426,7 +426,7 @@ static struct mtd_partition * __init phy3250_nand_partitions(int size, int *num_
         *num_partitions = ARRAY_SIZE(phy3250_nand_partition);
         return phy3250_nand_partition;
 }
-struct lpc32XX_nand_cfg lpc32xx_nandcfg =
+struct lpc32XX_nand_cfg __initdata lpc32xx_nandcfg =
 {
         .wdr_clks               = 3,
         .wwidth                 = 28571428,
@@ -459,7 +459,7 @@ static struct resource slc_nand_resources[] = {
 
 };
 static u64 lpc32xx_slc_dma_mask = 0xffffffffUL;
-static struct platform_device lpc32xx_slc_nand_device = {
+static struct platform_device __initdata lpc32xx_slc_nand_device = {
         .name           = "lpc32xx-nand",
         .id             = 0,
         .dev            = {
@@ -657,7 +657,7 @@ arch_initcall(lpc32xx_display_uid);
  * although they will be registered in the event manager. For this,
  * reason, a level based interrupt state is recommended for GPIOs when
  * using IRQ and wakeup from GPI edge state.
- * 
+ *
  */
 #define BTN1_GPIO              LPC32XX_GPIO(LPC32XX_GPI_P3_GRP, 3)
 static irqreturn_t phy3250_btn1_irq(int irq, void *dev)