Skip to contentSkip to conversation

Convert CONFIG_SYS_I2C_OMAP24XX et al to Kconfig

PATCH New Adam Ford 2 participants 6 messages Jul 26, 2017 – Aug 7, 2017

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 Convert CONFIG_SYS_I2C_OMAP24XX et al to Kconfig

This converts the following to Kconfig:
CONFIG_SYS_I2C_OMAP24XX
CONFIG_SYS_I2C_OMAP34XX

configs/devkit8000_defconfig +1 -0
index f5e5317..6accc86 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_JFFS2=y
 CONFIG_CMD_MTDPARTS=y
 CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
+# CONFIG_SYS_I2C_OMAP24XX is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
configs/omap3_zoom1_defconfig +1 -0
index bf1ef98..2233cca 100644
@@ -29,6 +29,7 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_CMD_MTDPARTS=y
 CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
+# CONFIG_SYS_I2C_OMAP24XX is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_FAT_WRITE=y
include/configs/am3517_crane.h +0 -1
index 77d9ba1..19f0ba4 100644
@@ -107,7 +107,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	100000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP34XX
 
 /*
  * Board NAND Info.
include/configs/am3517_evm.h +0 -1
index 26036c4..bfd51ee 100644
@@ -94,7 +94,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	100000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP34XX
 
 /* Ethernet */
 #define CONFIG_DRIVER_TI_EMAC
include/configs/bur_am335x_common.h +0 -1
index 8d0e0ea..c199d64 100644
@@ -73,7 +73,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	100000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP24XX
 
 /*
  * Our platforms make use of SPL to initalize the hardware (primarily
include/configs/cm_t35.h +0 -1
index 99d4800..0280f25 100644
@@ -95,7 +95,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	100000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
 #define CONFIG_SYS_I2C_EEPROM_BUS	0
include/configs/cm_t3517.h +0 -1
index 3fb6676..df8d11d 100644
@@ -103,7 +103,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	400000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
 #define CONFIG_SYS_I2C_EEPROM_BUS	0
include/configs/cm_t54.h +0 -1
index 69706d2..638d9b9 100644
@@ -17,7 +17,6 @@
 #include <configs/ti_omap5_common.h>
 
 /* EEPROM related defines */
-#define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
 #define CONFIG_SYS_I2C_EEPROM_BUS	0
include/configs/devkit8000.h +0 -2
index 5476961..e15eaa6 100644
@@ -65,8 +65,6 @@
 #undef CONFIG_OMAP3_SPI
 
 /* I2C */
-#undef CONFIG_SYS_I2C_OMAP24XX
-#define CONFIG_SYS_I2C_OMAP34XX
 
 /* TWL4030 */
 #define CONFIG_TWL4030_LED		1
include/configs/kc1.h +0 -1
index f040d0b..38c5862 100644
@@ -60,7 +60,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	400000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP24XX
 #define CONFIG_I2C_MULTI_BUS
 
 /*
include/configs/mcx.h +0 -1
index 73fdfbd..5279aad 100644
@@ -88,7 +88,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	100000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP34XX
 
 /* RTC */
 #define CONFIG_RTC_DS1337
include/configs/nokia_rx51.h +0 -1
index 9826514..a06aec1 100644
@@ -112,7 +112,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	100000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP34XX
 
 /*
  * TWL4030
include/configs/omap3_evm.h +0 -1
index 15eb08b..8312337 100644
@@ -150,7 +150,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	100000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP34XX
 
 /*
  * PISMO support
include/configs/omap3_overo.h +0 -1
index 834822d..8372f43 100644
@@ -34,7 +34,6 @@
 #define CONFIG_SYS_MALLOC_LEN	(CONFIG_ENV_SIZE + (128 << 15))
 
 /* I2C Support */
-#define CONFIG_SYS_I2C_OMAP34XX
 
 /* TWL4030 LED */
 #define CONFIG_TWL4030_LED
include/configs/omap3_pandora.h +0 -1
index b7ab628..ec186a2 100644
@@ -30,7 +30,6 @@
  */
 
 /* I2C Support */
-#define CONFIG_SYS_I2C_OMAP34XX
 
 /* TWL4030 LED */
 #define CONFIG_TWL4030_LED
include/configs/omap3_zoom1.h +0 -3
index 23603c6..db67a4d 100644
@@ -64,9 +64,6 @@
 #define CONFIG_CMD_NAND_LOCK_UNLOCK /* Enable lock/unlock support */
 #endif
 
-#undef CONFIG_SYS_I2C_OMAP24XX
-#define CONFIG_SYS_I2C_OMAP34XX
-
 /*
  * TWL4030
  */
include/configs/siemens-am33x-common.h +0 -1
index 22f070d..92febf3 100644
@@ -104,7 +104,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	100000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP24XX
 
 /* Defines for SPL */
 #define CONFIG_SPL_FRAMEWORK
