[ar71xx] add WMAC definitions
[openwrt.git] / target / linux / ar71xx / files-2.6.28 / arch / mips / include / asm / mach-ar71xx / platform.h
1 /*
2 * Atheros AR71xx SoC specific platform definitions
3 *
4 * Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org>
5 * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published
9 * by the Free Software Foundation.
10 */
11
12 #ifndef __ASM_MACH_AR71XX_PLATFORM_H
13 #define __ASM_MACH_AR71XX_PLATFORM_H
14
15 #include <linux/if_ether.h>
16 #include <linux/skbuff.h>
17 #include <linux/phy.h>
18 #include <linux/spi/spi.h>
19 #include <linux/leds.h>
20 #include <linux/gpio_buttons.h>
21
22 struct ag71xx_platform_data {
23 phy_interface_t phy_if_mode;
24 u32 phy_mask;
25 int speed;
26 int duplex;
27 u32 reset_bit;
28 u32 mii_if;
29 u8 mac_addr[ETH_ALEN];
30
31 u8 has_gbit:1;
32 u8 is_ar91xx:1;
33
34 void (* ddr_flush)(void);
35 void (* set_pll)(u32 pll);
36 };
37
38 struct ag71xx_mdio_platform_data {
39 u32 phy_mask;
40 };
41
42 struct ar71xx_ehci_platform_data {
43 u8 is_ar91xx;
44 };
45
46 struct ar71xx_spi_platform_data {
47 unsigned bus_num;
48 unsigned num_chipselect;
49 u32 (*get_ioc_base)(u8 chip_select, int cs_high, int is_on);
50 };
51
52 #define AR71XX_SPI_CS_INACTIVE 0
53 #define AR71XX_SPI_CS_ACTIVE 1
54
55 extern void ar71xx_add_device_spi(struct ar71xx_spi_platform_data *pdata,
56 struct spi_board_info const *info,
57 unsigned n) __init;
58
59 extern void ar71xx_set_mac_base(unsigned char *mac) __init;
60 extern void ar71xx_parse_mac_addr(char *mac_str) __init;
61
62 extern struct ag71xx_platform_data ar71xx_eth0_data;
63 extern struct ag71xx_platform_data ar71xx_eth1_data;
64 extern void ar71xx_add_device_eth(unsigned int id) __init;
65
66 extern void ar71xx_add_device_mdio(u32 phy_mask) __init;
67
68 extern void ar71xx_add_device_leds_gpio(int id,
69 unsigned num_leds,
70 struct gpio_led *leds) __init;
71
72 extern void ar71xx_add_device_gpio_buttons(int id,
73 unsigned poll_interval,
74 unsigned nbuttons,
75 struct gpio_button *buttons) __init;
76
77 #ifdef CONFIG_AR71XX_EARLY_SERIAL
78 static inline void ar71xx_add_device_uart(void) {}
79 #else
80 extern void ar71xx_add_device_uart(void) __init;
81 #endif
82
83 extern void ar71xx_add_device_wdt(void) __init;
84
85 #endif /* __ASM_MACH_AR71XX_PLATFORM_H */
This page took 0.051505 seconds and 5 git commands to generate.