All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mpc85xx/t102xqds: convert deep sleep to generic board interface
@ 2014-12-18  1:55 Tang Yuantian
  2015-01-15 18:01 ` York Sun
  2015-01-23  0:34 ` York Sun
  0 siblings, 2 replies; 6+ messages in thread
From: Tang Yuantian @ 2014-12-18  1:55 UTC (permalink / raw)
  To: u-boot

A new deep sleep interface is introduced to support generic
board structure. Converts it to use new interface.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
---
 board/freescale/t102xqds/ddr.c      | 19 +++++++++++++++++++
 board/freescale/t102xqds/t102xqds.c | 23 +++++++++++------------
 include/configs/T102xQDS.h          |  3 +++
 3 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/board/freescale/t102xqds/ddr.c b/board/freescale/t102xqds/ddr.c
index 46fc64e..2d4d10f 100644
--- a/board/freescale/t102xqds/ddr.c
+++ b/board/freescale/t102xqds/ddr.c
@@ -11,6 +11,7 @@
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
+#include <asm/mpc85xx_gpio.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -152,6 +153,19 @@ found:
 #endif
 }
 
+#if defined(CONFIG_DEEP_SLEEP)
+void board_mem_sleep_setup(void)
+{
+	void __iomem *qixis_base = (void *)QIXIS_BASE;
+
+	/* does not provide HW signals for power management */
+	clrbits_8(qixis_base + 0x21, 0x2);
+	/* Disable MCKE isolation */
+	gpio_set_value(2, 0);
+	udelay(1);
+}
+#endif
+
 phys_size_t initdram(int board_type)
 {
 	phys_size_t dram_size;
@@ -166,5 +180,10 @@ phys_size_t initdram(int board_type)
 	/* DDR has been initialised by first stage boot loader */
 	dram_size =  fsl_ddr_sdram_size();
 #endif
+
+#if defined(CONFIG_DEEP_SLEEP) && !defined(CONFIG_SPL_BUILD)
+	fsl_dp_resume();
+#endif
+
 	return dram_size;
 }
diff --git a/board/freescale/t102xqds/t102xqds.c b/board/freescale/t102xqds/t102xqds.c
index f3141b5..708afca 100644
--- a/board/freescale/t102xqds/t102xqds.c
+++ b/board/freescale/t102xqds/t102xqds.c
@@ -19,10 +19,10 @@
 #include <asm/fsl_liodn.h>
 #include <fm_eth.h>
 #include <hwconfig.h>
-#include <asm/mpc85xx_gpio.h>
 #include "../common/qixis.h"
 #include "t102xqds.h"
 #include "t102xqds_qixis.h"
+#include "../common/sleep.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -242,6 +242,16 @@ void board_retimer_ds125df111_init(void)
 	i2c_write(I2C_RETIMER_ADDR, 0x64, 1, &reg, 1);
 }
 
+int board_early_init_f(void)
+{
+#if defined(CONFIG_DEEP_SLEEP)
+	if (is_warm_boot())
+		fsl_dp_disable_console();
+#endif
+
+	return 0;
+}
+
 int board_early_init_r(void)
 {
 #ifdef CONFIG_SYS_FLASH_BASE
@@ -395,14 +405,3 @@ void qixis_dump_switch(void)
 		printf("SW%d = (0x%02x)\n", i, QIXIS_READ(cms[1]));
 	}
 }
-
-#ifdef CONFIG_DEEP_SLEEP
-void board_mem_sleep_setup(void)
-{
-	/* does not provide HW signals for power management */
-	QIXIS_WRITE(pwr_ctl[1], (QIXIS_READ(pwr_ctl[1]) & ~0x2));
-	/* Disable MCKE isolation */
-	gpio_set_value(2, 0);
-	udelay(1);
-}
-#endif
diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h
index c2bdbb9..3f02ced 100644
--- a/include/configs/T102xQDS.h
+++ b/include/configs/T102xQDS.h
@@ -35,7 +35,10 @@
 #define CONFIG_ENV_OVERWRITE
 
 #define CONFIG_DEEP_SLEEP
+#if defined(CONFIG_DEEP_SLEEP)
 #define CONFIG_SILENT_CONSOLE
+#define CONFIG_BOARD_EARLY_INIT_F
+#endif
 
 #ifdef CONFIG_RAMBOOT_PBL
 #define CONFIG_SYS_FSL_PBL_PBI board/freescale/t102xqds/t1024_pbi.cfg
-- 
2.1.0.27.g96db324

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

* [U-Boot] [PATCH] mpc85xx/t102xqds: convert deep sleep to generic board interface
  2014-12-18  1:55 [U-Boot] [PATCH] mpc85xx/t102xqds: convert deep sleep to generic board interface Tang Yuantian
@ 2015-01-15 18:01 ` York Sun
  2015-01-16  2:23   ` Yuantian Tang
  2015-01-23  0:34 ` York Sun
  1 sibling, 1 reply; 6+ messages in thread
From: York Sun @ 2015-01-15 18:01 UTC (permalink / raw)
  To: u-boot

Yuantian,

On 12/17/2014 05:55 PM, Tang Yuantian wrote:
> A new deep sleep interface is introduced to support generic
> board structure. Converts it to use new interface.
> 
> Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
> ---
>  board/freescale/t102xqds/ddr.c      | 19 +++++++++++++++++++
>  board/freescale/t102xqds/t102xqds.c | 23 +++++++++++------------
>  include/configs/T102xQDS.h          |  3 +++
>  3 files changed, 33 insertions(+), 12 deletions(-)

You disable console in spl.c for RDB, but not for QDS. Is that what you want?

York

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

* [U-Boot] [PATCH] mpc85xx/t102xqds: convert deep sleep to generic board interface
  2015-01-15 18:01 ` York Sun
