diff mbox series

[U-Boot,2/2] mx31: Convert MX31_HCLK_FREQ and MX31_CLK32 to Kconfig.

Message ID 20180511120655.3862-3-lilja.magnus@gmail.com
State Accepted
Commit 71720d67933bc0e5c64480397c3554663f7b9ff4
Delegated to: Stefano Babic
Headers show
Series i.MX31PDK: Move CONFIG_MX31* to Kconfig | expand

Commit Message

Magnus Lilja May 11, 2018, 12:06 p.m. UTC
Also remove the #ifdef's from clock.h since the Kconfig values defaults
the to old default values in clock.h.

Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
---
 arch/arm/include/asm/arch-mx31/clock.h |  8 --------
 arch/arm/mach-imx/mx3/Kconfig          | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 8 deletions(-)

Comments

Tom Rini May 11, 2018, 7:22 p.m. UTC | #1
On Fri, May 11, 2018 at 02:06:55PM +0200, Magnus Lilja wrote:

> Also remove the #ifdef's from clock.h since the Kconfig values defaults
> the to old default values in clock.h.
> 
> Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox series

Patch

diff --git a/arch/arm/include/asm/arch-mx31/clock.h b/arch/arm/include/asm/arch-mx31/clock.h
index e340db42fa..aafc2d690e 100644
--- a/arch/arm/include/asm/arch-mx31/clock.h
+++ b/arch/arm/include/asm/arch-mx31/clock.h
@@ -9,17 +9,9 @@ 
 
 #include <common.h>
 
-#ifdef CONFIG_MX31_HCLK_FREQ
 #define MXC_HCLK	CONFIG_MX31_HCLK_FREQ
-#else
-#define MXC_HCLK	26000000
-#endif
 
-#ifdef CONFIG_MX31_CLK32
 #define MXC_CLK32	CONFIG_MX31_CLK32
-#else
-#define MXC_CLK32	32768
-#endif
 
 enum mxc_clock {
 	MXC_ARM_CLK,
diff --git a/arch/arm/mach-imx/mx3/Kconfig b/arch/arm/mach-imx/mx3/Kconfig
index bf6a1c6927..6cc970fc49 100644
--- a/arch/arm/mach-imx/mx3/Kconfig
+++ b/arch/arm/mach-imx/mx3/Kconfig
@@ -15,6 +15,20 @@  config TARGET_MX31PDK
 
 endchoice
 
+config MX31_HCLK_FREQ
+       int "i.MX31 HCLK frequency"
+       default 26000000
+       help
+         Frequency in Hz of the high frequency input clock. Typically
+	 26000000 Hz.
+
+config MX31_CLK32
+       int "i.MX31 CLK32 Frequency"
+       default 32768
+       help
+         Frequency in Hz of the low frequency input clock. Typically
+	 32768 or 32000 Hz.
+
 source "board/freescale/mx31pdk/Kconfig"
 
 endif