Message ID | 1381994312-10728-2-git-send-email-nobuhiro.iwamatsu.yj@renesas.com |
---|---|
State | Changes Requested |
Delegated to: | Heiko Schocher |
Headers | show |
Hello Nobuhiro, Am 17.10.2013 09:18, schrieb Nobuhiro Iwamatsu: > Kzm9g uses sh_i2c driver. sh_i2c driver updated to new I2C framwork. > This updates kzm9g to this change. > > Signed-off-by: Nobuhiro Iwamatsu<nobuhiro.iwamatsu.yj@renesas.com> > > --- > board/kmc/kzm9g/kzm9g.c | 2 +- > include/configs/kzm9g.h | 31 ++++++++++++++++--------------- > 2 files changed, 17 insertions(+), 16 deletions(-) Could you sqash this patch into http://patchwork.ozlabs.org/patch/284106 so we get no problems with "git bisect". Beside of that only one comment: > diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c > index b669ffe..0ec5e8e 100644 > --- a/board/kmc/kzm9g/kzm9g.c > +++ b/board/kmc/kzm9g/kzm9g.c > @@ -289,7 +289,7 @@ void adjust_core_voltage(void) > { > u8 data; > > - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); > + i2c_init(CONFIG_SYS_I2C_SH_SPEED0, CONFIG_SYS_I2C_SLAVE); You no longer need to call i2c_init, as this does i2c_set_bus_num() for you. Please remove this and test, thanks! bye, Heiko
Hi, Thanks for your review. 2013/10/17 Heiko Schocher <hs@denx.de>: > Hello Nobuhiro, > > Am 17.10.2013 09:18, schrieb Nobuhiro Iwamatsu: > >> Kzm9g uses sh_i2c driver. sh_i2c driver updated to new I2C framwork. >> This updates kzm9g to this change. >> >> Signed-off-by: Nobuhiro Iwamatsu<nobuhiro.iwamatsu.yj@renesas.com> >> >> --- >> board/kmc/kzm9g/kzm9g.c | 2 +- >> include/configs/kzm9g.h | 31 ++++++++++++++++--------------- >> 2 files changed, 17 insertions(+), 16 deletions(-) > > > Could you sqash this patch into http://patchwork.ozlabs.org/patch/284106 > so we get no problems with "git bisect". OK, I will squash this patch and re-send. > > Beside of that only one comment: > > >> diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c >> index b669ffe..0ec5e8e 100644 >> --- a/board/kmc/kzm9g/kzm9g.c >> +++ b/board/kmc/kzm9g/kzm9g.c >> @@ -289,7 +289,7 @@ void adjust_core_voltage(void) >> { >> u8 data; >> >> - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); >> + i2c_init(CONFIG_SYS_I2C_SH_SPEED0, CONFIG_SYS_I2C_SLAVE); > > > You no longer need to call i2c_init, as this does i2c_set_bus_num() > for you. Please remove this and test, thanks! I see. I will update this patch. > > bye, > Heiko Best regards, Nobuhiro
diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c index b669ffe..0ec5e8e 100644 --- a/board/kmc/kzm9g/kzm9g.c +++ b/board/kmc/kzm9g/kzm9g.c @@ -289,7 +289,7 @@ void adjust_core_voltage(void) { u8 data; - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); + i2c_init(CONFIG_SYS_I2C_SH_SPEED0, CONFIG_SYS_I2C_SLAVE); data = 0x35; i2c_set_bus_num(0); i2c_write(0x40, 3, 1, &data, 1); diff --git a/include/configs/kzm9g.h b/include/configs/kzm9g.h index 6323050..9a3d2f8 100644 --- a/include/configs/kzm9g.h +++ b/include/configs/kzm9g.h @@ -141,21 +141,22 @@ /* I2C */ #define CONFIG_CMD_I2C -#define CONFIG_SH_I2C 1 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SH +#define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 5 +#define CONFIG_SYS_I2C_SH_BASE0 0xE6820000 +#define CONFIG_SYS_I2C_SH_SPEED0 100000 +#define CONFIG_SYS_I2C_SH_BASE1 0xE6822000 +#define CONFIG_SYS_I2C_SH_SPEED1 100000 +#define CONFIG_SYS_I2C_SH_BASE2 0xE6824000 +#define CONFIG_SYS_I2C_SH_SPEED2 100000 +#define CONFIG_SYS_I2C_SH_BASE3 0xE6826000 +#define CONFIG_SYS_I2C_SH_SPEED3 100000 +#define CONFIG_SYS_I2C_SH_BASE4 0xE6828000 +#define CONFIG_SYS_I2C_SH_SPEED4 100000 #define CONFIG_SH_I2C_8BIT -#define CONFIG_HARD_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_MAX_I2C_BUS (5) -#define CONFIG_SYS_I2C_MODULE -#define CONFIG_SYS_I2C_SPEED (100000) /* 100 kHz */ -#define CONFIG_SYS_I2C_SLAVE (0x7F) -#define CONFIG_SH_I2C_DATA_HIGH (4) -#define CONFIG_SH_I2C_DATA_LOW (5) -#define CONFIG_SH_I2C_CLOCK (104000000) /* 104 MHz */ -#define CONFIG_SH_I2C_BASE0 (0xE6820000) -#define CONFIG_SH_I2C_BASE1 (0xE6822000) -#define CONFIG_SH_I2C_BASE2 (0xE6824000) -#define CONFIG_SH_I2C_BASE3 (0xE6826000) -#define CONFIG_SH_I2C_BASE4 (0xE6828000) +#define CONFIG_SH_I2C_DATA_HIGH 4 +#define CONFIG_SH_I2C_DATA_LOW 5 +#define CONFIG_SH_I2C_CLOCK 104000000 /* 104 MHz */ #endif /* __KZM9G_H */
Kzm9g uses sh_i2c driver. sh_i2c driver updated to new I2C framwork. This updates kzm9g to this change. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> --- board/kmc/kzm9g/kzm9g.c | 2 +- include/configs/kzm9g.h | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-)