aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/44x/warp.c
diff options
context:
space:
mode:
authorSean MacLennan <smaclennan@pikatech.com>2008-07-25 21:45:10 -0400
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2008-08-04 21:42:07 -0400
commit048040a36d46dced846b058bc083c212e0c75615 (patch)
tree2399e931585f1c676529ddd879ec6ee9b7841f58 /arch/powerpc/platforms/44x/warp.c
parent1c5402ba55e809f0b685f07728794ea27b197f33 (diff)
powerpc/4xx: Cleanup Warp for i2c driver changes.
This patch removes the i2c code which is now obsolete due to the new ibm iic driver walking the device tree for child nodes. There are two other small cleanups that came indirectly from the ad7414 code review. Make sure Tlow is correct and handle the case where i2c_smbus_read_word_data fails. Signed-off-by: Sean MacLennan <smaclennan@pikatech.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms/44x/warp.c')
-rw-r--r--arch/powerpc/platforms/44x/warp.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c
index 9565995cba7f..960edf89be51 100644
--- a/arch/powerpc/platforms/44x/warp.c
+++ b/arch/powerpc/platforms/44x/warp.c
@@ -30,18 +30,6 @@ static __initdata struct of_device_id warp_of_bus[] = {
30 {}, 30 {},
31}; 31};
32 32
33static __initdata struct i2c_board_info warp_i2c_info[] = {
34 { I2C_BOARD_INFO("ad7414", 0x4a) }
35};
36
37static int __init warp_arch_init(void)
38{
39 /* This should go away once support is moved to the dts. */
40 i2c_register_board_info(0, warp_i2c_info, ARRAY_SIZE(warp_i2c_info));
41 return 0;
42}
43machine_arch_initcall(warp, warp_arch_init);
44
45static int __init warp_device_probe(void) 33static int __init warp_device_probe(void)
46{ 34{
47 of_platform_bus_probe(NULL, warp_of_bus, NULL); 35 of_platform_bus_probe(NULL, warp_of_bus, NULL);
@@ -223,7 +211,7 @@ static void pika_setup_critical_temp(struct i2c_client *client)
223 211
224 /* These registers are in 1 degree increments. */ 212 /* These registers are in 1 degree increments. */
225 i2c_smbus_write_byte_data(client, 2, 65); /* Thigh */ 213 i2c_smbus_write_byte_data(client, 2, 65); /* Thigh */
226 i2c_smbus_write_byte_data(client, 3, 55); /* Tlow */ 214 i2c_smbus_write_byte_data(client, 3, 0); /* Tlow */
227 215
228 np = of_find_compatible_node(NULL, NULL, "adi,ad7414"); 216 np = of_find_compatible_node(NULL, NULL, "adi,ad7414");
229 if (np == NULL) { 217 if (np == NULL) {
@@ -289,8 +277,15 @@ found_it:
289 printk(KERN_INFO "PIKA DTM thread running.\n"); 277 printk(KERN_INFO "PIKA DTM thread running.\n");
290 278
291 while (!kthread_should_stop()) { 279 while (!kthread_should_stop()) {
292 u16 temp = swab16(i2c_smbus_read_word_data(client, 0)); 280 int val;
293 out_be32(fpga + 0x20, temp); 281
282 val = i2c_smbus_read_word_data(client, 0);
283 if (val < 0)
284 dev_dbg(&client->dev, "DTM read temp failed.\n");
285 else {
286 s16 temp = swab16(val);
287 out_be32(fpga + 0x20, temp);
288 }
294 289
295 pika_dtm_check_fan(fpga); 290 pika_dtm_check_fan(fpga);
296 291