[U-Boot] [PATCH v4 0/3] dm:gpio:mxc add DT support

Peng Fan Peng.Fan at freescale.com
Tue Feb 10 07:46:31 CET 2015


This patch set is to add DT support for mxc_gpio driver.

patch 1/3, a new dev_get_addr interface is abstracted to
	   improve driver who want to get device address.
patch 2/3, add a new bank_index entry in platdata to avoid `plat - mxc_plat`
	   pointer subtract usage.
patch 3/3, add compatible ids and implement bind function. Also commented
	   out U_BOOT_DEVICES and mxc_plat, since they are not needed
	   if using DT.
This patch set was tested on mx6sxsabresd board with DM and DT support.


Changes v4:
 1. add Igor's Acked-by for patch 1/3 and 2/3
 2. According Simon's suggestion, using fdt_addr_t as the return type of
    dev_get_addr.
 3. Merge the 1/4 and 2/4 of v3 into 1/3 of v4. Acording Ignor's advice,
    there is no need to split prototype into a single patch.
 4. To patch 3/3, address Simon's comments, add TODO to using auto-alloc
    feature, add comments, fix return value. 
 5. rebase on dm/master branch

Changes v3:
 1. split bank_index patch
 2. abstract dev_get_addr for driver

Changes v2:
 1. remove uneccessary #ifdef
 2. add more stuff in commit log
 3. include a new function mxc_get_gpio_addr to get register base.
    This function is different for DT and not DT, by `#ifdef`.
    If using one implementation for DT and not DT, final image will be big.
 4. include a new entry in platdata, named bank_index. it can simplify DT
    support. To no DT, bank_index is static initilized; to DT, bank_index
    is get from device's req_seq.

Peng Fan (3):
  dm: introduce dev_get_addr interface
  dm:gpio:mxc add a bank_index entry in platdata
  dm:gpio:mxc add DT support

 drivers/core/device.c   | 12 +++++++
 drivers/gpio/mxc_gpio.c | 89 +++++++++++++++++++++++++++++++++++++++----------
 include/dm/device.h     | 10 ++++++
 3 files changed, 93 insertions(+), 18 deletions(-)

-- 
1.8.4




More information about the U-Boot mailing list