* [U-Boot-Users] error: `CFG_RTC_BUS_NUM' undeclared
@ 2007-03-01 0:21 Kim Phillips
2007-03-01 6:08 ` Stefan Roese
0 siblings, 1 reply; 3+ messages in thread
From: Kim Phillips @ 2007-03-01 0:21 UTC (permalink / raw)
To: u-boot
The code introduced with your patch "[PATCH] I2C: Add support for multiple I2C busses for RTC & DTT":
http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff;h=0dc018ece13effc689e47479ea9ebf1c98a507f5
breaks board builds that don't define CFG_RTC_BUS_NUM but do define
CFG_CMD_DATE (such as the MPC8349EMDS):
cmd_date.c: In function `do_date':
cmd_date.c:52: error: `CFG_RTC_BUS_NUM' undeclared (first use in this function)
CFG_RTC_BUS_NUM needs to either be protected, or forced to 0 if undefined, or even enforce that all boards that define CMD_DATE also define the RTC bus. Let me know how you want to proceed.
Kim
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] error: `CFG_RTC_BUS_NUM' undeclared
2007-03-01 0:21 [U-Boot-Users] error: `CFG_RTC_BUS_NUM' undeclared Kim Phillips
@ 2007-03-01 6:08 ` Stefan Roese
2007-03-01 22:04 ` Kim Phillips
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Roese @ 2007-03-01 6:08 UTC (permalink / raw)
To: u-boot
Hi Kim,
On Thursday 01 March 2007 01:21, Kim Phillips wrote:
> The code introduced with your patch "[PATCH] I2C: Add support for multiple
> I2C busses for RTC & DTT":
>
> http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff;h=0dc018ece
>13effc689e47479ea9ebf1c98a507f5
>
> breaks board builds that don't define CFG_RTC_BUS_NUM but do define
> CFG_CMD_DATE (such as the MPC8349EMDS):
>
> cmd_date.c: In function `do_date':
> cmd_date.c:52: error: `CFG_RTC_BUS_NUM' undeclared (first use in this
> function)
Ups. Sorry.
> CFG_RTC_BUS_NUM needs to either be protected, or forced to 0 if undefined,
> or even enforce that all boards that define CMD_DATE also define the RTC
> bus. Let me know how you want to proceed.
How about this (I'll forward this patch today to Wolfgang):
[PATCH] I2C: Add missing default CFG_RTC_BUS_NUM & CFG_DTT_BUS_NUM
Signed-off-by: Stefan Roese <sr@denx.de>
---
commit 8c12045a3b06c5b6675d3fe02fbc9f545988129a
tree 1be6aa3d773a9dddb80655f66ad95aee054d618c
parent 743571145b37182757d4e688a77860b36ee77573
author Stefan Roese <sr@denx.de> Thu, 01 Mar 2007 07:03:25 +0100
committer Stefan Roese <sr@denx.de> Thu, 01 Mar 2007 07:03:25 +0100
include/i2c.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/include/i2c.h b/include/i2c.h
index 54c6f9f..d31c72d 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -56,6 +56,14 @@
#define I2C_SET_BUS(a)
#endif
+/* define the I2C bus number for RTC and DTT if not already done */
+#if !defined(CFG_RTC_BUS_NUM)
+#define CFG_RTC_BUS_NUM 0
+#endif
+#if !defined(CFG_DTT_BUS_NUM)
+#define CFG_DTT_BUS_NUM 0
+#endif
+
/*
* Initialization, must be called once on start up, may be called
* repeatedly to change the speed and slave addresses.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot-Users] error: `CFG_RTC_BUS_NUM' undeclared
2007-03-01 6:08 ` Stefan Roese
@ 2007-03-01 22:04 ` Kim Phillips
0 siblings, 0 replies; 3+ messages in thread
From: Kim Phillips @ 2007-03-01 22:04 UTC (permalink / raw)
To: u-boot
On Thu, 1 Mar 2007 07:08:53 +0100
Stefan Roese <sr@denx.de> wrote:
> How about this (I'll forward this patch today to Wolfgang):
>
> [PATCH] I2C: Add missing default CFG_RTC_BUS_NUM & CFG_DTT_BUS_NUM
>
> Signed-off-by: Stefan Roese <sr@denx.de>
>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Kim
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-01 22:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-01 0:21 [U-Boot-Users] error: `CFG_RTC_BUS_NUM' undeclared Kim Phillips
2007-03-01 6:08 ` Stefan Roese
2007-03-01 22:04 ` Kim Phillips
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.