atheros: v3.18: cleanup includes

Remove odd and add missed includes.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 44730
This commit is contained in:
Felix Fietkau 2015-03-13 03:01:50 +00:00
parent 1b5b20e51e
commit 7a46e008fb
9 changed files with 53 additions and 75 deletions

View File

@ -77,7 +77,7 @@
+obj-$(CONFIG_SOC_AR2315) += ar2315.o
--- /dev/null
+++ b/arch/mips/ath25/board.c
@@ -0,0 +1,244 @@
@@ -0,0 +1,235 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
@ -89,17 +89,8 @@
+ * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org>
+ */
+
+#include <generated/autoconf.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/string.h>
+#include <linux/platform_device.h>
+#include <linux/kernel.h>
+#include <linux/random.h>
+#include <linux/etherdevice.h>
+#include <linux/irq.h>
+#include <linux/io.h>
+#include <linux/interrupt.h>
+#include <asm/irq_cpu.h>
+#include <asm/reboot.h>
+#include <asm/bootinfo.h>
@ -1102,7 +1093,7 @@
+#endif /* __ASM_MACH_ATH25_AR2315_REGS_H */
--- /dev/null
+++ b/arch/mips/ath25/ar5312_regs.h
@@ -0,0 +1,225 @@
@@ -0,0 +1,223 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
@ -1116,8 +1107,6 @@
+#ifndef __ASM_MACH_ATH25_AR5312_REGS_H
+#define __ASM_MACH_ATH25_AR5312_REGS_H
+
+#include <asm/addrspace.h>
+
+/*
+ * IRQs
+ */
@ -1330,7 +1319,7 @@
+#endif /* __ASM_MACH_ATH25_AR5312_REGS_H */
--- /dev/null
+++ b/arch/mips/ath25/ar5312.c
@@ -0,0 +1,401 @@
@@ -0,0 +1,396 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
@ -1347,22 +1336,17 @@
+ * Platform devices for Atheros SoCs
+ */
+
+#include <generated/autoconf.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/string.h>
+#include <linux/mtd/physmap.h>
+#include <linux/platform_device.h>
+#include <linux/kernel.h>
+#include <linux/bitops.h>
+#include <linux/irqdomain.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/physmap.h>
+#include <linux/reboot.h>
+#include <asm/bootinfo.h>
+#include <asm/reboot.h>
+#include <asm/time.h>
+#include <linux/irq.h>
+#include <linux/io.h>
+
+#include <ath25_platform.h>
+
@ -1734,7 +1718,7 @@
+}
--- /dev/null
+++ b/arch/mips/ath25/ar2315.c
@@ -0,0 +1,312 @@
@@ -0,0 +1,307 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
@ -1751,21 +1735,16 @@
+ * Platform devices for Atheros SoCs
+ */
+
+#include <generated/autoconf.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/string.h>
+#include <linux/platform_device.h>
+#include <linux/kernel.h>
+#include <linux/bitops.h>
+#include <linux/irqdomain.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+#include <linux/reboot.h>
+#include <asm/bootinfo.h>
+#include <asm/reboot.h>
+#include <asm/time.h>
+#include <linux/irq.h>
+#include <linux/io.h>
+
+#include <ath25_platform.h>
+
@ -2127,10 +2106,12 @@
+#endif
--- /dev/null
+++ b/arch/mips/ath25/devices.h
@@ -0,0 +1,41 @@
@@ -0,0 +1,43 @@
+#ifndef __ATH25_DEVICES_H
+#define __ATH25_DEVICES_H
+
+#include <linux/cpu.h>
+
+#define ATH25_REG_MS(_val, _field) (((_val) & _field##_M) >> _field##_S)
+
+#define ATH25_IRQ_CPU_CLOCK (MIPS_CPU_IRQ_BASE + 7) /* C0_CAUSE: 0x8000 */
@ -2171,11 +2152,9 @@
+#endif
--- /dev/null
+++ b/arch/mips/ath25/devices.c
@@ -0,0 +1,127 @@
@@ -0,0 +1,125 @@
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/serial.h>
+#include <linux/serial_core.h>
+#include <linux/serial_8250.h>
+#include <linux/platform_device.h>
+#include <asm/bootinfo.h>

