diff options
Diffstat (limited to 'arch/arm/plat-omap/devices.c')
-rw-r--r-- | arch/arm/plat-omap/devices.c | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 95677d17cd1c..d1920be7833b 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -24,135 +24,13 @@ | |||
24 | #include <plat/control.h> | 24 | #include <plat/control.h> |
25 | #include <plat/board.h> | 25 | #include <plat/board.h> |
26 | #include <plat/mmc.h> | 26 | #include <plat/mmc.h> |
27 | #include <plat/mux.h> | ||
28 | #include <mach/gpio.h> | 27 | #include <mach/gpio.h> |
29 | #include <plat/menelaus.h> | 28 | #include <plat/menelaus.h> |
30 | #include <plat/mcbsp.h> | 29 | #include <plat/mcbsp.h> |
31 | #include <plat/dsp_common.h> | ||
32 | #include <plat/omap44xx.h> | 30 | #include <plat/omap44xx.h> |
33 | 31 | ||
34 | #if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE) | ||
35 | |||
36 | static struct dsp_platform_data dsp_pdata = { | ||
37 | .kdev_list = LIST_HEAD_INIT(dsp_pdata.kdev_list), | ||
38 | }; | ||
39 | |||
40 | static struct resource omap_dsp_resources[] = { | ||
41 | { | ||
42 | .name = "dsp_mmu", | ||
43 | .start = -1, | ||
44 | .flags = IORESOURCE_IRQ, | ||
45 | }, | ||
46 | }; | ||
47 | |||
48 | static struct platform_device omap_dsp_device = { | ||
49 | .name = "dsp", | ||
50 | .id = -1, | ||
51 | .num_resources = ARRAY_SIZE(omap_dsp_resources), | ||
52 | .resource = omap_dsp_resources, | ||
53 | .dev = { | ||
54 | .platform_data = &dsp_pdata, | ||
55 | }, | ||
56 | }; | ||
57 | |||
58 | static inline void omap_init_dsp(void) | ||
59 | { | ||
60 | struct resource *res; | ||
61 | int irq; | ||
62 | |||
63 | if (cpu_is_omap15xx()) | ||
64 | irq = INT_1510_DSP_MMU; | ||
65 | else if (cpu_is_omap16xx()) | ||
66 | irq = INT_1610_DSP_MMU; | ||
67 | else if (cpu_is_omap24xx()) | ||
68 | irq = INT_24XX_DSP_MMU; | ||
69 | |||
70 | res = platform_get_resource_byname(&omap_dsp_device, | ||
71 | IORESOURCE_IRQ, "dsp_mmu"); | ||
72 | res->start = irq; | ||
73 | |||
74 | platform_device_register(&omap_dsp_device); | ||
75 | } | ||
76 | |||
77 | int dsp_kfunc_device_register(struct dsp_kfunc_device *kdev) | ||
78 | { | ||
79 | static DEFINE_MUTEX(dsp_pdata_lock); | ||
80 | |||
81 | spin_lock_init(&kdev->lock); | ||
82 | |||
83 | mutex_lock(&dsp_pdata_lock); | ||
84 | list_add_tail(&kdev->entry, &dsp_pdata.kdev_list); | ||
85 | mutex_unlock(&dsp_pdata_lock); | ||
86 | |||
87 | return 0; | ||
88 | } | ||
89 | EXPORT_SYMBOL(dsp_kfunc_device_register); | ||
90 | |||
91 | #else | ||
92 | static inline void omap_init_dsp(void) { } | ||
93 | #endif /* CONFIG_OMAP_DSP */ | ||
94 | |||
95 | /*-------------------------------------------------------------------------*/ | 32 | /*-------------------------------------------------------------------------*/ |
96 | #if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE) | ||
97 | |||
98 | static void omap_init_kp(void) | ||
99 | { | ||
100 | /* 2430 and 34xx keypad is on TWL4030 */ | ||
101 | if (cpu_is_omap2430() || cpu_is_omap34xx()) | ||
102 | return; | ||
103 | 33 | ||
104 | if (machine_is_omap_h2() || machine_is_omap_h3()) { | ||
105 | omap_cfg_reg(F18_1610_KBC0); | ||
106 | omap_cfg_reg(D20_1610_KBC1); | ||
107 | omap_cfg_reg(D19_1610_KBC2); | ||
108 | omap_cfg_reg(E18_1610_KBC3); | ||
109 | omap_cfg_reg(C21_1610_KBC4); | ||
110 | |||
111 | omap_cfg_reg(G18_1610_KBR0); | ||
112 | omap_cfg_reg(F19_1610_KBR1); | ||
113 | omap_cfg_reg(H14_1610_KBR2); | ||
114 | omap_cfg_reg(E20_1610_KBR3); | ||
115 | omap_cfg_reg(E19_1610_KBR4); | ||
116 | omap_cfg_reg(N19_1610_KBR5); | ||
117 | } else if (machine_is_omap_perseus2() || machine_is_omap_fsample()) { | ||
118 | omap_cfg_reg(E2_7XX_KBR0); | ||
119 | omap_cfg_reg(J7_7XX_KBR1); | ||
120 | omap_cfg_reg(E1_7XX_KBR2); | ||
121 | omap_cfg_reg(F3_7XX_KBR3); | ||
122 | omap_cfg_reg(D2_7XX_KBR4); | ||
123 | |||
124 | omap_cfg_reg(C2_7XX_KBC0); | ||
125 | omap_cfg_reg(D3_7XX_KBC1); | ||
126 | omap_cfg_reg(E4_7XX_KBC2); | ||
127 | omap_cfg_reg(F4_7XX_KBC3); | ||
128 | omap_cfg_reg(E3_7XX_KBC4); | ||
129 | } else if (machine_is_omap_h4()) { | ||
130 | omap_cfg_reg(T19_24XX_KBR0); | ||
131 | omap_cfg_reg(R19_24XX_KBR1); | ||
132 | omap_cfg_reg(V18_24XX_KBR2); | ||
133 | omap_cfg_reg(M21_24XX_KBR3); | ||
134 | omap_cfg_reg(E5__24XX_KBR4); | ||
135 | if (omap_has_menelaus()) { | ||
136 | omap_cfg_reg(B3__24XX_KBR5); | ||
137 | omap_cfg_reg(AA4_24XX_KBC2); | ||
138 | omap_cfg_reg(B13_24XX_KBC6); | ||
139 | } else { | ||
140 | omap_cfg_reg(M18_24XX_KBR5); | ||
141 | omap_cfg_reg(H19_24XX_KBC2); | ||
142 | omap_cfg_reg(N19_24XX_KBC6); | ||
143 | } | ||
144 | omap_cfg_reg(R20_24XX_KBC0); | ||
145 | omap_cfg_reg(M14_24XX_KBC1); | ||
146 | omap_cfg_reg(V17_24XX_KBC3); | ||
147 | omap_cfg_reg(P21_24XX_KBC4); | ||
148 | omap_cfg_reg(L14_24XX_KBC5); | ||
149 | } | ||
150 | } | ||
151 | #else | ||
152 | static inline void omap_init_kp(void) {} | ||
153 | #endif | ||
154 | |||
155 | /*-------------------------------------------------------------------------*/ | ||
156 | #if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE) | 34 | #if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE) |
157 | 35 | ||
158 | static struct platform_device **omap_mcbsp_devices; | 36 | static struct platform_device **omap_mcbsp_devices; |
@@ -419,8 +297,6 @@ static int __init omap_init_devices(void) | |||
419 | /* please keep these calls, and their implementations above, | 297 | /* please keep these calls, and their implementations above, |
420 | * in alphabetical order so they're easier to sort through. | 298 | * in alphabetical order so they're easier to sort through. |
421 | */ | 299 | */ |
422 | omap_init_dsp(); | ||
423 | omap_init_kp(); | ||
424 | omap_init_rng(); | 300 | omap_init_rng(); |
425 | omap_init_mcpdm(); | 301 | omap_init_mcpdm(); |
426 | omap_init_uwire(); | 302 | omap_init_uwire(); |