]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
clk: sandbox: Move priv/plat data to a header file
authorSimon Glass <sjg@chromium.org>
Mon, 15 Mar 2021 04:25:22 +0000 (17:25 +1300)
committerSimon Glass <sjg@chromium.org>
Fri, 26 Mar 2021 04:03:08 +0000 (17:03 +1300)
At present the structs used by this driver are not accessible outside it,
so cannot be used with OF_PLATDATA_INST. Move them to a header file to
fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/include/asm/clk.h
drivers/clk/clk_sandbox.c
drivers/clk/clk_sandbox_test.c

index 68a8687f578e84a18e52d38c8818bba5560bf4f6..6972b9e743add0f2f3e2c1b7e1459b9344016b13 100644 (file)
@@ -7,6 +7,9 @@
 #define __SANDBOX_CLK_H
 
 #include <common.h>
+#include <clk.h>
+#include <dt-structs.h>
+#include <linux/clk-provider.h>
 
 struct udevice;
 
@@ -45,6 +48,19 @@ enum sandbox_clk_test_id {
 
 #define SANDBOX_CLK_TEST_NON_DEVM_COUNT SANDBOX_CLK_TEST_ID_DEVM1
 
+struct sandbox_clk_priv {
+       bool probed;
+       ulong rate[SANDBOX_CLK_ID_COUNT];
+       bool enabled[SANDBOX_CLK_ID_COUNT];
+       bool requested[SANDBOX_CLK_ID_COUNT];
+};
+
+struct sandbox_clk_test {
+       struct clk clks[SANDBOX_CLK_TEST_NON_DEVM_COUNT];
+       struct clk *clkps[SANDBOX_CLK_TEST_ID_COUNT];
+       struct clk_bulk bulk;
+};
+
 /**
  * sandbox_clk_query_rate - Query the current rate of a sandbox clock.
  *
index b28b67b44860020c287182d9afb50ceb37132993..e1313f6d880dbfdf14cf18907d58d7f09faad420 100644 (file)
 #include <malloc.h>
 #include <asm/clk.h>
 
-struct sandbox_clk_priv {
-       bool probed;
-       ulong rate[SANDBOX_CLK_ID_COUNT];
-       bool enabled[SANDBOX_CLK_ID_COUNT];
-       bool requested[SANDBOX_CLK_ID_COUNT];
-};
-
 static ulong sandbox_clk_get_rate(struct clk *clk)
 {
        struct sandbox_clk_priv *priv = dev_get_priv(clk->dev);
index c4e448150846d3205eab04d0a3e52e2dbb20c4e8..f665fd3cc4502ffc66da38c30a74dfb8f00ae8b4 100644 (file)
 #include <dm/device_compat.h>
 #include <linux/err.h>
 
-struct sandbox_clk_test {
-       struct clk clks[SANDBOX_CLK_TEST_NON_DEVM_COUNT];
-       struct clk *clkps[SANDBOX_CLK_TEST_ID_COUNT];
-       struct clk_bulk bulk;
-};
-
 static const char * const sandbox_clk_test_names[] = {
        [SANDBOX_CLK_TEST_ID_FIXED] = "fixed",
        [SANDBOX_CLK_TEST_ID_SPI] = "spi",