1 From c1999a36c113e583f785728b3d8f7a26412c61cd Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Fri, 18 Nov 2011 00:17:54 +0000
4 Subject: [PATCH 26/27] MIPS: ath79: Rename dev-ar913x-wmac.c to dev-wmac.c
6 Rename the file as a last step of the 'ar913x' removal changes.
8 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
9 Cc: Imre Kaloz <kaloz@openwrt.org>
10 Cc: linux-mips@linux-mips.org
11 Patchwork: https://patchwork.linux-mips.org/patch/3034/
12 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 arch/mips/ath79/Makefile | 2 +-
15 arch/mips/ath79/dev-ar913x-wmac.c | 109 -------------------------------------
16 arch/mips/ath79/dev-wmac.c | 109 +++++++++++++++++++++++++++++++++++++
17 3 files changed, 110 insertions(+), 110 deletions(-)
18 delete mode 100644 arch/mips/ath79/dev-ar913x-wmac.c
19 create mode 100644 arch/mips/ath79/dev-wmac.c
21 --- a/arch/mips/ath79/Makefile
22 +++ b/arch/mips/ath79/Makefile
23 @@ -20,7 +20,7 @@ obj-$(CONFIG_ATH79_DEV_GPIO_BUTTONS) +=
24 obj-$(CONFIG_ATH79_DEV_LEDS_GPIO) += dev-leds-gpio.o
25 obj-$(CONFIG_ATH79_DEV_SPI) += dev-spi.o
26 obj-$(CONFIG_ATH79_DEV_USB) += dev-usb.o
27 -obj-$(CONFIG_ATH79_DEV_WMAC) += dev-ar913x-wmac.o
28 +obj-$(CONFIG_ATH79_DEV_WMAC) += dev-wmac.o
32 --- a/arch/mips/ath79/dev-ar913x-wmac.c
36 - * Atheros AR913X/AR933X SoC built-in WMAC device support
38 - * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org>
39 - * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
41 - * This program is free software; you can redistribute it and/or modify it
42 - * under the terms of the GNU General Public License version 2 as published
43 - * by the Free Software Foundation.
46 -#include <linux/init.h>
47 -#include <linux/delay.h>
48 -#include <linux/irq.h>
49 -#include <linux/platform_device.h>
50 -#include <linux/ath9k_platform.h>
52 -#include <asm/mach-ath79/ath79.h>
53 -#include <asm/mach-ath79/ar71xx_regs.h>
54 -#include "dev-wmac.h"
56 -static struct ath9k_platform_data ath79_wmac_data;
58 -static struct resource ath79_wmac_resources[] = {
60 - /* .start and .end fields are filled dynamically */
61 - .flags = IORESOURCE_MEM,
63 - .start = ATH79_CPU_IRQ_IP2,
64 - .end = ATH79_CPU_IRQ_IP2,
65 - .flags = IORESOURCE_IRQ,
69 -static struct platform_device ath79_wmac_device = {
72 - .resource = ath79_wmac_resources,
73 - .num_resources = ARRAY_SIZE(ath79_wmac_resources),
75 - .platform_data = &ath79_wmac_data,
79 -static void __init ar913x_wmac_setup(void)
81 - /* reset the WMAC */
82 - ath79_device_reset_set(AR913X_RESET_AMBA2WMAC);
85 - ath79_device_reset_clear(AR913X_RESET_AMBA2WMAC);
88 - ath79_wmac_resources[0].start = AR913X_WMAC_BASE;
89 - ath79_wmac_resources[0].end = AR913X_WMAC_BASE + AR913X_WMAC_SIZE - 1;
93 -static int ar933x_wmac_reset(void)
95 - ath79_device_reset_clear(AR933X_RESET_WMAC);
96 - ath79_device_reset_set(AR933X_RESET_WMAC);
101 -static int ar933x_r1_get_wmac_revision(void)
103 - return ath79_soc_rev;
106 -static void __init ar933x_wmac_setup(void)
110 - ar933x_wmac_reset();
112 - ath79_wmac_device.name = "ar933x_wmac";
114 - ath79_wmac_resources[0].start = AR933X_WMAC_BASE;
115 - ath79_wmac_resources[0].end = AR933X_WMAC_BASE + AR933X_WMAC_SIZE - 1;
117 - t = ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP);
118 - if (t & AR933X_BOOTSTRAP_REF_CLK_40)
119 - ath79_wmac_data.is_clk_25mhz = false;
121 - ath79_wmac_data.is_clk_25mhz = true;
123 - if (ath79_soc_rev == 1)
124 - ath79_wmac_data.get_mac_revision = ar933x_r1_get_wmac_revision;
126 - ath79_wmac_data.external_reset = ar933x_wmac_reset;
129 -void __init ath79_register_wmac(u8 *cal_data)
131 - if (soc_is_ar913x())
132 - ar913x_wmac_setup();
133 - if (soc_is_ar933x())
134 - ar933x_wmac_setup();
139 - memcpy(ath79_wmac_data.eeprom_data, cal_data,
140 - sizeof(ath79_wmac_data.eeprom_data));
142 - platform_device_register(&ath79_wmac_device);
145 +++ b/arch/mips/ath79/dev-wmac.c
148 + * Atheros AR913X/AR933X SoC built-in WMAC device support
150 + * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org>
151 + * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
153 + * This program is free software; you can redistribute it and/or modify it
154 + * under the terms of the GNU General Public License version 2 as published
155 + * by the Free Software Foundation.
158 +#include <linux/init.h>
159 +#include <linux/delay.h>
160 +#include <linux/irq.h>
161 +#include <linux/platform_device.h>
162 +#include <linux/ath9k_platform.h>
164 +#include <asm/mach-ath79/ath79.h>
165 +#include <asm/mach-ath79/ar71xx_regs.h>
166 +#include "dev-wmac.h"
168 +static struct ath9k_platform_data ath79_wmac_data;
170 +static struct resource ath79_wmac_resources[] = {
172 + /* .start and .end fields are filled dynamically */
173 + .flags = IORESOURCE_MEM,
175 + .start = ATH79_CPU_IRQ_IP2,
176 + .end = ATH79_CPU_IRQ_IP2,
177 + .flags = IORESOURCE_IRQ,
181 +static struct platform_device ath79_wmac_device = {
184 + .resource = ath79_wmac_resources,
185 + .num_resources = ARRAY_SIZE(ath79_wmac_resources),
187 + .platform_data = &ath79_wmac_data,
191 +static void __init ar913x_wmac_setup(void)
193 + /* reset the WMAC */
194 + ath79_device_reset_set(AR913X_RESET_AMBA2WMAC);
197 + ath79_device_reset_clear(AR913X_RESET_AMBA2WMAC);
200 + ath79_wmac_resources[0].start = AR913X_WMAC_BASE;
201 + ath79_wmac_resources[0].end = AR913X_WMAC_BASE + AR913X_WMAC_SIZE - 1;
205 +static int ar933x_wmac_reset(void)
207 + ath79_device_reset_clear(AR933X_RESET_WMAC);
208 + ath79_device_reset_set(AR933X_RESET_WMAC);
213 +static int ar933x_r1_get_wmac_revision(void)
215 + return ath79_soc_rev;
218 +static void __init ar933x_wmac_setup(void)
222 + ar933x_wmac_reset();
224 + ath79_wmac_device.name = "ar933x_wmac";
226 + ath79_wmac_resources[0].start = AR933X_WMAC_BASE;
227 + ath79_wmac_resources[0].end = AR933X_WMAC_BASE + AR933X_WMAC_SIZE - 1;
229 + t = ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP);
230 + if (t & AR933X_BOOTSTRAP_REF_CLK_40)
231 + ath79_wmac_data.is_clk_25mhz = false;
233 + ath79_wmac_data.is_clk_25mhz = true;
235 + if (ath79_soc_rev == 1)
236 + ath79_wmac_data.get_mac_revision = ar933x_r1_get_wmac_revision;
238 + ath79_wmac_data.external_reset = ar933x_wmac_reset;
241 +void __init ath79_register_wmac(u8 *cal_data)
243 + if (soc_is_ar913x())
244 + ar913x_wmac_setup();
245 + if (soc_is_ar933x())
246 + ar933x_wmac_setup();
251 + memcpy(ath79_wmac_data.eeprom_data, cal_data,
252 + sizeof(ath79_wmac_data.eeprom_data));
254 + platform_device_register(&ath79_wmac_device);