diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 20:58:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 20:58:08 -0400 |
commit | 489de30259e667d7bc47da9da44a0270b050cd97 (patch) | |
tree | 6807814f443fe2c5d041c3bc3fe3ca8d22a955ca /arch/powerpc/sysdev/tsi108_dev.c | |
parent | 1f1c2881f673671539b25686df463518d69c4649 (diff) | |
parent | bf22f6fe2d72b4d7e9035be8ceb340414cf490e3 (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (209 commits)
[POWERPC] Create add_rtc() function to enable the RTC CMOS driver
[POWERPC] Add H_ILLAN_ATTRIBUTES hcall number
[POWERPC] xilinxfb: Parameterize xilinxfb platform device registration
[POWERPC] Oprofile support for Power 5++
[POWERPC] Enable arbitary speed tty ioctls and split input/output speed
[POWERPC] Make drivers/char/hvc_console.c:khvcd() static
[POWERPC] Remove dead code for preventing pread() and pwrite() calls
[POWERPC] Remove unnecessary #undef printk from prom.c
[POWERPC] Fix typo in Ebony default DTS
[POWERPC] Check for NULL ppc_md.init_IRQ() before calling
[POWERPC] Remove extra return statement
[POWERPC] pasemi: Don't auto-select CONFIG_EMBEDDED
[POWERPC] pasemi: Rename platform
[POWERPC] arch/powerpc/kernel/sysfs.c: Move NUMA exports
[POWERPC] Add __read_mostly support for powerpc
[POWERPC] Modify sched_clock() to make CONFIG_PRINTK_TIME more sane
[POWERPC] Create a dummy zImage if no valid platform has been selected
[POWERPC] PS3: Bootwrapper support.
[POWERPC] powermac i2c: Use mutex
[POWERPC] Schedule removal of arch/ppc
...
Fixed up conflicts manually in:
Documentation/feature-removal-schedule.txt
arch/powerpc/kernel/pci_32.c
arch/powerpc/kernel/pci_64.c
include/asm-powerpc/pci.h
and asked the powerpc people to double-check the result..
Diffstat (limited to 'arch/powerpc/sysdev/tsi108_dev.c')
-rw-r--r-- | arch/powerpc/sysdev/tsi108_dev.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c index 7d3b09b7d544..a113d800cbf0 100644 --- a/arch/powerpc/sysdev/tsi108_dev.c +++ b/arch/powerpc/sysdev/tsi108_dev.c | |||
@@ -72,12 +72,11 @@ static int __init tsi108_eth_of_init(void) | |||
72 | int ret; | 72 | int ret; |
73 | 73 | ||
74 | for (np = NULL, i = 0; | 74 | for (np = NULL, i = 0; |
75 | (np = of_find_compatible_node(np, "network", "tsi-ethernet")) != NULL; | 75 | (np = of_find_compatible_node(np, "network", "tsi108-ethernet")) != NULL; |
76 | i++) { | 76 | i++) { |
77 | struct resource r[2]; | 77 | struct resource r[2]; |
78 | struct device_node *phy; | 78 | struct device_node *phy, *mdio; |
79 | hw_info tsi_eth_data; | 79 | hw_info tsi_eth_data; |
80 | const unsigned int *id; | ||
81 | const unsigned int *phy_id; | 80 | const unsigned int *phy_id; |
82 | const void *mac_addr; | 81 | const void *mac_addr; |
83 | const phandle *ph; | 82 | const phandle *ph; |
@@ -111,6 +110,13 @@ static int __init tsi108_eth_of_init(void) | |||
111 | if (mac_addr) | 110 | if (mac_addr) |
112 | memcpy(tsi_eth_data.mac_addr, mac_addr, 6); | 111 | memcpy(tsi_eth_data.mac_addr, mac_addr, 6); |
113 | 112 | ||
113 | ph = of_get_property(np, "mdio-handle", NULL); | ||
114 | mdio = of_find_node_by_phandle(*ph); | ||
115 | ret = of_address_to_resource(mdio, 0, &res); | ||
116 | of_node_put(mdio); | ||
117 | if (ret) | ||
118 | goto unreg; | ||
119 | |||
114 | ph = of_get_property(np, "phy-handle", NULL); | 120 | ph = of_get_property(np, "phy-handle", NULL); |
115 | phy = of_find_node_by_phandle(*ph); | 121 | phy = of_find_node_by_phandle(*ph); |
116 | 122 | ||
@@ -119,20 +125,25 @@ static int __init tsi108_eth_of_init(void) | |||
119 | goto unreg; | 125 | goto unreg; |
120 | } | 126 | } |
121 | 127 | ||
122 | id = of_get_property(phy, "reg", NULL); | 128 | phy_id = of_get_property(phy, "reg", NULL); |
123 | phy_id = of_get_property(phy, "phy-id", NULL); | 129 | |
124 | ret = of_address_to_resource(phy, 0, &res); | ||
125 | if (ret) { | ||
126 | of_node_put(phy); | ||
127 | goto unreg; | ||
128 | } | ||
129 | tsi_eth_data.regs = r[0].start; | 130 | tsi_eth_data.regs = r[0].start; |
130 | tsi_eth_data.phyregs = res.start; | 131 | tsi_eth_data.phyregs = res.start; |
131 | tsi_eth_data.phy = *phy_id; | 132 | tsi_eth_data.phy = *phy_id; |
132 | tsi_eth_data.irq_num = irq_of_parse_and_map(np, 0); | 133 | tsi_eth_data.irq_num = irq_of_parse_and_map(np, 0); |
133 | if (of_device_is_compatible(phy, "bcm54xx")) | 134 | |
135 | /* Some boards with the TSI108 bridge (e.g. Holly) | ||
136 | * have a miswiring of the ethernet PHYs which | ||
137 | * requires a workaround. The special | ||
138 | * "txc-rxc-delay-disable" property enables this | ||
139 | * workaround. FIXME: Need to port the tsi108_eth | ||
140 | * driver itself to phylib and use a non-misleading | ||
141 | * name for the workaround flag - it's not actually to | ||
142 | * do with the model of PHY in use */ | ||
143 | if (of_get_property(phy, "txc-rxc-delay-disable", NULL)) | ||
134 | tsi_eth_data.phy_type = TSI108_PHY_BCM54XX; | 144 | tsi_eth_data.phy_type = TSI108_PHY_BCM54XX; |
135 | of_node_put(phy); | 145 | of_node_put(phy); |
146 | |||
136 | ret = | 147 | ret = |
137 | platform_device_add_data(tsi_eth_dev, &tsi_eth_data, | 148 | platform_device_add_data(tsi_eth_dev, &tsi_eth_data, |
138 | sizeof(hw_info)); | 149 | sizeof(hw_info)); |