public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v4 0/3] dm:gpio:mxc add DT support
@ 2015-02-10  6:46 Peng Fan
  2015-02-10  6:46 ` [U-Boot] [PATCH v4 1/3] dm: introduce dev_get_addr interface Peng Fan
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Peng Fan @ 2015-02-10  6:46 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-02-12 22:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-10  6:46 [U-Boot] [PATCH v4 0/3] dm:gpio:mxc add DT support Peng Fan
2015-02-10  6:46 ` [U-Boot] [PATCH v4 1/3] dm: introduce dev_get_addr interface Peng Fan
2015-02-11  0:37   ` Simon Glass
2015-02-12 22:18     ` Simon Glass
2015-02-10  6:46 ` [U-Boot] [PATCH v4 2/3] dm:gpio:mxc add a bank_index entry in platdata Peng Fan
2015-02-11  0:37   ` Simon Glass
2015-02-12 22:18     ` Simon Glass
2015-02-10  6:46 ` [U-Boot] [PATCH v4 3/3] dm:gpio:mxc add DT support Peng Fan
2015-02-10  7:46   ` Igor Grinberg
2015-02-11  0:37     ` Simon Glass
2015-02-12 22:18       ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox