public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
       [not found] <20070315103959.GA22215@moe.telargo.com>
@ 2007-03-15 10:44 ` Domen Puncer
  2007-03-26 16:08   ` Grant Likely
  2007-03-31 17:20   ` [U-Boot-Users] [PATCH] icecube/lite5200b: " Rafal Jaworowski
  0 siblings, 2 replies; 16+ messages in thread
From: Domen Puncer @ 2007-03-15 10:44 UTC (permalink / raw)
  To: u-boot

U-Boot part of Lite5200b low power mode support.
Puts SDRAM out of self-refresh and transfers control to
address saved at physical 0x0.


---
 board/icecube/icecube.c |   50 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

Index: u-boot.git/board/icecube/icecube.c
===================================================================
--- u-boot.git.orig/board/icecube/icecube.c
+++ u-boot.git/board/icecube/icecube.c
@@ -42,6 +42,54 @@
 #include "mt48lc16m16a2-75.h"
 # endif
 #endif
+
+#ifdef CONFIG_LITE5200B
+/* u-boot part of low-power mode implementation */
+#define SAVED_ADDR (*(void **)0x00000000)
+#define PSC2_4 0x02
+
+void lite5200b_wakeup(void)
+{
+	unsigned char wakeup_pin;
+	void (*linux_wakeup)(void);
+
+	/* check PSC2_4, if it's down "QT" is signaling we have a wakeup
+	 * from low power mode */
+	*(vu_char *)MPC5XXX_WU_GPIO_ENABLE = PSC2_4;
+	__asm__ volatile ("sync");
+
+	wakeup_pin = *(vu_char *)MPC5XXX_WU_GPIO_DATA_I;
+	if (wakeup_pin & PSC2_4)
+		return;
+
+	/* acknowledge to "QT"
+	 * by holding pin at 1 for 10 uS */
+	*(vu_char *)MPC5XXX_WU_GPIO_DIR = PSC2_4;
+	__asm__ volatile ("sync");
+	*(vu_char *)MPC5XXX_WU_GPIO_DATA_O = PSC2_4;
+	__asm__ volatile ("sync");
+	udelay(10);
+
+	/* put ram out of self-refresh */
+	*(vu_long *)MPC5XXX_SDRAM_CTRL |= 0x80000000;	// mode_en
+	__asm__ volatile ("sync");
+	*(vu_long *)MPC5XXX_SDRAM_CTRL |= 0x50000000;	// cke ref_en
+	__asm__ volatile ("sync");
+	*(vu_long *)MPC5XXX_SDRAM_CTRL &= ~0x80000000;	// !mode_en
+	__asm__ volatile ("sync");
+	udelay(10); /* wait a bit */
+
+	/* jump back to linux kernel code */
+	linux_wakeup = SAVED_ADDR;
+	printf("\n\nLooks like we just woke, transferring control to 0x%08lx\n",
+			linux_wakeup);
+	linux_wakeup();
+}
+#else
+#define lite5200b_wakeup()
+#endif
+
+
 #ifndef CFG_RAMBOOT
 static void sdram_start (int hi_addr)
 {
@@ -208,6 +256,8 @@ long int initdram (int board_type)
 		__asm__ volatile ("sync");
 	}
 
+	lite5200b_wakeup();
+
 	return dramsize + dramsize2;
 }
 

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-03-15 10:44 ` [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support Domen Puncer
@ 2007-03-26 16:08   ` Grant Likely
  2007-04-03  8:46     ` Domen Puncer
  2007-03-31 17:20   ` [U-Boot-Users] [PATCH] icecube/lite5200b: " Rafal Jaworowski
  1 sibling, 1 reply; 16+ messages in thread
From: Grant Likely @ 2007-03-26 16:08 UTC (permalink / raw)
  To: u-boot

On 3/15/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> U-Boot part of Lite5200b low power mode support.
> Puts SDRAM out of self-refresh and transfers control to
> address saved at physical 0x0.

This looks pretty straight forward.

My only comment is that psc2_4 is probably used as GPIO instead of
power control by some users (The lite5200 is an eval board after all).
 Maybe wrap the code with #ifdef CONFIG_LITE5200B_PM (instead of
CONFIG_LITE5200B) so that it can be easily compiled out.

Also, '//' style comments should be changed to '/* */'

Otherwise;
Acked-by: Grant Likely <grant.likely@secretlab.ca>

g.

>
> ---
>  board/icecube/icecube.c |   50 ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
>
> Index: u-boot.git/board/icecube/icecube.c
> ===================================================================
> --- u-boot.git.orig/board/icecube/icecube.c
> +++ u-boot.git/board/icecube/icecube.c
> @@ -42,6 +42,54 @@
>  #include "mt48lc16m16a2-75.h"
>  # endif
>  #endif
> +
> +#ifdef CONFIG_LITE5200B
> +/* u-boot part of low-power mode implementation */
> +#define SAVED_ADDR (*(void **)0x00000000)
> +#define PSC2_4 0x02
> +
> +void lite5200b_wakeup(void)
> +{
> +       unsigned char wakeup_pin;
> +       void (*linux_wakeup)(void);
> +
> +       /* check PSC2_4, if it's down "QT" is signaling we have a wakeup
> +        * from low power mode */
> +       *(vu_char *)MPC5XXX_WU_GPIO_ENABLE = PSC2_4;
> +       __asm__ volatile ("sync");
> +
> +       wakeup_pin = *(vu_char *)MPC5XXX_WU_GPIO_DATA_I;
> +       if (wakeup_pin & PSC2_4)
> +               return;
> +
> +       /* acknowledge to "QT"
> +        * by holding pin at 1 for 10 uS */
> +       *(vu_char *)MPC5XXX_WU_GPIO_DIR = PSC2_4;
> +       __asm__ volatile ("sync");
> +       *(vu_char *)MPC5XXX_WU_GPIO_DATA_O = PSC2_4;
> +       __asm__ volatile ("sync");
> +       udelay(10);
> +
> +       /* put ram out of self-refresh */
> +       *(vu_long *)MPC5XXX_SDRAM_CTRL |= 0x80000000;   // mode_en
> +       __asm__ volatile ("sync");
> +       *(vu_long *)MPC5XXX_SDRAM_CTRL |= 0x50000000;   // cke ref_en
> +       __asm__ volatile ("sync");
> +       *(vu_long *)MPC5XXX_SDRAM_CTRL &= ~0x80000000;  // !mode_en
> +       __asm__ volatile ("sync");
> +       udelay(10); /* wait a bit */
> +
> +       /* jump back to linux kernel code */
> +       linux_wakeup = SAVED_ADDR;
> +       printf("\n\nLooks like we just woke, transferring control to 0x%08lx\n",
> +                       linux_wakeup);
> +       linux_wakeup();
> +}
> +#else
> +#define lite5200b_wakeup()
> +#endif
> +
> +
>  #ifndef CFG_RAMBOOT
>  static void sdram_start (int hi_addr)
>  {
> @@ -208,6 +256,8 @@ long int initdram (int board_type)
>                 __asm__ volatile ("sync");
>         }
>
> +       lite5200b_wakeup();
> +
>         return dramsize + dramsize2;
>  }

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-03-15 10:44 ` [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support Domen Puncer
  2007-03-26 16:08   ` Grant Likely
@ 2007-03-31 17:20   ` Rafal Jaworowski
  2007-03-31 18:38     ` Domen Puncer
  1 sibling, 1 reply; 16+ messages in thread
From: Rafal Jaworowski @ 2007-03-31 17:20 UTC (permalink / raw)
  To: u-boot

Domen Puncer wrote:
> U-Boot part of Lite5200b low power mode support.
> Puts SDRAM out of self-refresh and transfers control to
> address saved at physical 0x0.
> 

Hi Domen,

As I understand while waking up from the low-power mode the machine is 
effectively powering on, similarly to the cold reset, so U-Boot runs 
from the beginning as usual, but after the SDRAM controller has been 
initialised we detect the wakeup and teleport to the saved DRAM address.

Since in case of a wakeup from the low-power mode we skip everything in 
U-Boot that is happening past initdram(), please clarify the following:

- are you sure there are no steps beyond init_func_ram()/board_init_f() 
that should be performed while waking up? For example:

- are all timers settings properly re-stored?

- wouldn't the host/PCI bridge need to be re-initialised and 
re-configured as part of the wakeup process? Did you happen to test some 
PCI devices and would they survive after wakeup from the the low-power 
mode? (A similar question would apply to the USB controller)

Also, a more general question: isn't time base update required after the 
wakeup, specially if it's been a long sleep?

kind regards,
Rafal

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-03-31 17:20   ` [U-Boot-Users] [PATCH] icecube/lite5200b: " Rafal Jaworowski
@ 2007-03-31 18:38     ` Domen Puncer
  0 siblings, 0 replies; 16+ messages in thread
From: Domen Puncer @ 2007-03-31 18:38 UTC (permalink / raw)
  To: u-boot

[ Gah, saw it didn't make it to u-boot ML, resending ]

On 31/03/07 19:20 +0200, Rafal Jaworowski wrote:
> Domen Puncer wrote:
> >U-Boot part of Lite5200b low power mode support.
> >Puts SDRAM out of self-refresh and transfers control to
> >address saved at physical 0x0.
> >
> 
> Hi Domen,

Hi!
> 
> As I understand while waking up from the low-power mode the machine is 
> effectively powering on, similarly to the cold reset, so U-Boot runs 
> from the beginning as usual, but after the SDRAM controller has been 
> initialised we detect the wakeup and teleport to the saved DRAM address.

Right.

> 
> Since in case of a wakeup from the low-power mode we skip everything in 
> U-Boot that is happening past initdram(), please clarify the following:
> 
> - are you sure there are no steps beyond init_func_ram()/board_init_f() 
> that should be performed while waking up? For example:
> 
> - are all timers settings properly re-stored?

Hmm... right, I forgot to restart watchdog... but that will be done in
Linux code.

> 
> - wouldn't the host/PCI bridge need to be re-initialised and 
> re-configured as part of the wakeup process? Did you happen to test some 
> PCI devices and would they survive after wakeup from the the low-power 
> mode? (A similar question would apply to the USB controller)

Honestly, I don't know for PCI. IIRC some time ago, kernel compiled
with CONFIG_PCI didn't boot for me.

USB controller/devices survived the wakeup last time I checked.

> 
> Also, a more general question: isn't time base update required after the 
> wakeup, specially if it's been a long sleep?

Lite5200b doesn't have an external time source.


Thanks!

	Domen

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-03-26 16:08   ` Grant Likely
@ 2007-04-03  8:46     ` Domen Puncer
  2007-04-16  4:45       ` Grant Likely
  0 siblings, 1 reply; 16+ messages in thread
From: Domen Puncer @ 2007-04-03  8:46 UTC (permalink / raw)
  To: u-boot

U-Boot part of Lite5200b low power mode support.
Puts SDRAM out of self-refresh and transfers control to
address saved at physical 0x0.


---
On 26/03/07 10:08 -0600, Grant Likely wrote:
> On 3/15/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> >U-Boot part of Lite5200b low power mode support.
> >Puts SDRAM out of self-refresh and transfers control to
> >address saved at physical 0x0.
> 
> This looks pretty straight forward.
> 
> My only comment is that psc2_4 is probably used as GPIO instead of
> power control by some users (The lite5200 is an eval board after all).
> Maybe wrap the code with #ifdef CONFIG_LITE5200B_PM (instead of
> CONFIG_LITE5200B) so that it can be easily compiled out.
> 
> Also, '//' style comments should be changed to '/* */'
> 
> Otherwise;
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
> 

OK. This one should be better:

 Makefile                |    5 ++++
 board/icecube/icecube.c |   49 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

Index: u-boot.git/board/icecube/icecube.c
===================================================================
--- u-boot.git.orig/board/icecube/icecube.c
+++ u-boot.git/board/icecube/icecube.c
@@ -42,6 +42,53 @@
 #include "mt48lc16m16a2-75.h"
 # endif
 #endif
+
+#ifdef CONFIG_LITE5200B_PM
+/* u-boot part of low-power mode implementation */
+#define SAVED_ADDR (*(void **)0x00000000)
+#define PSC2_4 0x02
+
+void lite5200b_wakeup(void)
+{
+	unsigned char wakeup_pin;
+	void (*linux_wakeup)(void);
+
+	/* check PSC2_4, if it's down "QT" is signaling we have a wakeup
+	 * from low power mode */
+	*(vu_char *)MPC5XXX_WU_GPIO_ENABLE = PSC2_4;
+	__asm__ volatile ("sync");
+
+	wakeup_pin = *(vu_char *)MPC5XXX_WU_GPIO_DATA_I;
+	if (wakeup_pin & PSC2_4)
+		return;
+
+	/* acknowledge to "QT"
+	 * by holding pin at 1 for 10 uS */
+	*(vu_char *)MPC5XXX_WU_GPIO_DIR = PSC2_4;
+	__asm__ volatile ("sync");
+	*(vu_char *)MPC5XXX_WU_GPIO_DATA_O = PSC2_4;
+	__asm__ volatile ("sync");
+	udelay(10);
+
+	/* put ram out of self-refresh */
+	*(vu_long *)MPC5XXX_SDRAM_CTRL |= 0x80000000;	/* mode_en */
+	__asm__ volatile ("sync");
+	*(vu_long *)MPC5XXX_SDRAM_CTRL |= 0x50000000;	/* cke ref_en */
+	__asm__ volatile ("sync");
+	*(vu_long *)MPC5XXX_SDRAM_CTRL &= ~0x80000000;	/* !mode_en */
+	__asm__ volatile ("sync");
+	udelay(10); /* wait a bit */
+
+	/* jump back to linux kernel code */
+	linux_wakeup = SAVED_ADDR;
+	printf("\n\nLooks like we just woke, transferring control to 0x%08lx\n",
+			linux_wakeup);
+	linux_wakeup();
+}
+#else
+#define lite5200b_wakeup()
+#endif
+
 #ifndef CFG_RAMBOOT
 static void sdram_start (int hi_addr)
 {
@@ -208,6 +255,8 @@ long int initdram (int board_type)
 		__asm__ volatile ("sync");
 	}
 
+	lite5200b_wakeup();
+
 	return dramsize + dramsize2;
 }
 
