public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH 01/13] kp_imx53: Switch to using a local namespace for ID EEPROM
Date: Wed, 18 Aug 2021 10:03:38 +0200	[thread overview]
Message-ID: <20210818100338.13c68ac4@ktm> (raw)
In-Reply-To: <20210817220009.22721-2-trini@konsulko.com>

[-- Attachment #1: Type: text/plain, Size: 2154 bytes --]

Hi Tom,

> This platform does not use any of the standard EEPROM functionality
> and instead provides its own.  Use a local namespace for the I2C
> related defines to access the EEPROM.
> 
> Cc: Lukasz Majewski <lukma@denx.de>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>  board/k+p/kp_imx53/kp_id_rev.c | 9 ++++++---
>  include/configs/kp_imx53.h     | 3 ---
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/board/k+p/kp_imx53/kp_id_rev.c
> b/board/k+p/kp_imx53/kp_id_rev.c index 7103a3e0f2b5..9f93cf008ce8
> 100644 --- a/board/k+p/kp_imx53/kp_id_rev.c
> +++ b/board/k+p/kp_imx53/kp_id_rev.c
> @@ -64,6 +64,10 @@ void show_eeprom(void)
>  	eth_env_set_enetaddr("ethaddr", p);
>  }
>  
> +#define I2C_EEPROM_BUS_NUM	1
> +#define I2C_EEPROM_ADDR		0x50
> +#define I2C_EEPROM_ADDR_LEN	2
> +
>  int read_eeprom(void)
>  {
>  	struct udevice *dev;
> @@ -72,9 +76,8 @@ int read_eeprom(void)
>  	if (eeprom_has_been_read)
>  		return 0;
>  
> -	ret = i2c_get_chip_for_busnum(CONFIG_SYS_EEPROM_BUS_NUM,
> -				      CONFIG_SYS_I2C_EEPROM_ADDR,
> -
> CONFIG_SYS_I2C_EEPROM_ADDR_LEN, &dev);
> +	ret = i2c_get_chip_for_busnum(I2C_EEPROM_BUS_NUM,
> I2C_EEPROM_ADDR,
> +				      I2C_EEPROM_ADDR_LEN, &dev);
>  	if (ret) {
>  		printf("Cannot find EEPROM !\n");
>  		return ret;
> diff --git a/include/configs/kp_imx53.h b/include/configs/kp_imx53.h
> index c94882846efa..87f4841af05c 100644
> --- a/include/configs/kp_imx53.h
> +++ b/include/configs/kp_imx53.h
> @@ -20,9 +20,6 @@
>  #define CONFIG_MXC_USB_FLAGS	0
>  
>  #define CONFIG_SYS_I2C_MXC
> -#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
> -#define CONFIG_SYS_EEPROM_BUS_NUM 1
> -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
>  
>  /* Command definition */
>  #define CONFIG_LOADADDR		0x72000000	/* loadaddr
> env var */

Acked-by: Lukasz Majewski <lukma@denx.de>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-08-18  8:03 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 21:59 [PATCH 00/13] Migrate some I2C symbols to Kconfig Tom Rini
2021-08-17 21:59 ` [PATCH 01/13] kp_imx53: Switch to using a local namespace for ID EEPROM Tom Rini
2021-08-18  8:03   ` Lukasz Majewski [this message]
2021-08-30 20:58   ` Tom Rini
2021-08-17 21:59 ` [PATCH 02/13] davinci: Drop CONFIG_MAC_ADDR_IN_EEPROM Tom Rini
2021-08-17 21:59 ` [PATCH 03/13] arm: shc: Change CONFIG_SYS_I2C_EEPROM_ADDR to EEPROM_ADDR Tom Rini
2021-08-18  3:46   ` Heiko Schocher
2021-08-17 21:59 ` [PATCH 04/13] keymile: Use CONFIG_SYS_IVM_EEPROM_ADR Tom Rini
2021-08-19  8:05   ` Aleksandar Gerasimovski
2021-08-17 21:59 ` [PATCH 05/13] siemens: Move CONFIG_SYS_I2C_EEPROM_ADDR usage out of CONFIG namespace Tom Rini
2021-08-18  3:47   ` Heiko Schocher
2021-08-18  9:02   ` Anatolij Gustschin
2021-08-18 13:38     ` Tom Rini
2021-08-17 21:59 ` [PATCH 06/13] Convert CONFIG_ID_EEPROM to Kconfig Tom Rini
2021-08-17 21:59 ` [PATCH 07/13] i2c: S3C24X0: Finish Kconfig migration Tom Rini
2021-08-25  5:38   ` Minkyu Kang
2021-08-28  5:14   ` Jaehoon Chung
2021-08-17 21:59 ` [PATCH 08/13] cl-som-imx7: Enable CMD_EEPROM Tom Rini
2021-08-17 21:59 ` [PATCH 09/13] eeprom: Drop CONFIG_ENV_EEPROM_IS_ON_I2C usage Tom Rini
2021-08-17 21:59 ` [PATCH 10/13] Convert CONFIG_SYS_I2C_EEPROM_ADDR et al to Kconfig Tom Rini
2021-08-17 21:59 ` [PATCH 11/13] Convert CONFIG_SYS_I2C_SOFT " Tom Rini
2021-08-18  4:35   ` Samuel Holland
2021-08-18 13:37     ` Tom Rini
2021-08-17 21:59 ` [PATCH 12/13] Convert CONFIG_SYS_I2C_MVTWSI " Tom Rini
2021-08-17 21:59 ` [PATCH 13/13] i2c: Remove unused additional legacy soft i2c bus support Tom Rini
2021-08-19  3:12 ` [PATCH 00/16] Further I2C Kconfig migrations Tom Rini
2021-08-19  3:12   ` [PATCH 01/16] Convert CONFIG_SYS_I2C_LEGACY to Kconfig and add CONFIG_[ST]PL_SYS_I2C_LEGACY Tom Rini
2021-08-30 20:59     ` Tom Rini
2021-08-19  3:12   ` [PATCH 02/16] Convert CONFIG_SYS_I2C_EARLY_INIT to Kconfig Tom Rini
2021-08-19  3:12   ` [PATCH 03/16] i2c: designware: Remove unused non-DM functionality Tom Rini
2021-08-19  3:12   ` [PATCH 04/16] am335x: Drop non-DM_I2C code Tom Rini
2021-08-19  3:12   ` [PATCH 05/16] am43xx: " Tom Rini
2021-08-19 11:24     ` Lokesh Vutla
2021-08-19  3:12   ` [PATCH 06/16] ti: i2c: Convert CONFIG_SYS_OMAP24_I2C to CONFIG_SYS_I2C namespace Tom Rini
2021-08-19  3:12   ` [PATCH 07/16] i2c: Remove non-DM code from ihs_i2c.c Tom Rini
2021-08-19  3:12   ` [PATCH 08/16] cmd/i2c.c: Remove unused legacy code Tom Rini
2021-08-19  3:12   ` [PATCH 09/16] Convert CONFIG_SYS_I2C_SPEED et al to Kconfig Tom Rini
2021-08-19  3:12   ` [PATCH 10/16] Convert CONFIG_SYS_I2C_MXC " Tom Rini
2021-08-19  3:12   ` [PATCH 11/16] rcar: i2c: Migrate SYS_I2C_SH " Tom Rini
2021-08-19  3:12   ` [PATCH 12/16] i2c: fsl_i2c: Migrate " Tom Rini
2021-08-19  3:12   ` [PATCH 13/16] tegra: Cleanup I2C support Tom Rini
2021-08-19  3:12   ` [PATCH 14/16] Convert CONFIG_I2C_SET_DEFAULT_BUS_NUM et al to Kconfig Tom Rini
2021-08-19  3:12   ` [PATCH 15/16] README: Remove some old i2c related text Tom Rini
2021-08-25  5:38     ` Minkyu Kang
2021-08-19  3:12   ` [PATCH 16/16] varisys: Remove dead code Tom Rini

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=20210818100338.13c68ac4@ktm \
    --to=lukma@denx.de \
    --cc=trini@konsulko.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox