warp.c (d7e57676e3ed7ab9b2c7c4bcb7873e51eacbdb84) warp.c (ba703e1a7a0b32f740bcfba8e60ad193afa4e723)
1/*
2 * PIKA Warp(tm) board specific routines
3 *
4 * Copyright (c) 2008-2009 PIKA Technologies
5 * Sean MacLennan <smaclennan@pikatech.com>
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 as published by the

--- 50 unchanged lines hidden (view full) ---

59 .progress = udbg_progress,
60 .init_IRQ = uic_init_tree,
61 .get_irq = uic_get_irq,
62 .restart = ppc4xx_reset_system,
63 .calibrate_decr = generic_calibrate_decr,
64};
65
66
1/*
2 * PIKA Warp(tm) board specific routines
3 *
4 * Copyright (c) 2008-2009 PIKA Technologies
5 * Sean MacLennan <smaclennan@pikatech.com>
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 as published by the

--- 50 unchanged lines hidden (view full) ---

59 .progress = udbg_progress,
60 .init_IRQ = uic_init_tree,
61 .get_irq = uic_get_irq,
62 .restart = ppc4xx_reset_system,
63 .calibrate_decr = generic_calibrate_decr,
64};
65
66
67static u32 post_info;
68
69static int __init warp_post_info(void)
70{
71 struct device_node *np;
72 void __iomem *fpga;
73 u32 post1, post2;
74
75 /* Sighhhh... POST information is in the sd area. */
76 np = of_find_compatible_node(NULL, NULL, "pika,fpga-sd");

--- 5 unchanged lines hidden (view full) ---

82 if (fpga == NULL)
83 return -ENOENT;
84
85 post1 = in_be32(fpga + 0x40);
86 post2 = in_be32(fpga + 0x44);
87
88 iounmap(fpga);
89
67static int __init warp_post_info(void)
68{
69 struct device_node *np;
70 void __iomem *fpga;
71 u32 post1, post2;
72
73 /* Sighhhh... POST information is in the sd area. */
74 np = of_find_compatible_node(NULL, NULL, "pika,fpga-sd");

--- 5 unchanged lines hidden (view full) ---

80 if (fpga == NULL)
81 return -ENOENT;
82
83 post1 = in_be32(fpga + 0x40);
84 post2 = in_be32(fpga + 0x44);
85
86 iounmap(fpga);
87
90 if (post1 || post2) {
88 if (post1 || post2)
91 printk(KERN_INFO "Warp POST %08x %08x\n", post1, post2);
89 printk(KERN_INFO "Warp POST %08x %08x\n", post1, post2);
92 post_info = 1;
93 } else
90 else
94 printk(KERN_INFO "Warp POST OK\n");
95
96 return 0;
97}
98
99
100#ifdef CONFIG_SENSORS_AD7414
101

--- 72 unchanged lines hidden (view full) ---

174
175 np = of_find_compatible_node(NULL, NULL, "gpio-leds");
176 if (!np) {
177 printk(KERN_ERR __FILE__ ": Unable to find leds\n");
178 return -ENOENT;
179 }
180
181 for_each_child_of_node(np, child)
91 printk(KERN_INFO "Warp POST OK\n");
92
93 return 0;
94}
95
96
97#ifdef CONFIG_SENSORS_AD7414
98

--- 72 unchanged lines hidden (view full) ---

171
172 np = of_find_compatible_node(NULL, NULL, "gpio-leds");
173 if (!np) {
174 printk(KERN_ERR __FILE__ ": Unable to find leds\n");
175 return -ENOENT;
176 }
177
178 for_each_child_of_node(np, child)
182 if (strcmp(child->name, "green") == 0) {
179 if (strcmp(child->name, "green") == 0)
183 green_led = of_get_gpio(child, 0);
180 green_led = of_get_gpio(child, 0);
184 /* Turn back on the green LED */
185 gpio_set_value(green_led, 1);
186 } else if (strcmp(child->name, "red") == 0) {
181 else if (strcmp(child->name, "red") == 0)
187 red_led = of_get_gpio(child, 0);
182 red_led = of_get_gpio(child, 0);
188 /* Set based on post */
189 gpio_set_value(red_led, post_info);
190 }
191
192 of_node_put(np);
193
194 return 0;
195}
196
197static void pika_setup_critical_temp(struct device_node *np,
198 struct i2c_client *client)

--- 125 unchanged lines hidden ---
183
184 of_node_put(np);
185
186 return 0;
187}
188
189static void pika_setup_critical_temp(struct device_node *np,
190 struct i2c_client *client)

--- 125 unchanged lines hidden ---