--- a/arch/mips/ath79/Makefile
+++ b/arch/mips/ath79/Makefile
-@@ -20,7 +20,7 @@ obj-$(CONFIG_ATH79_DEV_GPIO_BUTTONS) +=
+@@ -20,7 +20,7 @@ obj-$(CONFIG_ATH79_DEV_GPIO_BUTTONS) +=
obj-$(CONFIG_ATH79_DEV_LEDS_GPIO) += dev-leds-gpio.o
obj-$(CONFIG_ATH79_DEV_SPI) += dev-spi.o
obj-$(CONFIG_ATH79_DEV_USB) += dev-usb.o
static struct ar724x_pci_data *pci_data;
static int pci_data_size;
-@@ -38,14 +39,15 @@ int __init pcibios_map_irq(const struct
+@@ -38,14 +39,15 @@ int __init pcibios_map_irq(const struct
int pcibios_plat_dev_init(struct pci_dev *dev)
{
static inline int ar724x_pcibios_init(int irq) { return 0 };
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
-@@ -20,7 +20,7 @@ obj-$(CONFIG_BCM63XX) += pci-bcm63xx.o
+@@ -20,7 +20,7 @@ obj-$(CONFIG_BCM63XX) += pci-bcm63xx.o
ops-bcm63xx.o
obj-$(CONFIG_MIPS_ALCHEMY) += pci-alchemy.o
obj-$(CONFIG_SOC_AR71XX) += pci-ar71xx.o
#include <asm/mach-ath79/ath79.h>
#include <asm/mach-ath79/irq.h>
#include <asm/mach-ath79/pci.h>
-@@ -57,7 +58,9 @@ int __init pcibios_map_irq(const struct
+@@ -57,7 +58,9 @@ int __init pcibios_map_irq(const struct
if (soc_is_ar71xx()) {
ath79_pci_irq_map = ar71xx_pci_irq_map;
ath79_pci_nr_irqs = ARRAY_SIZE(ar71xx_pci_irq_map);
- status = gpio_request(cdata->gpio, dev_name(&spi->dev));
- if (status)
- return status;
-+ flags = GPIOF_DIR_OUT;
-+ if (spi->mode & SPI_CS_HIGH)
-+ flags |= GPIOF_INIT_HIGH;
-+ else
-+ flags |= GPIOF_INIT_LOW;
-
+-
- status = gpio_direction_output(cdata->gpio,
- spi->mode & SPI_CS_HIGH);
- if (status) {
- gpio_free(cdata->gpio);
- return status;
- }
++ flags = GPIOF_DIR_OUT;
++ if (spi->mode & SPI_CS_HIGH)
++ flags |= GPIOF_INIT_HIGH;
++ else
++ flags |= GPIOF_INIT_LOW;
++
+ status = gpio_request_one(cdata->gpio, flags,
+ dev_name(&spi->dev));
}
--- a/drivers/spi/spi-ath79.c
+++ b/drivers/spi/spi-ath79.c
-@@ -89,16 +89,8 @@ static void ath79_spi_chipselect(struct
+@@ -89,16 +89,8 @@ static void ath79_spi_chipselect(struct
}
status = 0;
if (spi->chip_select) {
-@@ -134,11 +145,6 @@ static void ath79_spi_cleanup_cs(struct
+@@ -134,11 +145,6 @@ static void ath79_spi_cleanup_cs(struct
struct ath79_spi_controller_data *cdata = spi->controller_data;
gpio_free(cdata->gpio);
}
struct ath79_spi {
struct spi_bitbang bitbang;
u32 ioc_base;
-@@ -62,6 +64,7 @@ static void ath79_spi_chipselect(struct
+@@ -62,6 +64,7 @@ static void ath79_spi_chipselect(struct
{
struct ath79_spi *sp = ath79_spidev_to_sp(spi);
int cs_high = (spi->mode & SPI_CS_HIGH) ? is_active : !is_active;
if (is_active) {
/* set initial clock polarity */
-@@ -73,20 +76,21 @@ static void ath79_spi_chipselect(struct
+@@ -73,20 +76,21 @@ static void ath79_spi_chipselect(struct
ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base);
}
#define DRIVER_NAME "wndr3700-led-usb"
-@@ -20,14 +21,14 @@ static void wndr3700_usb_led_set(struct
+@@ -20,14 +21,14 @@ static void wndr3700_usb_led_set(struct
enum led_brightness brightness)
{
if (brightness)
u32 t;
t = __raw_readl(base + AR71XX_GPIO_REG_OUT);
-@@ -236,7 +234,7 @@ static int rb750_nand_verify_buf(struct
+@@ -236,7 +234,7 @@ static int rb750_nand_verify_buf(struct
static void __init rb750_nand_gpio_init(void)
{
#ifdef RB4XX_SPI_DEBUG
static inline void do_spi_delay(void)
-@@ -60,10 +67,11 @@ static inline void do_spi_delay(void) {
+@@ -60,10 +67,11 @@ static inline void do_spi_delay(void) {
static inline void do_spi_init(struct spi_device *spi)
{
#endif /* __ATH79_COMMON_H */
--- a/arch/mips/ath79/gpio.c
+++ b/arch/mips/ath79/gpio.c
-@@ -184,6 +184,34 @@ void ath79_gpio_function_setup(u32 set,
+@@ -184,6 +184,34 @@ void ath79_gpio_function_setup(u32 set,
spin_unlock_irqrestore(&ath79_gpio_lock, flags);
}
#define PB44_GPIO_SW_RESET (PB44_GPIO_EXP_BASE + 6)
#define PB44_GPIO_SW_JUMP (PB44_GPIO_EXP_BASE + 8)
#define PB44_GPIO_LED_JUMP1 (PB44_GPIO_EXP_BASE + 9)
-@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data
+@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data
.cs_line = 0,
};