lpc32xx: i2c: fix base address
authorTrevor Woerner <twoerner@gmail.com>
Fri, 11 Jun 2021 02:37:06 +0000 (22:37 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 6 Jul 2021 18:12:15 +0000 (14:12 -0400)
The lpc32xx driver was not obtaining the per-device base address correctly
from the device tree. Fix the FIXME in order to get the correct base address.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
drivers/i2c/lpc32xx_i2c.c

index 0ae1166..6abff26 100644 (file)
@@ -282,11 +282,7 @@ static int lpc32xx_i2c_probe(struct udevice *bus)
 {
        struct lpc32xx_i2c_dev *dev = dev_get_plat(bus);
 
-       /*
-        * FIXME: This is not permitted
-        *      dev_seq(bus) = dev->index;
-        */
-
+       dev->base = dev_read_addr_ptr(bus);
        __i2c_init(dev->base, dev->speed, 0, dev->index);
        return 0;
 }