From mboxrd@z Thu Jan 1 00:00:00 1970
From: Przemyslaw Marczak
Date: Fri, 09 Jan 2015 09:49:50 +0100
Subject: [U-Boot] [PATCH 18/18] trats2: config: disable i2c peripherals
if testing dm i2c
In-Reply-To: <54AE9005.1070302@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-18-git-send-email-p.marczak@samsung.com>
<54AE9005.1070302@samsung.com>
Message-ID: <54AF962E.8030408@samsung.com>
List-Id:
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
To: u-boot@lists.denx.de
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
>> Cc: Lukasz Majewski
>> Cc: Jaehoon Chung
>> Cc: Simon Glass
>> Cc: Minkyu Kang
>> ---
>> 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
>> -
>> +#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
>> +
>> #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
>> #include
>>
>> #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