From: Dirk Eibach Date: Wed, 24 Apr 2013 15:00:41 +0200 Subject: [U-Boot] =?utf-8?q?=5BRFC=5D_i2c=2C_ppc4xx=5Fi2c=3A_switch_to_new?= =?utf-8?q?_multibus/multiadapter_support?= In-Reply-To: <5177D489.2020009@denx.de> References: <51762740.1060407@denx.de> <1366803825-17093-1-git-send-email-dirk.eibach@gdsys.cc> <5177D489.2020009@denx.de> Message-ID: <05a79429d9e0469cf607bf7fca7ad9e5@gdsys.cc> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Heiko, > On 24.04.2013 13:43, Dirk Eibach wrote: >> Signed-off-by: Dirk Eibach >> Cc: Heiko Schocher >> Cc: Stefan Roese >> --- >> drivers/i2c/Makefile | 2 +- >> drivers/i2c/ppc4xx_i2c.c | 193 >> +++++++++++++++++++++++----------------------- >> 2 files changed, 97 insertions(+), 98 deletions(-) > > Did you tried this patch with the mutlibus/multiadapter > framework? sure. This RFC is based on 20130416_multibus_v2. > When switching one i2c driver to this new Framework, you > must adapt all config files, which use this driver ... > Sorry, some stupid work, but it must be done, without > this I will bet, MAKEALL fails ... Certainly. But before starting this, I wanted to make sure, that the basic implementation is allright. > [...] >> diff --git a/drivers/i2c/ppc4xx_i2c.c b/drivers/i2c/ppc4xx_i2c.c >> index 53fedd5..c924874 100644 >> --- a/drivers/i2c/ppc4xx_i2c.c >> +++ b/drivers/i2c/ppc4xx_i2c.c > [...] >> +#ifdef CONFIG_SYS_I2C_PPC4XX_CH0 > > You introduce here new defines, please document them in > the README, thanks! OK. >> +U_BOOT_I2C_ADAP_COMPLETE(ppc4xx_0, ppc4xx_i2c_init, >> ppc4xx_i2c_probe, >> + ppc4xx_i2c_read, ppc4xx_i2c_write, >> + ppc4xx_i2c_set_bus_speed, >> + CONFIG_SYS_I2C_PPC4XX_SPEED_0, >> + CONFIG_SYS_I2C_PPC4XX_SLAVE_0, 0) >> +#endif >> +#ifdef CONFIG_SYS_I2C_PPC4XX_CH1 >> +U_BOOT_I2C_ADAP_COMPLETE(ppc4xx_1, ppc4xx_i2c_init, >> ppc4xx_i2c_probe, >> + ppc4xx_i2c_read, ppc4xx_i2c_write, >> + ppc4xx_i2c_set_bus_speed, >> + CONFIG_SYS_I2C_PPC4XX_SPEED_1, >> + CONFIG_SYS_I2C_PPC4XX_SLAVE_1, 1) >> +#endif > > beside of this, your patch looks good ... Fine, so I will start adapting all dependent boards. Should the patch be based on 20130416_multibus_v2 or should I post a series based on v2013.04 that includes the 20130416_multibus_v2 changes? Cheers Dirk