All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ls102xa: fdt: Disable QSPI and DSPI in NOR/NAND/SD boot
@ 2014-12-26  5:14 Alison Wang
  2015-01-24 15:14 ` York Sun
  0 siblings, 1 reply; 2+ messages in thread
From: Alison Wang @ 2014-12-26  5:14 UTC (permalink / raw)
  To: u-boot

As QSPI/DSPI and IFC are pin multiplexed, QSPI and DSPI are
only enabled in QSPI boot, and disabled in other boot modes.
IFC is enabled in NOR/NAND/SD boot, and disabled in QSPI boot.
This patch will add fdt support for the above rules.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
---
 arch/arm/cpu/armv7/ls102xa/fdt.c           | 13 +++++++++++++
 arch/arm/include/asm/arch-ls102xa/config.h |  4 ++++
 2 files changed, 17 insertions(+)

diff --git a/arch/arm/cpu/armv7/ls102xa/fdt.c b/arch/arm/cpu/armv7/ls102xa/fdt.c
index 989780d..b5c8d9d 100644
--- a/arch/arm/cpu/armv7/ls102xa/fdt.c
+++ b/arch/arm/cpu/armv7/ls102xa/fdt.c
@@ -133,4 +133,17 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 
 	do_fixup_by_compat_u32(blob, "fsl, ls1021a-flexcan",
 			       "clock-frequency", busclk / 2, 1);
+
+#ifdef CONFIG_QSPI_BOOT
+	off = fdt_node_offset_by_compat_reg(blob, FSL_IFC_COMPAT,
+					    CONFIG_SYS_IFC_ADDR);
+	fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
+#else
+	off = fdt_node_offset_by_compat_reg(blob, FSL_QSPI_COMPAT,
+					    QSPI0_BASE_ADDR);
+	fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
+	off = fdt_node_offset_by_compat_reg(blob, FSL_DSPI_COMPAT,
+					    DSPI1_BASE_ADDR);
+	fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
+#endif
 }
diff --git a/arch/arm/include/asm/arch-ls102xa/config.h b/arch/arm/include/asm/arch-ls102xa/config.h
index 5e934da..884c30e 100644
--- a/arch/arm/include/asm/arch-ls102xa/config.h
+++ b/arch/arm/include/asm/arch-ls102xa/config.h
@@ -101,4 +101,8 @@
 #error SoC not defined
 #endif
 
+#define FSL_IFC_COMPAT		"fsl,ifc"
+#define FSL_QSPI_COMPAT		"fsl,ls1-qspi"
+#define FSL_DSPI_COMPAT		"fsl,vf610-dspi"
+
 #endif /* _ASM_ARMV7_LS102XA_CONFIG_ */
-- 
2.1.0.27.g96db324

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

* [U-Boot] [PATCH] ls102xa: fdt: Disable QSPI and DSPI in NOR/NAND/SD boot
  2014-12-26  5:14 [U-Boot] [PATCH] ls102xa: fdt: Disable QSPI and DSPI in NOR/NAND/SD boot Alison Wang
@ 2015-01-24 15:14 ` York Sun
  0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2015-01-24 15:14 UTC (permalink / raw)
  To: u-boot



On 12/25/2014 11:14 PM, Alison Wang wrote:
> As QSPI/DSPI and IFC are pin multiplexed, QSPI and DSPI are
> only enabled in QSPI boot, and disabled in other boot modes.
> IFC is enabled in NOR/NAND/SD boot, and disabled in QSPI boot.
> This patch will add fdt support for the above rules.
> 
> Signed-off-by: Alison Wang <alison.wang@freescale.com>
> ---

Applied to u-boot-fsl-qoriq master branch, awaiting upstream.

York

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

end of thread, other threads:[~2015-01-24 15:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-26  5:14 [U-Boot] [PATCH] ls102xa: fdt: Disable QSPI and DSPI in NOR/NAND/SD boot Alison Wang
2015-01-24 15:14 ` 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.