Index: u-boot.git/Makefile
===================================================================
--- u-boot.git.orig/Makefile
+++ u-boot.git/Makefile
@@ -430,6 +430,7 @@ inka4x0_config:	unconfig
 	@$(MKCONFIG) inka4x0 ppc mpc5xxx inka4x0
 
 lite5200b_config	\
+lite5200b_PM_config	\
 lite5200b_LOWBOOT_config:	unconfig
 	@mkdir -p $(obj)include
 	@mkdir -p $(obj)board/icecube
@@ -438,6 +439,10 @@ lite5200b_LOWBOOT_config:	unconfig
 	@ echo "... DDR memory revision"
 	@ echo "#define CONFIG_MPC5200"		>>$(obj)include/config.h
 	@ echo "#define CONFIG_LITE5200B"	>>$(obj)include/config.h
+	@[ -z "$(findstring _PM_,$@)" ] || \
+		{ echo "#define CONFIG_LITE5200B_PM"	>>$(obj)include/config.h ; \
+		  echo "... with power management (low-power mode) support" ; \
+		}
 	@[ -z "$(findstring LOWBOOT_,$@)" ] || \
 		{ echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp ; \
 		  echo "... with LOWBOOT configuration" ; \

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-04-03  8:46     ` Domen Puncer
@ 2007-04-16  4:45       ` Grant Likely
  2007-04-16  6:25         ` Domen Puncer
  2007-04-16 12:04         ` Stefan Roese
  0 siblings, 2 replies; 16+ messages in thread
From: Grant Likely @ 2007-04-16  4:45 UTC (permalink / raw)
  To: u-boot

On 4/3/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> U-Boot part of Lite5200b low power mode support.
> Puts SDRAM out of self-refresh and transfers control to
> address saved at physical 0x0.

Looks good; almost there.  Only one thing missing... you need to add
your "Signed-off-by" line.  :-)  See Documentation/SubmittingPatches
in the Linux source tree.  (You can just reply to this message, and
whoever merges the patch will add the line to the commit message)

