Commit 846f33e6 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Jason Cooper

clk: mvebu: add a little bit of documentation about data structures

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent 5d836c58
...@@ -22,12 +22,24 @@ ...@@ -22,12 +22,24 @@
#define CORE_CLK_DIV_ENABLE_OFFSET 24 #define CORE_CLK_DIV_ENABLE_OFFSET 24
#define CORE_CLK_DIV_RATIO_OFFSET 0x8 #define CORE_CLK_DIV_RATIO_OFFSET 0x8
/*
* This structure describes the hardware details (bit offset and mask)
* to configure one particular core divider clock. Those hardware
* details may differ from one SoC to another. This structure is
* therefore typically instantiated statically to describe the
* hardware details.
*/
struct clk_corediv_desc { struct clk_corediv_desc {
unsigned int mask; unsigned int mask;
unsigned int offset; unsigned int offset;
unsigned int fieldbit; unsigned int fieldbit;
}; };
/*
* This structure represents one core divider clock for the clock
* framework, and is dynamically allocated for each core divider clock
* existing in the current SoC.
*/
struct clk_corediv { struct clk_corediv {
struct clk_hw hw; struct clk_hw hw;
void __iomem *reg; void __iomem *reg;
...@@ -37,6 +49,11 @@ struct clk_corediv { ...@@ -37,6 +49,11 @@ struct clk_corediv {
static struct clk_onecell_data clk_data; static struct clk_onecell_data clk_data;
/*
* Description of the core divider clocks available. For now, we
* support only NAND, and it is available at the same register
* locations regardless of the SoC.
*/
static const struct clk_corediv_desc mvebu_corediv_desc[] = { static const struct clk_corediv_desc mvebu_corediv_desc[] = {
{ .mask = 0x3f, .offset = 8, .fieldbit = 1 }, /* NAND clock */ { .mask = 0x3f, .offset = 8, .fieldbit = 1 }, /* NAND clock */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment