summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorZhuoyu Zhang <Zhuoyu.Zhang@freescale.com>2015-08-17 18:55:12 +0800
committerYork Sun <yorksun@freescale.com>2015-09-01 21:49:20 -0500
commit03c22449c5b7daff0a43291b34564a52660b83b8 (patch)
tree5925e5f7cbbcc63e89d40674300b635936d1b94a /board
parentec93af0dec4c9f17cefadd24d54edf5c5b91bc8d (diff)
downloadu-boot-imx-03c22449c5b7daff0a43291b34564a52660b83b8.zip
u-boot-imx-03c22449c5b7daff0a43291b34564a52660b83b8.tar.gz
u-boot-imx-03c22449c5b7daff0a43291b34564a52660b83b8.tar.bz2
arm/ls102xa:add hwconfig setting to support disable unused devices
DEVDISRn registers provides a mechanism for gating clocks of IP blocks that are not used. Here we implement hwconfig option to allow users to disable unused peripherals on the board. For ex. If eSDHC/qDMA/eDMA are unused and with disabled status in dts, User can enable CONFIG_FSL_DEVICE_DISABLE and set "devdis:esdhc,qdma,edma" in hwconfig, thus ESDHC controller & eDMA/qDMA will be clock gated to save more power. Signed-off-by: Zhuoyu Zhang <Zhuoyu.Zhang@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/ls1021aqds/ls1021aqds.c5
-rw-r--r--board/freescale/ls1021atwr/ls1021atwr.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c
index e585380..655fc64 100644
--- a/board/freescale/ls1021aqds/ls1021aqds.c
+++ b/board/freescale/ls1021aqds/ls1021aqds.c
@@ -12,12 +12,14 @@
#include <asm/arch/clock.h>
#include <asm/arch/fsl_serdes.h>
#include <asm/arch/ls102xa_stream_id.h>
+#include <asm/arch/ls102xa_devdis.h>
#include <hwconfig.h>
#include <mmc.h>
#include <fsl_esdhc.h>
#include <fsl_ifc.h>
#include <fsl_sec.h>
#include <spl.h>
+#include <fsl_devdis.h>
#include "../common/sleep.h"
#include "../common/qixis.h"
@@ -531,6 +533,9 @@ int misc_init_r(void)
else if (hwconfig("sdhc"))
config_board_mux(MUX_TYPE_SDHC);
+#ifdef CONFIG_FSL_DEVICE_DISABLE
+ device_disable(devdis_tbl, ARRAY_SIZE(devdis_tbl));
+#endif
#ifdef CONFIG_FSL_CAAM
return sec_init();
#endif
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c
index 006700f..228dbf8 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -12,6 +12,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/fsl_serdes.h>
#include <asm/arch/ls102xa_stream_id.h>
+#include <asm/arch/ls102xa_devdis.h>
#include <hwconfig.h>
#include <mmc.h>
#include <fsl_esdhc.h>
@@ -21,6 +22,7 @@
#include <fsl_mdio.h>
#include <tsec.h>
#include <fsl_sec.h>
+#include <fsl_devdis.h>
#include <spl.h>
#include "../common/sleep.h"
#ifdef CONFIG_U_QE
@@ -652,6 +654,9 @@ int board_init(void)
#if defined(CONFIG_MISC_INIT_R)
int misc_init_r(void)
{
+#ifdef CONFIG_FSL_DEVICE_DISABLE
+ device_disable(devdis_tbl, ARRAY_SIZE(devdis_tbl));
+#endif
#ifndef CONFIG_QSPI_BOOT
config_board_mux();
#endif