Re: [PATCH 4/5] ppc: DA923RC: add board support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/10/2013 07:48, Sascha Hauer wrote:
>>> +
>>> > > +	fsl_i2c_init(0, 400000, 0x7f);
>>> > > +	/* Read board id from offset 0. */
>>> > > +	ret = fsl_i2c_read(i2c, 0x3b, 0, 1, &id, sizeof(uint8_t));
>>> > > +	fsl_i2c_stop(i2c);
>>> > > +
>>> > > +	if (ret == -1) {
>>> > > +		/* Enable I2C bus on GBX460. */
>>> > > +		out_be16(IOMEM(0xfc010020), 0);
>>> > > +		ret = fsl_i2c_read(i2c, 0x3b, 0, 1, &id, sizeof(uint8_t));
>>> > > +		fsl_i2c_stop(i2c);
>> > why you do not simly use the standdard i2c AP?
> I think because the machine is still running from SRAM or flash here and
> I2C is needed to read out the SPD EEPROM for setting up SDRAM.
> 

In order to use the I2C API would I not need to register my i2c bus
first? This only happens later in the initcall list with device-initcall.


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux