summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/include/mach/at91sam9_smc.h
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-11-27 19:29:57 +0800
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-02-13 18:31:36 +0100
commit59594e13e4d83239332746395fe03ba49b8efa12 (patch)
treea60e58e60039d413b5ac73ffa64d699913f17d33 /arch/arm/mach-at91/include/mach/at91sam9_smc.h
parent2dcc90e6ac06d78433aec682961d9b587a07d4b5 (diff)
downloadblackbird-obmc-linux-59594e13e4d83239332746395fe03ba49b8efa12.tar.gz
blackbird-obmc-linux-59594e13e4d83239332746395fe03ba49b8efa12.zip
ARM: at91: add accessor to manage SMC
SMC, Static Memory Controller will need more accessors to fine configure its parameters. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/include/mach/at91sam9_smc.h')
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9_smc.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_smc.h b/arch/arm/mach-at91/include/mach/at91sam9_smc.h
index eb18a70fa647..175e1fdd9fe8 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9_smc.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9_smc.h
@@ -18,6 +18,35 @@
#include <mach/cpu.h>
+#ifndef __ASSEMBLY__
+struct sam9_smc_config {
+ /* Setup register */
+ u8 ncs_read_setup;
+ u8 nrd_setup;
+ u8 ncs_write_setup;
+ u8 nwe_setup;
+
+ /* Pulse register */
+ u8 ncs_read_pulse;
+ u8 nrd_pulse;
+ u8 ncs_write_pulse;
+ u8 nwe_pulse;
+
+ /* Cycle register */
+ u16 read_cycle;
+ u16 write_cycle;
+
+ /* Mode register */
+ u32 mode;
+ u8 tdf_cycles:4;
+};
+
+extern void sam9_smc_configure(int id, int cs, struct sam9_smc_config *config);
+extern void sam9_smc_read(int id, int cs, struct sam9_smc_config *config);
+extern void sam9_smc_read_mode(int id, int cs, struct sam9_smc_config *config);
+extern void sam9_smc_write_mode(int id, int cs, struct sam9_smc_config *config);
+#endif
+
#define AT91_SMC_SETUP 0x00 /* Setup Register for CS n */
#define AT91_SMC_NWESETUP (0x3f << 0) /* NWE Setup Length */
#define AT91_SMC_NWESETUP_(x) ((x) << 0)
OpenPOWER on IntegriCloud