From 1a1927f3a3c6cf0a0bfb51c0d9b3139ed2cb7a31 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 29 Oct 2014 13:09:01 -0600 Subject: dm: at91: Convert snapper9260 to use driver model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert this at91sam9260-based board to use driver model. This should serve as an example for other similar boards. Serial and GPIO are supported so far. Signed-off-by: Simon Glass Acked-by: Andreas Bießmann --- board/bluewater/snapper9260/snapper9260.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'board') diff --git a/board/bluewater/snapper9260/snapper9260.c b/board/bluewater/snapper9260/snapper9260.c index bfde1291a59..95633b0d2e8 100644 --- a/board/bluewater/snapper9260/snapper9260.c +++ b/board/bluewater/snapper9260/snapper9260.c @@ -9,12 +9,15 @@ */ #include +#include #include +#include #include #include #include #include #include +#include #include #include #include @@ -95,10 +98,12 @@ static void nand_hw_init(void) &smc->cs[3].mode); /* Configure RDY/BSY */ - at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1); + gpio_request(CONFIG_SYS_NAND_READY_PIN, "nand_rdy"); + gpio_direction_input(CONFIG_SYS_NAND_READY_PIN); /* Enable NandFlash */ - at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1); + gpio_request(CONFIG_SYS_NAND_ENABLE_PIN, "nand_ce"); + gpio_direction_output(CONFIG_SYS_NAND_ENABLE_PIN, 1); } int board_init(void) @@ -140,3 +145,12 @@ int dram_init(void) void reset_phy(void) { } + +static struct atmel_serial_platdata at91sam9260_serial_plat = { + .base_addr = ATMEL_BASE_DBGU, +}; + +U_BOOT_DEVICE(at91sam9260_serial) = { + .name = "serial_atmel", + .platdata = &at91sam9260_serial_plat, +}; -- cgit v1.2.3 From e87e0e79edf8173fe3551eed53a3bc60aa927b0c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 29 Oct 2014 13:09:02 -0600 Subject: dm: at91: Add myself as maintainer for snapper9260 The old maintainer has left, so take this over. Signed-off-by: Simon Glass --- board/bluewater/snapper9260/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/bluewater/snapper9260/MAINTAINERS b/board/bluewater/snapper9260/MAINTAINERS index ff1e9972cbd..1f8f4d6988f 100644 --- a/board/bluewater/snapper9260/MAINTAINERS +++ b/board/bluewater/snapper9260/MAINTAINERS @@ -1,5 +1,5 @@ SNAPPER9260 BOARD -M: Ryan Mallon +M: Simon Glass S: Maintained F: board/bluewater/snapper9260/ F: include/configs/snapper9260.h -- cgit v1.2.3 From 0521f9842731b3f79d5ee33907af773cd4732f0f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 10 Nov 2014 17:16:51 -0700 Subject: dm: tegra: Add platform data for the GPIO driver Add platform data for the GPIO driver. It doesn't need to contain anything since the GPIO driver will actually use information from the CONFIGs for now. This merely serves to ensure that the GPIO driver is bound. Signed-off-by: Simon Glass --- board/nvidia/common/board.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'board') diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c index 51125df34f0..0e4a65ad059 100644 --- a/board/nvidia/common/board.c +++ b/board/nvidia/common/board.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -43,6 +44,13 @@ DECLARE_GLOBAL_DATA_PTR; +#ifdef CONFIG_SPL_BUILD +/* TODO(sjg@chromium.org): Remove once SPL supports device tree */ +U_BOOT_DEVICE(tegra_gpios) = { + "gpio_tegra" +}; +#endif + const struct tegra_sysinfo sysinfo = { CONFIG_TEGRA_BOARD_STRING }; -- cgit v1.2.3