diff options
author | Dinh Nguyen <dinguyen@altera.com> | 2013-04-11 11:55:26 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-04-14 23:18:13 -0400 |
commit | 56c5c13f7080f9299a92b3fb6a1bf22689d607cc (patch) | |
tree | 2d2c1570166abefb89e0c6a85810308790e4e4a8 /arch/arm/mach-socfpga | |
parent | 042000b00344dbf25db2919c97cbd09be99ecf93 (diff) |
ARM: socfpga: Upgrade clk driver for socfpga to make use of dts clock entries
With this patch, the socfpga clk driver is able to query the clock and clock
rates appropriately.
Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Reviewed-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-socfpga')
-rw-r--r-- | arch/arm/mach-socfpga/socfpga.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c index 2cae16c1f265..46a051359f02 100644 --- a/arch/arm/mach-socfpga/socfpga.c +++ b/arch/arm/mach-socfpga/socfpga.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | #include <linux/dw_apb_timer.h> | 17 | #include <linux/dw_apb_timer.h> |
18 | #include <linux/clk-provider.h> | ||
18 | #include <linux/irqchip.h> | 19 | #include <linux/irqchip.h> |
19 | #include <linux/of_address.h> | 20 | #include <linux/of_address.h> |
20 | #include <linux/of_irq.h> | 21 | #include <linux/of_irq.h> |
@@ -29,6 +30,7 @@ | |||
29 | void __iomem *socfpga_scu_base_addr = ((void __iomem *)(SOCFPGA_SCU_VIRT_BASE)); | 30 | void __iomem *socfpga_scu_base_addr = ((void __iomem *)(SOCFPGA_SCU_VIRT_BASE)); |
30 | void __iomem *sys_manager_base_addr; | 31 | void __iomem *sys_manager_base_addr; |
31 | void __iomem *rst_manager_base_addr; | 32 | void __iomem *rst_manager_base_addr; |
33 | void __iomem *clk_mgr_base_addr; | ||
32 | unsigned long cpu1start_addr; | 34 | unsigned long cpu1start_addr; |
33 | 35 | ||
34 | static struct map_desc scu_io_desc __initdata = { | 36 | static struct map_desc scu_io_desc __initdata = { |
@@ -77,6 +79,9 @@ void __init socfpga_sysmgr_init(void) | |||
77 | 79 | ||
78 | np = of_find_compatible_node(NULL, NULL, "altr,rst-mgr"); | 80 | np = of_find_compatible_node(NULL, NULL, "altr,rst-mgr"); |
79 | rst_manager_base_addr = of_iomap(np, 0); | 81 | rst_manager_base_addr = of_iomap(np, 0); |
82 | |||
83 | np = of_find_compatible_node(NULL, NULL, "altr,clk-mgr"); | ||
84 | clk_mgr_base_addr = of_iomap(np, 0); | ||
80 | } | 85 | } |
81 | 86 | ||
82 | static void __init socfpga_init_irq(void) | 87 | static void __init socfpga_init_irq(void) |
@@ -102,6 +107,7 @@ static void __init socfpga_cyclone5_init(void) | |||
102 | { | 107 | { |
103 | l2x0_of_init(0, ~0UL); | 108 | l2x0_of_init(0, ~0UL); |
104 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 109 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
110 | of_clk_init(NULL); | ||
105 | socfpga_init_clocks(); | 111 | socfpga_init_clocks(); |
106 | } | 112 | } |
107 | 113 | ||