X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fi2c%2Fdavinci_i2c.c;h=2c77234c60e99fbd454d27f31199d00b551fd47c;hb=286bea2e85a73602624b8dc05dd0dfac8e7e4263;hp=2df07bbe8cd5a605264eed82558b484d05adf5a6;hpb=541f538f4ca50082f77f7f34f05950d57804b1cc;p=u-boot diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c index 2df07bbe8c..2c77234c60 100644 --- a/drivers/i2c/davinci_i2c.c +++ b/drivers/i2c/davinci_i2c.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * TI DaVinci (TMS320DM644x) I2C driver. * @@ -6,8 +7,6 @@ * (C) Copyright 2007 Sergey Kubushyn * -------------------------------------------------------- * - * SPDX-License-Identifier: GPL-2.0+ - * * NOTE: This driver should be converted to driver model before June 2017. * Please see doc/driver-model/i2c-howto.txt for instructions. */ @@ -343,11 +342,11 @@ static int _davinci_i2c_probe_chip(struct i2c_regs *i2c_base, uint8_t chip) static struct i2c_regs *davinci_get_base(struct i2c_adapter *adap) { switch (adap->hwadapnr) { -#if I2C_BUS_MAX >= 3 +#if CONFIG_SYS_I2C_BUS_MAX >= 3 case 2: return (struct i2c_regs *)I2C2_BASE; #endif -#if I2C_BUS_MAX >= 2 +#if CONFIG_SYS_I2C_BUS_MAX >= 2 case 1: return (struct i2c_regs *)I2C1_BASE; #endif @@ -412,7 +411,7 @@ U_BOOT_I2C_ADAP_COMPLETE(davinci_0, davinci_i2c_init, davinci_i2c_probe_chip, CONFIG_SYS_DAVINCI_I2C_SLAVE, 0) -#if I2C_BUS_MAX >= 2 +#if CONFIG_SYS_I2C_BUS_MAX >= 2 U_BOOT_I2C_ADAP_COMPLETE(davinci_1, davinci_i2c_init, davinci_i2c_probe_chip, davinci_i2c_read, davinci_i2c_write, davinci_i2c_setspeed, @@ -421,7 +420,7 @@ U_BOOT_I2C_ADAP_COMPLETE(davinci_1, davinci_i2c_init, davinci_i2c_probe_chip, 1) #endif -#if I2C_BUS_MAX >= 3 +#if CONFIG_SYS_I2C_BUS_MAX >= 3 U_BOOT_I2C_ADAP_COMPLETE(davinci_2, davinci_i2c_init, davinci_i2c_probe_chip, davinci_i2c_read, davinci_i2c_write, davinci_i2c_setspeed,