diff options
| -rw-r--r-- | arch/powerpc/platforms/44x/warp.c | 25 |
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 | ||
| 33 | static __initdata struct i2c_board_info warp_i2c_info[] = { | ||
| 34 | { I2C_BOARD_INFO("ad7414", 0x4a) } | ||
| 35 | }; | ||
| 36 | |||
| 37 | static 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 | } | ||
| 43 | machine_arch_initcall(warp, warp_arch_init); | ||
| 44 | |||
| 45 | static int __init warp_device_probe(void) | 33 | static 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 | ||
