소스 검색

[MIPS] Alchemy: Fix BCSR accesses.

Fixes BCSR accesses in the board setup/reset code. The registers are
actually 16-bit, and their addresses are different between DBAu1550 and
other DBAu1xx0 boards.

From Sergei Shtylylov <sshtylyov@ru.mvista.com>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle 19 년 전
부모
커밋
dea91002d4
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      arch/mips/au1000/db1x00/board_setup.c

+ 3 - 4
arch/mips/au1000/db1x00/board_setup.c

@@ -45,13 +45,12 @@
 #include <asm/mach-au1x00/au1000.h>
 #include <asm/mach-au1x00/au1000.h>
 #include <asm/mach-db1x00/db1x00.h>
 #include <asm/mach-db1x00/db1x00.h>
 
 
-/* not correct for db1550 */
-static BCSR * const bcsr = (BCSR *)0xAE000000;
+static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
 
 
 void board_reset (void)
 void board_reset (void)
 {
 {
 	/* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
 	/* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
-	au_writel(0x00000000, 0xAE00001C);
+	bcsr->swreset = 0x0000;
 }
 }
 
 
 void __init board_setup(void)
 void __init board_setup(void)
@@ -75,7 +74,7 @@ void __init board_setup(void)
 	bcsr->resets |= BCSR_RESETS_IRDA_MODE_OFF;
 	bcsr->resets |= BCSR_RESETS_IRDA_MODE_OFF;
 	au_sync();
 	au_sync();
 #endif
 #endif
-	au_writel(0, 0xAE000010); /* turn off pcmcia power */
+	bcsr->pcmcia = 0x0000; /* turn off PCMCIA power */
 
 
 #ifdef CONFIG_MIPS_MIRAGE
 #ifdef CONFIG_MIPS_MIRAGE
 	/* enable GPIO[31:0] inputs */
 	/* enable GPIO[31:0] inputs */