Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107133
b: refs/heads/master
c: e517881
h: refs/heads/master
i:
  107131: feb71bb
v: v3
  • Loading branch information
Anton Vorontsov authored and Kumar Gala committed Jul 28, 2008
1 parent 3d184bd commit e4c510a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 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: 80776554b6c93cf828ddc702010c6a189aa0d0e9
refs/heads/master: e517881e427757afc3cce6d76173b1d898b30ab3
23 changes: 17 additions & 6 deletions trunk/arch/powerpc/sysdev/rtc_cmos_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ static int __init add_rtc(void)
struct device_node *np;
struct platform_device *pd;
struct resource res[2];
unsigned int num_res = 1;
int ret;

memset(&res, 0, sizeof(res));
Expand All @@ -41,14 +42,24 @@ static int __init add_rtc(void)
if (res[0].start != RTC_PORT(0))
return -EINVAL;

/* Use a fixed interrupt value of 8 since on PPC if we are using this
* its off an i8259 which we ensure has interrupt numbers 0..15. */
res[1].start = 8;
res[1].end = 8;
res[1].flags = IORESOURCE_IRQ;
np = of_find_compatible_node(NULL, NULL, "chrp,iic");
if (!np)
np = of_find_compatible_node(NULL, NULL, "pnpPNP,000");
if (np) {
of_node_put(np);
/*
* Use a fixed interrupt value of 8 since on PPC if we are
* using this its off an i8259 which we ensure has interrupt
* numbers 0..15.
*/
res[1].start = 8;
res[1].end = 8;
res[1].flags = IORESOURCE_IRQ;
num_res++;
}

pd = platform_device_register_simple("rtc_cmos", -1,
&res[0], 2);
&res[0], num_res);

if (IS_ERR(pd))
return PTR_ERR(pd);
Expand Down

0 comments on commit e4c510a

Please sign in to comment.