diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap1/id.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-ldp.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3pandora.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-zoom2.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/cm4xxx.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 65 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/iommu2.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mailbox.c | 33 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 6 | ||||
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/keypad.h | 5 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/mux.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/iovmm.c | 5 |
19 files changed, 145 insertions, 69 deletions
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c index 4ef26faf083e..e5dcdf764c91 100644 --- a/arch/arm/mach-omap1/id.c +++ b/arch/arm/mach-omap1/id.c | |||
@@ -38,7 +38,7 @@ static struct omap_id omap_ids[] __initdata = { | |||
38 | { .jtag_id = 0xb574, .die_rev = 0x2, .omap_id = 0x03310315, .type = 0x03100000}, | 38 | { .jtag_id = 0xb574, .die_rev = 0x2, .omap_id = 0x03310315, .type = 0x03100000}, |
39 | { .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300100}, | 39 | { .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300100}, |
40 | { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300300}, | 40 | { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300300}, |
41 | { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x03320500, .type = 0x08500000}, | 41 | { .jtag_id = 0xb62c, .die_rev = 0x1, .omap_id = 0x03320500, .type = 0x08500000}, |
42 | { .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type = 0x15100000}, | 42 | { .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type = 0x15100000}, |
43 | { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x16100000}, | 43 | { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x16100000}, |
44 | { .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type = 0x16110000}, | 44 | { .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type = 0x16110000}, |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index bd57ec76dc5e..efaf053eba85 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -54,7 +54,7 @@ | |||
54 | 54 | ||
55 | #define TWL4030_MSECURE_GPIO 22 | 55 | #define TWL4030_MSECURE_GPIO 22 |
56 | 56 | ||
57 | static int sdp3430_keymap[] = { | 57 | static int board_keymap[] = { |
58 | KEY(0, 0, KEY_LEFT), | 58 | KEY(0, 0, KEY_LEFT), |
59 | KEY(0, 1, KEY_RIGHT), | 59 | KEY(0, 1, KEY_RIGHT), |
60 | KEY(0, 2, KEY_A), | 60 | KEY(0, 2, KEY_A), |
@@ -88,11 +88,15 @@ static int sdp3430_keymap[] = { | |||
88 | 0 | 88 | 0 |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static struct matrix_keymap_data board_map_data = { | ||
92 | .keymap = board_keymap, | ||
93 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
94 | }; | ||
95 | |||
91 | static struct twl4030_keypad_data sdp3430_kp_data = { | 96 | static struct twl4030_keypad_data sdp3430_kp_data = { |
97 | .keymap_data = &board_map_data, | ||
92 | .rows = 5, | 98 | .rows = 5, |
93 | .cols = 6, | 99 | .cols = 6, |
94 | .keymap = sdp3430_keymap, | ||
95 | .keymapsize = ARRAY_SIZE(sdp3430_keymap), | ||
96 | .rep = 1, | 100 | .rep = 1, |
97 | }; | 101 | }; |
98 | 102 | ||
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index ec6854cbdd9f..d110a7fdfbd8 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -80,7 +80,7 @@ static struct platform_device ldp_smsc911x_device = { | |||
80 | }, | 80 | }, |
81 | }; | 81 | }; |
82 | 82 | ||
83 | static int ldp_twl4030_keymap[] = { | 83 | static int board_keymap[] = { |
84 | KEY(0, 0, KEY_1), | 84 | KEY(0, 0, KEY_1), |
85 | KEY(1, 0, KEY_2), | 85 | KEY(1, 0, KEY_2), |
86 | KEY(2, 0, KEY_3), | 86 | KEY(2, 0, KEY_3), |
@@ -101,11 +101,15 @@ static int ldp_twl4030_keymap[] = { | |||
101 | 0 | 101 | 0 |
102 | }; | 102 | }; |
103 | 103 | ||
104 | static struct matrix_keymap_data board_map_data = { | ||
105 | .keymap = board_keymap, | ||
106 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
107 | }; | ||
108 | |||
104 | static struct twl4030_keypad_data ldp_kp_twl4030_data = { | 109 | static struct twl4030_keypad_data ldp_kp_twl4030_data = { |
110 | .keymap_data = &board_map_data, | ||
105 | .rows = 6, | 111 | .rows = 6, |
106 | .cols = 6, | 112 | .cols = 6, |
107 | .keymap = ldp_twl4030_keymap, | ||
108 | .keymapsize = ARRAY_SIZE(ldp_twl4030_keymap), | ||
109 | .rep = 1, | 113 | .rep = 1, |
110 | }; | 114 | }; |
111 | 115 | ||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 500c9956876d..70df6b4dbcd4 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -139,8 +139,13 @@ static struct gpio_led gpio_leds[]; | |||
139 | static int beagle_twl_gpio_setup(struct device *dev, | 139 | static int beagle_twl_gpio_setup(struct device *dev, |
140 | unsigned gpio, unsigned ngpio) | 140 | unsigned gpio, unsigned ngpio) |
141 | { | 141 | { |
142 | if (system_rev >= 0x20 && system_rev <= 0x34301000) { | ||
143 | omap_cfg_reg(AG9_34XX_GPIO23); | ||
144 | mmc[0].gpio_wp = 23; | ||
145 | } else { | ||
146 | omap_cfg_reg(AH8_34XX_GPIO29); | ||
147 | } | ||
142 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 148 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
143 | omap_cfg_reg(AH8_34XX_GPIO29); | ||
144 | mmc[0].gpio_cd = gpio + 0; | 149 | mmc[0].gpio_cd = gpio + 0; |
145 | twl4030_mmc_init(mmc); | 150 | twl4030_mmc_init(mmc); |
146 | 151 | ||
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index d50b9be90580..e4ec0c591216 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -159,7 +159,7 @@ static struct twl4030_usb_data omap3evm_usb_data = { | |||
159 | .usb_mode = T2_USB_MODE_ULPI, | 159 | .usb_mode = T2_USB_MODE_ULPI, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static int omap3evm_keymap[] = { | 162 | static int board_keymap[] = { |
163 | KEY(0, 0, KEY_LEFT), | 163 | KEY(0, 0, KEY_LEFT), |
164 | KEY(0, 1, KEY_RIGHT), | 164 | KEY(0, 1, KEY_RIGHT), |
165 | KEY(0, 2, KEY_A), | 165 | KEY(0, 2, KEY_A), |
@@ -178,11 +178,15 @@ static int omap3evm_keymap[] = { | |||
178 | KEY(3, 3, KEY_P) | 178 | KEY(3, 3, KEY_P) |
179 | }; | 179 | }; |
180 | 180 | ||
181 | static struct matrix_keymap_data board_map_data = { | ||
182 | .keymap = board_keymap, | ||
183 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
184 | }; | ||
185 | |||
181 | static struct twl4030_keypad_data omap3evm_kp_data = { | 186 | static struct twl4030_keypad_data omap3evm_kp_data = { |
187 | .keymap_data = &board_map_data, | ||
182 | .rows = 4, | 188 | .rows = 4, |
183 | .cols = 4, | 189 | .cols = 4, |
184 | .keymap = omap3evm_keymap, | ||
185 | .keymapsize = ARRAY_SIZE(omap3evm_keymap), | ||
186 | .rep = 1, | 190 | .rep = 1, |
187 | }; | 191 | }; |
188 | 192 | ||
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index b43f6e36b6d9..7f6bf8772af7 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -133,7 +133,7 @@ static void __init pandora_keys_gpio_init(void) | |||
133 | omap_set_gpio_debounce_time(32 * 5, GPIO_DEBOUNCE_TIME); | 133 | omap_set_gpio_debounce_time(32 * 5, GPIO_DEBOUNCE_TIME); |
134 | } | 134 | } |
135 | 135 | ||
136 | static int pandora_keypad_map[] = { | 136 | static int board_keymap[] = { |
137 | /* col, row, code */ | 137 | /* col, row, code */ |
138 | KEY(0, 0, KEY_9), | 138 | KEY(0, 0, KEY_9), |
139 | KEY(0, 1, KEY_0), | 139 | KEY(0, 1, KEY_0), |
@@ -180,11 +180,15 @@ static int pandora_keypad_map[] = { | |||
180 | KEY(5, 2, KEY_FN), | 180 | KEY(5, 2, KEY_FN), |
181 | }; | 181 | }; |
182 | 182 | ||
183 | static struct matrix_keymap_data board_map_data = { | ||
184 | .keymap = board_keymap, | ||
185 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
186 | }; | ||
187 | |||
183 | static struct twl4030_keypad_data pandora_kp_data = { | 188 | static struct twl4030_keypad_data pandora_kp_data = { |
189 | .keymap_data = &board_map_data, | ||
184 | .rows = 8, | 190 | .rows = 8, |
185 | .cols = 6, | 191 | .cols = 6, |
186 | .keymap = pandora_keypad_map, | ||
187 | .keymapsize = ARRAY_SIZE(pandora_keypad_map), | ||
188 | .rep = 1, | 192 | .rep = 1, |
189 | }; | 193 | }; |
190 | 194 | ||
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index e6e8290b7828..b45ad312c587 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #define SYSTEM_REV_B_USES_VAUX3 0x1699 | 36 | #define SYSTEM_REV_B_USES_VAUX3 0x1699 |
37 | #define SYSTEM_REV_S_USES_VAUX3 0x8 | 37 | #define SYSTEM_REV_S_USES_VAUX3 0x8 |
38 | 38 | ||
39 | static int rx51_keymap[] = { | 39 | static int board_keymap[] = { |
40 | KEY(0, 0, KEY_Q), | 40 | KEY(0, 0, KEY_Q), |
41 | KEY(0, 1, KEY_W), | 41 | KEY(0, 1, KEY_W), |
42 | KEY(0, 2, KEY_E), | 42 | KEY(0, 2, KEY_E), |
@@ -83,11 +83,15 @@ static int rx51_keymap[] = { | |||
83 | KEY(0xff, 5, KEY_F10), | 83 | KEY(0xff, 5, KEY_F10), |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static struct matrix_keymap_data board_map_data = { | ||
87 | .keymap = board_keymap, | ||
88 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
89 | }; | ||
90 | |||
86 | static struct twl4030_keypad_data rx51_kp_data = { | 91 | static struct twl4030_keypad_data rx51_kp_data = { |
92 | .keymap_data = &board_map_data, | ||
87 | .rows = 8, | 93 | .rows = 8, |
88 | .cols = 8, | 94 | .cols = 8, |
89 | .keymap = rx51_keymap, | ||
90 | .keymapsize = ARRAY_SIZE(rx51_keymap), | ||
91 | .rep = 1, | 95 | .rep = 1, |
92 | }; | 96 | }; |
93 | 97 | ||
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c index 324009edbd53..b7b32208ced7 100644 --- a/arch/arm/mach-omap2/board-zoom2.c +++ b/arch/arm/mach-omap2/board-zoom2.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "mmc-twl4030.h" | 27 | #include "mmc-twl4030.h" |
28 | 28 | ||
29 | /* Zoom2 has Qwerty keyboard*/ | 29 | /* Zoom2 has Qwerty keyboard*/ |
30 | static int zoom2_twl4030_keymap[] = { | 30 | static int board_keymap[] = { |
31 | KEY(0, 0, KEY_E), | 31 | KEY(0, 0, KEY_E), |
32 | KEY(1, 0, KEY_R), | 32 | KEY(1, 0, KEY_R), |
33 | KEY(2, 0, KEY_T), | 33 | KEY(2, 0, KEY_T), |
@@ -82,11 +82,15 @@ static int zoom2_twl4030_keymap[] = { | |||
82 | 0 | 82 | 0 |
83 | }; | 83 | }; |
84 | 84 | ||
85 | static struct matrix_keymap_data board_map_data = { | ||
86 | .keymap = board_keymap, | ||
87 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
88 | }; | ||
89 | |||
85 | static struct twl4030_keypad_data zoom2_kp_twl4030_data = { | 90 | static struct twl4030_keypad_data zoom2_kp_twl4030_data = { |
91 | .keymap_data = &board_map_data, | ||
86 | .rows = 8, | 92 | .rows = 8, |
87 | .cols = 8, | 93 | .cols = 8, |
88 | .keymap = zoom2_twl4030_keymap, | ||
89 | .keymapsize = ARRAY_SIZE(zoom2_twl4030_keymap), | ||
90 | .rep = 1, | 94 | .rep = 1, |
91 | }; | 95 | }; |
92 | 96 | ||
diff --git a/arch/arm/mach-omap2/cm4xxx.c b/arch/arm/mach-omap2/cm4xxx.c index e4ebd6d53135..4af76bb1003a 100644 --- a/arch/arm/mach-omap2/cm4xxx.c +++ b/arch/arm/mach-omap2/cm4xxx.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <asm/atomic.h> | 22 | #include <asm/atomic.h> |
23 | 23 | ||
24 | #include "cm.h" | 24 | #include "cm.h" |
25 | #include "cm-regbits-4xxx.h" | ||
26 | 25 | ||
27 | /* XXX move this to cm.h */ | 26 | /* XXX move this to cm.h */ |
28 | /* MAX_MODULE_READY_TIME: max milliseconds for module to leave idle */ | 27 | /* MAX_MODULE_READY_TIME: max milliseconds for module to leave idle */ |
@@ -50,19 +49,7 @@ | |||
50 | */ | 49 | */ |
51 | int omap4_cm_wait_idlest_ready(u32 prcm_mod, u8 prcm_dev_offs) | 50 | int omap4_cm_wait_idlest_ready(u32 prcm_mod, u8 prcm_dev_offs) |
52 | { | 51 | { |
53 | int i = 0; | 52 | /* FIXME: Add clock manager related code */ |
54 | u8 cm_id; | 53 | return 0; |
55 | u16 prcm_mod_offs; | ||
56 | u32 mask = OMAP4_PRCM_CM_CLKCTRL_IDLEST_MASK; | ||
57 | |||
58 | cm_id = prcm_mod >> OMAP4_PRCM_MOD_CM_ID_SHIFT; | ||
59 | prcm_mod_offs = prcm_mod & OMAP4_PRCM_MOD_OFFS_MASK; | ||
60 | |||
61 | while (((omap4_cm_read_mod_reg(cm_id, prcm_mod_offs, prcm_dev_offs, | ||
62 | OMAP4_CM_CLKCTRL_DREG) & mask) != 0) && | ||
63 | (i++ < MAX_MODULE_READY_TIME)) | ||
64 | udelay(1); | ||
65 | |||
66 | return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY; | ||
67 | } | 54 | } |
68 | 55 | ||
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index bcfcfc7fdb9b..faf7a1e0c525 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -355,29 +355,60 @@ static struct platform_device omap2_mcspi4 = { | |||
355 | }; | 355 | }; |
356 | #endif | 356 | #endif |
357 | 357 | ||
358 | static void omap_init_mcspi(void) | 358 | #ifdef CONFIG_ARCH_OMAP4 |
359 | static inline void omap4_mcspi_fixup(void) | ||
359 | { | 360 | { |
360 | if (cpu_is_omap44xx()) { | 361 | omap2_mcspi1_resources[0].start = OMAP4_MCSPI1_BASE; |
361 | omap2_mcspi1_resources[0].start = OMAP4_MCSPI1_BASE; | 362 | omap2_mcspi1_resources[0].end = OMAP4_MCSPI1_BASE + 0xff; |
362 | omap2_mcspi1_resources[0].end = OMAP4_MCSPI1_BASE + 0xff; | 363 | omap2_mcspi2_resources[0].start = OMAP4_MCSPI2_BASE; |
363 | omap2_mcspi2_resources[0].start = OMAP4_MCSPI2_BASE; | 364 | omap2_mcspi2_resources[0].end = OMAP4_MCSPI2_BASE + 0xff; |
364 | omap2_mcspi2_resources[0].end = OMAP4_MCSPI2_BASE + 0xff; | 365 | omap2_mcspi3_resources[0].start = OMAP4_MCSPI3_BASE; |
365 | omap2_mcspi3_resources[0].start = OMAP4_MCSPI3_BASE; | 366 | omap2_mcspi3_resources[0].end = OMAP4_MCSPI3_BASE + 0xff; |
366 | omap2_mcspi3_resources[0].end = OMAP4_MCSPI3_BASE + 0xff; | 367 | omap2_mcspi4_resources[0].start = OMAP4_MCSPI4_BASE; |
367 | omap2_mcspi4_resources[0].start = OMAP4_MCSPI4_BASE; | 368 | omap2_mcspi4_resources[0].end = OMAP4_MCSPI4_BASE + 0xff; |
368 | omap2_mcspi4_resources[0].end = OMAP4_MCSPI4_BASE + 0xff; | 369 | } |
369 | } | 370 | #else |
370 | platform_device_register(&omap2_mcspi1); | 371 | static inline void omap4_mcspi_fixup(void) |
371 | platform_device_register(&omap2_mcspi2); | 372 | { |
373 | } | ||
374 | #endif | ||
375 | |||
372 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \ | 376 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \ |
373 | defined(CONFIG_ARCH_OMAP4) | 377 | defined(CONFIG_ARCH_OMAP4) |
374 | if (cpu_is_omap2430() || cpu_is_omap343x() || cpu_is_omap44xx()) | 378 | static inline void omap2_mcspi3_init(void) |
375 | platform_device_register(&omap2_mcspi3); | 379 | { |
380 | platform_device_register(&omap2_mcspi3); | ||
381 | } | ||
382 | #else | ||
383 | static inline void omap2_mcspi3_init(void) | ||
384 | { | ||
385 | } | ||
376 | #endif | 386 | #endif |
387 | |||
377 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | 388 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) |
378 | if (cpu_is_omap343x() || cpu_is_omap44xx()) | 389 | static inline void omap2_mcspi4_init(void) |
379 | platform_device_register(&omap2_mcspi4); | 390 | { |
391 | platform_device_register(&omap2_mcspi4); | ||
392 | } | ||
393 | #else | ||
394 | static inline void omap2_mcspi4_init(void) | ||
395 | { | ||
396 | } | ||
380 | #endif | 397 | #endif |
398 | |||
399 | static void omap_init_mcspi(void) | ||
400 | { | ||
401 | if (cpu_is_omap44xx()) | ||
402 | omap4_mcspi_fixup(); | ||
403 | |||
404 | platform_device_register(&omap2_mcspi1); | ||
405 | platform_device_register(&omap2_mcspi2); | ||
406 | |||
407 | if (cpu_is_omap2430() || cpu_is_omap343x() || cpu_is_omap44xx()) | ||
408 | omap2_mcspi3_init(); | ||
409 | |||
410 | if (cpu_is_omap343x() || cpu_is_omap44xx()) | ||
411 | omap2_mcspi4_init(); | ||
381 | } | 412 | } |
382 | 413 | ||
383 | #else | 414 | #else |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 7574b6f20e8e..e3a3bad1d84f 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -294,10 +294,10 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, | |||
294 | else if (cpu_is_omap34xx()) | 294 | else if (cpu_is_omap34xx()) |
295 | hwmods = omap34xx_hwmods; | 295 | hwmods = omap34xx_hwmods; |
296 | 296 | ||
297 | omap_hwmod_init(hwmods); | ||
298 | omap2_mux_init(); | ||
299 | #ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */ | 297 | #ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */ |
300 | /* The OPP tables have to be registered before a clk init */ | 298 | /* The OPP tables have to be registered before a clk init */ |
299 | omap_hwmod_init(hwmods); | ||
300 | omap2_mux_init(); | ||
301 | omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); | 301 | omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); |
302 | pwrdm_init(powerdomains_omap); | 302 | pwrdm_init(powerdomains_omap); |
303 | clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps); | 303 | clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps); |
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index 2d9b5cc981cd..4a0e1cd5c1f4 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c | |||
@@ -79,7 +79,7 @@ static int omap2_iommu_enable(struct iommu *obj) | |||
79 | l = iommu_read_reg(obj, MMU_SYSSTATUS); | 79 | l = iommu_read_reg(obj, MMU_SYSSTATUS); |
80 | if (l & MMU_SYS_RESETDONE) | 80 | if (l & MMU_SYS_RESETDONE) |
81 | break; | 81 | break; |
82 | } while (time_after(jiffies, timeout)); | 82 | } while (!time_after(jiffies, timeout)); |
83 | 83 | ||
84 | if (!(l & MMU_SYS_RESETDONE)) { | 84 | if (!(l & MMU_SYS_RESETDONE)) { |
85 | dev_err(obj->dev, "can't take mmu out of reset\n"); | 85 | dev_err(obj->dev, "can't take mmu out of reset\n"); |
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 6f71f3730c97..c035ad3426d0 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c | |||
@@ -30,6 +30,14 @@ | |||
30 | #define MAILBOX_IRQ_NEWMSG(u) (1 << (2 * (u))) | 30 | #define MAILBOX_IRQ_NEWMSG(u) (1 << (2 * (u))) |
31 | #define MAILBOX_IRQ_NOTFULL(u) (1 << (2 * (u) + 1)) | 31 | #define MAILBOX_IRQ_NOTFULL(u) (1 << (2 * (u) + 1)) |
32 | 32 | ||
33 | /* SYSCONFIG: register bit definition */ | ||
34 | #define AUTOIDLE (1 << 0) | ||
35 | #define SOFTRESET (1 << 1) | ||
36 | #define SMARTIDLE (2 << 3) | ||
37 | |||
38 | /* SYSSTATUS: register bit definition */ | ||
39 | #define RESETDONE (1 << 0) | ||
40 | |||
33 | #define MBOX_REG_SIZE 0x120 | 41 | #define MBOX_REG_SIZE 0x120 |
34 | #define MBOX_NR_REGS (MBOX_REG_SIZE / sizeof(u32)) | 42 | #define MBOX_NR_REGS (MBOX_REG_SIZE / sizeof(u32)) |
35 | 43 | ||
@@ -69,21 +77,33 @@ static inline void mbox_write_reg(u32 val, size_t ofs) | |||
69 | /* Mailbox H/W preparations */ | 77 | /* Mailbox H/W preparations */ |
70 | static int omap2_mbox_startup(struct omap_mbox *mbox) | 78 | static int omap2_mbox_startup(struct omap_mbox *mbox) |
71 | { | 79 | { |
72 | unsigned int l; | 80 | u32 l; |
81 | unsigned long timeout; | ||
73 | 82 | ||
74 | mbox_ick_handle = clk_get(NULL, "mailboxes_ick"); | 83 | mbox_ick_handle = clk_get(NULL, "mailboxes_ick"); |
75 | if (IS_ERR(mbox_ick_handle)) { | 84 | if (IS_ERR(mbox_ick_handle)) { |
76 | printk("Could not get mailboxes_ick\n"); | 85 | pr_err("Can't get mailboxes_ick\n"); |
77 | return -ENODEV; | 86 | return -ENODEV; |
78 | } | 87 | } |
79 | clk_enable(mbox_ick_handle); | 88 | clk_enable(mbox_ick_handle); |
80 | 89 | ||
90 | mbox_write_reg(SOFTRESET, MAILBOX_SYSCONFIG); | ||
91 | timeout = jiffies + msecs_to_jiffies(20); | ||
92 | do { | ||
93 | l = mbox_read_reg(MAILBOX_SYSSTATUS); | ||
94 | if (l & RESETDONE) | ||
95 | break; | ||
96 | } while (!time_after(jiffies, timeout)); | ||
97 | |||
98 | if (!(l & RESETDONE)) { | ||
99 | pr_err("Can't take mmu out of reset\n"); | ||
100 | return -ENODEV; | ||
101 | } | ||
102 | |||
81 | l = mbox_read_reg(MAILBOX_REVISION); | 103 | l = mbox_read_reg(MAILBOX_REVISION); |
82 | pr_info("omap mailbox rev %d.%d\n", (l & 0xf0) >> 4, (l & 0x0f)); | 104 | pr_info("omap mailbox rev %d.%d\n", (l & 0xf0) >> 4, (l & 0x0f)); |
83 | 105 | ||
84 | /* set smart-idle & autoidle */ | 106 | l = SMARTIDLE | AUTOIDLE; |
85 | l = mbox_read_reg(MAILBOX_SYSCONFIG); | ||
86 | l |= 0x00000011; | ||
87 | mbox_write_reg(l, MAILBOX_SYSCONFIG); | 107 | mbox_write_reg(l, MAILBOX_SYSCONFIG); |
88 | 108 | ||
89 | omap2_mbox_enable_irq(mbox, IRQ_RX); | 109 | omap2_mbox_enable_irq(mbox, IRQ_RX); |
@@ -156,6 +176,9 @@ static void omap2_mbox_ack_irq(struct omap_mbox *mbox, | |||
156 | u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit; | 176 | u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit; |
157 | 177 | ||
158 | mbox_write_reg(bit, p->irqstatus); | 178 | mbox_write_reg(bit, p->irqstatus); |
179 | |||
180 | /* Flush posted write for irq status to avoid spurious interrupts */ | ||
181 | mbox_read_reg(p->irqstatus); | ||
159 | } | 182 | } |
160 | 183 | ||
161 | static int omap2_mbox_is_irq(struct omap_mbox *mbox, | 184 | static int omap2_mbox_is_irq(struct omap_mbox *mbox, |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 2daa595aaff4..b5fac32aae70 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -460,6 +460,8 @@ MUX_CFG_34XX("AF26_34XX_GPIO0", 0x1e0, | |||
460 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | 460 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) |
461 | MUX_CFG_34XX("AF22_34XX_GPIO9", 0xa18, | 461 | MUX_CFG_34XX("AF22_34XX_GPIO9", 0xa18, |
462 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | 462 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) |
463 | MUX_CFG_34XX("AG9_34XX_GPIO23", 0x5ee, | ||
464 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
463 | MUX_CFG_34XX("AH8_34XX_GPIO29", 0x5fa, | 465 | MUX_CFG_34XX("AH8_34XX_GPIO29", 0x5fa, |
464 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | 466 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) |
465 | MUX_CFG_34XX("U8_34XX_GPIO54_OUT", 0x0b4, | 467 | MUX_CFG_34XX("U8_34XX_GPIO54_OUT", 0x0b4, |
@@ -472,6 +474,8 @@ MUX_CFG_34XX("G25_34XX_GPIO86_OUT", 0x0fc, | |||
472 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | 474 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) |
473 | MUX_CFG_34XX("AG4_34XX_GPIO134_OUT", 0x160, | 475 | MUX_CFG_34XX("AG4_34XX_GPIO134_OUT", 0x160, |
474 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | 476 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) |
477 | MUX_CFG_34XX("AF4_34XX_GPIO135_OUT", 0x162, | ||
478 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
475 | MUX_CFG_34XX("AE4_34XX_GPIO136_OUT", 0x164, | 479 | MUX_CFG_34XX("AE4_34XX_GPIO136_OUT", 0x164, |
476 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | 480 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) |
477 | MUX_CFG_34XX("AF6_34XX_GPIO140_UP", 0x16c, | 481 | MUX_CFG_34XX("AF6_34XX_GPIO140_UP", 0x16c, |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 3a529c77daa8..ae2186892c85 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -110,7 +110,7 @@ static struct plat_serial8250_port serial_platform_data2[] = { | |||
110 | .uartclk = OMAP24XX_BASE_BAUD * 16, | 110 | .uartclk = OMAP24XX_BASE_BAUD * 16, |
111 | }, { | 111 | }, { |
112 | #ifdef CONFIG_ARCH_OMAP4 | 112 | #ifdef CONFIG_ARCH_OMAP4 |
113 | .membase = IO_ADDRESS(OMAP_UART4_BASE), | 113 | .membase = OMAP2_IO_ADDRESS(OMAP_UART4_BASE), |
114 | .mapbase = OMAP_UART4_BASE, | 114 | .mapbase = OMAP_UART4_BASE, |
115 | .irq = 70, | 115 | .irq = 70, |
116 | .flags = UPF_BOOT_AUTOCONF, | 116 | .flags = UPF_BOOT_AUTOCONF, |
@@ -126,7 +126,7 @@ static struct plat_serial8250_port serial_platform_data2[] = { | |||
126 | #ifdef CONFIG_ARCH_OMAP4 | 126 | #ifdef CONFIG_ARCH_OMAP4 |
127 | static struct plat_serial8250_port serial_platform_data3[] = { | 127 | static struct plat_serial8250_port serial_platform_data3[] = { |
128 | { | 128 | { |
129 | .membase = IO_ADDRESS(OMAP_UART4_BASE), | 129 | .membase = OMAP2_IO_ADDRESS(OMAP_UART4_BASE), |
130 | .mapbase = OMAP_UART4_BASE, | 130 | .mapbase = OMAP_UART4_BASE, |
131 | .irq = 70, | 131 | .irq = 70, |
132 | .flags = UPF_BOOT_AUTOCONF, | 132 | .flags = UPF_BOOT_AUTOCONF, |
@@ -579,7 +579,7 @@ static struct omap_uart_state omap_uart[OMAP_MAX_NR_PORTS] = { | |||
579 | { | 579 | { |
580 | .pdev = { | 580 | .pdev = { |
581 | .name = "serial8250", | 581 | .name = "serial8250", |
582 | .id = 3 | 582 | .id = 3, |
583 | .dev = { | 583 | .dev = { |
584 | .platform_data = serial_platform_data3, | 584 | .platform_data = serial_platform_data3, |
585 | }, | 585 | }, |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 693839c89ad0..71ebd7fcfea1 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -250,7 +250,7 @@ static struct gpio_bank gpio_bank_730[7] = { | |||
250 | 250 | ||
251 | #ifdef CONFIG_ARCH_OMAP850 | 251 | #ifdef CONFIG_ARCH_OMAP850 |
252 | static struct gpio_bank gpio_bank_850[7] = { | 252 | static struct gpio_bank gpio_bank_850[7] = { |
253 | { OMAP1_MPUIO_BASE, INT_850_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO }, | 253 | { OMAP1_MPUIO_VBASE, INT_850_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO }, |
254 | { OMAP850_GPIO1_BASE, INT_850_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_850 }, | 254 | { OMAP850_GPIO1_BASE, INT_850_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_850 }, |
255 | { OMAP850_GPIO2_BASE, INT_850_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_850 }, | 255 | { OMAP850_GPIO2_BASE, INT_850_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_850 }, |
256 | { OMAP850_GPIO3_BASE, INT_850_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_850 }, | 256 | { OMAP850_GPIO3_BASE, INT_850_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_850 }, |
diff --git a/arch/arm/plat-omap/include/mach/keypad.h b/arch/arm/plat-omap/include/mach/keypad.h index 45ea3ae3c995..d91b9be334ff 100644 --- a/arch/arm/plat-omap/include/mach/keypad.h +++ b/arch/arm/plat-omap/include/mach/keypad.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #ifndef ASMARM_ARCH_KEYPAD_H | 10 | #ifndef ASMARM_ARCH_KEYPAD_H |
11 | #define ASMARM_ARCH_KEYPAD_H | 11 | #define ASMARM_ARCH_KEYPAD_H |
12 | 12 | ||
13 | #include <linux/input/matrix_keypad.h> | ||
14 | |||
13 | struct omap_kp_platform_data { | 15 | struct omap_kp_platform_data { |
14 | int rows; | 16 | int rows; |
15 | int cols; | 17 | int cols; |
@@ -35,9 +37,6 @@ struct omap_kp_platform_data { | |||
35 | 37 | ||
36 | #define KEY_PERSISTENT 0x00800000 | 38 | #define KEY_PERSISTENT 0x00800000 |
37 | #define KEYNUM_MASK 0x00EFFFFF | 39 | #define KEYNUM_MASK 0x00EFFFFF |
38 | #define KEY(col, row, val) (((col) << 28) | ((row) << 24) | (val)) | ||
39 | #define PERSISTENT_KEY(col, row) (((col) << 28) | ((row) << 24) | \ | ||
40 | KEY_PERSISTENT) | ||
41 | 40 | ||
42 | #endif | 41 | #endif |
43 | 42 | ||
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h index 98dfab651dfc..0f49d2d563d9 100644 --- a/arch/arm/plat-omap/include/mach/mux.h +++ b/arch/arm/plat-omap/include/mach/mux.h | |||
@@ -840,12 +840,14 @@ enum omap34xx_index { | |||
840 | */ | 840 | */ |
841 | AF26_34XX_GPIO0, | 841 | AF26_34XX_GPIO0, |
842 | AF22_34XX_GPIO9, | 842 | AF22_34XX_GPIO9, |
843 | AG9_34XX_GPIO23, | ||
843 | AH8_34XX_GPIO29, | 844 | AH8_34XX_GPIO29, |
844 | U8_34XX_GPIO54_OUT, | 845 | U8_34XX_GPIO54_OUT, |
845 | U8_34XX_GPIO54_DOWN, | 846 | U8_34XX_GPIO54_DOWN, |
846 | L8_34XX_GPIO63, | 847 | L8_34XX_GPIO63, |
847 | G25_34XX_GPIO86_OUT, | 848 | G25_34XX_GPIO86_OUT, |
848 | AG4_34XX_GPIO134_OUT, | 849 | AG4_34XX_GPIO134_OUT, |
850 | AF4_34XX_GPIO135_OUT, | ||
849 | AE4_34XX_GPIO136_OUT, | 851 | AE4_34XX_GPIO136_OUT, |
850 | AF6_34XX_GPIO140_UP, | 852 | AF6_34XX_GPIO140_UP, |
851 | AE6_34XX_GPIO141, | 853 | AE6_34XX_GPIO141, |
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c index 6fc52fcbdc03..57f7122a0919 100644 --- a/arch/arm/plat-omap/iovmm.c +++ b/arch/arm/plat-omap/iovmm.c | |||
@@ -199,7 +199,8 @@ static void *vmap_sg(const struct sg_table *sgt) | |||
199 | va += bytes; | 199 | va += bytes; |
200 | } | 200 | } |
201 | 201 | ||
202 | flush_cache_vmap(new->addr, new->addr + total); | 202 | flush_cache_vmap((unsigned long)new->addr, |
203 | (unsigned long)(new->addr + total)); | ||
203 | return new->addr; | 204 | return new->addr; |
204 | 205 | ||
205 | err_out: | 206 | err_out: |
@@ -390,7 +391,7 @@ static void sgtable_fill_vmalloc(struct sg_table *sgt, void *_va) | |||
390 | } | 391 | } |
391 | 392 | ||
392 | va_end = _va + PAGE_SIZE * i; | 393 | va_end = _va + PAGE_SIZE * i; |
393 | flush_cache_vmap(_va, va_end); | 394 | flush_cache_vmap((unsigned long)_va, (unsigned long)va_end); |
394 | } | 395 | } |
395 | 396 | ||
396 | static inline void sgtable_drain_vmalloc(struct sg_table *sgt) | 397 | static inline void sgtable_drain_vmalloc(struct sg_table *sgt) |