From patchwork Wed Dec 21 09:18:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 132605 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-iy0-f184.google.com (mail-iy0-f184.google.com [209.85.210.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 A4C90B711D for ; Wed, 21 Dec 2011 20:18:30 +1100 (EST) Received: by iaeo4 with SMTP id o4sf9285645iae.11 for ; Wed, 21 Dec 2011 01:18:27 -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=VV6wmAnLorFPTsT2aIYgMnCDJakrjK+Girvr2tTVByY=; b=EMw3V/OX0TmnarET1B65SKOCWQpa5btWSOXqodac3Smz04zs5LjVWxpvNHneblkrwT l3tN8C4NvUkyFXc33aqys1hwMkJ7g0IYYwdj2AZTDt4bkiGeyipN4cWxqLzO92YcgOYW oUNXa7Wv3I3D8f+T/jhUoM5vtsYh22GD7/RQU= Received: by 10.50.77.131 with SMTP id s3mr832127igw.2.1324459106740; Wed, 21 Dec 2011 01:18:26 -0800 (PST) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.209.37 with SMTP id mj5ls4131074igc.2.canary; Wed, 21 Dec 2011 01:18:26 -0800 (PST) Received: by 10.68.190.2 with SMTP id gm2mr4404664pbc.4.1324459106281; Wed, 21 Dec 2011 01:18:26 -0800 (PST) Received: by 10.68.190.2 with SMTP id gm2mr4404662pbc.4.1324459106272; Wed, 21 Dec 2011 01:18:26 -0800 (PST) Received: from h1778886.stratoserver.net (h1778886.stratoserver.net. [85.214.133.74]) by gmr-mx.google.com with ESMTPS id n3si4403490pbd.1.2011.12.21.01.18.25 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Dec 2011 01:18:26 -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 1RdIJQ-0001HT-QB; Wed, 21 Dec 2011 10:18:12 +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 1RdIJP-0001M0-GY; Wed, 21 Dec 2011 10:18:12 +0100 From: Heiko =?iso-8859-1?q?St=FCbner?= To: Kukjin Kim , ben-linux@fluff.org, a.zummo@towertech.it Subject: [rtc-linux] [PATCH 4/4] ARM: S3C2443/S3C2416: add s3c_rtc_setname and rename rtc devices Date: Wed, 21 Dec 2011 10:18:11 +0100 User-Agent: KMail/1.13.7 (Linux/2.6.39-2-amd64; KDE/4.6.4; x86_64; ; ) Cc: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rtc-linux@googlegroups.com References: <201112211014.30695.heiko@sntech.de> In-Reply-To: <201112211014.30695.heiko@sntech.de> MIME-Version: 1.0 Message-Id: <201112211018.11413.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 --- 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 */