diff options
Diffstat (limited to 'arch/arm/mach-w90x900/w90p910.c')
-rw-r--r-- | arch/arm/mach-w90x900/w90p910.c | 53 |
1 files changed, 48 insertions, 5 deletions
diff --git a/arch/arm/mach-w90x900/w90p910.c b/arch/arm/mach-w90x900/w90p910.c index 2bcbaa681b99..1c97e4930b7a 100644 --- a/arch/arm/mach-w90x900/w90p910.c +++ b/arch/arm/mach-w90x900/w90p910.c | |||
@@ -3,8 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Based on linux/arch/arm/plat-s3c24xx/s3c244x.c by Ben Dooks | 4 | * Based on linux/arch/arm/plat-s3c24xx/s3c244x.c by Ben Dooks |
5 | * | 5 | * |
6 | * Copyright (c) 2008 Nuvoton technology corporation | 6 | * Copyright (c) 2008 Nuvoton technology corporation. |
7 | * All rights reserved. | ||
8 | * | 7 | * |
9 | * Wan ZongShun <mcuos.com@gmail.com> | 8 | * Wan ZongShun <mcuos.com@gmail.com> |
10 | * | 9 | * |
@@ -12,8 +11,7 @@ | |||
12 | * | 11 | * |
13 | * This program is free software; you can redistribute it and/or modify | 12 | * This program is free software; you can redistribute it and/or modify |
14 | * it under the terms of the GNU General Public License as published by | 13 | * it under the terms of the GNU General Public License as published by |
15 | * the Free Software Foundation; either version 2 of the License, or | 14 | * the Free Software Foundation;version 2 of the License. |
16 | * (at your option) any later version. | ||
17 | * | 15 | * |
18 | */ | 16 | */ |
19 | 17 | ||
@@ -36,6 +34,7 @@ | |||
36 | #include <mach/regs-serial.h> | 34 | #include <mach/regs-serial.h> |
37 | 35 | ||
38 | #include "cpu.h" | 36 | #include "cpu.h" |
37 | #include "clock.h" | ||
39 | 38 | ||
40 | /* Initial IO mappings */ | 39 | /* Initial IO mappings */ |
41 | 40 | ||
@@ -45,9 +44,52 @@ static struct map_desc w90p910_iodesc[] __initdata = { | |||
45 | IODESC_ENT(UART), | 44 | IODESC_ENT(UART), |
46 | IODESC_ENT(TIMER), | 45 | IODESC_ENT(TIMER), |
47 | IODESC_ENT(EBI), | 46 | IODESC_ENT(EBI), |
47 | IODESC_ENT(USBEHCIHOST), | ||
48 | IODESC_ENT(USBOHCIHOST), | ||
49 | IODESC_ENT(ADC), | ||
50 | IODESC_ENT(RTC), | ||
51 | IODESC_ENT(KPI), | ||
52 | IODESC_ENT(USBDEV), | ||
48 | /*IODESC_ENT(LCD),*/ | 53 | /*IODESC_ENT(LCD),*/ |
49 | }; | 54 | }; |
50 | 55 | ||
56 | /* Initial clock declarations. */ | ||
57 | static DEFINE_CLK(lcd, 0); | ||
58 | static DEFINE_CLK(audio, 1); | ||
59 | static DEFINE_CLK(fmi, 4); | ||
60 | static DEFINE_CLK(dmac, 5); | ||
61 | static DEFINE_CLK(atapi, 6); | ||
62 | static DEFINE_CLK(emc, 7); | ||
63 | static DEFINE_CLK(usbd, 8); | ||
64 | static DEFINE_CLK(usbh, 9); | ||
65 | static DEFINE_CLK(g2d, 10);; | ||
66 | static DEFINE_CLK(pwm, 18); | ||
67 | static DEFINE_CLK(ps2, 24); | ||
68 | static DEFINE_CLK(kpi, 25); | ||
69 | static DEFINE_CLK(wdt, 26); | ||
70 | static DEFINE_CLK(gdma, 27); | ||
71 | static DEFINE_CLK(adc, 28); | ||
72 | static DEFINE_CLK(usi, 29); | ||
73 | |||
74 | static struct clk_lookup w90p910_clkregs[] = { | ||
75 | DEF_CLKLOOK(&clk_lcd, "w90p910-lcd", NULL), | ||
76 | DEF_CLKLOOK(&clk_audio, "w90p910-audio", NULL), | ||
77 | DEF_CLKLOOK(&clk_fmi, "w90p910-fmi", NULL), | ||
78 | DEF_CLKLOOK(&clk_dmac, "w90p910-dmac", NULL), | ||
79 | DEF_CLKLOOK(&clk_atapi, "w90p910-atapi", NULL), | ||
80 | DEF_CLKLOOK(&clk_emc, "w90p910-emc", NULL), | ||
81 | DEF_CLKLOOK(&clk_usbd, "w90p910-usbd", NULL), | ||
82 | DEF_CLKLOOK(&clk_usbh, "w90p910-usbh", NULL), | ||
83 | DEF_CLKLOOK(&clk_g2d, "w90p910-g2d", NULL), | ||
84 | DEF_CLKLOOK(&clk_pwm, "w90p910-pwm", NULL), | ||
85 | DEF_CLKLOOK(&clk_ps2, "w90p910-ps2", NULL), | ||
86 | DEF_CLKLOOK(&clk_kpi, "w90p910-kpi", NULL), | ||
87 | DEF_CLKLOOK(&clk_wdt, "w90p910-wdt", NULL), | ||
88 | DEF_CLKLOOK(&clk_gdma, "w90p910-gdma", NULL), | ||
89 | DEF_CLKLOOK(&clk_adc, "w90p910-adc", NULL), | ||
90 | DEF_CLKLOOK(&clk_usi, "w90p910-usi", NULL), | ||
91 | }; | ||
92 | |||
51 | /* Initial serial platform data */ | 93 | /* Initial serial platform data */ |
52 | 94 | ||
53 | struct plat_serial8250_port w90p910_uart_data[] = { | 95 | struct plat_serial8250_port w90p910_uart_data[] = { |
@@ -77,8 +119,9 @@ void __init w90p910_map_io(struct map_desc *mach_desc, int mach_size) | |||
77 | 119 | ||
78 | /*Init W90P910 clock*/ | 120 | /*Init W90P910 clock*/ |
79 | 121 | ||
80 | void __init w90p910_init_clocks(int xtal) | 122 | void __init w90p910_init_clocks(void) |
81 | { | 123 | { |
124 | clks_register(w90p910_clkregs, ARRAY_SIZE(w90p910_clkregs)); | ||
82 | } | 125 | } |
83 | 126 | ||
84 | static int __init w90p910_init_cpu(void) | 127 | static int __init w90p910_init_cpu(void) |