diff options
author | Dinh Nguyen <dinguyen@opensource.altera.com> | 2015-05-19 22:22:41 -0500 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-05-21 15:10:38 -0700 |
commit | 5611a5ba8e5435740df99235b262b553f687b13b (patch) | |
tree | a89f45daaed9443cfa48176f9319baeae2cb9e0d /drivers/clk/socfpga/clk.h | |
parent | 004cbb475fb0164665d66c68e509a4af64f7f5f1 (diff) |
clk: socfpga: update clk.h so for Arria10 platform to use
There are 5 possible parent clocks for the SoCFPGA Arria10. Move the define
SYSMGR_SDMMC_CTRL_SET and streq() to clk.h so that the Arria clock driver
can use.
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/socfpga/clk.h')
-rw-r--r-- | drivers/clk/socfpga/clk.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/clk/socfpga/clk.h b/drivers/clk/socfpga/clk.h index d291f60c46e1..b09a5d50547e 100644 --- a/drivers/clk/socfpga/clk.h +++ b/drivers/clk/socfpga/clk.h @@ -26,9 +26,13 @@ #define CLKMGR_L4SRC 0x70 #define CLKMGR_PERPLL_SRC 0xAC -#define SOCFPGA_MAX_PARENTS 3 +#define SOCFPGA_MAX_PARENTS 5 #define div_mask(width) ((1 << (width)) - 1) +#define streq(a, b) (strcmp((a), (b)) == 0) +#define SYSMGR_SDMMC_CTRL_SET(smplsel, drvsel) \ + ((((smplsel) & 0x7) << 3) | (((drvsel) & 0x7) << 0)) + extern void __iomem *clk_mgr_base_addr; void __init socfpga_pll_init(struct device_node *node); |