From: Stephen Rothwell Date: Mon, 7 Nov 2011 00:03:54 +0000 (+1100) Subject: Merge remote-tracking branch 'mips/mips-for-linux-next' X-Git-Tag: next-20111107~55 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2ba46ebc8dfe993f257a9bc53bc153b02d6d204e;p=karo-tx-linux.git Merge remote-tracking branch 'mips/mips-for-linux-next' Conflicts: arch/mips/alchemy/common/dbdma.c arch/mips/kernel/perf_event.c --- 2ba46ebc8dfe993f257a9bc53bc153b02d6d204e diff --cc arch/mips/alchemy/common/dbdma.c index 0e63ee487d6d,4025d77b3601..9ba407b4fc97 --- a/arch/mips/alchemy/common/dbdma.c +++ b/arch/mips/alchemy/common/dbdma.c @@@ -1019,8 -1037,19 +1019,7 @@@ static int __init dbdma_setup(unsigned dbdma_gptr->ddma_inten = 0xffff; au_sync(); - ret = request_irq(irq, dbdma_interrupt, IRQF_DISABLED, "dbdma", - (void *)dbdma_gptr); - switch (alchemy_get_cputype()) { - case ALCHEMY_CPU_AU1550: - irq_nr = AU1550_DDMA_INT; - break; - case ALCHEMY_CPU_AU1200: - irq_nr = AU1200_DDMA_INT; - break; - default: - return -ENODEV; - } - - ret = request_irq(irq_nr, dbdma_interrupt, 0, - "Au1xxx dbdma", (void *)dbdma_gptr); ++ ret = request_irq(irq, dbdma_interrupt, 0, "dbdma", (void *)dbdma_gptr); if (ret) printk(KERN_ERR "Cannot grab DBDMA interrupt!\n"); else { diff --cc arch/mips/include/asm/mach-bcm47xx/gpio.h index 76961cabeedf,ea2c4e8135a1..2ef17e8df403 --- a/arch/mips/include/asm/mach-bcm47xx/gpio.h +++ b/arch/mips/include/asm/mach-bcm47xx/gpio.h @@@ -22,54 -21,33 +22,69 @@@ extern int gpio_to_irq(unsigned gpio) static inline int gpio_get_value(unsigned gpio) { - return ssb_gpio_in(&ssb_bcm47xx, 1 << gpio); + switch (bcm47xx_bus_type) { +#ifdef CONFIG_BCM47XX_SSB + case BCM47XX_BUS_TYPE_SSB: + return ssb_gpio_in(&bcm47xx_bus.ssb, 1 << gpio); +#endif +#ifdef CONFIG_BCM47XX_BCMA + case BCM47XX_BUS_TYPE_BCMA: + return bcma_chipco_gpio_in(&bcm47xx_bus.bcma.bus.drv_cc, + 1 << gpio); +#endif + } + return -EINVAL; } + #define gpio_get_value_cansleep gpio_get_value + static inline void gpio_set_value(unsigned gpio, int value) { - ssb_gpio_out(&ssb_bcm47xx, 1 << gpio, value ? 1 << gpio : 0); + switch (bcm47xx_bus_type) { +#ifdef CONFIG_BCM47XX_SSB + case BCM47XX_BUS_TYPE_SSB: + ssb_gpio_out(&bcm47xx_bus.ssb, 1 << gpio, + value ? 1 << gpio : 0); + return; +#endif +#ifdef CONFIG_BCM47XX_BCMA + case BCM47XX_BUS_TYPE_BCMA: + bcma_chipco_gpio_out(&bcm47xx_bus.bcma.bus.drv_cc, 1 << gpio, + value ? 1 << gpio : 0); + return; +#endif + } } + #define gpio_set_value_cansleep gpio_set_value + + static inline int gpio_cansleep(unsigned gpio) + { + return 0; + } + + static inline int gpio_is_valid(unsigned gpio) + { + return gpio < (BCM47XX_EXTIF_GPIO_LINES + BCM47XX_CHIPCO_GPIO_LINES); + } + + static inline int gpio_direction_input(unsigned gpio) { - ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 0); - return 0; + switch (bcm47xx_bus_type) { +#ifdef CONFIG_BCM47XX_SSB + case BCM47XX_BUS_TYPE_SSB: + ssb_gpio_outen(&bcm47xx_bus.ssb, 1 << gpio, 0); + return 0; +#endif +#ifdef CONFIG_BCM47XX_BCMA + case BCM47XX_BUS_TYPE_BCMA: + bcma_chipco_gpio_outen(&bcm47xx_bus.bcma.bus.drv_cc, 1 << gpio, + 0); + return 0; +#endif + } + return -EINVAL; } static inline int gpio_direction_output(unsigned gpio, int value)