diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-07-14 14:05:12 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-07-14 14:05:12 +0000 |
commit | 75b16b0fedb3fb627b63da9199033417db234f49 (patch) | |
tree | 50f21c819029d2cd8a94f2e23d85e4ee4a3726ab /target/linux/ar71xx/patches-3.8/007-MIPS-ath79-fix-GPIO-function-selection-for-AR934x-So.patch | |
parent | 8303e09771a8c964bce4a8cd5afccc13555362dd (diff) |
ar71xx: remove linux 3.8
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37290 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/patches-3.8/007-MIPS-ath79-fix-GPIO-function-selection-for-AR934x-So.patch')
-rw-r--r-- | target/linux/ar71xx/patches-3.8/007-MIPS-ath79-fix-GPIO-function-selection-for-AR934x-So.patch | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/target/linux/ar71xx/patches-3.8/007-MIPS-ath79-fix-GPIO-function-selection-for-AR934x-So.patch b/target/linux/ar71xx/patches-3.8/007-MIPS-ath79-fix-GPIO-function-selection-for-AR934x-So.patch deleted file mode 100644 index c1f124761d..0000000000 --- a/target/linux/ar71xx/patches-3.8/007-MIPS-ath79-fix-GPIO-function-selection-for-AR934x-So.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 2e6a41e0be6a09ed839e3afbe1fb413a015d8870 Mon Sep 17 00:00:00 2001 -From: Gabor Juhos <juhosg@openwrt.org> -Date: Tue, 29 Jan 2013 08:19:12 +0000 -Subject: [PATCH] MIPS: ath79: fix GPIO function selection for AR934x SoCs - -commit 8838becdf5f7261d7f5dfbbe957fe9b9ed188aec upstream. - -GPIO function selection is not working on the AR934x -SoCs because the offset of the function selection -register is different on those. - -Add a helper routine which returns the correct -register address based on the SoC type, and use -that in the 'ath79_gpio_function_*' routines. - -Signed-off-by: Gabor Juhos <juhosg@openwrt.org> -Patchwork: http://patchwork.linux-mips.org/patch/4870/ -Signed-off-by: John Crispin <blogic@openwrt.org> ---- - arch/mips/ath79/gpio.c | 38 ++++++++++++++++-------- - arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 2 ++ - 2 files changed, 28 insertions(+), 12 deletions(-) - ---- a/arch/mips/ath79/gpio.c -+++ b/arch/mips/ath79/gpio.c -@@ -137,47 +137,61 @@ static struct gpio_chip ath79_gpio_chip - .base = 0, - }; - -+static void __iomem *ath79_gpio_get_function_reg(void) -+{ -+ u32 reg = 0; -+ -+ if (soc_is_ar71xx() || -+ soc_is_ar724x() || -+ soc_is_ar913x() || -+ soc_is_ar933x()) -+ reg = AR71XX_GPIO_REG_FUNC; -+ else if (soc_is_ar934x()) -+ reg = AR934X_GPIO_REG_FUNC; -+ else -+ BUG(); -+ -+ return ath79_gpio_base + reg; -+} -+ - void ath79_gpio_function_enable(u32 mask) - { -- void __iomem *base = ath79_gpio_base; -+ void __iomem *reg = ath79_gpio_get_function_reg(); - unsigned long flags; - - spin_lock_irqsave(&ath79_gpio_lock, flags); - -- __raw_writel(__raw_readl(base + AR71XX_GPIO_REG_FUNC) | mask, -- base + AR71XX_GPIO_REG_FUNC); -+ __raw_writel(__raw_readl(reg) | mask, reg); - /* flush write */ -- __raw_readl(base + AR71XX_GPIO_REG_FUNC); -+ __raw_readl(reg); - - spin_unlock_irqrestore(&ath79_gpio_lock, flags); - } - - void ath79_gpio_function_disable(u32 mask) - { -- void __iomem *base = ath79_gpio_base; -+ void __iomem *reg = ath79_gpio_get_function_reg(); - unsigned long flags; - - spin_lock_irqsave(&ath79_gpio_lock, flags); - -- __raw_writel(__raw_readl(base + AR71XX_GPIO_REG_FUNC) & ~mask, -- base + AR71XX_GPIO_REG_FUNC); -+ __raw_writel(__raw_readl(reg) & ~mask, reg); - /* flush write */ -- __raw_readl(base + AR71XX_GPIO_REG_FUNC); -+ __raw_readl(reg); - - spin_unlock_irqrestore(&ath79_gpio_lock, flags); - } - - void ath79_gpio_function_setup(u32 set, u32 clear) - { -- void __iomem *base = ath79_gpio_base; -+ void __iomem *reg = ath79_gpio_get_function_reg(); - unsigned long flags; - - spin_lock_irqsave(&ath79_gpio_lock, flags); - -- __raw_writel((__raw_readl(base + AR71XX_GPIO_REG_FUNC) & ~clear) | set, -- base + AR71XX_GPIO_REG_FUNC); -+ __raw_writel((__raw_readl(reg) & ~clear) | set, reg); - /* flush write */ -- __raw_readl(base + AR71XX_GPIO_REG_FUNC); -+ __raw_readl(reg); - - spin_unlock_irqrestore(&ath79_gpio_lock, flags); - } ---- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -@@ -401,6 +401,8 @@ - #define AR71XX_GPIO_REG_INT_ENABLE 0x24 - #define AR71XX_GPIO_REG_FUNC 0x28 - -+#define AR934X_GPIO_REG_FUNC 0x6c -+ - #define AR71XX_GPIO_COUNT 16 - #define AR7240_GPIO_COUNT 18 - #define AR7241_GPIO_COUNT 20 |