Acked-by: Grant Likely <grant.likely@secretlab.ca>

Stefan; since there is no 5200 custodian, can you please pick up this
patch once Domen sends a Signed-of-by replay?

Cheers,
g.

>
>
> ---
> On 26/03/07 10:08 -0600, Grant Likely wrote:
> > On 3/15/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > >U-Boot part of Lite5200b low power mode support.
> > >Puts SDRAM out of self-refresh and transfers control to
> > >address saved at physical 0x0.
> >
> > This looks pretty straight forward.
> >
> > My only comment is that psc2_4 is probably used as GPIO instead of
> > power control by some users (The lite5200 is an eval board after all).
> > Maybe wrap the code with #ifdef CONFIG_LITE5200B_PM (instead of
> > CONFIG_LITE5200B) so that it can be easily compiled out.
> >
> > Also, '//' style comments should be changed to '/* */'
> >
> > Otherwise;
> > Acked-by: Grant Likely <grant.likely@secretlab.ca>
> >
>
> OK. This one should be better:
>
>  Makefile                |    5 ++++
>  board/icecube/icecube.c |   49 ++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 54 insertions(+)
>
> Index: u-boot.git/board/icecube/icecube.c
> ===================================================================
> --- u-boot.git.orig/board/icecube/icecube.c
> +++ u-boot.git/board/icecube/icecube.c
> @@ -42,6 +42,53 @@
>  #include "mt48lc16m16a2-75.h"
>  # endif
>  #endif
> +
> +#ifdef CONFIG_LITE5200B_PM
> +/* u-boot part of low-power mode implementation */
> +#define SAVED_ADDR (*(void **)0x00000000)
> +#define PSC2_4 0x02
> +
> +void lite5200b_wakeup(void)
> +{
> +       unsigned char wakeup_pin;
> +       void (*linux_wakeup)(void);
> +
> +       /* check PSC2_4, if it's down "QT" is signaling we have a wakeup
> +        * from low power mode */
> +       *(vu_char *)MPC5XXX_WU_GPIO_ENABLE = PSC2_4;
> +       __asm__ volatile ("sync");
> +
> +       wakeup_pin = *(vu_char *)MPC5XXX_WU_GPIO_DATA_I;
> +       if (wakeup_pin & PSC2_4)
> +               return;
> +
> +       /* acknowledge to "QT"
> +        * by holding pin at 1 for 10 uS */
> +       *(vu_char *)MPC5XXX_WU_GPIO_DIR = PSC2_4;
> +       __asm__ volatile ("sync");
> +       *(vu_char *)MPC5XXX_WU_GPIO_DATA_O = PSC2_4;
> +       __asm__ volatile ("sync");
> +       udelay(10);
> +
> +       /* put ram out of self-refresh */
> +       *(vu_long *)MPC5XXX_SDRAM_CTRL |= 0x80000000;   /* mode_en */
> +       __asm__ volatile ("sync");
> +       *(vu_long *)MPC5XXX_SDRAM_CTRL |= 0x50000000;   /* cke ref_en */
> +       __asm__ volatile ("sync");
> +       *(vu_long *)MPC5XXX_SDRAM_CTRL &= ~0x80000000;  /* !mode_en */
> +       __asm__ volatile ("sync");
> +       udelay(10); /* wait a bit */
> +
> +       /* jump back to linux kernel code */
> +       linux_wakeup = SAVED_ADDR;
> +       printf("\n\nLooks like we just woke, transferring control to 0x%08lx\n",
> +                       linux_wakeup);
> +       linux_wakeup();
> +}
> +#else
> +#define lite5200b_wakeup()
> +#endif
> +
>  #ifndef CFG_RAMBOOT
>  static void sdram_start (int hi_addr)
>  {
> @@ -208,6 +255,8 @@ long int initdram (int board_type)
>                 __asm__ volatile ("sync");
>         }
>
> +       lite5200b_wakeup();
> +
>         return dramsize + dramsize2;
>  }
>
> Index: u-boot.git/Makefile
> ===================================================================
> --- u-boot.git.orig/Makefile
> +++ u-boot.git/Makefile
> @@ -430,6 +430,7 @@ inka4x0_config:     unconfig
>         @$(MKCONFIG) inka4x0 ppc mpc5xxx inka4x0
>
>  lite5200b_config       \
> +lite5200b_PM_config    \
>  lite5200b_LOWBOOT_config:      unconfig
>         @mkdir -p $(obj)include
>         @mkdir -p $(obj)board/icecube
> @@ -438,6 +439,10 @@ lite5200b_LOWBOOT_config:  unconfig
>         @ echo "... DDR memory revision"
>         @ echo "#define CONFIG_MPC5200"         >>$(obj)include/config.h
>         @ echo "#define CONFIG_LITE5200B"       >>$(obj)include/config.h
> +       @[ -z "$(findstring _PM_,$@)" ] || \
> +               { echo "#define CONFIG_LITE5200B_PM"    >>$(obj)include/config.h ; \
> +                 echo "... with power management (low-power mode) support" ; \
> +               }
>         @[ -z "$(findstring LOWBOOT_,$@)" ] || \
>                 { echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp ; \
>                   echo "... with LOWBOOT configuration" ; \
>


-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-04-16  4:45       ` Grant Likely
@ 2007-04-16  6:25         ` Domen Puncer
  2007-04-16  7:10           ` Wolfgang Denk
  2007-04-16 12:04         ` Stefan Roese
  1 sibling, 1 reply; 16+ messages in thread
From: Domen Puncer @ 2007-04-16  6:25 UTC (permalink / raw)
  To: u-boot

On 15/04/07 22:45 -0600, Grant Likely wrote:
> On 4/3/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> >U-Boot part of Lite5200b low power mode support.
> >Puts SDRAM out of self-refresh and transfers control to
> >address saved at physical 0x0.
> 
> Looks good; almost there.  Only one thing missing... you need to add
> your "Signed-off-by" line.  :-)  See Documentation/SubmittingPatches
> in the Linux source tree.  (You can just reply to this message, and
> whoever merges the patch will add the line to the commit message)
> 
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
> 
> Stefan; since there is no 5200 custodian, can you please pick up this
> patch once Domen sends a Signed-of-by replay?

