]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i2c: nuvoton: remove standard mode only
authorJim Liu <jim.t90615@gmail.com>
Wed, 4 Oct 2023 01:35:58 +0000 (09:35 +0800)
committerHeiko Schocher <hs@denx.de>
Mon, 30 Oct 2023 05:08:40 +0000 (06:08 +0100)
first version is only support standard mode.
remove this judgment to support standard/fast/fast plus  mode.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
Changes for v2:
   - add commit message
Reviewed-by: Heiko Schocher <hs@denx.de>
drivers/i2c/npcm_i2c.c

index ea4ef532565a645abd8f204238e369d0055d4a86..b867b6c8e91b0c7b87ab0b6834b3eef272f5d3ba 100644 (file)
@@ -517,11 +517,6 @@ static int npcm_i2c_init_clk(struct npcm_i2c_bus *bus, u32 bus_freq)
        u32 sclfrq;
        u8 hldt, val;
 
-       if (bus_freq > I2C_FREQ_100K) {
-               printf("Support standard mode only\n");
-               return -EINVAL;
-       }
-
        /* SCLFRQ = T(SCL)/4/T(CLK) = FREQ(CLK)/4/FREQ(SCL) */
        sclfrq = freq / (bus_freq * 4);
        if (sclfrq < SCLFRQ_MIN || sclfrq > SCLFRQ_MAX)