From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 07/11] i2c: Drop use of CONFIG_I2C_HARD
Date: Fri, 28 Apr 2017 06:54:23 +0200 [thread overview]
Message-ID: <5902CAFF.80904@denx.de> (raw)
In-Reply-To: <20170423153525.14882-8-sjg@chromium.org>
Hello Simon,
Am 23.04.2017 um 17:35 schrieb Simon Glass:
> Drop use of this long-deprecated option.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> README | 16 ++++++++--------
> board/ti/am335x/board.c | 6 +-----
> board/ti/am43xx/board.c | 3 +--
> cmd/eeprom.c | 2 --
> common/board_f.c | 4 ++--
> common/stdio.c | 5 +----
> include/configs/PATI.h | 7 +++----
> include/configs/am335x_evm.h | 5 -----
> include/configs/am43xx_evm.h | 6 ------
> scripts/config_whitelist.txt | 1 -
> 10 files changed, 16 insertions(+), 39 deletions(-)
Hmm.. missing this patch in patchwork ... nevertheless:
Reviewed-by: Heiko Schocher <hs@denx.de>
Applied to u-boot-i2c/next
bye,
Heiko
>
> diff --git a/README b/README
> index f31bb3dffe..0bee478ec7 100644
> --- a/README
> +++ b/README
> @@ -2214,7 +2214,9 @@ The following options need to be configured:
>
> If you do not have i2c muxes on your board, omit this define.
>
> -- Legacy I2C Support: CONFIG_HARD_I2C
> +----under removal:
> +
> +- Legacy I2C Support: CONFIG_SOFT_I2C
>
> NOTE: It is intended to move drivers to CONFIG_SYS_I2C which
> provides the following compelling advantages:
> @@ -2223,14 +2225,12 @@ The following options need to be configured:
> - approved multibus support
> - better i2c mux support
>
> - ** CONFIG_HARD_I2C is now being removed **
> -
> -----under removal:
> + ** CONFIG_SOFT_I2C is now being removed **
>
> - In both cases you will need to define CONFIG_SYS_I2C_SPEED
> - to be the frequency (in Hz) at which you wish your i2c bus
> - to run and CONFIG_SYS_I2C_SLAVE to be the address of this node (ie
> - the CPU's i2c node address).
> + With CONFIG_SOFT_I2C you will need to define
> + CONFIG_SYS_I2C_SPEED to be the frequency (in Hz) at which you
> + wish your i2c bus to run and CONFIG_SYS_I2C_SLAVE to be the
> + address of this node (ie the CPU's i2c node address).
>
> Now, the u-boot i2c code for the mpc8xx
> (arch/powerpc/cpu/mpc8xx/i2c.c) sets the CPU up as a master node
> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
> index 3e842d3187..0d2e84011d 100644
> --- a/board/ti/am335x/board.c
> +++ b/board/ti/am335x/board.c
> @@ -67,11 +67,7 @@ static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
> #ifdef CONFIG_TI_I2C_BOARD_DETECT
> void do_board_detect(void)
> {
> - enable_i2c0_pin_mux();
> - i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
> -
> - if (ti_i2c_eeprom_am_get(-1, CONFIG_SYS_I2C_EEPROM_ADDR))
> - printf("ti_i2c_eeprom_init failed\n");
> + printf("ti_i2c_eeprom_init failed\n");
> }
> #endif
>
> diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
> index 390cc168cd..a190893450 100644
> --- a/board/ti/am43xx/board.c
> +++ b/board/ti/am43xx/board.c
> @@ -42,8 +42,7 @@ static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
> #ifdef CONFIG_TI_I2C_BOARD_DETECT
> void do_board_detect(void)
> {
> - if (ti_i2c_eeprom_am_get(-1, CONFIG_SYS_I2C_EEPROM_ADDR))
> - printf("ti_i2c_eeprom_init failed\n");
> + printf("ti_i2c_eeprom_init failed\n");
> }
> #endif
>
> diff --git a/cmd/eeprom.c b/cmd/eeprom.c
> index 0a0e4a2c1c..c9fde0d682 100644
> --- a/cmd/eeprom.c
> +++ b/cmd/eeprom.c
> @@ -73,13 +73,11 @@ void eeprom_init(int bus)
> #endif
>
> /* I2C EEPROM */
> -#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
> #if defined(CONFIG_SYS_I2C)
> if (bus >= 0)
> i2c_set_bus_num(bus);
> #endif
> i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
> -#endif
> }
>
> static int eeprom_addr(unsigned dev_addr, unsigned offset, uchar *addr)
> diff --git a/common/board_f.c b/common/board_f.c
> index d9431ee79a..eed3e7be2a 100644
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -184,7 +184,7 @@ __weak int dram_init_banksize(void)
> return 0;
> }
>
> -#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
> +#if defined(CONFIG_SYS_I2C)
> static int init_func_i2c(void)
> {
> puts("I2C: ");
> @@ -765,7 +765,7 @@ static const init_fnc_t init_sequence_f[] = {
> misc_init_f,
> #endif
> INIT_FUNC_WATCHDOG_RESET
> -#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
> +#if defined(CONFIG_SYS_I2C)
> init_func_i2c,
> #endif
> #if defined(CONFIG_HARD_SPI)
> diff --git a/common/stdio.c b/common/stdio.c
> index 4d30017530..ee4f0bda9e 100644
> --- a/common/stdio.c
> +++ b/common/stdio.c
> @@ -21,7 +21,7 @@
> #include <logbuff.h>
> #endif
>
> -#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
> +#if defined(CONFIG_SYS_I2C)
> #include <i2c.h>
> #endif
>
> @@ -346,9 +346,6 @@ int stdio_add_devices(void)
> #ifdef CONFIG_SYS_I2C
> i2c_init_all();
> #else
> -#if defined(CONFIG_HARD_I2C)
> - i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
> -#endif
> #endif
> #ifdef CONFIG_DM_VIDEO
> /*
> diff --git a/include/configs/PATI.h b/include/configs/PATI.h
> index 2c048abba6..045aa0a720 100644
> --- a/include/configs/PATI.h
> +++ b/include/configs/PATI.h
> @@ -39,7 +39,6 @@
> #define CONFIG_CMD_REGINFO
> #define CONFIG_CMD_REGINFO
> #define CONFIG_CMD_BSP
> -#define CONFIG_CMD_EEPROM
> #define CONFIG_CMD_IRQ
>
> #define CONFIG_BOOTCOMMAND "" /* autoboot command */
> @@ -136,16 +135,16 @@
> #define CONFIG_SYS_MAX_FLASH_BANKS 1
> #define CONFIG_SYS_MAX_FLASH_SECT 128
>
> -#define CONFIG_ENV_IS_IN_EEPROM
> #ifdef CONFIG_ENV_IS_IN_EEPROM
> #define CONFIG_ENV_OFFSET 0
> #define CONFIG_ENV_SIZE 2048
> #endif
>
> -#undef CONFIG_ENV_IS_IN_FLASH
> +#define CONFIG_ENV_IS_IN_FLASH
> #ifdef CONFIG_ENV_IS_IN_FLASH
> #define CONFIG_ENV_SIZE 0x00002000 /* Set whole sector as env */
> -#define CONFIG_ENV_OFFSET ((0 - CONFIG_SYS_FLASH_BASE) - CONFIG_ENV_SIZE) /* Environment starts at this adress */
> +/* Environment starts at this adress */
> +#define CONFIG_ENV_OFFSET ((0 - CONFIG_SYS_FLASH_BASE) - 2048)
> #endif
>
> #define CONFIG_SPI 1
> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
> index fc8a08f5b7..5c1a6d64da 100644
> --- a/include/configs/am335x_evm.h
> +++ b/include/configs/am335x_evm.h
> @@ -176,11 +176,6 @@
> #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
> #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
>
> -#define CONFIG_CMD_EEPROM
> -#define CONFIG_ENV_EEPROM_IS_ON_I2C
> -#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
> -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
> -
> /* PMIC support */
> #define CONFIG_POWER_TPS65217
> #define CONFIG_POWER_TPS65910
> diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
> index 1feb946834..ba185ebf5a 100644
> --- a/include/configs/am43xx_evm.h
> +++ b/include/configs/am43xx_evm.h
> @@ -22,12 +22,6 @@
> #define CONFIG_SYS_NS16550_SERIAL
> #endif
>
> -/* I2C Configuration */
> -#define CONFIG_CMD_EEPROM
> -#define CONFIG_ENV_EEPROM_IS_ON_I2C
> -#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
> -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
> -
> /* Power */
> #define CONFIG_POWER
> #define CONFIG_POWER_I2C
> diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
> index 5e515d215c..d18497c448 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -1196,7 +1196,6 @@ CONFIG_G_DNL_UMS_VENDOR_NUM
> CONFIG_H264_FREQ
> CONFIG_H8300
> CONFIG_HALEAKALA
> -CONFIG_HARD_I2C
> CONFIG_HARD_SPI
> CONFIG_HASH_VERIFY
> CONFIG_HAS_DATAFLASH
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2017-04-28 4:54 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-23 15:35 [U-Boot] [PATCH 00/11] i2c: Remove old I2C support Simon Glass
2017-04-23 15:35 ` [U-Boot] [PATCH 01/11] i2c: Drop use of CONFIG_I2C_HARD Simon Glass
2017-04-28 4:35 ` Heiko Schocher
2017-04-23 15:35 ` [U-Boot] [PATCH 02/11] i2c: powerpc: Remove use of CONFIG_HARD_I2C Simon Glass
2017-04-28 4:43 ` Heiko Schocher
2017-04-23 15:35 ` [U-Boot] [PATCH 03/11] i2c: cm5200: Drop use of CONFIG_I2C_HARD Simon Glass
2017-04-28 4:44 ` Heiko Schocher
2017-04-23 15:35 ` [U-Boot] [PATCH 04/11] i2c: pdm360ng: " Simon Glass
2017-04-28 4:45 ` Heiko Schocher
2017-04-23 15:35 ` [U-Boot] [PATCH 05/11] i2c: keymile: " Simon Glass
2017-04-24 7:22 ` Holger Brunck
2017-04-28 4:46 ` Heiko Schocher
2017-04-23 15:35 ` [U-Boot] [PATCH 06/11] i2c: mxc_i2c: " Simon Glass
2017-04-28 4:48 ` Heiko Schocher
2017-04-23 15:35 ` [U-Boot] [PATCH 07/11] i2c: " Simon Glass
2017-04-25 3:03 ` Lokesh Vutla
2017-04-25 7:56 ` Heiko Schocher
2017-04-25 8:15 ` Lokesh Vutla
2017-04-28 4:54 ` Heiko Schocher [this message]
2017-04-28 4:56 ` Lokesh Vutla
2017-04-28 11:33 ` Tom Rini
2017-04-23 15:35 ` [U-Boot] [PATCH 08/11] i2c: README: Drop CONFIG_SYS_I2C_INIT_MPC5XXX Simon Glass
2017-04-28 4:55 ` Heiko Schocher
2017-04-23 15:35 ` [U-Boot] [PATCH 09/11] i2c: Drop CONFIG_SYS_I2C_BOARD_LATE_INIT Simon Glass
2017-04-28 4:57 ` Heiko Schocher
2017-04-23 15:35 ` [U-Boot] [PATCH 10/11] Drop CONFIG_I2CFAST Simon Glass
2017-04-28 4:58 ` Heiko Schocher
2017-04-23 15:35 ` [U-Boot] [PATCH 11/11] Drop use of CONFIG_I2C_SOFT Simon Glass
2017-04-28 4:59 ` Heiko Schocher
2017-04-24 6:44 ` [U-Boot] [PATCH 00/11] i2c: Remove old I2C support Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5902CAFF.80904@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.