Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Misc. AMD DBAu1550 fixes
@ 2005-10-20 20:00 Sergei Shtylylov
  2005-10-22 20:23 ` Sergei Shtylylov
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylylov @ 2005-10-20 20:00 UTC (permalink / raw)
  To: Linux MIPS Development; +Cc: Manish Lachwani

[-- Attachment #1: Type: text/plain, Size: 309 bytes --]

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




[-- Attachment #2: db1550-bcsr-fix.patch --]
[-- Type: text/plain, Size: 906 bytes --]

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 */





[-- Attachment #3: db1550-platform.patch --]
[-- Type: text/plain, Size: 537 bytes --]

Index: linux/arch/mips/au1000/db1x00/init.c
===================================================================
--- linux.orig/arch/mips/au1000/db1x00/init.c
+++ 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();
 





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Misc. AMD DBAu1550 fixes
  2005-10-20 20:00 Misc. AMD DBAu1550 fixes Sergei Shtylylov
@ 2005-10-22 20:23 ` Sergei Shtylylov
  2005-10-31 21:06   ` [PATCH] Set proper machine type for DB1xx0 boards Sergei Shtylylov
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylylov @ 2005-10-22 20:23 UTC (permalink / raw)
  To: Linux MIPS Development; +Cc: Manish Lachwani

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

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

[-- Attachment #2: db1550-bcsr-fix.patch --]
[-- Type: text/plain, Size: 901 bytes --]

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 */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] Set proper machine type for DB1xx0 boards
  2005-10-22 20:23 ` Sergei Shtylylov
@ 2005-10-31 21:06   ` Sergei Shtylylov
  0 siblings, 0 replies; 3+ messages in thread
From: Sergei Shtylylov @ 2005-10-31 21:06 UTC (permalink / raw)
  To: Linux MIPS Development; +Cc: Manish Lachwani, Pete Popov

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]

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

      So, here's an update...

WBR, Sergei


[-- Attachment #2: DBAu1xx0-platform.patch --]
[-- Type: text/plain, Size: 824 bytes --]

Index: arch/mips/au1000/db1x00/init.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/au1000/db1x00/init.c,v
retrieving revision 1.6
diff -a -u -p -r1.6 init.c
--- arch/mips/au1000/db1x00/init.c	11 Jul 2005 10:03:24 -0000	1.6
+++ arch/mips/au1000/db1x00/init.c	31 Oct 2005 21:01:26 -0000
@@ -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();
 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-10-31 21:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-20 20:00 Misc. AMD DBAu1550 fixes Sergei Shtylylov
2005-10-22 20:23 ` Sergei Shtylylov
2005-10-31 21:06   ` [PATCH] Set proper machine type for DB1xx0 boards Sergei Shtylylov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox