diff options
Diffstat (limited to 'arch/arm/mach-pxa/clock.c')
| -rw-r--r-- | arch/arm/mach-pxa/clock.c | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c index e97dc59813c8..630063ffa6fc 100644 --- a/arch/arm/mach-pxa/clock.c +++ b/arch/arm/mach-pxa/clock.c | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
| 13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
| 14 | 14 | ||
| 15 | #include <asm/arch/pxa-regs.h> | 15 | #include <asm/arch/pxa2xx-regs.h> |
| 16 | #include <asm/arch/pxa2xx-gpio.h> | 16 | #include <asm/arch/pxa2xx-gpio.h> |
| 17 | #include <asm/hardware.h> | 17 | #include <asm/hardware.h> |
| 18 | 18 | ||
| @@ -47,6 +47,9 @@ struct clk *clk_get(struct device *dev, const char *id) | |||
| 47 | clk = p; | 47 | clk = p; |
| 48 | mutex_unlock(&clocks_mutex); | 48 | mutex_unlock(&clocks_mutex); |
| 49 | 49 | ||
| 50 | if (!IS_ERR(clk) && clk->ops == NULL) | ||
| 51 | clk = clk->other; | ||
| 52 | |||
| 50 | return clk; | 53 | return clk; |
| 51 | } | 54 | } |
| 52 | EXPORT_SYMBOL(clk_get); | 55 | EXPORT_SYMBOL(clk_get); |
| @@ -98,21 +101,6 @@ unsigned long clk_get_rate(struct clk *clk) | |||
| 98 | EXPORT_SYMBOL(clk_get_rate); | 101 | EXPORT_SYMBOL(clk_get_rate); |
| 99 | 102 | ||
| 100 | 103 | ||
| 101 | static void clk_gpio27_enable(struct clk *clk) | ||
| 102 | { | ||
| 103 | pxa_gpio_mode(GPIO11_3_6MHz_MD); | ||
| 104 | } | ||
| 105 | |||
| 106 | static void clk_gpio27_disable(struct clk *clk) | ||
| 107 | { | ||
| 108 | } | ||
| 109 | |||
| 110 | static const struct clkops clk_gpio27_ops = { | ||
| 111 | .enable = clk_gpio27_enable, | ||
| 112 | .disable = clk_gpio27_disable, | ||
| 113 | }; | ||
| 114 | |||
| 115 | |||
| 116 | void clk_cken_enable(struct clk *clk) | 104 | void clk_cken_enable(struct clk *clk) |
| 117 | { | 105 | { |
| 118 | CKEN |= 1 << clk->cken; | 106 | CKEN |= 1 << clk->cken; |
| @@ -128,14 +116,6 @@ const struct clkops clk_cken_ops = { | |||
| 128 | .disable = clk_cken_disable, | 116 | .disable = clk_cken_disable, |
| 129 | }; | 117 | }; |
| 130 | 118 | ||
| 131 | static struct clk common_clks[] = { | ||
| 132 | { | ||
| 133 | .name = "GPIO27_CLK", | ||
| 134 | .ops = &clk_gpio27_ops, | ||
| 135 | .rate = 3686400, | ||
| 136 | }, | ||
| 137 | }; | ||
| 138 | |||
| 139 | void clks_register(struct clk *clks, size_t num) | 119 | void clks_register(struct clk *clks, size_t num) |
| 140 | { | 120 | { |
| 141 | int i; | 121 | int i; |
| @@ -145,10 +125,3 @@ void clks_register(struct clk *clks, size_t num) | |||
| 145 | list_add(&clks[i].node, &clocks); | 125 | list_add(&clks[i].node, &clocks); |
| 146 | mutex_unlock(&clocks_mutex); | 126 | mutex_unlock(&clocks_mutex); |
| 147 | } | 127 | } |
| 148 | |||
| 149 | static int __init clk_init(void) | ||
| 150 | { | ||
| 151 | clks_register(common_clks, ARRAY_SIZE(common_clks)); | ||
| 152 | return 0; | ||
| 153 | } | ||
| 154 | arch_initcall(clk_init); | ||
