linux-mips
[Top] [All Lists]

Re: Misc. AMD DBAu1550 fixes

To: Linux MIPS Development <linux-mips@linux-mips.org>
Subject: Re: Misc. AMD DBAu1550 fixes
From: Sergei Shtylylov <sshtylyov@ru.mvista.com>
Date: Sun, 23 Oct 2005 00:23:14 +0400
Cc: Manish Lachwani <mlachwani@mvista.com>
In-reply-to: <4357F774.9010208@ru.mvista.com>
Organization: RTSoft, Inc.
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <4357F774.9010208@ru.mvista.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.2) Gecko/20040803
Hello, I wrote:

    Here's a couple of DBAu1550 fixes: the first one 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), the

   Here's an updated BCSR patch. Stupid typo. :-/

second one just selects the proper machine type for DBAu1550.

It was somewhat incomplete, more #ifdef's are needed to set the proper machine types for DB1100/DB1500...

------------------------------------------------------------------------

Index: linux/arch/mips/au1000/db1x00/board_setup.c
===================================================================
--- linux.orig/arch/mips/au1000/db1x00/board_setup.c
+++ linux/arch/mips/au1000/db1x00/board_setup.c
@@ -45,13 +45,12 @@
 #include <asm/mach-au1x00/au1000.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)
 {
        /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
-       au_writel(0x00000000, 0xAE00001C);
+       bcsr->swreset = 0x0000);

  My bad. Really don't know how this paren got there. :-/

WBR, Sergei
Index: linux/arch/mips/au1000/db1x00/board_setup.c
===================================================================
--- linux.orig/arch/mips/au1000/db1x00/board_setup.c
+++ linux/arch/mips/au1000/db1x00/board_setup.c
@@ -45,13 +45,12 @@
 #include <asm/mach-au1x00/au1000.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)
 {
        /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
-       au_writel(0x00000000, 0xAE00001C);
+       bcsr->swreset = 0x0000;
 }
 
 void __init board_setup(void)
@@ -75,7 +75,7 @@ void __init board_setup(void)
        bcsr->resets |= BCSR_RESETS_IRDA_MODE_OFF;
        au_sync();
 #endif
-       au_writel(0, 0xAE000010); /* turn off pcmcia power */
+       bcsr->pcmcia = 0x0000; /* turn off PCMCIA power */
 
 #ifdef CONFIG_MIPS_MIRAGE
        /* enable GPIO[31:0] inputs */
<Prev in Thread] Current Thread [Next in Thread>