I thought Signed-off-by's are Linux specific.


Signed-off-by: Domen Puncer <domen.puncer@telargo.com>


Thanks!

	Domen

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-04-16  6:25         ` Domen Puncer
@ 2007-04-16  7:10           ` Wolfgang Denk
  0 siblings, 0 replies; 16+ messages in thread
From: Wolfgang Denk @ 2007-04-16  7:10 UTC (permalink / raw)
  To: u-boot

In message <20070416062533.GH18236@moe.telargo.com> you wrote:
>
> I thought Signed-off-by's are Linux specific.

Please read the docs.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Systems programmers are the high priests of a low cult.
                                                       -- R.S. Barton

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-04-16  4:45       ` Grant Likely
  2007-04-16  6:25         ` Domen Puncer
@ 2007-04-16 12:04         ` Stefan Roese
  2007-04-16 13:08           ` Domen Puncer
  2007-04-17 11:29           ` Stefan Roese
  1 sibling, 2 replies; 16+ messages in thread
From: Stefan Roese @ 2007-04-16 12:04 UTC (permalink / raw)
  To: u-boot

On Monday 16 April 2007 06:45, Grant Likely wrote:
> On 4/3/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > U-Boot part of Lite5200b low power mode support.
> > Puts SDRAM out of self-refresh and transfers control to
> > address saved at physical 0x0.
>
> Looks good; almost there.  Only one thing missing... you need to add
> your "Signed-off-by" line.  :-)  See Documentation/SubmittingPatches
> in the Linux source tree.  (You can just reply to this message, and
> whoever merges the patch will add the line to the commit message)
>
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
>
> Stefan; since there is no 5200 custodian, can you please pick up this
> patch once Domen sends a Signed-of-by replay?

Done.

But this brings me to a new idea: Why not create a 5200er custodian repository 
and perhaps we can find somebody (Stefan looks in Grants direction ;-)) to 
volunteer to maintain this 5200er repository?

Grant?

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
=====================================================================

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-04-16 12:04         ` Stefan Roese
@ 2007-04-16 13:08           ` Domen Puncer
  2007-04-16 13:36             ` Grant Likely
  2007-04-20 12:13             ` Stefan Roese
  2007-04-17 11:29           ` Stefan Roese
  1 sibling, 2 replies; 16+ messages in thread
From: Domen Puncer @ 2007-04-16 13:08 UTC (permalink / raw)
  To: u-boot

On 16/04/07 14:04 +0200, Stefan Roese wrote:
> On Monday 16 April 2007 06:45, Grant Likely wrote:
> > On 4/3/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > > U-Boot part of Lite5200b low power mode support.
> > > Puts SDRAM out of self-refresh and transfers control to
> > > address saved at physical 0x0.
> >
> > Looks good; almost there.  Only one thing missing... you need to add
> > your "Signed-off-by" line.  :-)  See Documentation/SubmittingPatches
> > in the Linux source tree.  (You can just reply to this message, and
> > whoever merges the patch will add the line to the commit message)
> >
> > Acked-by: Grant Likely <grant.likely@secretlab.ca>
> >
> > Stefan; since there is no 5200 custodian, can you please pick up this
> > patch once Domen sends a Signed-of-by replay?
> 
> Done.

Thanks!

While at it, can you also take care of (Grant already agreed
with the change):


G2 core reference manual says decrementer and time base
are decreasing/increasing once every 4 bus clock cycles.
Lets fix it, so time in Linux won't run twice as fast

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
---
 include/configs/IceCube.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: u-boot.git/include/configs/IceCube.h
===================================================================
--- u-boot.git.orig/include/configs/IceCube.h
+++ u-boot.git/include/configs/IceCube.h
@@ -182,7 +182,7 @@
 
 #define OF_CPU			"PowerPC,5200 at 0"
 #define OF_SOC			"soc5200 at f0000000"
-#define OF_TBCLK		(bd->bi_busfreq / 8)
+#define OF_TBCLK		(bd->bi_busfreq / 4)
 #define OF_STDOUT_PATH		"/soc5200 at f0000000/serial at 2000"
 
 /*

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-04-16 13:08           ` Domen Puncer
@ 2007-04-16 13:36             ` Grant Likely
  2007-04-20 12:13             ` Stefan Roese
  1 sibling, 0 replies; 16+ messages in thread
From: Grant Likely @ 2007-04-16 13:36 UTC (permalink / raw)
  To: u-boot

On 4/16/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> On 16/04/07 14:04 +0200, Stefan Roese wrote:
> > On Monday 16 April 2007 06:45, Grant Likely wrote:
> > > On 4/3/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > > > U-Boot part of Lite5200b low power mode support.
> > > > Puts SDRAM out of self-refresh and transfers control to
> > > > address saved at physical 0x0.
> > >
> > > Looks good; almost there.  Only one thing missing... you need to add
> > > your "Signed-off-by" line.  :-)  See Documentation/SubmittingPatches
> > > in the Linux source tree.  (You can just reply to this message, and
> > > whoever merges the patch will add the line to the commit message)
> > >
> > > Acked-by: Grant Likely <grant.likely@secretlab.ca>
> > >
> > > Stefan; since there is no 5200 custodian, can you please pick up this
> > > patch once Domen sends a Signed-of-by replay?
> >
> > Done.
>
> Thanks!
>
> While at it, can you also take care of (Grant already agreed
> with the change):
>
>
> G2 core reference manual says decrementer and time base
> are decreasing/increasing once every 4 bus clock cycles.
> Lets fix it, so time in Linux won't run twice as fast
>
> Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
>  include/configs/IceCube.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: u-boot.git/include/configs/IceCube.h
> ===================================================================
> --- u-boot.git.orig/include/configs/IceCube.h
> +++ u-boot.git/include/configs/IceCube.h
> @@ -182,7 +182,7 @@
>
>  #define OF_CPU                 "PowerPC,5200 at 0"
>  #define OF_SOC                 "soc5200 at f0000000"
> -#define OF_TBCLK               (bd->bi_busfreq / 8)
> +#define OF_TBCLK               (bd->bi_busfreq / 4)
>  #define OF_STDOUT_PATH         "/soc5200 at f0000000/serial at 2000"
>
>  /*
>


-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-04-16 12:04         ` Stefan Roese
  2007-04-16 13:08           ` Domen Puncer
@ 2007-04-17 11:29           ` Stefan Roese
  2007-04-17 14:50             ` Wolfgang Denk
  1 sibling, 1 reply; 16+ messages in thread
From: Stefan Roese @ 2007-04-17 11:29 UTC (permalink / raw)
  To: u-boot

Hi Domen,

On Monday 16 April 2007 14:04, Stefan Roese wrote:
> On Monday 16 April 2007 06:45, Grant Likely wrote:
> > On 4/3/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > > U-Boot part of Lite5200b low power mode support.
> > > Puts SDRAM out of self-refresh and transfers control to
> > > address saved at physical 0x0.
> >
> > Looks good; almost there.  Only one thing missing... you need to add
> > your "Signed-off-by" line.  :-)  See Documentation/SubmittingPatches
> > in the Linux source tree.  (You can just reply to this message, and
> > whoever merges the patch will add the line to the commit message)
> >
> > Acked-by: Grant Likely <grant.likely@secretlab.ca>
> >
> > Stefan; since there is no 5200 custodian, can you please pick up this
> > patch once Domen sends a Signed-of-by replay?
>
> Done.

Rafal mentioned to me off-list that some documentation about this 
suspend/wakeup mechanism would be preferable. Here his notes:

"
- regarding the U-Boot piece I'd only like to see some explanation (as a 
comment or short readme file) of the overall concept and scenario as it 
is not intuitive at all and rather difficult to understand all the 
ramifications and constraints from looking at the code only
"

So Domen, could you please either send a reworked patch with this 
documentation (preferable some file in doc/README.xxx) or just send a new 
patch with only this documentation?

Thanks.

BTW: Wolfgang reminded me, that putting this stuff into the u-boot-ppc4xx 
repository is not a good solution. I'll try to move this over to 
u-boot-testing.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
=====================================================================

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-04-17 11:29           ` Stefan Roese
@ 2007-04-17 14:50             ` Wolfgang Denk
  2007-04-18  5:55               ` [U-Boot-Users] [PATCH] icecube/lite5200b: document " Domen Puncer
  0 siblings, 1 reply; 16+ messages in thread
From: Wolfgang Denk @ 2007-04-17 14:50 UTC (permalink / raw)
  To: u-boot

Dear Domen,

in message <200704171329.37002.sr@denx.de> Stefan Roese wrote:
> 
> - regarding the U-Boot piece I'd only like to see some explanation (as a 
> comment or short readme file) of the overall concept and scenario as it 
> is not intuitive at all and rather difficult to understand all the 
> ramifications and constraints from looking at the code only
> "
> 
> So Domen, could you please either send a reworked patch with this 
> documentation (preferable some file in doc/README.xxx) or just send a new 
> patch with only this documentation?

The documentation should  also  include  information  which  configu-
rations  have  been  tested,  i. e. if PCI, IDE, USB, ... device have
been attached to the system during these test cycles,  and  if  these
survived.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Marriage is the sole cause of divorce.

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: document wakeup from low-power support
  2007-04-17 14:50             ` Wolfgang Denk
@ 2007-04-18  5:55               ` Domen Puncer
  0 siblings, 0 replies; 16+ messages in thread
From: Domen Puncer @ 2007-04-18  5:55 UTC (permalink / raw)
  To: u-boot

Document what Lite5200B low-power is about.


Signed-off-by: Domen Puncer <domen.puncer@telargo.com>

---
 doc/README.Lite5200B_low_power |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Index: u-boot.git/doc/README.Lite5200B_low_power
===================================================================
--- /dev/null
+++ u-boot.git/doc/README.Lite5200B_low_power
@@ -0,0 +1,22 @@
+Lite5200B wakeup from low-power mode (CONFIG_LITE5200B_PM)
+----------------------------------------------------------
+
+Low-power mode as described in Lite5200B User's Manual, means that
+with support of MC68HLC908QT1 microcontroller (refered to as QT),
+everything but the SDRAM can be powered down. This brings
+maximum power saving, while one can still restore previous state
+quickly.
+
+Quick overview where U-Boot comes into the picture:
+- OS saves device states
+- OS saves wakeup handler address to physical 0x0, puts SDRAM into
+  self-refresh and signals to QT, it should power down the board
+- / board is sleeping here /
+- someone presses SW4 (connected to QT)
+- U-Boot checks PSC2_4 pin, if QT drives it down, then we woke up,
+  so get SDRAM out of self-refresh and transfer control to OS
+  wakeup handler
+- OS restores device states
+
+This was tested on Linux with USB and Ethernet in use. Adding
+support for other devices is an OS issue.

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-04-16 13:08           ` Domen Puncer
  2007-04-16 13:36             ` Grant Likely
@ 2007-04-20 12:13             ` Stefan Roese
  2007-04-20 13:47               ` Wolfgang Denk
  1 sibling, 1 reply; 16+ messages in thread
From: Stefan Roese @ 2007-04-20 12:13 UTC (permalink / raw)
  To: u-boot

Hi Domen,

On Monday 16 April 2007 15:08, Domen Puncer wrote:
> While at it, can you also take care of (Grant already agreed
> with the change):

since we don't have a 52xx repository, I commited it into the u-boot-testing 
repository:

git://www.denx.de/git/u-boot-testing.git

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
=====================================================================

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

* [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support
  2007-04-20 12:13             ` Stefan Roese
@ 2007-04-20 13:47               ` Wolfgang Denk
  0 siblings, 0 replies; 16+ messages in thread
From: Wolfgang Denk @ 2007-04-20 13:47 UTC (permalink / raw)
  To: u-boot

In message <200704201413.05902.sr@denx.de> you wrote:
>
> since we don't have a 52xx repository, I commited it into the u-boot-testing 
> repository:
> 
> git://www.denx.de/git/u-boot-testing.git

Merged.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The first thing we do is kill all the lawyers.
(Shakespeare. II Henry VI, Act IV, scene ii)

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

end of thread, other threads:[~2007-04-20 13:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070315103959.GA22215@moe.telargo.com>
2007-03-15 10:44 ` [U-Boot-Users] [PATCH] icecube/lite5200b: wakeup from low-power support Domen Puncer
2007-03-26 16:08   ` Grant Likely
2007-04-03  8:46     ` Domen Puncer
2007-04-16  4:45       ` Grant Likely
2007-04-16  6:25         ` Domen Puncer
2007-04-16  7:10           ` Wolfgang Denk
2007-04-16 12:04         ` Stefan Roese
2007-04-16 13:08           ` Domen Puncer
2007-04-16 13:36             ` Grant Likely
2007-04-20 12:13             ` Stefan Roese
2007-04-20 13:47               ` Wolfgang Denk
2007-04-17 11:29           ` Stefan Roese
2007-04-17 14:50             ` Wolfgang Denk
2007-04-18  5:55               ` [U-Boot-Users] [PATCH] icecube/lite5200b: document " Domen Puncer
2007-03-31 17:20   ` [U-Boot-Users] [PATCH] icecube/lite5200b: " Rafal Jaworowski
2007-03-31 18:38     ` Domen Puncer

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