]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i2c: i2c-cdns: No need for dedicated probe function
authorMoritz Fischer <moritz.fischer@ettus.com>
Mon, 16 Jan 2017 17:50:47 +0000 (09:50 -0800)
committerHeiko Schocher <hs@denx.de>
Wed, 18 Jan 2017 05:39:01 +0000 (06:39 +0100)
The generic probe code in dm works, so get rid of the leftover cruft.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: u-boot@lists.denx.de
drivers/i2c/i2c-cdns.c

index 89d429b91e5efefc7ba5148b9c4478b7ea70e0d0..dec18200cea225b9ac28415f5fd277a3c5c06768 100644 (file)
@@ -226,26 +226,6 @@ static int cdns_i2c_set_bus_speed(struct udevice *dev, unsigned int speed)
        return 0;
 }
 
-/* Probe to see if a chip is present. */
-static int cdns_i2c_probe_chip(struct udevice *bus, uint chip_addr,
-                               uint chip_flags)
-{
-       struct i2c_cdns_bus *i2c_bus = dev_get_priv(bus);
-       struct cdns_i2c_regs *regs = i2c_bus->regs;
-
-       /* Attempt to read a byte */
-       setbits_le32(&regs->control, CDNS_I2C_CONTROL_CLR_FIFO |
-               CDNS_I2C_CONTROL_RW);
-       clrbits_le32(&regs->control, CDNS_I2C_CONTROL_HOLD);
-       writel(0xFF, &regs->interrupt_status);
-       writel(chip_addr, &regs->address);
-       writel(1, &regs->transfer_size);
-
-       return (cdns_i2c_wait(regs, CDNS_I2C_INTERRUPT_COMP |
-               CDNS_I2C_INTERRUPT_NACK) &
-               CDNS_I2C_INTERRUPT_COMP) ? 0 : -ETIMEDOUT;
-}
-
 static int cdns_i2c_write_data(struct i2c_cdns_bus *i2c_bus, u32 addr, u8 *data,
                               u32 len)
 {
@@ -453,7 +433,6 @@ static int cdns_i2c_ofdata_to_platdata(struct udevice *dev)
 
 static const struct dm_i2c_ops cdns_i2c_ops = {
        .xfer = cdns_i2c_xfer,
-       .probe_chip = cdns_i2c_probe_chip,
        .set_bus_speed = cdns_i2c_set_bus_speed,
 };