[U-Boot] [PATCH] Convert CONFIG_SYS_I2C_OMAP24XX et al to Kconfig
Adam Ford
aford173 at gmail.com
Sun Aug 6 18:27:15 UTC 2017
On Thu, Jul 27, 2017 at 6:55 AM, Tom Rini <trini at konsulko.com> wrote:
> On Wed, Jul 26, 2017 at 09:22:06PM -0500, Adam Ford wrote:
>> On Wed, Jul 26, 2017 at 8:52 PM, Tom Rini <trini at konsulko.com> wrote:
>> > On Wed, Jul 26, 2017 at 09:03:37AM -0500, Adam Ford wrote:
>> >
>> >> This converts the following to Kconfig:
>> >> CONFIG_SYS_I2C_OMAP24XX
>> >> CONFIG_SYS_I2C_OMAP34XX
>> >>
>> >> Signed-off-by: Adam Ford <aford173 at gmail.com>
>> >
>> > This needs some manual attention. We should just drop
>> > CONFIG_SYS_I2C_OMAP24XX as it's meaningless now. Also:
>> >
>> I thought the same thing, but I looked at the driver and the driver
>> has some explicit differences that are unique to the
>> CONFIG_SYS_I2C_OMAP34XX.
>>
>> As an example:
>> #if defined(CONFIG_OMAP34XX)
>> /*
>> * Have to enable interrupts for OMAP2/3, these IPs don't have
>> * an 'irqstatus_raw' register and we shall have to poll 'stat'
>> */
>> writew(I2C_IE_XRDY_IE | I2C_IE_RRDY_IE | I2C_IE_ARDY_IE |
>> I2C_IE_NACK_IE | I2C_IE_AL_IE, &i2c_base->ie);
>> #endif
>>
>>
>>
>> The comment in the code even states there are some minor differences:
>> "Status functions now read irqstatus_raw as per TRM guidelines
>> (except for OMAP243X and OMAP34XX)"
>>
>> So I think we need both.
>> Looking at the ti_omap4_common.h, it defines CONFIG_SYS_I2C_OMAP24XX,
>> but not OMAP34XX, so it appears to me like we might want a naming
>> convention change.
>
> But nothing toggles off of SYS_I2C_OMAP24XX vs SYS_I2C_OMAP34XX is the
> key. It might have back when we supported omap1/2 systems as well, but
> it doesn't today. Everything inside the driver keys off of
> OMAP34XX/AM33XX/etc/etc now.
>
Got it. That makes sense. Since the name of the source files is
omap24xx_i2c.c/.h , would you object to dumping the
CONFIG_SYS_I2C_OMAP34XX in favor of keeping the
CONFIG_SYS_I2C_OMAP24XX for consistency?
adam
> --
> Tom
More information about the U-Boot
mailing list