|
@@ -299,7 +299,7 @@ static int omap_gpio_probe(struct udevice *dev)
|
|
|
|
|
|
static int omap_gpio_bind(struct udevice *dev)
|
|
static int omap_gpio_bind(struct udevice *dev)
|
|
{
|
|
{
|
|
- struct omap_gpio_platdata *plat = dev->platdata;
|
|
|
|
|
|
+ struct omap_gpio_platdata *plat = dev_get_platdata(dev);
|
|
fdt_addr_t base_addr;
|
|
fdt_addr_t base_addr;
|
|
|
|
|
|
if (plat)
|
|
if (plat)
|
|
@@ -314,6 +314,10 @@ static int omap_gpio_bind(struct udevice *dev)
|
|
* When every board is converted to driver model and DT is
|
|
* When every board is converted to driver model and DT is
|
|
* supported, this can be done by auto-alloc feature, but
|
|
* supported, this can be done by auto-alloc feature, but
|
|
* not using calloc to alloc memory for platdata.
|
|
* not using calloc to alloc memory for platdata.
|
|
|
|
+ *
|
|
|
|
+ * For example am33xx_gpio uses platform data rather than device tree.
|
|
|
|
+ *
|
|
|
|
+ * NOTE: DO NOT COPY this code if you are using device tree.
|
|
*/
|
|
*/
|
|
plat = calloc(1, sizeof(*plat));
|
|
plat = calloc(1, sizeof(*plat));
|
|
if (!plat)
|
|
if (!plat)
|