diff options
Diffstat (limited to 'arch/microblaze/kernel/heartbeat.c')
-rw-r--r-- | arch/microblaze/kernel/heartbeat.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/microblaze/kernel/heartbeat.c b/arch/microblaze/kernel/heartbeat.c index 522751737cfa..154756f3c694 100644 --- a/arch/microblaze/kernel/heartbeat.c +++ b/arch/microblaze/kernel/heartbeat.c | |||
@@ -47,11 +47,10 @@ void setup_heartbeat(void) | |||
47 | struct device_node *gpio = NULL; | 47 | struct device_node *gpio = NULL; |
48 | int *prop; | 48 | int *prop; |
49 | int j; | 49 | int j; |
50 | char *gpio_list[] = { | 50 | const char * const gpio_list[] = { |
51 | "xlnx,xps-gpio-1.00.a", | 51 | "xlnx,xps-gpio-1.00.a", |
52 | "xlnx,opb-gpio-1.00.a", | 52 | NULL |
53 | NULL | 53 | }; |
54 | }; | ||
55 | 54 | ||
56 | for (j = 0; gpio_list[j] != NULL; j++) { | 55 | for (j = 0; gpio_list[j] != NULL; j++) { |
57 | gpio = of_find_compatible_node(NULL, NULL, gpio_list[j]); | 56 | gpio = of_find_compatible_node(NULL, NULL, gpio_list[j]); |
@@ -60,7 +59,7 @@ void setup_heartbeat(void) | |||
60 | } | 59 | } |
61 | 60 | ||
62 | if (gpio) { | 61 | if (gpio) { |
63 | base_addr = *(int *) of_get_property(gpio, "reg", NULL); | 62 | base_addr = be32_to_cpup(of_get_property(gpio, "reg", NULL)); |
64 | base_addr = (unsigned long) ioremap(base_addr, PAGE_SIZE); | 63 | base_addr = (unsigned long) ioremap(base_addr, PAGE_SIZE); |
65 | printk(KERN_NOTICE "Heartbeat GPIO at 0x%x\n", base_addr); | 64 | printk(KERN_NOTICE "Heartbeat GPIO at 0x%x\n", base_addr); |
66 | 65 | ||