Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: Add on-chip RTC support for SH7722.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

+33 -3
+1 -1
arch/sh/include/cpu-sh4/cpu/rtc.h
··· 1 1 #ifndef __ASM_SH_CPU_SH4_RTC_H 2 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 5 #define rtc_reg_size sizeof(u16) 6 6 #else 7 7 #define rtc_reg_size sizeof(u32)
+32 -2
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
··· 1 1 /* 2 2 * SH7722 Setup 3 3 * 4 - * Copyright (C) 2006 - 2007 Paul Mundt 4 + * Copyright (C) 2006 - 2008 Paul Mundt 5 5 * 6 6 * This file is subject to the terms and conditions of the GNU General Public 7 7 * License. See the file "COPYING" in the main directory of this archive ··· 15 15 #include <linux/uio_driver.h> 16 16 #include <asm/clock.h> 17 17 #include <asm/mmzone.h> 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 + }; 18 48 19 49 static struct resource usbf_resources[] = { 20 50 [0] = { ··· 180 150 }; 181 151 182 152 static struct platform_device *sh7722_devices[] __initdata = { 153 + &rtc_device, 183 154 &usbf_device, 184 155 &iic_device, 185 156 &sci_device, ··· 233 202 IRDA, JPU, LCDC, 234 203 235 204 /* interrupt groups */ 236 - 237 205 SIM, RTC, DMAC0123, VIOVOU, USB, DMAC45, FLCTL, I2C, SDHI, 238 206 }; 239 207