diff options
-rw-r--r-- | arch/sh/include/cpu-sh4/cpu/rtc.h | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 34 |
2 files changed, 33 insertions, 3 deletions
diff --git a/arch/sh/include/cpu-sh4/cpu/rtc.h b/arch/sh/include/cpu-sh4/cpu/rtc.h index 25b1e6adfe8c..95e6fb76c24d 100644 --- a/arch/sh/include/cpu-sh4/cpu/rtc.h +++ b/arch/sh/include/cpu-sh4/cpu/rtc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ASM_SH_CPU_SH4_RTC_H | 1 | #ifndef __ASM_SH_CPU_SH4_RTC_H |
2 | #define __ASM_SH_CPU_SH4_RTC_H | 2 | #define __ASM_SH_CPU_SH4_RTC_H |
3 | 3 | ||
4 | #ifdef CONFIG_CPU_SUBTYPE_SH7723 | 4 | #if defined(CONFIG_CPU_SUBTYPE_SH7722) || defined(CONFIG_CPU_SUBTYPE_SH7723) |
5 | #define rtc_reg_size sizeof(u16) | 5 | #define rtc_reg_size sizeof(u16) |
6 | #else | 6 | #else |
7 | #define rtc_reg_size sizeof(u32) | 7 | #define rtc_reg_size sizeof(u32) |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index de1ede92176e..ef77ee1d9f53 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * SH7722 Setup | 2 | * SH7722 Setup |
3 | * | 3 | * |
4 | * Copyright (C) 2006 - 2007 Paul Mundt | 4 | * Copyright (C) 2006 - 2008 Paul Mundt |
5 | * | 5 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 6 | * This file is subject to the terms and conditions of the GNU General Public |
7 | * License. See the file "COPYING" in the main directory of this archive | 7 | * License. See the file "COPYING" in the main directory of this archive |
@@ -16,6 +16,36 @@ | |||
16 | #include <asm/clock.h> | 16 | #include <asm/clock.h> |
17 | #include <asm/mmzone.h> | 17 | #include <asm/mmzone.h> |
18 | 18 | ||
19 | static struct resource rtc_resources[] = { | ||
20 | [0] = { | ||
21 | .start = 0xa465fec0, | ||
22 | .end = 0xa465fec0 + 0x58 - 1, | ||
23 | .flags = IORESOURCE_IO, | ||
24 | }, | ||
25 | [1] = { | ||
26 | /* Period IRQ */ | ||
27 | .start = 45, | ||
28 | .flags = IORESOURCE_IRQ, | ||
29 | }, | ||
30 | [2] = { | ||
31 | /* Carry IRQ */ | ||
32 | .start = 46, | ||
33 | .flags = IORESOURCE_IRQ, | ||
34 | }, | ||
35 | [3] = { | ||
36 | /* Alarm IRQ */ | ||
37 | .start = 44, | ||
38 | .flags = IORESOURCE_IRQ, | ||
39 | }, | ||
40 | }; | ||
41 | |||
42 | static struct platform_device rtc_device = { | ||
43 | .name = "sh-rtc", | ||
44 | .id = -1, | ||
45 | .num_resources = ARRAY_SIZE(rtc_resources), | ||
46 | .resource = rtc_resources, | ||
47 | }; | ||
48 | |||
19 | static struct resource usbf_resources[] = { | 49 | static struct resource usbf_resources[] = { |
20 | [0] = { | 50 | [0] = { |
21 | .name = "m66592_udc", | 51 | .name = "m66592_udc", |
@@ -150,6 +180,7 @@ static struct platform_device sci_device = { | |||
150 | }; | 180 | }; |
151 | 181 | ||
152 | static struct platform_device *sh7722_devices[] __initdata = { | 182 | static struct platform_device *sh7722_devices[] __initdata = { |
183 | &rtc_device, | ||
153 | &usbf_device, | 184 | &usbf_device, |
154 | &iic_device, | 185 | &iic_device, |
155 | &sci_device, | 186 | &sci_device, |
@@ -202,7 +233,6 @@ enum { | |||
202 | IRDA, JPU, LCDC, | 233 | IRDA, JPU, LCDC, |
203 | 234 | ||
204 | /* interrupt groups */ | 235 | /* interrupt groups */ |
205 | |||
206 | SIM, RTC, DMAC0123, VIOVOU, USB, DMAC45, FLCTL, I2C, SDHI, | 236 | SIM, RTC, DMAC0123, VIOVOU, USB, DMAC45, FLCTL, I2C, SDHI, |
207 | }; | 237 | }; |
208 | 238 | ||