
Now that driver model is part of U-Boot, the task of converting drivers over to it begins. GPIO is one of the easiest to convert, since it already has a sandbox driver and a uclass driver.
The Tegra GPIO driver is relatively simple since it has a linear numbering and already uses the generic GPIO framework. Each GPIO bank has a separate device. Some arguments have been made that a single device should support all the GPIO banks, but currently the driver model uclass does not work that way and it would require a second-level data structure to handle the bank feature.
This driver has been tested on Trimslice (Tegra 20). I will try it on a beaver also (soon!).
For exynos, the pinctrl device tree files are brought in from the kernel and cut down to remove the groupings which we don't yet use. Very small additions are made to avoid replicating the awful tables that Linux has for every exynos SoC.
So far this fails to build for four boards (smdkc100, smdkv310, s5p_goni, arndale) because they don't use exynos5-dt.h. I'll take a look at this when I figure out how to make a common exynos5 config.
The 'gpio' command is updated to support display of only the allocated GPIOs. This is much more friendly than displaying a large table.
A related clean-ups are provided as well.
Changes in v4: - Rename struct device to struct udevice - Add new patch to enhance 'gpio' command - Add patches for exynos GPIO support
Changes in v3: - Move dm command enable to previous patch - Use gpio number for the internal helper functions
Changes in v2: - Split out driver model changes into separate patches - Correct bugs found during testing
Simon Glass (11): tegra: Convert tegra GPIO driver to use driver model exynos: Bring in pinctrl dts files from Linux kernel exynos: dts: Remove unused pinctrl information to save space exynos: dts: Adjust device tree files for U-Boot exynos: dts: Convert /include/ to #include exynos: Tidy up GPIO headers exynos: Tidy up GPIO defines exynos: Make sure that GPIOs are requested dm: gpio: Enhance gpio command to show only active GPIOs exynos: gpio: Convert to driver model dm: sandbox: dts: Add a GPIO bank
arch/arm/cpu/armv7/exynos/pinmux.c | 5 +- arch/arm/dts/exynos4.dtsi | 9 +- arch/arm/dts/exynos4210-origen.dts | 4 +- arch/arm/dts/exynos4210-pinctrl.dtsi | 305 ++++++++++++++++++++ arch/arm/dts/exynos4210-trats.dts | 2 +- arch/arm/dts/exynos4210-universal_c210.dts | 2 +- arch/arm/dts/exynos4210.dtsi | 161 +++++++++++ arch/arm/dts/exynos4412-trats2.dts | 2 +- arch/arm/dts/exynos4412.dtsi | 38 +++ arch/arm/dts/exynos4x12-pinctrl.dtsi | 350 +++++++++++++++++++++++ arch/arm/dts/exynos4x12.dtsi | 122 ++++++++ arch/arm/dts/exynos5.dtsi | 56 +++- arch/arm/dts/exynos5250-pinctrl.dtsi | 335 ++++++++++++++++++++++ arch/arm/dts/exynos5250-smdk5250.dts | 2 +- arch/arm/dts/exynos5250-snow.dts | 2 +- arch/arm/dts/exynos5250.dtsi | 48 +++- arch/arm/dts/exynos5420-peach-pit.dts | 2 +- arch/arm/dts/exynos5420-pinctrl.dtsi | 316 ++++++++++++++++++++ arch/arm/dts/exynos5420-smdk5420.dts | 2 +- arch/arm/dts/exynos5420.dtsi | 125 ++++++++ arch/arm/dts/exynos54xx.dtsi | 57 +++- arch/arm/include/asm/arch-exynos/gpio.h | 4 - arch/arm/include/asm/arch-s5pc1xx/gpio.h | 4 - arch/arm/include/asm/arch-tegra/gpio.h | 15 +- arch/sandbox/dts/sandbox.dts | 9 + board/nvidia/seaboard/seaboard.c | 2 +- board/samsung/arndale/arndale.c | 2 +- board/samsung/common/board.c | 2 +- board/samsung/common/misc.c | 1 - board/samsung/goni/goni.c | 2 +- board/samsung/origen/origen.c | 2 +- board/samsung/smdk5250/exynos5-dt.c | 7 + board/samsung/smdk5420/smdk5420.c | 4 +- board/samsung/smdkc100/smdkc100.c | 2 +- board/samsung/smdkv310/smdkv310.c | 2 +- board/samsung/trats/trats.c | 2 +- board/samsung/trats2/trats2.c | 1 + board/samsung/universal_c210/universal.c | 1 - common/cmd_gpio.c | 101 ++++--- drivers/gpio/s5p_gpio.c | 443 +++++++++++++++++++---------- drivers/gpio/tegra_gpio.c | 313 ++++++++++++++++---- drivers/mmc/s5p_sdhci.c | 7 +- include/asm-generic/gpio.h | 15 +- include/configs/exynos4-dt.h | 4 + include/configs/exynos5-dt.h | 4 + include/configs/tegra-common.h | 1 + 46 files changed, 2615 insertions(+), 280 deletions(-) create mode 100644 arch/arm/dts/exynos4210-pinctrl.dtsi create mode 100644 arch/arm/dts/exynos4210.dtsi create mode 100644 arch/arm/dts/exynos4412.dtsi create mode 100644 arch/arm/dts/exynos4x12-pinctrl.dtsi create mode 100644 arch/arm/dts/exynos4x12.dtsi create mode 100644 arch/arm/dts/exynos5250-pinctrl.dtsi create mode 100644 arch/arm/dts/exynos5420-pinctrl.dtsi create mode 100644 arch/arm/dts/exynos5420.dtsi