Home | History | Annotate | Line # | Download | only in atheros
ar5312.c revision 1.2
      1  1.2  gdamore /* $NetBSD: ar5312.c,v 1.2 2006/09/04 05:17:26 gdamore Exp $ */
      2  1.1  gdamore 
      3  1.1  gdamore /*
      4  1.1  gdamore  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
      5  1.1  gdamore  * Copyright (c) 2006 Garrett D'Amore.
      6  1.1  gdamore  * All rights reserved.
      7  1.1  gdamore  *
      8  1.1  gdamore  * Portions of this code were written by Garrett D'Amore for the
      9  1.1  gdamore  * Champaign-Urbana Community Wireless Network Project.
     10  1.1  gdamore  *
     11  1.1  gdamore  * Redistribution and use in source and binary forms, with or
     12  1.1  gdamore  * without modification, are permitted provided that the following
     13  1.1  gdamore  * conditions are met:
     14  1.1  gdamore  * 1. Redistributions of source code must retain the above copyright
     15  1.1  gdamore  *    notice, this list of conditions and the following disclaimer.
     16  1.1  gdamore  * 2. Redistributions in binary form must reproduce the above
     17  1.1  gdamore  *    copyright notice, this list of conditions and the following
     18  1.1  gdamore  *    disclaimer in the documentation and/or other materials provided
     19  1.1  gdamore  *    with the distribution.
     20  1.1  gdamore  * 3. All advertising materials mentioning features or use of this
     21  1.1  gdamore  *    software must display the following acknowledgements:
     22  1.1  gdamore  *      This product includes software developed by the Urbana-Champaign
     23  1.1  gdamore  *      Independent Media Center.
     24  1.1  gdamore  *	This product includes software developed by Garrett D'Amore.
     25  1.1  gdamore  * 4. Urbana-Champaign Independent Media Center's name and Garrett
     26  1.1  gdamore  *    D'Amore's name may not be used to endorse or promote products
     27  1.1  gdamore  *    derived from this software without specific prior written permission.
     28  1.1  gdamore  *
     29  1.1  gdamore  * THIS SOFTWARE IS PROVIDED BY THE URBANA-CHAMPAIGN INDEPENDENT
     30  1.1  gdamore  * MEDIA CENTER AND GARRETT D'AMORE ``AS IS'' AND ANY EXPRESS OR
     31  1.1  gdamore  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     32  1.1  gdamore  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     33  1.1  gdamore  * ARE DISCLAIMED.  IN NO EVENT SHALL THE URBANA-CHAMPAIGN INDEPENDENT
     34  1.1  gdamore  * MEDIA CENTER OR GARRETT D'AMORE BE LIABLE FOR ANY DIRECT, INDIRECT,
     35  1.1  gdamore  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     36  1.1  gdamore  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     37  1.1  gdamore  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
     38  1.1  gdamore  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     39  1.1  gdamore  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     40  1.1  gdamore  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
     41  1.1  gdamore  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     42  1.1  gdamore  */
     43  1.1  gdamore 
     44  1.1  gdamore /*
     45  1.1  gdamore  * This file includes a bunch of implementation specific bits for
     46  1.1  gdamore  * AR5312, which differents these from other members of the AR5315
     47  1.1  gdamore  * family.
     48  1.1  gdamore  */
     49  1.1  gdamore #include "opt_ddb.h"
     50  1.1  gdamore #include "opt_kgdb.h"
     51  1.1  gdamore 
     52  1.1  gdamore #include "opt_memsize.h"
     53  1.1  gdamore #include <sys/param.h>
     54  1.1  gdamore #include <sys/systm.h>
     55  1.1  gdamore #include <sys/kernel.h>
     56  1.1  gdamore #include <sys/buf.h>
     57  1.1  gdamore 
     58  1.1  gdamore #include <mips/cache.h>
     59  1.1  gdamore #include <mips/locore.h>
     60  1.1  gdamore #include <mips/cpuregs.h>
     61  1.1  gdamore 
     62  1.2  gdamore #include <sys/socket.h>		/* these three just to get ETHER_ADDR_LEN(!) */
     63  1.2  gdamore #include <net/if.h>
     64  1.2  gdamore #include <net/if_ether.h>
     65  1.2  gdamore 
     66  1.1  gdamore #include <mips/atheros/include/ar5312reg.h>
     67  1.1  gdamore #include <mips/atheros/include/ar531xvar.h>
     68  1.1  gdamore #include <mips/atheros/include/arbusvar.h>
     69  1.1  gdamore #include "com.h"
     70  1.1  gdamore 
     71  1.1  gdamore uint32_t
     72  1.1  gdamore ar531x_memsize(void)
     73  1.1  gdamore {
     74  1.1  gdamore 	uint32_t memsize;
     75  1.1  gdamore 	uint32_t memcfg, bank0, bank1;
     76  1.1  gdamore 
     77  1.1  gdamore 	/*
     78  1.2  gdamore 	 * Determine the memory size as established by system
     79  1.2  gdamore 	 * firmware.
     80  1.1  gdamore 	 *
     81  1.1  gdamore 	 * NB: we allow compile time override
     82  1.1  gdamore 	 */
     83  1.1  gdamore #if defined(MEMSIZE)
     84  1.1  gdamore 	memsize = MEMSIZE;
     85  1.1  gdamore #else
     86  1.1  gdamore 	memcfg = GETSDRAMREG(AR5312_SDRAMCTL_MEM_CFG1);
     87  1.1  gdamore 	bank0 = (memcfg & AR5312_MEM_CFG1_BANK0_MASK) >>
     88  1.1  gdamore 	    AR5312_MEM_CFG1_BANK0_SHIFT;
     89  1.1  gdamore 	bank1 = (memcfg & AR5312_MEM_CFG1_BANK1_MASK) >>
     90  1.1  gdamore 	    AR5312_MEM_CFG1_BANK1_SHIFT;
     91  1.1  gdamore 
     92  1.1  gdamore 	memsize = (bank0 ? (1 << (bank0 + 1)) : 0) +
     93  1.1  gdamore 	    (bank1 ? (1 << (bank1 + 1)) : 0);
     94  1.1  gdamore 	memsize <<= 20;
     95  1.1  gdamore #endif
     96  1.1  gdamore 
     97  1.1  gdamore 	return (memsize);
     98  1.1  gdamore }
     99  1.1  gdamore 
    100  1.1  gdamore void
    101  1.1  gdamore ar531x_wdog(uint32_t period)
    102  1.1  gdamore {
    103  1.1  gdamore 
    104  1.1  gdamore 	if (period == 0) {
    105  1.1  gdamore 		PUTSYSREG(AR5312_SYSREG_WDOG_CTL, AR5312_WDOG_CTL_IGNORE);
    106  1.1  gdamore 		PUTSYSREG(AR5312_SYSREG_WDOG_TIMER, 0);
    107  1.1  gdamore 	} else {
    108  1.1  gdamore 		PUTSYSREG(AR5312_SYSREG_WDOG_TIMER, period);
    109  1.1  gdamore 		PUTSYSREG(AR5312_SYSREG_WDOG_CTL, AR5312_WDOG_CTL_RESET);
    110  1.1  gdamore 	}
    111  1.1  gdamore }
    112  1.1  gdamore 
    113  1.1  gdamore const char *
    114  1.1  gdamore ar531x_cpuname(void)
    115  1.1  gdamore {
    116  1.1  gdamore 	uint32_t	revision;
    117  1.1  gdamore 
    118  1.1  gdamore 	revision = GETSYSREG(AR5312_SYSREG_REVISION);
    119  1.1  gdamore 	switch (AR5312_REVISION_MAJOR(revision)) {
    120  1.1  gdamore 	case AR5312_REVISION_MAJ_AR5311:
    121  1.1  gdamore 		return ("Atheros AR5311");
    122  1.1  gdamore 	case AR5312_REVISION_MAJ_AR5312:
    123  1.1  gdamore 		return ("Atheros AR5312");
    124  1.1  gdamore 	case AR5312_REVISION_MAJ_AR2313:
    125  1.1  gdamore 		return ("Atheros AR2313");
    126  1.1  gdamore 	case AR5312_REVISION_MAJ_AR5315:
    127  1.1  gdamore 		return ("Atheros AR5315");
    128  1.1  gdamore 	default:
    129  1.1  gdamore 		return ("Atheros AR531X");
    130  1.1  gdamore 	}
    131  1.1  gdamore }
    132  1.1  gdamore 
    133  1.1  gdamore void
    134  1.1  gdamore ar531x_consinit(void)
    135  1.1  gdamore {
    136  1.1  gdamore 	/*
    137  1.1  gdamore 	 * Everything related to console initialization is done
    138  1.1  gdamore 	 * in mach_init().
    139  1.1  gdamore 	 */
    140  1.1  gdamore #if NCOM > 0
    141  1.1  gdamore 	/* Setup polled serial for early console I/O */
    142  1.1  gdamore 	/* XXX: pass in CONSPEED? */
    143  1.2  gdamore 	com_arbus_cnattach(AR5312_UART0_BASE, ar531x_bus_freq());
    144  1.1  gdamore #else
    145  1.1  gdamore 	panic("Not configured to use serial console!\n");
    146  1.1  gdamore 	/* not going to see that message now, are we? */
    147  1.1  gdamore #endif
    148  1.1  gdamore }
    149  1.1  gdamore 
    150  1.1  gdamore void
    151  1.1  gdamore ar531x_businit(void)
    152  1.1  gdamore 
    153  1.1  gdamore {
    154  1.1  gdamore 	/*
    155  1.1  gdamore 	 * Clear previous AHB errors
    156  1.1  gdamore 	 */
    157  1.1  gdamore 	GETSYSREG(AR5312_SYSREG_AHBPERR);
    158  1.1  gdamore 	GETSYSREG(AR5312_SYSREG_AHBDMAE);
    159  1.1  gdamore }
    160  1.1  gdamore 
    161  1.1  gdamore uint32_t
    162  1.1  gdamore ar531x_cpu_freq(void)
    163  1.1  gdamore {
    164  1.1  gdamore 	static uint32_t	cpufreq;
    165  1.1  gdamore 	uint32_t	wisoc = GETSYSREG(AR5312_SYSREG_REVISION);
    166  1.1  gdamore 
    167  1.1  gdamore 	uint32_t	predivmask;
    168  1.1  gdamore 	uint32_t	predivshift;
    169  1.1  gdamore 	uint32_t	multmask;
    170  1.1  gdamore 	uint32_t	multshift;
    171  1.1  gdamore 	uint32_t	doublermask;
    172  1.1  gdamore 	uint32_t	divisor;
    173  1.1  gdamore 	uint32_t	multiplier;
    174  1.1  gdamore 	uint32_t	clockctl;
    175  1.1  gdamore 
    176  1.1  gdamore 	const int	predivide_table[4] = { 1, 2, 4, 5 };
    177  1.1  gdamore 
    178  1.1  gdamore 	/* XXX: in theory we might be able to get clock from bootrom */
    179  1.1  gdamore 
    180  1.1  gdamore 	/*
    181  1.1  gdamore 	 * This logic looks at the clock control register and
    182  1.1  gdamore 	 * determines the actual CPU frequency.  These parts lack any
    183  1.1  gdamore 	 * kind of real-time clock on them, but the cpu clocks should
    184  1.1  gdamore 	 * be very accurate -- WiFi requires usec resolution timers.
    185  1.1  gdamore 	 */
    186  1.1  gdamore 
    187  1.1  gdamore 	if (cpufreq) {
    188  1.1  gdamore 		return cpufreq;
    189  1.1  gdamore 	}
    190  1.1  gdamore 
    191  1.1  gdamore 	if (AR5312_REVISION_MAJOR(wisoc) == AR5312_REVISION_MAJ_AR2313) {
    192  1.1  gdamore 		predivmask = AR2313_CLOCKCTL_PREDIVIDE_MASK;
    193  1.1  gdamore 		predivshift = AR2313_CLOCKCTL_PREDIVIDE_SHIFT;
    194  1.1  gdamore 		multmask = AR2313_CLOCKCTL_MULTIPLIER_MASK;
    195  1.1  gdamore 		multshift = AR2313_CLOCKCTL_MULTIPLIER_SHIFT;
    196  1.1  gdamore 		doublermask = AR2313_CLOCKCTL_DOUBLER_MASK;
    197  1.1  gdamore 	} else {
    198  1.1  gdamore 		predivmask = AR5312_CLOCKCTL_PREDIVIDE_MASK;
    199  1.1  gdamore 		predivshift = AR5312_CLOCKCTL_PREDIVIDE_SHIFT;
    200  1.1  gdamore 		multmask = AR5312_CLOCKCTL_MULTIPLIER_MASK;
    201  1.1  gdamore 		multshift = AR5312_CLOCKCTL_MULTIPLIER_SHIFT;
    202  1.1  gdamore 		doublermask = AR5312_CLOCKCTL_DOUBLER_MASK;
    203  1.1  gdamore 	}
    204  1.1  gdamore 
    205  1.1  gdamore 	/*
    206  1.1  gdamore 	 * Note that the source clock involved here is a 40MHz.
    207  1.1  gdamore 	 */
    208  1.1  gdamore 
    209  1.1  gdamore 	clockctl = GETSYSREG(AR5312_SYSREG_CLOCKCTL);
    210  1.1  gdamore 	divisor = predivide_table[(clockctl & predivmask) >> predivshift];
    211  1.1  gdamore 	multiplier = (clockctl & multmask) >> multshift;
    212  1.1  gdamore 
    213  1.1  gdamore 	if (clockctl & doublermask)
    214  1.1  gdamore 		multiplier <<= 1;
    215  1.1  gdamore 
    216  1.1  gdamore 	cpufreq = (40000000 / divisor) * multiplier;
    217  1.1  gdamore 
    218  1.1  gdamore 	return (cpufreq);
    219  1.1  gdamore }
    220  1.1  gdamore 
    221  1.1  gdamore uint32_t
    222  1.2  gdamore ar531x_bus_freq(void)
    223  1.1  gdamore {
    224  1.1  gdamore 	return (ar531x_cpu_freq() / 4);
    225  1.1  gdamore }
    226  1.2  gdamore 
    227  1.2  gdamore static void
    228  1.2  gdamore addprop_data(struct device *dev, const char *name, const uint8_t *data,
    229  1.2  gdamore     int len)
    230  1.2  gdamore {
    231  1.2  gdamore 	prop_data_t	pd;
    232  1.2  gdamore 	pd = prop_data_create_data(data, len);
    233  1.2  gdamore 	KASSERT(pd != NULL);
    234  1.2  gdamore 	if (prop_dictionary_set(device_properties(dev), name, pd) == FALSE) {
    235  1.2  gdamore 		printf("WARNING: unable to set %s property for %s\n",
    236  1.2  gdamore 		    name, device_xname(dev));
    237  1.2  gdamore 	}
    238  1.2  gdamore 	prop_object_release(pd);
    239  1.2  gdamore }
    240  1.2  gdamore 
    241  1.2  gdamore static void
    242  1.2  gdamore addprop_integer(struct device *dev, const char *name, uint32_t val)
    243  1.2  gdamore {
    244  1.2  gdamore 	prop_number_t	pn;
    245  1.2  gdamore 	pn = prop_number_create_integer(val);
    246  1.2  gdamore 	KASSERT(pn != NULL);
    247  1.2  gdamore 	if (prop_dictionary_set(device_properties(dev), name, pn) == FALSE) {
    248  1.2  gdamore 		printf("WARNING: unable to set %s property for %s",
    249  1.2  gdamore 		    name, device_xname(dev));
    250  1.2  gdamore 	}
    251  1.2  gdamore 	prop_object_release(pn);
    252  1.2  gdamore }
    253  1.2  gdamore 
    254  1.2  gdamore void
    255  1.2  gdamore ar531x_device_register(struct device *dev, void *aux)
    256  1.2  gdamore {
    257  1.2  gdamore 	struct arbus_attach_args *aa = aux;
    258  1.2  gdamore 	const struct ar531x_boarddata *info;
    259  1.2  gdamore 
    260  1.2  gdamore 	info = ar531x_board_info();
    261  1.2  gdamore 	if (info == NULL) {
    262  1.2  gdamore 		/* nothing known about this board! */
    263  1.2  gdamore 		return;
    264  1.2  gdamore 	}
    265  1.2  gdamore 
    266  1.2  gdamore 	/*
    267  1.2  gdamore 	 * We don't ever know the boot device.  But that's because the
    268  1.2  gdamore 	 * firmware only loads from the network.
    269  1.2  gdamore 	 */
    270  1.2  gdamore 
    271  1.2  gdamore 	/* Fetch the MAC addresses. */
    272  1.2  gdamore 	if (device_is_a(dev, "ae")) {
    273  1.2  gdamore 		const uint8_t *enet;
    274  1.2  gdamore 
    275  1.2  gdamore 		if (aa->aa_addr == AR5312_ENET0_BASE)
    276  1.2  gdamore 			enet = info->enet0Mac;
    277  1.2  gdamore 		else if (aa->aa_addr == AR5312_ENET1_BASE)
    278  1.2  gdamore 			enet = info->enet1Mac;
    279  1.2  gdamore 		else
    280  1.2  gdamore 			return;
    281  1.2  gdamore 
    282  1.2  gdamore 		addprop_data(dev, "mac-addr", enet, ETHER_ADDR_LEN);
    283  1.2  gdamore 	}
    284  1.2  gdamore 
    285  1.2  gdamore 	if (device_is_a(dev, "ath")) {
    286  1.2  gdamore 		const uint8_t *enet;
    287  1.2  gdamore 
    288  1.2  gdamore 		if (aa->aa_addr == AR5312_WLAN0_BASE)
    289  1.2  gdamore 			enet = info->wlan0Mac;
    290  1.2  gdamore 		else if (aa->aa_addr == AR5312_WLAN1_BASE)
    291  1.2  gdamore 			enet = info->wlan1Mac;
    292  1.2  gdamore 		else
    293  1.2  gdamore 			return;
    294  1.2  gdamore 
    295  1.2  gdamore 		addprop_data(dev, "mac-addr", enet, ETHER_ADDR_LEN);
    296  1.2  gdamore 	}
    297  1.2  gdamore 
    298  1.2  gdamore 	if (device_is_a(dev, "com")) {
    299  1.2  gdamore 		addprop_integer(dev, "frequency", ar531x_cpu_freq() / 4);
    300  1.2  gdamore 	}
    301  1.2  gdamore 
    302  1.2  gdamore 	if (device_is_a(dev, "argpio")) {
    303  1.2  gdamore 		if (info->config & BD_RSTFACTORY) {
    304  1.2  gdamore 			addprop_integer(dev, "reset-pin",
    305  1.2  gdamore 			    info->resetConfigGpio);
    306  1.2  gdamore 		}
    307  1.2  gdamore 		if (info->config & BD_SYSLED) {
    308  1.2  gdamore 			addprop_integer(dev, "sysled-pin",
    309  1.2  gdamore 			    info->sysLedGpio);
    310  1.2  gdamore 		}
    311  1.2  gdamore 	}
    312  1.2  gdamore }
    313  1.2  gdamore 
    314  1.2  gdamore int
    315  1.2  gdamore ar531x_enable_device(const struct ar531x_device *dev)
    316  1.2  gdamore {
    317  1.2  gdamore 	const struct ar531x_boarddata *info;
    318  1.2  gdamore 
    319  1.2  gdamore 	info = ar531x_board_info();
    320  1.2  gdamore 	if (dev->mask && ((dev->mask & info->config) == 0)) {
    321  1.2  gdamore 		return -1;
    322  1.2  gdamore 	}
    323  1.2  gdamore 	if (dev->reset) {
    324  1.2  gdamore 		/* put device into reset */
    325  1.2  gdamore 		PUTSYSREG(AR5312_SYSREG_RESETCTL,
    326  1.2  gdamore 		    GETSYSREG(AR5312_SYSREG_RESETCTL) | dev->reset);
    327  1.2  gdamore 
    328  1.2  gdamore 		delay(15000);	/* XXX: tsleep? */
    329  1.2  gdamore 
    330  1.2  gdamore 		/* take it out of reset */
    331  1.2  gdamore 		PUTSYSREG(AR5312_SYSREG_RESETCTL,
    332  1.2  gdamore 		    GETSYSREG(AR5312_SYSREG_RESETCTL) & ~dev->reset);
    333  1.2  gdamore 
    334  1.2  gdamore 		delay(25);
    335  1.2  gdamore 	}
    336  1.2  gdamore 	if (dev->enable) {
    337  1.2  gdamore 		PUTSYSREG(AR5312_SYSREG_ENABLE,
    338  1.2  gdamore 		    GETSYSREG(AR5312_SYSREG_ENABLE) | dev->enable);
    339  1.2  gdamore 	}
    340  1.2  gdamore 	return 0;
    341  1.2  gdamore }
    342  1.2  gdamore 
    343  1.2  gdamore const struct ar531x_device *
    344  1.2  gdamore ar531x_get_devices(void)
    345  1.2  gdamore {
    346  1.2  gdamore 	static const struct ar531x_device devices[] = {
    347  1.2  gdamore 		{
    348  1.2  gdamore 			"ae",
    349  1.2  gdamore 			AR5312_ENET0_BASE, 0x100000,
    350  1.2  gdamore 			AR5312_IRQ_ENET0, -1,
    351  1.2  gdamore 			AR5312_BOARD_CONFIG_ENET0,
    352  1.2  gdamore 			AR5312_RESET_ENET0 | AR5312_RESET_PHY0,
    353  1.2  gdamore 			AR5312_ENABLE_ENET0
    354  1.2  gdamore 		},
    355  1.2  gdamore 		{
    356  1.2  gdamore 			"ae",
    357  1.2  gdamore 			AR5312_ENET1_BASE, 0x100000,
    358  1.2  gdamore 			AR5312_IRQ_ENET1, -1,
    359  1.2  gdamore 			AR5312_BOARD_CONFIG_ENET1,
    360  1.2  gdamore 			AR5312_RESET_ENET1 | AR5312_RESET_PHY1,
    361  1.2  gdamore 			AR5312_ENABLE_ENET1
    362  1.2  gdamore 		},
    363  1.2  gdamore 		{
    364  1.2  gdamore 			"com",
    365  1.2  gdamore 			AR5312_UART0_BASE, 0x1000,
    366  1.2  gdamore 			AR5312_IRQ_MISC, AR5312_MISC_IRQ_UART0,
    367  1.2  gdamore 			AR5312_BOARD_CONFIG_UART0,
    368  1.2  gdamore 			0,
    369  1.2  gdamore 			0,
    370  1.2  gdamore 		},
    371  1.2  gdamore 		{
    372  1.2  gdamore 			"com",
    373  1.2  gdamore 			AR5312_UART1_BASE, 0x1000,
    374  1.2  gdamore 			-1, -1,
    375  1.2  gdamore 			AR5312_BOARD_CONFIG_UART1,
    376  1.2  gdamore 			0,
    377  1.2  gdamore 			0,
    378  1.2  gdamore 		},
    379  1.2  gdamore 		{
    380  1.2  gdamore 			"ath",
    381  1.2  gdamore 			AR5312_WLAN0_BASE, 0x100000,
    382  1.2  gdamore 			AR5312_IRQ_WLAN0, -1,
    383  1.2  gdamore 			AR5312_BOARD_CONFIG_WLAN0,
    384  1.2  gdamore 			AR5312_RESET_WLAN0 |
    385  1.2  gdamore 			AR5312_RESET_WARM_WLAN0_MAC |
    386  1.2  gdamore 			AR5312_RESET_WARM_WLAN0_BB,
    387  1.2  gdamore 			AR5312_ENABLE_WLAN0
    388  1.2  gdamore 		},
    389  1.2  gdamore 		{
    390  1.2  gdamore 			"ath",
    391  1.2  gdamore 			AR5312_WLAN1_BASE, 0x100000,
    392  1.2  gdamore 			AR5312_IRQ_WLAN1, -1,
    393  1.2  gdamore 			AR5312_BOARD_CONFIG_WLAN1,
    394  1.2  gdamore 			AR5312_RESET_WLAN1 |
    395  1.2  gdamore 			AR5312_RESET_WARM_WLAN1_MAC |
    396  1.2  gdamore 			AR5312_RESET_WARM_WLAN1_BB,
    397  1.2  gdamore 			AR5312_ENABLE_WLAN1
    398  1.2  gdamore 		},
    399  1.2  gdamore 		{
    400  1.2  gdamore 			"athflash",
    401  1.2  gdamore 			AR5312_FLASH_BASE, 0,
    402  1.2  gdamore 			-1, -1,
    403  1.2  gdamore 			0,
    404  1.2  gdamore 			0,
    405  1.2  gdamore 			0,
    406  1.2  gdamore 		},
    407  1.2  gdamore 		{
    408  1.2  gdamore 			"argpio", 0x1000,
    409  1.2  gdamore 			AR5312_GPIO_BASE,
    410  1.2  gdamore 			AR5312_IRQ_MISC, AR5312_MISC_IRQ_GPIO,
    411  1.2  gdamore 			0,
    412  1.2  gdamore 			0,
    413  1.2  gdamore 			0
    414  1.2  gdamore 		},
    415  1.2  gdamore 		{ NULL }
    416  1.2  gdamore 	};
    417  1.2  gdamore 
    418  1.2  gdamore 	return devices;
    419  1.2  gdamore }
    420  1.2  gdamore 
    421  1.2  gdamore 
    422