diff options
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 1 | ||||
-rw-r--r-- | arch/powerpc/sysdev/rtc_cmos_setup.c | 17 |
2 files changed, 14 insertions, 4 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 727453d3e8b9..1cf29c9d4408 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/of_platform.h> | ||
25 | #include <linux/phy.h> | 26 | #include <linux/phy.h> |
26 | #include <linux/fsl_devices.h> | 27 | #include <linux/fsl_devices.h> |
27 | #include <linux/fs_enet_pd.h> | 28 | #include <linux/fs_enet_pd.h> |
diff --git a/arch/powerpc/sysdev/rtc_cmos_setup.c b/arch/powerpc/sysdev/rtc_cmos_setup.c index e276048b8c5f..0c9ac7ee08fb 100644 --- a/arch/powerpc/sysdev/rtc_cmos_setup.c +++ b/arch/powerpc/sysdev/rtc_cmos_setup.c | |||
@@ -20,14 +20,16 @@ static int __init add_rtc(void) | |||
20 | { | 20 | { |
21 | struct device_node *np; | 21 | struct device_node *np; |
22 | struct platform_device *pd; | 22 | struct platform_device *pd; |
23 | struct resource res; | 23 | struct resource res[2]; |
24 | int ret; | 24 | int ret; |
25 | 25 | ||
26 | memset(&res, 0, sizeof(res)); | ||
27 | |||
26 | np = of_find_compatible_node(NULL, NULL, "pnpPNP,b00"); | 28 | np = of_find_compatible_node(NULL, NULL, "pnpPNP,b00"); |
27 | if (!np) | 29 | if (!np) |
28 | return -ENODEV; | 30 | return -ENODEV; |
29 | 31 | ||
30 | ret = of_address_to_resource(np, 0, &res); | 32 | ret = of_address_to_resource(np, 0, &res[0]); |
31 | of_node_put(np); | 33 | of_node_put(np); |
32 | if (ret) | 34 | if (ret) |
33 | return ret; | 35 | return ret; |
@@ -36,11 +38,18 @@ static int __init add_rtc(void) | |||
36 | * RTC_PORT(x) is hardcoded in asm/mc146818rtc.h. Verify that the | 38 | * RTC_PORT(x) is hardcoded in asm/mc146818rtc.h. Verify that the |
37 | * address provided by the device node matches. | 39 | * address provided by the device node matches. |
38 | */ | 40 | */ |
39 | if (res.start != RTC_PORT(0)) | 41 | if (res[0].start != RTC_PORT(0)) |
40 | return -EINVAL; | 42 | return -EINVAL; |
41 | 43 | ||
44 | /* Use a fixed interrupt value of 8 since on PPC if we are using this | ||
45 | * its off an i8259 which we ensure has interrupt numbers 0..15. */ | ||
46 | res[1].start = 8; | ||
47 | res[1].end = 8; | ||
48 | res[1].flags = IORESOURCE_IRQ; | ||
49 | |||
42 | pd = platform_device_register_simple("rtc_cmos", -1, | 50 | pd = platform_device_register_simple("rtc_cmos", -1, |
43 | &res, 1); | 51 | &res[0], 2); |
52 | |||
44 | if (IS_ERR(pd)) | 53 | if (IS_ERR(pd)) |
45 | return PTR_ERR(pd); | 54 | return PTR_ERR(pd); |
46 | 55 | ||