diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2023-11-05 16:39:54 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2023-11-05 16:39:54 +0000 |
commit | 6a3c510a4e864da781a5aac3b01d68c3368b9e3a (patch) | |
tree | 745aea8f3256a55dc3d51e28f6476120c2acb82b | |
parent | 9b68b426103ca0564d522d9918082125836a9f23 (diff) |
i2cbcm: use core clock rate from vcore instead of hardcoding 250Mhz
-rw-r--r-- | sys/src/9/bcm/i2cbcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/bcm/i2cbcm.c b/sys/src/9/bcm/i2cbcm.c index 088ebd482..0d2493c44 100644 --- a/sys/src/9/bcm/i2cbcm.c +++ b/sys/src/9/bcm/i2cbcm.c @@ -110,7 +110,7 @@ static int i2cinit(I2Cbus*) { ctlr.regs = (Bsc*)I2CREGS; - ctlr.regs->clkdiv = 2500; + ctlr.regs->clkdiv = getclkrate(ClkCore) / 100000; gpiosel(SDA0Pin, Alt0); gpiosel(SCL0Pin, Alt0); |