aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp/pxa910.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-09-13 01:34:11 -0400
committerOlof Johansson <olof@lixom.net>2012-09-13 01:34:11 -0400
commit025c95a6826ad8acfe871f33c2fa9208beeb38df (patch)
tree220fe156ff60db13bd3a1319f5e20d6b723de5f4 /arch/arm/mach-mmp/pxa910.c
parent0558d7a8ed44e6e53aadb04d2e23145efb2aa8a4 (diff)
parent7f744b17140af1a9c8804a1c81c9dae6bb52a7fb (diff)
Merge branch 'clk' of git://github.com/hzhuang1/linux into next/cleanup
* 'clk' of git://github.com/hzhuang1/linux: ARM: mmp: remove unused definition in APBC and APMU ARM: mmp: move mmp2 clock definition to separated file arm: mmp: move pxa910 clock definition to separated file arm: mmp: move pxa168 clock definition to separated file arm: mmp: make private clock definition exclude from common clock + Linux 3.6-rc4
Diffstat (limited to 'arch/arm/mach-mmp/pxa910.c')
-rw-r--r--arch/arm/mach-mmp/pxa910.c40
1 files changed, 4 insertions, 36 deletions
diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c
index 6da52e9f2bdc..7d84521bb715 100644
--- a/arch/arm/mach-mmp/pxa910.c
+++ b/arch/arm/mach-mmp/pxa910.c
@@ -17,7 +17,6 @@
17#include <asm/mach/time.h> 17#include <asm/mach/time.h>
18#include <mach/addr-map.h> 18#include <mach/addr-map.h>
19#include <mach/regs-apbc.h> 19#include <mach/regs-apbc.h>
20#include <mach/regs-apmu.h>
21#include <mach/cputype.h> 20#include <mach/cputype.h>
22#include <mach/irqs.h> 21#include <mach/irqs.h>
23#include <mach/dma.h> 22#include <mach/dma.h>
@@ -25,7 +24,6 @@
25#include <mach/devices.h> 24#include <mach/devices.h>
26 25
27#include "common.h" 26#include "common.h"
28#include "clock.h"
29 27
30#define MFPR_VIRT_BASE (APB_VIRT_BASE + 0x1e000) 28#define MFPR_VIRT_BASE (APB_VIRT_BASE + 0x1e000)
31 29
@@ -82,44 +80,13 @@ void __init pxa910_init_irq(void)
82 icu_init_irq(); 80 icu_init_irq();
83} 81}
84 82
85/* APB peripheral clocks */
86static APBC_CLK(uart1, PXA910_UART0, 1, 14745600);
87static APBC_CLK(uart2, PXA910_UART1, 1, 14745600);
88static APBC_CLK(twsi0, PXA168_TWSI0, 1, 33000000);
89static APBC_CLK(twsi1, PXA168_TWSI1, 1, 33000000);
90static APBC_CLK(pwm1, PXA910_PWM1, 1, 13000000);
91static APBC_CLK(pwm2, PXA910_PWM2, 1, 13000000);
92static APBC_CLK(pwm3, PXA910_PWM3, 1, 13000000);
93static APBC_CLK(pwm4, PXA910_PWM4, 1, 13000000);
94static APBC_CLK(gpio, PXA910_GPIO, 0, 13000000);
95static APBC_CLK(rtc, PXA910_RTC, 8, 32768);
96
97static APMU_CLK(nand, NAND, 0x19b, 156000000);
98static APMU_CLK(u2o, USB, 0x1b, 480000000);
99
100/* device and clock bindings */
101static struct clk_lookup pxa910_clkregs[] = {
102 INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL),
103 INIT_CLKREG(&clk_uart2, "pxa2xx-uart.1", NULL),
104 INIT_CLKREG(&clk_twsi0, "pxa2xx-i2c.0", NULL),
105 INIT_CLKREG(&clk_twsi1, "pxa2xx-i2c.1", NULL),
106 INIT_CLKREG(&clk_pwm1, "pxa910-pwm.0", NULL),
107 INIT_CLKREG(&clk_pwm2, "pxa910-pwm.1", NULL),
108 INIT_CLKREG(&clk_pwm3, "pxa910-pwm.2", NULL),
109 INIT_CLKREG(&clk_pwm4, "pxa910-pwm.3", NULL),
110 INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL),
111 INIT_CLKREG(&clk_gpio, "pxa-gpio", NULL),
112 INIT_CLKREG(&clk_u2o, NULL, "U2OCLK"),
113 INIT_CLKREG(&clk_rtc, "sa1100-rtc", NULL),
114};
115
116static int __init pxa910_init(void) 83static int __init pxa910_init(void)
117{ 84{
118 if (cpu_is_pxa910()) { 85 if (cpu_is_pxa910()) {
119 mfp_init_base(MFPR_VIRT_BASE); 86 mfp_init_base(MFPR_VIRT_BASE);
120 mfp_init_addr(pxa910_mfp_addr_map); 87 mfp_init_addr(pxa910_mfp_addr_map);
121 pxa_init_dma(IRQ_PXA910_DMA_INT0, 32); 88 pxa_init_dma(IRQ_PXA910_DMA_INT0, 32);
122 clkdev_add_table(ARRAY_AND_SIZE(pxa910_clkregs)); 89 pxa910_clk_init();
123 } 90 }
124 91
125 return 0; 92 return 0;
@@ -128,12 +95,13 @@ postcore_initcall(pxa910_init);
128 95
129/* system timer - clock enabled, 3.25MHz */ 96/* system timer - clock enabled, 3.25MHz */
130#define TIMER_CLK_RST (APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(3)) 97#define TIMER_CLK_RST (APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(3))
98#define APBC_TIMERS APBC_REG(0x34)
131 99
132static void __init pxa910_timer_init(void) 100static void __init pxa910_timer_init(void)
133{ 101{
134 /* reset and configure */ 102 /* reset and configure */
135 __raw_writel(APBC_APBCLK | APBC_RST, APBC_PXA910_TIMERS); 103 __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS);
136 __raw_writel(TIMER_CLK_RST, APBC_PXA910_TIMERS); 104 __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
137 105
138 timer_init(IRQ_PXA910_AP1_TIMER1); 106 timer_init(IRQ_PXA910_AP1_TIMER1);
139} 107}