aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-10-10 08:27:58 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-11-05 03:55:27 -0500
commit7cb15e10365203bffc5cc75c79725b6c31aa663e (patch)
treee548e9968c70cb189cbb3ac4f292d41f46f467bc /arch/arm
parentf64228ee23975d3703121a3d27dac488c3c813e9 (diff)
pinctrl/nomadik: move the platform data header
This moves the platform data header for the Nomadik pin controller to <linux/platform_data/pinctrl-nomadik.h>. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-nomadik/board-nhk8815.c2
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c2
-rw-r--r--arch/arm/mach-nomadik/i2c-8815nhk.c2
-rw-r--r--arch/arm/mach-ux500/board-mop500-audio.c2
-rw-r--r--arch/arm/mach-ux500/board-mop500-pins.c2
-rw-r--r--arch/arm/mach-ux500/board-mop500.c2
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c4
-rw-r--r--arch/arm/mach-ux500/devices-common.c3
-rw-r--r--arch/arm/plat-nomadik/include/plat/gpio-nomadik.h108
9 files changed, 9 insertions, 118 deletions
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index bfa1eab91f41..3a41ad00bd68 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -24,6 +24,7 @@
24#include <linux/i2c.h> 24#include <linux/i2c.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/pinctrl/machine.h> 26#include <linux/pinctrl/machine.h>
27#include <linux/platform_data/pinctrl-nomadik.h>
27#include <asm/hardware/vic.h> 28#include <asm/hardware/vic.h>
28#include <asm/sizes.h> 29#include <asm/sizes.h>
29#include <asm/mach-types.h> 30#include <asm/mach-types.h>
@@ -32,7 +33,6 @@
32#include <asm/mach/flash.h> 33#include <asm/mach/flash.h>
33#include <asm/mach/time.h> 34#include <asm/mach/time.h>
34 35
35#include <plat/gpio-nomadik.h>
36#include <plat/mtu.h> 36#include <plat/mtu.h>
37#include <plat/pincfg.h> 37#include <plat/pincfg.h>
38 38
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index b617eaed0ce5..1273931303fb 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -26,8 +26,8 @@
26#include <linux/irq.h> 26#include <linux/irq.h>
27#include <linux/dma-mapping.h> 27#include <linux/dma-mapping.h>
28#include <linux/platform_data/clk-nomadik.h> 28#include <linux/platform_data/clk-nomadik.h>
29#include <linux/platform_data/pinctrl-nomadik.h>
29 30
30#include <plat/gpio-nomadik.h>
31#include <mach/hardware.h> 31#include <mach/hardware.h>
32#include <mach/irqs.h> 32#include <mach/irqs.h>
33#include <asm/mach/map.h> 33#include <asm/mach/map.h>
diff --git a/arch/arm/mach-nomadik/i2c-8815nhk.c b/arch/arm/mach-nomadik/i2c-8815nhk.c
index 6d14454d4609..f81496f5790e 100644
--- a/arch/arm/mach-nomadik/i2c-8815nhk.c
+++ b/arch/arm/mach-nomadik/i2c-8815nhk.c
@@ -4,7 +4,7 @@
4#include <linux/i2c-algo-bit.h> 4#include <linux/i2c-algo-bit.h>
5#include <linux/i2c-gpio.h> 5#include <linux/i2c-gpio.h>
6#include <linux/platform_device.h> 6#include <linux/platform_device.h>
7#include <plat/gpio-nomadik.h> 7#include <linux/platform_data/pinctrl-nomadik.h>
8#include <plat/pincfg.h> 8#include <plat/pincfg.h>
9 9
10/* 10/*
diff --git a/arch/arm/mach-ux500/board-mop500-audio.c b/arch/arm/mach-ux500/board-mop500-audio.c
index 070629a95625..ea828cc56357 100644
--- a/arch/arm/mach-ux500/board-mop500-audio.c
+++ b/arch/arm/mach-ux500/board-mop500-audio.c
@@ -7,8 +7,8 @@
7#include <linux/platform_device.h> 7#include <linux/platform_device.h>
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/gpio.h> 9#include <linux/gpio.h>
10#include <linux/platform_data/pinctrl-nomadik.h>
10 11
11#include <plat/gpio-nomadik.h>
12#include <plat/pincfg.h> 12#include <plat/pincfg.h>
13#include <plat/ste_dma40.h> 13#include <plat/ste_dma40.h>
14 14
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c
index a267c6d30e37..05f2bb581130 100644
--- a/arch/arm/mach-ux500/board-mop500-pins.c
+++ b/arch/arm/mach-ux500/board-mop500-pins.c
@@ -9,10 +9,10 @@
9#include <linux/bug.h> 9#include <linux/bug.h>
10#include <linux/string.h> 10#include <linux/string.h>
11#include <linux/pinctrl/machine.h> 11#include <linux/pinctrl/machine.h>
12#include <linux/platform_data/pinctrl-nomadik.h>
12 13
13#include <asm/mach-types.h> 14#include <asm/mach-types.h>
14#include <plat/pincfg.h> 15#include <plat/pincfg.h>
15#include <plat/gpio-nomadik.h>
16 16
17#include <mach/hardware.h> 17#include <mach/hardware.h>
18 18
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 416d436111f2..0a3dd601a400 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -37,13 +37,13 @@
37#include <linux/of_platform.h> 37#include <linux/of_platform.h>
38#include <linux/leds.h> 38#include <linux/leds.h>
39#include <linux/pinctrl/consumer.h> 39#include <linux/pinctrl/consumer.h>
40#include <linux/platform_data/pinctrl-nomadik.h>
40 41
41#include <asm/mach-types.h> 42#include <asm/mach-types.h>
42#include <asm/mach/arch.h> 43#include <asm/mach/arch.h>
43#include <asm/hardware/gic.h> 44#include <asm/hardware/gic.h>
44 45
45#include <plat/ste_dma40.h> 46#include <plat/ste_dma40.h>
46#include <plat/gpio-nomadik.h>
47 47
48#include <mach/hardware.h> 48#include <mach/hardware.h>
49#include <mach/setup.h> 49#include <mach/setup.h>
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index bcdfe6b1d453..87a8f9fbb100 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -17,14 +17,14 @@
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/mfd/abx500/ab8500.h> 19#include <linux/mfd/abx500/ab8500.h>
20#include <linux/platform_data/usb-musb-ux500.h>
21#include <linux/platform_data/pinctrl-nomadik.h>
20 22
21#include <asm/pmu.h> 23#include <asm/pmu.h>
22#include <asm/mach/map.h> 24#include <asm/mach/map.h>
23#include <plat/gpio-nomadik.h>
24#include <mach/hardware.h> 25#include <mach/hardware.h>
25#include <mach/setup.h> 26#include <mach/setup.h>
26#include <mach/devices.h> 27#include <mach/devices.h>
27#include <linux/platform_data/usb-musb-ux500.h>
28#include <mach/db8500-regs.h> 28#include <mach/db8500-regs.h>
29 29
30#include "devices-db8500.h" 30#include "devices-db8500.h"
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c
index dfdd4a54668d..692a77a1c153 100644
--- a/arch/arm/mach-ux500/devices-common.c
+++ b/arch/arm/mach-ux500/devices-common.c
@@ -11,8 +11,7 @@
11#include <linux/irq.h> 11#include <linux/irq.h>
12#include <linux/slab.h> 12#include <linux/slab.h>
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14 14#include <linux/platform_data/pinctrl-nomadik.h>
15#include <plat/gpio-nomadik.h>
16 15
17#include <mach/hardware.h> 16#include <mach/hardware.h>
18 17
diff --git a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h
deleted file mode 100644
index a74999438de4..000000000000
--- a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h
+++ /dev/null
@@ -1,108 +0,0 @@
1/*
2 * Structures and registers for GPIO access in the Nomadik SoC
3 *
4 * Copyright (C) 2008 STMicroelectronics
5 * Author: Prafulla WADASKAR <prafulla.wadaskar@st.com>
6 * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __PLAT_NOMADIK_GPIO
14#define __PLAT_NOMADIK_GPIO
15
16/*
17 * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving
18 * the "gpio" namespace for generic and cross-machine functions
19 */
20
21#define GPIO_BLOCK_SHIFT 5
22#define NMK_GPIO_PER_CHIP (1 << GPIO_BLOCK_SHIFT)
23
24/* Register in the logic block */
25#define NMK_GPIO_DAT 0x00
26#define NMK_GPIO_DATS 0x04
27#define NMK_GPIO_DATC 0x08
28#define NMK_GPIO_PDIS 0x0c
29#define NMK_GPIO_DIR 0x10
30#define NMK_GPIO_DIRS 0x14
31#define NMK_GPIO_DIRC 0x18
32#define NMK_GPIO_SLPC 0x1c
33#define NMK_GPIO_AFSLA 0x20
34#define NMK_GPIO_AFSLB 0x24
35#define NMK_GPIO_LOWEMI 0x28
36
37#define NMK_GPIO_RIMSC 0x40
38#define NMK_GPIO_FIMSC 0x44
39#define NMK_GPIO_IS 0x48
40#define NMK_GPIO_IC 0x4c
41#define NMK_GPIO_RWIMSC 0x50
42#define NMK_GPIO_FWIMSC 0x54
43#define NMK_GPIO_WKS 0x58
44/* These appear in DB8540 and later ASICs */
45#define NMK_GPIO_EDGELEVEL 0x5C
46#define NMK_GPIO_LEVEL 0x60
47
48/* Alternate functions: function C is set in hw by setting both A and B */
49#define NMK_GPIO_ALT_GPIO 0
50#define NMK_GPIO_ALT_A 1
51#define NMK_GPIO_ALT_B 2
52#define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B)
53
54#define NMK_GPIO_ALT_CX_SHIFT 2
55#define NMK_GPIO_ALT_C1 ((1<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
56#define NMK_GPIO_ALT_C2 ((2<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
57#define NMK_GPIO_ALT_C3 ((3<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
58#define NMK_GPIO_ALT_C4 ((4<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
59
60/* Pull up/down values */
61enum nmk_gpio_pull {
62 NMK_GPIO_PULL_NONE,
63 NMK_GPIO_PULL_UP,
64 NMK_GPIO_PULL_DOWN,
65};
66
67/* Sleep mode */
68enum nmk_gpio_slpm {
69 NMK_GPIO_SLPM_INPUT,
70 NMK_GPIO_SLPM_WAKEUP_ENABLE = NMK_GPIO_SLPM_INPUT,
71 NMK_GPIO_SLPM_NOCHANGE,
72 NMK_GPIO_SLPM_WAKEUP_DISABLE = NMK_GPIO_SLPM_NOCHANGE,
73};
74
75extern int nmk_gpio_set_slpm(int gpio, enum nmk_gpio_slpm mode);
76extern int nmk_gpio_set_pull(int gpio, enum nmk_gpio_pull pull);
77#ifdef CONFIG_PINCTRL_NOMADIK
78extern int nmk_gpio_set_mode(int gpio, int gpio_mode);
79#else
80static inline int nmk_gpio_set_mode(int gpio, int gpio_mode)
81{
82 return -ENODEV;
83}
84#endif
85extern int nmk_gpio_get_mode(int gpio);
86
87extern void nmk_gpio_wakeups_suspend(void);
88extern void nmk_gpio_wakeups_resume(void);
89
90extern void nmk_gpio_clocks_enable(void);
91extern void nmk_gpio_clocks_disable(void);
92
93extern void nmk_gpio_read_pull(int gpio_bank, u32 *pull_up);
94
95/*
96 * Platform data to register a block: only the initial gpio/irq number.
97 */
98struct nmk_gpio_platform_data {
99 char *name;
100 int first_gpio;
101 int first_irq;
102 int num_gpio;
103 u32 (*get_secondary_status)(unsigned int bank);
104 void (*set_ioforce)(bool enable);
105 bool supports_sleepmode;
106};
107
108#endif /* __PLAT_NOMADIK_GPIO */