f24ff800b591cffeab5643b96d67be051639205c
[openwrt.git] / target / linux / ar71xx / files / include / asm-mips / 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
20 struct ag71xx_platform_data {
21 u32 reset_bit;
22 u32 flush_reg;
23 u32 phy_mask;
24 phy_interface_t phy_if_mode;
25 u32 mii_if;
26 u8 mac_addr[ETH_ALEN];
27 };
28
29 struct ar71xx_spi_platform_data {
30 unsigned bus_num;
31 unsigned num_chipselect;
32 u32 (*get_ioc_base)(u8 chip_select, int cs_high, int is_on);
33 };
34
35 #define AR71XX_SPI_CS_INACTIVE 0
36 #define AR71XX_SPI_CS_ACTIVE 1
37
38 extern void ar71xx_add_device_spi(struct ar71xx_spi_platform_data *pdata,
39 struct spi_board_info const *info,
40 unsigned n) __init;
41
42 extern void ar71xx_set_mac_base(char *mac_str) __init;
43 extern void ar71xx_add_device_eth(unsigned int id, phy_interface_t phy_if_mode,
44 u32 phy_mask) __init;
45
46 #endif /* __ASM_MACH_AR71XX_PLATFORM_H */
This page took 0.036059 seconds and 3 git commands to generate.