include/configs/sniper.h +0 -1
index 669ce85..34f6d8a 100644
@@ -62,7 +62,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	400000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_I2C_MULTI_BUS
 
 /*
include/configs/tam3517-common.h +0 -1
index a9991fc..cc7a869 100644
@@ -75,7 +75,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	400000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50		/* base address */
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1		/* bytes of address */
 #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW	0x07
include/configs/tao3530.h +0 -1
index 38f5bd0..a00a023 100644
@@ -71,7 +71,6 @@
 #define CONFIG_CMD_NAND		/* NAND support			*/
 
 #define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_SYS_OMAP24_I2C_SPEED	100000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
 #define CONFIG_I2C_MULTI_BUS
include/configs/ti_omap4_common.h +0 -1
index 1a6551e..acfac24 100644
@@ -150,7 +150,6 @@
 #ifdef CONFIG_SPL_BUILD
 /* No need for i2c in SPL mode as we will use SRI2C for PMIC access on OMAP4 */
 #undef CONFIG_SYS_I2C
-#undef CONFIG_SYS_I2C_OMAP24XX
 #endif
 
 #endif /* __CONFIG_TI_OMAP4_COMMON_H */
include/configs/tricorder.h +0 -1
index a0fd583..941c8f0 100644
@@ -62,7 +62,6 @@
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED	100000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP34XX
  
 
 /* EEPROM */
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 Convert CONFIG_SYS_I2C_OMAP24XX et al to Kconfig

Quoted 5 lines · Adam Ford

This converts the following to Kconfig:

   CONFIG_SYS_I2C_OMAP24XX
   CONFIG_SYS_I2C_OMAP34XX

This needs some manual attention. We should just drop CONFIG_SYS_I2C_OMAP24XX as it's meaningless now. Also:

include/configs/devkit8000.h line 69

Quoted 10 lines
include/configs/devkit8000.h +0 -2
index 5476961..e15eaa6 100644
@@ -65,8 +65,6 @@
 #undef CONFIG_OMAP3_SPI
 
 /* I2C */
-#undef CONFIG_SYS_I2C_OMAP24XX
-#define CONFIG_SYS_I2C_OMAP34XX

When you see cases like this, you should delete the comment (and extra blank line) by hand as well, in the commit. There's a few instances of this in the patch. Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170726/2a903dbb/attachment.sig>
author
#2 lore raw

PATCH 1/1 Convert CONFIG_SYS_I2C_OMAP24XX et al to Kconfig

Quoted 11 lines · Tom Rini
Quoted 5 lines · Adam Ford

This converts the following to Kconfig:

   CONFIG_SYS_I2C_OMAP24XX
   CONFIG_SYS_I2C_OMAP34XX

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.

Quoted 7 lines
Quoted 7 lines
include/configs/devkit8000.h +0 -0
index 5476961..e15eaa6 100644
@@ -65,8 +65,6 @@
 #undef CONFIG_OMAP3_SPI
 
Quoted 7 lines

include/configs/devkit8000.h line 69

Quoted 3 lines
include/configs/devkit8000.h +0 -2
 /* I2C */
-#undef CONFIG_SYS_I2C_OMAP24XX
-#define CONFIG_SYS_I2C_OMAP34XX

When you see cases like this, you should delete the comment (and extra blank line) by hand as well, in the commit. There's a few instances of this in the patch. Thanks!

I can revisit this and fix it, but I'll wait to hear a reply to my above comment.

adam

Quoted 3 lines

--
Tom

#3 lore raw

PATCH 1/1 Convert CONFIG_SYS_I2C_OMAP24XX et al to Kconfig

Quoted 28 lines · Adam Ford
Quoted 11 lines · Tom Rini
Quoted 5 lines · Adam Ford

This converts the following to Kconfig:

   CONFIG_SYS_I2C_OMAP24XX
   CONFIG_SYS_I2C_OMAP34XX

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

Quoted 8 lines

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170727/4f0a3118/attachment.sig>
author
#4 lore raw

PATCH 1/1 Convert CONFIG_SYS_I2C_OMAP24XX et al to Kconfig

Quoted 38 lines · Tom Rini
Quoted 28 lines · Adam Ford
Quoted 11 lines · Tom Rini
Quoted 5 lines · Adam Ford

This converts the following to Kconfig:

   CONFIG_SYS_I2C_OMAP24XX
   CONFIG_SYS_I2C_OMAP34XX

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

Quoted 8 lines

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.

Quoted 5 lines

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

Quoted 2 lines

--
Tom

#5 lore raw

PATCH 1/1 Convert CONFIG_SYS_I2C_OMAP24XX et al to Kconfig

Quoted 45 lines · Adam Ford
Quoted 38 lines · Tom Rini
Quoted 28 lines · Adam Ford
Quoted 11 lines · Tom Rini
Quoted 5 lines · Adam Ford

This converts the following to Kconfig:

   CONFIG_SYS_I2C_OMAP24XX
   CONFIG_SYS_I2C_OMAP34XX

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

Quoted 8 lines

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.

Quoted 5 lines

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.

Quoted 4 lines

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?

That seems the most reasonable course, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170807/6041f200/attachment.sig>