summaryrefslogtreecommitdiff
path: root/drivers/i2c/lpc32xx_i2c.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-07-06 18:10:10 -0400
committerTom Rini <trini@konsulko.com>2021-07-06 18:10:10 -0400
commit5617efd2c882562b716a61bc0dc0edda46b045df (patch)
treeea55ae3b5f8b5ed7cc2b51e07c03c13cf8058147 /drivers/i2c/lpc32xx_i2c.c
parentb5f9d2f3aae7b208273546965be4ea5497930882 (diff)
parent725cf89512eba9a49d447f009e0b97fdf2ae5dd6 (diff)
Merge branch '2021-07-06-platform-updates'
- mpc8379erdb DM_USB, DM_PCI and DM_ETH support. - Drop PCI support from the integrator family of boards - Add synquacer support - Assorted lpc32xx updates and improvements - snapdragon (and related) fixes, Broadcom iproc update
Diffstat (limited to 'drivers/i2c/lpc32xx_i2c.c')
-rw-r--r--drivers/i2c/lpc32xx_i2c.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c
index f89f7955e4c..774129ad8ea 100644
--- a/drivers/i2c/lpc32xx_i2c.c
+++ b/drivers/i2c/lpc32xx_i2c.c
@@ -38,7 +38,6 @@
/* Status register values */
#define LPC32XX_I2C_STAT_TFF 0x00000400
#define LPC32XX_I2C_STAT_RFE 0x00000200
-#define LPC32XX_I2C_STAT_DRMI 0x00000008
#define LPC32XX_I2C_STAT_NAI 0x00000004
#define LPC32XX_I2C_STAT_TDI 0x00000001
@@ -283,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;
}
@@ -353,9 +348,15 @@ static const struct dm_i2c_ops lpc32xx_i2c_ops = {
.set_bus_speed = lpc32xx_i2c_set_bus_speed,
};
+static const struct udevice_id lpc32xx_i2c_ids[] = {
+ { .compatible = "nxp,pnx-i2c" },
+ { }
+};
+
U_BOOT_DRIVER(i2c_lpc32xx) = {
- .id = UCLASS_I2C,
.name = "i2c_lpc32xx",
+ .id = UCLASS_I2C,
+ .of_match = lpc32xx_i2c_ids,
.probe = lpc32xx_i2c_probe,
.ops = &lpc32xx_i2c_ops,
};