ARM: rmobile: salvator-x: Adjust UART clock
authorMarek Vasut <marek.vasut@gmail.com>
Sat, 13 May 2017 13:57:45 +0000 (15:57 +0200)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Sun, 21 May 2017 19:38:27 +0000 (04:38 +0900)
The UART uses internal SCIF clock except on R8A7795 H3 WS1.0 .
Use the internal clock and ignore the early version of the chip.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
board/renesas/salvator-x/salvator-x.c
include/configs/salvator-x.h
scripts/config_whitelist.txt

index 038d6de..3f2bebf 100644 (file)
@@ -109,8 +109,8 @@ void reset_cpu(ulong addr)
 static const struct sh_serial_platdata serial_platdata = {
        .base = SCIF2_BASE,
        .type = PORT_SCIF,
-       .clk = 14745600,                /* 0xE10000 */
-       .clk_mode = EXT_CLK,
+       .clk = CONFIG_SH_SCIF_CLK_FREQ,
+       .clk_mode = INT_CLK,
 };
 
 U_BOOT_DEVICE(salvator_x_scif2) = {
index 81a7226..94f62a7 100644 (file)
@@ -20,7 +20,7 @@
 #define CONFIG_SCIF_CONSOLE
 #define CONFIG_CONS_SCIF2
 #define CONFIG_CONS_INDEX      2
-#define CONFIG_SH_SCIF_CLK_FREQ        CONFIG_SYS_CLK_FREQ
+#define CONFIG_SH_SCIF_CLK_FREQ        CONFIG_S3D4_CLK_FREQ
 
 /* [A] Hyper Flash */
 /* use to RPC(SPI Multi I/O Bus Controller) */
 #define RCAR_XTAL_CLK          33333333u
 #define CONFIG_SYS_CLK_FREQ    RCAR_XTAL_CLK
 /* ch0to2 CPclk, ch3to11 S3D2_PEREclk, ch12to14 S3D2_RTclk */
-/* CPclk 16.66MHz, S3D2 133.33MHz                          */
+/* CPclk 16.66MHz, S3D2 133.33MHz , S3D4 66.66MHz          */
 #define CONFIG_CP_CLK_FREQ     (CONFIG_SYS_CLK_FREQ / 2)
 #define CONFIG_PLL1_CLK_FREQ   (CONFIG_SYS_CLK_FREQ * 192 / 2)
 #define CONFIG_S3D2_CLK_FREQ   (266666666u/2)
+#define CONFIG_S3D4_CLK_FREQ   (266666666u/4)
 
 /* Generic Timer Definitions (use in assembler source) */
 #define COUNTER_FREQUENCY      0xFE502A        /* 16.66MHz from CPclk */
index fa9c3fc..d1de3f7 100644 (file)
@@ -2371,6 +2371,7 @@ CONFIG_S3C24XX_TACLS
 CONFIG_S3C24XX_TWRPH0
 CONFIG_S3C24XX_TWRPH1
 CONFIG_S3D2_CLK_FREQ
+CONFIG_S3D4_CLK_FREQ
 CONFIG_S5P
 CONFIG_S5PC100
 CONFIG_S5PC110