aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-nomadik/include/plat
diff options
context:
space:
mode:
authorJean-Nicolas Graux <jean-nicolas.graux@stericsson.com>2012-09-27 15:38:50 +0200
committerLinus Walleij <linus.walleij@linaro.org>2012-10-10 08:36:59 +0200
commitc22df08c7ffbfb281b0e5dff3fff4e192d1a7863 (patch)
tree0cd3f0a19be0391c4ed14d45f47c6aca34c1a055 /arch/arm/plat-nomadik/include/plat
parentFix staging driver use of VM_RESERVED (diff)
downloadlinux-dev-c22df08c7ffbfb281b0e5dff3fff4e192d1a7863.tar.xz
linux-dev-c22df08c7ffbfb281b0e5dff3fff4e192d1a7863.zip
pinctrl/nomadik: support other alternate-C functions
Upgrade nomadik pinctrl driver to enable selection of other alternate-C[1-4] functions on some specific ux500 SoC pins. Handling of those functions is done thanks to PRCM GPIOCR registers. This was previously managed in PRCMU driver and it was not really convenient. Idea is to provide a common way to control all alternate functions. Note that this improvement does not support the old-fashioned way used to control nomadik pins, namely the "nmk_config_pin()" function and its derivatives. Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@stericsson.com> Reviewed-by: Philippe Langlais <philippe.langlais@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/plat-nomadik/include/plat')
-rw-r--r--arch/arm/plat-nomadik/include/plat/gpio-nomadik.h6
-rw-r--r--arch/arm/plat-nomadik/include/plat/pincfg.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h
index 826de74bfdd1..c08a54d9d889 100644
--- a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h
+++ b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h
@@ -45,6 +45,12 @@
#define NMK_GPIO_ALT_B 2
#define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B)
+#define NMK_GPIO_ALT_CX_SHIFT 2
+#define NMK_GPIO_ALT_C1 ((1<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
+#define NMK_GPIO_ALT_C2 ((2<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
+#define NMK_GPIO_ALT_C3 ((3<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
+#define NMK_GPIO_ALT_C4 ((4<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
+
/* Pull up/down values */
enum nmk_gpio_pull {
NMK_GPIO_PULL_NONE,
diff --git a/arch/arm/plat-nomadik/include/plat/pincfg.h b/arch/arm/plat-nomadik/include/plat/pincfg.h
index 9c949c7c98a7..3b8ec60af351 100644
--- a/arch/arm/plat-nomadik/include/plat/pincfg.h
+++ b/arch/arm/plat-nomadik/include/plat/pincfg.h
@@ -25,6 +25,8 @@
* bit 19..20 - SLPM direction
* bit 21..22 - SLPM Value (if output)
* bit 23..25 - PDIS value (if input)
+ * bit 26 - Gpio mode
+ * bit 27 - Sleep mode
*
* to facilitate the definition, the following macros are provided
*