summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-11-13 22:13:16 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-11-16 15:33:10 +0100
commit7fd15d219f6de3194f177bf72b77bd7fb69d3435 (patch)
tree93483b351d30e48d70617b85b572bdacca087e11 /arch
parentaac938482ffd5ab21fc0c9a772e4920c38defe00 (diff)
downloadbarebox-7fd15d219f6de3194f177bf72b77bd7fb69d3435.tar.gz
barebox-7fd15d219f6de3194f177bf72b77bd7fb69d3435.tar.xz
at91sam9: add detection of low power sdram
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9_sdramc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
index 1ab61e918b..971a7728dc 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
@@ -110,6 +110,11 @@ static inline u32 at91_get_sdram_size(void)
return size;
}
+
+static inline bool at91_is_low_power_sdram(void)
+{
+ return at91_sys_read(AT91_SDRAMC_MDR) & AT91_SDRAMC_MD_LOW_POWER_SDRAM;
+}
#endif
#endif