]> git.baikalelectronics.ru Git - uboot.git/commitdiff
sh: tmu: Clean up CONFIG_SH_TMU_CLK_FREQ
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Fri, 24 Aug 2018 19:34:07 +0000 (21:34 +0200)
committerMarek Vasut <marex@denx.de>
Sat, 15 Sep 2018 01:19:07 +0000 (03:19 +0200)
The R-Car Gen2 feeds the TMU with CONFIG_SYS_CLK_FREQ / 2,
while the old SH parts use CONFIG_SYS_CLK_FREQ directly.
Just put this into the TMU implementation and drop the
CONFIG_SH_TMU_CLK_FREQ config option.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
31 files changed:
arch/sh/lib/time.c
include/configs/MigoR.h
include/configs/alt.h
include/configs/ap325rxa.h
include/configs/ap_sh4a_4a.h
include/configs/armadillo-800eva.h
include/configs/blanche.h
include/configs/ecovec.h
include/configs/espt.h
include/configs/gose.h
include/configs/koelsch.h
include/configs/lager.h
include/configs/mpr2.h
include/configs/ms7720se.h
include/configs/ms7722se.h
include/configs/ms7750se.h
include/configs/porter.h
include/configs/r0p7734.h
include/configs/r2dplus.h
include/configs/r7780mp.h
include/configs/rsk7203.h
include/configs/rsk7264.h
include/configs/rsk7269.h
include/configs/sh7752evb.h
include/configs/sh7753evb.h
include/configs/sh7757lcr.h
include/configs/sh7763rdp.h
include/configs/sh7785lcr.h
include/configs/shmin.h
include/configs/silk.h
include/configs/stout.h

index 0f3127106a82ece72c7b2b647ba9bfa5410f28e9..9a1d3fb013d45360c766c13f1239f2cc1a4d7e98 100644 (file)
@@ -22,7 +22,11 @@ static struct tmu_regs *tmu = (struct tmu_regs *)TMU_BASE;
 
 unsigned long get_tbclk(void)
 {
-       return CONFIG_SH_TMU_CLK_FREQ / 4;
+#ifdef CONFIG_RCAR_GEN2
+       return CONFIG_SYS_CLK_FREQ / 8;
+#else
+       return CONFIG_SYS_CLK_FREQ / 4;
+#endif
 }
 
 unsigned long timer_read_counter(void)
index 57e36e86056c49f5eef6a6e8a77b7cab120b3412..1ff04c3794a942821d8723a89cde54146860ce3b 100644 (file)
@@ -91,7 +91,6 @@
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    33333333
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 #endif /* __MIGO_R_H */
index d884831d9628030510c3b93b82805d0d142346e8..cc6a7bf6387f639938d43feda4e21d320255a74b 100644 (file)
@@ -37,8 +37,6 @@
 /* Board Clock */
 #define RMOBILE_XTAL_CLK       20000000u
 #define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
-#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2)
-
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "fdt_high=0xffffffff\0"         \
index a6e6a436b06398154e17080ff47cb62e14368dc6..40a843a95ecd9e24f05fea0e8293c189969f8f97 100644 (file)
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    33333333
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 #endif /* __AP325RXA_H */
index c8e22de4b8fe10478920c848f0992fe04da3fcdd..b9ff965b92056d0aba0f042df0315e3c2ae3cfd1 100644 (file)
 #else
 #define CONFIG_SYS_CLK_FREQ 44444444
 #endif
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 #endif /* __AP_SH4A_4A_H */
index f14ea9a4b1e7436ca015856a1481f9efd644599e..b17d597766fb7c4317b3b95945d2e6cf798e60fa 100644 (file)
@@ -91,7 +91,6 @@
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    50000000
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 #endif /* __ARMADILLO_800EVA_H */
index 7a5abf99de60972a1b5044da3f7eb3dcfac22f88..e0acde3f9118fe7ece2ffb5c396383e2b70113ca 100644 (file)
@@ -52,7 +52,6 @@
 /* Board Clock */
 #define RMOBILE_XTAL_CLK       20000000u
 #define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