View File

@ -1,6 +1,6 @@
--- /dev/null
+++ b/arch/mips/ath25/early_printk.c
@@ -0,0 +1,46 @@
@@ -0,0 +1,45 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
@ -12,7 +12,6 @@
+#include <linux/mm.h>
+#include <linux/io.h>
+#include <linux/serial_reg.h>
+#include <asm/addrspace.h>
+
+#include "devices.h"
+#include "ar2315_regs.h"

View File

@ -537,7 +537,7 @@
+ default y
--- a/arch/mips/ath25/ar2315.c
+++ b/arch/mips/ath25/ar2315.c
@@ -139,6 +139,10 @@ static void ar2315_irq_dispatch(void)
@@ -134,6 +134,10 @@ static void ar2315_irq_dispatch(void)
if (pending & CAUSEF_IP3)
do_IRQ(AR2315_IRQ_WLAN0);
@ -548,7 +548,7 @@
else if (pending & CAUSEF_IP2)
do_IRQ(AR2315_IRQ_MISC);
else if (pending & CAUSEF_IP7)
@@ -303,10 +307,62 @@ void __init ar2315_plat_mem_setup(void)
@@ -298,10 +302,62 @@ void __init ar2315_plat_mem_setup(void)
_machine_restart = ar2315_restart;
}

View File

