diff options
author | Simon Glass <sjg@chromium.org> | 2014-09-22 17:30:56 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-10-22 10:36:57 -0600 |
commit | 41e98e011da9a3a4461e8cb1479ce343898264fe (patch) | |
tree | ee5a4a4bcc3f57e39df466589913cc126ffc5a83 /board/raspberrypi/rpi_b/rpi_b.c | |
parent | da802b9e2726c7467e0b402efeb6ad3d975f1282 (diff) | |
download | u-boot-imx-41e98e011da9a3a4461e8cb1479ce343898264fe.zip u-boot-imx-41e98e011da9a3a4461e8cb1479ce343898264fe.tar.gz u-boot-imx-41e98e011da9a3a4461e8cb1479ce343898264fe.tar.bz2 |
dm: rpi: Convert GPIO driver to driver model
Convert the BCM2835 GPIO driver to use driver model, and switch over
Raspberry Pi to use this, since it is the only board.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Diffstat (limited to 'board/raspberrypi/rpi_b/rpi_b.c')
-rw-r--r-- | board/raspberrypi/rpi_b/rpi_b.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/board/raspberrypi/rpi_b/rpi_b.c b/board/raspberrypi/rpi_b/rpi_b.c index 220bb90..447c940 100644 --- a/board/raspberrypi/rpi_b/rpi_b.c +++ b/board/raspberrypi/rpi_b/rpi_b.c @@ -16,15 +16,26 @@ #include <common.h> #include <config.h> +#include <dm.h> #include <fdt_support.h> #include <lcd.h> #include <mmc.h> +#include <asm/gpio.h> #include <asm/arch/mbox.h> #include <asm/arch/sdhci.h> #include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; +static const struct bcm2835_gpio_platdata gpio_platdata = { + .base = BCM2835_GPIO_BASE, +}; + +U_BOOT_DEVICE(bcm2835_gpios) = { + .name = "gpio_bcm2835", + .platdata = &gpio_platdata, +}; + struct msg_get_arm_mem { struct bcm2835_mbox_hdr hdr; struct bcm2835_mbox_tag_get_arm_mem get_arm_mem; |