diff options
author | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-01-03 01:48:43 +0000 |
---|---|---|
committer | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-01-03 01:48:43 +0000 |
commit | d4db204893ce8c23df31641e3e61a811e13ae67a (patch) | |
tree | 8f331bc9a4201f81eaacfa94db8754a72eea39d5 /target/linux/brcm47xx/patches-3.3/501-bcma-add-gpio-driver.patch | |
parent | d01cd03c82df4eede1ddaa42fbf7cd4a1eff9b6b (diff) |
brcm47xx: remove support for kernel version 3.3
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34986 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-3.3/501-bcma-add-gpio-driver.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.3/501-bcma-add-gpio-driver.patch | 140 |
1 files changed, 0 insertions, 140 deletions
diff --git a/target/linux/brcm47xx/patches-3.3/501-bcma-add-gpio-driver.patch b/target/linux/brcm47xx/patches-3.3/501-bcma-add-gpio-driver.patch deleted file mode 100644 index d00a164eb9..0000000000 --- a/target/linux/brcm47xx/patches-3.3/501-bcma-add-gpio-driver.patch +++ /dev/null @@ -1,140 +0,0 @@ ---- a/drivers/bcma/driver_chipcommon.c -+++ b/drivers/bcma/driver_chipcommon.c -@@ -158,6 +158,8 @@ void bcma_core_chipcommon_init(struct bc - } - cc->ticks_per_ms = bcma_chipco_watchdog_ticks_per_ms(cc); - -+ spin_lock_init(&cc->gpio_lock); -+ - cc->setup_done = true; - } - -@@ -197,34 +199,81 @@ u32 bcma_chipco_irq_status(struct bcma_d - - u32 bcma_chipco_gpio_in(struct bcma_drv_cc *cc, u32 mask) - { -- return bcma_cc_read32(cc, BCMA_CC_GPIOIN) & mask; -+ unsigned long flags; -+ u32 res; -+ -+ spin_lock_irqsave(&cc->gpio_lock, flags); -+ res = bcma_cc_read32(cc, BCMA_CC_GPIOIN) & mask; -+ spin_unlock_irqrestore(&cc->gpio_lock, flags); -+ -+ return res; - } -+EXPORT_SYMBOL_GPL(bcma_chipco_gpio_in); - - u32 bcma_chipco_gpio_out(struct bcma_drv_cc *cc, u32 mask, u32 value) - { -- return bcma_cc_write32_masked(cc, BCMA_CC_GPIOOUT, mask, value); -+ unsigned long flags; -+ u32 res; -+ -+ spin_lock_irqsave(&cc->gpio_lock, flags); -+ res = bcma_cc_write32_masked(cc, BCMA_CC_GPIOOUT, mask, value); -+ spin_unlock_irqrestore(&cc->gpio_lock, flags); -+ -+ return res; - } -+EXPORT_SYMBOL_GPL(bcma_chipco_gpio_out); - - u32 bcma_chipco_gpio_outen(struct bcma_drv_cc *cc, u32 mask, u32 value) - { -- return bcma_cc_write32_masked(cc, BCMA_CC_GPIOOUTEN, mask, value); -+ unsigned long flags; -+ u32 res; -+ -+ spin_lock_irqsave(&cc->gpio_lock, flags); -+ res = bcma_cc_write32_masked(cc, BCMA_CC_GPIOOUTEN, mask, value); -+ spin_unlock_irqrestore(&cc->gpio_lock, flags); -+ -+ return res; - } -+EXPORT_SYMBOL_GPL(bcma_chipco_gpio_outen); - - u32 bcma_chipco_gpio_control(struct bcma_drv_cc *cc, u32 mask, u32 value) - { -- return bcma_cc_write32_masked(cc, BCMA_CC_GPIOCTL, mask, value); -+ unsigned long flags; -+ u32 res; -+ -+ spin_lock_irqsave(&cc->gpio_lock, flags); -+ res = bcma_cc_write32_masked(cc, BCMA_CC_GPIOCTL, mask, value); -+ spin_unlock_irqrestore(&cc->gpio_lock, flags); -+ -+ return res; - } - EXPORT_SYMBOL_GPL(bcma_chipco_gpio_control); - - u32 bcma_chipco_gpio_intmask(struct bcma_drv_cc *cc, u32 mask, u32 value) - { -- return bcma_cc_write32_masked(cc, BCMA_CC_GPIOIRQ, mask, value); -+ unsigned long flags; -+ u32 res; -+ -+ spin_lock_irqsave(&cc->gpio_lock, flags); -+ res = bcma_cc_write32_masked(cc, BCMA_CC_GPIOIRQ, mask, value); -+ spin_unlock_irqrestore(&cc->gpio_lock, flags); -+ -+ return res; - } -+EXPORT_SYMBOL_GPL(bcma_chipco_gpio_intmask); - - u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, u32 value) - { -- return bcma_cc_write32_masked(cc, BCMA_CC_GPIOPOL, mask, value); -+ unsigned long flags; -+ u32 res; -+ -+ spin_lock_irqsave(&cc->gpio_lock, flags); -+ res = bcma_cc_write32_masked(cc, BCMA_CC_GPIOPOL, mask, value); -+ spin_unlock_irqrestore(&cc->gpio_lock, flags); -+ -+ return res; - } -+EXPORT_SYMBOL_GPL(bcma_chipco_gpio_polarity); - - #ifdef CONFIG_BCMA_DRIVER_MIPS - void bcma_chipco_serial_init(struct bcma_drv_cc *cc) ---- a/include/linux/bcma/bcma_driver_chipcommon.h -+++ b/include/linux/bcma/bcma_driver_chipcommon.h -@@ -555,6 +555,9 @@ struct bcma_drv_cc { - #endif /* CONFIG_BCMA_DRIVER_MIPS */ - u32 ticks_per_ms; - struct platform_device *watchdog; -+ -+ /* Lock for GPIO register access. */ -+ spinlock_t gpio_lock; - }; - - /* Register access */ -@@ -584,13 +587,22 @@ void bcma_chipco_irq_mask(struct bcma_dr - - u32 bcma_chipco_irq_status(struct bcma_drv_cc *cc, u32 mask); - -+#define BCMA_CC_GPIO_LINES 16 -+ - /* Chipcommon GPIO pin access. */ --u32 bcma_chipco_gpio_in(struct bcma_drv_cc *cc, u32 mask); --u32 bcma_chipco_gpio_out(struct bcma_drv_cc *cc, u32 mask, u32 value); --u32 bcma_chipco_gpio_outen(struct bcma_drv_cc *cc, u32 mask, u32 value); --u32 bcma_chipco_gpio_control(struct bcma_drv_cc *cc, u32 mask, u32 value); --u32 bcma_chipco_gpio_intmask(struct bcma_drv_cc *cc, u32 mask, u32 value); --u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, u32 value); -+extern u32 bcma_chipco_gpio_in(struct bcma_drv_cc *cc, u32 mask); -+extern u32 bcma_chipco_gpio_out(struct bcma_drv_cc *cc, u32 mask, u32 value); -+extern u32 bcma_chipco_gpio_outen(struct bcma_drv_cc *cc, u32 mask, u32 value); -+extern u32 bcma_chipco_gpio_control(struct bcma_drv_cc *cc, u32 mask, -+ u32 value); -+extern u32 bcma_chipco_gpio_intmask(struct bcma_drv_cc *cc, u32 mask, -+ u32 value); -+extern u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, -+ u32 value); -+static inline int bcma_chipco_gpio_count(void) -+{ -+ return BCMA_CC_GPIO_LINES; -+} - - /* PMU support */ - extern void bcma_pmu_init(struct bcma_drv_cc *cc); |