diff options
author | Jean-Nicolas Graux <jean-nicolas.graux@stericsson.com> | 2012-09-27 09:38:50 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-10-10 02:36:59 -0400 |
commit | c22df08c7ffbfb281b0e5dff3fff4e192d1a7863 (patch) | |
tree | 0cd3f0a19be0391c4ed14d45f47c6aca34c1a055 /arch/arm/plat-nomadik | |
parent | 547b1e81afe3119f7daf702cc03b158495535a25 (diff) |
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')
-rw-r--r-- | arch/arm/plat-nomadik/include/plat/gpio-nomadik.h | 6 | ||||
-rw-r--r-- | arch/arm/plat-nomadik/include/plat/pincfg.h | 2 |
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 @@ | |||
45 | #define NMK_GPIO_ALT_B 2 | 45 | #define NMK_GPIO_ALT_B 2 |
46 | #define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) | 46 | #define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) |
47 | 47 | ||
48 | #define NMK_GPIO_ALT_CX_SHIFT 2 | ||
49 | #define NMK_GPIO_ALT_C1 ((1<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
50 | #define NMK_GPIO_ALT_C2 ((2<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
51 | #define NMK_GPIO_ALT_C3 ((3<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
52 | #define NMK_GPIO_ALT_C4 ((4<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
53 | |||
48 | /* Pull up/down values */ | 54 | /* Pull up/down values */ |
49 | enum nmk_gpio_pull { | 55 | enum nmk_gpio_pull { |
50 | NMK_GPIO_PULL_NONE, | 56 | 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 @@ | |||
25 | * bit 19..20 - SLPM direction | 25 | * bit 19..20 - SLPM direction |
26 | * bit 21..22 - SLPM Value (if output) | 26 | * bit 21..22 - SLPM Value (if output) |
27 | * bit 23..25 - PDIS value (if input) | 27 | * bit 23..25 - PDIS value (if input) |
28 | * bit 26 - Gpio mode | ||
29 | * bit 27 - Sleep mode | ||
28 | * | 30 | * |
29 | * to facilitate the definition, the following macros are provided | 31 | * to facilitate the definition, the following macros are provided |
30 | * | 32 | * |