diff options
author | Mario Six <mario.six@gdsys.cc> | 2019-01-21 11:17:52 +0300 |
---|---|---|
committer | Mario Six <mario.six@gdsys.cc> | 2019-05-21 08:51:40 +0300 |
commit | 0f06f57c280eaec528c76ebfca9b22aa181ca8be (patch) | |
tree | 92e03d89d58889670fd21d23e67c27267555646f /include/configs/MPC8315ERDB.h | |
parent | 1cbc10c8158d22d65bb5ccc7550186036bb9f17a (diff) | |
download | u-boot-0f06f57c280eaec528c76ebfca9b22aa181ca8be.tar.xz |
mpc83xx: Replace CONFIG_83XX_CLKIN in calculations
CONFIG_SYS_CLK_FREQ is the standard way to set the system clock
frequency. On MPC83xx, CONFIG_83XX_CLKIN is used for this purpose.
Hence, the obvious way is to replace CONFIG_83XX_CLKIN with
CONFIG_SYS_CLK_FREQ.
A few MPC83xx boards use the CONFIG_83XX_CLKIN variable for computing
CONFIG_SYS_NS16550_CLK. This makes it harder to replace
CONFIG_83XX_CLKIN.
But the value of the multiplicator can be read from the SPMR register.
Hence, replace the static calculations with a call to a new get_bus_freq
function, as other architectures do.
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Diffstat (limited to 'include/configs/MPC8315ERDB.h')
-rw-r--r-- | include/configs/MPC8315ERDB.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/configs/MPC8315ERDB.h b/include/configs/MPC8315ERDB.h index c373a0ab4c..adb2bb6c2d 100644 --- a/include/configs/MPC8315ERDB.h +++ b/include/configs/MPC8315ERDB.h @@ -271,7 +271,7 @@ */ #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE 1 -#define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 2) +#define CONFIG_SYS_NS16550_CLK (get_bus_freq(0)) #define CONFIG_SYS_BAUDRATE_TABLE \ {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} |