static unsigned char rb15x_vlans[6] __initdata = {
/* FIXME: untested */
0x41, 0x42, 0x44, 0x48, 0x50, 0x00
+};
static unsigned char rb192_vlans[6] __initdata = {
/* FIXME: untested */
adm5120_nand_data.ctrl.cmd_ctrl = rb150_nand_cmd_ctrl;
adm5120_nand_data.ctrl.dev_ready = rb150_nand_ready;
+ adm5120_flash0_data.window_size = 512*1024;
+
rb1xx_flash_setup();
rb1xx_mac_setup();
}
struct map_info *map = &info->amap.map;
struct adm5120_flash_platform_data *pdata = dev->dev.platform_data;
struct flash_desc *fdesc;
- u32 t;
+ u32 t = 0;
map->name = dev->dev.bus_id;
fdesc = &flash_descs[dev->id];
- /* get memory window size */
- t = SW_READ_REG(MEMCTRL) >> fdesc->srs_shift;
- t &= MEMCTRL_SRS_MASK;
- info->amap.window_size = flash_sizes[t];
+ if (pdata)
+ info->amap.window_size = pdata->window_size;
+
+ if (info->amap.window_size == 0) {
+ /* get memory window size */
+ t = SW_READ_REG(MEMCTRL) >> fdesc->srs_shift;
+ t &= MEMCTRL_SRS_MASK;
+ info->amap.window_size = flash_sizes[t];
+ }
+
if (info->amap.window_size == 0) {
- MAP_ERR(map, "invalid flash size detected\n");
+ MAP_ERR(map, "unable to determine window size\n");
goto err_out;
}
struct adm5120_flash_platform_data {
void (*set_vpp)(struct map_info *, int);
void (*switch_bank)(unsigned);
+ u32 window_size;
#ifdef CONFIG_MTD_PARTITIONS
unsigned int nr_parts;
struct mtd_partition *parts;