Summary
cover Summary
Hello,
this patchset adds initial PCI support for 724x Atheros SoCs and initial support for the Ubiquiti Networks XM board (Nanostation Mx, Nanobridge Mx, etc.).
Best Regards
Rene Bolldorf (2):
Initial PCI support for Atheros 724x SoCs. Initial support for the Ubiquiti Networks XM board.
arch/mips/ath79/Kconfig | 12 ++++ arch/mips/ath79/Makefile | 1 + arch/mips/ath79/Platform | 7 ++- arch/mips/ath79/mach-ubnt-xm.c | 110 ++++++++++++++++++++++++++++++++++++++++ arch/mips/ath79/machtypes.h | 1 + arch/mips/pci/Makefile | 1 + arch/mips/pci/ops-ath724x.c | 109 +++++++++++++++++++++++++++++++++++++++ arch/mips/pci/pci-ath724x.c | 45 ++++++++++++++++ 8 files changed, 283 insertions(+), 3 deletions(-) create mode 100644 arch/mips/ath79/mach-ubnt-xm.c create mode 100644 arch/mips/pci/ops-ath724x.c create mode 100644 arch/mips/pci/pci-ath724x.c
Signature · 1 line
1.7.7.1
PATCH 1/2 Initial PCI support for Atheros 724x SoCs.
--- arch/mips/pci/Makefile | 1 + arch/mips/pci/ops-ath724x.c | 109 +++++++++++++++++++++++++++++++++++++++++++ arch/mips/pci/pci-ath724x.c | 45 ++++++++++++++++++ 3 files changed, 155 insertions(+), 0 deletions(-) create mode 100644 arch/mips/pci/ops-ath724x.c create mode 100644 arch/mips/pci/pci-ath724x.c
arch/mips/pci/Makefile +1 -0
@@ -19,6 +19,7 @@ obj-$(CONFIG_BCM47XX) += pci-bcm47xx.o obj-$(CONFIG_BCM63XX) += pci-bcm63xx.o fixup-bcm63xx.o \ ops-bcm63xx.o obj-$(CONFIG_MIPS_ALCHEMY) += pci-alchemy.o +obj-$(CONFIG_SOC_AR724X) += ops-ath724x.o pci-ath724x.o # # These are still pretty much in the old state, watch, go blind.
arch/mips/pci/ops-ath724x.c new file +109 -0
109 lines not on this page · raw message
arch/mips/pci/pci-ath724x.c new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
1.7.7.1
Re: [PATCH 1/2] Initial PCI support for Atheros 724x SoCs.
Howdy,
Quoted 5 lines · Rene Bolldorf
Signed-off-by Rene Bolldorf <[email protected]>---
arch/mips/pci/Makefile | 1 +
arch/mips/pci/ops-ath724x.c | 109 +++++++++++++++++++++++++++++++++++++++++++arch/mips/pci/pci-ath724x.c| 45 ++++++++++++++++++
Why don't you just merge ops-ath724x.c into pci-ath724x.c? (the only place where its
contents are referenced)
Quoted 6 lines
arch/mips/pci/ops-ath724x.c new file +0
-0@@ -0,0 +1,109 @@
[...]
arch/mips/pci/ops-ath724x.c line 29
Quoted 10 lines
arch/mips/pci/ops-ath724x.c new file +10
-0+static int ath724x_pci_read (struct pci_bus *bus,unsigned int devfn,int where, + int size, uint32_t *value) +{ + unsigned long flags, addr, tval, mask; + + if(devfn) + return PCIBIOS_DEVICE_NOT_FOUND; + + if(where & (size - 1)) + return PCIBIOS_BAD_REGISTER_NUMBER;
Please run both patches through checkpatch once and fix up the codingstyle issues it
will complain about (like the two above).
Thanks,
Manuel Lauss
PATCH 2/2 Initial support for the Ubiquiti Networks XM board.
In reply to Rene Bolldorf--- arch/mips/ath79/Kconfig | 12 ++++ arch/mips/ath79/Makefile | 1 + arch/mips/ath79/Platform | 7 ++- arch/mips/ath79/mach-ubnt-xm.c | 110 ++++++++++++++++++++++++++++++++++++++++ arch/mips/ath79/machtypes.h | 1 + 5 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 arch/mips/ath79/mach-ubnt-xm.c
arch/mips/ath79/Kconfig +12 -0
@@ -23,6 +23,16 @@ config ATH79_MACH_PB44 Say 'Y' here if you want your kernel to support the Atheros PB44 reference board. +config ATH79_MACH_UBNT_XM + bool "Ubiquiti Networks XM board" + select SOC_AR724X + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_SPI + help + Say 'Y' here if you want your kernel to support the + Ubiquiti Networks XM board. + endmenu config SOC_AR71XX
@@ -33,6 +43,8 @@ config SOC_AR71XX config SOC_AR724X select USB_ARCH_HAS_EHCI select USB_ARCH_HAS_OHCI + select HW_HAS_PCI + select PCI def_bool n config SOC_AR913X
arch/mips/ath79/Makefile +1 -0
@@ -26,3 +26,4 @@ obj-$(CONFIG_ATH79_DEV_SPI) += dev-spi.o # obj-$(CONFIG_ATH79_MACH_AP81) += mach-ap81.o obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o +obj-$(CONFIG_ATH79_MACH_UBNT_XM) += mach-ubnt-xm.o
arch/mips/ath79/Platform +4 -3
@@ -2,6 +2,7 @@ # Atheros AR71xx/AR724x/AR913x # -platform-$(CONFIG_ATH79) += ath79/ -cflags-$(CONFIG_ATH79) += -I$(srctree)/arch/mips/include/asm/mach-ath79 -load-$(CONFIG_ATH79) = 0xffffffff80060000 +platform-$(CONFIG_ATH79) += ath79/ +cflags-$(CONFIG_ATH79) += -I$(srctree)/arch/mips/include/asm/mach-ath79 +load-$(CONFIG_ATH79) = 0xffffffff80060000 +load-$(CONFIG_ATH79_MACH_UBNT_XM) = 0xffffffff80002000
arch/mips/ath79/mach-ubnt-xm.c new file +110 -0
110 lines not on this page · raw message
arch/mips/ath79/machtypes.h +1 -0
@@ -18,6 +18,7 @@ enum ath79_mach_type {ATH79_MACH_GENERIC =0 ,ATH79_MACH_AP81 ,/* Atheros AP81 reference board */ ATH79_MACH_PB44 ,/* Atheros PB44 reference board */ + ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board */ };#endif /* _ATH79_MACHTYPE_H */
Signature · 1 line
1.7.7.1
Re: [PATCH 2/2] Initial support for the Ubiquiti Networks XM board.
Hi Rene,
Quoted 32 lines
Signed-off-by Rene Bolldorf <[email protected]>--- arch/mips/ath79/Kconfig | 12 ++++ arch/mips/ath79/Makefile | 1 + arch/mips/ath79/Platform | 7 ++- arch/mips/ath79/mach-ubnt-xm.c | 110 ++++++++++++++++++++++++++++++++++++++++ arch/mips/ath79/machtypes.h | 1 + 5 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 arch/mips/ath79/mach-ubnt-xm.carch/mips/ath79/Kconfig +10
-0@@ -23,6 +23,16 @@ config ATH79_MACH_PB44 Say 'Y' here if you want your kernel to support the Atheros PB44 reference board. +config ATH79_MACH_UBNT_XM + bool "Ubiquiti Networks XM board" + select SOC_AR724X + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_SPI + help + Say 'Y' here if you want your kernel to support the + Ubiquiti Networks XM board. + endmenu config SOC_AR71XX
arch/mips/ath79/Kconfig config SOC_AR71XX · line 47
Quoted 5 lines
arch/mips/ath79/Kconfig +2
-0@@ -33,6 +43,8 @@ config SOC_AR71XX config SOC_AR724X select USB_ARCH_HAS_EHCI select USB_ARCH_HAS_OHCI + select HW_HAS_PCI + select PCI
Please don't select the whole PCI subsystem. Even if the hardware has PCI support, not everyone wants to build a kernel with PCI support.
Quoted 17 lines
arch/mips/ath79/Kconfig +0
-0def_bool n config SOC_AR913Xarch/mips/ath79/Makefile +1
-0@@ -26,3 +26,4 @@ obj-$(CONFIG_ATH79_DEV_SPI) += dev-spi.o # obj-$(CONFIG_ATH79_MACH_AP81) += mach-ap81.o obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o +obj-$(CONFIG_ATH79_MACH_UBNT_XM) += mach-ubnt-xm.oarch/mips/ath79/Platform +0
-0
arch/mips/ath79/Platform line 8
Quoted 10 lines
arch/mips/ath79/Platform +4
-3@@ -2,6 +2,7 @@ # Atheros AR71xx/AR724x/AR913x # -platform-$(CONFIG_ATH79) += ath79/ -cflags-$(CONFIG_ATH79) += -I$(srctree)/arch/mips/include/asm/mach-ath79 -load-$(CONFIG_ATH79) = 0xffffffff80060000 +platform-$(CONFIG_ATH79) += ath79/ +cflags-$(CONFIG_ATH79) += -I$(srctree)/arch/mips/include/asm/mach-ath79 +load-$(CONFIG_ATH79) = 0xffffffff80060000 +load-$(CONFIG_ATH79_MACH_UBNT_XM) = 0xffffffff80002000
Please don't add another load address here.The ath79 platform code has been designed in a way which allows a single kernel image to run on all AR71xx/AR724x/AR913X/AR933x based boards, and the 0x80060000 load address has been chosen due to compatibility reasons. It allows to boot the kernel on older boards which are using RedBoot as the bootloader. The U-Boot on the AR724x/AR933x based boards can load the kernel to 0x8006000.
Quoted 48 lines
arch/mips/ath79/mach-ubnt-xm.c new file +42
-0@@ -0,0 +1,110 @@ +/* +* Ubiquiti Networks XM board support +* +* Copyright (C) 2011 René Bolldorf <[email protected]> +* +* Derived from: mach-pb44.c +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License version 2 as published +* by the Free Software Foundation. +*/ + +#include <linux/init.h> +#include <linux/pci.h> +#include <linux/ath9k_platform.h> + +#include "machtypes.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-spi.h" + +#define UBNT_XM_GPIO_LED_L1 0 +#define UBNT_XM_GPIO_LED_L2 1 +#define UBNT_XM_GPIO_LED_L3 11 +#define UBNT_XM_GPIO_LED_L4 7 + +#define UBNT_XM_GPIO_BTN_RESET 12 + +#define UBNT_XM_KEYS_POLL_INTERVAL 20 +#define UBNT_XM_KEYS_DEBOUNCE_INTERVAL (3 * UBNT_XM_KEYS_POLL_INTERVAL) + +#define UBNT_XM_PCI_IRQ 48 +#define UBNT_XM_EEPROM_ADDR (u8 *) KSEG1ADDR(0x1fff1000) + +static struct gpio_led ubnt_xm_leds_gpio[]__initdata = { + { + .name ="signal:poor" , + .gpio =UBNT_XM_GPIO_LED_L1 , + .active_low =0 , + }, { + .name ="signal:bad" , + .gpio =UBNT_XM_GPIO_LED_L2 ,
arch/mips/ath79/mach-ubnt-xm.c line 52
Quoted 10 lines
arch/mips/ath79/mach-ubnt-xm.c new file +10
-0+ .active_low = 0, + }, { + .name = "signal:good", + .gpio = UBNT_XM_GPIO_LED_L3, + .active_low = 0, + }, { + .name = "signal:excellent", + .gpio = UBNT_XM_GPIO_LED_L4, + .active_low = 0, + },
The LED names should follow the Linux LED Device Naming convention. See Documentation/leds/leds-class.txt.
Quoted 30 lines
arch/mips/ath79/mach-ubnt-xm.c new file +30
-0+}; + +static struct gpio_keys_button ubnt_xm_gpio_keys[]__initdata = { + { + .desc ="reset" , + .type =EV_KEY , + .code =KEY_RESTART , + .debounce_interval =UBNT_XM_KEYS_DEBOUNCE_INTERVAL , + .gpio =UBNT_XM_GPIO_BTN_RESET , + .active_low =1 , + } +}; + +static struct spi_board_info ubnt_xm_spi_info[] = { + { + .bus_num =0 , + .chip_select =0 , + .max_speed_hz =25000000 , + .modalias ="mx25l6405d" , + } +}; + +static struct ath79_spi_platform_data ubnt_xm_spi_data = { + .bus_num =0 , + .num_chipselect =1 , +}; + +static struct ath9k_platform_data ubnt_xm_eeprom_data; + +int __init pcibios_map_irq (const struct pci_dev *dev,uint8_t slot,uint8_t pin)
arch/mips/ath79/mach-ubnt-xm.c line 92
Quoted 10 lines
arch/mips/ath79/mach-ubnt-xm.c new file +10
-0+{ +return UBNT_XM_PCI_IRQ ; +} + +int pcibios_plat_dev_init (struct pci_dev *dev) +{ + dev->dev.platform_data = &ubnt_xm_eeprom_data; + +return 0 ; +}
The 'pci_bios_map_irq' and 'pcibios_plat_dev_init' functions are global, so you can have only one instance of them within the kernel. Adding these functions into a machine specific file would prevent to build a kernel which supports multiple different boards.
arch/mips/ath79/mach-ubnt-xm.c line 97
Quoted 5 lines
arch/mips/ath79/mach-ubnt-xm.c new file +5
-0+ +static void __init ubnt_xm_init (void ) +{ +ath79_register_leds_gpio (-1 ,ARRAY_SIZE (ubnt_xm_leds_gpio), + ubnt_xm_leds_gpio);
The Ubiquiti xM family has several different models. Registering all of these LEDs on every XM board makes no sense, the number of the LEDs and the assigned GPIO lines varies between the different boards.
Quoted 25 lines
arch/mips/ath79/mach-ubnt-xm.c new file +13
-0+ +ath79_register_gpio_keys_polled (-1 ,UBNT_XM_KEYS_POLL_INTERVAL , +ARRAY_SIZE (ubnt_xm_gpio_keys), + ubnt_xm_gpio_keys); + +ath79_register_spi (&ubnt_xm_spi_data, ubnt_xm_spi_info, +ARRAY_SIZE (ubnt_xm_spi_info)); + +memcpy (ubnt_xm_eeprom_data.eeprom_data,UBNT_XM_EEPROM_ADDR , +sizeof (ubnt_xm_eeprom_data.eeprom_data)); +} + +MIPS_MACHINE (ATH79_MACH_UBNT_XM ,"UBNT-XM" ,"Ubiquiti Networks XM board" , ubnt_xm_init);arch/mips/ath79/machtypes.h +1
-0@@ -18,6 +18,7 @@ enum ath79_mach_type {ATH79_MACH_GENERIC =0 ,ATH79_MACH_AP81 ,/* Atheros AP81 reference board */ ATH79_MACH_PB44 ,/* Atheros PB44 reference board */ + ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board */ };#endif /* _ATH79_MACHTYPE_H */
A message that is not in the archive (sent off-list or not yet received): CAEWqx58YQAKQ=D=qteipHQq5Q==+aEiKMYP4FczMZ9kReogMDQ@mail.gmail.com
Re: [PATCH 2/2] Initial support for the Ubiquiti Networks XM board.
Did not reply to all.....
2011/11/16 René Bolldorf <[email protected]>:
Quoted 231 lines · Gabor Juhos
Quoted 186 lines
Hi Rene,
Quoted 32 lines
Signed-off-by Rene Bolldorf <[email protected]>---
arch/mips/ath79/Kconfig | 12 ++++arch/mips/ath79/Makefile| 1 +
arch/mips/ath79/Platform | 7 ++-arch/mips/ath79/mach-ubnt-xm.c| 110 ++++++++++++++++++++++++++++++++++++++++arch/mips/ath79/machtypes.h| 1 +5 files changed, 128 insertions(+), 3 deletions(-)create mode 100644
arch/mips/ath79/mach-ubnt-xm.carch/mips/ath79/Kconfig +0
-0@@ -23,6 +23,16 @@ config ATH79_MACH_PB44Say 'Y' here if you want your kernel to support the Atheros PB44 reference board.
arch/mips/ath79/Kconfig +10
-0+config ATH79_MACH_UBNT_XM + bool "Ubiquiti Networks XM board" + select SOC_AR724X + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_SPI + help + Say 'Y' here if you want your kernel to support the + Ubiquiti Networks XM board. +endmenu
config
SOC_AR71XXarch/mips/ath79/Kconfig +0
-0@@ -33,6 +43,8 @@ config SOC_AR71XXQuoted 5 lines
config
SOC_AR724X
selectUSB_ARCH_HAS_EHCI
selectUSB_ARCH_HAS_OHCI
+ selectHW_HAS_PCI
+ select PCIPlease don't select the whole PCI subsystem. Even if the hardware has PCI support, not everyone wants to build a kernel with PCI support.
Quoted 17 lines
def_boolnconfig
SOC_AR913Xarch/mips/ath79/Makefile +0
-0@@ -26,3 +26,4 @@ obj-$(CONFIG_ATH79_DEV_SPI) += dev-spi.o #obj-$(CONFIG_ATH79_MACH_AP81) += mach-ap81.o obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o
arch/mips/ath79/Makefile +1
-0+obj-$(CONFIG_ATH79_MACH_UBNT_XM) += mach-ubnt-xm.oarch/mips/ath79/Platform +0
-0arch/mips/ath79/Platform line 8
Quoted 10 lines
arch/mips/ath79/Platform +4
-3@@ -2,6 +2,7 @@ # Atheros AR71xx/AR724x/AR913x # -platform-$(CONFIG_ATH79) += ath79/ -cflags-$(CONFIG_ATH79) += -I$(srctree)/arch/mips/include/asm/mach-ath79 -load-$(CONFIG_ATH79) = 0xffffffff80060000 +platform-$(CONFIG_ATH79) += ath79/ +cflags-$(CONFIG_ATH79) += -I$(srctree)/arch/mips/include/asm/mach-ath79 +load-$(CONFIG_ATH79) = 0xffffffff80060000 +load-$(CONFIG_ATH79_MACH_UBNT_XM) = 0xffffffff80002000Please don't add another load address here.The ath79 platform code has been designed in a way which allows a single kernel image to run on all AR71xx/AR724x/AR913X/AR933x based boards, and the
0x80060000load address has been chosen due to compatibility reasons. It allows to boot the kernel on older boards which are using RedBoot as the bootloader. The U-Boot on the AR724x/AR933x based boards can load the kernel to0x8006000.Quoted 48 lines
arch/mips/ath79/mach-ubnt-xm.c new file +42
-0@@ -0,0 +1,110 @@ +/* +* Ubiquiti Networks XM board support +* +* Copyright (C) 2011 René Bolldorf <[email protected]> +* +* Derived from: mach-pb44.c +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License version 2 as published +* by the Free Software Foundation. +*/ + +#include <linux/init.h> +#include <linux/pci.h> +#include <linux/ath9k_platform.h> + +#include "machtypes.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-spi.h" + +#define UBNT_XM_GPIO_LED_L1 0 +#define UBNT_XM_GPIO_LED_L2 1 +#define UBNT_XM_GPIO_LED_L3 11 +#define UBNT_XM_GPIO_LED_L4 7 + +#define UBNT_XM_GPIO_BTN_RESET 12 + +#define UBNT_XM_KEYS_POLL_INTERVAL 20 +#define UBNT_XM_KEYS_DEBOUNCE_INTERVAL (3 * UBNT_XM_KEYS_POLL_INTERVAL) + +#define UBNT_XM_PCI_IRQ 48 +#define UBNT_XM_EEPROM_ADDR (u8 *) KSEG1ADDR(0x1fff1000) + +static struct gpio_led ubnt_xm_leds_gpio[]__initdata = { + { + .name = "signal:poor", + .gpio = UBNT_XM_GPIO_LED_L1, + .active_low = 0, + }, { + .name = "signal:bad", + .gpio = UBNT_XM_GPIO_LED_L2,arch/mips/ath79/mach-ubnt-xm.c line 52
Quoted 10 lines
arch/mips/ath79/mach-ubnt-xm.c new file +10
-0+ .active_low = 0, + }, { + .name = "signal:good", + .gpio = UBNT_XM_GPIO_LED_L3, + .active_low = 0, + }, { + .name = "signal:excellent", + .gpio = UBNT_XM_GPIO_LED_L4, + .active_low = 0, + },The LED names should follow the Linux LED Device Naming convention. See
Documentation/leds/leds-class.txt.Quoted 30 lines
arch/mips/ath79/mach-ubnt-xm.c new file +30
-0+}; + +static struct gpio_keys_button ubnt_xm_gpio_keys[]__initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = UBNT_XM_KEYS_DEBOUNCE_INTERVAL, + .gpio = UBNT_XM_GPIO_BTN_RESET, + .active_low = 1, + } +}; + +static struct spi_board_info ubnt_xm_spi_info[] = { + { + .bus_num = 0, + .chip_select = 0, + .max_speed_hz = 25000000, + .modalias = "mx25l6405d", + } +}; + +static struct ath79_spi_platform_data ubnt_xm_spi_data = { + .bus_num = 0, + .num_chipselect = 1, +}; + +static struct ath9k_platform_data ubnt_xm_eeprom_data; + +int __init pcibios_map_irq (const struct pci_dev *dev,uint8_t slot,uint8_t pin)arch/mips/ath79/mach-ubnt-xm.c line 92
Quoted 10 lines
arch/mips/ath79/mach-ubnt-xm.c new file +10
-0+{ + return UBNT_XM_PCI_IRQ; +} + +int pcibios_plat_dev_init (struct pci_dev *dev) +{ + dev->dev.platform_data = &ubnt_xm_eeprom_data; + + return 0; +}The '
pci_bios_map_irq' and 'pcibios_plat_dev_init' functions are global, so you can have only one instance of them within the kernel. Adding these functions into a machine specific file would prevent to build a kernel which supports multiple different boards.Quoted 9 lines
arch/mips/ath79/mach-ubnt-xm.c line 97
Quoted 5 lines
arch/mips/ath79/mach-ubnt-xm.c new file +5
-0+ +static void __init ubnt_xm_init (void ) +{ + ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_xm_leds_gpio), + ubnt_xm_leds_gpio);The Ubiquiti xM family has several different models. Registering all of the assigned GPIO lines varies between the different boards.
I know that the GPIO lines from NanoBridge, Picostation and Rocket with board revision v1 are the same.
I note this in the kconf help text.I improve the code and send a V2.
Thank you for the hints.
Quoted 27 lines
Quoted 25 lines
arch/mips/ath79/mach-ubnt-xm.c new file +13
-0+ + ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL, + ARRAY_SIZE(ubnt_xm_gpio_keys), + ubnt_xm_gpio_keys); + + ath79_register_spi(&ubnt_xm_spi_data, ubnt_xm_spi_info, + ARRAY_SIZE(ubnt_xm_spi_info)); + + memcpy(ubnt_xm_eeprom_data.eeprom_data, UBNT_XM_EEPROM_ADDR, + sizeof(ubnt_xm_eeprom_data.eeprom_data)); +} + +MIPS_MACHINE (ATH79_MACH_UBNT_XM ,"UBNT-XM" ,"Ubiquiti Networks XM board" , ubnt_xm_init);arch/mips/ath79/machtypes.h +0
-0@@ -18,6 +18,7 @@ enum ath79_mach_type { ATH79_MACH_GENERIC = 0,
ATH79_MACH_AP81, /* Atheros AP81 reference board */ATH79_MACH_PB44, /* Atheros PB44 reference board */
+ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board */ };#endif /*
_ATH79_MACHTYPE_H*/
cover Summary
Here is patchset v2 with coding style fixes and code improvements.
Rene Bolldorf (2):
Initial PCI support for Atheros 724x SoCs. (v2)
Initial support for the Ubiquiti Networks XM board (rev 1.0). (patch
v2)
arch/mips/ath79/Kconfig | 11 ++ arch/mips/ath79/Makefile | 1 + arch/mips/ath79/mach-ubnt-xm.c | 119 ++++++++++++++++ arch/mips/ath79/machtypes.h | 1 + arch/mips/include/asm/mach-ath79/pci-ath724x.h | 21 +++ arch/mips/pci/Makefile | 1 + arch/mips/pci/pci-ath724x.c | 174 ++++++++++++++++++++++++ 7 files changed, 328 insertions(+), 0 deletions(-) create mode 100644 arch/mips/ath79/mach-ubnt-xm.c create mode 100644 arch/mips/include/asm/mach-ath79/pci-ath724x.h create mode 100644 arch/mips/pci/pci-ath724x.c
Signature · 1 line
1.7.7.1
PATCH 1/2 Initial PCI support for Atheros 724x SoCs. (v2)
--- arch/mips/include/asm/mach-ath79/pci-ath724x.h | 21 +++ arch/mips/pci/Makefile | 1 + arch/mips/pci/pci-ath724x.c | 174 ++++++++++++++++++++++++ 3 files changed, 196 insertions(+), 0 deletions(-) create mode 100644 arch/mips/include/asm/mach-ath79/pci-ath724x.h create mode 100644 arch/mips/pci/pci-ath724x.c
arch/mips/include/asm/mach-ath79/pci-ath724x.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* Atheros 724x PCI support +* +* Copyright (C) 2011 René Bolldorf <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License version 2 as published +* by the Free Software Foundation. +*/ + +#ifndef __ASM_MACH_ATH79_PCI_ATH724X_H +#define __ASM_MACH_ATH79_PCI_ATH724X_H + +struct ath724x_pci_data { +int irq; +void *pdata; +}; + +void ath724x_pci_add_data (struct ath724x_pci_data *data,int size); + +#endif /* __ASM_MACH_ATH79_PCI_ATH724X_H */
arch/mips/pci/Makefile +1 -0
@@ -19,6 +19,7 @@ obj-$(CONFIG_BCM47XX) += pci-bcm47xx.o obj-$(CONFIG_BCM63XX) += pci-bcm63xx.o fixup-bcm63xx.o \ ops-bcm63xx.o obj-$(CONFIG_MIPS_ALCHEMY) += pci-alchemy.o +obj-$(CONFIG_SOC_AR724X) += pci-ath724x.o # # These are still pretty much in the old state, watch, go blind.
arch/mips/pci/pci-ath724x.c new file +174 -0
174 lines not on this page · raw message
Signature · 1 line
1.7.7.1
Re: [PATCH 1/2] Initial PCI support for Atheros 724x SoCs. (v2)
On Thu, Nov 17, 2011 at 03:02:56PM +0100, Rene Bolldorf wrote:
Queued for 3.3 but:
Quoted 1 line
Subject: [PATCH 1/2] Initial PCI support for Atheros 724x SoCs. (v2)
Please don't put the (v2) at the end of the subject line but rather into the initial part with the square brackets like:
Subject: [PATCH 1/2, v2] Initial PCI support for Atheros 724x SoCs.
That's so software like git-am will automatically discard that when applying a patch.
Your use of non-ASCII characters is not quite yet supported in patchwork, see:
http://patchwork.linux-mips.org/patch/3019/
http://patchwork.linux-mips.org/patch/3020/
My surname's spelling is also suffering from ASCII brain damaged software ...
arch/mips/pci/pci-ath724x.c line 46
Quoted 9 lines
arch/mips/pci/pci-ath724x.c new file +9
-0+switch (size) { +case 1 : + addr = where & ~3 ; + mask =0xff000000 >> ((where %4 ) *8 ); + tval =reg_read (ATH724X_PCI_DEV_BASE + addr); + tval = tval & ~mask; + *value = (tval >> ((4 - (where %4 ))*8 )); +break ; +case 2 :
That's a very odd style of formatting. The Linux coding style (see Documentation/) wants the break keyword indented with the same number of tabs as the preceeding block.
Anyway, I took care of that.
Thanks,
Ralf
PATCH 2/2 Initial support for the Ubiquiti Networks XM board (rev 1.0). (patch v2)
In reply to Rene Bolldorf--- arch/mips/ath79/Kconfig | 11 ++++ arch/mips/ath79/Makefile | 1 + arch/mips/ath79/mach-ubnt-xm.c | 119 ++++++++++++++++++++++++++++++++++++++++ arch/mips/ath79/machtypes.h | 1 + 4 files changed, 132 insertions(+), 0 deletions(-) create mode 100644 arch/mips/ath79/mach-ubnt-xm.c
arch/mips/ath79/Kconfig +11 -0
@@ -23,6 +23,16 @@ config ATH79_MACH_PB44 Say 'Y' here if you want your kernel to support the Atheros PB44 reference board. +config ATH79_MACH_UBNT_XM + bool "Ubiquiti Networks XM (rev 1.0) board" + select SOC_AR724X + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_SPI + help + Say 'Y' here if you want your kernel to support the + Ubiquiti Networks XM (rev 1.0) board. + endmenu config SOC_AR71XX
@@ -33,6 +43,7 @@ config SOC_AR71XX config SOC_AR724X select USB_ARCH_HAS_EHCI select USB_ARCH_HAS_OHCI + select HW_HAS_PCI def_bool n config SOC_AR913X
arch/mips/ath79/Makefile +1 -0
@@ -26,3 +26,4 @@ obj-$(CONFIG_ATH79_DEV_SPI) += dev-spi.o # obj-$(CONFIG_ATH79_MACH_AP81) += mach-ap81.o obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o +obj-$(CONFIG_ATH79_MACH_UBNT_XM) += mach-ubnt-xm.o
arch/mips/ath79/mach-ubnt-xm.c new file +119 -0
119 lines not on this page · raw message
arch/mips/ath79/machtypes.h +1 -0
@@ -18,6 +18,7 @@ enum ath79_mach_type {ATH79_MACH_GENERIC =0 ,ATH79_MACH_AP81 ,/* Atheros AP81 reference board */ ATH79_MACH_PB44 ,/* Atheros PB44 reference board */ + ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board rev 1.0 */ };#endif /* _ATH79_MACHTYPE_H */
Signature · 1 line
1.7.7.1
Re: [PATCH 2/2] Initial support for the Ubiquiti Networks XM board (rev 1.0). (patch v2)
Queued for 3.3 as well.
Thanks,
Ralf