Syed Mohammed, Khasim wrote:
> Hi all,
> I am hereby attaching the splash screen and I2C multibus support in u-boot for REV C.
Seems that patches in attachment are independent. But it might help if
you give numbering to make clear in which order to apply patches next
time.
> The u-boot source is base lined from http://www.beagleboard.org/gitweb/?p=u-boot-arm.git;a=shortlog;h=for-…
Now that [1] is now based off of the patches accepted at [2], I'm now
comfortable generating patches off of [1]. I applied your I2C patch
to [3], but I left my logo. I applied a counter bug fix, which causes
it to work with my LG L1933-TR DVI-D monitor. I'll try with my HDTV
and Pico Projector when I get home.
I'll also generate patches to send to the list, but I had some problem
with the I2C:
OMAP3 beagleboard.org # ide 2
Setting bus to 2
OMAP3 beagleboard.org # imd 0x50 0 100
I2C read: I/O error
Error reading the chip.
.
.
.
Error reading the chip.
I2C read: I/O error
I'm not sure if this is due to my monitor or what. Perhaps this
misses some I2C fix?
[1] http://www.sakoman.net/cgi-bin/gitweb.cgi?p=u-boot-omap3.git;a=shortlog;h=refs/heads/omap3-dev
[2] U-Boot / U-Boot · GitLab
[3] http://www.beagleboard.org/gitweb/?p=u-boot-arm.git;a=shortlog;h=revc-validation-20090203d
> Kindly review and update me your findings for the same.
* splash-screen.patch (doesn't apply against omap3-dev):
- Are you sure that the various
*((unsigned short *)
don't need a volatile? Why don't you use writew() for this?
- Why do you remove copyright?
@@ -1,9 +1,5 @@
/*
- * (C) Copyright 2009
- * Texas Instruments, <www.ti.com>
- *
- * Author :
- * Jason Kridner <jkrid...@beagleboard.org>
+ * BeagleBoard splash screen
*
* See file CREDITS for list of people who contributed to this
* project.
@@ -25,12481 +21,8824 @@
I've addressed these in the patch I will provide.
* i2c-multibus-support.patch (applies against omap3-dev):
- Changes are not clean:
Warning: trailing whitespace in line 1376 of common/cmd_i2c.c
Warning: trailing whitespace in lines 366,377,378 of
drivers/i2c/omap24xx_i2c.c
I fixed this in the patch before applying.
- This is unrelated to I2C changes:
+ "loadbootscript=fatload mmc 0 ${loadaddr} reset.scr\0" \
I fixed this in the patch before applying.
- Instead of adding these ugly wrapper macros
+#define i2c_readb(a) readb(i2c_base + (a))
+#define i2c_writeb(v,a) writeb((v), (i2c_base + (a)))
+#define i2c_readw(a) readw(i2c_base +(a))
+#define i2c_writew(v,a) writew((v), (i2c_base + (a)))
I'd like to propose to convert register access to struct style
typedef struct i2c {
unsigned int rev; /* 0x00 */
unsigned int ie; /* 0x04 */
....
} i2c_t;
In code you can do then
static i2c_t *i2c_base = (i2c_t *)I2C_DEFAULT_BASE;
int i2c_set_bus_num(unsigned int bus)
{
if \(bus == 1\)
i2c\_base = \(i2c\_t \*\)I2C\_BASE2;
else
i2c\_base = \(i2c\_t \*\)I2C\_BASE1;
return 0;
}
and convert all readx/writex to stuct style:
- writew(0x2, I2C_SYSC);
+ writew(0x2, &i2c_base->sysc);
Wolfgang will be happy with this and you don't need the wrapper macros.
I have not yet made this change and will seek to do so.