summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLukasz Majewski <lukma@denx.de>2019-06-24 15:50:48 +0200
committerStefano Babic <sbabic@denx.de>2019-07-19 14:50:30 +0200
commit6bb15d6f07a8348cca07f2f245f3025cb79e7680 (patch)
tree9354db4ddf38f1a73767d24d83cd8a7cacbf0bad /include/linux
parent4ab8e783f33d80a3875e990f3069f21018379b36 (diff)
clk: sandbox: Adjust clk-divider to emulate reading its value from HW
The generic divider clock code for CCF requires reading the divider value from HW registers. As sandbox by design has readl() as no-op it was necessary to provide this value in the other way. The new field in the divider structure (accessible only when sandbox is run) has been introduced for this purpose. Signed-off-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/clk-provider.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index e06487f07b..53c9c41b90 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -75,6 +75,9 @@ struct clk_divider {
u8 width;
u8 flags;
const struct clk_div_table *table;
+#if CONFIG_IS_ENABLED(SANDBOX_CLK_CCF)
+ u32 io_divider_val;
+#endif
};
#define clk_div_mask(width) ((1 << (width)) - 1)