Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176132
b: refs/heads/master
c: 6d85853
h: refs/heads/master
v: v3
  • Loading branch information
John Linn authored and Michal Simek committed Dec 14, 2009
1 parent cf3c9ab commit a8bf35d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95dfbbe4700016bddd7e8915e95a97652e70f495
refs/heads/master: 6d858535be59b220c0f8dc335e030c2e3f3a3032
15 changes: 10 additions & 5 deletions trunk/arch/microblaze/kernel/heartbeat.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void heartbeat(void)
void setup_heartbeat(void)
{
struct device_node *gpio = NULL;
int *prop;
int j;
char *gpio_list[] = {
"xlnx,xps-gpio-1.00.a",
Expand All @@ -58,10 +59,14 @@ void setup_heartbeat(void)
break;
}

base_addr = *(int *) of_get_property(gpio, "reg", NULL);
base_addr = (unsigned long) ioremap(base_addr, PAGE_SIZE);
printk(KERN_NOTICE "Heartbeat GPIO at 0x%x\n", base_addr);
if (gpio) {
base_addr = *(int *) of_get_property(gpio, "reg", NULL);
base_addr = (unsigned long) ioremap(base_addr, PAGE_SIZE);
printk(KERN_NOTICE "Heartbeat GPIO at 0x%x\n", base_addr);

if (*(int *) of_get_property(gpio, "xlnx,is-bidir", NULL))
out_be32(base_addr + 4, 0); /* GPIO is configured as output */
/* GPIO is configured as output */
prop = (int *) of_get_property(gpio, "xlnx,is-bidir", NULL);
if (prop)
out_be32(base_addr + 4, 0);
}
}

0 comments on commit a8bf35d

Please sign in to comment.