]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm:gpio:mxc add DT support
authorPeng Fan <Peng.Fan@freescale.com>
Tue, 10 Feb 2015 06:46:34 +0000 (14:46 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 11:52:17 +0000 (13:52 +0200)
commit915105e06fdcc6e8f1994564eb76120cd17b0e8d
treeb21c6d3dff6b9b0cb9b8513fe43942222ba59201
parentb8fdf7c3f99e69d4fd82285c4234e8bc4d45297a
dm:gpio:mxc add DT support

This patch add DT support for mxc gpio driver.

There are one place using CONFIG_OF_CONTROL macro.
1. The U_BOOT_DEVICES and mxc_plat array are complied out. To DT,
   platdata is alloced using calloc, so there is no need to use mxc_plat.

The following situations are tested, and all work fine:
1. with DM, without DT
2. with DM and DT
3. without DM
Since device tree has not been upstreamed, if want to test this patch.
The followings need to be done.
 + pieces of code does not gpio_request when using gpio_direction_xxx and
   etc, need to request gpio.
 + move the gpio settings from board_early_init_f to board_init
 + define CONFIG_DM ,CONFIG_DM_GPIO and CONFIG_OF_CONTROL
 + Add device tree file and do related configuration in
   `make ARCH=arm menuconfig`
These will be done in future patches by step.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/gpio/mxc_gpio.c