diff options
| -rw-r--r-- | arch/arm/mach-omap1/clock_data.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/devices.c | 35 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/mux.c | 8 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/Kconfig | 1 | ||||
| -rwxr-xr-x | arch/arm/mach-omap2/board-zoom-peripherals.c | 8 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/mux.c | 6 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/serial.c | 12 | ||||
| -rw-r--r-- | arch/arm/plat-omap/gpio.c | 63 | ||||
| -rw-r--r-- | arch/arm/plat-omap/include/plat/board.h | 1 | ||||
| -rw-r--r-- | arch/arm/plat-omap/include/plat/control.h | 2 | ||||
| -rw-r--r-- | arch/arm/plat-omap/include/plat/mux.h | 8 | ||||
| -rw-r--r-- | arch/arm/plat-omap/include/plat/omap7xx.h | 3 | ||||
| -rw-r--r-- | arch/arm/plat-omap/iommu.c | 2 | ||||
| -rw-r--r-- | arch/arm/plat-omap/mcbsp.c | 20 | ||||
| -rw-r--r-- | drivers/video/backlight/omap1_bl.c | 2 |
16 files changed, 159 insertions, 20 deletions
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c index 8a85bbb6bb00..65e7b5b85d83 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c | |||
| @@ -658,6 +658,10 @@ static struct omap_clk omap_clks[] = { | |||
| 658 | CLK("i2c_omap.1", "fck", &i2c_fck, CK_16XX | CK_1510 | CK_310 | CK_7XX), | 658 | CLK("i2c_omap.1", "fck", &i2c_fck, CK_16XX | CK_1510 | CK_310 | CK_7XX), |
| 659 | CLK("i2c_omap.1", "ick", &i2c_ick, CK_16XX), | 659 | CLK("i2c_omap.1", "ick", &i2c_ick, CK_16XX), |
| 660 | CLK("i2c_omap.1", "ick", &dummy_ck, CK_1510 | CK_310 | CK_7XX), | 660 | CLK("i2c_omap.1", "ick", &dummy_ck, CK_1510 | CK_310 | CK_7XX), |
| 661 | CLK("omap1_spi100k.1", "fck", &dummy_ck, CK_7XX), | ||
| 662 | CLK("omap1_spi100k.1", "ick", &dummy_ck, CK_7XX), | ||
| 663 | CLK("omap1_spi100k.2", "fck", &dummy_ck, CK_7XX), | ||
| 664 | CLK("omap1_spi100k.2", "ick", &dummy_ck, CK_7XX), | ||
| 661 | CLK("omap_uwire", "fck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310), | 665 | CLK("omap_uwire", "fck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310), |
| 662 | CLK("omap-mcbsp.1", "ick", &dspper_ck, CK_16XX), | 666 | CLK("omap-mcbsp.1", "ick", &dspper_ck, CK_16XX), |
| 663 | CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310), | 667 | CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310), |
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 23ded2d49600..a2d07aa75c9e 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
| 16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
| 17 | #include <linux/spi/spi.h> | ||
| 17 | 18 | ||
| 18 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
| 19 | #include <asm/mach/map.h> | 20 | #include <asm/mach/map.h> |
| @@ -23,6 +24,7 @@ | |||
| 23 | #include <plat/mux.h> | 24 | #include <plat/mux.h> |
| 24 | #include <mach/gpio.h> | 25 | #include <mach/gpio.h> |
| 25 | #include <plat/mmc.h> | 26 | #include <plat/mmc.h> |
| 27 | #include <plat/omap7xx.h> | ||
| 26 | 28 | ||
| 27 | /*-------------------------------------------------------------------------*/ | 29 | /*-------------------------------------------------------------------------*/ |
| 28 | 30 | ||
| @@ -196,6 +198,38 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
| 196 | 198 | ||
| 197 | /*-------------------------------------------------------------------------*/ | 199 | /*-------------------------------------------------------------------------*/ |
| 198 | 200 | ||
| 201 | /* OMAP7xx SPI support */ | ||
| 202 | #if defined(CONFIG_SPI_OMAP_100K) || defined(CONFIG_SPI_OMAP_100K_MODULE) | ||
| 203 | |||
| 204 | struct platform_device omap_spi1 = { | ||
| 205 | .name = "omap1_spi100k", | ||
| 206 | .id = 1, | ||
| 207 | }; | ||
| 208 | |||
| 209 | struct platform_device omap_spi2 = { | ||
| 210 | .name = "omap1_spi100k", | ||
| 211 | .id = 2, | ||
| 212 | }; | ||
| 213 | |||
| 214 | static void omap_init_spi100k(void) | ||
| 215 | { | ||
| 216 | omap_spi1.dev.platform_data = ioremap(OMAP7XX_SPI1_BASE, 0x7ff); | ||
| 217 | if (omap_spi1.dev.platform_data) | ||
| 218 | platform_device_register(&omap_spi1); | ||
| 219 | |||
| 220 | omap_spi2.dev.platform_data = ioremap(OMAP7XX_SPI2_BASE, 0x7ff); | ||
| 221 | if (omap_spi2.dev.platform_data) | ||
| 222 | platform_device_register(&omap_spi2); | ||
| 223 | } | ||
| 224 | |||
| 225 | #else | ||
| 226 | static inline void omap_init_spi100k(void) | ||
| 227 | { | ||
| 228 | } | ||
| 229 | #endif | ||
| 230 | |||
| 231 | /*-------------------------------------------------------------------------*/ | ||
| 232 | |||
| 199 | #if defined(CONFIG_OMAP_STI) | 233 | #if defined(CONFIG_OMAP_STI) |
| 200 | 234 | ||
| 201 | #define OMAP1_STI_BASE 0xfffea000 | 235 | #define OMAP1_STI_BASE 0xfffea000 |
| @@ -263,6 +297,7 @@ static int __init omap1_init_devices(void) | |||
| 263 | 297 | ||
| 264 | omap_init_mbox(); | 298 | omap_init_mbox(); |
| 265 | omap_init_rtc(); | 299 | omap_init_rtc(); |
| 300 | omap_init_spi100k(); | ||
| 266 | omap_init_sti(); | 301 | omap_init_sti(); |
| 267 | 302 | ||
| 268 | return 0; | 303 | return 0; |
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c index 07212cc621ae..84341377232d 100644 --- a/arch/arm/mach-omap1/mux.c +++ b/arch/arm/mach-omap1/mux.c | |||
| @@ -62,6 +62,14 @@ MUX_CFG_7XX("MMC_7XX_DAT0", 2, 17, 0, 16, 1, 0) | |||
| 62 | /* I2C interface */ | 62 | /* I2C interface */ |
| 63 | MUX_CFG_7XX("I2C_7XX_SCL", 5, 1, 0, 0, 1, 0) | 63 | MUX_CFG_7XX("I2C_7XX_SCL", 5, 1, 0, 0, 1, 0) |
| 64 | MUX_CFG_7XX("I2C_7XX_SDA", 5, 5, 0, 0, 1, 0) | 64 | MUX_CFG_7XX("I2C_7XX_SDA", 5, 5, 0, 0, 1, 0) |
| 65 | |||
| 66 | /* SPI pins */ | ||
| 67 | MUX_CFG_7XX("SPI_7XX_1", 6, 5, 4, 4, 1, 0) | ||
| 68 | MUX_CFG_7XX("SPI_7XX_2", 6, 9, 4, 8, 1, 0) | ||
| 69 | MUX_CFG_7XX("SPI_7XX_3", 6, 13, 4, 12, 1, 0) | ||
| 70 | MUX_CFG_7XX("SPI_7XX_4", 6, 17, 4, 16, 1, 0) | ||
| 71 | MUX_CFG_7XX("SPI_7XX_5", 8, 25, 0, 24, 0, 0) | ||
| 72 | MUX_CFG_7XX("SPI_7XX_6", 9, 5, 0, 4, 0, 0) | ||
| 65 | }; | 73 | }; |
| 66 | #define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) | 74 | #define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) |
| 67 | #else | 75 | #else |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 10eafa70a909..606bf04f51b6 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
| @@ -80,6 +80,7 @@ config MACH_OVERO | |||
| 80 | config MACH_OMAP3EVM | 80 | config MACH_OMAP3EVM |
| 81 | bool "OMAP 3530 EVM board" | 81 | bool "OMAP 3530 EVM board" |
| 82 | depends on ARCH_OMAP3 && ARCH_OMAP34XX | 82 | depends on ARCH_OMAP3 && ARCH_OMAP34XX |
| 83 | select OMAP_PACKAGE_CBB | ||
| 83 | 84 | ||
| 84 | config MACH_OMAP3517EVM | 85 | config MACH_OMAP3517EVM |
| 85 | bool "OMAP3517/ AM3517 EVM board" | 86 | bool "OMAP3517/ AM3517 EVM board" |
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index 8dd277c36661..1e3dfb652acc 100755 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
| @@ -63,21 +63,21 @@ static int board_keymap[] = { | |||
| 63 | KEY(5, 1, KEY_H), | 63 | KEY(5, 1, KEY_H), |
| 64 | KEY(5, 2, KEY_J), | 64 | KEY(5, 2, KEY_J), |
| 65 | KEY(5, 3, KEY_F3), | 65 | KEY(5, 3, KEY_F3), |
| 66 | KEY(5, 4, KEY_UNKNOWN), | ||
| 66 | KEY(5, 5, KEY_VOLUMEDOWN), | 67 | KEY(5, 5, KEY_VOLUMEDOWN), |
| 67 | KEY(5, 6, KEY_M), | 68 | KEY(5, 6, KEY_M), |
| 68 | KEY(5, 7, KEY_ENTER), | 69 | KEY(5, 7, KEY_RIGHT), |
| 69 | KEY(6, 0, KEY_Q), | 70 | KEY(6, 0, KEY_Q), |
| 70 | KEY(6, 1, KEY_A), | 71 | KEY(6, 1, KEY_A), |
| 71 | KEY(6, 2, KEY_N), | 72 | KEY(6, 2, KEY_N), |
| 72 | KEY(6, 3, KEY_BACKSPACE), | 73 | KEY(6, 3, KEY_BACKSPACE), |
| 73 | KEY(6, 6, KEY_P), | 74 | KEY(6, 6, KEY_P), |
| 74 | KEY(6, 7, KEY_SELECT), | 75 | KEY(6, 7, KEY_UP), |
| 75 | KEY(7, 0, KEY_PROG1), /*MACRO 1 <User defined> */ | 76 | KEY(7, 0, KEY_PROG1), /*MACRO 1 <User defined> */ |
| 76 | KEY(7, 1, KEY_PROG2), /*MACRO 2 <User defined> */ | 77 | KEY(7, 1, KEY_PROG2), /*MACRO 2 <User defined> */ |
| 77 | KEY(7, 2, KEY_PROG3), /*MACRO 3 <User defined> */ | 78 | KEY(7, 2, KEY_PROG3), /*MACRO 3 <User defined> */ |
| 78 | KEY(7, 3, KEY_PROG4), /*MACRO 4 <User defined> */ | 79 | KEY(7, 3, KEY_PROG4), /*MACRO 4 <User defined> */ |
| 79 | KEY(7, 5, KEY_RIGHT), | 80 | KEY(7, 6, KEY_SELECT), |
| 80 | KEY(7, 6, KEY_UP), | ||
| 81 | KEY(7, 7, KEY_DOWN) | 81 | KEY(7, 7, KEY_DOWN) |
| 82 | }; | 82 | }; |
| 83 | 83 | ||
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index e071b3fd1878..459ef23ab8a8 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
| @@ -994,8 +994,10 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size, | |||
| 994 | } | 994 | } |
| 995 | 995 | ||
| 996 | #ifdef CONFIG_OMAP_MUX | 996 | #ifdef CONFIG_OMAP_MUX |
| 997 | omap_mux_package_fixup(package_subset, superset); | 997 | if (package_subset) |
| 998 | omap_mux_package_init_balls(package_balls, superset); | 998 | omap_mux_package_fixup(package_subset, superset); |
| 999 | if (package_balls) | ||
| 1000 | omap_mux_package_init_balls(package_balls, superset); | ||
| 999 | omap_mux_set_cmdline_signals(); | 1001 | omap_mux_set_cmdline_signals(); |
| 1000 | omap_mux_set_board_signals(board_mux); | 1002 | omap_mux_set_board_signals(board_mux); |
| 1001 | #endif | 1003 | #endif |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 81ed252a0f8a..c6cc809afb79 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
| @@ -124,8 +124,8 @@ static void omap3_core_save_context(void) | |||
| 124 | control_padconf_off |= START_PADCONF_SAVE; | 124 | control_padconf_off |= START_PADCONF_SAVE; |
| 125 | omap_ctrl_writel(control_padconf_off, OMAP343X_CONTROL_PADCONF_OFF); | 125 | omap_ctrl_writel(control_padconf_off, OMAP343X_CONTROL_PADCONF_OFF); |
| 126 | /* wait for the save to complete */ | 126 | /* wait for the save to complete */ |
| 127 | while (!omap_ctrl_readl(OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS) | 127 | while (!(omap_ctrl_readl(OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS) |
| 128 | & PADCONF_SAVE_DONE) | 128 | & PADCONF_SAVE_DONE)) |
| 129 | ; | 129 | ; |
| 130 | /* Save the Interrupt controller context */ | 130 | /* Save the Interrupt controller context */ |
| 131 | omap_intc_save_context(); | 131 | omap_intc_save_context(); |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 19805a7de06c..8c964bec8159 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
| @@ -125,6 +125,13 @@ static struct plat_serial8250_port serial_platform_data3[] = { | |||
| 125 | } | 125 | } |
| 126 | }; | 126 | }; |
| 127 | #endif | 127 | #endif |
| 128 | static inline unsigned int __serial_read_reg(struct uart_port *up, | ||
| 129 | int offset) | ||
| 130 | { | ||
| 131 | offset <<= up->regshift; | ||
| 132 | return (unsigned int)__raw_readb(up->membase + offset); | ||
| 133 | } | ||
| 134 | |||
| 128 | static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, | 135 | static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, |
| 129 | int offset) | 136 | int offset) |
| 130 | { | 137 | { |
| @@ -583,11 +590,12 @@ static unsigned int serial_in_override(struct uart_port *up, int offset) | |||
| 583 | { | 590 | { |
| 584 | if (UART_RX == offset) { | 591 | if (UART_RX == offset) { |
| 585 | unsigned int lsr; | 592 | unsigned int lsr; |
| 586 | lsr = serial_read_reg(omap_uart[up->line].p, UART_LSR); | 593 | lsr = __serial_read_reg(up, UART_LSR); |
| 587 | if (!(lsr & UART_LSR_DR)) | 594 | if (!(lsr & UART_LSR_DR)) |
| 588 | return -EPERM; | 595 | return -EPERM; |
| 589 | } | 596 | } |
| 590 | return serial_read_reg(omap_uart[up->line].p, offset); | 597 | |
| 598 | return __serial_read_reg(up, offset); | ||
| 591 | } | 599 | } |
| 592 | 600 | ||
| 593 | void __init omap_serial_early_init(void) | 601 | void __init omap_serial_early_init(void) |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 04846811d0aa..d17620c50c28 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
| @@ -192,6 +192,7 @@ struct gpio_bank { | |||
| 192 | u32 saved_risingdetect; | 192 | u32 saved_risingdetect; |
| 193 | #endif | 193 | #endif |
| 194 | u32 level_mask; | 194 | u32 level_mask; |
| 195 | u32 toggle_mask; | ||
| 195 | spinlock_t lock; | 196 | spinlock_t lock; |
| 196 | struct gpio_chip chip; | 197 | struct gpio_chip chip; |
| 197 | struct clk *dbck; | 198 | struct clk *dbck; |
| @@ -749,6 +750,44 @@ static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio, | |||
| 749 | } | 750 | } |
| 750 | #endif | 751 | #endif |
| 751 | 752 | ||
| 753 | /* | ||
| 754 | * This only applies to chips that can't do both rising and falling edge | ||
| 755 | * detection at once. For all other chips, this function is a noop. | ||
| 756 | */ | ||
| 757 | static void _toggle_gpio_edge_triggering(struct gpio_bank *bank, int gpio) | ||
| 758 | { | ||
| 759 | void __iomem *reg = bank->base; | ||
| 760 | u32 l = 0; | ||
| 761 | |||
| 762 | switch (bank->method) { | ||
| 763 | #ifdef CONFIG_ARCH_OMAP1 | ||
| 764 | case METHOD_MPUIO: | ||
| 765 | reg += OMAP_MPUIO_GPIO_INT_EDGE; | ||
| 766 | break; | ||
| 767 | #endif | ||
| 768 | #ifdef CONFIG_ARCH_OMAP15XX | ||
| 769 | case METHOD_GPIO_1510: | ||
| 770 | reg += OMAP1510_GPIO_INT_CONTROL; | ||
| 771 | break; | ||
| 772 | #endif | ||
| 773 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | ||
| 774 | case METHOD_GPIO_7XX: | ||
| 775 | reg += OMAP7XX_GPIO_INT_CONTROL; | ||
| 776 | break; | ||
| 777 | #endif | ||
| 778 | default: | ||
| 779 | return; | ||
| 780 | } | ||
| 781 | |||
| 782 | l = __raw_readl(reg); | ||
| 783 | if ((l >> gpio) & 1) | ||
| 784 | l &= ~(1 << gpio); | ||
| 785 | else | ||
| 786 | l |= 1 << gpio; | ||
| 787 | |||
| 788 | __raw_writel(l, reg); | ||
| 789 | } | ||
| 790 | |||
| 752 | static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | 791 | static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) |
| 753 | { | 792 | { |
| 754 | void __iomem *reg = bank->base; | 793 | void __iomem *reg = bank->base; |
| @@ -759,6 +798,8 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | |||
| 759 | case METHOD_MPUIO: | 798 | case METHOD_MPUIO: |
| 760 | reg += OMAP_MPUIO_GPIO_INT_EDGE; | 799 | reg += OMAP_MPUIO_GPIO_INT_EDGE; |
| 761 | l = __raw_readl(reg); | 800 | l = __raw_readl(reg); |
| 801 | if (trigger & IRQ_TYPE_EDGE_BOTH) | ||
| 802 | bank->toggle_mask |= 1 << gpio; | ||
| 762 | if (trigger & IRQ_TYPE_EDGE_RISING) | 803 | if (trigger & IRQ_TYPE_EDGE_RISING) |
| 763 | l |= 1 << gpio; | 804 | l |= 1 << gpio; |
| 764 | else if (trigger & IRQ_TYPE_EDGE_FALLING) | 805 | else if (trigger & IRQ_TYPE_EDGE_FALLING) |
| @@ -771,6 +812,8 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | |||
| 771 | case METHOD_GPIO_1510: | 812 | case METHOD_GPIO_1510: |
| 772 | reg += OMAP1510_GPIO_INT_CONTROL; | 813 | reg += OMAP1510_GPIO_INT_CONTROL; |
| 773 | l = __raw_readl(reg); | 814 | l = __raw_readl(reg); |
| 815 | if (trigger & IRQ_TYPE_EDGE_BOTH) | ||
| 816 | bank->toggle_mask |= 1 << gpio; | ||
| 774 | if (trigger & IRQ_TYPE_EDGE_RISING) | 817 | if (trigger & IRQ_TYPE_EDGE_RISING) |
| 775 | l |= 1 << gpio; | 818 | l |= 1 << gpio; |
| 776 | else if (trigger & IRQ_TYPE_EDGE_FALLING) | 819 | else if (trigger & IRQ_TYPE_EDGE_FALLING) |
| @@ -803,6 +846,8 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | |||
| 803 | case METHOD_GPIO_7XX: | 846 | case METHOD_GPIO_7XX: |
| 804 | reg += OMAP7XX_GPIO_INT_CONTROL; | 847 | reg += OMAP7XX_GPIO_INT_CONTROL; |
| 805 | l = __raw_readl(reg); | 848 | l = __raw_readl(reg); |
| 849 | if (trigger & IRQ_TYPE_EDGE_BOTH) | ||
| 850 | bank->toggle_mask |= 1 << gpio; | ||
| 806 | if (trigger & IRQ_TYPE_EDGE_RISING) | 851 | if (trigger & IRQ_TYPE_EDGE_RISING) |
| 807 | l |= 1 << gpio; | 852 | l |= 1 << gpio; |
| 808 | else if (trigger & IRQ_TYPE_EDGE_FALLING) | 853 | else if (trigger & IRQ_TYPE_EDGE_FALLING) |
| @@ -1072,7 +1117,7 @@ static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int ena | |||
| 1072 | */ | 1117 | */ |
| 1073 | static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) | 1118 | static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) |
| 1074 | { | 1119 | { |
| 1075 | unsigned long flags; | 1120 | unsigned long uninitialized_var(flags); |
| 1076 | 1121 | ||
| 1077 | switch (bank->method) { | 1122 | switch (bank->method) { |
| 1078 | #ifdef CONFIG_ARCH_OMAP16XX | 1123 | #ifdef CONFIG_ARCH_OMAP16XX |
| @@ -1217,7 +1262,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
| 1217 | { | 1262 | { |
| 1218 | void __iomem *isr_reg = NULL; | 1263 | void __iomem *isr_reg = NULL; |
| 1219 | u32 isr; | 1264 | u32 isr; |
| 1220 | unsigned int gpio_irq; | 1265 | unsigned int gpio_irq, gpio_index; |
| 1221 | struct gpio_bank *bank; | 1266 | struct gpio_bank *bank; |
| 1222 | u32 retrigger = 0; | 1267 | u32 retrigger = 0; |
| 1223 | int unmasked = 0; | 1268 | int unmasked = 0; |
| @@ -1284,9 +1329,23 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
| 1284 | 1329 | ||
| 1285 | gpio_irq = bank->virtual_irq_start; | 1330 | gpio_irq = bank->virtual_irq_start; |
| 1286 | for (; isr != 0; isr >>= 1, gpio_irq++) { | 1331 | for (; isr != 0; isr >>= 1, gpio_irq++) { |
| 1332 | gpio_index = get_gpio_index(irq_to_gpio(gpio_irq)); | ||
| 1333 | |||
| 1287 | if (!(isr & 1)) | 1334 | if (!(isr & 1)) |
| 1288 | continue; | 1335 | continue; |
| 1289 | 1336 | ||
| 1337 | #ifdef CONFIG_ARCH_OMAP1 | ||
| 1338 | /* | ||
| 1339 | * Some chips can't respond to both rising and falling | ||
| 1340 | * at the same time. If this irq was requested with | ||
| 1341 | * both flags, we need to flip the ICR data for the IRQ | ||
| 1342 | * to respond to the IRQ for the opposite direction. | ||
| 1343 | * This will be indicated in the bank toggle_mask. | ||
| 1344 | */ | ||
| 1345 | if (bank->toggle_mask & (1 << gpio_index)) | ||
| 1346 | _toggle_gpio_edge_triggering(bank, gpio_index); | ||
| 1347 | #endif | ||
| 1348 | |||
| 1290 | generic_handle_irq(gpio_irq); | 1349 | generic_handle_irq(gpio_irq); |
| 1291 | } | 1350 | } |
| 1292 | } | 1351 | } |
diff --git a/arch/arm/plat-omap/include/plat/board.h b/arch/arm/plat-omap/include/plat/board.h index 376ce18216ff..5cd622039da0 100644 --- a/arch/arm/plat-omap/include/plat/board.h +++ b/arch/arm/plat-omap/include/plat/board.h | |||
| @@ -99,7 +99,6 @@ struct fb_info; | |||
| 99 | struct omap_backlight_config { | 99 | struct omap_backlight_config { |
| 100 | int default_intensity; | 100 | int default_intensity; |
| 101 | int (*set_power)(struct device *dev, int state); | 101 | int (*set_power)(struct device *dev, int state); |
| 102 | int (*check_fb)(struct fb_info *fb); | ||
| 103 | }; | 102 | }; |
| 104 | 103 | ||
| 105 | struct omap_fbmem_config { | 104 | struct omap_fbmem_config { |
diff --git a/arch/arm/plat-omap/include/plat/control.h b/arch/arm/plat-omap/include/plat/control.h index 2ae884378638..a745d62fad0d 100644 --- a/arch/arm/plat-omap/include/plat/control.h +++ b/arch/arm/plat-omap/include/plat/control.h | |||
| @@ -147,7 +147,7 @@ | |||
| 147 | #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) | 147 | #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) |
| 148 | #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) | 148 | #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) |
| 149 | #define OMAP343X_CONTROL_DEBOBS(i) (OMAP2_CONTROL_GENERAL + 0x01B0 \ | 149 | #define OMAP343X_CONTROL_DEBOBS(i) (OMAP2_CONTROL_GENERAL + 0x01B0 \ |
| 150 | + ((i) >> 1) * 4 + (!(i) & 1) * 2) | 150 | + ((i) >> 1) * 4 + (!((i) & 1)) * 2) |
| 151 | #define OMAP343X_CONTROL_PROG_IO0 (OMAP2_CONTROL_GENERAL + 0x01D4) | 151 | #define OMAP343X_CONTROL_PROG_IO0 (OMAP2_CONTROL_GENERAL + 0x01D4) |
| 152 | #define OMAP343X_CONTROL_PROG_IO1 (OMAP2_CONTROL_GENERAL + 0x01D8) | 152 | #define OMAP343X_CONTROL_PROG_IO1 (OMAP2_CONTROL_GENERAL + 0x01D8) |
| 153 | #define OMAP343X_CONTROL_DSS_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E0) | 153 | #define OMAP343X_CONTROL_DSS_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E0) |
diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/plat-omap/include/plat/mux.h index 8f069cc80350..692c90e89ac3 100644 --- a/arch/arm/plat-omap/include/plat/mux.h +++ b/arch/arm/plat-omap/include/plat/mux.h | |||
| @@ -183,6 +183,14 @@ enum omap7xx_index { | |||
| 183 | /* I2C */ | 183 | /* I2C */ |
| 184 | I2C_7XX_SCL, | 184 | I2C_7XX_SCL, |
| 185 | I2C_7XX_SDA, | 185 | I2C_7XX_SDA, |
| 186 | |||
| 187 | /* SPI */ | ||
| 188 | SPI_7XX_1, | ||
| 189 | SPI_7XX_2, | ||
| 190 | SPI_7XX_3, | ||
| 191 | SPI_7XX_4, | ||
| 192 | SPI_7XX_5, | ||
| 193 | SPI_7XX_6, | ||
| 186 | }; | 194 | }; |
| 187 | 195 | ||
| 188 | enum omap1xxx_index { | 196 | enum omap1xxx_index { |
diff --git a/arch/arm/plat-omap/include/plat/omap7xx.h b/arch/arm/plat-omap/include/plat/omap7xx.h index 53f52414b0e9..48e4757e1e30 100644 --- a/arch/arm/plat-omap/include/plat/omap7xx.h +++ b/arch/arm/plat-omap/include/plat/omap7xx.h | |||
| @@ -46,6 +46,9 @@ | |||
| 46 | #define OMAP7XX_DSPREG_SIZE SZ_128K | 46 | #define OMAP7XX_DSPREG_SIZE SZ_128K |
| 47 | #define OMAP7XX_DSPREG_START 0xE1000000 | 47 | #define OMAP7XX_DSPREG_START 0xE1000000 |
| 48 | 48 | ||
| 49 | #define OMAP7XX_SPI1_BASE 0xfffc0800 | ||
| 50 | #define OMAP7XX_SPI2_BASE 0xfffc1000 | ||
| 51 | |||
| 49 | /* | 52 | /* |
| 50 | * ---------------------------------------------------------------------------- | 53 | * ---------------------------------------------------------------------------- |
| 51 | * OMAP7XX specific configuration registers | 54 | * OMAP7XX specific configuration registers |
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c index c0ff1e39d893..463d6386aff2 100644 --- a/arch/arm/plat-omap/iommu.c +++ b/arch/arm/plat-omap/iommu.c | |||
| @@ -827,7 +827,7 @@ EXPORT_SYMBOL_GPL(iommu_get); | |||
| 827 | **/ | 827 | **/ |
| 828 | void iommu_put(struct iommu *obj) | 828 | void iommu_put(struct iommu *obj) |
| 829 | { | 829 | { |
| 830 | if (!obj && IS_ERR(obj)) | 830 | if (!obj || IS_ERR(obj)) |
| 831 | return; | 831 | return; |
| 832 | 832 | ||
| 833 | mutex_lock(&obj->iommu_lock); | 833 | mutex_lock(&obj->iommu_lock); |
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index 2cc1cc328bac..f75767278fc3 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
| @@ -436,7 +436,7 @@ int omap_mcbsp_request(unsigned int id) | |||
| 436 | dev_err(mcbsp->dev, "Unable to request TX IRQ %d " | 436 | dev_err(mcbsp->dev, "Unable to request TX IRQ %d " |
| 437 | "for McBSP%d\n", mcbsp->tx_irq, | 437 | "for McBSP%d\n", mcbsp->tx_irq, |
| 438 | mcbsp->id); | 438 | mcbsp->id); |
| 439 | return err; | 439 | goto error; |
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | init_completion(&mcbsp->rx_irq_completion); | 442 | init_completion(&mcbsp->rx_irq_completion); |
| @@ -446,12 +446,26 @@ int omap_mcbsp_request(unsigned int id) | |||
| 446 | dev_err(mcbsp->dev, "Unable to request RX IRQ %d " | 446 | dev_err(mcbsp->dev, "Unable to request RX IRQ %d " |
| 447 | "for McBSP%d\n", mcbsp->rx_irq, | 447 | "for McBSP%d\n", mcbsp->rx_irq, |
| 448 | mcbsp->id); | 448 | mcbsp->id); |
| 449 | free_irq(mcbsp->tx_irq, (void *)mcbsp); | 449 | goto tx_irq; |
| 450 | return err; | ||
| 451 | } | 450 | } |
| 452 | } | 451 | } |
| 453 | 452 | ||
| 454 | return 0; | 453 | return 0; |
| 454 | tx_irq: | ||
| 455 | free_irq(mcbsp->tx_irq, (void *)mcbsp); | ||
| 456 | error: | ||
| 457 | if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->free) | ||
| 458 | mcbsp->pdata->ops->free(id); | ||
| 459 | |||
| 460 | /* Do procedure specific to omap34xx arch, if applicable */ | ||
| 461 | omap34xx_mcbsp_free(mcbsp); | ||
| 462 | |||
| 463 | clk_disable(mcbsp->fclk); | ||
| 464 | clk_disable(mcbsp->iclk); | ||
| 465 | |||
| 466 | mcbsp->free = 1; | ||
| 467 | |||
| 468 | return err; | ||
| 455 | } | 469 | } |
| 456 | EXPORT_SYMBOL(omap_mcbsp_request); | 470 | EXPORT_SYMBOL(omap_mcbsp_request); |
| 457 | 471 | ||
diff --git a/drivers/video/backlight/omap1_bl.c b/drivers/video/backlight/omap1_bl.c index 409ca9643528..a3a7f8938175 100644 --- a/drivers/video/backlight/omap1_bl.c +++ b/drivers/video/backlight/omap1_bl.c | |||
| @@ -139,8 +139,6 @@ static int omapbl_probe(struct platform_device *pdev) | |||
| 139 | if (!pdata) | 139 | if (!pdata) |
| 140 | return -ENXIO; | 140 | return -ENXIO; |
| 141 | 141 | ||
| 142 | omapbl_ops.check_fb = pdata->check_fb; | ||
| 143 | |||
| 144 | bl = kzalloc(sizeof(struct omap_backlight), GFP_KERNEL); | 142 | bl = kzalloc(sizeof(struct omap_backlight), GFP_KERNEL); |
| 145 | if (unlikely(!bl)) | 143 | if (unlikely(!bl)) |
| 146 | return -ENOMEM; | 144 | return -ENOMEM; |
