Commit b591f0de authored by Art Haas's avatar Art Haas Committed by Linus Torvalds

[PATCH] C99 initializers for drivers/mtd/maps

parent ab9c9f80
...@@ -83,17 +83,17 @@ void autcpu12_copy_to(struct map_info *map, unsigned long to, const void *from, ...@@ -83,17 +83,17 @@ void autcpu12_copy_to(struct map_info *map, unsigned long to, const void *from,
static struct mtd_info *sram_mtd; static struct mtd_info *sram_mtd;
struct map_info autcpu12_sram_map = { struct map_info autcpu12_sram_map = {
name: "SRAM", .name = "SRAM",
size: 32768, .size = 32768,
buswidth: 8, .buswidth = 8,
read8: autcpu12_read8, .read8 = autcpu12_read8,
read16: autcpu12_read16, .read16 = autcpu12_read16,
read32: autcpu12_read32, .read32 = autcpu12_read32,
copy_from: autcpu12_copy_from, .copy_from = autcpu12_copy_from,
write8: autcpu12_write8, .write8 = autcpu12_write8,
write16: autcpu12_write16, .write16 = autcpu12_write16,
write32: autcpu12_write32, .write32 = autcpu12_write32,
copy_to: autcpu12_copy_to .copy_to = autcpu12_copy_to
}; };
static int __init init_autcpu12_sram (void) static int __init init_autcpu12_sram (void)
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include <linux/mtd/map.h> #include <linux/mtd/map.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
__u8 cdb89712_read8(struct map_info *map, unsigned long ofs) __u8 cdb89712_read8(struct map_info *map, unsigned long ofs)
{ {
return __raw_readb(map->map_priv_1 + ofs); return __raw_readb(map->map_priv_1 + ofs);
...@@ -65,28 +63,27 @@ void cdb89712_copy_to(struct map_info *map, unsigned long to, const void *from, ...@@ -65,28 +63,27 @@ void cdb89712_copy_to(struct map_info *map, unsigned long to, const void *from,
} }
} }
static struct mtd_info *flash_mtd; static struct mtd_info *flash_mtd;
struct map_info cdb89712_flash_map = { struct map_info cdb89712_flash_map = {
name: "flash", .name = "flash",
size: FLASH_SIZE, .size = FLASH_SIZE,
buswidth: FLASH_WIDTH, .buswidth = FLASH_WIDTH,
read8: cdb89712_read8, .read8 = cdb89712_read8,
read16: cdb89712_read16, .read16 = cdb89712_read16,
read32: cdb89712_read32, .read32 = cdb89712_read32,
copy_from: cdb89712_copy_from, .copy_from = cdb89712_copy_from,
write8: cdb89712_write8, .write8 = cdb89712_write8,
write16: cdb89712_write16, .write16 = cdb89712_write16,
write32: cdb89712_write32, .write32 = cdb89712_write32,
copy_to: cdb89712_copy_to .copy_to = cdb89712_copy_to
}; };
struct resource cdb89712_flash_resource = { struct resource cdb89712_flash_resource = {
name: "Flash", .name = "Flash",
start: FLASH_START, .start = FLASH_START,
end: FLASH_START + FLASH_SIZE - 1, .end = FLASH_START + FLASH_SIZE - 1,
flags: IORESOURCE_IO | IORESOURCE_BUSY, .flags = IORESOURCE_IO | IORESOURCE_BUSY,
}; };
static int __init init_cdb89712_flash (void) static int __init init_cdb89712_flash (void)
...@@ -139,31 +136,27 @@ static int __init init_cdb89712_flash (void) ...@@ -139,31 +136,27 @@ static int __init init_cdb89712_flash (void)
return err; return err;
} }
static struct mtd_info *sram_mtd; static struct mtd_info *sram_mtd;
struct map_info cdb89712_sram_map = { struct map_info cdb89712_sram_map = {
name: "SRAM", .name = "SRAM",
size: SRAM_SIZE, .size = SRAM_SIZE,
buswidth: SRAM_WIDTH, .buswidth = SRAM_WIDTH,
read8: cdb89712_read8, .read8 = cdb89712_read8,
read16: cdb89712_read16, .read16 = cdb89712_read16,
read32: cdb89712_read32, .read32 = cdb89712_read32,
copy_from: cdb89712_copy_from, .copy_from = cdb89712_copy_from,
write8: cdb89712_write8, .write8 = cdb89712_write8,
write16: cdb89712_write16, .write16 = cdb89712_write16,
write32: cdb89712_write32, .write32 = cdb89712_write32,
copy_to: cdb89712_copy_to .copy_to = cdb89712_copy_to
}; };
struct resource cdb89712_sram_resource = { struct resource cdb89712_sram_resource = {
name: "SRAM", .name = "SRAM",
start: SRAM_START, .start = SRAM_START,
end: SRAM_START + SRAM_SIZE - 1, .end = SRAM_START + SRAM_SIZE - 1,
flags: IORESOURCE_IO | IORESOURCE_BUSY, .flags = IORESOURCE_IO | IORESOURCE_BUSY,
}; };
static int __init init_cdb89712_sram (void) static int __init init_cdb89712_sram (void)
...@@ -212,29 +205,23 @@ static int __init init_cdb89712_sram (void) ...@@ -212,29 +205,23 @@ static int __init init_cdb89712_sram (void)
return err; return err;
} }
static struct mtd_info *bootrom_mtd; static struct mtd_info *bootrom_mtd;
struct map_info cdb89712_bootrom_map = { struct map_info cdb89712_bootrom_map = {
name: "BootROM", .name = "BootROM",
size: BOOTROM_SIZE, .size = BOOTROM_SIZE,
buswidth: BOOTROM_WIDTH, .buswidth = BOOTROM_WIDTH,
read8: cdb89712_read8, .read8 = cdb89712_read8,
read16: cdb89712_read16, .read16 = cdb89712_read16,
read32: cdb89712_read32, .read32 = cdb89712_read32,
copy_from: cdb89712_copy_from, .copy_from = cdb89712_copy_from,
}; };
struct resource cdb89712_bootrom_resource = { struct resource cdb89712_bootrom_resource = {
name: "BootROM", .name = "BootROM",
start: BOOTROM_START, .start = BOOTROM_START,
end: BOOTROM_START + BOOTROM_SIZE - 1, .end = BOOTROM_START + BOOTROM_SIZE - 1,
flags: IORESOURCE_IO | IORESOURCE_BUSY, .flags = IORESOURCE_IO | IORESOURCE_BUSY,
}; };
static int __init init_cdb89712_bootrom (void) static int __init init_cdb89712_bootrom (void)
...@@ -283,10 +270,6 @@ static int __init init_cdb89712_bootrom (void) ...@@ -283,10 +270,6 @@ static int __init init_cdb89712_bootrom (void)
return err; return err;
} }
static int __init init_cdb89712_maps(void) static int __init init_cdb89712_maps(void)
{ {
......
...@@ -76,15 +76,15 @@ static void clps_copy_to(struct map_info *map, unsigned long to, const void *fro ...@@ -76,15 +76,15 @@ static void clps_copy_to(struct map_info *map, unsigned long to, const void *fro
} }
static struct map_info clps_map __initdata = { static struct map_info clps_map __initdata = {
name: "clps flash", .name = "clps flash",
read8: clps_read8, .read8 = clps_read8,
read16: clps_read16, .read16 = clps_read16,
read32: clps_read32, .read32 = clps_read32,
copy_from: clps_copy_from, .copy_from = clps_copy_from,
write8: clps_write8, .write8 = clps_write8,
write16: clps_write16, .write16 = clps_write16,
write32: clps_write32, .write32 = clps_write32,
copy_to: clps_copy_to, .copy_to = clps_copy_to,
}; };
#ifdef CONFIG_MTD_CEIVA_STATICMAP #ifdef CONFIG_MTD_CEIVA_STATICMAP
...@@ -115,23 +115,25 @@ static struct map_info clps_map __initdata = { ...@@ -115,23 +115,25 @@ static struct map_info clps_map __initdata = {
static struct mtd_partition ceiva_partitions[] = { static struct mtd_partition ceiva_partitions[] = {
{ {
name: "Ceiva BOOT partition", .name = "Ceiva BOOT partition",
size: BOOT_PARTITION_SIZE_KiB*1024, .size = BOOT_PARTITION_SIZE_KiB*1024,
offset: 0,
},
},{ {
name: "Ceiva parameters partition", .name = "Ceiva parameters partition",
size: PARAMS_PARTITION_SIZE_KiB*1024, .size = PARAMS_PARTITION_SIZE_KiB*1024,
offset: (16 + 8) * 1024, .offset = (16 + 8) * 1024,
},{ },
name: "Ceiva kernel partition", {
size: (KERNEL_PARTITION_SIZE_KiB)*1024, .name = "Ceiva kernel partition",
offset: 0x20000, .size = (KERNEL_PARTITION_SIZE_KiB)*1024,
.offset = 0x20000,
},{
name: "Ceiva root filesystem partition", },
offset: MTDPART_OFS_APPEND, {
size: (ROOT_PARTITION_SIZE_KiB)*1024, .name = "Ceiva root filesystem partition",
.offset = MTDPART_OFS_APPEND,
.size = (ROOT_PARTITION_SIZE_KiB)*1024,
} }
}; };
#endif #endif
......
...@@ -99,39 +99,39 @@ void flagadm_copy_to(struct map_info *map, unsigned long to, const void *from, s ...@@ -99,39 +99,39 @@ void flagadm_copy_to(struct map_info *map, unsigned long to, const void *from, s
} }
struct map_info flagadm_map = { struct map_info flagadm_map = {
name: "FlagaDM flash device", .name = "FlagaDM flash device",
size: FLASH_SIZE, .size = FLASH_SIZE,
buswidth: 2, .buswidth = 2,
read8: flagadm_read8, .read8 = flagadm_read8,
read16: flagadm_read16, .read16 = flagadm_read16,
read32: flagadm_read32, .read32 = flagadm_read32,
copy_from: flagadm_copy_from, .copy_from = flagadm_copy_from,
write8: flagadm_write8, .write8 = flagadm_write8,
write16: flagadm_write16, .write16 = flagadm_write16,
write32: flagadm_write32, .write32 = flagadm_write32,
copy_to: flagadm_copy_to .copy_to = flagadm_copy_to
}; };
struct mtd_partition flagadm_parts[] = { struct mtd_partition flagadm_parts[] = {
{ {
name : "Bootloader", .name = "Bootloader",
offset : FLASH_PARTITION0_ADDR, .offset = FLASH_PARTITION0_ADDR,
size : FLASH_PARTITION0_SIZE .size = FLASH_PARTITION0_SIZE
}, },
{ {
name : "Kernel image", .name = "Kernel image",
offset : FLASH_PARTITION1_ADDR, .offset = FLASH_PARTITION1_ADDR,
size : FLASH_PARTITION1_SIZE .size = FLASH_PARTITION1_SIZE
}, },
{ {
name : "Initial ramdisk image", .name = "Initial ramdisk image",
offset : FLASH_PARTITION2_ADDR, .offset = FLASH_PARTITION2_ADDR,
size : FLASH_PARTITION2_SIZE .size = FLASH_PARTITION2_SIZE
}, },
{ {
name : "Persistant storage", .name = "Persistant storage",
offset : FLASH_PARTITION3_ADDR, .offset = FLASH_PARTITION3_ADDR,
size : FLASH_PARTITION3_SIZE .size = FLASH_PARTITION3_SIZE
} }
}; };
......
...@@ -132,20 +132,15 @@ void cstm_mips_ixx_set_vpp(struct map_info *map,int vpp) ...@@ -132,20 +132,15 @@ void cstm_mips_ixx_set_vpp(struct map_info *map,int vpp)
} }
const struct map_info basic_cstm_mips_ixx_map = { const struct map_info basic_cstm_mips_ixx_map = {
NULL, .read8 = cstm_mips_ixx_read8,
0, .read16 = cstm_mips_ixx_read16,
0, .read32 = cstm_mips_ixx_read32,
cstm_mips_ixx_read8, .copy_from = cstm_mips_ixx_copy_from,
cstm_mips_ixx_read16, .write8 = cstm_mips_ixx_write8,
cstm_mips_ixx_read32, .write16 = cstm_mips_ixx_write16,
cstm_mips_ixx_copy_from, .write32 = cstm_mips_ixx_write32,
cstm_mips_ixx_write8, .copy_to = cstm_mips_ixx_copy_to,
cstm_mips_ixx_write16, .set_vpp = cstm_mips_ixx_set_vpp,
cstm_mips_ixx_write32,
cstm_mips_ixx_copy_to,
cstm_mips_ixx_set_vpp,
0,
0
}; };
/* board and partition description */ /* board and partition description */
...@@ -175,9 +170,8 @@ const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] = ...@@ -175,9 +170,8 @@ const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] =
static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP_PARTITIONS] = { static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP_PARTITIONS] = {
{ // 28F128J3A in 2x16 configuration { // 28F128J3A in 2x16 configuration
{ {
name: "main partition ", .name = "main partition ",
size: 0x02000000, // 128 x 2 x 128k byte sectors .size = 0x02000000, // 128 x 2 x 128k byte sectors
offset: 0,
}, },
}, },
}; };
...@@ -197,9 +191,8 @@ const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] = ...@@ -197,9 +191,8 @@ const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] =
static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP_PARTITIONS] = { static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP_PARTITIONS] = {
{ {
{ {
name: "main partition", .name = "main partition",
size: CONFIG_MTD_CSTM_MIPS_IXX_LEN, .size = CONFIG_MTD_CSTM_MIPS_IXX_LEN,
offset: 0,
}, },
}, },
}; };
......
...@@ -16,22 +16,28 @@ ...@@ -16,22 +16,28 @@
/* partition_info gives details on the logical partitions that the split the /* partition_info gives details on the logical partitions that the split the
* single flash device into. If the size if zero we use up to the end of the * single flash device into. If the size if zero we use up to the end of the
* device. */ * device. */
static struct mtd_partition partition_info[]= {{name: "BR bootloader", // raw static struct mtd_partition partition_info[]= {
size: 128 * 1024, {
offset: 0, .name = "BR bootloader", /* raw */
mask_flags: MTD_WRITEABLE}, .size = 128 * 1024,
{name: "PPC bootloader", // flfs .mask_flags = MTD_WRITEABLE
size: 128 * 1024, },
offset: MTDPART_OFS_APPEND, {
mask_flags: 0}, .name = "PPC bootloader", /* flfs */
{name: "Kernel", // idxfs .size = 128 * 1024,
size: 768 * 1024, .offset = MTDPART_OFS_APPEND,
offset: MTDPART_OFS_APPEND, },
mask_flags: 0}, {
{name: "System", // jffs .name = "Kernel", /* idxfs */
size: MTDPART_SIZ_FULL, .size = 768 * 1024,
offset: MTDPART_OFS_APPEND, .offset = MTDPART_OFS_APPEND,
mask_flags: 0}}; },
{
.name = "System", /* jffs */
.size = MTDPART_SIZ_FULL,
.offset = MTDPART_OFS_APPEND,
}
};
#define NUM_PARTITIONS (sizeof(partition_info) / sizeof(partition_info[0])) #define NUM_PARTITIONS (sizeof(partition_info) / sizeof(partition_info[0]))
...@@ -84,17 +90,17 @@ void dbox2_flash_copy_to(struct map_info *map, unsigned long to, const void *fro ...@@ -84,17 +90,17 @@ void dbox2_flash_copy_to(struct map_info *map, unsigned long to, const void *fro
} }
struct map_info dbox2_flash_map = { struct map_info dbox2_flash_map = {
name: "D-Box 2 flash memory", .name = "D-Box 2 flash memory",
size: WINDOW_SIZE, .size = WINDOW_SIZE,
buswidth: 4, .buswidth = 4,
read8: dbox2_flash_read8, .read8 = dbox2_flash_read8,
read16: dbox2_flash_read16, .read16 = dbox2_flash_read16,
read32: dbox2_flash_read32, .read32 = dbox2_flash_read32,
copy_from: dbox2_flash_copy_from, .copy_from = dbox2_flash_copy_from,
write8: dbox2_flash_write8, .write8 = dbox2_flash_write8,
write16: dbox2_flash_write16, .write16 = dbox2_flash_write16,
write32: dbox2_flash_write32, .write32 = dbox2_flash_write32,
copy_to: dbox2_flash_copy_to .copy_to = dbox2_flash_copy_to
}; };
int __init init_dbox2_flash(void) int __init init_dbox2_flash(void)
......
...@@ -92,16 +92,16 @@ void dc21285_copy_to(struct map_info *map, unsigned long to, const void *from, s ...@@ -92,16 +92,16 @@ void dc21285_copy_to(struct map_info *map, unsigned long to, const void *from, s
} }
struct map_info dc21285_map = { struct map_info dc21285_map = {
name: "DC21285 flash", .name = "DC21285 flash",
size: 16*1024*1024, .size = 16*1024*1024,
read8: dc21285_read8, .read8 = dc21285_read8,
read16: dc21285_read16, .read16 = dc21285_read16,
read32: dc21285_read32, .read32 = dc21285_read32,
copy_from: dc21285_copy_from, .copy_from = dc21285_copy_from,
write8: dc21285_write8, .write8 = dc21285_write8,
write16: dc21285_write16, .write16 = dc21285_write16,
write32: dc21285_write32, .write32 = dc21285_write32,
copy_to: dc21285_copy_to .copy_to = dc21285_copy_to
}; };
......
...@@ -79,17 +79,17 @@ void edb7312nor_copy_to(struct map_info *map, unsigned long to, const void *from ...@@ -79,17 +79,17 @@ void edb7312nor_copy_to(struct map_info *map, unsigned long to, const void *from
} }
struct map_info edb7312nor_map = { struct map_info edb7312nor_map = {
name: "NOR flash on EDB7312", .name = "NOR flash on EDB7312",
size: WINDOW_SIZE, .size = WINDOW_SIZE,
buswidth: BUSWIDTH, .buswidth = BUSWIDTH,
read8: edb7312nor_read8, .read8 = edb7312nor_read8,
read16: edb7312nor_read16, .read16 = edb7312nor_read16,
read32: edb7312nor_read32, .read32 = edb7312nor_read32,
copy_from: edb7312nor_copy_from, .copy_from = edb7312nor_copy_from,
write8: edb7312nor_write8, .write8 = edb7312nor_write8,
write16: edb7312nor_write16, .write16 = edb7312nor_write16,
write32: edb7312nor_write32, .write32 = edb7312nor_write32,
copy_to: edb7312nor_copy_to .copy_to = edb7312nor_copy_to
}; };
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
...@@ -97,22 +97,21 @@ struct map_info edb7312nor_map = { ...@@ -97,22 +97,21 @@ struct map_info edb7312nor_map = {
/* /*
* MTD partitioning stuff * MTD partitioning stuff
*/ */
static struct mtd_partition static_partitions[3] = static struct mtd_partition static_partitions[3] = {
{
{ {
name: "ARMboot", .name = "ARMboot",
size: 0x40000, .size = 0x40000,
offset: 0 .offset = 0
}, },
{ {
name: "Kernel", .name = "Kernel",
size: 0x200000, .size = 0x200000,
offset: 0x40000 .offset = 0x40000
}, },
{ {
name: "RootFS", .name = "RootFS",
size: 0xDC0000, .size = 0xDC0000,
offset: 0x240000 .offset = 0x240000
}, },
}; };
......
...@@ -58,15 +58,20 @@ static spinlock_t elan_104nc_spin = SPIN_LOCK_UNLOCKED; ...@@ -58,15 +58,20 @@ static spinlock_t elan_104nc_spin = SPIN_LOCK_UNLOCKED;
/* partition_info gives details on the logical partitions that the split the /* partition_info gives details on the logical partitions that the split the
* single flash device into. If the size if zero we use up to the end of the * single flash device into. If the size if zero we use up to the end of the
* device. */ * device. */
static struct mtd_partition partition_info[]={ static struct mtd_partition partition_info[] = {
{ name: "ELAN-104NC flash boot partition", {
offset: 0, .name = "ELAN-104NC flash boot partition",
size: 640*1024 }, .size = 640*1024
{ name: "ELAN-104NC flash partition 1", },
offset: 640*1024, {
size: 896*1024 }, .name = "ELAN-104NC flash partition 1",
{ name: "ELAN-104NC flash partition 2", .offset = 640*1024,
offset: (640+896)*1024 } .size = 896*1024
},
{
.name = "ELAN-104NC flash partition 2",
.offset = (640+896)*1024,
}
}; };
#define NUM_PARTITIONS (sizeof(partition_info)/sizeof(partition_info[0])) #define NUM_PARTITIONS (sizeof(partition_info)/sizeof(partition_info[0]))
...@@ -195,19 +200,20 @@ static void elan_104nc_copy_to(struct map_info *map, unsigned long to, const voi ...@@ -195,19 +200,20 @@ static void elan_104nc_copy_to(struct map_info *map, unsigned long to, const voi
} }
static struct map_info elan_104nc_map = { static struct map_info elan_104nc_map = {
name: "ELAN-104NC flash", .name = "ELAN-104NC flash",
size: 8*1024*1024, /* this must be set to a maximum possible amount .size = 8*1024*1024, /* this must be set to a maximum
of flash so the cfi probe routines find all possible amount of flash so the
cfi probe routines find all
the chips */ the chips */
buswidth: 2, .buswidth = 2,
read8: elan_104nc_read8, .read8 = elan_104nc_read8,
read16: elan_104nc_read16, .read16 = elan_104nc_read16,
read32: elan_104nc_read32, .read32 = elan_104nc_read32,
copy_from: elan_104nc_copy_from, .copy_from = elan_104nc_copy_from,
write8: elan_104nc_write8, .write8 = elan_104nc_write8,
write16: elan_104nc_write16, .write16 = elan_104nc_write16,
write32: elan_104nc_write32, .write32 = elan_104nc_write32,
copy_to: elan_104nc_copy_to .copy_to = elan_104nc_copy_to
}; };
/* MTD device for all of the flash. */ /* MTD device for all of the flash. */
......
...@@ -92,17 +92,17 @@ static void epxa_copy_to(struct map_info *map, unsigned long to, const void *fro ...@@ -92,17 +92,17 @@ static void epxa_copy_to(struct map_info *map, unsigned long to, const void *fro
static struct map_info epxa_map = { static struct map_info epxa_map = {
name: "EPXA flash", .name = "EPXA flash",
size: FLASH_SIZE, .size = FLASH_SIZE,
buswidth: 2, .buswidth = 2,
read8: epxa_read8, .read8 = epxa_read8,
read16: epxa_read16, .read16 = epxa_read16,
read32: epxa_read32, .read32 = epxa_read32,
copy_from: epxa_copy_from, .copy_from = epxa_copy_from,
write8: epxa_write8, .write8 = epxa_write8,
write16: epxa_write16, .write16 = epxa_write16,
write32: epxa_write32, .write32 = epxa_write32,
copy_to: epxa_copy_to .copy_to = epxa_copy_to
}; };
......
...@@ -78,16 +78,16 @@ void fortunet_copy_to(struct map_info *map, unsigned long to, const void *from, ...@@ -78,16 +78,16 @@ void fortunet_copy_to(struct map_info *map, unsigned long to, const void *from,
} }
struct map_info default_map = { struct map_info default_map = {
size: DEF_WINDOW_SIZE, .size = DEF_WINDOW_SIZE,
buswidth: 4, .buswidth = 4,
read8: fortunet_read8, .read8 = fortunet_read8,
read16: fortunet_read16, .read16 = fortunet_read16,
read32: fortunet_read32, .read32 = fortunet_read32,
copy_from: fortunet_copy_from, .copy_from = fortunet_copy_from,
write8: fortunet_write8, .write8 = fortunet_write8,
write16: fortunet_write16, .write16 = fortunet_write16,
write32: fortunet_write32, .write32 = fortunet_write32,
copy_to: fortunet_copy_to .copy_to = fortunet_copy_to
}; };
static char * __init get_string_option(char *dest,int dest_size,char *sor) static char * __init get_string_option(char *dest,int dest_size,char *sor)
......
...@@ -82,30 +82,30 @@ void impa7_copy_to(struct map_info *map, unsigned long to, const void *from, ssi ...@@ -82,30 +82,30 @@ void impa7_copy_to(struct map_info *map, unsigned long to, const void *from, ssi
static struct map_info impa7_map[NUM_FLASHBANKS] = { static struct map_info impa7_map[NUM_FLASHBANKS] = {
{ {
name: "impA7 NOR Flash Bank #0", .name = "impA7 NOR Flash Bank #0",
size: WINDOW_SIZE0, .size = WINDOW_SIZE0,
buswidth: BUSWIDTH, .buswidth = BUSWIDTH,
read8: impa7_read8, .read8 = impa7_read8,
read16: impa7_read16, .read16 = impa7_read16,
read32: impa7_read32, .read32 = impa7_read32,
copy_from: impa7_copy_from, .copy_from = impa7_copy_from,
write8: impa7_write8, .write8 = impa7_write8,
write16: impa7_write16, .write16 = impa7_write16,
write32: impa7_write32, .write32 = impa7_write32,
copy_to: impa7_copy_to .copy_to = impa7_copy_to
}, },
{ {
name: "impA7 NOR Flash Bank #1", .name = "impA7 NOR Flash Bank #1",
size: WINDOW_SIZE1, .size = WINDOW_SIZE1,
buswidth: BUSWIDTH, .buswidth = BUSWIDTH,
read8: impa7_read8, .read8 = impa7_read8,
read16: impa7_read16, .read16 = impa7_read16,
read32: impa7_read32, .read32 = impa7_read32,
copy_from: impa7_copy_from, .copy_from = impa7_copy_from,
write8: impa7_write8, .write8 = impa7_write8,
write16: impa7_write16, .write16 = impa7_write16,
write32: impa7_write32, .write32 = impa7_write32,
copy_to: impa7_copy_to .copy_to = impa7_copy_to
}, },
}; };
...@@ -114,12 +114,11 @@ static struct map_info impa7_map[NUM_FLASHBANKS] = { ...@@ -114,12 +114,11 @@ static struct map_info impa7_map[NUM_FLASHBANKS] = {
/* /*
* MTD partitioning stuff * MTD partitioning stuff
*/ */
static struct mtd_partition static_partitions[] = static struct mtd_partition static_partitions[] = {
{
{ {
name: "FileSystem", .name = "FileSystem",
size: 0x800000, .size = 0x800000,
offset: 0x00000000 .offset = 0x00000000
}, },
}; };
...@@ -143,8 +142,8 @@ int __init init_impa7(void) ...@@ -143,8 +142,8 @@ int __init init_impa7(void)
const char *part_type = 0; const char *part_type = 0;
int i; int i;
static struct { u_long addr; u_long size; } pt[NUM_FLASHBANKS] = { static struct { u_long addr; u_long size; } pt[NUM_FLASHBANKS] = {
{ WINDOW_ADDR0, WINDOW_SIZE0 }, { .addr = WINDOW_ADDR0, .size = WINDOW_SIZE0 },
{ WINDOW_ADDR1, WINDOW_SIZE1 }, { .addr = WINDOW_ADDR1, .size = WINDOW_SIZE1 },
}; };
char mtdid[10]; char mtdid[10];
int devicesfound = 0; int devicesfound = 0;
......
...@@ -195,16 +195,16 @@ static void armflash_copy_to(struct map_info *map, unsigned long to, const void ...@@ -195,16 +195,16 @@ static void armflash_copy_to(struct map_info *map, unsigned long to, const void
static struct map_info armflash_map = static struct map_info armflash_map =
{ {
name: "AFS", .name = "AFS",
read8: armflash_read8, .read8 = armflash_read8,
read16: armflash_read16, .read16 = armflash_read16,
read32: armflash_read32, .read32 = armflash_read32,
copy_from: armflash_copy_from, .copy_from = armflash_copy_from,
write8: armflash_write8, .write8 = armflash_write8,
write16: armflash_write16, .write16 = armflash_write16,
write32: armflash_write32, .write32 = armflash_write32,
copy_to: armflash_copy_to, .copy_to = armflash_copy_to,
set_vpp: armflash_set_vpp, .set_vpp = armflash_set_vpp,
}; };
static struct mtd_info *mtd; static struct mtd_info *mtd;
......
...@@ -67,38 +67,40 @@ static void iq80310_copy_to(struct map_info *map, unsigned long to, const void * ...@@ -67,38 +67,40 @@ static void iq80310_copy_to(struct map_info *map, unsigned long to, const void *
} }
static struct map_info iq80310_map = { static struct map_info iq80310_map = {
name: "IQ80310 flash", .name = "IQ80310 flash",
size: WINDOW_SIZE, .size = WINDOW_SIZE,
buswidth: BUSWIDTH, .buswidth = BUSWIDTH,
read8: iq80310_read8, .read8 = iq80310_read8,
read16: iq80310_read16, .read16 = iq80310_read16,
read32: iq80310_read32, .read32 = iq80310_read32,
copy_from: iq80310_copy_from, .copy_from = iq80310_copy_from,
write8: iq80310_write8, .write8 = iq80310_write8,
write16: iq80310_write16, .write16 = iq80310_write16,
write32: iq80310_write32, .write32 = iq80310_write32,
copy_to: iq80310_copy_to .copy_to = iq80310_copy_to
}; };
static struct mtd_partition iq80310_partitions[4] = { static struct mtd_partition iq80310_partitions[4] = {
{ {
name: "Firmware", .name = "Firmware",
size: 0x00080000, .size = 0x00080000,
offset: 0, .mask_flags = MTD_WRITEABLE /* force read-only */
mask_flags: MTD_WRITEABLE /* force read-only */ },
},{ {
name: "Kernel", .name = "Kernel",
size: 0x000a0000, .size = 0x000a0000,
offset: 0x00080000, .offset = 0x00080000,
},{ },
name: "Filesystem", {
size: 0x00600000, .name = "Filesystem",
offset: 0x00120000 .size = 0x00600000,
},{ .offset = 0x00120000
name: "RedBoot", },
size: 0x000e0000, {
offset: 0x00720000, .name = "RedBoot",
mask_flags: MTD_WRITEABLE .size = 0x000e0000,
.offset = 0x00720000,
.mask_flags = MTD_WRITEABLE
} }
}; };
......
...@@ -76,18 +76,18 @@ void l440gx_set_vpp(struct map_info *map, int vpp) ...@@ -76,18 +76,18 @@ void l440gx_set_vpp(struct map_info *map, int vpp)
} }
struct map_info l440gx_map = { struct map_info l440gx_map = {
name: "L440GX BIOS", .name = "L440GX BIOS",
size: WINDOW_SIZE, .size = WINDOW_SIZE,
buswidth: BUSWIDTH, .buswidth = BUSWIDTH,
read8: l440gx_read8, .read8 = l440gx_read8,
read16: l440gx_read16, .read16 = l440gx_read16,
read32: l440gx_read32, .read32 = l440gx_read32,
copy_from: l440gx_copy_from, .copy_from = l440gx_copy_from,
write8: l440gx_write8, .write8 = l440gx_write8,
write16: l440gx_write16, .write16 = l440gx_write16,
write32: l440gx_write32, .write32 = l440gx_write32,
copy_to: l440gx_copy_to, .copy_to = l440gx_copy_to,
set_vpp: l440gx_set_vpp .set_vpp = l440gx_set_vpp
}; };
static int __init init_l440gx(void) static int __init init_l440gx(void)
......
...@@ -93,26 +93,25 @@ static void netsc520_copy_to(struct map_info *map, unsigned long to, const void ...@@ -93,26 +93,25 @@ static void netsc520_copy_to(struct map_info *map, unsigned long to, const void
/* partition_info gives details on the logical partitions that the split the /* partition_info gives details on the logical partitions that the split the
* single flash device into. If the size if zero we use up to the end of the * single flash device into. If the size if zero we use up to the end of the
* device. */ * device. */
static struct mtd_partition partition_info[]={ static struct mtd_partition partition_info[] = {
{ {
name: "NetSc520 boot kernel", .name = "NetSc520 boot kernel",
offset: 0, .size = 0xc0000
size: 0xc0000
}, },
{ {
name: "NetSc520 Low BIOS", .name = "NetSc520 Low BIOS",
offset: 0xc0000, .offset = 0xc0000,
size: 0x40000 .size = 0x40000
}, },
{ {
name: "NetSc520 file system", .name = "NetSc520 file system",
offset: 0x100000, .offset = 0x100000,
size: 0xe80000 .size = 0xe80000
}, },
{ {
name: "NetSc520 High BIOS", .name = "NetSc520 High BIOS",
offset: 0xf80000, .offset = 0xf80000,
size: 0x80000 .size = 0x80000
}, },
}; };
#define NUM_PARTITIONS (sizeof(partition_info)/sizeof(partition_info[0])) #define NUM_PARTITIONS (sizeof(partition_info)/sizeof(partition_info[0]))
...@@ -127,18 +126,18 @@ static struct mtd_partition partition_info[]={ ...@@ -127,18 +126,18 @@ static struct mtd_partition partition_info[]={
#define WINDOW_ADDR 0x00200000 #define WINDOW_ADDR 0x00200000
static struct map_info netsc520_map = { static struct map_info netsc520_map = {
name: "netsc520 Flash Bank", .name = "netsc520 Flash Bank",
size: WINDOW_SIZE, .size = WINDOW_SIZE,
buswidth: 4, .buswidth = 4,
read8: netsc520_read8, .read8 = netsc520_read8,
read16: netsc520_read16, .read16 = netsc520_read16,
read32: netsc520_read32, .read32 = netsc520_read32,
copy_from: netsc520_copy_from, .copy_from = netsc520_copy_from,
write8: netsc520_write8, .write8 = netsc520_write8,
write16: netsc520_write16, .write16 = netsc520_write16,
write32: netsc520_write32, .write32 = netsc520_write32,
copy_to: netsc520_copy_to, .copy_to = netsc520_copy_to,
map_priv_2: WINDOW_ADDR .map_priv_2 = WINDOW_ADDR
}; };
#define NUM_FLASH_BANKS (sizeof(netsc520_map)/sizeof(struct map_info)) #define NUM_FLASH_BANKS (sizeof(netsc520_map)/sizeof(struct map_info))
......
...@@ -58,17 +58,17 @@ void nora_copy_to(struct map_info *map, unsigned long to, const void *from, ssiz ...@@ -58,17 +58,17 @@ void nora_copy_to(struct map_info *map, unsigned long to, const void *from, ssiz
} }
struct map_info nora_map = { struct map_info nora_map = {
name: "NORA", .name = "NORA",
size: WINDOW_SIZE, .size = WINDOW_SIZE,
buswidth: 2, .buswidth = 2,
read8: nora_read8, .read8 = nora_read8,
read16: nora_read16, .read16 = nora_read16,
read32: nora_read32, .read32 = nora_read32,
copy_from: nora_copy_from, .copy_from = nora_copy_from,
write8: nora_write8, .write8 = nora_write8,
write16: nora_write16, .write16 = nora_write16,
write32: nora_write32, .write32 = nora_write32,
copy_to: nora_copy_to .copy_to = nora_copy_to
}; };
...@@ -106,64 +106,63 @@ static void nora_mtd_resume (struct mtd_info *mtd) ...@@ -106,64 +106,63 @@ static void nora_mtd_resume (struct mtd_info *mtd)
static struct mtd_info nora_mtds[4] = { /* boot, kernel, ramdisk, fs */ static struct mtd_info nora_mtds[4] = { /* boot, kernel, ramdisk, fs */
{ {
type: MTD_NORFLASH, .type = MTD_NORFLASH,
flags: MTD_CAP_NORFLASH, .flags = MTD_CAP_NORFLASH,
size: 0x60000, .size = 0x60000,
erasesize: 0x20000, .erasesize = 0x20000,
name: "NORA boot firmware", .name = "NORA boot firmware",
module: THIS_MODULE, .module = THIS_MODULE,
erase: nora_mtd_erase, .erase = nora_mtd_erase,
read: nora_mtd_read, .read = nora_mtd_read,
write: nora_mtd_write, .write = nora_mtd_write,
suspend: nora_mtd_suspend, .suspend = nora_mtd_suspend,
resume: nora_mtd_resume, .resume = nora_mtd_resume,
sync: nora_mtd_sync, .sync = nora_mtd_sync,
priv: (void *)0
}, },
{ {
type: MTD_NORFLASH, .type = MTD_NORFLASH,
flags: MTD_CAP_NORFLASH, .flags = MTD_CAP_NORFLASH,
size: 0x0a0000, .size = 0x0a0000,
erasesize: 0x20000, .erasesize = 0x20000,
name: "NORA kernel", .name = "NORA kernel",
module: THIS_MODULE, .module = THIS_MODULE,
erase: nora_mtd_erase, .erase = nora_mtd_erase,
read: nora_mtd_read, .read = nora_mtd_read,
write: nora_mtd_write, .write = nora_mtd_write,
suspend: nora_mtd_suspend, .suspend = nora_mtd_suspend,
resume: nora_mtd_resume, .resume = nora_mtd_resume,
sync: nora_mtd_sync, .sync = nora_mtd_sync,
priv: (void *)0x60000 .priv = (void *)0x60000
}, },
{ {
type: MTD_NORFLASH, .type = MTD_NORFLASH,
flags: MTD_CAP_NORFLASH, .flags = MTD_CAP_NORFLASH,
size: 0x900000, .size = 0x900000,
erasesize: 0x20000, .erasesize = 0x20000,
name: "NORA root filesystem", .name = "NORA root filesystem",
module: THIS_MODULE, .module = THIS_MODULE,
erase: nora_mtd_erase, .erase = nora_mtd_erase,
read: nora_mtd_read, .read = nora_mtd_read,
write: nora_mtd_write, .write = nora_mtd_write,
suspend: nora_mtd_suspend, .suspend = nora_mtd_suspend,
resume: nora_mtd_resume, .resume = nora_mtd_resume,
sync: nora_mtd_sync, .sync = nora_mtd_sync,
priv: (void *)0x100000 .priv = (void *)0x100000
}, },
{ {
type: MTD_NORFLASH, .type = MTD_NORFLASH,
flags: MTD_CAP_NORFLASH, .flags = MTD_CAP_NORFLASH,
size: 0x1600000, .size = 0x1600000,
erasesize: 0x20000, .erasesize = 0x20000,
name: "NORA second filesystem", .name = "NORA second filesystem",
module: THIS_MODULE, .module = THIS_MODULE,
erase: nora_mtd_erase, .erase = nora_mtd_erase,
read: nora_mtd_read, .read = nora_mtd_read,
write: nora_mtd_write, .write = nora_mtd_write,
suspend: nora_mtd_suspend, .suspend = nora_mtd_suspend,
resume: nora_mtd_resume, .resume = nora_mtd_resume,
sync: nora_mtd_sync, .sync = nora_mtd_sync,
priv: (void *)0xa00000 .priv = (void *)0xa00000
} }
}; };
......
...@@ -70,22 +70,22 @@ void ocelot_copy_to(struct map_info *map, unsigned long to, const void *from, ss ...@@ -70,22 +70,22 @@ void ocelot_copy_to(struct map_info *map, unsigned long to, const void *from, ss
static struct mtd_partition *parsed_parts; static struct mtd_partition *parsed_parts;
struct map_info ocelot_flash_map = { struct map_info ocelot_flash_map = {
name: "Ocelot boot flash", .name = "Ocelot boot flash",
size: FLASH_WINDOW_SIZE, .size = FLASH_WINDOW_SIZE,
buswidth: FLASH_BUSWIDTH, .buswidth = FLASH_BUSWIDTH,
read8: ocelot_read8, .read8 = ocelot_read8,
copy_from: ocelot_copy_from_cache, .copy_from = ocelot_copy_from_cache,
write8: ocelot_write8, .write8 = ocelot_write8,
}; };
struct map_info ocelot_nvram_map = { struct map_info ocelot_nvram_map = {
name: "Ocelot NVRAM", .name = "Ocelot NVRAM",
size: NVRAM_WINDOW_SIZE, .size = NVRAM_WINDOW_SIZE,
buswidth: NVRAM_BUSWIDTH, .buswidth = NVRAM_BUSWIDTH,
read8: ocelot_read8, .read8 = ocelot_read8,
copy_from: ocelot_copy_from, .copy_from = ocelot_copy_from,
write8: ocelot_write8, .write8 = ocelot_write8,
copy_to: ocelot_copy_to .copy_to = ocelot_copy_to
}; };
static int __init init_ocelot_maps(void) static int __init init_ocelot_maps(void)
......
...@@ -151,32 +151,32 @@ static void oct5066_copy_to(struct map_info *map, unsigned long to, const void * ...@@ -151,32 +151,32 @@ static void oct5066_copy_to(struct map_info *map, unsigned long to, const void *
static struct map_info oct5066_map[2] = { static struct map_info oct5066_map[2] = {
{ {
name: "Octagon 5066 Socket", .name = "Octagon 5066 Socket",
size: 512 * 1024, .size = 512 * 1024,
buswidth: 1, .buswidth = 1,
read8: oct5066_read8, .read8 = oct5066_read8,
read16: oct5066_read16, .read16 = oct5066_read16,
read32: oct5066_read32, .read32 = oct5066_read32,
copy_from: oct5066_copy_from, .copy_from = oct5066_copy_from,
write8: oct5066_write8, .write8 = oct5066_write8,
write16: oct5066_write16, .write16 = oct5066_write16,
write32: oct5066_write32, .write32 = oct5066_write32,
copy_to: oct5066_copy_to, .copy_to = oct5066_copy_to,
map_priv_1: 1<<6 .map_priv_1 = 1<<6
}, },
{ {
name: "Octagon 5066 Internal Flash", .name = "Octagon 5066 Internal Flash",
size: 2 * 1024 * 1024, .size = 2 * 1024 * 1024,
buswidth: 1, .buswidth = 1,
read8: oct5066_read8, .read8 = oct5066_read8,
read16: oct5066_read16, .read16 = oct5066_read16,
read32: oct5066_read32, .read32 = oct5066_read32,
copy_from: oct5066_copy_from, .copy_from = oct5066_copy_from,
write8: oct5066_write8, .write8 = oct5066_write8,
write16: oct5066_write16, .write16 = oct5066_write16,
write32: oct5066_write32, .write32 = oct5066_write32,
copy_to: oct5066_copy_to, .copy_to = oct5066_copy_to,
map_priv_1: 2<<6 .map_priv_1 = 2<<6
} }
}; };
......
...@@ -98,10 +98,10 @@ intel_iq80310_translate(struct map_pci_info *map, unsigned long ofs) ...@@ -98,10 +98,10 @@ intel_iq80310_translate(struct map_pci_info *map, unsigned long ofs)
} }
static struct mtd_pci_info intel_iq80310_info = { static struct mtd_pci_info intel_iq80310_info = {
init: intel_iq80310_init, .init = intel_iq80310_init,
exit: intel_iq80310_exit, .exit = intel_iq80310_exit,
translate: intel_iq80310_translate, .translate = intel_iq80310_translate,
map_name: "cfi_probe", .map_name = "cfi_probe",
}; };
/* /*
...@@ -181,10 +181,10 @@ intel_dc21285_translate(struct map_pci_info *map, unsigned long ofs) ...@@ -181,10 +181,10 @@ intel_dc21285_translate(struct map_pci_info *map, unsigned long ofs)
} }
static struct mtd_pci_info intel_dc21285_info = { static struct mtd_pci_info intel_dc21285_info = {
init: intel_dc21285_init, .init = intel_dc21285_init,
exit: intel_dc21285_exit, .exit = intel_dc21285_exit,
translate: intel_dc21285_translate, .translate = intel_dc21285_translate,
map_name: "jedec_probe", .map_name = "jedec_probe",
}; };
/* /*
...@@ -193,24 +193,22 @@ static struct mtd_pci_info intel_dc21285_info = { ...@@ -193,24 +193,22 @@ static struct mtd_pci_info intel_dc21285_info = {
static struct pci_device_id mtd_pci_ids[] __devinitdata = { static struct pci_device_id mtd_pci_ids[] __devinitdata = {
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: 0x530d, .device = 0x530d,
subvendor: PCI_ANY_ID, .subvendor = PCI_ANY_ID,
subdevice: PCI_ANY_ID, .subdevice = PCI_ANY_ID,
class: PCI_CLASS_MEMORY_OTHER << 8, .class = PCI_CLASS_MEMORY_OTHER << 8,
class_mask: 0xffff00, .class_mask = 0xffff00,
driver_data: (unsigned long)&intel_iq80310_info, .driver_data = (unsigned long)&intel_iq80310_info,
}, },
{ {
vendor: PCI_VENDOR_ID_DEC, .vendor = PCI_VENDOR_ID_DEC,
device: PCI_DEVICE_ID_DEC_21285, .device = PCI_DEVICE_ID_DEC_21285,
subvendor: 0, /* DC21285 defaults to 0 on reset */ .subvendor = 0, /* DC21285 defaults to 0 on reset */
subdevice: 0, /* DC21285 defaults to 0 on reset */ .subdevice = 0, /* DC21285 defaults to 0 on reset */
class: 0, .driver_data = (unsigned long)&intel_dc21285_info,
class_mask: 0,
driver_data: (unsigned long)&intel_dc21285_info,
}, },
{ 0, } { .vendor = 0, }
}; };
/* /*
...@@ -275,14 +273,14 @@ static void mtd_pci_copyto(struct map_info *_map, unsigned long to, const void * ...@@ -275,14 +273,14 @@ static void mtd_pci_copyto(struct map_info *_map, unsigned long to, const void *
} }
static struct map_info mtd_pci_map = { static struct map_info mtd_pci_map = {
read8: mtd_pci_read8, .read8 = mtd_pci_read8,
read16: mtd_pci_read16, .read16 = mtd_pci_read16,
read32: mtd_pci_read32, .read32 = mtd_pci_read32,
copy_from: mtd_pci_copyfrom, .copy_from = mtd_pci_copyfrom,
write8: mtd_pci_write8, .write8 = mtd_pci_write8,
write16: mtd_pci_write16, .write16 = mtd_pci_write16,
write32: mtd_pci_write32, .write32 = mtd_pci_write32,
copy_to: mtd_pci_copyto, .copy_to = mtd_pci_copyto,
}; };
static int __devinit static int __devinit
...@@ -359,10 +357,10 @@ mtd_pci_remove(struct pci_dev *dev) ...@@ -359,10 +357,10 @@ mtd_pci_remove(struct pci_dev *dev)
} }
static struct pci_driver mtd_pci_driver = { static struct pci_driver mtd_pci_driver = {
name: "MTD PCI", .name = "MTD PCI",
probe: mtd_pci_probe, .probe = mtd_pci_probe,
remove: mtd_pci_remove, .remove = mtd_pci_remove,
id_table: mtd_pci_ids, .id_table = mtd_pci_ids,
}; };
static int __init mtd_pci_maps_init(void) static int __init mtd_pci_maps_init(void)
......
...@@ -63,17 +63,17 @@ void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, s ...@@ -63,17 +63,17 @@ void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, s
} }
struct map_info physmap_map = { struct map_info physmap_map = {
name: "Physically mapped flash", .name = "Physically mapped flash",
size: WINDOW_SIZE, .size = WINDOW_SIZE,
buswidth: BUSWIDTH, .buswidth = BUSWIDTH,
read8: physmap_read8, .read8 = physmap_read8,
read16: physmap_read16, .read16 = physmap_read16,
read32: physmap_read32, .read32 = physmap_read32,
copy_from: physmap_copy_from, .copy_from = physmap_copy_from,
write8: physmap_write8, .write8 = physmap_write8,
write16: physmap_write16, .write16 = physmap_write16,
write32: physmap_write32, .write32 = physmap_write32,
copy_to: physmap_copy_to .copy_to = physmap_copy_to
}; };
int __init init_physmap(void) int __init init_physmap(void)
......
...@@ -65,17 +65,17 @@ void pnc_copy_to(struct map_info *map, unsigned long to, const void *from, ssize ...@@ -65,17 +65,17 @@ void pnc_copy_to(struct map_info *map, unsigned long to, const void *from, ssize
} }
struct map_info pnc_map = { struct map_info pnc_map = {
name: "PNC-2000", .name = "PNC-2000",
size: WINDOW_SIZE, .size = WINDOW_SIZE,
buswidth: 4, .buswidth = 4,
read8: pnc_read8, .read8 = pnc_read8,
read16: pnc_read16, .read16 = pnc_read16,
read32: pnc_read32, .read32 = pnc_read32,
copy_from: pnc_copy_from, .copy_from = pnc_copy_from,
write8: pnc_write8, .write8 = pnc_write8,
write16: pnc_write16, .write16 = pnc_write16,
write32: pnc_write32, .write32 = pnc_write32,
copy_to: pnc_copy_to .copy_to = pnc_copy_to
}; };
...@@ -84,19 +84,18 @@ struct map_info pnc_map = { ...@@ -84,19 +84,18 @@ struct map_info pnc_map = {
*/ */
static struct mtd_partition pnc_partitions[3] = { static struct mtd_partition pnc_partitions[3] = {
{ {
name: "PNC-2000 boot firmware", .name = "PNC-2000 boot firmware",
size: 0x20000, .size = 0x20000,
offset: 0
}, },
{ {
name: "PNC-2000 kernel", .name = "PNC-2000 kernel",
size: 0x1a0000, .size = 0x1a0000,
offset: 0x20000 .offset = 0x20000
}, },
{ {
name: "PNC-2000 filesystem", .name = "PNC-2000 filesystem",
size: 0x240000, .size = 0x240000,
offset: 0x1c0000 .offset = 0x1c0000
} }
}; };
......
...@@ -61,17 +61,17 @@ void rpxlite_copy_to(struct map_info *map, unsigned long to, const void *from, s ...@@ -61,17 +61,17 @@ void rpxlite_copy_to(struct map_info *map, unsigned long to, const void *from, s
} }
struct map_info rpxlite_map = { struct map_info rpxlite_map = {
name: "RPX", .name = "RPX",
size: WINDOW_SIZE, .size = WINDOW_SIZE,
buswidth: 4, .buswidth = 4,
read8: rpxlite_read8, .read8 = rpxlite_read8,
read16: rpxlite_read16, .read16 = rpxlite_read16,
read32: rpxlite_read32, .read32 = rpxlite_read32,
copy_from: rpxlite_copy_from, .copy_from = rpxlite_copy_from,
write8: rpxlite_write8, .write8 = rpxlite_write8,
write16: rpxlite_write16, .write16 = rpxlite_write16,
write32: rpxlite_write32, .write32 = rpxlite_write32,
copy_to: rpxlite_copy_to .copy_to = rpxlite_copy_to
}; };
int __init init_rpxlite(void) int __init init_rpxlite(void)
......
...@@ -90,15 +90,20 @@ static spinlock_t sbc_gxx_spin = SPIN_LOCK_UNLOCKED; ...@@ -90,15 +90,20 @@ static spinlock_t sbc_gxx_spin = SPIN_LOCK_UNLOCKED;
/* partition_info gives details on the logical partitions that the split the /* partition_info gives details on the logical partitions that the split the
* single flash device into. If the size if zero we use up to the end of the * single flash device into. If the size if zero we use up to the end of the
* device. */ * device. */
static struct mtd_partition partition_info[]={ static struct mtd_partition partition_info[] = {
{ name: "SBC-GXx flash boot partition", {
offset: 0, .name = "SBC-GXx flash boot partition",
size: BOOT_PARTITION_SIZE_KiB*1024 }, .size = BOOT_PARTITION_SIZE_KiB*1024
{ name: "SBC-GXx flash data partition", },
offset: BOOT_PARTITION_SIZE_KiB*1024, {
size: (DATA_PARTITION_SIZE_KiB)*1024 }, .name = "SBC-GXx flash data partition",
{ name: "SBC-GXx flash application partition", .offset = BOOT_PARTITION_SIZE_KiB*1024,
offset: (BOOT_PARTITION_SIZE_KiB+DATA_PARTITION_SIZE_KiB)*1024 } .size = (DATA_PARTITION_SIZE_KiB)*1024
},
{
.name = "SBC-GXx flash application partition",
.offset = (BOOT_PARTITION_SIZE_KiB+DATA_PARTITION_SIZE_KiB)*1024
}
}; };
#define NUM_PARTITIONS 3 #define NUM_PARTITIONS 3
...@@ -203,19 +208,20 @@ static void sbc_gxx_copy_to(struct map_info *map, unsigned long to, const void * ...@@ -203,19 +208,20 @@ static void sbc_gxx_copy_to(struct map_info *map, unsigned long to, const void *
} }
static struct map_info sbc_gxx_map = { static struct map_info sbc_gxx_map = {
name: "SBC-GXx flash", .name = "SBC-GXx flash",
size: MAX_SIZE_KiB*1024, /* this must be set to a maximum possible amount .size = MAX_SIZE_KiB*1024, /* this must be set to a maximum
of flash so the cfi probe routines find all possible amount of flash so
the chips */ the cfi probe routines find
buswidth: 1, all the chips */
read8: sbc_gxx_read8, .buswidth = 1,
read16: sbc_gxx_read16, .read8 = sbc_gxx_read8,
read32: sbc_gxx_read32, .read16 = sbc_gxx_read16,
copy_from: sbc_gxx_copy_from, .read32 = sbc_gxx_read32,
write8: sbc_gxx_write8, .copy_from = sbc_gxx_copy_from,
write16: sbc_gxx_write16, .write8 = sbc_gxx_write8,
write32: sbc_gxx_write32, .write16 = sbc_gxx_write16,
copy_to: sbc_gxx_copy_to .write32 = sbc_gxx_write32,
.copy_to = sbc_gxx_copy_to
}; };
/* MTD device for all of the flash. */ /* MTD device for all of the flash. */
......
...@@ -125,46 +125,46 @@ static void sc520cdp_copy_to(struct map_info *map, unsigned long to, const void ...@@ -125,46 +125,46 @@ static void sc520cdp_copy_to(struct map_info *map, unsigned long to, const void
static struct map_info sc520cdp_map[] = { static struct map_info sc520cdp_map[] = {
{ {
name: "SC520CDP Flash Bank #0", .name = "SC520CDP Flash Bank #0",
size: WINDOW_SIZE_0, .size = WINDOW_SIZE_0,
buswidth: 4, .buswidth = 4,
read8: sc520cdp_read8, .read8 = sc520cdp_read8,
read16: sc520cdp_read16, .read16 = sc520cdp_read16,
read32: sc520cdp_read32, .read32 = sc520cdp_read32,
copy_from: sc520cdp_copy_from, .copy_from = sc520cdp_copy_from,
write8: sc520cdp_write8, .write8 = sc520cdp_write8,
write16: sc520cdp_write16, .write16 = sc520cdp_write16,
write32: sc520cdp_write32, .write32 = sc520cdp_write32,
copy_to: sc520cdp_copy_to, .copy_to = sc520cdp_copy_to,
map_priv_2: WINDOW_ADDR_0 .map_priv_2 = WINDOW_ADDR_0
}, },
{ {
name: "SC520CDP Flash Bank #1", .name = "SC520CDP Flash Bank #1",
size: WINDOW_SIZE_1, .size = WINDOW_SIZE_1,
buswidth: 4, .buswidth = 4,
read8: sc520cdp_read8, .read8 = sc520cdp_read8,
read16: sc520cdp_read16, .read16 = sc520cdp_read16,
read32: sc520cdp_read32, .read32 = sc520cdp_read32,
copy_from: sc520cdp_copy_from, .copy_from = sc520cdp_copy_from,
write8: sc520cdp_write8, .write8 = sc520cdp_write8,
write16: sc520cdp_write16, .write16 = sc520cdp_write16,
write32: sc520cdp_write32, .write32 = sc520cdp_write32,
copy_to: sc520cdp_copy_to, .copy_to = sc520cdp_copy_to,
map_priv_2: WINDOW_ADDR_1 .map_priv_2 = WINDOW_ADDR_1
}, },
{ {
name: "SC520CDP DIL Flash", .name = "SC520CDP DIL Flash",
size: WINDOW_SIZE_2, .size = WINDOW_SIZE_2,
buswidth: 1, .buswidth = 1,
read8: sc520cdp_read8, .read8 = sc520cdp_read8,
read16: sc520cdp_read16, .read16 = sc520cdp_read16,
read32: sc520cdp_read32, .read32 = sc520cdp_read32,
copy_from: sc520cdp_copy_from, .copy_from = sc520cdp_copy_from,
write8: sc520cdp_write8, .write8 = sc520cdp_write8,
write16: sc520cdp_write16, .write16 = sc520cdp_write16,
write32: sc520cdp_write32, .write32 = sc520cdp_write32,
copy_to: sc520cdp_copy_to, .copy_to = sc520cdp_copy_to,
map_priv_2: WINDOW_ADDR_2 .map_priv_2 = WINDOW_ADDR_2
}, },
}; };
......
...@@ -42,19 +42,19 @@ static struct mtd_info *eprom_mtd; ...@@ -42,19 +42,19 @@ static struct mtd_info *eprom_mtd;
static struct mtd_partition *parsed_parts; static struct mtd_partition *parsed_parts;
struct map_info soleng_eprom_map = { struct map_info soleng_eprom_map = {
name: "Solution Engine EPROM", .name = "Solution Engine EPROM",
size: 0x400000, .size = 0x400000,
buswidth: 4, .buswidth = 4,
copy_from: soleng_copy_from, .copy_from = soleng_copy_from,
}; };
struct map_info soleng_flash_map = { struct map_info soleng_flash_map = {
name: "Solution Engine FLASH", .name = "Solution Engine FLASH",
size: 0x400000, .size = 0x400000,
buswidth: 4, .buswidth = 4,
read32: soleng_read32, .read32 = soleng_read32,
copy_from: soleng_copy_from, .copy_from = soleng_copy_from,
write32: soleng_write32, .write32 = soleng_write32,
}; };
static int __init init_soleng_maps(void) static int __init init_soleng_maps(void)
......
...@@ -91,17 +91,17 @@ void uflash_copy_to(struct map_info *map, unsigned long to, const void *from, ...@@ -91,17 +91,17 @@ void uflash_copy_to(struct map_info *map, unsigned long to, const void *from,
} }
struct map_info uflash_map_templ = { struct map_info uflash_map_templ = {
name: "SUNW,???-????", .name = "SUNW,???-????",
size: UFLASH_WINDOW_SIZE, .size = UFLASH_WINDOW_SIZE,
buswidth: UFLASH_BUSWIDTH, .buswidth = UFLASH_BUSWIDTH,
read8: uflash_read8, .read8 = uflash_read8,
read16: uflash_read16, .read16 = uflash_read16,
read32: uflash_read32, .read32 = uflash_read32,
copy_from: uflash_copy_from, .copy_from = uflash_copy_from,
write8: uflash_write8, .write8 = uflash_write8,
write16: uflash_write16, .write16 = uflash_write16,
write32: uflash_write32, .write32 = uflash_write32,
copy_to: uflash_copy_to .copy_to = uflash_copy_to
}; };
int uflash_devinit(struct linux_ebus_device* edev) int uflash_devinit(struct linux_ebus_device* edev)
......
...@@ -92,17 +92,16 @@ void tqm8xxl_copy_to(struct map_info *map, unsigned long to, const void *from, s ...@@ -92,17 +92,16 @@ void tqm8xxl_copy_to(struct map_info *map, unsigned long to, const void *from, s
} }
struct map_info tqm8xxl_map = { struct map_info tqm8xxl_map = {
name: "TQM8xxL", .name = "TQM8xxL",
//size: WINDOW_SIZE, .buswidth = 4,
buswidth: 4, .read8 = tqm8xxl_read8,
read8: tqm8xxl_read8, .read16 = tqm8xxl_read16,
read16: tqm8xxl_read16, .read32 = tqm8xxl_read32,
read32: tqm8xxl_read32, .copy_from = tqm8xxl_copy_from,
copy_from: tqm8xxl_copy_from, .write8 = tqm8xxl_write8,
write8: tqm8xxl_write8, .write16 = tqm8xxl_write16,
write16: tqm8xxl_write16, .write32 = tqm8xxl_write32,
write32: tqm8xxl_write32, .copy_to = tqm8xxl_copy_to
copy_to: tqm8xxl_copy_to
}; };
/* /*
...@@ -125,40 +124,39 @@ static unsigned long tqm8xxl_max_flash_size = 0x00800000; ...@@ -125,40 +124,39 @@ static unsigned long tqm8xxl_max_flash_size = 0x00800000;
*/ */
static struct mtd_partition tqm8xxl_partitions[] = { static struct mtd_partition tqm8xxl_partitions[] = {
{ {
name: "ppcboot", .name = "ppcboot",
offset: 0x00000000, .offset = 0x00000000,
size: 0x00020000, /* 128KB */ .size = 0x00020000, /* 128KB */
mask_flags: MTD_WRITEABLE, /* force read-only */ .mask_flags = MTD_WRITEABLE, /* force read-only */
}, },
{ {
name: "kernel", /* default kernel image */ .name = "kernel", /* default kernel image */
offset: 0x00020000, .offset = 0x00020000,
size: 0x000e0000, .size = 0x000e0000,
mask_flags: MTD_WRITEABLE, /* force read-only */ .mask_flags = MTD_WRITEABLE, /* force read-only */
}, },
{ {
name: "user", .name = "user",
offset: 0x00100000, .offset = 0x00100000,
size: 0x00100000, .size = 0x00100000,
}, },
{ {
name: "initrd", .name = "initrd",
offset: 0x00200000, .offset = 0x00200000,
size: 0x00200000, .size = 0x00200000,
} }
}; };
/* partition definition for second flahs bank */ /* partition definition for second flahs bank */
static struct mtd_partition tqm8xxl_fs_partitions[] = { static struct mtd_partition tqm8xxl_fs_partitions[] = {
{ {
name: "cramfs", .name = "cramfs",
offset: 0x00000000, .offset = 0x00000000,
size: 0x00200000, .size = 0x00200000,
}, },
{ {
name: "jffs", .name = "jffs",
offset: 0x00200000, .offset = 0x00200000,
size: 0x00200000, .size = 0x00200000,
//size: MTDPART_SIZ_FULL,
} }
}; };
#endif #endif
......
...@@ -66,15 +66,15 @@ void uclinux_copy_to(struct map_info *map, unsigned long to, const void *from, s ...@@ -66,15 +66,15 @@ void uclinux_copy_to(struct map_info *map, unsigned long to, const void *from, s
/****************************************************************************/ /****************************************************************************/
struct map_info uclinux_ram_map = { struct map_info uclinux_ram_map = {
name: "RAM", .name = "RAM",
read8: uclinux_read8, .read8 = uclinux_read8,
read16: uclinux_read16, .read16 = uclinux_read16,
read32: uclinux_read32, .read32 = uclinux_read32,
copy_from: uclinux_copy_from, .copy_from = uclinux_copy_from,
write8: uclinux_write8, .write8 = uclinux_write8,
write16: uclinux_write16, .write16 = uclinux_write16,
write32: uclinux_write32, .write32 = uclinux_write32,
copy_to: uclinux_copy_to, .copy_to = uclinux_copy_to,
}; };
struct mtd_info *uclinux_ram_mtdinfo; struct mtd_info *uclinux_ram_mtdinfo;
...@@ -82,7 +82,7 @@ struct mtd_info *uclinux_ram_mtdinfo; ...@@ -82,7 +82,7 @@ struct mtd_info *uclinux_ram_mtdinfo;
/****************************************************************************/ /****************************************************************************/
struct mtd_partition uclinux_romfs[] = { struct mtd_partition uclinux_romfs[] = {
{ name: "ROMfs", offset: 0 } { .name = "ROMfs", .offset = 0 }
}; };
#define NUM_PARTITIONS (sizeof(uclinux_romfs) / sizeof(uclinux_romfs[0])) #define NUM_PARTITIONS (sizeof(uclinux_romfs) / sizeof(uclinux_romfs[0]))
......
...@@ -142,34 +142,33 @@ static void vmax301_copy_to(struct map_info *map, unsigned long to, const void * ...@@ -142,34 +142,33 @@ static void vmax301_copy_to(struct map_info *map, unsigned long to, const void *
static struct map_info vmax_map[2] = { static struct map_info vmax_map[2] = {
{ {
name: "VMAX301 Internal Flash", .name = "VMAX301 Internal Flash",
size: 3*2*1024*1024, .size = 3*2*1024*1024,
buswidth: 1, .buswidth = 1,
read8: vmax301_read8, .read8 = vmax301_read8,
read16: vmax301_read16, .read16 = vmax301_read16,
read32: vmax301_read32, .read32 = vmax301_read32,
copy_from: vmax301_copy_from, .copy_from = vmax301_copy_from,
write8: vmax301_write8, .write8 = vmax301_write8,
write16: vmax301_write16, .write16 = vmax301_write16,
write32: vmax301_write32, .write32 = vmax301_write32,
copy_to: vmax301_copy_to, .copy_to = vmax301_copy_to,
map_priv_1: WINDOW_START + WINDOW_LENGTH, .map_priv_1 = WINDOW_START + WINDOW_LENGTH,
map_priv_2: 0xFFFFFFFF .map_priv_2 = 0xFFFFFFFF
}, },
{ {
name: "VMAX301 Socket", .name = "VMAX301 Socket",
size: 0, .buswidth = 1,
buswidth: 1, .read8 = vmax301_read8,
read8: vmax301_read8, .read16 = vmax301_read16,
read16: vmax301_read16, .read32 = vmax301_read32,
read32: vmax301_read32, .copy_from = vmax301_copy_from,
copy_from: vmax301_copy_from, .write8 = vmax301_write8,
write8: vmax301_write8, .write16 = vmax301_write16,
write16: vmax301_write16, .write32 = vmax301_write32,
write32: vmax301_write32, .copy_to = vmax301_copy_to,
copy_to: vmax301_copy_to, .map_priv_1 = WINDOW_START + (3*WINDOW_LENGTH),
map_priv_1: WINDOW_START + (3*WINDOW_LENGTH), .map_priv_2 = 0xFFFFFFFF
map_priv_2: 0xFFFFFFFF
} }
}; };
......
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