@ -10,15 +10,15 @@
config SOC_AR2315
--- a/arch/mips/ath25/ar5312.c
+++ b/arch/mips/ath25/ar5312.c
@@ -25,6 +25,7 @@
#include <linux/bitops.h>
#include <linux/irqdomain.h>
@@ -22,6 +22,7 @@
#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>
#include <linux/reboot.h>
+#include <linux/gpio.h>
#include <asm/bootinfo.h>
#include <asm/reboot.h>
#include <asm/time.h>
@@ -185,6 +186,22 @@ static struct platform_device ar5312_phy
@@ -180,6 +181,22 @@ static struct platform_device ar5312_phy
.num_resources = 1,
};
@ -41,7 +41,7 @@
static void __init ar5312_flash_init(void)
{
void __iomem *flashctl_base;
@@ -252,6 +269,8 @@ void __init ar5312_init_devices(void)
@@ -247,6 +264,8 @@ void __init ar5312_init_devices(void)
platform_device_register(&ar5312_physmap_flash);

View File

@ -10,16 +10,16 @@
config PCI_AR2315
--- a/arch/mips/ath25/ar2315.c
+++ b/arch/mips/ath25/ar2315.c
@@ -24,6 +24,8 @@
#include <linux/bitops.h>
#include <linux/irqdomain.h>
@@ -21,6 +21,8 @@
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
#include <asm/bootinfo.h>
#include <asm/reboot.h>
#include <asm/time.h>
@@ -172,11 +174,42 @@ void __init ar2315_arch_init_irq(void)
@@ -167,11 +169,42 @@ void __init ar2315_arch_init_irq(void)
ar2315_misc_irq_domain = domain;
}
@ -62,7 +62,7 @@
ath25_add_wmac(0, AR2315_WLAN0_BASE, AR2315_IRQ_WLAN0);
}
@@ -192,8 +225,8 @@ static void ar2315_restart(char *command
@@ -187,8 +220,8 @@ static void ar2315_restart(char *command
/* Cold reset does not work on the AR2315/6, use the GPIO reset bits
* a workaround. Give it some time to attempt a gpio based hardware
* reset (atheros reference design workaround) */
@ -337,9 +337,9 @@
+subsys_initcall(ar2315_gpio_init);
--- a/arch/mips/ath25/devices.h
+++ b/arch/mips/ath25/devices.h
@@ -1,6 +1,11 @@
#ifndef __ATH25_DEVICES_H
#define __ATH25_DEVICES_H
@@ -3,6 +3,11 @@
#include <linux/cpu.h>
+#define AR231X_GPIO_IRQ_BASE 0x30
+

View File

@ -1545,7 +1545,7 @@
*/
--- a/arch/mips/ath25/ar5312_regs.h
+++ b/arch/mips/ath25/ar5312_regs.h
@@ -66,6 +66,10 @@
@@ -64,6 +64,10 @@
#define AR5312_AR5312_REV7 0x0057 /* AR5312 WMAC (AP30-040) */
#define AR5312_AR2313_REV8 0x0058 /* AR2313 WMAC (AP43-030) */
@ -1558,7 +1558,7 @@
#define AR5312_RELOAD 0x0004 /* timer reload value */
--- a/arch/mips/ath25/ar2315.c
+++ b/arch/mips/ath25/ar2315.c
@@ -141,6 +141,8 @@ static void ar2315_irq_dispatch(void)
@@ -136,6 +136,8 @@ static void ar2315_irq_dispatch(void)
if (pending & CAUSEF_IP3)
do_IRQ(AR2315_IRQ_WLAN0);
@ -1567,7 +1567,7 @@
#ifdef CONFIG_PCI_AR2315
else if (pending & CAUSEF_IP5)
do_IRQ(AR2315_IRQ_LCBUS_PCI);
@@ -174,6 +176,29 @@ void __init ar2315_arch_init_irq(void)
@@ -169,6 +171,29 @@ void __init ar2315_arch_init_irq(void)
ar2315_misc_irq_domain = domain;
}
@ -1597,7 +1597,7 @@
static struct resource ar2315_gpio_res[] = {
{
.name = "ar2315-gpio",
@@ -210,6 +235,11 @@ void __init ar2315_init_devices(void)
@@ -205,6 +230,11 @@ void __init ar2315_init_devices(void)
ar2315_gpio_res[1].end = ar2315_gpio_res[1].start;
platform_device_register(&ar2315_gpio);
@ -1611,7 +1611,7 @@
--- a/arch/mips/ath25/ar5312.c
+++ b/arch/mips/ath25/ar5312.c
@@ -137,6 +137,10 @@ static void ar5312_irq_dispatch(void)
@@ -132,6 +132,10 @@ static void ar5312_irq_dispatch(void)
if (pending & CAUSEF_IP2)
do_IRQ(AR5312_IRQ_WLAN0);
@ -1622,7 +1622,7 @@
else if (pending & CAUSEF_IP5)
do_IRQ(AR5312_IRQ_WLAN1);
else if (pending & CAUSEF_IP6)
@@ -168,6 +172,36 @@ void __init ar5312_arch_init_irq(void)
@@ -163,6 +167,36 @@ void __init ar5312_arch_init_irq(void)
ar5312_misc_irq_domain = domain;
}
@ -1659,7 +1659,7 @@
static struct physmap_flash_data ar5312_flash_data = {
.width = 2,
};
@@ -248,6 +282,7 @@ static void __init ar5312_flash_init(voi
@@ -243,6 +277,7 @@ static void __init ar5312_flash_init(voi
void __init ar5312_init_devices(void)
{
struct ath25_boarddata *config;
@ -1667,7 +1667,7 @@
ar5312_flash_init();
@@ -271,8 +306,30 @@ void __init ar5312_init_devices(void)
@@ -266,8 +301,30 @@ void __init ar5312_init_devices(void)
platform_device_register(&ar5312_gpio);
@ -1698,7 +1698,7 @@
if (!ath25_board.radio)
return;
@@ -281,8 +338,18 @@ void __init ar5312_init_devices(void)
@@ -276,8 +333,18 @@ void __init ar5312_init_devices(void)
ath25_add_wmac(0, AR5312_WLAN0_BASE, AR5312_IRQ_WLAN0);
break;
@ -1719,7 +1719,7 @@
break;
--- a/arch/mips/ath25/devices.h
+++ b/arch/mips/ath25/devices.h
@@ -30,6 +30,8 @@ extern struct ar231x_board_config ath25_
@@ -32,6 +32,8 @@ extern struct ar231x_board_config ath25_
extern void (*ath25_irq_dispatch)(void);
int ath25_find_config(phys_addr_t offset, unsigned long size);
@ -1730,7 +1730,7 @@
--- a/arch/mips/ath25/devices.c
+++ b/arch/mips/ath25/devices.c
@@ -14,6 +14,51 @@
@@ -12,6 +12,51 @@
struct ar231x_board_config ath25_board;
enum ath25_soc_type ath25_soc = ATH25_SOC_UNKNOWN;
@ -1782,7 +1782,7 @@
static struct resource ath25_wmac0_res[] = {
{
.name = "wmac0_membase",
@@ -72,6 +117,25 @@ const char *get_system_type(void)
@@ -70,6 +115,25 @@ const char *get_system_type(void)
return soc_type_strings[ath25_soc];
}

View File

@ -594,7 +594,7 @@
+#endif
--- a/arch/mips/ath25/ar2315.c
+++ b/arch/mips/ath25/ar2315.c
@@ -225,6 +225,28 @@ static struct platform_device ar2315_gpi
@@ -220,6 +220,28 @@ static struct platform_device ar2315_gpi
.num_resources = ARRAY_SIZE(ar2315_gpio_res)
};
@ -623,7 +623,7 @@
void __init ar2315_init_devices(void)
{
/* Find board configuration */
@@ -235,6 +257,8 @@ void __init ar2315_init_devices(void)
@@ -230,6 +252,8 @@ void __init ar2315_init_devices(void)
ar2315_gpio_res[1].end = ar2315_gpio_res[1].start;
platform_device_register(&ar2315_gpio);

View File

@ -238,7 +238,7 @@
octeon-wdt-y := octeon-wdt-main.o octeon-wdt-nmi.o
--- a/arch/mips/ath25/ar2315.c
+++ b/arch/mips/ath25/ar2315.c
@@ -225,6 +225,24 @@ static struct platform_device ar2315_gpi
@@ -220,6 +220,24 @@ static struct platform_device ar2315_gpi
.num_resources = ARRAY_SIZE(ar2315_gpio_res)
};
@ -263,7 +263,7 @@
static struct resource ar2315_spiflash_res[] = {
{
.name = "spiflash_read",
@@ -257,6 +275,11 @@ void __init ar2315_init_devices(void)
@@ -252,6 +270,11 @@ void __init ar2315_init_devices(void)
ar2315_gpio_res[1].end = ar2315_gpio_res[1].start;
platform_device_register(&ar2315_gpio);

View File

@ -1,6 +1,6 @@
--- a/arch/mips/ath25/ar2315.c
+++ b/arch/mips/ath25/ar2315.c
@@ -26,6 +26,7 @@
@@ -23,6 +23,7 @@
#include <linux/reboot.h>
#include <linux/delay.h>
#include <linux/gpio.h>
@ -8,7 +8,7 @@
#include <asm/bootinfo.h>
#include <asm/reboot.h>
#include <asm/time.h>
@@ -265,6 +266,50 @@ static struct platform_device ar2315_spi
@@ -260,6 +261,50 @@ static struct platform_device ar2315_spi
.num_resources = ARRAY_SIZE(ar2315_spiflash_res)
};
@ -59,7 +59,7 @@
void __init ar2315_init_devices(void)
{
/* Find board configuration */
@@ -275,6 +320,8 @@ void __init ar2315_init_devices(void)
@@ -270,6 +315,8 @@ void __init ar2315_init_devices(void)
ar2315_gpio_res[1].end = ar2315_gpio_res[1].start;
platform_device_register(&ar2315_gpio);
@ -70,15 +70,15 @@
ar2315_wdt_res[1].end = ar2315_wdt_res[1].start;
--- a/arch/mips/ath25/ar5312.c
+++ b/arch/mips/ath25/ar5312.c
@@ -26,6 +26,7 @@
#include <linux/irqdomain.h>
@@ -23,6 +23,7 @@
#include <linux/mtd/physmap.h>
#include <linux/reboot.h>
#include <linux/gpio.h>
+#include <linux/leds.h>
#include <asm/bootinfo.h>
#include <asm/reboot.h>
#include <asm/time.h>
@@ -236,6 +237,23 @@ static struct platform_device ar5312_gpi
@@ -231,6 +232,23 @@ static struct platform_device ar5312_gpi
.num_resources = ARRAY_SIZE(ar5312_gpio_res),
};
@ -102,7 +102,7 @@
static void __init ar5312_flash_init(void)
{
void __iomem *flashctl_base;
@@ -306,6 +324,11 @@ void __init ar5312_init_devices(void)
@@ -301,6 +319,11 @@ void __init ar5312_init_devices(void)
platform_device_register(&ar5312_gpio);