From: ryan@bluewatersys.com (Ryan Mallon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 19/23] at91: Make RTC device common
Date: Fri, 29 Apr 2011 14:59:28 +1200 [thread overview]
Message-ID: <1304045972-19319-20-git-send-email-ryan@bluewatersys.com> (raw)
In-Reply-To: <1304045972-19319-1-git-send-email-ryan@bluewatersys.com>
The RTC device code for the AT91RM9200, AT91SAM9G45 and AT91SAM9RL are
all exactly the same. Remove the individual implementations and
replace them with a single version in devices.c
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
---
arch/arm/mach-at91/at91rm9200_devices.c | 33 -----------------------------
arch/arm/mach-at91/at91sam9g45_devices.c | 33 -----------------------------
arch/arm/mach-at91/at91sam9rl_devices.c | 34 ------------------------------
arch/arm/mach-at91/devices.c | 20 +++++++++++++++++
4 files changed, 20 insertions(+), 100 deletions(-)
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 9f678de..f251ed1 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -277,25 +277,6 @@ static struct at91_dev_table_tcb device_tcb1 __initdata = {
};
/* --------------------------------------------------------------------
- * RTC
- * -------------------------------------------------------------------- */
-
-#if defined(CONFIG_RTC_DRV_AT91RM9200) || defined(CONFIG_RTC_DRV_AT91RM9200_MODULE)
-static struct platform_device at91rm9200_rtc_device = {
- .name = "at91_rtc",
- .id = -1,
- .num_resources = 0,
-};
-
-static void __init at91_add_device_rtc(void)
-{
- platform_device_register(&at91rm9200_rtc_device);
-}
-#else
-static void __init at91_add_device_rtc(void) {}
-#endif
-
-/* --------------------------------------------------------------------
* SSC -- Synchronous Serial Controller
* -------------------------------------------------------------------- */
@@ -444,17 +425,3 @@ void __init at91rm9200_init_devices(void)
{
at91_init_devices(&at91rm9200_device_table);
}
-
-/* -------------------------------------------------------------------- */
-
-/*
- * These devices are always present and don't need any board-specific
- * setup.
- */
-static int __init at91_add_standard_devices(void)
-{
- at91_add_device_rtc();
- return 0;
-}
-
-arch_initcall(at91_add_standard_devices);
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index f67a675..3627c2e 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -377,26 +377,6 @@ static struct at91_dev_table_tcb device_tcb1 __initdata = {
};
/* --------------------------------------------------------------------
- * RTC
- * -------------------------------------------------------------------- */
-
-#if defined(CONFIG_RTC_DRV_AT91RM9200) || defined(CONFIG_RTC_DRV_AT91RM9200_MODULE)
-static struct platform_device at91sam9g45_rtc_device = {
- .name = "at91_rtc",
- .id = -1,
- .num_resources = 0,
-};
-
-static void __init at91_add_device_rtc(void)
-{
- platform_device_register(&at91sam9g45_rtc_device);
-}
-#else
-static void __init at91_add_device_rtc(void) {}
-#endif
-
-
-/* --------------------------------------------------------------------
* Touchscreen
* -------------------------------------------------------------------- */
@@ -569,16 +549,3 @@ void __init at91sam9g45_init_devices(void)
{
at91_init_devices(&at91sam9g45_device_table);
}
-
-/* -------------------------------------------------------------------- */
-/*
- * These devices are always present and don't need any board-specific
- * setup.
- */
-static int __init at91_add_standard_devices(void)
-{
- at91_add_device_rtc();
- return 0;
-}
-
-arch_initcall(at91_add_standard_devices);
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index 3dac87f..2aa465b 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -271,26 +271,6 @@ static struct at91_dev_table_tsadcc device_tsadcc __initdata = {
};
/* --------------------------------------------------------------------
- * RTC
- * -------------------------------------------------------------------- */
-
-#if defined(CONFIG_RTC_DRV_AT91RM9200) || defined(CONFIG_RTC_DRV_AT91RM9200_MODULE)
-static struct platform_device at91sam9rl_rtc_device = {
- .name = "at91_rtc",
- .id = -1,
- .num_resources = 0,
-};
-
-static void __init at91_add_device_rtc(void)
-{
- platform_device_register(&at91sam9rl_rtc_device);
-}
-#else
-static void __init at91_add_device_rtc(void) {}
-#endif
-
-
-/* --------------------------------------------------------------------
* RTT
* -------------------------------------------------------------------- */
@@ -445,17 +425,3 @@ void __init at91sam9rl_init_devices(void)
{
at91_init_devices(&at91sam9rl_device_table);
}
-
-/* -------------------------------------------------------------------- */
-
-/*
- * These devices are always present and don't need any board-specific
- * setup.
- */
-static int __init at91_add_standard_devices(void)
-{
- at91_add_device_rtc();
- return 0;
-}
-
-arch_initcall(at91_add_standard_devices);
diff --git a/arch/arm/mach-at91/devices.c b/arch/arm/mach-at91/devices.c
index a79d477..b867663 100644
--- a/arch/arm/mach-at91/devices.c
+++ b/arch/arm/mach-at91/devices.c
@@ -1745,12 +1745,32 @@ void __init at91_add_device_hdmac(void)
void __init at91_add_device_hdmac(void) {}
#endif
+/* --------------------------------------------------------------------
+ * RTC
+ * -------------------------------------------------------------------- */
+
+#if defined(CONFIG_RTC_DRV_AT91RM9200) || defined(CONFIG_RTC_DRV_AT91RM9200_MODULE)
+static struct platform_device at91_rtc_device = {
+ .name = "at91_rtc",
+ .id = -1,
+ .num_resources = 0,
+};
+
+static void __init at91_add_device_rtc(void)
+{
+ platform_device_register(&at91_rtc_device);
+}
+#else
+static void __init at91_add_device_rtc(void) {}
+#endif
+
static int __init at91_add_standard_devices(void)
{
at91_add_device_tc();
at91_add_device_rtt();
at91_add_device_watchdog();
at91_add_device_hdmac();
+ at91_add_device_rtc();
return 0;
}
--
1.7.0.4
next prev parent reply other threads:[~2011-04-29 2:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 2:59 [PATCH v3 00/23] Create common framework for AT91 device initialisation Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 01/23] at91: Add common devices framework Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 02/23] at91: Make Ethernet device common Ryan Mallon
2011-04-29 9:08 ` Russell King - ARM Linux
2011-04-29 9:38 ` Ryan Mallon
2011-04-29 9:54 ` Russell King - ARM Linux
2011-04-29 2:59 ` [PATCH v3 03/23] at91: Make USB OHCI/EHCI devices common Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 04/23] at91: Make UDC device common Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 05/23] at91: Make MMC " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 06/23] at91: Make NAND " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 07/23] at91: Make TWI " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 08/23] at91: Make SPI " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 09/23] at91: Make TCB " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 10/23] at91: Make RTT " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 11/23] at91: Make watchdog " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 12/23] at91: Make UART devices common Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 13/23] at91: Make PWM device common Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 14/23] at91: Make SSC " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 15/23] at91: Make AC97 " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 16/23] at91: Make LCD controller " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 17/23] at91: Make touchscreen " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 18/23] at91: Make HDMAC " Ryan Mallon
2011-04-29 2:59 ` Ryan Mallon [this message]
2011-04-29 2:59 ` [PATCH v3 20/23] at91: Make high speed USB gadget " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 21/23] at91: Make compact flash " Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 22/23] at91: Move at91sam9263 CAN device to common devices Ryan Mallon
2011-04-29 2:59 ` [PATCH v3 23/23] at91: Remove mAgic and ISI device code Ryan Mallon
2011-04-29 18:04 ` [PATCH v3 00/23] Create common framework for AT91 device initialisation H Hartley Sweeten
2011-04-29 20:14 ` Ryan Mallon
2011-05-02 19:46 ` Jean-Christophe PLAGNIOL-VILLARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304045972-19319-20-git-send-email-ryan@bluewatersys.com \
--to=ryan@bluewatersys.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).