summaryrefslogtreecommitdiffstats
path: root/target/linux/atheros-2.6/files
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-03-27 23:15:10 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-03-27 23:15:10 +0000
commit51dad7245443d4a057687669bc34bcf934c2f483 (patch)
treea2d555321c9b0c0a1685de1efcacb4f809739984 /target/linux/atheros-2.6/files
parent19c7123cffe65340ada21bd5abd73b3163cd2883 (diff)
fix flash buswidth detection
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6727 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/atheros-2.6/files')
-rw-r--r--target/linux/atheros-2.6/files/arch/mips/atheros/ar5312.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/atheros-2.6/files/arch/mips/atheros/ar5312.c b/target/linux/atheros-2.6/files/arch/mips/atheros/ar5312.c
index 384020b27..57d56eb0e 100644
--- a/target/linux/atheros-2.6/files/arch/mips/atheros/ar5312.c
+++ b/target/linux/atheros-2.6/files/arch/mips/atheros/ar5312.c
@@ -255,13 +255,13 @@ int __init ar5312_init_devices(void)
ar5312_eth0_data.board_config = board_config;
ar5312_eth1_data.board_config = board_config;
- /* fixup flash width; TODO: constants -> defines */
- fctl = sysRegRead(AR531X_FLASHCTL) & 0x30000000;
+ /* fixup flash width */
+ fctl = sysRegRead(AR531X_FLASHCTL) & FLASHCTL_MW;
switch (fctl) {
- case 0x20000000:
+ case FLASHCTL_MWx16:
ar5312_flash_data.width = 2;
break;
- case 0x00000000:
+ case FLASHCTL_MWx8:
default:
ar5312_flash_data.width = 1;
break;