u-boot/arch/arm/include/asm
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
..
arch-am33xx arm: am437x: mux: Update mux names 2015-04-23 14:56:07 -04:00
arch-armada100 ARM: remove CONFIG_ARM926EJS defines 2014-11-20 11:28:25 -05:00
arch-armv7
arch-bcm281xx bcm281xx: add support for "USB OTG clock" 2014-12-29 16:31:23 -05:00
arch-bcmcygnus arm: add Cygnus and NSP boards 2014-08-30 07:46:40 -04:00
arch-bcmnsp arm: add Cygnus and NSP boards 2014-08-30 07:46:40 -04:00
arch-ep93xx
arch-exynos arm: exynos: add display clocks for Exynos5800 2015-04-06 14:34:40 +09:00
arch-fsl-lsch3 ls2085a: esdhc: Add esdhc support for ls2085a 2015-04-23 16:46:51 -07:00
arch-imx ARM: i.MX: provide access to reset cause through get_imx_reset_cause() 2015-02-17 10:42:54 +01:00
arch-lpc32xx lpc32xx: add support for board work_92105 2015-04-10 14:23:39 +02:00
arch-ls102xa QE/DeepSleep: add QE deepsleep support for mpc85xx 2015-04-21 10:19:19 -07:00
arch-mvebu arm: marvell: Move arch-kirkwood/spi.h to arch-mvebu/spi.h 2014-10-23 09:59:20 -04:00
arch-mx5 mx5: fix get_reset_cause 2015-03-05 10:29:27 +01:00
arch-mx6 arm: mx6: ddr: add pd_fast_exit flag to system information 2015-04-22 14:35:35 +02:00
arch-mx25
arch-mx27 imx: mx27 move GPIO_PORTx to gpio.h 2015-05-14 18:49:36 -06:00
arch-mx31 arm: mx31: use common timer functions 2014-09-16 12:51:46 +02:00
arch-mx35 arm: mx35: use common timer functions 2014-09-16 12:53:09 +02:00
arch-mxs arm: mxs: Add 'Wait for JTAG user' if booted in JTAG mode 2015-02-10 12:48:50 +01:00
arch-omap3 ARM: OMAP3: rx51: Enable workaround for ARM errata 454179, 430973, 621766 2015-03-13 09:29:33 -04:00
arch-omap4 ARM: OMAP: Change set_pl310_ctrl_reg to be generic 2015-03-13 09:28:55 -04:00
arch-omap5 board: ti: DRA7: added USB initializtion code 2015-04-14 05:48:11 +02:00
arch-orion5x edminiv2: switch to SPL 2015-02-25 07:59:50 +01:00
arch-pxa
arch-rmobile arm: rmobile: alt: Add support SDHI 2015-02-25 13:13:38 +09:00
arch-s3c24x0 mtd: nand: s3c: Unify the register definition and naming 2014-11-26 23:21:43 -06:00
arch-s5pc1xx dm: exynos: gpio: Convert to driver model 2014-10-22 10:36:36 -06:00
arch-sa1100
arch-spear
arch-stm32f4 stm32f4: add serial print port 2015-05-10 07:29:38 -04:00
arch-stv0991 stv0991: enable ethernet support 2014-12-09 15:16:19 -05:00
arch-sunxi sunxi: ohci: Add ohci usb host controller support 2015-05-14 18:49:32 -06:00
arch-tegra tegra: Make tegra_powergate_power_on public 2015-05-13 09:24:15 -07:00
arch-tegra20 tegra: Move display controller header into common 2015-05-13 09:24:10 -07:00
arch-tegra30 ARM: ARM720t: remove empty asm/arch/hardware.h 2015-04-23 08:52:27 -04:00
arch-tegra114 ARM: ARM720t: remove empty asm/arch/hardware.h 2015-04-23 08:52:27 -04:00
arch-tegra124 ARM: tegra: Enable SMMU when going non-secure 2015-05-13 09:24:16 -07:00
arch-tegra210 ARM: tegra: pinmux: add Tegra210 support 2015-03-04 10:09:02 -07:00
arch-u8500
arch-vf610 usb: host: Add ehci-vf USB driver for ARM Vybrid SoC's 2015-04-23 14:56:09 -04:00
arch-zynqmp zynqmp: Enable SDHCI0 options 2015-04-29 11:19:04 +02:00
armv8 armv8/fsl-lsch3: Change normal memory shareability 2015-02-24 13:08:22 -08:00
imx-common i2c: mxc: refactor i2c driver and support dm 2015-05-14 18:49:36 -06:00
iproc-common arm: add Cygnus and NSP boards 2014-08-30 07:46:40 -04:00
kona-common bcm281xx: add support for "USB OTG clock" 2014-12-29 16:31:23 -05:00
proc-armv ARM: add missing HYP mode constant 2014-07-28 17:06:35 +02:00
ti-common dma: ti-edma3: introduce edma3 driver 2014-10-23 11:27:29 -04:00
armv7.h virt-dt: Allow reservation of secure region when in a RAM carveout 2015-05-13 09:24:14 -07:00
armv7m.h ARM: Add ARMv7-M support 2015-04-22 12:14:55 -04:00
assembler.h arm: build arch memset/memcpy in Thumb2 mode 2015-01-09 10:20:22 -05:00
atomic.h
bitops.h arm: implement find_next_zero_bit function 2015-04-16 09:31:14 +02:00
bootm.h
byteorder.h
cache.h
config.h ARMv8: enable pre-allocation malloc 2015-03-27 16:28:58 +01:00
davinci_rtc.h
dma-mapping.h arm: asm: dma-mapping: added dma_free_coherent API 2015-04-14 05:48:09 +02:00
ehci-omap.h
emif.h ARM: DRA7: EMIF: Update SDRAM_REF_CTRL register value 2015-02-16 12:41:40 -05:00
errno.h
fsl_secure_boot.h Add bootscript support to esbc_validate. 2015-04-21 10:19:19 -07:00
gic.h
global_data.h armv8/fsl-lsch3: Add support for second DDR clock 2015-02-24 13:09:14 -08:00
gpio.h
hardware.h
io.h arm: ls102xa: Add Freescale LS102xA SoC support 2014-09-08 10:30:32 -07:00
linkage.h
mach-types.h davinci: add support for omapl138-lcdk board 2015-04-23 13:58:43 -04:00
macro.h Armv8: Initializing CNTVOFF_EL2 2015-04-16 11:27:15 +02:00
memory.h
omap_boot.h
omap_common.h ARM: DRA7: Set serial number environment variable 2015-04-23 13:59:19 -04:00
omap_gpio.h dm: omap: gpio: Support driver model 2014-10-23 19:29:07 -06:00
omap_mmc.h
omap_musb.h
pl310.h
posix_types.h
processor.h
psci.h ARM: Add board-specific initialization hook for PSCI 2015-05-13 09:24:15 -07:00
ptrace.h
sections.h
secure.h ARM: HYP/non-sec: allow relocation to secure RAM 2014-07-28 17:19:09 +02:00
setup.h
spl.h arm: spl: Avoid setting up a duplicate global data structure 2015-03-04 14:55:04 -05:00
string.h
system.h arm: Add a prototype for save_boot_params_ret() 2015-05-14 18:49:34 -06:00
types.h include: asm: types: add resource_size_t type 2015-04-14 05:48:09 +02:00
u-boot-arm.h common: Move dram_init() declaration to common location 2015-02-09 15:08:48 +01:00
u-boot.h break build if it would produce broken binary 2015-04-13 10:52:51 -04:00
unaligned.h
utils.h