[U-Boot] [PATCH] Convert CONFIG_SYS_OMAP24_I2C_SLAVE et al to Kconfig

Paul Kocialkowski contact at paulk.fr
Thu Jan 25 13:54:16 UTC 2018


Hi,

Le mercredi 24 janvier 2018 à 15:21 -0600, Adam Ford a écrit :
> This converts the following to Kconfig:
>    CONFIG_SYS_OMAP24_I2C_SLAVE
>    CONFIG_SYS_OMAP24_I2C_SPEED

Thanks again for working on Kconfig'ing OMAP support, it is greatly
appreciated!

Reviewed-by: Paul Kocialkowski <contact at paulk.fr>

> Signed-off-by: Adam Ford <aford173 at gmail.com>
> ---
>  configs/am335x_baltos_defconfig        |  1 +
>  configs/cm_t3517_defconfig             |  1 +
>  configs/eco5pk_defconfig               |  1 +
>  configs/kc1_defconfig                  |  1 +
>  configs/mt_ventoux_defconfig           |  1 +
>  configs/sniper_defconfig               |  1 +
>  configs/twister_defconfig              |  1 +
>  drivers/i2c/Kconfig                    | 14 ++++++++++++++
>  include/configs/am3517_crane.h         |  2 --
>  include/configs/am3517_evm.h           |  2 --
>  include/configs/baltos.h               |  2 --
>  include/configs/bur_am335x_common.h    |  2 --
>  include/configs/cm_t35.h               |  2 --
>  include/configs/cm_t3517.h             |  2 --
>  include/configs/kc1.h                  |  2 --
>  include/configs/mcx.h                  |  2 --
>  include/configs/nokia_rx51.h           |  2 --
>  include/configs/siemens-am33x-common.h |  2 --
>  include/configs/sniper.h               |  2 --
>  include/configs/tam3517-common.h       |  2 --
>  include/configs/tao3530.h              |  2 --
>  include/configs/ti_armv7_omap.h        |  2 --
>  include/configs/tricorder.h            |  2 --
>  scripts/config_whitelist.txt           |  2 --
>  24 files changed, 21 insertions(+), 32 deletions(-)
> 
> diff --git a/configs/am335x_baltos_defconfig
> b/configs/am335x_baltos_defconfig
> index 19ea684..a9d5f68 100644
> --- a/configs/am335x_baltos_defconfig
> +++ b/configs/am335x_baltos_defconfig
> @@ -48,6 +48,7 @@ CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
>  CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-
> nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3)
> ,1920k(u-boot),-(UBI)"
>  CONFIG_CMD_UBI=y
>  CONFIG_ISO_PARTITION=y
> +CONFIG_SYS_OMAP24_I2C_SPEED=1000
>  CONFIG_MMC_OMAP_HS=y
>  CONFIG_NAND=y
>  CONFIG_SPL_NAND_DRIVERS=y
> diff --git a/configs/cm_t3517_defconfig b/configs/cm_t3517_defconfig
> index fa78bde..c1e1153 100644
> --- a/configs/cm_t3517_defconfig
> +++ b/configs/cm_t3517_defconfig
> @@ -31,6 +31,7 @@ CONFIG_CMD_MTDPARTS=y
>  CONFIG_MTDIDS_DEFAULT="nand0=nand"
>  CONFIG_MTDPARTS_DEFAULT="mtdparts=nand:512k(x-loader),1920k(u-
> boot),256k(u-boot-env),4m(kernel),-(fs)"
>  CONFIG_ENV_IS_IN_NAND=y
> +CONFIG_SYS_OMAP24_I2C_SPEED=400000
>  CONFIG_LED_STATUS=y
>  CONFIG_LED_STATUS_GPIO=y
>  CONFIG_LED_STATUS0=y
> diff --git a/configs/eco5pk_defconfig b/configs/eco5pk_defconfig
> index dac6aac..d0d82e9 100644
> --- a/configs/eco5pk_defconfig
> +++ b/configs/eco5pk_defconfig
> @@ -27,6 +27,7 @@ CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
>  CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(xloader-
> nand),1024k(uboot-nand),256k(params-nand),5120k(kernel),-(ubifs)"
>  CONFIG_CMD_UBI=y
>  CONFIG_ENV_IS_IN_NAND=y
> +CONFIG_SYS_OMAP24_I2C_SPEED=400000
>  CONFIG_MMC_OMAP_HS=y
>  CONFIG_NAND=y
>  CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
> diff --git a/configs/kc1_defconfig b/configs/kc1_defconfig
> index eaf7112..b501dfe 100644
> --- a/configs/kc1_defconfig
> +++ b/configs/kc1_defconfig
> @@ -35,6 +35,7 @@ CONFIG_CMD_FAT=y
>  CONFIG_CMD_FS_GENERIC=y
>  CONFIG_ISO_PARTITION=y
>  CONFIG_EFI_PARTITION=y
> +CONFIG_SYS_OMAP24_I2C_SPEED=400000
>  CONFIG_MMC_OMAP_HS=y
>  CONFIG_SYS_NS16550=y
>  CONFIG_USB=y
> diff --git a/configs/mt_ventoux_defconfig
> b/configs/mt_ventoux_defconfig
> index fc184d7..e5df51d 100644
> --- a/configs/mt_ventoux_defconfig
> +++ b/configs/mt_ventoux_defconfig
> @@ -32,6 +32,7 @@ CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
>  CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(MLO),1m(u-
> boot),256k(env1),256k(env2),8m(ubisystem),-(rootfs)"
>  CONFIG_CMD_UBI=y
>  CONFIG_ENV_IS_IN_NAND=y
> +CONFIG_SYS_OMAP24_I2C_SPEED=400000
>  CONFIG_MMC_OMAP_HS=y
>  CONFIG_NAND=y
>  CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
> diff --git a/configs/sniper_defconfig b/configs/sniper_defconfig
> index 0761698..d06dfd6 100644
> --- a/configs/sniper_defconfig
> +++ b/configs/sniper_defconfig
> @@ -36,6 +36,7 @@ CONFIG_CMD_FAT=y
>  CONFIG_CMD_FS_GENERIC=y
>  CONFIG_ISO_PARTITION=y
>  CONFIG_EFI_PARTITION=y
> +CONFIG_SYS_OMAP24_I2C_SPEED=400000
>  CONFIG_MMC_OMAP_HS=y
>  CONFIG_SYS_NS16550=y
>  CONFIG_USB=y
> diff --git a/configs/twister_defconfig b/configs/twister_defconfig
> index 34bd769..846e8c9 100644
> --- a/configs/twister_defconfig
> +++ b/configs/twister_defconfig
> @@ -32,6 +32,7 @@ CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
>  CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(MLO),1m(u-
> boot),256k(env1),256k(env2),6m(kernel),-(rootfs)"
>  CONFIG_CMD_UBI=y
>  CONFIG_ENV_IS_IN_NAND=y
> +CONFIG_SYS_OMAP24_I2C_SPEED=400000
>  CONFIG_MMC_OMAP_HS=y
>  CONFIG_NAND=y
>  CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
> diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
> index 0630712..17d21bb 100644
> --- a/drivers/i2c/Kconfig
> +++ b/drivers/i2c/Kconfig
> @@ -162,6 +162,20 @@ config SYS_I2C_OMAP24XX
>  	help
>  	  Add support for the OMAP2+ I2C driver.
>  
> +if SYS_I2C_OMAP24XX
> +config SYS_OMAP24_I2C_SLAVE
> +	int "I2C Slave addr channel 0"
> +	default 1
> +	help
> +	  OMAP24xx I2C Slave address channel 0
> +
> +config SYS_OMAP24_I2C_SPEED
> +	int "I2C Slave channel 0 speed"
> +	default 100000
> +	help
> +	  OMAP24xx Slave speed channel 0
> +endif
> +
>  config SYS_I2C_RCAR_IIC
>  	bool "Renesas RCar Gen3 IIC driver"
>  	depends on RCAR_GEN3 && DM_I2C
> diff --git a/include/configs/am3517_crane.h
> b/include/configs/am3517_crane.h
> index 852bc4d..c97d4a5 100644
> --- a/include/configs/am3517_crane.h
> +++ b/include/configs/am3517_crane.h
> @@ -97,8 +97,6 @@
>  #endif /* CONFIG_USB_AM35X */
>  
>  #define CONFIG_SYS_I2C
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	100000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  
>  /*
>   * Board NAND Info.
> diff --git a/include/configs/am3517_evm.h
> b/include/configs/am3517_evm.h
> index 91e7a55..440ccb4 100644
> --- a/include/configs/am3517_evm.h
> +++ b/include/configs/am3517_evm.h
> @@ -56,8 +56,6 @@
>  #endif /* CONFIG_USB_MUSB_AM35X */
>  
>  /* I2C */
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	100000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  
>  /* Ethernet */
>  #define CONFIG_DRIVER_TI_EMAC
> diff --git a/include/configs/baltos.h b/include/configs/baltos.h
> index 939ee3b..75dd0c5 100644
> --- a/include/configs/baltos.h
> +++ b/include/configs/baltos.h
> @@ -39,8 +39,6 @@
>  #define CONFIG_MTD_DEVICE
>  
>  /* I2C configuration */
> -#undef CONFIG_SYS_OMAP24_I2C_SPEED
> -#define CONFIG_SYS_OMAP24_I2C_SPEED 1000
>  
>  #ifdef CONFIG_NAND
>  #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x00080000
> diff --git a/include/configs/bur_am335x_common.h
> b/include/configs/bur_am335x_common.h
> index 919d74a..72e2cce 100644
> --- a/include/configs/bur_am335x_common.h
> +++ b/include/configs/bur_am335x_common.h
> @@ -70,8 +70,6 @@
>  
>  /* I2C */
>  #define CONFIG_SYS_I2C
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	100000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  
>  /*
>   * Our platforms make use of SPL to initalize the hardware (primarily
> diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
> index 7e3d607..c549d46 100644
> --- a/include/configs/cm_t35.h
> +++ b/include/configs/cm_t35.h
> @@ -80,8 +80,6 @@
>  #define CONFIG_MTD_PARTITIONS
>  
>  #define CONFIG_SYS_I2C
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	100000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
>  #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
>  #define CONFIG_SYS_I2C_EEPROM_BUS	0
> diff --git a/include/configs/cm_t3517.h b/include/configs/cm_t3517.h
> index 48dd6a6..ea5edd9 100644
> --- a/include/configs/cm_t3517.h
> +++ b/include/configs/cm_t3517.h
> @@ -89,8 +89,6 @@
>  #define CONFIG_MTD_PARTITIONS
>  
>  #define CONFIG_SYS_I2C
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	400000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
>  #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
>  #define CONFIG_SYS_I2C_EEPROM_BUS	0
> diff --git a/include/configs/kc1.h b/include/configs/kc1.h
> index 9db99e7..60822bc 100644
> --- a/include/configs/kc1.h
> +++ b/include/configs/kc1.h
> @@ -58,8 +58,6 @@
>   */
>  
>  #define CONFIG_SYS_I2C
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	400000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  #define CONFIG_I2C_MULTI_BUS
>  
>  /*
> diff --git a/include/configs/mcx.h b/include/configs/mcx.h
> index 3459ca1..736ce68 100644
> --- a/include/configs/mcx.h
> +++ b/include/configs/mcx.h
> @@ -79,8 +79,6 @@
>  #define CONFIG_MTD_DEVICE
>  
>  #define CONFIG_SYS_I2C
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	100000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  
>  /* RTC */
>  #define CONFIG_RTC_DS1337
> diff --git a/include/configs/nokia_rx51.h
> b/include/configs/nokia_rx51.h
> index 00509e8..6312ed7 100644
> --- a/include/configs/nokia_rx51.h
> +++ b/include/configs/nokia_rx51.h
> @@ -95,8 +95,6 @@
>  #define CONFIG_AUTO_COMPLETE		/* add autocompletion
> support */
>  
>  #define CONFIG_SYS_I2C
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	100000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  
>  /*
>   * TWL4030
> diff --git a/include/configs/siemens-am33x-common.h
> b/include/configs/siemens-am33x-common.h
> index 32ba972..1a3b87f 100644
> --- a/include/configs/siemens-am33x-common.h
> +++ b/include/configs/siemens-am33x-common.h
> @@ -97,8 +97,6 @@
>  /* I2C Configuration */
>  #define CONFIG_I2C
>  #define CONFIG_SYS_I2C
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	100000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  
>  /* Defines for SPL */
>  #define CONFIG_SPL_TEXT_BASE		0x402F0400
> diff --git a/include/configs/sniper.h b/include/configs/sniper.h
> index b66aeac..e7b251c 100644
> --- a/include/configs/sniper.h
> +++ b/include/configs/sniper.h
> @@ -59,8 +59,6 @@
>   */
>  
>  #define CONFIG_SYS_I2C
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	400000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  #define CONFIG_I2C_MULTI_BUS
>  
>  /*
> diff --git a/include/configs/tam3517-common.h
> b/include/configs/tam3517-common.h
> index 71b0034..9d79885 100644
> --- a/include/configs/tam3517-common.h
> +++ b/include/configs/tam3517-common.h
> @@ -67,8 +67,6 @@
>  #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO	25
>  
>  #define CONFIG_SYS_I2C
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	400000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  #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
> diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h
> index bb66526..07bfa0f 100644
> --- a/include/configs/tao3530.h
> +++ b/include/configs/tao3530.h
> @@ -63,8 +63,6 @@
>  #define CONFIG_MTD_DEVICE	/* needed for mtdparts commands */
>  
>  #define CONFIG_SYS_I2C
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	100000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  #define CONFIG_I2C_MULTI_BUS
>  
>  /*
> diff --git a/include/configs/ti_armv7_omap.h
> b/include/configs/ti_armv7_omap.h
> index 2cff868..0e960a7 100644
> --- a/include/configs/ti_armv7_omap.h
> +++ b/include/configs/ti_armv7_omap.h
> @@ -13,8 +13,6 @@
>  #define __CONFIG_TI_ARMV7_OMAP_H__
>  
>  /* I2C IP block */
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	100000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>  
>  /*
>   * GPMC NAND block.  We support 1 device and the physical address to
> diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
> index b6cf498..652fdc4 100644
> --- a/include/configs/tricorder.h
> +++ b/include/configs/tricorder.h
> @@ -58,8 +58,6 @@
>  
>  /* I2C */
>  #define CONFIG_SYS_I2C
> -#define CONFIG_SYS_OMAP24_I2C_SPEED	100000
> -#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
>   
>  
>  /* EEPROM */
> diff --git a/scripts/config_whitelist.txt
> b/scripts/config_whitelist.txt
> index 2f7cd2e..57a625c 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -3897,12 +3897,10 @@ CONFIG_SYS_NVRAM_SIZE
>  CONFIG_SYS_OBIR
>  CONFIG_SYS_OHCI_BE_CONTROLLER
>  CONFIG_SYS_OHCI_SWAP_REG_ACCESS
> -CONFIG_SYS_OMAP24_I2C_SLAVE
>  CONFIG_SYS_OMAP24_I2C_SLAVE1
>  CONFIG_SYS_OMAP24_I2C_SLAVE2
>  CONFIG_SYS_OMAP24_I2C_SLAVE3
>  CONFIG_SYS_OMAP24_I2C_SLAVE4
> -CONFIG_SYS_OMAP24_I2C_SPEED
>  CONFIG_SYS_OMAP24_I2C_SPEED1
>  CONFIG_SYS_OMAP24_I2C_SPEED2
>  CONFIG_SYS_OMAP24_I2C_SPEED3
-- 
Paul Kocialkowski,

developer of free digital technology and hardware support.

Website: https://www.paulk.fr/
Coding blog: https://code.paulk.fr/
Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180125/3333e353/attachment.sig>


More information about the U-Boot mailing list