All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix print info for QSPI boot
@ 2016-03-14  9:57 Gong Qianyu
  2016-03-14  9:57 ` [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix to get boot device info from FPGA Gong Qianyu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Gong Qianyu @ 2016-03-14  9:57 UTC (permalink / raw)
  To: u-boot

according to the Reference manual.

Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
---
 board/freescale/ls1043aqds/ls1043aqds.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c
index a72fe52..bd73e4f 100644
--- a/board/freescale/ls1043aqds/ls1043aqds.c
+++ b/board/freescale/ls1043aqds/ls1043aqds.c
@@ -47,7 +47,7 @@ enum {
 int checkboard(void)
 {
 	char buf[64];
-#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_QSPI_BOOT)
+#ifndef CONFIG_SD_BOOT
 	u8 sw;
 #endif
 
@@ -55,8 +55,6 @@ int checkboard(void)
 
 #ifdef CONFIG_SD_BOOT
 	puts("SD\n");
-#elif defined(CONFIG_QSPI_BOOT)
-	puts("QSPI\n");
 #else
 	sw = QIXIS_READ(brdcfg[0]);
 	sw = (sw & QIXIS_LBMAP_MASK) >> QIXIS_LBMAP_SHIFT;
@@ -67,8 +65,8 @@ int checkboard(void)
 		puts("PromJet\n");
 	else if (sw == 0x9)
 		puts("NAND\n");
-	else if (sw == 0x15)
-		printf("IFCCard\n");
+	else if (sw == 0xF)
+		printf("QSPI\n");
 	else
 		printf("invalid setting of SW%u\n", QIXIS_LBMAP_SWITCH);
 #endif
-- 
2.1.0.27.g96db324

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

* [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix to get boot device info from FPGA
  2016-03-14  9:57 [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix print info for QSPI boot Gong Qianyu
@ 2016-03-14  9:57 ` Gong Qianyu
  2016-03-14  9:57 ` [U-Boot] [PATCH 2/2] armv8/ls1043aqds: use configuarable clock for non-QSPI boot Gong Qianyu
  2016-03-14 10:09 ` [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix print info for QSPI boot Qianyu Gong
  2 siblings, 0 replies; 6+ messages in thread
From: Gong Qianyu @ 2016-03-14  9:57 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
---
 board/freescale/ls1043aqds/ls1043aqds.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c
index a72fe52..bd73e4f 100644
--- a/board/freescale/ls1043aqds/ls1043aqds.c
+++ b/board/freescale/ls1043aqds/ls1043aqds.c
@@ -47,7 +47,7 @@ enum {
 int checkboard(void)
 {
 	char buf[64];
-#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_QSPI_BOOT)
+#ifndef CONFIG_SD_BOOT
 	u8 sw;
 #endif
 
@@ -55,8 +55,6 @@ int checkboard(void)
 
 #ifdef CONFIG_SD_BOOT
 	puts("SD\n");
-#elif defined(CONFIG_QSPI_BOOT)
-	puts("QSPI\n");
 #else
 	sw = QIXIS_READ(brdcfg[0]);
 	sw = (sw & QIXIS_LBMAP_MASK) >> QIXIS_LBMAP_SHIFT;
@@ -67,8 +65,8 @@ int checkboard(void)
 		puts("PromJet\n");
 	else if (sw == 0x9)
 		puts("NAND\n");
-	else if (sw == 0x15)
-		printf("IFCCard\n");
+	else if (sw == 0xF)
+		printf("QSPI\n");
 	else
 		printf("invalid setting of SW%u\n", QIXIS_LBMAP_SWITCH);
 #endif
-- 
2.1.0.27.g96db324

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

* [U-Boot] [PATCH 2/2] armv8/ls1043aqds: use configuarable clock for non-QSPI boot
  2016-03-14  9:57 [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix print info for QSPI boot Gong Qianyu
  2016-03-14  9:57 ` [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix to get boot device info from FPGA Gong Qianyu
@ 2016-03-14  9:57 ` Gong Qianyu
  2016-03-18 16:53   ` york sun
  2016-03-14 10:09 ` [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix print info for QSPI boot Qianyu Gong
  2 siblings, 1 reply; 6+ messages in thread
From: Gong Qianyu @ 2016-03-14  9:57 UTC (permalink / raw)
  To: u-boot

For QSPI boot and SD boot with QSPI, we could only read from FPGA
through I2C to get the system clock and DDR clock info. However in
U-Boot booting flow, I2C is not initialized when get_clocks() is
called and thus it couldn't get correct value of the clocks.
So the configuarable clock is only supported by non-QSPI boot.

Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
---
 include/configs/ls1043aqds.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h
index 158cf02..93671f0 100644
--- a/include/configs/ls1043aqds.h
+++ b/include/configs/ls1043aqds.h
@@ -29,8 +29,13 @@ unsigned long get_board_sys_clk(void);
 unsigned long get_board_ddr_clk(void);
 #endif
 
+#if defined(CONFIG_QSPI_BOOT) || (CONFIG_SD_BOOT_QSPI)
 #define CONFIG_SYS_CLK_FREQ		100000000
 #define CONFIG_DDR_CLK_FREQ		100000000
+#else
+#define CONFIG_SYS_CLK_FREQ		get_board_sys_clk()
+#define CONFIG_DDR_CLK_FREQ		get_board_ddr_clk()
+#endif
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
-- 
2.1.0.27.g96db324

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

* [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix print info for QSPI boot
  2016-03-14  9:57 [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix print info for QSPI boot Gong Qianyu
  2016-03-14  9:57 ` [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix to get boot device info from FPGA Gong Qianyu
  2016-03-14  9:57 ` [U-Boot] [PATCH 2/2] armv8/ls1043aqds: use configuarable clock for non-QSPI boot Gong Qianyu
@ 2016-03-14 10:09 ` Qianyu Gong
  2 siblings, 0 replies; 6+ messages in thread
From: Qianyu Gong @ 2016-03-14 10:09 UTC (permalink / raw)
  To: u-boot

Please ignore this patch.. sent out for mistake:(

> -----Original Message-----
> From: Gong Qianyu [mailto:Qianyu.Gong at nxp.com]
> Sent: Monday, March 14, 2016 5:57 PM
> To: u-boot at lists.denx.de; york sun <york.sun@nxp.com>; Mingkai Hu
> <mingkai.hu@nxp.com>
> Cc: oss at buserror.net; Qianyu Gong <qianyu.gong@nxp.com>
> Subject: [PATCH 1/2] armv8/ls1043aqds: fix print info for QSPI boot
> 
> according to the Reference manual.
> 
> Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
> ---
>  board/freescale/ls1043aqds/ls1043aqds.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/board/freescale/ls1043aqds/ls1043aqds.c
> b/board/freescale/ls1043aqds/ls1043aqds.c
> index a72fe52..bd73e4f 100644
> --- a/board/freescale/ls1043aqds/ls1043aqds.c
> +++ b/board/freescale/ls1043aqds/ls1043aqds.c
> @@ -47,7 +47,7 @@ enum {
>  int checkboard(void)
>  {
>  	char buf[64];
> -#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_QSPI_BOOT)
> +#ifndef CONFIG_SD_BOOT
>  	u8 sw;
>  #endif
> 
> @@ -55,8 +55,6 @@ int checkboard(void)
> 
>  #ifdef CONFIG_SD_BOOT
>  	puts("SD\n");
> -#elif defined(CONFIG_QSPI_BOOT)
> -	puts("QSPI\n");
>  #else
>  	sw = QIXIS_READ(brdcfg[0]);
>  	sw = (sw & QIXIS_LBMAP_MASK) >> QIXIS_LBMAP_SHIFT; @@ -67,8 +65,8
> @@ int checkboard(void)
>  		puts("PromJet\n");
>  	else if (sw == 0x9)
>  		puts("NAND\n");
> -	else if (sw == 0x15)
> -		printf("IFCCard\n");
> +	else if (sw == 0xF)
> +		printf("QSPI\n");
>  	else
>  		printf("invalid setting of SW%u\n", QIXIS_LBMAP_SWITCH);
> #endif
> --
> 2.1.0.27.g96db324

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

* [U-Boot] [PATCH 2/2] armv8/ls1043aqds: use configuarable clock for non-QSPI boot
  2016-03-14  9:57 ` [U-Boot] [PATCH 2/2] armv8/ls1043aqds: use configuarable clock for non-QSPI boot Gong Qianyu
@ 2016-03-18 16:53   ` york sun
  2016-03-19  2:13     ` Qianyu Gong
  0 siblings, 1 reply; 6+ messages in thread
From: york sun @ 2016-03-18 16:53 UTC (permalink / raw)
  To: u-boot

On 03/14/2016 03:06 AM, Gong Qianyu wrote:
> For QSPI boot and SD boot with QSPI, we could only read from FPGA
> through I2C to get the system clock and DDR clock info. However in
> U-Boot booting flow, I2C is not initialized when get_clocks() is
> called and thus it couldn't get correct value of the clocks.
> So the configuarable clock is only supported by non-QSPI boot.
> 
> Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
> ---
>  include/configs/ls1043aqds.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h
> index 158cf02..93671f0 100644
> --- a/include/configs/ls1043aqds.h
> +++ b/include/configs/ls1043aqds.h
> @@ -29,8 +29,13 @@ unsigned long get_board_sys_clk(void);
>  unsigned long get_board_ddr_clk(void);
>  #endif
>  
> +#if defined(CONFIG_QSPI_BOOT) || (CONFIG_SD_BOOT_QSPI)
>  #define CONFIG_SYS_CLK_FREQ		100000000
>  #define CONFIG_DDR_CLK_FREQ		100000000
> +#else
> +#define CONFIG_SYS_CLK_FREQ		get_board_sys_clk()
> +#define CONFIG_DDR_CLK_FREQ		get_board_ddr_clk()
> +#endif
>  
>  #define CONFIG_SKIP_LOWLEVEL_INIT
>  
> 
Qianyu,

Please work with Yuan Yao on qixis access. We may have a solution to get the
clocks on QSPI boot.

York

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

* [U-Boot] [PATCH 2/2] armv8/ls1043aqds: use configuarable clock for non-QSPI boot
  2016-03-18 16:53   ` york sun
@ 2016-03-19  2:13     ` Qianyu Gong
  0 siblings, 0 replies; 6+ messages in thread
From: Qianyu Gong @ 2016-03-19  2:13 UTC (permalink / raw)
  To: u-boot

Hi York?

? 2016?3?19????12:53?york sun <york.sun at nxp.com<mailto:york.sun@nxp.com>> ???

On 03/14/2016 03:06 AM, Gong Qianyu wrote:
For QSPI boot and SD boot with QSPI, we could only read from FPGA
through I2C to get the system clock and DDR clock info. However in
U-Boot booting flow, I2C is not initialized when get_clocks() is
called and thus it couldn't get correct value of the clocks.
So the configuarable clock is only supported by non-QSPI boot.

Signed-off-by: Gong Qianyu <Qianyu.Gong at nxp.com<mailto:Qianyu.Gong@nxp.com>>
---
include/configs/ls1043aqds.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h
index 158cf02..93671f0 100644
--- a/include/configs/ls1043aqds.h
+++ b/include/configs/ls1043aqds.h
@@ -29,8 +29,13 @@ unsigned long get_board_sys_clk(void);
unsigned long get_board_ddr_clk(void);
#endif

+#if defined(CONFIG_QSPI_BOOT) || (CONFIG_SD_BOOT_QSPI)
#define CONFIG_SYS_CLK_FREQ 100000000
#define CONFIG_DDR_CLK_FREQ 100000000
+#else
+#define CONFIG_SYS_CLK_FREQ get_board_sys_clk()
+#define CONFIG_DDR_CLK_FREQ get_board_ddr_clk()
+#endif

#define CONFIG_SKIP_LOWLEVEL_INIT


Qianyu,

Please work with Yuan Yao on qixis access. We may have a solution to get the
clocks on QSPI boot.

York

Yes. I have been discussing with Yuan Yao these days.
Yesterday we tried to initialize i2c by writing several related registers and finally
verified on LS2080AQDS board. Seems that this way is feasible and simple
enough for us to read FPGA earlier.
Then I?ll send a new version of this patch.


Regards,
Qianyu

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

end of thread, other threads:[~2016-03-19  2:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-14  9:57 [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix print info for QSPI boot Gong Qianyu
2016-03-14  9:57 ` [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix to get boot device info from FPGA Gong Qianyu
2016-03-14  9:57 ` [U-Boot] [PATCH 2/2] armv8/ls1043aqds: use configuarable clock for non-QSPI boot Gong Qianyu
2016-03-18 16:53   ` york sun
2016-03-19  2:13     ` Qianyu Gong
2016-03-14 10:09 ` [U-Boot] [PATCH 1/2] armv8/ls1043aqds: fix print info for QSPI boot Qianyu Gong

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.