am335x: Drop non-DM_I2C code
authorTom Rini <trini@konsulko.com>
Thu, 19 Aug 2021 03:12:27 +0000 (23:12 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 30 Aug 2021 18:10:07 +0000 (14:10 -0400)
On this platform, we have DM_I2C and SPL_DM_I2C always enabled.  Remove
legacy options.

Signed-off-by: Tom Rini <trini@konsulko.com>
board/ti/am335x/board.c
board/ti/am335x/mux.c

index 2e4f3d102b7d91a1ef158c7961d5a7b70ce9127c..0e209a5a72d923bfa9bf840c1ef2121ad023b654 100644 (file)
@@ -79,10 +79,6 @@ void do_board_detect(void)
 {
        enable_i2c0_pin_mux();
        enable_i2c2_pin_mux();
-#if !CONFIG_IS_ENABLED(DM_I2C)
-       i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
-       i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED2, CONFIG_SYS_OMAP24_I2C_SLAVE2);
-#endif
        if (ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
                                 CONFIG_EEPROM_CHIP_ADDRESS))
                printf("ti_i2c_eeprom_init failed\n");
@@ -339,13 +335,8 @@ static void scale_vcores_bone(int freq)
        if (board_is_bone() && !strncmp(board_ti_get_rev(), "00A1", 4))
                return;
 
-#if !CONFIG_IS_ENABLED(DM_I2C)
-       if (i2c_probe(TPS65217_CHIP_PM))
-               return;
-#else
        if (power_tps65217_init(0))
                return;
-#endif
 
 
        /*
@@ -438,13 +429,8 @@ void scale_vcores_generic(int freq)
         * 1.10V.  For MPU voltage we need to switch based on
         * the frequency we are running at.
         */
-#if !CONFIG_IS_ENABLED(DM_I2C)
-       if (i2c_probe(TPS65910_CTRL_I2C_ADDR))
-               return;
-#else
        if (power_tps65910_init(0))
                return;
-#endif
        /*
         * Depending on MPU clock and PG we will need a different
         * VDD to drive at that speed.
@@ -472,10 +458,6 @@ void gpi2c_init(void)
 
        if (first_time) {
                enable_i2c0_pin_mux();
-#if !CONFIG_IS_ENABLED(DM_I2C)
-               i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED,
-                        CONFIG_SYS_OMAP24_I2C_SLAVE);
-#endif
                first_time = false;
        }
 }
index e450ff64d87b568ef94eea584b9cccf8270d3e5c..fed737fa099acd79a0d37e6b32fb2f421d2a83af 100644 (file)
@@ -345,14 +345,6 @@ void enable_i2c2_pin_mux(void)
 static unsigned short detect_daughter_board_profile(void)
 {
        unsigned short val;
-
-#if !CONFIG_IS_ENABLED(DM_I2C)
-       if (i2c_probe(I2C_CPLD_ADDR))
-               return PROFILE_NONE;
-
-       if (i2c_read(I2C_CPLD_ADDR, CFG_REG, 1, (unsigned char *)(&val), 2))
-               return PROFILE_NONE;
-#else
        struct udevice *dev = NULL;
        int rc;
 
@@ -362,7 +354,6 @@ static unsigned short detect_daughter_board_profile(void)
        rc = dm_i2c_read(dev, CFG_REG, (unsigned char *)(&val), 2);
        if (rc)
                return PROFILE_NONE;
-#endif
        return (1 << (val & PROFILE_MASK));
 }