]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
clk: socfpga: update clk.h so for Arria10 platform to use
authorDinh Nguyen <dinguyen@opensource.altera.com>
Wed, 20 May 2015 03:22:41 +0000 (22:22 -0500)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 21 May 2015 22:10:38 +0000 (15:10 -0700)
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>
drivers/clk/socfpga/clk-gate.c
drivers/clk/socfpga/clk.h

index 0d5dc84372dcc2e6f294f9973b7103aba43c0533..0add360525a0d9892acd85c0d2be244c0ce19c9f 100644 (file)
 #define SOCFPGA_MMC_CLK                        "sdmmc_clk"
 #define SOCFPGA_GPIO_DB_CLK_OFFSET     0xA8
 
-#define streq(a, b) (strcmp((a), (b)) == 0)
-
 #define to_socfpga_gate_clk(p) container_of(p, struct socfpga_gate_clk, hw.hw)
 
 /* SDMMC Group for System Manager defines */
 #define SYSMGR_SDMMCGRP_CTRL_OFFSET    0x108
-#define SYSMGR_SDMMC_CTRL_SET(smplsel, drvsel) \
-       ((((smplsel) & 0x7) << 3) | (((drvsel) & 0x7) << 0))
 
 static u8 socfpga_clk_get_parent(struct clk_hw *hwclk)
 {
index d291f60c46e1adbbef48733388f1a1f0d40e31c5..b09a5d50547e070b57c741d5467ad641d1c76b10 100644 (file)
 #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);