[U-Boot] [PATCH 18/18] trats2: config: disable i2c peripherals if testing dm i2c
Przemyslaw Marczak
p.marczak at samsung.com
Fri Jan 9 09:49:50 CET 2015
Hello Minkyu,
On 01/08/2015 03:11 PM, Minkyu Kang wrote:
> On 08/01/15 20:33, Przemyslaw Marczak wrote:
>> Most i2c peripherals for this board doesn't
>> support new i2c api. So CONFIG_DM_I2C on this
>> board can be enabled for test only. The i2c command
>> works fine with it.
>> This is the first step before adding
>> support to the new power framework soon.
>>
>> Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>
>> Cc: Lukasz Majewski <l.majewski at samsung.com>
>> Cc: Jaehoon Chung <jh80.chung at samsung.com>
>> Cc: Simon Glass <sjg at chromium.org>
>> Cc: Minkyu Kang <mk7.kang at samsung.com>
>> ---
>> include/configs/trats2.h | 17 +++++++++++++----
>> 1 file changed, 13 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/configs/trats2.h b/include/configs/trats2.h
>> index 42481ab..8b099dd 100644
>> --- a/include/configs/trats2.h
>> +++ b/include/configs/trats2.h
>> @@ -159,15 +159,18 @@
>> #define CONFIG_RANDOM_UUID
>>
>> /* I2C */
>> -#include <asm/arch/gpio.h>
>> -
>> +#if 0 /* For test */
>> +#define CONFIG_DM_I2C
>> +#endif
>
> please remove test code.
>
>> #define CONFIG_CMD_I2C
>> -
>> -#define CONFIG_SYS_I2C
>> #define CONFIG_SYS_I2C_S3C24X0
>> #define CONFIG_SYS_I2C_S3C24X0_SPEED 100000
>> #define CONFIG_SYS_I2C_S3C24X0_SLAVE 0
>> +
>> +#ifndef CONFIG_DM_I2C
>> +#define CONFIG_SYS_I2C
>> #define CONFIG_MAX_I2C_NUM 8
>> +
>> #define CONFIG_SYS_I2C_SOFT
>> #define CONFIG_SYS_I2C_SOFT_SPEED 50000
>> #define CONFIG_SYS_I2C_SOFT_SLAVE 0x00
>> @@ -177,6 +180,8 @@
>> #define CONFIG_SOFT_I2C_READ_REPEATED_START
>> #define CONFIG_SYS_I2C_INIT_BOARD
>>
>> +#include <asm/arch/gpio.h>
>> +
>> #ifndef __ASSEMBLY__
>> int get_soft_i2c_scl_pin(void);
>> int get_soft_i2c_sda_pin(void);
>> @@ -192,6 +197,7 @@ int get_soft_i2c_sda_pin(void);
>> #define CONFIG_POWER_MUIC_MAX77693
>> #define CONFIG_POWER_FG_MAX77693
>> #define CONFIG_POWER_BATTERY_TRATS2
>> +#endif /* ifndef CONFIG_DM_I2C */
>>
>> /* Security subsystem - enable hw_rand() */
>> #define CONFIG_EXYNOS_ACE_SHA
>> @@ -203,11 +209,13 @@ int get_soft_i2c_sda_pin(void);
>> #define CONFIG_MISC_INIT_R
>>
>> /* Download menu - Samsung common */
>> +#ifndef CONFIG_DM_I2C
>> #define CONFIG_LCD_MENU
>> #define CONFIG_LCD_MENU_BOARD
>>
>> /* Download menu - definitions for check keys */
>> #ifndef __ASSEMBLY__
>> +#include <power/pmic.h>
>> #include <power/max77686_pmic.h>
>>
>> #define KEY_PWR_PMIC_NAME "MAX77686_PMIC"
>> @@ -219,6 +227,7 @@ int get_soft_i2c_sda_pin(void);
>> #define KEY_VOL_UP_GPIO EXYNOS4X12_GPIO_X22
>> #define KEY_VOL_DOWN_GPIO EXYNOS4X12_GPIO_X33
>> #endif /* __ASSEMBLY__ */
>> +#endif
>>
>> /* LCD console */
>> #define LCD_BPP LCD_COLOR16
>>
>
> Thanks,
> Minkyu Kang
>
Ok, I will remove it in the both cases.
Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
More information about the U-Boot
mailing list