@ 2015-01-16  2:23   ` Yuantian Tang
  2015-01-16 17:22     ` York Sun
  0 siblings, 1 reply; 6+ messages in thread
From: Yuantian Tang @ 2015-01-16  2:23 UTC (permalink / raw)
  To: u-boot

Hi York,

Yes, I did it on purpose. T102XQDS is not supported in SDK1.7 anymore.
So I don't want to put more efforts to add SPI/NAND/SD boot deep sleep support.
That means t102xqds only supports nor-boot deep sleep and need not to update spl.c. 

It is the same case for T1040QDS.

Thanks,
Yuantian

> -----Original Message-----
> From: Sun York-R58495
> Sent: Friday, January 16, 2015 2:02 AM
> To: Tang Yuantian-B29983
> Cc: u-boot at lists.denx.de
> Subject: Re: [PATCH] mpc85xx/t102xqds: convert deep sleep to generic board
> interface
> 
> Yuantian,
> 
> On 12/17/2014 05:55 PM, Tang Yuantian wrote:
> > A new deep sleep interface is introduced to support generic board
> > structure. Converts it to use new interface.
> >
> > Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
> > ---
> >  board/freescale/t102xqds/ddr.c      | 19 +++++++++++++++++++
> >  board/freescale/t102xqds/t102xqds.c | 23 +++++++++++------------
> >  include/configs/T102xQDS.h          |  3 +++
> >  3 files changed, 33 insertions(+), 12 deletions(-)
> 
> You disable console in spl.c for RDB, but not for QDS. Is that what you want?
> 
> York

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

* [U-Boot] [PATCH] mpc85xx/t102xqds: convert deep sleep to generic board interface
  2015-01-16  2:23   ` Yuantian Tang
@ 2015-01-16 17:22     ` York Sun
  2015-01-19  2:44       ` Yuantian Tang
  0 siblings, 1 reply; 6+ messages in thread
From: York Sun @ 2015-01-16 17:22 UTC (permalink / raw)
  To: u-boot

Yuantian,

On 01/15/2015 06:23 PM, Tang Yuantian-B29983 wrote:
> Hi York,
> 
> Yes, I did it on purpose. T102XQDS is not supported in SDK1.7 anymore.
> So I don't want to put more efforts to add SPI/NAND/SD boot deep sleep support.

That's not a good reason. Regardless if Freescale SDK supports a board, as far
as it benefits the community, we keep the support.

> That means t102xqds only supports nor-boot deep sleep and need not to update spl.c. 
> 
> It is the same case for T1040QDS.

A note in readme would be nice. I am not going to push for a fix. Not having the
console silenced is no big deal in case someone uses SPL with deep sleep.

York

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

* [U-Boot] [PATCH] mpc85xx/t102xqds: convert deep sleep to generic board interface
  2015-01-16 17:22     ` York Sun
@ 2015-01-19  2:44       ` Yuantian Tang
  0 siblings, 0 replies; 6+ messages in thread
From: Yuantian Tang @ 2015-01-19  2:44 UTC (permalink / raw)
  To: u-boot

Hi York,

> -----Original Message-----
> From: Sun York-R58495
> Sent: Saturday, January 17, 2015 1:23 AM
> To: Tang Yuantian-B29983
> Cc: u-boot at lists.denx.de
> Subject: Re: [PATCH] mpc85xx/t102xqds: convert deep sleep to generic board
> interface
> 
> Yuantian,
> 
> On 01/15/2015 06:23 PM, Tang Yuantian-B29983 wrote:
> > Hi York,
> >
> > Yes, I did it on purpose. T102XQDS is not supported in SDK1.7 anymore.
> > So I don't want to put more efforts to add SPI/NAND/SD boot deep sleep
> support.
> 
> That's not a good reason. Regardless if Freescale SDK supports a board, as far as
> it benefits the community, we keep the support.
> 
> > That means t102xqds only supports nor-boot deep sleep and need not to
> update spl.c.
> >
> > It is the same case for T1040QDS.
> 
> A note in readme would be nice. I am not going to push for a fix. Not having the
> console silenced is no big deal in case someone uses SPL with deep sleep.

I am not sure I understand you right, but Non-nor deep sleep support is more than just disabling console.
We need to update board head file, like t102xqds.h, as well.
I think you are right. We should add non-nor boot support.

Please apply these patches. I will send another two patch to support QDS non-nor boot deep sleep on qds.

Regards,
Yuantian

> 
> York

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

* [U-Boot] [PATCH] mpc85xx/t102xqds: convert deep sleep to generic board interface
  2014-12-18  1:55 [U-Boot] [PATCH] mpc85xx/t102xqds: convert deep sleep to generic board interface Tang Yuantian
  2015-01-15 18:01 ` York Sun
@ 2015-01-23  0:34 ` York Sun
  1 sibling, 0 replies; 6+ messages in thread
From: York Sun @ 2015-01-23  0:34 UTC (permalink / raw)
  To: u-boot



On 12/17/2014 07:55 PM, Tang Yuantian wrote:
> A new deep sleep interface is introduced to support generic
> board structure. Converts it to use new interface.
> 
> Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
> ---

Applied to u-boot-mpc85xx master branch, awaiting upstream.

York

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

end of thread, other threads:[~2015-01-23  0:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-18  1:55 [U-Boot] [PATCH] mpc85xx/t102xqds: convert deep sleep to generic board interface Tang Yuantian
2015-01-15 18:01 ` York Sun
2015-01-16  2:23   ` Yuantian Tang
2015-01-16 17:22     ` York Sun
2015-01-19  2:44       ` Yuantian Tang
2015-01-23  0:34 ` York Sun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.