diff options
Diffstat (limited to 'arch/arm/mach-omap2/mux.h')
-rw-r--r-- | arch/arm/mach-omap2/mux.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index 76f9b3c2f586..fdb22f14021f 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h | |||
@@ -58,7 +58,8 @@ | |||
58 | #define OMAP_PIN_OFF_INPUT_PULLDOWN (OMAP_OFF_EN | OMAP_OFF_PULL_EN) | 58 | #define OMAP_PIN_OFF_INPUT_PULLDOWN (OMAP_OFF_EN | OMAP_OFF_PULL_EN) |
59 | #define OMAP_PIN_OFF_WAKEUPENABLE OMAP_WAKEUP_EN | 59 | #define OMAP_PIN_OFF_WAKEUPENABLE OMAP_WAKEUP_EN |
60 | 60 | ||
61 | #define OMAP_MODE_GPIO(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE4) | 61 | #define OMAP_MODE_GPIO(partition, x) (((x) & OMAP_MUX_MODE7) == \ |
62 | partition->gpio) | ||
62 | #define OMAP_MODE_UART(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE0) | 63 | #define OMAP_MODE_UART(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE0) |
63 | 64 | ||
64 | /* Flags for omapX_mux_init */ | 65 | /* Flags for omapX_mux_init */ |
@@ -79,13 +80,20 @@ | |||
79 | /* | 80 | /* |
80 | * omap_mux_init flags definition: | 81 | * omap_mux_init flags definition: |
81 | * | 82 | * |
83 | * OMAP_GPIO_MUX_MODE, bits 0-2: gpio muxing mode, same like pad control | ||
84 | * register which includes values from 0-7. | ||
82 | * OMAP_MUX_REG_8BIT: Ensure that access to padconf is done in 8 bits. | 85 | * OMAP_MUX_REG_8BIT: Ensure that access to padconf is done in 8 bits. |
83 | * The default value is 16 bits. | 86 | * The default value is 16 bits. |
84 | * OMAP_MUX_GPIO_IN_MODE3: The GPIO is selected in mode3. | ||
85 | * The default is mode4. | ||
86 | */ | 87 | */ |
87 | #define OMAP_MUX_REG_8BIT (1 << 0) | 88 | #define OMAP_MUX_GPIO_IN_MODE0 OMAP_MUX_MODE0 |
88 | #define OMAP_MUX_GPIO_IN_MODE3 (1 << 1) | 89 | #define OMAP_MUX_GPIO_IN_MODE1 OMAP_MUX_MODE1 |
90 | #define OMAP_MUX_GPIO_IN_MODE2 OMAP_MUX_MODE2 | ||
91 | #define OMAP_MUX_GPIO_IN_MODE3 OMAP_MUX_MODE3 | ||
92 | #define OMAP_MUX_GPIO_IN_MODE4 OMAP_MUX_MODE4 | ||
93 | #define OMAP_MUX_GPIO_IN_MODE5 OMAP_MUX_MODE5 | ||
94 | #define OMAP_MUX_GPIO_IN_MODE6 OMAP_MUX_MODE6 | ||
95 | #define OMAP_MUX_GPIO_IN_MODE7 OMAP_MUX_MODE7 | ||
96 | #define OMAP_MUX_REG_8BIT (1 << 3) | ||
89 | 97 | ||
90 | /** | 98 | /** |
91 | * struct omap_board_data - board specific device data | 99 | * struct omap_board_data - board specific device data |
@@ -105,6 +113,7 @@ struct omap_board_data { | |||
105 | * struct mux_partition - contain partition related information | 113 | * struct mux_partition - contain partition related information |
106 | * @name: name of the current partition | 114 | * @name: name of the current partition |
107 | * @flags: flags specific to this partition | 115 | * @flags: flags specific to this partition |
116 | * @gpio: gpio mux mode | ||
108 | * @phys: physical address | 117 | * @phys: physical address |
109 | * @size: partition size | 118 | * @size: partition size |
110 | * @base: virtual address after ioremap | 119 | * @base: virtual address after ioremap |
@@ -114,6 +123,7 @@ struct omap_board_data { | |||
114 | struct omap_mux_partition { | 123 | struct omap_mux_partition { |
115 | const char *name; | 124 | const char *name; |
116 | u32 flags; | 125 | u32 flags; |
126 | u32 gpio; | ||
117 | u32 phys; | 127 | u32 phys; |
118 | u32 size; | 128 | u32 size; |
119 | void __iomem *base; | 129 | void __iomem *base; |