diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2015-07-28 14:16:46 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-12 20:47:53 -0400 |
commit | 94069301bafb601ff3c61b5d208fba4e3c948efd (patch) | |
tree | 93f67edad9c88cf6ff539e55b365f53ebd519f57 /arch/arm | |
parent | 74af583e9f7a255443d8f625c8dce6da7b9703be (diff) | |
download | u-boot-imx-94069301bafb601ff3c61b5d208fba4e3c948efd.zip u-boot-imx-94069301bafb601ff3c61b5d208fba4e3c948efd.tar.gz u-boot-imx-94069301bafb601ff3c61b5d208fba4e3c948efd.tar.bz2 |
ARM: keystone2: Cleanup init_pll definition
This is just a cosmetic change that makes
the calling of pll init code looks much cleaner.
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-keystone/clock.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-keystone/include/mach/clock.h | 3 |
2 files changed, 10 insertions, 5 deletions
diff --git a/arch/arm/mach-keystone/clock.c b/arch/arm/mach-keystone/clock.c index de5dfe1..378ed10 100644 --- a/arch/arm/mach-keystone/clock.c +++ b/arch/arm/mach-keystone/clock.c @@ -211,12 +211,16 @@ void init_pll(const struct pll_init_data *data) sdelay(210000); } -void init_plls(int num_pll, struct pll_init_data *config) +void init_plls(void) { - int i; + struct pll_init_data *data; + int pll; - for (i = 0; i < num_pll; i++) - init_pll(&config[i]); + for (pll = MAIN_PLL; pll < MAX_PLL_COUNT; pll++) { + data = get_pll_init_data(pll); + if (data) + init_pll(data); + } } static int get_max_speed(u32 val, u32 speed_supported) diff --git a/arch/arm/mach-keystone/include/mach/clock.h b/arch/arm/mach-keystone/include/mach/clock.h index 9ba4463..de697c0 100644 --- a/arch/arm/mach-keystone/include/mach/clock.h +++ b/arch/arm/mach-keystone/include/mach/clock.h @@ -76,8 +76,9 @@ extern const struct keystone_pll_regs keystone_pll_regs[]; extern s16 divn_val[]; extern int speeds[]; -void init_plls(int num_pll, struct pll_init_data *config); +void init_plls(void); void init_pll(const struct pll_init_data *data); +struct pll_init_data *get_pll_init_data(int pll); unsigned long clk_get_rate(unsigned int clk); unsigned long clk_round_rate(unsigned int clk, unsigned long hz); int clk_set_rate(unsigned int clk, unsigned long hz); |