Skip to contentSkip to conversation

Misc. AMD DBAu1550 fixes

PATCH New Sergei Shtylylov 1 participant 3 messages Oct 20, 2005 – Oct 31, 2005 MIPS

lore
Share & tools
lore
#0 lore raw

Hello.

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 second one just selects the proper machine type for DBAu1550.

WBR, Sergei

arch/mips/au1000/db1x00/board_setup.c +3 -4
Index: 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 */
arch/mips/au1000/db1x00/init.c +5 -1
Index: linux/arch/mips/au1000/db1x00/init.c
===================================================================
@@ -61,7 +61,11 @@ void __init prom_init(void)
 	prom_envp = (char **) fw_arg2;
 
 	mips_machgroup = MACH_GROUP_ALCHEMY;
-	mips_machtype = MACH_DB1000;	/* set the platform # */
+#ifdef CONFIG_MIPS_DB1550
+	mips_machtype = MACH_DB1550;
+#else
+ 	mips_machtype = MACH_DB1000;	/* set the platform # */
+#endif
 
 	prom_init_cmdline();
 
#1 lore raw
Quoted 3 lines · 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. :-/

Quoted 1 line

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...

Quoted 9 lines

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

Index: linux/arch/mips/au1000/db1x00/board_setup.c
===================================================================

arch/mips/au1000/db1x00/board_setup.c +0 -0
@@ -45,13 +45,12 @@
 #include <asm/mach-au1x00/au1000.h>
 #include <asm/mach-db1x00/db1x00.h>

arch/mips/au1000/db1x00/board_setup.c line 53

Quoted 10 lines
arch/mips/au1000/db1x00/board_setup.c +2 -3
 
-/* 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

arch/mips/au1000/db1x00/board_setup.c +3 -4
Index: 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 */
#2 lore raw

PATCH 1/1 Set proper machine type for DB1xx0 boards

Quoted 11 lines · Hello, I wrote:
Quoted 4 lines

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. :-/

Quoted 1 line

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...

So, here's an update...

WBR, Sergei

Index: arch/mips/au1000/db1x00/init.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/au1000/db1x00/init.c,v retrieving revision 1.6

mips/au1000/db1x00/init.c +11 -1
diff -a -u -p -r1.6 init.c
@@ -61,7 +61,17 @@ void __init prom_init(void)
 	prom_envp = (char **) fw_arg2;
 
 	mips_machgroup = MACH_GROUP_ALCHEMY;
-	mips_machtype = MACH_DB1000;	/* set the platform # */
+
+	/* Set the platform # */
+#if	defined (CONFIG_MIPS_DB1550)
+	mips_machtype = MACH_DB1550;
+#elif	defined (CONFIG_MIPS_DB1500)
+	mips_machtype = MACH_DB1500;
+#elif	defined (CONFIG_MIPS_DB1100)
+	mips_machtype = MACH_DB1100;
+#else
+	mips_machtype = MACH_DB1000;
+#endif
 
 	prom_init_cmdline();