[U-Boot-Users] PATCH: i2c_reg functions for at91rm9200

7 Apr
2005
7 Apr
'05
10:06 a.m.
Hi there,
in order to use an I2C RTC with the at91rm9200 we need i2c_reg_write() and i2c_reg_write() functions. Please consider the patch attached.
* Patch by Steven Scholz, 07 Apr 2005: - add i2c_reg_write() and i2c_reg_write() for at91rm9200 I2C
--
Steven
Index: u-boot/cpu/arm920t/at91rm9200/i2c.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/cpu/arm920t/at91rm9200/i2c.c,v
retrieving revision 1.1
diff -u -r1.1 i2c.c
--- u-boot/cpu/arm920t/at91rm9200/i2c.c 6 Apr 2005 13:52:34 -0000 1.1
+++ u-boot/cpu/arm920t/at91rm9200/i2c.c 7 Apr 2005 08:03:34 -0000
@@ -189,4 +189,19 @@
debug ("Found AT91 i2c\n");
return;
}
+
+uchar i2c_reg_read(uchar i2c_addr, uchar reg)
+{
+ char buf;
+
+ i2c_read(i2c_addr, reg, 1, &buf, 1);
+
+ return(buf);
+}
+
+void i2c_reg_write(uchar i2c_addr, uchar reg, uchar val)
+{
+ i2c_write(i2c_addr, reg, 1, &val, 1);
+}
+
#endif /* CONFIG_HARD_I2C */

8 Apr
8 Apr
12:37 a.m.
In message 4254E9EC.6090406@imc-berlin.de you wrote:
- Patch by Steven Scholz, 07 Apr 2005:
- add i2c_reg_write() and i2c_reg_write() for at91rm9200 I2C
Added, thanks.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Backed up the system lately?
7334
Age (days ago)
7334
Last active (days ago)
1 comments
2 participants
participants (2)
-
Steven Scholz
-
Wolfgang Denk