Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] Simple patch to power off DBAU1200
@ 2005-11-30  9:20 Matej Kupljen
  2005-12-08 19:55 ` Sergei Shtylylov
  0 siblings, 1 reply; 4+ messages in thread
From: Matej Kupljen @ 2005-11-30  9:20 UTC (permalink / raw)
  To: linux-mips; +Cc: Jordan Crouse

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

Hi

Please, find the attached patch which enables
powering off the DBAU1200 board.

BR,
Matej

[-- Attachment #2: linux-2.6.14-dbau1200-poweroff.patch --]
[-- Type: text/x-patch, Size: 473 bytes --]

Patch to enable powering off DBAU1200

Signed-off-by: Matej Kupljen <matej.kupljen@ultra.si>

--- a/arch/mips/au1000/common/reset.c	2005-10-24 13:36:24.000000000 +0200
+++ b/arch/mips/au1000/common/reset.c	2005-08-24 14:39:58.000000000 +0200
@@ -175,6 +175,9 @@
 #ifdef CONFIG_MIPS_MIRAGE
 	au_writel((1 << 26) | (1 << 10), GPIO2_OUTPUT);
 #endif
+#ifdef CONFIG_MIPS_DB1200
+	au_writew(au_readw(0xB980001C) | (1<<14), 0xB980001C);
+#endif
 #ifdef CONFIG_PM
 	au_sleep();
 

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

* [PATCH] Simple patch to power off DBAU1200
  2005-11-30  9:20 [PATCH] Simple patch to power off DBAU1200 Matej Kupljen
@ 2005-12-08 19:55 ` Sergei Shtylylov
  2005-12-08 20:30   ` [PATCH] Enable DBAu1550 soft-off Sergei Shtylylov
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Shtylylov @ 2005-12-08 19:55 UTC (permalink / raw)
  To: linux-mips; +Cc: Jordan Crouse

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

Hello.

Matej Kupljen wrote:
> Hi
> 
> Please, find the attached patch which enables
> powering off the DBAU1200 board.

     As a follow up to this one, here's the patch which does the same thing for
DBAu1550 by just reusing Pb1550 code. I added #else because #if renders the
rest of the au1000_halt() code unreachable on DBAu1550/PB1550 anyway.

> BR,
> Matej

WBR, Sergei

> ------------------------------------------------------------------------
> 
> Patch to enable powering off DBAU1200
> 
> Signed-off-by: Matej Kupljen <matej.kupljen@ultra.si>
> 
> --- a/arch/mips/au1000/common/reset.c	2005-10-24 13:36:24.000000000 +0200
> +++ b/arch/mips/au1000/common/reset.c	2005-08-24 14:39:58.000000000 +0200
> @@ -175,6 +175,9 @@
>  #ifdef CONFIG_MIPS_MIRAGE
>  	au_writel((1 << 26) | (1 << 10), GPIO2_OUTPUT);
>  #endif
> +#ifdef CONFIG_MIPS_DB1200
> +	au_writew(au_readw(0xB980001C) | (1<<14), 0xB980001C);
> +#endif
>  #ifdef CONFIG_PM
>  	au_sleep();
>  




[-- Attachment #2: DBAu1550-soft-off.patch --]
[-- Type: text/plain, Size: 943 bytes --]

diff --git a/arch/mips/au1000/common/reset.c b/arch/mips/au1000/common/reset.c
index 65b84db..8a4afdc 100644
--- a/arch/mips/au1000/common/reset.c
+++ b/arch/mips/au1000/common/reset.c
@@ -164,13 +164,13 @@ void au1000_restart(char *command)
 
 void au1000_halt(void)
 {
-#if defined(CONFIG_MIPS_PB1550)
+#if defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550)
 	/* power off system */
-	printk("\n** Powering off Pb1550\n");
+	printk("\n** Powering off...\n");
 	au_writew(au_readw(0xAF00001C) | (3<<14), 0xAF00001C);
 	au_sync();
 	while(1); /* should not get here */
-#endif
+#else
 	printk(KERN_NOTICE "\n** You can safely turn off the power\n");
 #ifdef CONFIG_MIPS_MIRAGE
 	au_writel((1 << 26) | (1 << 10), GPIO2_OUTPUT);
@@ -187,6 +187,7 @@ void au1000_halt(void)
 	                "wait\n\t"
 			".set\tmips0");
 #endif
+#endif /* defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550) */
 }
 
 void au1000_power_off(void)


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

* [PATCH] Enable DBAu1550 soft-off
  2005-12-08 19:55 ` Sergei Shtylylov
