linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 10/13] PXA: Colibri: Add M41T00 RTC support
Date: Fri, 13 Aug 2010 06:32:41 +0200	[thread overview]
Message-ID: <1281673964-2119-10-git-send-email-marek.vasut@gmail.com> (raw)
In-Reply-To: <1281673964-2119-1-git-send-email-marek.vasut@gmail.com>

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 arch/arm/mach-pxa/colibri-pxa270-evalboard.c |   23 +++++++++++++++++++++++
 arch/arm/mach-pxa/colibri-pxa270.c           |    4 ++++
 arch/arm/mach-pxa/colibri-pxa300.c           |    4 ++++
 arch/arm/mach-pxa/colibri-pxa320.c           |    4 ++++
 4 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
index e1a2b52..7f27aec 100644
--- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
+++ b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
@@ -19,6 +19,7 @@
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 #include <asm/mach/arch.h>
+#include <linux/i2c.h>
 
 #include <mach/pxa27x.h>
 #include <mach/colibri.h>
@@ -26,6 +27,8 @@
 #include <mach/ohci.h>
 #include <mach/pxa27x-udc.h>
 
+#include <plat/i2c.h>
+
 #include "generic.h"
 #include "devices.h"
 
@@ -87,6 +90,25 @@ static void __init colibri_pxa270_uhc_init(void)
 static inline void colibri_pxa270_uhc_init(void) {}
 #endif
 
+/******************************************************************************
+ * I2C RTC
+ ******************************************************************************/
+#if defined(CONFIG_RTC_DRV_DS1307) || defined(CONFIG_RTC_DRV_DS1307_MODULE)
+static struct i2c_board_info __initdata colibri_pxa270_i2c_devs[] = {
+	{
+		I2C_BOARD_INFO("m41t00", 0x68),
+	},
+};
+
+static void __init colibri_pxa270_rtc_init(void)
+{
+	pxa_set_i2c_info(NULL);
+	i2c_register_board_info(0, ARRAY_AND_SIZE(colibri_pxa270_i2c_devs));
+}
+#else
+static inline void colibri_pxa270_rtc_init(void) {}
+#endif
+
 void __init colibri_pxa270_evalboard_init(void)
 {
 	pxa_set_ffuart_info(NULL);
@@ -95,4 +117,5 @@ void __init colibri_pxa270_evalboard_init(void)
 
 	colibri_pxa270_mmc_init();
 	colibri_pxa270_uhc_init();
+	colibri_pxa270_rtc_init();
 }
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index 8488dfe..1024da5 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -73,6 +73,10 @@ static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
 	GPIO1_GPIO,	/* READY */
 	GPIO84_GPIO,	/* DETECT */
 	GPIO107_GPIO,	/* PPEN */
+
+	/* I2C */
+	GPIO117_I2C_SCL,
+	GPIO118_I2C_SDA,
 };
 #else
 static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {};
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
index 080d0e1..d1cdb98 100644
--- a/arch/arm/mach-pxa/colibri-pxa300.c
+++ b/arch/arm/mach-pxa/colibri-pxa300.c
@@ -45,6 +45,10 @@ static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {
 	/* UHC */
 	GPIO0_2_USBH_PEN,
 	GPIO1_2_USBH_PWR,
+
+	/* I2C */
+	GPIO21_I2C_SCL,
+	GPIO22_I2C_SDA,
 };
 #else
 static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {};
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
index e886ab2..4257382 100644
--- a/arch/arm/mach-pxa/colibri-pxa320.c
+++ b/arch/arm/mach-pxa/colibri-pxa320.c
@@ -69,6 +69,10 @@ static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {
 	/* UHC */
 	GPIO2_2_USBH_PEN,
 	GPIO3_2_USBH_PWR,
+
+	/* I2C */
+	GPIO32_I2C_SCL,
+	GPIO33_I2C_SDA,
 };
 #else
 static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {};
-- 
1.7.1

  parent reply	other threads:[~2010-08-13  4:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-13  4:32 [PATCH 01/13] Balloon3: Disperse MFP config Marek Vasut
2010-08-13  4:32 ` [PATCH 02/13] PXA: Vpac270: Fix gpio_power for MMC Marek Vasut
2010-08-13  4:32 ` [PATCH 03/13] PXA: PalmTC: Modularize Palm Tungsten|C Marek Vasut
2010-08-13  4:32 ` [PATCH 04/13] UCB1400: Pass ucb1400-gpio data through ac97 bus Marek Vasut
2010-08-13  4:32 ` [PATCH 05/13] PXA: Vpac270: Correct touch IRQ passing to UCB1400 Marek Vasut
2010-08-13  4:32 ` [PATCH 06/13] PXA: PalmTC: Pass GPIO offset to ucb1400-gpio Marek Vasut
2010-08-13  4:32 ` [PATCH 07/13] PXA: PalmTC: Add gpio-leds and vibrator support Marek Vasut
2010-08-13  4:32 ` [PATCH 08/13] PXA: Colibri: Toradex Colibri PXA270 CF support Marek Vasut
2010-08-18 11:43   ` Daniel Mack
2010-08-21  6:22     ` Marek Vasut
2010-08-21  9:33       ` Daniel Mack
2010-09-01  7:23   ` Russell King - ARM Linux
2010-09-01 12:39     ` Marek Vasut
2010-08-13  4:32 ` [PATCH 09/13] PXA: Colibri: Push evalboard MFP into module files Marek Vasut
2010-08-13  4:32 ` Marek Vasut [this message]
2010-08-13  4:32 ` [PATCH 11/13] PXA: Colibri: Rename Colibri-evalboard Marek Vasut
2010-08-13  4:32 ` [PATCH 12/13] pxa2xx/pcmcia: Prepare for pxa320 Marek Vasut
2010-08-13  4:32 ` [PATCH 13/13] PXA: Colibri PXA320 PCMCIA driver Marek Vasut
2010-08-18  4:11 ` [PATCH 01/13] Balloon3: Disperse MFP config Eric Miao
2010-08-18  5:05   ` Marek Vasut

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=1281673964-2119-10-git-send-email-marek.vasut@gmail.com \
    --to=marek.vasut@gmail.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).