mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-03 04:26:55 +00:00
fix flash buswidth detection
SVN-Revision: 6727
This commit is contained in:
parent
c05a061e4e
commit
1bde611b1a
@ -255,13 +255,13 @@ int __init ar5312_init_devices(void)
|
|||||||
ar5312_eth0_data.board_config = board_config;
|
ar5312_eth0_data.board_config = board_config;
|
||||||
ar5312_eth1_data.board_config = board_config;
|
ar5312_eth1_data.board_config = board_config;
|
||||||
|
|
||||||
/* fixup flash width; TODO: constants -> defines */
|
/* fixup flash width */
|
||||||
fctl = sysRegRead(AR531X_FLASHCTL) & 0x30000000;
|
fctl = sysRegRead(AR531X_FLASHCTL) & FLASHCTL_MW;
|
||||||
switch (fctl) {
|
switch (fctl) {
|
||||||
case 0x20000000:
|
case FLASHCTL_MWx16:
|
||||||
ar5312_flash_data.width = 2;
|
ar5312_flash_data.width = 2;
|
||||||
break;
|
break;
|
||||||
case 0x00000000:
|
case FLASHCTL_MWx8:
|
||||||
default:
|
default:
|
||||||
ar5312_flash_data.width = 1;
|
ar5312_flash_data.width = 1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user