Re: [U-Boot-Users] i2c_reg_read() on 8xx

2008-12-02 Thread Timur Tabi
On Thu, Oct 23, 2008 at 1:49 AM, Wolfgang Denk [EMAIL PROTECTED] wrote: That would mean to add even more #ifdef'ery to more common files - I don;t think that this is a good odea. I don't like #ifdefs in common code, either, but I think in this case it's still an improvement. What do you

Re: [U-Boot-Users] i2c_reg_read() on 8xx

2008-10-23 Thread Wolfgang Denk
Dear Timur Tabi, In message [EMAIL PROTECTED] you wrote: I don't know much about 8xx, but on 8xxx, all the information needed for I2C configuration is in the board configuration files. Couldn't we just move i2c_init earlier? I don;t remember all the details, sorry. One problem might have

Re: [U-Boot-Users] i2c_reg_read() on 8xx

2008-10-23 Thread Wolfgang Denk
Dear Timur, In message [EMAIL PROTECTED] you wrote: Very early. We have a board with the environment in EEPROM, and EEPROM at I2C. Which board is that? Do you use i2c_reg_read() to read EEPROM, or i2c_read()? Well, just grep where i2c_reg_read() is actually used - it's a LOT of files,

Re: [U-Boot-Users] i2c_reg_read() on 8xx

2008-10-23 Thread Wolfgang Denk
Dear Gary, In message [EMAIL PROTECTED] you wrote: If you look at lib_ppc/board.c you will see that a) i2c_init() is called _while still running out of flash_ because it's in init_sequence[] which is used in board_init_f(). b) i2c_init() is also called in devices_init() which is invoked in

[U-Boot-Users] i2c_reg_read() on 8xx

2008-10-22 Thread Timur Tabi
Wolfgang, Mike Frysinger helped me resolve the problem with i2c_reg_read() on Blackfin, so I'll be posting a new patch soon. However, I noticed that 8xx has a problem, too: uchar i2c_reg_read(uchar i2c_addr, uchar reg) { uchar buf; i2c_init(CONFIG_SYS_I2C_SPEED,

Re: [U-Boot-Users] i2c_reg_read() on 8xx

2008-10-22 Thread Wolfgang Denk
Dear Timur, In message [EMAIL PROTECTED] you wrote: Wolfgang, Mike Frysinger helped me resolve the problem with i2c_reg_read() on Blackfin, so I'll be posting a new patch soon. However, I noticed that 8xx has a problem, too: uchar i2c_reg_read(uchar i2c_addr, uchar reg) {

Re: [U-Boot-Users] i2c_reg_read() on 8xx

2008-10-22 Thread Timur Tabi
Wolfgang Denk wrote: There are some 8xx boards where I2C is used very early so it might be necessary. I have to admit that I don't remember - that code is more than 6 years old. How early? Is there anyone with an 8xx board that can test this out for me? I2C is used for programming DDR on

Re: [U-Boot-Users] i2c_reg_read() on 8xx

2008-10-22 Thread Timur Tabi
Wolfgang Denk wrote: I guess there are other places where things like this are used. Some boards also come with a console over modem configuration which might use I2C very early, IIRC. I don't know much about 8xx, but on 8xxx, all the information needed for I2C configuration is in the

Re: [U-Boot-Users] i2c_reg_read() on 8xx

2008-10-22 Thread Wolfgang Denk
Dear Timur, In message [EMAIL PROTECTED] you wrote: How early? Is there anyone with an 8xx board that can test this out for me? I2C is used for programming DDR on 8xxx boards, and that's pretty early, but 8xxx doesn't have this problem. For example, check the LWMON board (CONFIG_LWMON).

Re: [U-Boot-Users] i2c_reg_read() on 8xx

2008-10-22 Thread Timur Tabi
Detlef Vollmann wrote: Very early. We have a board with the environment in EEPROM, and EEPROM at I2C. Which board is that? Do you use i2c_reg_read() to read EEPROM, or i2c_read()? -- Timur Tabi Linux kernel developer at Freescale

Re: [U-Boot-Users] i2c_reg_read() on 8xx

2008-10-22 Thread Detlef Vollmann
Timur Tabi wrote: Wolfgang Denk wrote: There are some 8xx boards where I2C is used very early so it might be necessary. I have to admit that I don't remember - that code is more than 6 years old. How early? Very early. We have a board with the environment in EEPROM, and EEPROM at I2C.