diff --git a/arch/sh/lib/time.c b/arch/sh/lib/time.c index 0f3127106a8..9a1d3fb013d 100644 --- a/arch/sh/lib/time.c +++ b/arch/sh/lib/time.c @@ -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) diff --git a/include/configs/MigoR.h b/include/configs/MigoR.h index 57e36e86056..1ff04c3794a 100644 --- a/include/configs/MigoR.h +++ b/include/configs/MigoR.h @@ -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 */ diff --git a/include/configs/alt.h b/include/configs/alt.h index d884831d962..cc6a7bf6387 100644 --- a/include/configs/alt.h +++ b/include/configs/alt.h @@ -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" \ diff --git a/include/configs/ap325rxa.h b/include/configs/ap325rxa.h index a6e6a436b06..40a843a95ec 100644 --- a/include/configs/ap325rxa.h +++ b/include/configs/ap325rxa.h @@ -112,7 +112,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 /* __AP325RXA_H */ diff --git a/include/configs/ap_sh4a_4a.h b/include/configs/ap_sh4a_4a.h index c8e22de4b8f..b9ff965b920 100644 --- a/include/configs/ap_sh4a_4a.h +++ b/include/configs/ap_sh4a_4a.h @@ -100,7 +100,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 /* __AP_SH4A_4A_H */ diff --git a/include/configs/armadillo-800eva.h b/include/configs/armadillo-800eva.h index f14ea9a4b1e..b17d597766f 100644 --- a/include/configs/armadillo-800eva.h +++ b/include/configs/armadillo-800eva.h @@ -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 */ diff --git a/include/configs/blanche.h b/include/configs/blanche.h index 7a5abf99de6..e0acde3f911 100644 --- a/include/configs/blanche.h +++ b/include/configs/blanche.h @@ -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) diff --git a/include/configs/ecovec.h b/include/configs/ecovec.h index 9084d2e4c30..1e358ec6adb 100644 --- a/include/configs/ecovec.h +++ b/include/configs/ecovec.h @@ -131,7 +131,6 @@ /* 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 */ diff --git a/include/configs/espt.h b/include/configs/espt.h index fe8b84c7a5e..6bb23c6ad44 100644 --- a/include/configs/espt.h +++ b/include/configs/espt.h @@ -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 */ diff --git a/include/configs/gose.h b/include/configs/gose.h index 53d9322967e..36ac88a20df 100644 --- a/include/configs/gose.h +++ b/include/configs/gose.h @@ -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" \ diff --git a/include/configs/koelsch.h b/include/configs/koelsch.h index 2479b7c74ac..ef26a144a95 100644 --- a/include/configs/koelsch.h +++ b/include/configs/koelsch.h @@ -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" \ diff --git a/include/configs/lager.h b/include/configs/lager.h index 4bff60fbe3e..08498c6d810 100644 --- a/include/configs/lager.h +++ b/include/configs/lager.h @@ -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" \ diff --git a/include/configs/mpr2.h b/include/configs/mpr2.h index 762d83c0e5e..901a3028731 100644 --- a/include/configs/mpr2.h +++ b/include/configs/mpr2.h @@ -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 */ diff --git a/include/configs/ms7720se.h b/include/configs/ms7720se.h index 60cc3efcdce..b159c10bbf8 100644 --- a/include/configs/ms7720se.h +++ b/include/configs/ms7720se.h @@ -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 */ diff --git a/include/configs/ms7722se.h b/include/configs/ms7722se.h index 8a5fa97b3d9..230b86b821f 100644 --- a/include/configs/ms7722se.h +++ b/include/configs/ms7722se.h @@ -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 */ diff --git a/include/configs/ms7750se.h b/include/configs/ms7750se.h index 4cad1672053..35849069ebd 100644 --- a/include/configs/ms7750se.h +++ b/include/configs/ms7750se.h @@ -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 */ diff --git a/include/configs/porter.h b/include/configs/porter.h index be1b5ff7f03..e56dc3f1ec6 100644 --- a/include/configs/porter.h +++ b/include/configs/porter.h @@ -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" \ diff --git a/include/configs/r0p7734.h b/include/configs/r0p7734.h index 9c4468ce702..88476850ff1 100644 --- a/include/configs/r0p7734.h +++ b/include/configs/r0p7734.h @@ -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 */ diff --git a/include/configs/r2dplus.h b/include/configs/r2dplus.h index 33a4420cd2f..b39b13b7cdc 100644 --- a/include/configs/r2dplus.h +++ b/include/configs/r2dplus.h @@ -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 */ diff --git a/include/configs/r7780mp.h b/include/configs/r7780mp.h index a89e621b866..a819e1bfb3c 100644 --- a/include/configs/r7780mp.h +++ b/include/configs/r7780mp.h @@ -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 */ diff --git a/include/configs/rsk7203.h b/include/configs/rsk7203.h index a40b7bae218..ef2b79e2e07 100644 --- a/include/configs/rsk7203.h +++ b/include/configs/rsk7203.h @@ -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) diff --git a/include/configs/rsk7264.h b/include/configs/rsk7264.h index b936b13df11..54ca87996bd 100644 --- a/include/configs/rsk7264.h +++ b/include/configs/rsk7264.h @@ -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) diff --git a/include/configs/rsk7269.h b/include/configs/rsk7269.h index 0c0b773858c..f8e66e67da3 100644 --- a/include/configs/rsk7269.h +++ b/include/configs/rsk7269.h @@ -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) diff --git a/include/configs/sh7752evb.h b/include/configs/sh7752evb.h index 289630a9eeb..1f29e3d221e 100644 --- a/include/configs/sh7752evb.h +++ b/include/configs/sh7752evb.h @@ -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 */ diff --git a/include/configs/sh7753evb.h b/include/configs/sh7753evb.h index b58673a2305..0693fb5a3c4 100644 --- a/include/configs/sh7753evb.h +++ b/include/configs/sh7753evb.h @@ -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 */ diff --git a/include/configs/sh7757lcr.h b/include/configs/sh7757lcr.h index 78606f3f6c2..05b2f01c15a 100644 --- a/include/configs/sh7757lcr.h +++ b/include/configs/sh7757lcr.h @@ -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 */ diff --git a/include/configs/sh7763rdp.h b/include/configs/sh7763rdp.h index 53fe45009ee..2aefc696060 100644 --- a/include/configs/sh7763rdp.h +++ b/include/configs/sh7763rdp.h @@ -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 */ diff --git a/include/configs/sh7785lcr.h b/include/configs/sh7785lcr.h index 6585298f18b..6cb0ef3389e 100644 --- a/include/configs/sh7785lcr.h +++ b/include/configs/sh7785lcr.h @@ -126,7 +126,6 @@ /* 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 */ diff --git a/include/configs/shmin.h b/include/configs/shmin.h index df98f5566c0..5eabdf5bb0e 100644 --- a/include/configs/shmin.h +++ b/include/configs/shmin.h @@ -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 */ diff --git a/include/configs/silk.h b/include/configs/silk.h index ad14c5ccf27..a94928bd169 100644 --- a/include/configs/silk.h +++ b/include/configs/silk.h @@ -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" \ diff --git a/include/configs/stout.h b/include/configs/stout.h index cc1cc84fc0a..b72b565c33d 100644 --- a/include/configs/stout.h +++ b/include/configs/stout.h @@ -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" \