-#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2) /* EXT / 2 */
 
 /* ENV setting */
 #if !defined(CONFIG_MTD_NOR_FLASH)
index 9084d2e4c30759ca29c673f27bd9f92843bc7a73..1e358ec6adb776b8f2743af5b9375ac38f385e06 100644 (file)
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ 41666666
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 #endif /* __ECOVEC_H */
index fe8b84c7a5ebc7f96e12f696577f3fec85302b59..6bb23c6ad44684cb347aee01c6b241801811a663 100644 (file)
@@ -69,7 +69,6 @@
 
 /* Clock */
 #define CONFIG_SYS_CLK_FREQ    66666666
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 /* Ether */
index 53d9322967ea94ce41dcd1c6b4d35d16cd6b52a6..36ac88a20df65e8c50423a04e4c06640a49902a6 100644 (file)
@@ -33,8 +33,6 @@
 /* Board Clock */
 #define RMOBILE_XTAL_CLK       20000000u
 #define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
-#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2)
-
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "fdt_high=0xffffffff\0"         \
index 2479b7c74ac7c099352c86b7cda32665188cfd21..ef26a144a95c0d4a87196e37be520293c7aea1b2 100644 (file)
@@ -33,8 +33,6 @@
 /* Board Clock */
 #define RMOBILE_XTAL_CLK       20000000u
 #define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
-#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2)
-
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "fdt_high=0xffffffff\0"         \
index 4bff60fbe3e9ad21801abf84840bc316f4281191..08498c6d810519f8e76696224e895f2b28903a89 100644 (file)
@@ -34,8 +34,6 @@
 /* Board Clock */
 #define RMOBILE_XTAL_CLK       20000000u
 #define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
-#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2)
-
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "fdt_high=0xffffffff\0"         \
index 762d83c0e5e92d24a8000ae562f84a243bdbc027..901a3028731b154e4e5fb4eb20ad840621f7c8fe 100644 (file)
@@ -49,7 +49,6 @@
 
 /* Clocks */
 #define CONFIG_SYS_CLK_FREQ    24000000
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 /* UART */
index 60cc3efcdce13686ac7671f21b9bfea53e5e0d49..b159c10bbf8e24ca09284b48ce2b78d6b3e3ca2e 100644 (file)
@@ -60,7 +60,6 @@
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    33333333
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 /* PCMCIA */
index 8a5fa97b3d92426dbf001dee67501bcd422c673d..230b86b821fa16e438b1859484529020299d6d30 100644 (file)
@@ -82,7 +82,6 @@
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    33333333
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 #endif /* __MS7722SE_H */
index 4cad1672053a8b037a945f9a1808745af8aadac6..35849069ebdc6cb60dc3609f509f97520651639f 100644 (file)
@@ -62,7 +62,6 @@
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    33333333
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 #endif /* __MS7750SE_H */
index be1b5ff7f034d98d45195cf437a951a35eae9c0e..e56dc3f1ec62f421e4133293b83ac41b2dca6902 100644 (file)
@@ -38,8 +38,6 @@
 /* Board Clock */
 #define RMOBILE_XTAL_CLK       20000000u
 #define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
-#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2)
-
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "fdt_high=0xffffffff\0"         \
index 9c4468ce7028096d038e2069a3faa14ab45125eb..88476850ff1850132787c42f94beb1a18723228f 100644 (file)
@@ -98,7 +98,6 @@
 #else
 #define CONFIG_SYS_CLK_FREQ 44444444
 #endif
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 #endif /* __R0P7734_H */
index 33a4420cd2f69faafceb32ca68e34be3475d05f4..b39b13b7cdc8033e4e44e4708a610091e7ca109c 100644 (file)
@@ -46,7 +46,6 @@
  * SuperH Clock setting
  */
 #define CONFIG_SYS_CLK_FREQ    60000000
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define        CONFIG_SYS_PLL_SETTLING_TIME    100/* in us */
 