@ 2005-12-08 20:30   ` Sergei Shtylylov
  2005-12-08 20:40     ` Sergei Shtylylov
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Shtylylov @ 2005-12-08 20:30 UTC (permalink / raw)
  To: linux-mips; +Cc: Jordan Crouse

Hello, I wrote.

> Matej Kupljen wrote:
> 
>> Hi
>>
>> Please, find the attached patch which enables
>> powering off the DBAU1200 board.
> 
> 
>     As a follow up to this one, here's the patch which does the same 
> thing for
> DBAu1550 by just reusing Pb1550 code. I added #else because #if renders the
> rest of the au1000_halt() code unreachable on DBAu1550/PB1550 anyway.

    Failed to chenge the subject to a proper one. :-/

WBR, Sergei

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

* Re: [PATCH] Enable DBAu1550 soft-off
  2005-12-08 20:30   ` [PATCH] Enable DBAu1550 soft-off Sergei Shtylylov
@ 2005-12-08 20:40     ` Sergei Shtylylov
  0 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylylov @ 2005-12-08 20:40 UTC (permalink / raw)
  To: linux-mips; +Cc: Jordan Crouse

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

Hello, I wrote.

>> Matej Kupljen wrote:
>>
>>> Hi
>>>
>>> Please, find the attached patch which enables
>>> powering off the DBAU1200 board.
>>
>>
>>
>>     As a follow up to this one, here's the patch which does the same 
>> thing for
>> DBAu1550 by just reusing Pb1550 code. I added #else because #if 
>> renders the
>> rest of the au1000_halt() code unreachable on DBAu1550/PB1550 anyway.

> 
>    Failed to chenge the subject to a proper one. :-/

     And forgot about sign-off line. :-(

> WBR, Sergei

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

[-- Attachment #2: DBAu1550-soft-off.patch --]
[-- Type: text/plain, Size: 943 bytes --]

diff --git a/arch/mips/au1000/common/reset.c b/arch/mips/au1000/common/reset.c
index 65b84db..8a4afdc 100644
--- a/arch/mips/au1000/common/reset.c
+++ b/arch/mips/au1000/common/reset.c
@@ -164,13 +164,13 @@ void au1000_restart(char *command)
 
 void au1000_halt(void)
 {
-#if defined(CONFIG_MIPS_PB1550)
+#if defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550)
 	/* power off system */
-	printk("\n** Powering off Pb1550\n");
+	printk("\n** Powering off...\n");
 	au_writew(au_readw(0xAF00001C) | (3<<14), 0xAF00001C);
 	au_sync();
 	while(1); /* should not get here */
-#endif
+#else
 	printk(KERN_NOTICE "\n** You can safely turn off the power\n");
 #ifdef CONFIG_MIPS_MIRAGE
 	au_writel((1 << 26) | (1 << 10), GPIO2_OUTPUT);
@@ -187,6 +187,7 @@ void au1000_halt(void)
 	                "wait\n\t"
 			".set\tmips0");
 #endif
+#endif /* defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550) */
 }
 
 void au1000_power_off(void)


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

end of thread, other threads:[~2005-12-08 20:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-30  9:20 [PATCH] Simple patch to power off DBAU1200 Matej Kupljen
2005-12-08 19:55 ` Sergei Shtylylov
2005-12-08 20:30   ` [PATCH] Enable DBAu1550 soft-off Sergei Shtylylov
2005-12-08 20:40     ` Sergei Shtylylov

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