struct ar531x_boarddata *bcfg;
char *radio, *c;
int dev = 0;
+ uint32_t fctl = 0;
if (!is_5312)
return 0;
ar5312_eth0_data.board_config = board_config;
ar5312_eth1_data.board_config = board_config;
+
+ /* fixup flash width */
+ fctl = sysRegRead(AR531X_FLASHCTL) & FLASHCTL_MW;
+ switch (fctl) {
+ case FLASHCTL_MWx16:
+ ar5312_flash_data.width = 2;
+ break;
+ case FLASHCTL_MWx8:
+ default:
+ ar5312_flash_data.width = 1;
+ break;
+ }
+
ar5312_devs[dev++] = &ar5312_physmap_flash;
if (!memcmp(bcfg->enet0Mac, "\xff\xff\xff\xff\xff\xff", 6))