i2c: omap: Update to use standard enums for speed
authorSimon Glass <sjg@chromium.org>
Thu, 23 Jan 2020 18:48:20 +0000 (11:48 -0700)
committerHeiko Schocher <hs@denx.de>
Mon, 27 Jan 2020 06:23:26 +0000 (07:23 +0100)
Update this driver to use the new standard enums for speed.

Note: This driver needs to move to driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
drivers/i2c/omap24xx_i2c.c
drivers/i2c/omap24xx_i2c.h

index 4b93e02bbe86b755e85e1622a2dcdb1d318fe9da..7e6e3c4f8134c8c0547746d840f7ca4b70ec1121 100644 (file)
@@ -306,7 +306,7 @@ static int __omap24_i2c_setspeed(void __iomem *i2c_base, int ip_rev, uint speed,
        int hsscll = 0, hssclh = 0;
        u32 scll = 0, sclh = 0;
 
-       if (speed >= OMAP_I2C_HIGH_SPEED) {
+       if (speed >= I2C_SPEED_HIGH_RATE) {
                /* High speed */
                psc = I2C_IP_CLK / I2C_INTERNAL_SAMPLING_CLK;
                psc -= 1;
index 3458cf3a7dfaeab5078418108b333d821eb424e7..6904f2d9ad5bcfb370ffedacaee8d73d35637d60 100644 (file)
 #define I2C_SCLH_HSSCLH                8
 #define I2C_SCLH_HSSCLH_M      0xFF
 
-#define OMAP_I2C_STANDARD      100000
-#define OMAP_I2C_FAST_MODE     400000
-#define OMAP_I2C_HIGH_SPEED    3400000
-
 #define SYSTEM_CLOCK_12                12000000
 #define SYSTEM_CLOCK_13                13000000
 #define SYSTEM_CLOCK_192       19200000