diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2007-10-18 22:09:53 -0400 |
---|---|---|
committer | Dale Farnsworth <dale@farnsworth.org> | 2007-10-23 11:22:58 -0400 |
commit | c4a6a2ab5e99980b10d1eef761cd95f2a19ba46d (patch) | |
tree | fc7317aa9d289316e1173cc86ebafc626f1eb4bd | |
parent | e8b8c977734193adedf2b0f607d6252c78e86394 (diff) |
mv643xx_eth: Split off mv643xx_eth platform device data
The mv643xx ethernet silicon block is also found in a couple of other
Marvell chips. As a first step towards splitting off the mv643xx_eth
bits from the rest of the mv643xx bits, this patch splits the mv643xx
ethernet platform device data struct in linux/mv643xx.h off into
linux/mv643xx_eth.h, and includes the latter from the former.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
-rw-r--r-- | include/linux/mv643xx.h | 26 | ||||
-rw-r--r-- | include/linux/mv643xx_eth.h | 31 |
2 files changed, 32 insertions, 25 deletions
diff --git a/include/linux/mv643xx.h b/include/linux/mv643xx.h index 9c8049005052..e67d7eceb660 100644 --- a/include/linux/mv643xx.h +++ b/include/linux/mv643xx.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define __ASM_MV643XX_H | 14 | #define __ASM_MV643XX_H |
15 | 15 | ||
16 | #include <asm/types.h> | 16 | #include <asm/types.h> |
17 | #include <linux/mv643xx_eth.h> | ||
17 | 18 | ||
18 | /****************************************/ | 19 | /****************************************/ |
19 | /* Processor Address Space */ | 20 | /* Processor Address Space */ |
@@ -658,9 +659,6 @@ | |||
658 | /* Ethernet Unit Registers */ | 659 | /* Ethernet Unit Registers */ |
659 | /****************************************/ | 660 | /****************************************/ |
660 | 661 | ||
661 | #define MV643XX_ETH_SHARED_REGS 0x2000 | ||
662 | #define MV643XX_ETH_SHARED_REGS_SIZE 0x2000 | ||
663 | |||
664 | #define MV643XX_ETH_PHY_ADDR_REG 0x2000 | 662 | #define MV643XX_ETH_PHY_ADDR_REG 0x2000 |
665 | #define MV643XX_ETH_SMI_REG 0x2004 | 663 | #define MV643XX_ETH_SMI_REG 0x2004 |
666 | #define MV643XX_ETH_UNIT_DEFAULT_ADDR_REG 0x2008 | 664 | #define MV643XX_ETH_UNIT_DEFAULT_ADDR_REG 0x2008 |
@@ -1280,28 +1278,6 @@ struct mv64xxx_i2c_pdata { | |||
1280 | 1278 | ||
1281 | #define MV643XX_ETH_DESC_SIZE 64 | 1279 | #define MV643XX_ETH_DESC_SIZE 64 |
1282 | 1280 | ||
1283 | #define MV643XX_ETH_SHARED_NAME "mv643xx_eth_shared" | ||
1284 | #define MV643XX_ETH_NAME "mv643xx_eth" | ||
1285 | |||
1286 | struct mv643xx_eth_platform_data { | ||
1287 | int port_number; | ||
1288 | u16 force_phy_addr; /* force override if phy_addr == 0 */ | ||
1289 | u16 phy_addr; | ||
1290 | |||
1291 | /* If speed is 0, then speed and duplex are autonegotiated. */ | ||
1292 | int speed; /* 0, SPEED_10, SPEED_100, SPEED_1000 */ | ||
1293 | int duplex; /* DUPLEX_HALF or DUPLEX_FULL */ | ||
1294 | |||
1295 | /* non-zero values of the following fields override defaults */ | ||
1296 | u32 tx_queue_size; | ||
1297 | u32 rx_queue_size; | ||
1298 | u32 tx_sram_addr; | ||
1299 | u32 tx_sram_size; | ||
1300 | u32 rx_sram_addr; | ||
1301 | u32 rx_sram_size; | ||
1302 | u8 mac_addr[6]; /* mac address if non-zero*/ | ||
1303 | }; | ||
1304 | |||
1305 | /* Watchdog Platform Device, Driver Data */ | 1281 | /* Watchdog Platform Device, Driver Data */ |
1306 | #define MV64x60_WDT_NAME "mv64x60_wdt" | 1282 | #define MV64x60_WDT_NAME "mv64x60_wdt" |
1307 | 1283 | ||
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h new file mode 100644 index 000000000000..3f272396642b --- /dev/null +++ b/include/linux/mv643xx_eth.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * MV-643XX ethernet platform device data definition file. | ||
3 | */ | ||
4 | #ifndef __LINUX_MV643XX_ETH_H | ||
5 | #define __LINUX_MV643XX_ETH_H | ||
6 | |||
7 | #define MV643XX_ETH_SHARED_NAME "mv643xx_eth_shared" | ||
8 | #define MV643XX_ETH_NAME "mv643xx_eth" | ||
9 | #define MV643XX_ETH_SHARED_REGS 0x2000 | ||
10 | #define MV643XX_ETH_SHARED_REGS_SIZE 0x2000 | ||
11 | |||
12 | struct mv643xx_eth_platform_data { | ||
13 | int port_number; | ||
14 | u16 force_phy_addr; /* force override if phy_addr == 0 */ | ||
15 | u16 phy_addr; | ||
16 | |||
17 | /* If speed is 0, then speed and duplex are autonegotiated. */ | ||
18 | int speed; /* 0, SPEED_10, SPEED_100, SPEED_1000 */ | ||
19 | int duplex; /* DUPLEX_HALF or DUPLEX_FULL */ | ||
20 | |||
21 | /* non-zero values of the following fields override defaults */ | ||
22 | u32 tx_queue_size; | ||
23 | u32 rx_queue_size; | ||
24 | u32 tx_sram_addr; | ||
25 | u32 tx_sram_size; | ||
26 | u32 rx_sram_addr; | ||
27 | u32 rx_sram_size; | ||
28 | u8 mac_addr[6]; /* mac address if non-zero*/ | ||
29 | }; | ||
30 | |||
31 | #endif /* __LINUX_MV643XX_ETH_H */ | ||