[U-Boot] i2c: rework multibus/multiadapter functionality

Hello,
I want now, because the merge window is open again, restart the the multibus/multiadapter discussion.
To have a base for this discusion, I made in the i2c git tree (git://git.denx.de/u-boot-i2c.git) the following new 2 branches:
"multibus":
Patches from Sergey Kubushyn ksi@koi8.net posted in the last merge window. see, http://lists.denx.de/pipermail/u-boot/2009-February/047465.html
They were discussed, but not accepted ... also some CodingStyle comments, changes in patch hierarchic are not done ... I only synced them to actuall code to have a base for the discussion.
"multibus_v2": (I couldn;t post the patches because one of them is bigger than 100k :-( and I cannot split it in 2 patches, because this would break git bisection compatibility. But the patches can be found in git://git.denx.de/u-boot-i2c.git):
Based on the i2c_core from Sergeys patches, added the following suggestions from Wolfgang and me:
- v2 is bisection compatible - commits are in (hopefully) logical blocks
- "cur_adap" added in gd_t: This points allways to the actuall used i2c adapter:
- because gd_t is writeable when running in flash, complete multiadapter/multibus functionality is usable, when running in flash - using a pointer brings faster accesses to the i2c_adapter_t struct and saves some bytes here and there (see later).
- init from a i2c controller: In the "multibus" branch (also in actual code) all i2c controllers, as a precaution, getting initialized. In the "multibus_v2" branch, a i2c controller gets only initialized if it is used. This is done in i2c_set_bus_num().
Actually, I let the i2c_init_all() in code, but just call in this function i2c_set_bus_num(CONFIG_SYS_SPD_BUS_NUM). This can be dropped in a second step completely.
Also, with this approach, we can easy add in a second step, a i2c_deinit() function in i2c_set_bus_num(), so we can deactivate a no longer used controller.
- added "hw_adapnr" in i2c_adapter_t struct: when for example a CPU has more then one i2c controller we can use this variable to differentiate which controller the actual i2c adapter uses. This results in lower codesize and lower sourcecode changes. Example:
fsl_i2c driver: (MPC8548CDS only with fsl driver) multibus:
[hs@pollux u-boot-i2c]$ ./MAKEALL MPC8548CDS Configuring for MPC8548CDS board... fsl_i2c.c: In function '__i2c_init': fsl_i2c.c:173: warning: assignment discards qualifiers from pointer target type text data bss dec hex filename 222168 17344 27256 266768 41210 ./u-boot
multibus_v2:
[hs@pollux u-boot-i2c]$ ./MAKEALL MPC8548CDS Configuring for MPC8548CDS board... text data bss dec hex filename 222080 17344 27256 266680 411b8 ./u-boot
also the bitbang driver gets better maintainable:
Sourcecode changes:
multibus:
drivers/i2c/soft_i2c.c | 704 ++++++++++++++++++++---------------
multibus_v2:
drivers/i2c/soft_i2c.c | 155 +++++---
Codesize bitbang driver: (MPC8548CDS with the following bus topology: * Busses: * * 0: Direct off of FSL_I2C[0] * 1: FSL_I2C[1]->PCA9542(0)->PCA9542(0) * 2: FSL_I2C[1]->PCA9542(0)->PCA9542(1) * 3: FSL_I2C[1]->PCA9542(1) * 4: Direct off of SOFT_I2C[0] * 5: Direct off of SOFT_I2C[1] )
multibus:
[hs@pollux u-boot-i2c]$ ./MAKEALL MPC8548CDS Configuring for MPC8548CDS board... fsl_i2c.c: In function '__i2c_init': fsl_i2c.c:173: warning: assignment discards qualifiers from pointer target type text data bss dec hex filename 227092 17864 27256 272212 42754 ./u-boot [hs@pollux u-boot-i2c]$
multibus_v2:
[hs@pollux u-boot-i2c]$ ./MAKEALL MPC8548CDS Configuring for MPC8548CDS board... text data bss dec hex filename 225048 17868 27256 270172 41f5c ./u-boot [hs@pollux u-boot-i2c]$
For this I call for all I2C_SDA, I2C_SCL, ... defines, which holds the board specific code, now functions (This is not a must, but I did this as an example see MPC8548CDS). In this functions I use "hw_adapnr" to switch to do the adapter specific gpio settings ...
If we look at the "multibus" approach, there, this is not needed but Sourcecode size and Codesize grows with each bitbang adapter ... and if I think for a board with n bitbang adapter (with n > 5) this results in nearly unmaintable source code ...
I just write this here because this has to be discussed (and this was a point, which drove the last discussion in chaos). We can now easy compare such a board ... see MPC8548CDS) and discuss on facts, which version we want to have in mainline.
- adding a base_addr to i2c_adap_t struct (Did this not yet, but would also a good thing to have, because when I ported for example the ppc_4xx i2c hardware adapter, I saw, that some CPUs have more than one controller, and they just differ in the base addr, so this variable would be a "good to have"). I solved this actually in adding a function in this driver, which returns the base addr depending on hw_adapnr, which is a suboptimal way ...
see for an example new ppc_4xx i2c driver:
in drivers/i2c/ppc4xx_i2c.c: ppc4xx_get_base ()
Codesize:
for a board with one soft_i2c driver:
[hs@pollux u-boot-i2c]$ git checkout master Switched to branch "master" Your branch is ahead of 'origin/master' by 143 commits. [hs@pollux u-boot-i2c]$ ./MAKEALL CPU86 Configuring for CPU86 board... ... booting from 64-bit flash text data bss dec hex filename 146572 22068 24144 192784 2f110 ./u-boot [hs@pollux u-boot-i2c]$ git checkout multibus Switched to branch "multibus" [hs@pollux u-boot-i2c]$ ./MAKEALL CPU86 Configuring for CPU86 board... ... booting from 64-bit flash text data bss dec hex filename 147816 22124 24144 194084 2f624 ./u-boot [hs@pollux u-boot-i2c]$ git checkout multibus_v2 Switched to branch "multibus_v2" [hs@pollux u-boot-i2c]$ ./MAKEALL CPU86 Configuring for CPU86 board... ... booting from 64-bit flash text data bss dec hex filename 147688 22128 24144 193960 2f5a8 ./u-boot [hs@pollux u-boot-i2c]$
for a board with the fsl driver:
[hs@pollux u-boot-i2c]$ git checkout master ./MA Switched to branch "master" Your branch is ahead of 'origin/master' by 143 commits. [hs@pollux u-boot-i2c]$ ./MAKEALL MPC8360EMDS Configuring for MPC8360EMDS board... text data bss dec hex filename 203504 11588 26900 241992 3b148 ./u-boot [hs@pollux u-boot-i2c]$ git checkout multibus Switched to branch "multibus" [hs@pollux u-boot-i2c]$ ./MAKEALL MPC8360EMDS Configuring for MPC8360EMDS board... fsl_i2c.c: In function '__i2c_init': fsl_i2c.c:173: warning: assignment discards qualifiers from pointer target type text data bss dec hex filename 204288 11628 26900 242816 3b480 ./u-boot [hs@pollux u-boot-i2c]$ git checkout multibus_v2 Switched to branch "multibus_v2" [hs@pollux u-boot-i2c]$ ./MAKEALL MPC8360EMDS Configuring for MPC8360EMDS board... text data bss dec hex filename 204256 11632 26900 242788 3b464 ./u-boot [hs@pollux u-boot-i2c]$
at last here comes a TODO list what should be done:
- add README for the multibus functionality
- list of drivers to port:
drivbers/i2c: bfin-twi_i2c.c mxc_i2c.c omap1510_i2c.c omap24xx_i2c.c tsi108_i2c.c
grep -lr HARD_I2C cpu/ cpu/arm920t/at91rm9200/i2c.c cpu/arm920t/s3c24x0/i2c.c cpu/mpc512x/i2c.c cpu/mpc5xxx/i2c.c cpu/mpc8220/i2c.c cpu/mpc824x/drivers/i2c/i2c.c cpu/mpc8xx/i2c.c cpu/pxa/i2c.c
Hope didn;t forget some more ...
- test, test, test ...
- i2c devices must ported to new multibus functionality. Ideas here are welcome ;-) (They must "know", on which bus they are ...)
- In actuall code it is possible to add new i2c busses with the "i2c bus" command (and from code with i2c_mux_ident_muxstring()) This actual is not included in the new code, but that could be done the following way (for the multibus_v2 version, for the approach in "multibus" branch I have no idea how to make this):
When running in flash, we just can use the i2c busses defined in CONFIG_SYS_I2C_ADAPTERS (should be okay in the first step. When relocating code, the i2c busses in CONFIG_SYS_I2C_ADAPTERS are converted in a dynamcial list, so we can then easy add new busses to this list.
Also we define a "i2c_bus" environment variable, which contains i2c busses, that gets added when relocating. This is needed for the keymile boards. There are a lot of board versions which differ only in the i2c bus topology. With this approach, we can use one u-boot binary for all board versions, just defining the i2c bus topology in the environment ...
BTW: This is also a point for using "cur_adap", because the rest of the multibus functionality doesn;t have to be changed ...
So, I hope I didn;t forget something ... lets start with the discussion ...
bye heiko

Dear Heiko Schocher,
In message 49C89574.9040302@denx.de you wrote:
I want now, because the merge window is open again, restart the the multibus/multiadapter discussion.
No negative feedback has been posted, as far as I can tell.
Will you post patches for this merge window?
Best regards,
Wolfgang Denk

On Sat, 18 Jul 2009, Wolfgang Denk wrote:
Dear Heiko Schocher,
In message 49C89574.9040302@denx.de you wrote:
I want now, because the merge window is open again, restart the the multibus/multiadapter discussion.
No negative feedback has been posted, as far as I can tell.
Will you post patches for this merge window?
Are we back at square one or we're gonna implement that weirdo with accessing global variables from object methods?
I have the entire I2C layer under my $(BOARD)/ now because it won't fit in the existing U-Boot tree.
And we have exactly the same problem with USB (I wouldn't even start bragging about EHCI.)
--- ****************************************************************** * KSI@home KOI8 Net < > The impossible we do immediately. * * Las Vegas NV, USA < > Miracles require 24-hour notice. * ******************************************************************

Dear ksi@koi8.net,
In message Pine.LNX.4.64ksi.0907171522240.11243@home-gw.koi8.net you wrote:
Will you post patches for this merge window?
Are we back at square one or we're gonna implement that weirdo with accessing global variables from object methods?
I suggest you re-read Heiko's posting from end of March [1], and have a look at the code he provided. Constructive comments are welcome, then.
[1] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/56416
Best regards,
Wolfgang Denk

On Sat, 18 Jul 2009, Wolfgang Denk wrote:
Dear ksi@koi8.net,
In message Pine.LNX.4.64ksi.0907171522240.11243@home-gw.koi8.net you wrote:
Will you post patches for this merge window?
Are we back at square one or we're gonna implement that weirdo with accessing global variables from object methods?
I suggest you re-read Heiko's posting from end of March [1], and have a look at the code he provided. Constructive comments are welcome, then.
[1] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/56416
Ah, OK, that's where I quit.
I think this entire undertaking is long dead. I seriously doubt somebody will join a discussion if one happened to start. And even if it resurrected it should probably be started from scratch because even I'm having difficulties recalling the details.
But anyway, let's see if somebody have something to say on the subject...
--- ****************************************************************** * KSI@home KOI8 Net < > The impossible we do immediately. * * Las Vegas NV, USA < > Miracles require 24-hour notice. * ******************************************************************

Hello ksi@koi8.net,
ksi@koi8.net wrote:
On Sat, 18 Jul 2009, Wolfgang Denk wrote:
Dear ksi@koi8.net,
In message Pine.LNX.4.64ksi.0907171522240.11243@home-gw.koi8.net you wrote:
Will you post patches for this merge window?
Are we back at square one or we're gonna implement that weirdo with accessing global variables from object methods?
I suggest you re-read Heiko's posting from end of March [1], and have a look at the code he provided. Constructive comments are welcome, then.
[1] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/56416
Ah, OK, that's where I quit.
I think this entire undertaking is long dead. I seriously doubt somebody will join a discussion if one happened to start. And even if it resurrected it should probably be started from scratch because even I'm having difficulties recalling the details.
Then have a look at [1]. There I tried to collect the differences between your and "the pointer" version. Also I made some Codesize, Source code size comparisons ...
But anyway, let's see if somebody have something to say on the subject...
Yep.
bye Heiko

Hello Wolfgang,
Wolfgang Denk wrote:
Dear ksi@koi8.net,
In message Pine.LNX.4.64ksi.0907171522240.11243@home-gw.koi8.net you wrote:
Will you post patches for this merge window?
Are we back at square one or we're gonna implement that weirdo with accessing global variables from object methods?
I suggest you re-read Heiko's posting from end of March [1], and have a look at the code he provided. Constructive comments are welcome, then.
Full Ack!
bye Heiko

Hello Wolfgang,
Wolfgang Denk wrote:
In message 49C89574.9040302@denx.de you wrote:
I want now, because the merge window is open again, restart the the multibus/multiadapter discussion.
No negative feedback has been posted, as far as I can tell.
Will you post patches for this merge window?
I am not completly ready (I ported hopefully all drivers, hold it in sync with mainline, but I need to test this again), so I think, it would be better to wait for the next release cycle, but if now a discussion is starting, if it is in principle ok, code can be found at:
http://git.denx.de/?p=u-boot/u-boot-i2c.git;a=shortlog;h=refs/heads/multibus...
I hope to have this ready for next merge window, so a big test phase can start!
Missing: - overall cleanup - completly delete CONFIG_HARD_I2C - adapt README - test, test, test - "dynamic i2c bus"
Also this should be discussed: - i2c devices must/should be ported to the new multibus functionality.
Here a short statistic for the actual state:
The following changes since commit bfadb17f69c256196620c32164775f063a59c34f: Anton Vorontsov (1): mpc83xx: MPC837xEMDS: Use hwconfig instead of pci_external_arbiter variable
are available in the git repository at:
git://git.denx.de/u-boot-i2c.git multibus_v2
Heiko Schocher (20): i2c: added i2c_core and prepared for new multibus support i2c, common: common changes for multibus/multiadapter support i2c, soft-i2c: switch to new multibus/multiadapter support i2c, fsl_i2c: switch to new multibus/multiadapter support i2c, mpc8260_i2c: added new multibus/multiadapter support i2c, ppc4xx_i2c: added new multibus/multiadapter support i2c, 8xx: added new multibus/multiadapter support i2c, mpc5xxx: added new multibus/multiadapter support i2c, mpc512x: added new multibus/multiadapter support i2c, mpc8220: added new multibus/multiadapter support i2c, bfin: added new multibus/multiadapter support i2c, davinci: added new multibus/multiadapter support i2c, mxc: added new multibus/multiadapter support i2c, omap1510: added new multibus/multiadapter support i2c, omap24xx: added new multibus/multiadapter support i2c, s3c24x0: added new multibus/multiadapter support i2c, s3c44b0: added new multibus/multiadapter support i2c, tsi108: added new multibus/multiadapter support i2c, mpc824x: added new multibus/multiadapter support i2c, pxa: added new multibus/multiadapter support
board/atc/atc.c | 4 +- board/cm5200/cm5200.c | 6 +- board/cmc_pu2/load_sernum_ethaddr.c | 4 +- board/cpc45/cpc45.c | 2 +- board/cpu86/cpu86.c | 4 +- board/cpu87/cpu87.c | 4 +- board/csb272/csb272.c | 2 +- board/etin/debris/debris.c | 2 +- board/fads/fads.h | 8 +- board/freescale/mpc8266ads/mpc8266ads.c | 2 +- board/freescale/mpc8548cds/mpc8548cds.c | 34 ++ board/hymod/hymod.c | 2 +- board/ids8247/ids8247.c | 4 +- board/keymile/common/common.c | 41 +- board/keymile/km8xx/km8xx.c | 55 ++- board/keymile/kmeter1/kmeter1.c | 9 +- board/keymile/mgcoge/mgcoge.c | 6 +- board/lwmon/lwmon.c | 2 +- board/lwmon/pcmcia.c | 4 +- board/lwmon5/kbd.c | 2 +- board/m501sk/eeprom.c | 2 +- board/mpl/pip405/pip405.c | 2 +- board/muas3001/muas3001.c | 2 +- board/pm826/pm826.c | 4 +- board/pm828/pm828.c | 4 +- board/rsdproto/rsdproto.c | 2 +- board/sacsng/ioconfig.h | 4 +- board/sandburst/common/ppc440gx_i2c.c | 507 ------------------ board/sandburst/common/ppc440gx_i2c.h | 60 --- board/sandburst/common/sb_common.c | 39 +- board/sandburst/common/sb_common.h | 1 - board/sandburst/karef/Makefile | 2 +- board/sandburst/karef/karef.c | 6 - board/sandburst/metrobox/Makefile | 2 +- board/sandburst/metrobox/metrobox.c | 6 - board/sbc8260/sbc8260.c | 4 +- board/siemens/SCM/scm.c | 2 +- board/tqc/tqm8260/tqm8260.c | 4 +- board/tqc/tqm8272/tqm8272.c | 4 +- board/xpedite1k/xpedite1k.c | 2 +- common/cmd_date.c | 9 + common/cmd_dtt.c | 9 + common/cmd_eeprom.c | 2 +- common/cmd_i2c.c | 157 ++++--- common/devices.c | 14 +- cpu/mpc512x/Makefile | 1 - cpu/mpc512x/i2c.c | 403 -------------- cpu/mpc5xxx/Makefile | 4 +- cpu/mpc5xxx/i2c.c | 393 -------------- cpu/mpc8220/Makefile | 2 +- cpu/mpc8220/i2c.c | 390 -------------- cpu/mpc824x/Makefile | 3 +- cpu/mpc8260/Makefile | 2 +- cpu/mpc8260/commproc.c | 2 +- cpu/mpc8xx/Makefile | 1 - cpu/mpc8xx/video.c | 4 + cpu/ppc4xx/40x_spd_sdram.c | 10 +- cpu/ppc4xx/44x_spd_ddr.c | 10 +- cpu/ppc4xx/44x_spd_ddr2.c | 3 +- cpu/ppc4xx/Makefile | 1 - cpu/ppc4xx/denali_spd_ddr2.c | 3 +- cpu/pxa/Makefile | 1 - doc/README.m52277evb | 2 +- doc/README.m53017evb | 2 +- doc/README.m5373evb | 2 +- doc/README.m54455evb | 2 +- doc/README.m5475evb | 2 +- drivers/hwmon/adm1021.c | 4 + drivers/hwmon/lm75.c | 9 + drivers/i2c/Makefile | 16 +- drivers/i2c/bfin-twi_i2c.c | 41 ++- drivers/i2c/davinci_i2c.c | 38 ++- drivers/i2c/fsl_i2c.c | 221 ++++----- drivers/i2c/i2c_core.c | 388 ++++++++++++++ drivers/i2c/mpc5xxx_i2c.c | 552 ++++++++++++++++++++ .../drivers/i2c/i2c.c => drivers/i2c/mpc824x_i2c.c | 38 ++- cpu/mpc8260/i2c.c => drivers/i2c/mpc8260_i2c.c | 79 ++-- cpu/mpc8xx/i2c.c => drivers/i2c/mpc8xx_i2c.c | 42 ++- drivers/i2c/mxc_i2c.c | 41 ++- drivers/i2c/omap1510_i2c.c | 37 ++- drivers/i2c/omap24xx_i2c.c | 37 ++- cpu/ppc4xx/i2c.c => drivers/i2c/ppc4xx_i2c.c | 182 ++++--- cpu/pxa/i2c.c => drivers/i2c/pxa_i2c.c | 41 ++- drivers/i2c/s3c24x0_i2c.c | 39 ++- drivers/i2c/s3c44b0_i2c.c | 37 ++- drivers/i2c/soft_i2c.c | 120 +++-- drivers/i2c/tsi108_i2c.c | 41 ++- include/4xx_i2c.h | 20 +- include/asm-arm/global_data.h | 3 + include/asm-avr32/global_data.h | 3 + include/asm-blackfin/global_data.h | 3 + include/asm-i386/global_data.h | 3 + include/asm-m68k/global_data.h | 3 + include/asm-microblaze/global_data.h | 3 + include/asm-mips/global_data.h | 3 + include/asm-nios/global_data.h | 3 + include/asm-nios2/global_data.h | 3 + include/asm-ppc/global_data.h | 3 + include/asm-sh/global_data.h | 3 + include/asm-sparc/global_data.h | 3 + include/configs/A3000.h | 9 +- include/configs/APC405.h | 10 +- include/configs/ASH405.h | 11 +- include/configs/ATUM8548.h | 16 +- include/configs/Alaska8220.h | 7 +- include/configs/B2.h | 9 +- include/configs/BC3450.h | 10 +- include/configs/CANBT.h | 11 +- include/configs/CATcenter.h | 10 +- include/configs/CMS700.h | 11 +- include/configs/CPC45.h | 9 +- include/configs/CPCI2DP.h | 11 +- include/configs/CPCI405.h | 11 +- include/configs/CPCI4052.h | 11 +- include/configs/CPCI405AB.h | 11 +- include/configs/CPCI405DT.h | 11 +- include/configs/CPCIISER4.h | 11 +- include/configs/CPU86.h | 9 +- include/configs/CPU87.h | 9 +- include/configs/CRAYL1.h | 11 +- include/configs/DASA_SIM.h | 2 +- include/configs/DP405.h | 11 +- include/configs/DU405.h | 11 +- include/configs/DU440.h | 15 +- include/configs/ERIC.h | 11 +- include/configs/EXBITGEN.h | 11 +- include/configs/FADS823.h | 8 +- include/configs/G2000.h | 11 +- include/configs/GEN860T.h | 20 +- include/configs/HH405.h | 13 +- include/configs/HIDDEN_DRAGON.h | 20 +- include/configs/HMI10.h | 11 +- include/configs/HUB405.h | 11 +- include/configs/IAD210.h | 12 +- include/configs/ICU862.h | 14 +- include/configs/IDS8247.h | 10 +- include/configs/IP860.h | 10 +- include/configs/IPHASE4539.h | 12 +- include/configs/IceCube.h | 10 +- include/configs/JSE.h | 13 +- include/configs/KAREF.h | 18 +- include/configs/KUP4K.h | 13 +- include/configs/KUP4X.h | 14 +- include/configs/M52277EVB.h | 12 +- include/configs/M5235EVB.h | 10 +- include/configs/M5253DEMO.h | 9 +- include/configs/M5271EVB.h | 10 +- include/configs/M5275EVB.h | 10 +- include/configs/M53017EVB.h | 10 +- include/configs/M5329EVB.h | 10 +- include/configs/M5373EVB.h | 10 +- include/configs/M54451EVB.h | 10 +- include/configs/M54455EVB.h | 10 +- include/configs/M5475EVB.h | 10 +- include/configs/M5485EVB.h | 10 +- include/configs/METROBOX.h | 17 +- include/configs/MHPC.h | 9 +- include/configs/MIP405.h | 11 +- include/configs/MPC8260ADS.h | 11 +- include/configs/MPC8266ADS.h | 11 +- include/configs/MPC8313ERDB.h | 17 +- include/configs/MPC8315ERDB.h | 12 +- include/configs/MPC8323ERDB.h | 12 +- include/configs/MPC832XEMDS.h | 12 +- include/configs/MPC8349EMDS.h | 18 +- include/configs/MPC8349ITX.h | 32 +- include/configs/MPC8360EMDS.h | 13 +- include/configs/MPC8360ERDK.h | 18 +- include/configs/MPC837XEMDS.h | 13 +- include/configs/MPC837XERDB.h | 13 +- include/configs/MPC8536DS.h | 20 +- include/configs/MPC8540ADS.h | 14 +- include/configs/MPC8540EVAL.h | 14 +- include/configs/MPC8541CDS.h | 14 +- include/configs/MPC8544DS.h | 14 +- include/configs/MPC8548CDS.h | 105 +++- include/configs/MPC8555CDS.h | 14 +- include/configs/MPC8560ADS.h | 14 +- include/configs/MPC8568MDS.h | 21 +- include/configs/MPC8569MDS.h | 17 +- include/configs/MPC8572DS.h | 21 +- include/configs/MPC8610HPCD.h | 14 +- include/configs/MPC8641HPCN.h | 14 +- include/configs/MVBLM7.h | 18 +- include/configs/NC650.h | 10 +- include/configs/OCRTC.h | 11 +- include/configs/ORSG.h | 11 +- include/configs/OXC.h | 9 +- include/configs/P2020DS.h | 21 +- include/configs/PCI405.h | 11 +- include/configs/PIP405.h | 11 +- include/configs/PLU405.h | 11 +- include/configs/PM520.h | 11 +- include/configs/PM826.h | 9 +- include/configs/PM828.h | 9 +- include/configs/PM854.h | 14 +- include/configs/PM856.h | 14 +- include/configs/PMC405.h | 11 +- include/configs/PMC440.h | 14 +- include/configs/PPChameleonEVB.h | 11 +- include/configs/R360MPI.h | 19 +- include/configs/RBC823.h | 9 +- include/configs/RPXClassic.h | 23 +- include/configs/RPXsuper.h | 12 +- include/configs/RRvision.h | 13 +- include/configs/SBC8540.h | 14 +- include/configs/SCM.h | 11 +- include/configs/SIMPC8313.h | 15 +- include/configs/SMN42.h | 22 +- include/configs/SX1.h | 7 +- include/configs/SXNI855T.h | 8 +- include/configs/Sandpoint8240.h | 20 +- include/configs/Sandpoint8245.h | 20 +- include/configs/TASREG.h | 27 +- include/configs/TB5200.h | 12 +- include/configs/TK885D.h | 13 +- include/configs/TOP5200.h | 26 +- include/configs/TOP860.h | 11 +- include/configs/TQM5200.h | 12 +- include/configs/TQM8260.h | 9 +- include/configs/TQM8272.h | 15 +- include/configs/TQM834x.h | 10 +- include/configs/TQM855M.h | 13 +- include/configs/TQM85xx.h | 14 +- include/configs/TQM866M.h | 13 +- include/configs/TQM885D.h | 13 +- include/configs/Total5200.h | 11 +- include/configs/VCMA9.h | 10 +- include/configs/VOH405.h | 11 +- include/configs/VOM405.h | 11 +- include/configs/W7OLMC.h | 11 +- include/configs/W7OLMG.h | 11 +- include/configs/WUH405.h | 11 +- include/configs/XPEDITE1K.h | 12 +- include/configs/XPEDITE5200.h | 17 +- include/configs/XPEDITE5370.h | 17 +- include/configs/Yukon8220.h | 7 +- include/configs/acadia.h | 2 +- include/configs/aev.h | 12 +- include/configs/alpr.h | 12 +- include/configs/amcc-common.h | 16 +- include/configs/aria.h | 25 +- include/configs/bamboo.h | 2 +- include/configs/barco.h | 20 +- include/configs/bf518f-ezbrd.h | 9 +- include/configs/bf526-ezbrd.h | 9 +- include/configs/bf527-ezkit.h | 9 +- include/configs/bf533-ezkit.h | 11 +- include/configs/bf533-stamp.h | 48 ++- include/configs/bf537-stamp.h | 9 +- include/configs/bf538f-ezkit.h | 9 +- include/configs/bf548-ezkit.h | 9 +- include/configs/bf561-ezkit.h | 9 +- include/configs/bfin_adi_common.h | 2 +- include/configs/bubinga.h | 2 +- include/configs/canyonlands.h | 2 +- include/configs/cm5200.h | 12 +- include/configs/cogent_mpc8xx.h | 9 +- include/configs/cpci5200.h | 11 +- include/configs/csb272.h | 11 +- include/configs/csb472.h | 11 +- include/configs/davinci_dvevm.h | 7 +- include/configs/davinci_schmoogie.h | 7 +- include/configs/davinci_sffsdr.h | 7 +- include/configs/davinci_sonata.h | 7 +- include/configs/debris.h | 20 +- include/configs/delta.h | 10 +- include/configs/digsy_mtc.h | 10 +- include/configs/eXalion.h | 9 +- include/configs/ebony.h | 2 +- include/configs/ep8248.h | 11 +- include/configs/ep8260.h | 14 +- include/configs/ep82xxm.h | 11 +- include/configs/gdppc440etx.h | 2 +- include/configs/hmi1001.h | 10 +- include/configs/hymod.h | 12 +- include/configs/imx31_phycore.h | 9 +- include/configs/innokom.h | 8 +- include/configs/jupiter.h | 19 - include/configs/katmai.h | 2 +- include/configs/kilauea.h | 2 +- include/configs/km8xx.h | 29 +- include/configs/kmeter1.h | 30 +- include/configs/kmsupx4.h | 21 + include/configs/korat.h | 12 +- include/configs/kvme080.h | 8 +- include/configs/luan.h | 2 +- include/configs/lwmon.h | 13 +- include/configs/lwmon5.h | 12 +- include/configs/makalu.h | 2 +- include/configs/mcc200.h | 10 +- include/configs/mecp5123.h | 22 +- include/configs/mecp5200.h | 10 +- include/configs/mgcoge.h | 33 +- include/configs/mgsuvd.h | 24 + include/configs/motionpro.h | 10 +- include/configs/mpc5121ads.h | 21 +- include/configs/mpc7448hpc2.h | 8 +- include/configs/muas3001.h | 11 +- include/configs/mucmc52.h | 10 +- include/configs/neo.h | 2 +- include/configs/netstal-common.h | 11 +- include/configs/netstar.h | 7 +- include/configs/o2dnt.h | 11 +- include/configs/ocotea.h | 2 +- include/configs/omap2420h4.h | 7 +- include/configs/p3p440.h | 12 +- include/configs/pcs440ep.h | 12 +- include/configs/pcu_e.h | 9 +- include/configs/pdnb3.h | 11 +- include/configs/pf5200.h | 11 +- include/configs/quad100hd.h | 12 +- include/configs/redwood.h | 2 +- include/configs/rmu.h | 11 +- include/configs/rsdproto.h | 11 +- include/configs/sacsng.h | 12 +- include/configs/sbc405.h | 12 +- include/configs/sbc8260.h | 12 +- include/configs/sbc8349.h | 15 +- include/configs/sbc8548.h | 12 +- include/configs/sbc8560.h | 14 +- include/configs/sbc8641d.h | 14 +- include/configs/sc3.h | 13 +- include/configs/sequoia.h | 2 +- include/configs/smmaco4.h | 12 +- include/configs/socrates.h | 19 +- include/configs/sorcery.h | 8 +- include/configs/spc1920.h | 13 +- include/configs/stxgp3.h | 18 +- include/configs/stxssa.h | 13 +- include/configs/taihu.h | 2 +- include/configs/taishan.h | 2 +- include/configs/trab.h | 10 +- include/configs/uc100.h | 13 +- include/configs/uc101.h | 11 +- include/configs/utx8245.h | 12 +- include/configs/v38b.h | 10 +- include/configs/vct.h | 12 +- include/configs/voiceblue.h | 7 +- include/configs/walnut.h | 2 +- include/configs/xm250.h | 8 +- include/configs/yosemite.h | 2 +- include/configs/yucca.h | 2 +- include/configs/zeus.h | 12 +- include/i2c.h | 216 +++++++- include/mpc8220.h | 26 + lib_arm/board.c | 14 +- lib_blackfin/board.c | 8 + lib_m68k/board.c | 15 +- lib_mips/board.c | 8 + lib_ppc/board.c | 15 +- 351 files changed, 4085 insertions(+), 3570 deletions(-) delete mode 100644 board/sandburst/common/ppc440gx_i2c.c delete mode 100644 board/sandburst/common/ppc440gx_i2c.h delete mode 100644 cpu/mpc512x/i2c.c delete mode 100644 cpu/mpc5xxx/i2c.c delete mode 100644 cpu/mpc8220/i2c.c create mode 100644 drivers/i2c/i2c_core.c create mode 100644 drivers/i2c/mpc5xxx_i2c.c rename cpu/mpc824x/drivers/i2c/i2c.c => drivers/i2c/mpc824x_i2c.c (85%) rename cpu/mpc8260/i2c.c => drivers/i2c/mpc8260_i2c.c (94%) rename cpu/mpc8xx/i2c.c => drivers/i2c/mpc8xx_i2c.c (95%) rename cpu/ppc4xx/i2c.c => drivers/i2c/ppc4xx_i2c.c (72%) rename cpu/pxa/i2c.c => drivers/i2c/pxa_i2c.c (92%)
bye Heiko

Dear Heiko Schocher,
In message 4A6182BE.50007@denx.de you wrote:
Will you post patches for this merge window?
I am not completly ready (I ported hopefully all drivers, hold it in sync with mainline, but I need to test this again), so I think, it would be better to wait for the next release cycle, but if now a discussion is starting, if it is in principle ok, code can be found at:
http://git.denx.de/?p=u-boot/u-boot-i2c.git;a=shortlog;h=refs/heads/multibus...
I hope to have this ready for next merge window, so a big test phase can start!
OK - I'm fine with that.
Best regards,
Wolfgang Denk
participants (3)
-
Heiko Schocher
-
ksi@koi8.net
-
Wolfgang Denk