Omap fixes for 2.6.33-rc3
Subsystems (8)
Tony Lindgren
maintainercover Omap fixes for 2.6.33-rc3
Hi all,
Here are some omap fixes for review.
Regards,
Tony
---
Alexander Shishkin (1):
omap2/3: make serial_in_override() address the right uart port
Cory Maccarrone (2):
omap: gpio: Simultaneously requested rising and falling edge
omap1: Add 7xx clocks and pin muxes for SPI
Janusz Krzysztofik (1):
omap: McBSP: Fix possible port lockout
Roel Kluin (3):
omap: &&/|| confusion in iommu_put()
omap3: add missing parentheses
omap3: add missing parentheses
Tony Lindgren (3):
omap: Remove uninitialized warning for gpio.c
omap1: Fix compile for omap1_bl.c
omap3: Fix booting if package is uninitialized
Vaibhav Hiremath (1):
omap3: EVM: Choose OMAP_PACKAGE_CBB
Vimal Singh (1):
omap2/3: ZOOM: Correcting key mapping for few keys
arch/arm/mach-omap1/clock_data.c | 4 ++ arch/arm/mach-omap1/devices.c | 35 ++++++++++++++ arch/arm/mach-omap1/mux.c | 8 +++ arch/arm/mach-omap2/Kconfig | 1 arch/arm/mach-omap2/board-zoom-peripherals.c | 8 ++- arch/arm/mach-omap2/mux.c | 6 ++ arch/arm/mach-omap2/pm34xx.c | 4 +- arch/arm/mach-omap2/serial.c | 12 ++++- arch/arm/plat-omap/gpio.c | 63 +++++++++++++++++++++++++- arch/arm/plat-omap/include/plat/board.h | 1 arch/arm/plat-omap/include/plat/control.h | 2 - arch/arm/plat-omap/include/plat/mux.h | 8 +++ arch/arm/plat-omap/include/plat/omap7xx.h | 3 + arch/arm/plat-omap/iommu.c | 2 - arch/arm/plat-omap/mcbsp.c | 20 +++++++- drivers/video/backlight/omap1_bl.c | 2 - 16 files changed, 159 insertions(+), 20 deletions(-)
Signature · 1 line
Signature
Tony Lindgren
maintainerPATCH 1/12 omap: McBSP: Fix possible port lockout
From: Janusz Krzysztofik <[email protected]>
In its current form, the omap_mcbsp_request() function can return after irq_request() failure without any cleanups, effectively locking out the port forever with clocks left running. Fix it.
--- arch/arm/plat-omap/mcbsp.c | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-)
arch/arm/plat-omap/mcbsp.c +17 -3
@@ -436,7 +436,7 @@ int omap_mcbsp_request(unsigned int id)dev_err (mcbsp->dev,"Unable to request TX IRQ %d " "for McBSP%d\n" , mcbsp->tx_irq, mcbsp->id); -return err; + goto error; }init_completion (&mcbsp->rx_irq_completion);
@@ -446,12 +446,26 @@ int omap_mcbsp_request(unsigned int id)dev_err (mcbsp->dev,"Unable to request RX IRQ %d " "for McBSP%d\n" , mcbsp->rx_irq, mcbsp->id); -free_irq (mcbsp->tx_irq, (void *)mcbsp); -return err; + goto tx_irq; } }return 0 ; +tx_irq: +free_irq (mcbsp->tx_irq, (void *)mcbsp); +error: +if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->free) + mcbsp->pdata->ops->free (id); + +/* Do procedure specific to omap34xx arch, if applicable */ +omap34xx_mcbsp_free (mcbsp); + +clk_disable (mcbsp->fclk); +clk_disable (mcbsp->iclk); + + mcbsp->free =1 ; + +return err; }EXPORT_SYMBOL (omap_mcbsp_request);
Re: [PATCH 01/12] omap: McBSP: Fix possible port lockout
Quoted 10 lines · Tony Lindgren
From: Janusz Krzysztofik <[email protected]>
In its current form, the
omap_mcbsp_request()function can return afterirq_request()failure without any cleanups, effectively locking out the port forever with clocks left running. Fix it.Signed-off-by Janusz Krzysztofik <[email protected]>Acked-by Jarkko Nikula <[email protected]>Acked-by Peter Ujfalusi <[email protected]>Signed-off-by Tony Lindgren <[email protected]>
[...]
Quoted 15 lines
arch/arm/plat-omap/mcbsp.c +1
-1@@ -436,7 +436,7 @@ int omap_mcbsp_request(unsigned int id)dev_err (mcbsp->dev,"Unable to request TX IRQ %d " "for McBSP%d\n" , mcbsp->tx_irq, mcbsp->id); -return err; + goto error; }init_completion (&mcbsp->rx_irq_completion);@@ -446,12 +446,26 @@ int omap_mcbsp_request(unsigned int id) dev_err(mcbsp->dev, "Unable to request RX IRQ %d "
arch/arm/plat-omap/mcbsp.c int omap_mcbsp_request(unsigned int id) · line 454
Quoted 10 lines
arch/arm/plat-omap/mcbsp.c +2
-2"for McBSP%d\n" , mcbsp->rx_irq, mcbsp->id); -free_irq (mcbsp->tx_irq, (void *)mcbsp); -return err; + goto tx_irq; } }return 0 ; +tx_irq:
As if this wasn't a label for error cleanup, i.e. labels could be named
more consistently, both including 'err' or 'error'...
arch/arm/plat-omap/mcbsp.c int omap_mcbsp_request(unsigned int id) · line 458
Quoted 4 lines
arch/arm/plat-omap/mcbsp.c +4
-0+free_irq (mcbsp->tx_irq, (void *)mcbsp); +error: +if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->free) + mcbsp->pdata->ops->free (id);
This line is overindented.
WBR, Sergei
PATCH 1/12 omap: McBSP: Fix possible port lockout
Friday 08 January 2010 18:14:06 Sergei Shtylyov napisa?(a):
Quoted 43 lines
Quoted 10 lines · Tony Lindgren
From: Janusz Krzysztofik <[email protected]>
In its current form, the
omap_mcbsp_request()function can return afterirq_request()failure without any cleanups, effectively locking out the port forever with clocks left running. Fix it.Signed-off-by Janusz Krzysztofik <[email protected]>Acked-by Jarkko Nikula <[email protected]>Acked-by Peter Ujfalusi <[email protected]>Signed-off-by Tony Lindgren <[email protected]>[...]
Quoted 15 lines
arch/arm/plat-omap/mcbsp.c +1
-1@@ -436,7 +436,7 @@ int omap_mcbsp_request(unsigned int id)dev_err (mcbsp->dev,"Unable to request TX IRQ %d " "for McBSP%d\n" , mcbsp->tx_irq, mcbsp->id); -return err; + goto error; }init_completion (&mcbsp->rx_irq_completion);@@ -446,12 +446,26 @@ int omap_mcbsp_request(unsigned int id) dev_err(mcbsp->dev, "Unable to request RX IRQ %d "arch/arm/plat-omap/mcbsp.c int omap_mcbsp_request(unsigned int id) · line 454
Quoted 10 lines
arch/arm/plat-omap/mcbsp.c +2
-2"for McBSP%d\n" , mcbsp->rx_irq, mcbsp->id); -free_irq (mcbsp->tx_irq, (void *)mcbsp); -return err; + goto tx_irq; } }return 0 ; +tx_irq:As if this wasn't a label for error cleanup, i.e. labels could be named
more consistently, both including 'err' or 'error'...
Quoted 7 lines
arch/arm/plat-omap/mcbsp.c int omap_mcbsp_request(unsigned int id) · line 458
Quoted 4 lines
arch/arm/plat-omap/mcbsp.c +4
-0+free_irq (mcbsp->tx_irq, (void *)mcbsp); +error: +if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->free) + mcbsp->pdata->ops->free (id);This line is overindented.
Sergei,
Thanks for pointing these out.
Tony,
Since you have already sent a pull request covering this patch, I propose I will address both issues soon when I revisit the source while further modifying this function for McBSP register cache support, OK?
Thanks,
Janusz
Tony Lindgren
maintainerPATCH 2/12 omap: gpio: Simultaneously requested rising and falling edge
In reply to Tony LindgrenFrom: Cory Maccarrone <[email protected]>
Some chips, namely any OMAP1 chips using METHOD_MPUIO, OMAP15xx and OMAP7xx, cannot be setup to respond to on-chip GPIO interrupts in both rising and falling edge directions -- they can only respond to one direction or the other, depending on how the ICR is configured.
Additionally, current code forces rising edge detection if both flags are specified:
if (trigger & IRQ_TYPE_EDGE_RISING)
l |= 1 << gpio;
else if (trigger & IRQ_TYPE_EDGE_FALLING)
l &= ~(1 << gpio);
else
goto bad;This change implements a toggle function that will modify the ICR to flip the direction of interrupt for IRQs that are requested with both rising and falling flags. The toggle function is not called for chips and GPIOs it does not apply to through the use of a flip_mask that's added on a per-bank basis. The mask is only set for those GPIOs where a toggle is necessary. Edge detection starts out the same as above with FALLING mode first.
The toggle happens on EACH interrupt; without it, we have the following sequence of actions on GPIO transition:
ICR GPIO Result 0x1 0 -> 1 (rising) Interrupt 0x1 1 -> 0 (falling) No interrupt
(set ICR to 0x0 manually)
0x0 0 -> 1 (rising) No interrupt 0x0 1 -> 0 (falling) Interrupt
That is, with the ICR set to 1 for a gpio, only rising edge interrupts are caught, and with it set to 0, only falling edge interrupts are caught. If we add in the toggle, we get this:
ICR GPIO Result 0x1 0 -> 1 (rising) Interrupt (ICR set to 0x0) 0x0 1 -> 0 (falling) Interrupt (ICR set to 0x1) 0x1 0 -> 1 ...
so, both rising and falling are caught, per the request for both (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING).
--- arch/arm/plat-omap/gpio.c | 61 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 60 insertions(+), 1 deletions(-)
arch/arm/plat-omap/gpio.c +60 -1
@@ -192,6 +192,7 @@ struct gpio_bank {u32 saved_risingdetect;#endif u32 level_mask; +u32 toggle_mask;spinlock_t lock;struct gpio_chip chip;struct clk *dbck;
@@ -749,6 +750,44 @@ static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio, }#endif +/* +* This only applies to chips that can't do both rising and falling edge +* detection at once. For all other chips, this function is a noop. +*/ +static void _toggle_gpio_edge_triggering (struct gpio_bank *bank,int gpio) +{ +void __iomem *reg = bank->base; +u32 l =0 ; + +switch (bank->method) { +#ifdef CONFIG_ARCH_OMAP1 +case METHOD_MPUIO : + reg +=OMAP_MPUIO_GPIO_INT_EDGE ; +break ; +#endif +#ifdef CONFIG_ARCH_OMAP15XX +case METHOD_GPIO_1510 : + reg +=OMAP1510_GPIO_INT_CONTROL ; +break ; +#endif +#if defined(CONFIG_ARCH_OMAP730 ) || defined(CONFIG_ARCH_OMAP850 ) +case METHOD_GPIO_7XX : + reg +=OMAP7XX_GPIO_INT_CONTROL ; +break ; +#endif +default : +return ; + } + + l =__raw_readl (reg); +if ((l >> gpio) &1 ) + l &= ~(1 << gpio); +else + l |=1 << gpio; + +__raw_writel (l, reg); +} +static int _set_gpio_triggering (struct gpio_bank *bank,int gpio,int trigger) {void __iomem *reg = bank->base;
@@ -759,6 +798,8 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)case METHOD_MPUIO : reg +=OMAP_MPUIO_GPIO_INT_EDGE ; l =__raw_readl (reg); +if (trigger &IRQ_TYPE_EDGE_BOTH ) + bank->toggle_mask |=1 << gpio;if (trigger &IRQ_TYPE_EDGE_RISING ) l |=1 << gpio;else if (trigger &IRQ_TYPE_EDGE_FALLING )
@@ -771,6 +812,8 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)case METHOD_GPIO_1510 : reg +=OMAP1510_GPIO_INT_CONTROL ; l =__raw_readl (reg); +if (trigger &IRQ_TYPE_EDGE_BOTH ) + bank->toggle_mask |=1 << gpio;if (trigger &IRQ_TYPE_EDGE_RISING ) l |=1 << gpio;else if (trigger &IRQ_TYPE_EDGE_FALLING )
@@ -803,6 +846,8 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)case METHOD_GPIO_7XX : reg +=OMAP7XX_GPIO_INT_CONTROL ; l =__raw_readl (reg); +if (trigger &IRQ_TYPE_EDGE_BOTH ) + bank->toggle_mask |=1 << gpio;if (trigger &IRQ_TYPE_EDGE_RISING ) l |=1 << gpio;else if (trigger &IRQ_TYPE_EDGE_FALLING )
@@ -1217,7 +1262,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) {void __iomem *isr_reg =NULL ;u32 isr; -unsigned int gpio_irq; +unsigned int gpio_irq, gpio_index;struct gpio_bank *bank;u32 retrigger =0 ;int unmasked =0 ;
@@ -1284,9 +1329,23 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) gpio_irq = bank->virtual_irq_start;for (; isr !=0 ; isr >>=1 , gpio_irq++) { + gpio_index =get_gpio_index (irq_to_gpio (gpio_irq)); +if (!(isr &1 ))continue ; +#ifdef CONFIG_ARCH_OMAP1 +/* +* Some chips can't respond to both rising and falling +* at the same time. If this irq was requested with +* both flags, we need to flip the ICR data for the IRQ +* to respond to the IRQ for the opposite direction. +* This will be indicated in the bank toggle_mask. +*/ +if (bank->toggle_mask & (1 << gpio_index)) +_toggle_gpio_edge_triggering (bank, gpio_index); +#endif +generic_handle_irq (gpio_irq); } }
Tony Lindgren
maintainerPATCH 3/12 omap: &&/|| confusion in iommu_put()
In reply to Tony LindgrenFrom: Roel Kluin <[email protected]>
obj can't be both NULL and be an error pointer.
--- arch/arm/plat-omap/iommu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/iommu.c +1 -1
@@ -827,7 +827,7 @@ EXPORT_SYMBOL_GPL(iommu_get);**/ void iommu_put (struct iommu *obj) { -if (!obj &&IS_ERR (obj)) +if (!obj ||IS_ERR (obj))return ;mutex_lock (&obj->iommu_lock);
Tony Lindgren
maintainerPATCH 4/12 omap: Remove uninitialized warning for gpio.c
In reply to Tony LindgrenFlags is not used on 15xx.
--- arch/arm/plat-omap/gpio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/gpio.c +1 -1
@@ -1117,7 +1117,7 @@ static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int ena*/ static int _set_gpio_wakeup (struct gpio_bank *bank,int gpio,int enable) { -unsigned long flags; +unsigned long uninitialized_var (flags );switch (bank->method) {#ifdef CONFIG_ARCH_OMAP16XX
Tony Lindgren
maintainerPATCH 5/12 omap1: Add 7xx clocks and pin muxes for SPI
In reply to Tony LindgrenFrom: Cory Maccarrone <[email protected]>
Commit 35c9049b27040d09461bc90928ad770be7ddf661 added drivers/spi/omap_spi_100k.c.
This patch add the related clocks and pin muxing entries to make the driver work on omap7xx platforms.
--- arch/arm/mach-omap1/clock_data.c | 4 +++ arch/arm/mach-omap1/devices.c | 35 +++++++++++++++++++++++++++++ arch/arm/mach-omap1/mux.c | 8 +++++++ arch/arm/plat-omap/include/plat/mux.h | 8 +++++++ arch/arm/plat-omap/include/plat/omap7xx.h | 3 ++ 5 files changed, 58 insertions(+), 0 deletions(-)
arch/arm/mach-omap1/clock_data.c +4 -0
@@ -658,6 +658,10 @@ static struct omap_clk omap_clks[] = {CLK ("i2c_omap.1" ,"fck" , &i2c_fck,CK_16XX |CK_1510 |CK_310 |CK_7XX ),CLK ("i2c_omap.1" ,"ick" , &i2c_ick,CK_16XX ),CLK ("i2c_omap.1" ,"ick" , &dummy_ck,CK_1510 |CK_310 |CK_7XX ), +CLK ("omap1_spi100k.1" ,"fck" , &dummy_ck,CK_7XX ), +CLK ("omap1_spi100k.1" ,"ick" , &dummy_ck,CK_7XX ), +CLK ("omap1_spi100k.2" ,"fck" , &dummy_ck,CK_7XX ), +CLK ("omap1_spi100k.2" ,"ick" , &dummy_ck,CK_7XX ),CLK ("omap_uwire" ,"fck" , &armxor_ck.clk,CK_16XX |CK_1510 |CK_310 ),CLK ("omap-mcbsp.1" ,"ick" , &dspper_ck,CK_16XX ), CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310),
arch/arm/mach-omap1/devices.c +35 -0
@@ -14,6 +14,7 @@#include <linux/init.h> #include <linux/platform_device.h> #include <linux/io.h> +#include <linux/spi/spi.h> #include <mach/hardware.h> #include <asm/mach/map.h>
@@ -23,6 +24,7 @@#include <plat/mux.h> #include <mach/gpio.h> #include <plat/mmc.h> +#include <plat/omap7xx.h> /*-------------------------------------------------------------------------*/
@@ -196,6 +198,38 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,/*-------------------------------------------------------------------------*/ +/* OMAP7xx SPI support */ +#if defined(CONFIG_SPI_OMAP_100K ) || defined(CONFIG_SPI_OMAP_100K_MODULE ) + +struct platform_device omap_spi1 = { + .name ="omap1_spi100k" , + .id =1 , +}; + +struct platform_device omap_spi2 = { + .name ="omap1_spi100k" , + .id =2 , +}; + +static void omap_init_spi100k (void ) +{ + omap_spi1.dev.platform_data =ioremap (OMAP7XX_SPI1_BASE ,0x7ff ); +if (omap_spi1.dev.platform_data) +platform_device_register (&omap_spi1); + + omap_spi2.dev.platform_data =ioremap (OMAP7XX_SPI2_BASE ,0x7ff ); + ifi (omap_spi2.dev.platform_data) +platform_device_register (&omap_spi2); +} + +#else +static inline void omap_init_spi100k (void ) +{ +} +#endif + +/*-------------------------------------------------------------------------*/ +#if defined(CONFIG_OMAP_STI )#define OMAP1_STI_BASE 0xfffea000
@@ -263,6 +297,7 @@ static int __init omap1_init_devices(void)omap_init_mbox ();omap_init_rtc (); +omap_init_spi100k ();omap_init_sti ();return 0 ;
arch/arm/mach-omap1/mux.c +8 -0
@@ -62,6 +62,14 @@ MUX_CFG_7XX("MMC_7XX_DAT0", 2, 17, 0, 16, 1, 0)/* I2C interface */ MUX_CFG_7XX("I2C_7XX_SCL", 5, 1, 0, 0, 1, 0)MUX_CFG_7XX ("I2C_7XX_SDA" ,5 ,5 ,0 ,0 ,1 ,0 ) + +/* SPI pins */ +MUX_CFG_7XX("SPI_7XX_1", 6, 5, 4, 4, 1, 0) +MUX_CFG_7XX("SPI_7XX_2", 6, 9, 4, 8, 1, 0) +MUX_CFG_7XX("SPI_7XX_3", 6, 13, 4, 12, 1, 0) +MUX_CFG_7XX("SPI_7XX_4", 6, 17, 4, 16, 1, 0) +MUX_CFG_7XX("SPI_7XX_5", 8, 25, 0, 24, 0, 0) +MUX_CFG_7XX ("SPI_7XX_6" ,9 ,5 ,0 ,4 ,0 ,0 ) };#define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins)#else
arch/arm/plat-omap/include/plat/mux.h +8 -0
@@ -183,6 +183,14 @@ enum omap7xx_index {/* I2C */ I2C_7XX_SCL ,I2C_7XX_SDA , + +/* SPI */ +SPI_7XX_1 , +SPI_7XX_2 , +SPI_7XX_3 , +SPI_7XX_4 , +SPI_7XX_5 , + SPI_7XX_6, }; enum omap1xxx_index {
arch/arm/plat-omap/include/plat/omap7xx.h +3 -0
@@ -46,6 +46,9 @@#define OMAP7XX_DSPREG_SIZE SZ_128K#define OMAP7XX_DSPREG_START 0xE1000000 +#define OMAP7XX_SPI1_BASE 0xfffc0800 +#define OMAP7XX_SPI2_BASE 0xfffc1000 +/* * ---------------------------------------------------------------------------- * OMAP7XX specific configuration registers
PATCH 5/12 omap1: Add 7xx clocks and pin muxes for SPI
<snip>
Quoted 35 lines
arch/arm/mach-omap1/devices.c +0
-0@@ -14,6 +14,7 @@?#include <
linux/init.h>
?#include <linux/platform_device.h>
?#include <linux/io.h>
+#include <linux/spi/spi.h>?#include <
mach/hardware.h>
?#include <asm/mach/map.h>arch/arm/mach-omap1/devices.c +0
-0@@ -23,6 +24,7 @@?#include <
plat/mux.h>
?#include <mach/gpio.h>
?#include <plat/mmc.h>
+#include <plat/omap7xx.h>?/*-------------------------------------------------------------------------*/
arch/arm/mach-omap1/devices.c +0
-0@@ -196,6 +198,38 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,?/*-------------------------------------------------------------------------*/
arch/arm/mach-omap1/devices.c +11
-0+/* OMAP7xx SPI support */ +#if defined(CONFIG_SPI_OMAP_100K ) || defined(CONFIG_SPI_OMAP_100K_MODULE ) + +struct platform_device omap_spi1 = { + ? ? ? .name ? ? ? ? ? = "omap1_spi100k", + ? ? ? .id ? ? ? ? ? ? = 1, +}; + +struct platform_device omap_spi2 = { + ? ? ? .name ? ? ? ? ? = "omap1_spi100k", + ? ? ? .id ? ? ? ? ? ? = 2,
arch/arm/mach-omap1/devices.c void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
Quoted 10 lines
arch/arm/mach-omap1/devices.c +10
-0+}; + +static void omap_init_spi100k (void ) +{ + ? ? ? omap_spi1.dev.platform_data = ioremap(OMAP7XX_SPI1_BASE, 0x7ff); + ? ? ? if (omap_spi1.dev.platform_data) + ? ? ? ? ? ? ? platform_device_register(&omap_spi1); + + ? ? ? omap_spi2.dev.platform_data = ioremap(OMAP7XX_SPI2_BASE, 0x7ff); + ? ? ? ifi (omap_spi2.dev.platform_data)
a typo here?
Quoted 14 lines
+ ? ? ? ? ? ? ?
platform_device_register(&omap_spi2);arch/arm/mach-omap1/devices.c +10
-0+} + +#else +static inline void omap_init_spi100k (void ) +{ +} +#endif + +/*-------------------------------------------------------------------------*/ +?#if
defined(CONFIG_OMAP_STI)?#define
OMAP1_STI_BASE? ? ? ?0xfffea000
Tony Lindgren
maintainerPATCH 5/12 omap1: Add 7xx clocks and pin muxes for SPI
Quoted 23 lines · Grazvydas Ignotas
<snip>
Quoted 21 lines
arch/arm/mach-omap1/devices.c +0
-0@@ -196,6 +198,38 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,?/*-------------------------------------------------------------------------*/
arch/arm/mach-omap1/devices.c +15
-0+/* OMAP7xx SPI support */ +#if defined(CONFIG_SPI_OMAP_100K ) || defined(CONFIG_SPI_OMAP_100K_MODULE ) + +struct platform_device omap_spi1 = { + ? ? ? .name ? ? ? ? ? = "omap1_spi100k", + ? ? ? .id ? ? ? ? ? ? = 1, +}; + +struct platform_device omap_spi2 = { + ? ? ? .name ? ? ? ? ? = "omap1_spi100k", + ? ? ? .id ? ? ? ? ? ? = 2, +}; + +static void omap_init_spi100k (void ) +{
Quoted 8 lines
Quoted 6 lines
+ ? ? ? omap_spi1.dev.platform_data =
ioremap(OMAP7XX_SPI1_BASE, 0x7ff);
+ ? ? ? if (omap_spi1.dev.platform_data)
+ ? ? ? ? ? ? ?platform_device_register(&omap_spi1);
+
+ ? ? ? omap_spi2.dev.platform_data =ioremap(OMAP7XX_SPI2_BASE, 0x7ff);
+ ? ? ? ifi (omap_spi2.dev.platform_data)a typo here?
Thanks, for pointing that out, my fault for editing the patch.. Fixed below and now compile tested with omap1_spi100k enabled :)
Regards,
Tony
PATCH 5/12 omap1: Add 7xx clocks and pin muxes for SPI
Quoted 5 lines · Tony Lindgren
* Grazvydas Ignotas <[email protected]> [100107 01:44]:
Thanks, for pointing that out, my fault for editing the patch.. Fixed below and now compile tested with
omap1_spi100kenabled :)
Run-time tested here too, everything looks good.
- Cory
Tony Lindgren
maintainerPATCH 6/12 omap1: Fix compile for omap1_bl.c
In reply to Tony LindgrenCommit 9905a43b made struct backlight_ops const. Omap was setting check_fb dynamically, which caused the following compile error:
drivers/video/backlight/omap1_bl.c: In function 'omapbl_probe':drivers/video/backlight/omap1_bl.c:142: error: assignment of read-only variable 'omapbl_ops'
Turns out pdata->check_fb is not being used, so just remove it to fix the compile.
--- arch/arm/plat-omap/include/plat/board.h | 1 - drivers/video/backlight/omap1_bl.c | 2 -- 2 files changed, 0 insertions(+), 3 deletions(-)
arch/arm/plat-omap/include/plat/board.h +0 -1
@@ -99,7 +99,6 @@ struct fb_info;struct omap_backlight_config {int default_intensity;int (*set_power)(struct device *dev,int state); -int (*check_fb)(struct fb_info *fb); };struct omap_fbmem_config {
drivers/video/backlight/omap1_bl.c +0 -2
@@ -139,8 +139,6 @@ static int omapbl_probe(struct platform_device *pdev)if (!pdata)return -ENXIO ; - omapbl_ops.check_fb = pdata->check_fb; - bl =kzalloc (sizeof (struct omap_backlight ),GFP_KERNEL );if (unlikely (!bl))return -ENOMEM ;
Tony Lindgren
maintainerPATCH 7/12 omap2/3: make serial_in_override() address the right uart port
In reply to Tony LindgrenFrom: Alexander Shishkin <[email protected]>
Commit f62349ee9788b1d94c55eb6c291d74a1f69bdd9e makes it possible to have some other than first uart port as ttyS0, which breaks the workaround serial_in_override() function which will try to address the first uart port (for ttyS0) and not the one that was initialized.
--- arch/arm/mach-omap2/serial.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/serial.c +10 -2
@@ -125,6 +125,13 @@ static struct plat_serial8250_port serial_platform_data3[] = { } };#endif +static inline unsigned int __serial_read_reg (struct uart_port *up, +int offset) +{ + offset <<= up->regshift; +return (unsigned int )__raw_readb (up->membase + offset); +} +static inline unsigned int serial_read_reg (struct plat_serial8250_port *up,int offset) {
@@ -583,11 +590,12 @@ static unsigned int serial_in_override(struct uart_port *up, int offset) {if (UART_RX == offset) {unsigned int lsr; - lsr =serial_read_reg (omap_uart[up->line].p,UART_LSR ); + lsr =__serial_read_reg (up,UART_LSR );if (!(lsr &UART_LSR_DR ))return -EPERM ; } -return serial_read_reg (omap_uart[up->line].p, offset); + +return __serial_read_reg (up, offset); }void __init omap_serial_early_init (void )
Tony Lindgren
maintainerPATCH 8/12 omap2/3: ZOOM: Correcting key mapping for few keys
In reply to Tony LindgrenFrom: Vimal Singh <[email protected]>
Keys: 'right arrow', 'up arrow' and 'select' were mapped wrongly. This patch corrects them.
This patch also adds one missing key present in the board, currently I added it as 'unknown' key, as I am not able to find proper description for this key.
One key entry (r: 7, c: 5) is present in the keymap, which is really not present in the board, removing it.
--- arch/arm/mach-omap2/board-zoom-peripherals.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/board-zoom-peripherals.c +4 -4
@@ -63,21 +63,21 @@ static int board_keymap[] = {KEY (5 ,1 ,KEY_H ),KEY (5 ,2 ,KEY_J ),KEY (5 ,3 ,KEY_F3 ), +KEY (5 ,4 ,KEY_UNKNOWN ),KEY (5 ,5 ,KEY_VOLUMEDOWN ),KEY (5 ,6 ,KEY_M ), -KEY (5 ,7 ,KEY_ENTER ), +KEY (5 ,7 ,KEY_RIGHT ),KEY (6 ,0 ,KEY_Q ),KEY (6 ,1 ,KEY_A ),KEY (6 ,2 ,KEY_N ),KEY (6 ,3 ,KEY_BACKSPACE ),KEY (6 ,6 ,KEY_P ), -KEY (6 ,7 ,KEY_SELECT ), +KEY (6 ,7 ,KEY_UP ),KEY (7 ,0 ,KEY_PROG1 ),/*MACRO 1 <User defined> */ KEY (7 ,1 ,KEY_PROG2 ),/*MACRO 2 <User defined> */ KEY (7 ,2 ,KEY_PROG3 ),/*MACRO 3 <User defined> */ KEY (7 ,3 ,KEY_PROG4 ),/*MACRO 4 <User defined> */ -KEY (7 ,5 ,KEY_RIGHT ), -KEY (7 ,6 ,KEY_UP ), +KEY (7 ,6 ,KEY_SELECT ),KEY (7 ,7 ,KEY_DOWN ) };
Tony Lindgren
maintainerPATCH 9/12 omap3: add missing parentheses
In reply to Tony LindgrenFrom: Roel Kluin <[email protected]>
not(!) has a higher precedence than bit and(&).
--- arch/arm/plat-omap/include/plat/control.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/include/plat/control.h +1 -1
@@ -147,7 +147,7 @@#define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190)#define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194)#define OMAP343X_CONTROL_DEBOBS (i) (OMAP2_CONTROL_GENERAL + 0x01B0 \ - + ((i) >> 1) * 4 + (!(i) & 1) * 2) + + ((i) >> 1) * 4 + (!((i) & 1)) * 2)#define OMAP343X_CONTROL_PROG_IO0 (OMAP2_CONTROL_GENERAL + 0x01D4)#define OMAP343X_CONTROL_PROG_IO1 (OMAP2_CONTROL_GENERAL + 0x01D8)#define OMAP343X_CONTROL_DSS_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E0)
Tony Lindgren
maintainerPATCH 10/12 omap3: add missing parentheses
In reply to Tony LindgrenFrom: Roel Kluin <[email protected]>
!' has a higher precedence than &' so parentheses are required.
--- arch/arm/mach-omap2/pm34xx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/pm34xx.c +2 -2
@@ -124,8 +124,8 @@ static void omap3_core_save_context(void) control_padconf_off |=START_PADCONF_SAVE ;omap_ctrl_writel (control_padconf_off,OMAP343X_CONTROL_PADCONF_OFF );/* wait for the save to complete */ -while (!omap_ctrl_readl (OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS ) - &PADCONF_SAVE_DONE ) +while (!(omap_ctrl_readl (OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS ) + &PADCONF_SAVE_DONE )) ;/* Save the Interrupt controller context */ omap_intc_save_context ();
Tony Lindgren
maintainerPATCH 11/12 omap3: Fix booting if package is uninitialized
In reply to Tony LindgrenOtherwise bringing up new boards can be harder:
Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = c0004000 [00000000] *pgd=00000000 Internal error: Oops: 5 [#1] last sysfs file: Modules linked in: CPU: 0 Not tainted (2.6.33-rc2-00015-g0bc9c93-dirty #37) PC is at omap_mux_init+0xa4/0x3d8 LR is at omap_mux_init+0x3c/0x3d8
...
--- arch/arm/mach-omap2/mux.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/mux.c +4 -2
@@ -994,8 +994,10 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size, }#ifdef CONFIG_OMAP_MUX -omap_mux_package_fixup (package_subset, superset); -omap_mux_package_init_balls (package_balls, superset); +if (package_subset) +omap_mux_package_fixup (package_subset, superset); +if (package_balls) +omap_mux_package_init_balls (package_balls, superset);omap_mux_set_cmdline_signals ();omap_mux_set_board_signals (board_mux);#endif
Tony Lindgren
maintainerPATCH 12/12 omap3: EVM: Choose OMAP_PACKAGE_CBB
In reply to Tony LindgrenFrom: Vaibhav Hiremath <[email protected]>
Without this the kernel doesn't boot, it craches in omap_mux_package_fixup(), since the package_subset becomes NULL.
--- arch/arm/mach-omap2/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -0
@@ -80,6 +80,7 @@ config MACH_OVERO config MACH_OMAP3EVM bool "OMAP 3530 EVM board" depends on ARCH_OMAP3 && ARCH_OMAP34XX + select OMAP_PACKAGE_CBB config MACH_OMAP3517EVM bool "OMAP3517/ AM3517 EVM board"