From: Jens Scharsig <esw@bus-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] at91rm9200: fix errors with CONFIG_CMD_I2C_TREE
Date: Wed, 03 Sep 2008 15:14:30 +0200 [thread overview]
Message-ID: <g9m2jm$89n$1@ger.gmane.org> (raw)
In-Reply-To: <g9jgtd$g6l$1@ger.gmane.org>
It's the same like first, but i2c_get_bus_speed returns CFG_I2C_SPEED
instead of 0. I think this is the better value.
This patch prevents linker error on AT91RM9200 boards, if
CONFIG_CMD_I2_TREE is set.
It implements i2c_set_bus_speed and i2c_get_bus_speed as a dummy function.
Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
---
diff --git a/cpu/arm920t/at91rm9200/i2c.c b/cpu/arm920t/at91rm9200/i2c.c
index 826cea8..48d3986 100644
--- a/cpu/arm920t/at91rm9200/i2c.c
+++ b/cpu/arm920t/at91rm9200/i2c.c
@@ -203,4 +203,14 @@ void i2c_reg_write(uchar i2c_addr, uchar reg, uchar
val)
i2c_write(i2c_addr, reg, 1, &val, 1);
}
+int i2c_set_bus_speed(unsigned int speed)
+{
+ return -1;
+}
+
+unsigned int i2c_get_bus_speed(void)
+{
+ return CFG_I2C_SPEED;
+}
+
#endif /* CONFIG_HARD_I2C */
prev parent reply other threads:[~2008-09-03 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-02 14:00 [U-Boot] [PATCH] at91rm9200: fix errors with CONFIG_CMD_I2C_TREE Jens Scharsig
2008-09-03 13:14 ` Jens Scharsig [this message]
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='g9m2jm$89n$1@ger.gmane.org' \
--to=esw@bus-elektronik.de \
--cc=u-boot@lists.denx.de \
/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