From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Fri, 09 Jan 2015 07:37:56 +0100 Subject: [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support In-Reply-To: <1420716809-16276-8-git-send-email-p.marczak@samsung.com> References: <1420716524-15969-1-git-send-email-p.marczak@samsung.com> <1420716809-16276-1-git-send-email-p.marczak@samsung.com> <1420716809-16276-8-git-send-email-p.marczak@samsung.com> Message-ID: <54AF7744.5010000@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Przemyslaw Marczak, Am 08.01.2015 12:33, schrieb Przemyslaw Marczak: > This commit allows for test i2c drivers with new i2c api > on Exynos5xxx based boards. > > The S3C24X0 I2C driver supports driver model I2C api, > but i2c peripherials drivers on exynos5 boards doesn't. > So this commit allows for test ported driver before switch > the Exynos5 boards to DM I2C at all. Hmm... so this is just a patch for test purposes not for mainline? > Signed-off-by: Przemyslaw Marczak > Cc: Akshay Saraswat > Cc: Simon Glass > Cc: Minkyu Kang > --- > include/configs/exynos5-common.h | 29 ++++++++++++++++++----------- > 1 file changed, 18 insertions(+), 11 deletions(-) > > diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h > index ad63f3c..b7af8a5 100644 > --- a/include/configs/exynos5-common.h > +++ b/include/configs/exynos5-common.h > @@ -54,13 +54,6 @@ > #define CONFIG_CMD_DTT > #define CONFIG_TMU_CMD_DTT > > -/* TPM */ > -#define CONFIG_TPM > -#define CONFIG_CMD_TPM > -#define CONFIG_TPM_TIS_I2C > -#define CONFIG_TPM_TIS_I2C_BUS_NUMBER 3 > -#define CONFIG_TPM_TIS_I2C_SLAVE_ADDR 0x20 > - > /* MMC SPL */ > #define COPY_BL2_FNPTR_ADDR 0x02020030 > #define CONFIG_SUPPORT_EMMC_BOOT > @@ -126,15 +119,29 @@ > #define SPI_FLASH_UBOOT_POS (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE) > > /* I2C */ > -#define CONFIG_SYS_I2C_INIT_BOARD > -#define CONFIG_SYS_I2C > +#if 0 /* For test */ > +#define CONFIG_DM_I2C > +#endif Hmm.. no, please no dead code in mainline ... maybe you enable "CONFIG_DM_I2C" if "CONFIG_DM" is set? bye, Heiko > #define CONFIG_CMD_I2C > -#define CONFIG_SYS_I2C_S3C24X0_SPEED 100000 /* 100 Kbps */ > #define CONFIG_SYS_I2C_S3C24X0 > -#define CONFIG_I2C_MULTI_BUS > +#define CONFIG_SYS_I2C_S3C24X0_SPEED 100000 /* 100 Kbps */ > #define CONFIG_SYS_I2C_S3C24X0_SLAVE 0x0 > +#ifndef CONFIG_DM_I2C > +#define CONFIG_SYS_I2C_INIT_BOARD > +#define CONFIG_SYS_I2C > +#define CONFIG_I2C_MULTI_BUS > +#endif /* ifndef CONFIG_DM_I2C */ > #define CONFIG_I2C_EDID > > +/* TPM */ > +#ifndef CONFIG_DM_I2C > +#define CONFIG_TPM > +#define CONFIG_CMD_TPM > +#define CONFIG_TPM_TIS_I2C > +#define CONFIG_TPM_TIS_I2C_BUS_NUMBER 3 > +#define CONFIG_TPM_TIS_I2C_SLAVE_ADDR 0x20 > +#endif > + > /* SPI */ > #ifdef CONFIG_SPI_FLASH > #define CONFIG_EXYNOS_SPI > -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany