u-boot/drivers
Peng Fan 71204e95ce i2c: mxc: refactor i2c driver and support dm
1. Introduce a new structure `struct mxc_i2c_bus`, this structure will
   used for non-DM and DM.
2. Remove `struct mxc_i2c_regs` structure, but use register offset to access
   registers based on `base` entry of `struct mxc_i2c_bus`.
3. Remove most `#ifdef I2C_QUIRK_REG`. Using driver_data to contain platform
   flags. A new flag is introduced, I2C_QUIRK_FLAG.
4. Most functions use `struct mxc_i2c_bus` as one of the parameters.
   Make most functions common to DM and non-DM, try to avoid duplicated code.
5. Support DM, but pinctrl is not included. Pinmux setting is still set
   by setup_i2c, but we do not need bus_i2c_init for DM.
6. struct i2c_parms and struct sram_data are removed.
7. Remove bus_i2c_read bus_i2c_write prototype in header file. The frist
   paramter of bus_i2c_init is modified to i2c index. Add new prototype
   i2c_idle_bus and force_bus_idle. Since bus_i2c_init is not good for
   DM I2C and pinctrl is missed, we use a weak function for i2c_idle_bus.
   Board file take the responsibility to implement this function, like this:
   "
   int i2c_idle_bus(struct mxc_i2c_bus *i2c_bus)
   {
	   if (i2c_bus->index == 0)
		   force_bus_idle(i2c_pads_info0);
	   else if (i2c_bus->index == 1)
		   force_bus_idle(i2c_pads_info1);
	   else
		   xxxxxx
   }
   "
8. Introduce a weak function, enable_i2c_clk
9. Tested on an i.MX7 platform. Log info:
 => dm tree
 Class       Probed   Name
 ----------------------------------------
 root        [ + ]    root_driver
 simple_bus  [   ]    |-- soc
 simple_bus  [   ]    |   |-- aips-bus@30000000
 simple_bus  [   ]    |   |   |-- anatop@30360000
 simple_bus  [   ]    |   |   `-- snvs@30370000
 simple_bus  [   ]    |   |-- aips-bus@30400000
 simple_bus  [   ]    |   `-- aips-bus@30800000
 i2c         [   ]    |       |-- i2c@30a20000
 i2c         [   ]    |       `-- i2c@30a40000
 simple_bus  [   ]    `-- regulators
 => i2c dev 0
 Setting bus to 0
 => i2c probe
 Valid chip addresses: 08 50
 => i2c md 8 31
 0031: 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:36 -06:00
..
bios_emulator biosemu: Do not free vga_info->BIOSImage when it is 0xc0000 2015-04-29 18:51:49 -06:00
block ahci: mmio_base is a virtual address 2015-04-18 16:54:29 -04:00
bootcount qe: move immap_qe.h from arch directory into common directory 2014-07-22 16:25:54 -07:00
core dm: core: Add a function to bind a driver for a device tree node 2015-04-29 21:02:32 -06:00
cpu dm: Implement a CPU uclass 2015-04-29 21:02:33 -06:00
crypto Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2015-03-05 20:50:30 -05:00
ddr arm: mvebu: db-mv784mp-gp: Fix ECC I2C address 2015-05-05 14:32:05 +02:00
demo common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
dfu dfu: nand: Verify writes 2015-03-30 23:24:38 -05:00
dma dma: keystone_nav: remove spurious qm_cfg verification 2014-11-06 11:04:39 -05:00
fpga fpga: xilinx: Show fpga info if defined 2015-01-21 10:25:43 +01:00
gpio dm: gpio: Add error handling and a function to claim vector GPIOs 2015-05-13 09:24:06 -07:00
hwmon dtt: add ds620 support 2015-04-10 14:23:23 +02:00
i2c i2c: mxc: refactor i2c driver and support dm 2015-05-14 18:49:36 -06:00
input i8042: Add keyboard enable logic in kbd_reset() 2015-04-18 11:11:16 -06:00
memory ARM: keystone: aemif: move aemif driver to drivers/memory/ti-aemif.c 2014-06-19 17:53:58 -04:00
misc sandbox: cros_ec: Support EC_CMD_ENTERING_MODE emulation 2015-05-14 18:49:34 -06:00
mmc Merge git://git.denx.de/u-boot-mpc85xx 2015-05-05 14:57:23 -04:00
mtd sandbox: spi: Add newline to printf() in sandbox_sf_probe 2015-05-14 18:49:35 -06:00
net sandbox: eth: Add a function to skip ping timeouts 2015-05-05 20:58:18 -06:00
pci Merge git://git.denx.de/u-boot-mpc85xx 2015-05-05 14:57:23 -04:00
pcmcia powerpc: mpc824x: remove MPC824X cpu support 2015-01-05 12:08:55 -05:00
power power: Export register access functions from as3722 2015-05-13 09:24:07 -07:00
pwm pwm, imx6: add support for pwm modul on imx6 2014-07-23 12:25:42 +02:00
qe QE/DeepSleep: add QE deepsleep support for mpc85xx 2015-04-21 10:19:19 -07:00
rtc dm: rtc: sandbox: Enable real-time clock support 2015-05-05 20:58:40 -06:00
serial Revert "stm32f4: fix serial output" 2015-05-10 16:01:48 -04:00
soc soc: keystone_serdes: generalize configuration mechanism 2014-10-23 11:27:28 -04:00
sound sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig 2015-04-18 11:11:39 -06:00
spi dm: spi: Avoid setting the speed with every transfer 2015-05-05 20:58:18 -06:00
thermal dm: Expand and complete Kconfig in drivers/ 2015-02-12 10:35:33 -07:00
tpm tpm: Support using driver model with I2C 2015-05-14 18:49:33 -06:00
twserial drivers: convert makefiles to Kbuild style 2013-10-31 13:26:01 -04:00
usb usb: ohci: Add support for interrupt queues 2015-05-14 18:49:35 -06:00
video tegra124: video: Add full link training for eDP 2015-05-13 09:24:12 -07:00
watchdog watchdog/imx_watchdog: do not set WCR_WDW 2015-03-25 16:52:16 +01:00
Kconfig dm: Implement a CPU uclass 2015-04-29 21:02:33 -06:00
Makefile dm: Implement a CPU uclass 2015-04-29 21:02:33 -06:00