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 <twoer...@gmail.com>

---

Changes in v2:
- added

 drivers/i2c/lpc32xx_i2c.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c
index 0ae116617c..6abff263bd 100644
--- a/drivers/i2c/lpc32xx_i2c.c
+++ b/drivers/i2c/lpc32xx_i2c.c
@@ -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;
 }
-- 
2.30.0.rc0

Reply via email to