index a89e621b866c79ad243d09229d0663f534efbaf6..a819e1bfb3c41ec96042fca7b7063422bf6f5409 100644 (file)
@@ -71,7 +71,6 @@
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    33333333
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 /* PCI Controller */
index a40b7bae2180debb26e240f896369f06d69beea0..ef2b79e2e07bcbb5b7d999ab3d7d5efd480aa3cc 100644 (file)
@@ -58,7 +58,6 @@
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    33333333
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CMT_CLK_DIVIDER        32      /* 8 (default), 32, 128 or 512 */
 #define CONFIG_SH_CMT_CLK_FREQ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER)
index b936b13df11cf6657616df131af3fe796e107af6..54ca87996bd99e40930bb3439b27172e759c80f0 100644 (file)
@@ -47,7 +47,6 @@
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    36000000
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CMT_CLK_DIVIDER                32      /* 8 (default), 32, 128 or 512 */
 #define CONFIG_SH_CMT_CLK_FREQ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER)
index 0c0b773858c30a0543fb7d68f1817061494d1b2f..f8e66e67da3ebc547df9c23828b06e08e25d79f8 100644 (file)
@@ -46,7 +46,6 @@
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    66125000
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CMT_CLK_DIVIDER                32      /* 8 (default), 32, 128 or 512 */
 #define CONFIG_SH_CMT_CLK_FREQ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER)
index 289630a9eeb95ab93a624d015d73a28243e4f0c4..1f29e3d221e8ba04f2817a53cfbe6ba5b84acae7 100644 (file)
@@ -75,6 +75,5 @@
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    48000000
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #endif /* __SH7752EVB_H */
index b58673a2305b731600816322622fda5355cb2513..0693fb5a3c490506c4e9909eb5d8eecdbf64d240 100644 (file)
@@ -75,6 +75,5 @@
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    48000000
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #endif /* __SH7753EVB_H */
index 78606f3f6c2ed7f93984d0e7a000789e02e1a643..05b2f01c15ac2d71468a69e455e1e8fdf3cc2ee5 100644 (file)
@@ -87,6 +87,5 @@
 
 /* Board Clock */
 #define CONFIG_SYS_CLK_FREQ    48000000
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #endif /* __SH7757LCR_H */
index 53fe45009eee77666ae4bf176d9348df547dc3aa..2aefc6960602729ac241ebba429fed695fec1526 100644 (file)
@@ -69,7 +69,6 @@
 
 /* Clock */
 #define CONFIG_SYS_CLK_FREQ    66666666
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 /* Ether */
index 6585298f18b3454e37206b25d9a76d00903e832d..6cb0ef3389e022cd95325318e816ccb270608e6b 100644 (file)
 /* Board Clock */
 /* The SCIF used external clock. system clock only used timer. */
 #define CONFIG_SYS_CLK_FREQ    50000000
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 #endif /* __SH7785LCR_H */
index df98f5566c0abce6195ca0a830911c80edb6df64..5eabdf5bb0e3beaa9018baf049458d592d4c2ae0 100644 (file)
@@ -78,7 +78,6 @@
 #else
 #define CONFIG_SYS_CLK_FREQ 33333333
 #endif /* CONFIG_T_SH7706LSR */
-#define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
 #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
 
 /* Network device */
index ad14c5ccf27ef3e0a6a088aaef3cfa9494d0d403..a94928bd16959a348bdc5f5714b172023d11af13 100644 (file)
@@ -38,8 +38,6 @@
 /* Board Clock */
 #define RMOBILE_XTAL_CLK       20000000u
 #define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
-#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2)
-
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "fdt_high=0xffffffff\0"         \
index cc1cc84fc0a72024a2f076faca0850d0766d0a63..b72b565c33df5ae6fee2ac713622721fa288d523 100644 (file)
@@ -42,8 +42,6 @@
 /* Board Clock */
 #define RMOBILE_XTAL_CLK       20000000u
 #define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
-#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2)
-
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "fdt_high=0xffffffff\0"         \