summaryrefslogtreecommitdiff
path: root/drivers/gpio/imx_rgpio2p.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/imx_rgpio2p.c')
-rw-r--r--drivers/gpio/imx_rgpio2p.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c
index 17edd40c5c..0e2874ca95 100644
--- a/drivers/gpio/imx_rgpio2p.c
+++ b/drivers/gpio/imx_rgpio2p.c
@@ -11,6 +11,7 @@
#include <fdtdec.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <dm/device-internal.h>
#include <malloc.h>
enum imx_rgpio2p_direction {
@@ -151,13 +152,13 @@ static int imx_rgpio2p_probe(struct udevice *dev)
static int imx_rgpio2p_bind(struct udevice *dev)
{
- struct imx_rgpio2p_plat *plat = dev->plat;
+ struct imx_rgpio2p_plat *plat = dev_get_plat(dev);
fdt_addr_t addr;
/*
* If plat already exsits, directly return.
* Actually only when DT is not supported, plat
- * is statically initialized in U_BOOT_DEVICES.Here
+ * is statically initialized in U_BOOT_DRVINFOS.Here
* will return.
*/
if (plat)
@@ -184,7 +185,7 @@ static int imx_rgpio2p_bind(struct udevice *dev)
plat->regs = (struct gpio_regs *)addr;
plat->bank_index = dev_seq(dev);
- dev->plat = plat;
+ dev_set_plat(dev, plat);
return 0;
}
@@ -215,7 +216,7 @@ static const struct imx_rgpio2p_plat imx_plat[] = {
{ 5, (struct gpio_regs *)RGPIO2P_GPIO6_BASE_ADDR },
};
-U_BOOT_DEVICES(imx_rgpio2ps) = {
+U_BOOT_DRVINFOS(imx_rgpio2ps) = {
{ "imx_rgpio2p", &imx_plat[0] },
{ "imx_rgpio2p", &imx_plat[1] },
{ "imx_rgpio2p", &imx_plat[2] },