[PATCH v1 6/8] ARM: at91: Make sdramc.h useable in multi image builds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is no need to ifdef out all the static inlines as the headers
no longer conflicts. Drop the ifdefs so we can now use the header
in multi image builds.

Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
---
 .../mach-at91/include/mach/at91sam9_sdramc.h  | 45 ++-----------------
 1 file changed, 4 insertions(+), 41 deletions(-)

diff --git a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
index c34668d7b..fe76f60b0 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
@@ -177,6 +177,10 @@
 
 #ifndef __ASSEMBLY__
 #include <io.h>
+#include <mach/at91sam9260.h>
+#include <mach/at91sam9261.h>
+#include <mach/at91sam9263.h>
+
 static inline u32 at91_get_sdram_size(void *base)
 {
 	u32 val;
@@ -203,14 +207,11 @@ static inline u32 at91_get_sdram_size(void *base)
 	return size;
 }
 
-
 static inline bool at91_is_low_power_sdram(void *base)
 {
 	return readl(base + AT91_SDRAMC_MDR) & AT91_SDRAMC_MD_LOW_POWER_SDRAM;
 }
 
-#ifdef CONFIG_SOC_AT91SAM9260
-#include <mach/at91sam9260.h>
 static inline u32 at91sam9260_get_sdram_size(void)
 {
 	return at91_get_sdram_size(IOMEM(AT91SAM9260_BASE_SDRAMC));
@@ -220,20 +221,7 @@ static inline bool at91sam9260_is_low_power_sdram(void)
 {
 	return at91_is_low_power_sdram(IOMEM(AT91SAM9260_BASE_SDRAMC));
 }
-#else
-static inline u32 at91sam9260_get_sdram_size(void)
-{
-	return 0;
-}
-
-static inline bool at91sam9260_is_low_power_sdram(void)
-{
-	return false;
-}
-#endif
 
-#ifdef CONFIG_SOC_AT91SAM9261
-#include <mach/at91sam9261.h>
 static inline u32 at91sam9261_get_sdram_size(void)
 {
 	return at91_get_sdram_size(IOMEM(AT91SAM9261_BASE_SDRAMC));
@@ -243,20 +231,7 @@ static inline bool at91sam9261_is_low_power_sdram(void)
 {
 	return at91_is_low_power_sdram(IOMEM(AT91SAM9261_BASE_SDRAMC));
 }
-#else
-static inline u32 at91sam9261_get_sdram_size(void)
-{
-	return 0;
-}
-
-static inline bool at91sam9261_is_low_power_sdram(void)
-{
-	return false;
-}
-#endif
 
-#ifdef CONFIG_SOC_AT91SAM9263
-#include <mach/at91sam9263.h>
 static inline u32 at91sam9263_get_sdram_size(int bank)
 {
 	switch (bank) {
@@ -280,18 +255,6 @@ static inline bool at91sam9263_is_low_power_sdram(int bank)
 		return false;
 	}
 }
-#else
-static inline u32 at91sam9263_get_sdram_size(int bank)
-{
-	return 0;
-}
-
-static inline bool at91sam9263_is_low_power_sdram(void)
-{
-	return false;
-}
-#endif
 
 #endif
-
 #endif
-- 
2.34.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux