From: rvinson@mvista.com (Randy Vinson)
To: Kumar Gala <kumar.gala@freescale.com>
Cc: Greg KH <greg@kroah.com>,
sensors@stimpy.netroedge.com, linuxppc-embedded@ozlabs.org
Subject: [lm-sensors] [PATCH 2/2] Add support for Maxim/Dallas DS1374
Date: Sat, 04 Jun 2005 07:59:28 +0000 [thread overview]
Message-ID: <42A0CF1C.6000900@mvista.com> (raw)
In-Reply-To: <42A0CD46.60300@mvista.com>
Greetings,
This is part 2 of the patch to add support for the DS1374 I2C RTC chip
from Maxim/Dallas.
Randy Vinson
Add support for the I2C Real-Time Clock on the MPC8349ADS board.
This change provides support for the DS1374 Real-Time Clock chip present
on the MPC8349ADS board. It depends on a previous patch which adds I2C
support for the DS1374.
Signed-off-by: Randy Vinson <rvinson@mvista.com>
---
commit 07fb1bd27347f7f0df1309c40d09a2f1a9a98731
tree b3ac3ac93679372aa5111268b623c5dda4a5039e
parent f95cc4d276cc332225bd823a2ae3be553c119990
author Randy Vinson <rvinson@linuxbox.(none)> Fri, 03 Jun 2005 13:57:46 -0700
committer Randy Vinson <rvinson@linuxbox.(none)> Fri, 03 Jun 2005 13:57:46 -0700
arch/ppc/platforms/83xx/mpc834x_sys.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.c
@@ -227,6 +227,26 @@ mpc834x_sys_init_IRQ(void)
ipic_set_default_priority();
}
+#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
+extern ulong ds1374_get_rtc_time(void);
+extern int ds1374_set_rtc_time(ulong);
+
+static int __init
+mpc834x_rtc_hookup(void)
+{
+ struct timespec tv;
+
+ ppc_md.get_rtc_time = ds1374_get_rtc_time;
+ ppc_md.set_rtc_time = ds1374_set_rtc_time;
+
+ tv.tv_nsec = 0;
+ tv.tv_sec = (ppc_md.get_rtc_time)();
+ do_settimeofday(&tv);
+
+ return 0;
+}
+late_initcall(mpc834x_rtc_hookup);
+#endif
static __inline__ void
mpc834x_sys_set_bat(void)
{
WARNING: multiple messages have this Message-ID (diff)
From: Randy Vinson <rvinson@mvista.com>
To: Kumar Gala <kumar.gala@freescale.com>
Cc: Greg KH <greg@kroah.com>,
sensors@stimpy.netroedge.com, linuxppc-embedded@ozlabs.org
Subject: [PATCH 2/2] Add support for Maxim/Dallas DS1374 Real-Time Clock Chip
Date: Fri, 03 Jun 2005 14:43:56 -0700 [thread overview]
Message-ID: <42A0CF1C.6000900@mvista.com> (raw)
In-Reply-To: <42A0CD46.60300@mvista.com>
Greetings,
This is part 2 of the patch to add support for the DS1374 I2C RTC chip
from Maxim/Dallas.
Randy Vinson
Add support for the I2C Real-Time Clock on the MPC8349ADS board.
This change provides support for the DS1374 Real-Time Clock chip present
on the MPC8349ADS board. It depends on a previous patch which adds I2C
support for the DS1374.
Signed-off-by: Randy Vinson <rvinson@mvista.com>
---
commit 07fb1bd27347f7f0df1309c40d09a2f1a9a98731
tree b3ac3ac93679372aa5111268b623c5dda4a5039e
parent f95cc4d276cc332225bd823a2ae3be553c119990
author Randy Vinson <rvinson@linuxbox.(none)> Fri, 03 Jun 2005 13:57:46 -0700
committer Randy Vinson <rvinson@linuxbox.(none)> Fri, 03 Jun 2005 13:57:46 -0700
arch/ppc/platforms/83xx/mpc834x_sys.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.c
@@ -227,6 +227,26 @@ mpc834x_sys_init_IRQ(void)
ipic_set_default_priority();
}
+#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
+extern ulong ds1374_get_rtc_time(void);
+extern int ds1374_set_rtc_time(ulong);
+
+static int __init
+mpc834x_rtc_hookup(void)
+{
+ struct timespec tv;
+
+ ppc_md.get_rtc_time = ds1374_get_rtc_time;
+ ppc_md.set_rtc_time = ds1374_set_rtc_time;
+
+ tv.tv_nsec = 0;
+ tv.tv_sec = (ppc_md.get_rtc_time)();
+ do_settimeofday(&tv);
+
+ return 0;
+}
+late_initcall(mpc834x_rtc_hookup);
+#endif
static __inline__ void
mpc834x_sys_set_bat(void)
{
next prev parent reply other threads:[~2005-06-04 7:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-03 21:36 [PATCH 1/2] Add support for Maxim/Dallas DS1374 Real-Time Clock Chip Randy Vinson
2005-06-04 7:59 ` [lm-sensors] [PATCH 1/2] Add support for Maxim/Dallas DS1374 Randy Vinson
2005-06-03 21:41 ` [PATCH 1/2] Add support for Maxim/Dallas DS1374 Real-Time Clock Chip Kumar Gala
2005-06-04 7:59 ` [lm-sensors] Re: [PATCH 1/2] Add support for Maxim/Dallas DS1374 Kumar Gala
2005-06-03 22:05 ` [PATCH 1/2] Add support for Maxim/Dallas DS1374 Real-Time Clock Chip Randy Vinson
2005-06-04 7:59 ` [lm-sensors] Re: [PATCH 1/2] Add support for Maxim/Dallas DS1374 Randy Vinson
2005-06-03 21:43 ` Randy Vinson [this message]
2005-06-04 7:59 ` [lm-sensors] [PATCH 2/2] " Randy Vinson
2005-06-03 21:46 ` [PATCH 1/2] Add support for Maxim/Dallas DS1374 Real-Time Clock Chip Eugene Surovegin
2005-06-04 7:59 ` [lm-sensors] Re: [PATCH 1/2] Add support for Maxim/Dallas DS1374 Eugene Surovegin
2005-06-03 22:17 ` [PATCH 1/2] Add support for Maxim/Dallas DS1374 Real-Time Clock Chip Randy Vinson
2005-06-04 7:59 ` [lm-sensors] Re: [PATCH 1/2] Add support for Maxim/Dallas DS1374 Randy Vinson
2005-06-09 17:25 ` [lm-sensors] Re: [PATCH 1/2] Add support for Maxim/Dallas DS1374 Real-Time Clock Chip Jean Delvare
2005-06-09 19:26 ` [lm-sensors] Re: [PATCH 1/2] Add support for Maxim/Dallas Jean Delvare
2005-06-09 19:06 ` [lm-sensors] Re: [PATCH 1/2] Add support for Maxim/Dallas DS1374 Real-Time Clock Chip Mark A. Greer
2005-06-09 21:07 ` [lm-sensors] Re: [PATCH 1/2] Add support for Maxim/Dallas DS1374 Mark A. Greer
2005-06-09 19:29 ` [lm-sensors] Re: [PATCH 1/2] Add support for Maxim/Dallas DS1374 Real-Time Clock Chip Jean Delvare
2005-06-09 21:30 ` [lm-sensors] Re: [PATCH 1/2] Add support for Maxim/Dallas Jean Delvare
2005-06-09 18:21 ` [lm-sensors] [PATCH 1/2] Add support for Maxim/Dallas DS1374 Real-Time Clock Chip Jean Delvare
2005-06-09 20:21 ` [lm-sensors] [PATCH 1/2] Add support for Maxim/Dallas DS1374 Jean Delvare
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=42A0CF1C.6000900@mvista.com \
--to=rvinson@mvista.com \
--cc=greg@kroah.com \
--cc=kumar.gala@freescale.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=sensors@stimpy.netroedge.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.