]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/raspberrypi/rpi_b/rpi_b.c
dm: rpi: Convert GPIO driver to driver model
[karo-tx-uboot.git] / board / raspberrypi / rpi_b / rpi_b.c
index 220bb90dc1ae025ddf37e8fe9636201843c00650..447c940f63154aa560881046a1d742b6bc1e7d5e 100644 (file)
 
 #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;