From 445f058be6771ee42c7cca6b7289b946e5b780b2 Mon Sep 17 00:00:00 2001 From: Konrad Dybcio Date: Wed, 4 Jan 2023 01:59:30 +0100 Subject: [PATCH] sm6375: Hook up MCCC Hook MCCC up on SM6375 where it was validated and intentionally overreserve the MCCC memory, as mmap expects we reserve at least one ALIGNED page (which means we're aligned to 4K (0x1000) or whatever our pagesize is AND that we have to reserve too much and stray from user error when adding offsets to not try and read memory outside the actual MCCC region). Signed-off-by: Konrad Dybcio --- sm6375.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sm6375.c b/sm6375.c index c320fd3..ad4943d 100644 --- a/sm6375.c +++ b/sm6375.c @@ -81,6 +81,15 @@ static struct debug_mux gpu_cc = { .div_val = 2, }; +static struct debug_mux mc_cc = { + /* It's really <0x447d200 0x100>, but we need to reserve a whole 4096-long page.. */ + .phys = 0x447d000, + .size = 0x1000, + .block_name = "mc", + + .measure = measure_mccc, +}; + static struct measure_clk sm6375_clocks[] = { { "l3_clk", &gcc, 0xbf, &cpu_cc, 0x41 }, { "perfcl_clk", &gcc, 0xbf, &cpu_cc, 0x25 }, @@ -237,6 +246,7 @@ static struct measure_clk sm6375_clocks[] = { { "gpu_cc_gx_gmu_clk", &gcc, 0xfb, &gpu_cc, 0x10 }, { "gpu_cc_sleep_clk", &gcc, 0xfb, &gpu_cc, 0x17 }, + { "mccc_clk", &gcc, 0xae, &mc_cc, 0x220 }, {} };