Skip to content

Commit baf7b79

Browse files
mszyprowbebarino
authored andcommitted
clk: samsung: exynos542x: Move MSCL subsystem clocks to its sub-CMU
M2M scaler clocks require special handling of their parent bus clock during power domain on/off sequences. MSCL clocks were not initially added to the sub-CMU handler, because that time there was no driver for the M2M scaler device and it was not possible to test it. This patch fixes this issue. Parent clock for M2M scaler devices is now properly preserved during MSC power domain on/off sequence. This gives M2M scaler devices proper performance: fullHD XRGB32 image 1000 rotations test takes 3.17s instead of 45.08s. Fixes: b06a532 ("clk: samsung: Add Exynos5 sub-CMU clock driver") Signed-off-by: Marek Szyprowski <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Acked-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent b6adeb6 commit baf7b79

File tree

1 file changed

+34
-14
lines changed

1 file changed

+34
-14
lines changed

drivers/clk/samsung/clk-exynos5420.c

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -893,9 +893,6 @@ static const struct samsung_div_clock exynos5x_div_clks[] __initconst = {
893893
/* GSCL Block */
894894
DIV(0, "dout_gscl_blk_333", "aclk333_432_gscl", DIV2_RATIO0, 6, 2),
895895

896-
/* MSCL Block */
897-
DIV(0, "dout_mscl_blk", "aclk400_mscl", DIV2_RATIO0, 28, 2),
898-
899896
/* PSGEN */
900897
DIV(0, "dout_gen_blk", "mout_user_aclk266", DIV2_RATIO0, 8, 1),
901898
DIV(0, "dout_jpg_blk", "aclk166", DIV2_RATIO0, 20, 1),
@@ -1159,17 +1156,6 @@ static const struct samsung_gate_clock exynos5x_gate_clks[] __initconst = {
11591156
GATE(CLK_FIMC_LITE3, "fimc_lite3", "aclk333_432_gscl",
11601157
GATE_IP_GSCL1, 17, 0, 0),
11611158

1162-
/* MSCL Block */
1163-
GATE(CLK_MSCL0, "mscl0", "aclk400_mscl", GATE_IP_MSCL, 0, 0, 0),
1164-
GATE(CLK_MSCL1, "mscl1", "aclk400_mscl", GATE_IP_MSCL, 1, 0, 0),
1165-
GATE(CLK_MSCL2, "mscl2", "aclk400_mscl", GATE_IP_MSCL, 2, 0, 0),
1166-
GATE(CLK_SMMU_MSCL0, "smmu_mscl0", "dout_mscl_blk",
1167-
GATE_IP_MSCL, 8, 0, 0),
1168-
GATE(CLK_SMMU_MSCL1, "smmu_mscl1", "dout_mscl_blk",
1169-
GATE_IP_MSCL, 9, 0, 0),
1170-
GATE(CLK_SMMU_MSCL2, "smmu_mscl2", "dout_mscl_blk",
1171-
GATE_IP_MSCL, 10, 0, 0),
1172-
11731159
/* ISP */
11741160
GATE(CLK_SCLK_UART_ISP, "sclk_uart_isp", "dout_uart_isp",
11751161
GATE_TOP_SCLK_ISP, 0, CLK_SET_RATE_PARENT, 0),
@@ -1278,6 +1264,28 @@ static struct exynos5_subcmu_reg_dump exynos5x_mfc_suspend_regs[] = {
12781264
{ DIV4_RATIO, 0, 0x3 }, /* DIV dout_mfc_blk */
12791265
};
12801266

1267+
static const struct samsung_gate_clock exynos5x_mscl_gate_clks[] __initconst = {
1268+
/* MSCL Block */
1269+
GATE(CLK_MSCL0, "mscl0", "aclk400_mscl", GATE_IP_MSCL, 0, 0, 0),
1270+
GATE(CLK_MSCL1, "mscl1", "aclk400_mscl", GATE_IP_MSCL, 1, 0, 0),
1271+
GATE(CLK_MSCL2, "mscl2", "aclk400_mscl", GATE_IP_MSCL, 2, 0, 0),
1272+
GATE(CLK_SMMU_MSCL0, "smmu_mscl0", "dout_mscl_blk",
1273+
GATE_IP_MSCL, 8, 0, 0),
1274+
GATE(CLK_SMMU_MSCL1, "smmu_mscl1", "dout_mscl_blk",
1275+
GATE_IP_MSCL, 9, 0, 0),
1276+
GATE(CLK_SMMU_MSCL2, "smmu_mscl2", "dout_mscl_blk",
1277+
GATE_IP_MSCL, 10, 0, 0),
1278+
};
1279+
1280+
static const struct samsung_div_clock exynos5x_mscl_div_clks[] __initconst = {
1281+
DIV(0, "dout_mscl_blk", "aclk400_mscl", DIV2_RATIO0, 28, 2),
1282+
};
1283+
1284+
static struct exynos5_subcmu_reg_dump exynos5x_mscl_suspend_regs[] = {
1285+
{ GATE_IP_MSCL, 0xffffffff, 0xffffffff }, /* MSCL gates */
1286+
{ SRC_TOP3, 0, BIT(4) }, /* MUX mout_user_aclk400_mscl */
1287+
{ DIV2_RATIO0, 0, 0x30000000 }, /* DIV dout_mscl_blk */
1288+
};
12811289

12821290
static const struct samsung_gate_clock exynos5800_mau_gate_clks[] __initconst = {
12831291
GATE(CLK_MAU_EPLL, "mau_epll", "mout_user_mau_epll",
@@ -1322,6 +1330,16 @@ static const struct exynos5_subcmu_info exynos5x_mfc_subcmu = {
13221330
.pd_name = "MFC",
13231331
};
13241332

1333+
static const struct exynos5_subcmu_info exynos5x_mscl_subcmu = {
1334+
.div_clks = exynos5x_mscl_div_clks,
1335+
.nr_div_clks = ARRAY_SIZE(exynos5x_mscl_div_clks),
1336+
.gate_clks = exynos5x_mscl_gate_clks,
1337+
.nr_gate_clks = ARRAY_SIZE(exynos5x_mscl_gate_clks),
1338+
.suspend_regs = exynos5x_mscl_suspend_regs,
1339+
.nr_suspend_regs = ARRAY_SIZE(exynos5x_mscl_suspend_regs),
1340+
.pd_name = "MSC",
1341+
};
1342+
13251343
static const struct exynos5_subcmu_info exynos5800_mau_subcmu = {
13261344
.gate_clks = exynos5800_mau_gate_clks,
13271345
.nr_gate_clks = ARRAY_SIZE(exynos5800_mau_gate_clks),
@@ -1334,12 +1352,14 @@ static const struct exynos5_subcmu_info *exynos5x_subcmus[] = {
13341352
&exynos5x_disp_subcmu,
13351353
&exynos5x_gsc_subcmu,
13361354
&exynos5x_mfc_subcmu,
1355+
&exynos5x_mscl_subcmu,
13371356
};
13381357

13391358
static const struct exynos5_subcmu_info *exynos5800_subcmus[] = {
13401359
&exynos5x_disp_subcmu,
13411360
&exynos5x_gsc_subcmu,
13421361
&exynos5x_mfc_subcmu,
1362+
&exynos5x_mscl_subcmu,
13431363
&exynos5800_mau_subcmu,
13441364
};
13451365

0 commit comments

Comments
 (0)