public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eugen.Hristev at microchip.com <Eugen.Hristev@microchip.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/7] ARM: at91: sfr: convert to Kconfig
Date: Thu, 8 Aug 2019 07:48:28 +0000	[thread overview]
Message-ID: <1565250163-21502-3-git-send-email-eugen.hristev@microchip.com> (raw)
In-Reply-To: <1565250163-21502-1-git-send-email-eugen.hristev@microchip.com>

From: Eugen Hristev <eugen.hristev@microchip.com>

This converts the at91 sfr to Kconfig

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
 arch/arm/mach-at91/Kconfig     | 9 ++++++++-
 arch/arm/mach-at91/Makefile    | 5 +++--
 arch/arm/mach-at91/atmel_sfr.c | 3 +++
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 24994d4..ad09731 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -46,6 +46,7 @@ config AT91SAM9X5
 config SAMA5D2
 	bool
 	select CPU_V7A
+	select ATMEL_SFR
 
 config SAMA5D3
 	bool
@@ -54,6 +55,7 @@ config SAMA5D3
 config SAMA5D4
 	bool
 	select CPU_V7A
+	select ATMEL_SFR
 
 choice
 	prompt "Atmel AT91 board select"
@@ -173,6 +175,7 @@ config TARGET_SAMA5D27_SOM1_EK
 	select BOARD_LATE_INIT
 	select CPU_V7A
 	select SUPPORT_SPL
+	select ATMEL_SFR
 	help
 	  The SAMA5D27 SOM1 embeds SAMA5D2 SiP(System in Package),
 	  a 64Mbit QSPI flash, KSZ8081 Phy and a Mac-address EEPROM
@@ -196,7 +199,7 @@ config TARGET_SAMA5D27_WLSOM1_EK
 
 config TARGET_SAMA5D2_ICP
 	bool "SAMA5D2 Industrial Connectivity Platform (ICP)"
-	select CPU_V7A
+	select SAMA5D2
 	select SUPPORT_SPL
 	select BOARD_EARLY_INIT_F
 	select BOARD_LATE_INIT
@@ -292,6 +295,10 @@ config TARGET_WB50N
 
 endchoice
 
+config ATMEL_SFR
+	bool
+	default n
+
 config SYS_SOC
 	default "at91"
 
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index 045ac88..cbd0ed6 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -7,10 +7,11 @@ obj-$(CONFIG_AT91SAM9G20) += sdram.o spl_at91.o
 obj-$(CONFIG_AT91SAM9M10G45) += mpddrc.o spl_at91.o
 obj-$(CONFIG_AT91SAM9N12) += mpddrc.o spl_at91.o
 obj-$(CONFIG_AT91SAM9X5) += mpddrc.o spl_at91.o
-obj-$(CONFIG_SAMA5D2) += bootparams_atmel.o mpddrc.o spl_atmel.o matrix.o atmel_sfr.o
+obj-$(CONFIG_SAMA5D2) += bootparams_atmel.o mpddrc.o spl_atmel.o matrix.o
 obj-$(CONFIG_SAMA5D3) += bootparams_atmel.o mpddrc.o spl_atmel.o
-obj-$(CONFIG_SAMA5D4) += bootparams_atmel.o mpddrc.o spl_atmel.o matrix.o atmel_sfr.o
+obj-$(CONFIG_SAMA5D4) += bootparams_atmel.o mpddrc.o spl_atmel.o matrix.o
 obj-y += spl.o
+obj-$(CONFIG_ATMEL_SFR) += atmel_sfr.o
 endif
 
 obj-y += clock.o
diff --git a/arch/arm/mach-at91/atmel_sfr.c b/arch/arm/mach-at91/atmel_sfr.c
index 2225115..07bd8ab 100644
--- a/arch/arm/mach-at91/atmel_sfr.c
+++ b/arch/arm/mach-at91/atmel_sfr.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/sama5_sfr.h>
 
+#if defined(CONFIG_SAMA5D2) || defined(CONFIG_SAMA5D4)
 void redirect_int_from_saic_to_aic(void)
 {
 	struct atmel_sfr *sfr = (struct atmel_sfr *)ATMEL_BASE_SFR;
@@ -26,3 +27,5 @@ void configure_2nd_sram_as_l2_cache(void)
 
 	writel(1, &sfr->l2cc_hramc);
 }
+#endif
+
-- 
2.7.4

  parent reply	other threads:[~2019-08-08  7:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08  7:48 [U-Boot] [PATCH 1/7] ARM: at91: Add the chip ID for SAMA5D2 LPDDR2 SiP Eugen.Hristev at microchip.com
2019-08-08  7:48 ` [U-Boot] [PATCH 2/7] board: atmel: add sama5d27_wlsom1_ek board Eugen.Hristev at microchip.com
2019-08-08  7:48 ` Eugen.Hristev at microchip.com [this message]
2019-08-08  7:48 ` [U-Boot] [PATCH 4/7] ARM: at91: sfr: implement DDR input buffers open function Eugen.Hristev at microchip.com
2019-08-08  7:48 ` [U-Boot] [PATCH 5/7] board: laird: wb50n: use configure_ddrcfg_input_buffers Eugen.Hristev at microchip.com
2019-08-08  7:48 ` [U-Boot] [PATCH 6/7] ARM: at91: mpddrc: add lpddr2 initialization procedure Eugen.Hristev at microchip.com
2019-08-08  7:48 ` [U-Boot] [PATCH 7/7] board: atmel: sama5d2_wlsom1_ek: add SPL support Eugen.Hristev at microchip.com
2019-08-26 11:43 ` [U-Boot] [PATCH 1/7] ARM: at91: Add the chip ID for SAMA5D2 LPDDR2 SiP Eugen.Hristev at microchip.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1565250163-21502-3-git-send-email-eugen.hristev@microchip.com \
    --to=eugen.hristev@microchip.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox