mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 23:20:26 +09:00
clk: sandbox: Move priv/plat data to a header file
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>
This commit is contained in:
parent
e8c023c3f9
commit
cc7ffd3adc
@ -7,6 +7,9 @@
|
|||||||
#define __SANDBOX_CLK_H
|
#define __SANDBOX_CLK_H
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <clk.h>
|
||||||
|
#include <dt-structs.h>
|
||||||
|
#include <linux/clk-provider.h>
|
||||||
|
|
||||||
struct udevice;
|
struct udevice;
|
||||||
|
|
||||||
@ -45,6 +48,19 @@ enum sandbox_clk_test_id {
|
|||||||
|
|
||||||
#define SANDBOX_CLK_TEST_NON_DEVM_COUNT SANDBOX_CLK_TEST_ID_DEVM1
|
#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.
|
* sandbox_clk_query_rate - Query the current rate of a sandbox clock.
|
||||||
*
|
*
|
||||||
|
@ -10,13 +10,6 @@
|
|||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <asm/clk.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)
|
static ulong sandbox_clk_get_rate(struct clk *clk)
|
||||||
{
|
{
|
||||||
struct sandbox_clk_priv *priv = dev_get_priv(clk->dev);
|
struct sandbox_clk_priv *priv = dev_get_priv(clk->dev);
|
||||||
|
@ -11,12 +11,6 @@
|
|||||||
#include <dm/device_compat.h>
|
#include <dm/device_compat.h>
|
||||||
#include <linux/err.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[] = {
|
static const char * const sandbox_clk_test_names[] = {
|
||||||
[SANDBOX_CLK_TEST_ID_FIXED] = "fixed",
|
[SANDBOX_CLK_TEST_ID_FIXED] = "fixed",
|
||||||
[SANDBOX_CLK_TEST_ID_SPI] = "spi",
|
[SANDBOX_CLK_TEST_ID_SPI] = "spi",
|
||||||
|
Loading…
Reference in New Issue
Block a user