From patchwork Wed Jan 4 14:17:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Heiko_St=C3=BCbner?= X-Patchwork-Id: 134263 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ey0-f184.google.com (mail-ey0-f184.google.com [209.85.215.184]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 7DE08B6F9B for ; Thu, 5 Jan 2012 01:17:55 +1100 (EST) Received: by eabm6 with SMTP id m6sf8224655eab.11 for ; Wed, 04 Jan 2012 06:17:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:from:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:message-id:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=rLLnm1Z04FTPP+X8e6W8xng51gLKb9Wk9nYAdVuz8Fs=; b=RqTsQiHviFYo5AmsTlunXsKlFqQjy4p8RyGdo9ZTew9nRBqL28Avdl6KNiltJy+BkA 1tdMqpj0/a5jzvVR0ca5GJjWbkur8+pR3HT8JzmxXYScLVxYjZFtkBcLb+Z/cxJwjjoo zadriBq9EI2xIa4pYNDCJ+dTDvWphLaPMTe5M= Received: by 10.204.154.141 with SMTP id o13mr3784734bkw.33.1325686670777; Wed, 04 Jan 2012 06:17:50 -0800 (PST) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.213.97.87 with SMTP id k23ls1893880ebn.3.gmail; Wed, 04 Jan 2012 06:17:50 -0800 (PST) Received: by 10.213.108.73 with SMTP id e9mr1312147ebp.1.1325686669929; Wed, 04 Jan 2012 06:17:49 -0800 (PST) Received: by 10.213.108.73 with SMTP id e9mr1312146ebp.1.1325686669849; Wed, 04 Jan 2012 06:17:49 -0800 (PST) Received: from h1778886.stratoserver.net (h1778886.stratoserver.net. [85.214.133.74]) by gmr-mx.google.com with ESMTPS id m16si4118924eei.3.2012.01.04.06.17.49 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Jan 2012 06:17:49 -0800 (PST) Received-SPF: neutral (google.com: 85.214.133.74 is neither permitted nor denied by best guess record for domain of heiko@sntech.de) client-ip=85.214.133.74; Received: from p509909d9.dip0.t-ipconnect.de ([80.153.9.217] helo=nx4-rtr-0001.kes) by h1778886.stratoserver.net with esmtpa (Exim 4.69) (envelope-from ) id 1RiReo-0006kZ-9k; Wed, 04 Jan 2012 15:17:34 +0100 Received: from [192.168.30.196] (helo=nx4-deb-0000.localnet) by nx4-rtr-0001.kes with esmtp (Exim 4.69) (envelope-from ) id 1RiRem-0005Tw-Ri; Wed, 04 Jan 2012 15:17:34 +0100 From: Heiko =?windows-1252?q?St=FCbner?= To: Kukjin Kim Subject: [rtc-linux] [PATCH 4/4] ARM: S3C2443/S3C2416: add s3c_rtc_setname and rename rtc devices Date: Wed, 4 Jan 2012 15:17:30 +0100 User-Agent: KMail/1.13.7 (Linux/2.6.39-2-amd64; KDE/4.6.4; x86_64; ; ) Cc: Sylwester Nawrocki , ben-linux@fluff.org, a.zummo@towertech.it, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rtc-linux@googlegroups.com References: <201112211014.30695.heiko@sntech.de> <201201041512.55126.heiko@sntech.de> <201201041514.57688.heiko@sntech.de> In-Reply-To: <201201041514.57688.heiko@sntech.de> MIME-Version: 1.0 Message-Id: <201201041517.30523.heiko@sntech.de> X-Original-Sender: heiko@sntech.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 85.214.133.74 is neither permitted nor denied by best guess record for domain of heiko@sntech.de) smtp.mail=heiko@sntech.de Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , As the S3C24xx SoCs use the same rtc device a renaming capability like in the adc driver is necessary. This patch adds a s3c_rtc_setname function and names the rtc devices for S3C2443 and S3C2416 accordingly. Signed-off-by: Heiko Stuebner Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c2416/s3c2416.c | 2 + arch/arm/mach-s3c2443/s3c2443.c | 2 + arch/arm/plat-samsung/include/plat/rtc-core.h | 27 +++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-samsung/include/plat/rtc-core.h diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c index ee214bc..604cf98 100644 --- a/arch/arm/mach-s3c2416/s3c2416.c +++ b/arch/arm/mach-s3c2416/s3c2416.c @@ -61,6 +61,7 @@ #include #include #include +#include static struct map_desc s3c2416_iodesc[] __initdata = { IODESC_ENT(WATCHDOG), @@ -99,6 +100,7 @@ int __init s3c2416_init(void) s3c_fb_setname("s3c2443-fb"); s3c_adc_setname("s3c2416-adc"); + s3c_rtc_setname("s3c2416-rtc"); #ifdef CONFIG_PM register_syscore_ops(&s3c2416_pm_syscore_ops); diff --git a/arch/arm/mach-s3c2443/s3c2443.c b/arch/arm/mach-s3c2443/s3c2443.c index a22b771..9e6be20 100644 --- a/arch/arm/mach-s3c2443/s3c2443.c +++ b/arch/arm/mach-s3c2443/s3c2443.c @@ -42,6 +42,7 @@ #include #include #include +#include static struct map_desc s3c2443_iodesc[] __initdata = { IODESC_ENT(WATCHDOG), @@ -72,6 +73,7 @@ int __init s3c2443_init(void) s3c_fb_setname("s3c2443-fb"); s3c_adc_setname("s3c2443-adc"); + s3c_rtc_setname("s3c2443-rtc"); /* change WDT IRQ number */ s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT; diff --git a/arch/arm/plat-samsung/include/plat/rtc-core.h b/arch/arm/plat-samsung/include/plat/rtc-core.h new file mode 100644 index 0000000..21d8594 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/rtc-core.h @@ -0,0 +1,27 @@ +/* linux/arch/arm/plat-samsung/include/plat/rtc-core.h + * + * Copyright (c) 2011 Heiko Stuebner + * + * Samsung RTC Controller core functions + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#ifndef __ASM_PLAT_RTC_CORE_H +#define __ASM_PLAT_RTC_CORE_H __FILE__ + +/* These functions are only for use with the core support code, such as + * the cpu specific initialisation code + */ + +/* re-define device name depending on support. */ +static inline void s3c_rtc_setname(char *name) +{ +#if defined(CONFIG_SAMSUNG_DEV_RTC) || defined(CONFIG_PLAT_S3C24XX) + s3c_device_rtc.name = name; +#endif +} + +#endif /* __ASM_PLAT_RTC_CORE_H */