Commit e505240b authored by Andrew Victor's avatar Andrew Victor Committed by Russell King

[ARM] 5257/2: [AT91] Use SZ_ definitions and MTDPART_OFS_NXTBLK instead of hex-values

In the various AT91 board files, replace hard-coded size values (eg,
0x800000) with the SZ_ size definitions (eg, SZ_8M) from sizes.h
Also replace MTD partition offsets with MTDPART_OFS_NXTBLK.
Signed-off-by: default avatarAndrew Victor <linux@maxim.org.za>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent a745a622
...@@ -214,7 +214,7 @@ static struct physmap_flash_data cap9adk_nor_data = { ...@@ -214,7 +214,7 @@ static struct physmap_flash_data cap9adk_nor_data = {
}; };
#define NOR_BASE AT91_CHIPSELECT_0 #define NOR_BASE AT91_CHIPSELECT_0
#define NOR_SIZE 0x800000 #define NOR_SIZE SZ_8M
static struct resource nor_flash_resources[] = { static struct resource nor_flash_resources[] = {
{ {
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
#include <mach/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -37,6 +36,7 @@ ...@@ -37,6 +36,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/gpio.h> #include <mach/gpio.h>
...@@ -114,7 +114,7 @@ static struct spi_board_info csb337_spi_devices[] = { ...@@ -114,7 +114,7 @@ static struct spi_board_info csb337_spi_devices[] = {
}; };
#define CSB_FLASH_BASE AT91_CHIPSELECT_0 #define CSB_FLASH_BASE AT91_CHIPSELECT_0
#define CSB_FLASH_SIZE 0x800000 #define CSB_FLASH_SIZE SZ_8M
static struct mtd_partition csb_flash_partitions[] = { static struct mtd_partition csb_flash_partitions[] = {
{ {
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <mach/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -34,6 +33,7 @@ ...@@ -34,6 +33,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/gpio.h> #include <mach/gpio.h>
...@@ -72,7 +72,7 @@ static struct at91_udc_data __initdata csb637_udc_data = { ...@@ -72,7 +72,7 @@ static struct at91_udc_data __initdata csb637_udc_data = {
}; };
#define CSB_FLASH_BASE AT91_CHIPSELECT_0 #define CSB_FLASH_BASE AT91_CHIPSELECT_0
#define CSB_FLASH_SIZE 0x1000000 #define CSB_FLASH_SIZE SZ_16M
static struct mtd_partition csb_flash_partitions[] = { static struct mtd_partition csb_flash_partitions[] = {
{ {
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <mach/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -38,6 +37,7 @@ ...@@ -38,6 +37,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/gpio.h> #include <mach/gpio.h>
#include <mach/at91rm9200_mc.h> #include <mach/at91rm9200_mc.h>
...@@ -157,7 +157,7 @@ static struct atmel_nand_data __initdata dk_nand_data = { ...@@ -157,7 +157,7 @@ static struct atmel_nand_data __initdata dk_nand_data = {
}; };
#define DK_FLASH_BASE AT91_CHIPSELECT_0 #define DK_FLASH_BASE AT91_CHIPSELECT_0
#define DK_FLASH_SIZE 0x200000 #define DK_FLASH_SIZE SZ_2M
static struct physmap_flash_data dk_flash_data = { static struct physmap_flash_data dk_flash_data = {
.width = 2, .width = 2,
......
...@@ -86,7 +86,7 @@ static struct mtd_partition __initdata my_flash0_partitions[] = ...@@ -86,7 +86,7 @@ static struct mtd_partition __initdata my_flash0_partitions[] =
{ /* 0x8400 */ { /* 0x8400 */
.name = "Darrell-loader", .name = "Darrell-loader",
.offset = 0, .offset = 0,
.size = 12* 1056, .size = 12 * 1056,
}, },
{ {
.name = "U-boot", .name = "U-boot",
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <mach/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -38,6 +37,7 @@ ...@@ -38,6 +37,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/gpio.h> #include <mach/gpio.h>
#include <mach/at91rm9200_mc.h> #include <mach/at91rm9200_mc.h>
...@@ -116,7 +116,7 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = { ...@@ -116,7 +116,7 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = {
}; };
#define EK_FLASH_BASE AT91_CHIPSELECT_0 #define EK_FLASH_BASE AT91_CHIPSELECT_0
#define EK_FLASH_SIZE 0x200000 #define EK_FLASH_SIZE SZ_2M
static struct physmap_flash_data ek_flash_data = { static struct physmap_flash_data ek_flash_data = {
.width = 2, .width = 2,
......
...@@ -105,7 +105,7 @@ static struct at91_mmc_data __initdata picotux200_mmc_data = { ...@@ -105,7 +105,7 @@ static struct at91_mmc_data __initdata picotux200_mmc_data = {
// }; // };
#define PICOTUX200_FLASH_BASE AT91_CHIPSELECT_0 #define PICOTUX200_FLASH_BASE AT91_CHIPSELECT_0
#define PICOTUX200_FLASH_SIZE 0x400000 #define PICOTUX200_FLASH_SIZE SZ_4M
static struct physmap_flash_data picotux200_flash_data = { static struct physmap_flash_data picotux200_flash_data = {
.width = 2, .width = 2,
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <linux/input.h> #include <linux/input.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <mach/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -39,6 +38,7 @@ ...@@ -39,6 +38,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/gpio.h> #include <mach/gpio.h>
#include <mach/at91_shdwc.h> #include <mach/at91_shdwc.h>
...@@ -119,18 +119,18 @@ static struct at91_eth_data __initdata ek_macb_data = { ...@@ -119,18 +119,18 @@ static struct at91_eth_data __initdata ek_macb_data = {
static struct mtd_partition __initdata ek_nand_partition[] = { static struct mtd_partition __initdata ek_nand_partition[] = {
{ {
.name = "Uboot & Kernel", .name = "Uboot & Kernel",
.offset = 0x00000000, .offset = 0,
.size = 16 * 1024 * 1024, .size = SZ_16M,
}, },
{ {
.name = "Root FS", .name = "Root FS",
.offset = 0x01000000, .offset = MTDPART_OFS_NXTBLK,
.size = 120 * 1024 * 1024, .size = 120 * SZ_1M,
}, },
{ {
.name = "FS", .name = "FS",
.offset = 0x08800000, .offset = MTDPART_OFS_NXTBLK,
.size = 120 * 1024 * 1024, .size = 120 * SZ_1M,
}, },
}; };
......
...@@ -126,11 +126,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = { ...@@ -126,11 +126,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
{ {
.name = "Bootloader Area", .name = "Bootloader Area",
.offset = 0, .offset = 0,
.size = 10 * 1024 * 1024, .size = 10 * SZ_1M,
}, },
{ {
.name = "User Area", .name = "User Area",
.offset = 10 * 1024 * 1024, .offset = MTDPART_OFS_NXTBLK,
.size = MTDPART_SIZ_FULL, .size = MTDPART_SIZ_FULL,
}, },
}; };
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/i2c/at24.h> #include <linux/i2c/at24.h>
#include <mach/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -38,6 +37,7 @@ ...@@ -38,6 +37,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/gpio.h> #include <mach/gpio.h>
...@@ -164,11 +164,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = { ...@@ -164,11 +164,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
{ {
.name = "Partition 1", .name = "Partition 1",
.offset = 0, .offset = 0,
.size = 256 * 1024, .size = SZ_256K,
}, },
{ {
.name = "Partition 2", .name = "Partition 2",
.offset = 256 * 1024, .offset = MTDPART_OFS_NXTBLK,
.size = MTDPART_SIZ_FULL, .size = MTDPART_SIZ_FULL,
}, },
}; };
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <video/atmel_lcdc.h> #include <video/atmel_lcdc.h>
#include <mach/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -44,6 +43,7 @@ ...@@ -44,6 +43,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/gpio.h> #include <mach/gpio.h>
#include <mach/at91sam9_smc.h> #include <mach/at91sam9_smc.h>
...@@ -168,11 +168,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = { ...@@ -168,11 +168,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
{ {
.name = "Partition 1", .name = "Partition 1",
.offset = 0, .offset = 0,
.size = 256 * 1024, .size = SZ_256K,
}, },
{ {
.name = "Partition 2", .name = "Partition 2",
.offset = 256 * 1024 , .offset = MTDPART_OFS_NXTBLK,
.size = MTDPART_SIZ_FULL, .size = MTDPART_SIZ_FULL,
}, },
}; };
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <video/atmel_lcdc.h> #include <video/atmel_lcdc.h>
#include <mach/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -42,6 +41,7 @@ ...@@ -42,6 +41,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/gpio.h> #include <mach/gpio.h>
#include <mach/at91sam9_smc.h> #include <mach/at91sam9_smc.h>
...@@ -173,11 +173,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = { ...@@ -173,11 +173,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
{ {
.name = "Partition 1", .name = "Partition 1",
.offset = 0, .offset = 0,
.size = 64 * 1024 * 1024, .size = SZ_64M,
}, },
{ {
.name = "Partition 2", .name = "Partition 2",
.offset = 64 * 1024 * 1024, .offset = MTDPART_OFS_NXTBLK,
.size = MTDPART_SIZ_FULL, .size = MTDPART_SIZ_FULL,
}, },
}; };
...@@ -227,7 +227,7 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = { ...@@ -227,7 +227,7 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = {
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE) #if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
static struct fb_videomode at91_tft_vga_modes[] = { static struct fb_videomode at91_tft_vga_modes[] = {
{ {
.name = "TX09D50VM1CCA @ 60", .name = "TX09D50VM1CCA @ 60",
.refresh = 60, .refresh = 60,
.xres = 240, .yres = 320, .xres = 240, .yres = 320,
.pixclock = KHZ2PICOS(4965), .pixclock = KHZ2PICOS(4965),
...@@ -243,7 +243,7 @@ static struct fb_videomode at91_tft_vga_modes[] = { ...@@ -243,7 +243,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
static struct fb_monspecs at91fb_default_monspecs = { static struct fb_monspecs at91fb_default_monspecs = {
.manufacturer = "HIT", .manufacturer = "HIT",
.monitor = "TX09D70VM1CCA", .monitor = "TX09D70VM1CCA",
.modedb = at91_tft_vga_modes, .modedb = at91_tft_vga_modes,
.modedb_len = ARRAY_SIZE(at91_tft_vga_modes), .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
...@@ -254,7 +254,7 @@ static struct fb_monspecs at91fb_default_monspecs = { ...@@ -254,7 +254,7 @@ static struct fb_monspecs at91fb_default_monspecs = {
}; };
#define AT91SAM9263_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \ #define AT91SAM9263_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
| ATMEL_LCDC_DISTYPE_TFT \ | ATMEL_LCDC_DISTYPE_TFT \
| ATMEL_LCDC_CLKMOD_ALWAYSACTIVE) | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
static void at91_lcdc_power_control(int on) static void at91_lcdc_power_control(int on)
......
...@@ -122,16 +122,16 @@ static struct mtd_partition __initdata ek_nand_partition[] = { ...@@ -122,16 +122,16 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
{ {
.name = "Bootstrap", .name = "Bootstrap",
.offset = 0, .offset = 0,
.size = 4 * 1024 * 1024, .size = 4 * SZ_1M,
}, },
{ {
.name = "Partition 1", .name = "Partition 1",
.offset = 4 * 1024 * 1024, .offset = MTDPART_OFS_NXTBLK,
.size = 60 * 1024 * 1024, .size = 60 * SZ_1M,
}, },
{ {
.name = "Partition 2", .name = "Partition 2",
.offset = 64 * 1024 * 1024, .offset = MTDPART_OFS_NXTBLK,
.size = MTDPART_SIZ_FULL, .size = MTDPART_SIZ_FULL,
}, },
}; };
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <video/atmel_lcdc.h> #include <video/atmel_lcdc.h>
#include <mach/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -27,6 +26,7 @@ ...@@ -27,6 +26,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/gpio.h> #include <mach/gpio.h>
#include <mach/at91sam9_smc.h> #include <mach/at91sam9_smc.h>
...@@ -81,11 +81,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = { ...@@ -81,11 +81,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
{ {
.name = "Partition 1", .name = "Partition 1",
.offset = 0, .offset = 0,
.size = 256 * 1024, .size = SZ_256K,
}, },
{ {
.name = "Partition 2", .name = "Partition 2",
.offset = 256 * 1024 , .offset = MTDPART_OFS_NXTBLK,
.size = MTDPART_SIZ_FULL, .size = MTDPART_SIZ_FULL,
}, },
}; };
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <linux/input.h> #include <linux/input.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <mach/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -39,6 +38,7 @@ ...@@ -39,6 +38,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/gpio.h> #include <mach/gpio.h>
#include <mach/at91_shdwc.h> #include <mach/at91_shdwc.h>
...@@ -93,18 +93,18 @@ static struct at91_eth_data __initdata ek_macb_data = { ...@@ -93,18 +93,18 @@ static struct at91_eth_data __initdata ek_macb_data = {
static struct mtd_partition __initdata ek_nand_partition[] = { static struct mtd_partition __initdata ek_nand_partition[] = {
{ {
.name = "Uboot & Kernel", .name = "Uboot & Kernel",
.offset = 0x00000000, .offset = 0,
.size = 16 * 1024 * 1024, .size = SZ_16M,
}, },
{ {
.name = "Root FS", .name = "Root FS",
.offset = 0x01000000, .offset = MTDPART_OFS_NXTBLK,
.size = 120 * 1024 * 1024, .size = 120 * SZ_1M,
}, },
{ {
.name = "FS", .name = "FS",
.offset = 0x08800000, .offset = MTDPART_OFS_NXTBLK,
.size = 120 * 1024 * 1024, .size = 120 * SZ_1M,
} }
}; };
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
#include <linux/input.h> #include <linux/input.h>
#include <mach/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -38,6 +37,7 @@ ...@@ -38,6 +37,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/gpio.h> #include <mach/gpio.h>
#include <mach/at91_shdwc.h> #include <mach/at91_shdwc.h>
...@@ -106,18 +106,18 @@ static struct at91_eth_data __initdata ek_macb_data = { ...@@ -106,18 +106,18 @@ static struct at91_eth_data __initdata ek_macb_data = {
static struct mtd_partition __initdata ek_nand_partition[] = { static struct mtd_partition __initdata ek_nand_partition[] = {
{ {
.name = "Linux Kernel", .name = "Linux Kernel",
.offset = 0x00000000, .offset = 0,
.size = 16 * 1024 * 1024, .size = SZ_16M,
}, },
{ {
.name = "Root FS", .name = "Root FS",
.offset = 0x01000000, .offset = MTDPART_OFS_NXTBLK,
.size = 120 * 1024 * 1024, .size = 120 * SZ_1M,
}, },
{ {
.name = "FS", .name = "FS",
.offset = 0x08800000, .offset = MTDPART_OFS_NXTBLK,
.size = 120 * 1024 * 1024, .size = 120 * SZ_1M,
} }
}; };
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
#include <linux/input.h> #include <linux/input.h>
#include <mach/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -42,6 +41,7 @@ ...@@ -42,6 +41,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/gpio.h> #include <mach/gpio.h>
#include <mach/at91rm9200_mc.h> #include <mach/at91rm9200_mc.h>
...@@ -150,27 +150,27 @@ static struct mtd_partition __initdata yl9200_nand_partition[] = { ...@@ -150,27 +150,27 @@ static struct mtd_partition __initdata yl9200_nand_partition[] = {
{ {
.name = "AT91 NAND partition 1, boot", .name = "AT91 NAND partition 1, boot",
.offset = 0, .offset = 0,
.size = 1 * SZ_256K .size = SZ_256K
}, },
{ {
.name = "AT91 NAND partition 2, kernel", .name = "AT91 NAND partition 2, kernel",
.offset = 1 * SZ_256K, .offset = MTDPART_OFS_NXTBLK,
.size = 2 * SZ_1M - 1 * SZ_256K .size = (2 * SZ_1M) - SZ_256K
}, },
{ {
.name = "AT91 NAND partition 3, filesystem", .name = "AT91 NAND partition 3, filesystem",
.offset = 2 * SZ_1M, .offset = MTDPART_OFS_NXTBLK,
.size = 14 * SZ_1M .size = 14 * SZ_1M
}, },
{ {
.name = "AT91 NAND partition 4, storage", .name = "AT91 NAND partition 4, storage",
.offset = 16 * SZ_1M, .offset = MTDPART_OFS_NXTBLK,
.size = 16 * SZ_1M .size = SZ_16M
}, },
{ {
.name = "AT91 NAND partition 5, ext-fs", .name = "AT91 NAND partition 5, ext-fs",
.offset = 32 * SZ_1M, .offset = MTDPART_OFS_NXTBLK,
.size = 32 * SZ_1M .size = SZ_32M
} }
}; };
...@@ -193,24 +193,24 @@ static struct atmel_nand_data __initdata yl9200_nand_data = { ...@@ -193,24 +193,24 @@ static struct atmel_nand_data __initdata yl9200_nand_data = {
* NOR Flash * NOR Flash
*/ */
#define YL9200_FLASH_BASE AT91_CHIPSELECT_0 #define YL9200_FLASH_BASE AT91_CHIPSELECT_0
#define YL9200_FLASH_SIZE 0x1000000 #define YL9200_FLASH_SIZE SZ_16M
static struct mtd_partition yl9200_flash_partitions[] = { static struct mtd_partition yl9200_flash_partitions[] = {
{ {
.name = "Bootloader", .name = "Bootloader",
.size = 0x00040000,
.offset = 0, .offset = 0,
.size = SZ_256K,
.mask_flags = MTD_WRITEABLE, /* force read-only */ .mask_flags = MTD_WRITEABLE, /* force read-only */
}, },
{ {
.name = "Kernel", .name = "Kernel",
.size = 0x001C0000, .offset = MTDPART_OFS_NXTBLK,
.offset = 0x00040000, .size = (2 * SZ_1M) - SZ_256K
}, },
{ {
.name = "Filesystem", .name = "Filesystem",
.size = MTDPART_SIZ_FULL, .offset = MTDPART_OFS_NXTBLK,
.offset = 0x00200000 .size = MTDPART_SIZ_FULL
} }
}; };
...@@ -390,10 +390,6 @@ static struct spi_board_info yl9200_spi_devices[] = { ...@@ -390,10 +390,6 @@ static struct spi_board_info yl9200_spi_devices[] = {
#if defined(CONFIG_FB_S1D135XX) || defined(CONFIG_FB_S1D13XXX_MODULE) #if defined(CONFIG_FB_S1D135XX) || defined(CONFIG_FB_S1D13XXX_MODULE)
#include <video/s1d13xxxfb.h> #include <video/s1d13xxxfb.h>
#define AT91_FB_REG_BASE 0x80000000L
#define AT91_FB_REG_SIZE 0x200
#define AT91_FB_VMEM_BASE 0x80200000L
#define AT91_FB_VMEM_SIZE 0x200000L
static void __init yl9200_init_video(void) static void __init yl9200_init_video(void)
{ {
...@@ -516,29 +512,33 @@ static struct s1d13xxxfb_regval yl9200_s1dfb_initregs[] = ...@@ -516,29 +512,33 @@ static struct s1d13xxxfb_regval yl9200_s1dfb_initregs[] =
{S1DREG_COM_DISP_MODE, 0x01}, /* Display Mode Register, LCD only*/ {S1DREG_COM_DISP_MODE, 0x01}, /* Display Mode Register, LCD only*/
}; };
static u64 s1dfb_dmamask = DMA_BIT_MASK(32);
static struct s1d13xxxfb_pdata yl9200_s1dfb_pdata = { static struct s1d13xxxfb_pdata yl9200_s1dfb_pdata = {
.initregs = yl9200_s1dfb_initregs, .initregs = yl9200_s1dfb_initregs,
.initregssize = ARRAY_SIZE(yl9200_s1dfb_initregs), .initregssize = ARRAY_SIZE(yl9200_s1dfb_initregs),
.platform_init_video = yl9200_init_video, .platform_init_video = yl9200_init_video,
}; };
#define YL9200_FB_REG_BASE AT91_CHIPSELECT_7
#define YL9200_FB_VMEM_BASE YL9200_FB_REG_BASE + SZ_2M
#define YL9200_FB_VMEM_SIZE SZ_2M
static struct resource yl9200_s1dfb_resource[] = { static struct resource yl9200_s1dfb_resource[] = {
[0] = { /* video mem */ [0] = { /* video mem */
.name = "s1d13xxxfb memory", .name = "s1d13xxxfb memory",
.start = AT91_FB_VMEM_BASE, .start = YL9200_FB_VMEM_BASE,
.end = AT91_FB_VMEM_BASE + AT91_FB_VMEM_SIZE -1, .end = YL9200_FB_VMEM_BASE + YL9200_FB_VMEM_SIZE -1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
[1] = { /* video registers */ [1] = { /* video registers */
.name = "s1d13xxxfb registers", .name = "s1d13xxxfb registers",
.start = AT91_FB_REG_BASE, .start = YL9200_FB_REG_BASE,
.end = AT91_FB_REG_BASE + AT91_FB_REG_SIZE -1, .end = YL9200_FB_REG_BASE + SZ_512 -1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
}; };
static u64 s1dfb_dmamask = DMA_BIT_MASK(32);
static struct platform_device yl9200_s1dfb_device = { static struct platform_device yl9200_s1dfb_device = {
.name = "s1d13806fb", .name = "s1d13806fb",
.id = -1, .id = -1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment