aboutsummaryrefslogtreecommitdiff
path: root/include/linux/vexpress.h
diff options
context:
space:
mode:
authorPawel Moll <pawel.moll@arm.com>2012-09-18 12:24:57 +0100
committerPawel Moll <pawel.moll@arm.com>2012-11-05 17:09:49 +0000
commit88e0abcd7a8171ca7af3402373e7bd81fe9b6754 (patch)
treef7aa8edd71dc9115c634e527b425e14cffc18dd6 /include/linux/vexpress.h
parent3ecbf05be159a95e1d23ba9b3b21c5bc2941ba6b (diff)
downloadvexpress-lsk-88e0abcd7a8171ca7af3402373e7bd81fe9b6754.tar.gz
mfd: Versatile Express system registers driver
This is a platform driver for Versatile Express' "system register" block. It's a random collection of registers providing the following functionality: - low level platform functions like board ID access; in order to use those, the driver must be initialized early, either statically or based on the DT - config bus bridge via "system control" interface; as the response from the controller does not generate interrupt (yet), the status register is periodically polled using a timer - pseudo GPIO lines providing MMC card status and Flash WP# signal control - LED interface for a set of 8 LEDs on the motherboard, with "heartbeat", "mmc0" and "cpu0" to "cpu5" as default triggers Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Diffstat (limited to 'include/linux/vexpress.h')
-rw-r--r--include/linux/vexpress.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h
index c2d877a7b69..09c81d7a22d 100644
--- a/include/linux/vexpress.h
+++ b/include/linux/vexpress.h
@@ -24,6 +24,17 @@
#define VEXPRESS_CONFIG_STATUS_DONE 0
#define VEXPRESS_CONFIG_STATUS_WAIT 1
+#define VEXPRESS_GPIO_MMC_CARDIN 0
+#define VEXPRESS_GPIO_MMC_WPROT 1
+#define VEXPRESS_GPIO_FLASH_WPn 2
+
+#define VEXPRESS_RES_FUNC(_site, _func) \
+{ \
+ .start = (_site), \
+ .end = (_func), \
+ .flags = IORESOURCE_BUS, \
+}
+
/* Config bridge API */
/**
@@ -82,4 +93,18 @@ int vexpress_config_read(struct vexpress_config_func *func, int offset,
int vexpress_config_write(struct vexpress_config_func *func, int offset,
u32 data);
+/* Platform control */
+
+u32 vexpress_get_procid(int site);
+u32 vexpress_get_hbi(int site);
+void *vexpress_get_24mhz_clock_base(void);
+void vexpress_flags_set(u32 data);
+
+#define vexpress_get_site_by_node(node) __vexpress_get_site(NULL, node)
+#define vexpress_get_site_by_dev(dev) __vexpress_get_site(dev, NULL)
+unsigned __vexpress_get_site(struct device *dev, struct device_node *node);
+
+void vexpress_sysreg_early_init(void __iomem *base);
+void vexpress_sysreg_of_early_init(void);
+
#endif