aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/devices.c')
-rw-r--r--arch/arm/plat-omap/devices.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 01da719a7453..ed94dee326ca 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -13,24 +13,24 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/io.h>
16 17
17#include <mach/hardware.h> 18#include <mach/hardware.h>
18#include <asm/io.h>
19#include <asm/mach-types.h> 19#include <asm/mach-types.h>
20#include <asm/mach/map.h> 20#include <asm/mach/map.h>
21 21
22#include <mach/tc.h> 22#include <mach/tc.h>
23#include <mach/control.h>
23#include <mach/board.h> 24#include <mach/board.h>
24#include <mach/mmc.h> 25#include <mach/mmc.h>
25#include <mach/mux.h> 26#include <mach/mux.h>
26#include <mach/gpio.h> 27#include <mach/gpio.h>
27#include <mach/menelaus.h> 28#include <mach/menelaus.h>
28#include <mach/mcbsp.h> 29#include <mach/mcbsp.h>
30#include <mach/dsp_common.h>
29 31
30#if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE) 32#if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
31 33
32#include "../plat-omap/dsp/dsp_common.h"
33
34static struct dsp_platform_data dsp_pdata = { 34static struct dsp_platform_data dsp_pdata = {
35 .kdev_list = LIST_HEAD_INIT(dsp_pdata.kdev_list), 35 .kdev_list = LIST_HEAD_INIT(dsp_pdata.kdev_list),
36}; 36};
@@ -76,7 +76,7 @@ int dsp_kfunc_device_register(struct dsp_kfunc_device *kdev)
76{ 76{
77 static DEFINE_MUTEX(dsp_pdata_lock); 77 static DEFINE_MUTEX(dsp_pdata_lock);
78 78
79 mutex_init(&kdev->lock); 79 spin_lock_init(&kdev->lock);
80 80
81 mutex_lock(&dsp_pdata_lock); 81 mutex_lock(&dsp_pdata_lock);
82 list_add_tail(&kdev->entry, &dsp_pdata.kdev_list); 82 list_add_tail(&kdev->entry, &dsp_pdata.kdev_list);
@@ -95,6 +95,10 @@ static inline void omap_init_dsp(void) { }
95 95
96static void omap_init_kp(void) 96static void omap_init_kp(void)
97{ 97{
98 /* 2430 and 34xx keypad is on TWL4030 */
99 if (cpu_is_omap2430() || cpu_is_omap34xx())
100 return;
101
98 if (machine_is_omap_h2() || machine_is_omap_h3()) { 102 if (machine_is_omap_h2() || machine_is_omap_h3()) {
99 omap_cfg_reg(F18_1610_KBC0); 103 omap_cfg_reg(F18_1610_KBC0);
100 omap_cfg_reg(D20_1610_KBC1); 104 omap_cfg_reg(D20_1610_KBC1);
@@ -156,13 +160,6 @@ void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
156{ 160{
157 int i; 161 int i;
158 162
159 if (size > OMAP_MAX_MCBSP_COUNT) {
160 printk(KERN_WARNING "Registered too many McBSPs platform_data."
161 " Using maximum (%d) available.\n",
162 OMAP_MAX_MCBSP_COUNT);
163 size = OMAP_MAX_MCBSP_COUNT;
164 }
165
166 omap_mcbsp_devices = kzalloc(size * sizeof(struct platform_device *), 163 omap_mcbsp_devices = kzalloc(size * sizeof(struct platform_device *),
167 GFP_KERNEL); 164 GFP_KERNEL);
168 if (!omap_mcbsp_devices) { 165 if (!omap_mcbsp_devices) {
@@ -525,10 +522,6 @@ static inline void omap_init_rng(void) {}
525 */ 522 */
526static int __init omap_init_devices(void) 523static int __init omap_init_devices(void)
527{ 524{
528/*
529 * Need to enable relevant once for 2430 SDP
530 */
531#ifndef CONFIG_MACH_OMAP_2430SDP
532 /* please keep these calls, and their implementations above, 525 /* please keep these calls, and their implementations above,
533 * in alphabetical order so they're easier to sort through. 526 * in alphabetical order so they're easier to sort through.
534 */ 527 */
@@ -538,7 +531,6 @@ static int __init omap_init_devices(void)
538 omap_init_uwire(); 531 omap_init_uwire();
539 omap_init_wdt(); 532 omap_init_wdt();
540 omap_init_rng(); 533 omap_init_rng();
541#endif
542 return 0; 534 return 0;
543} 535}
544arch_initcall(omap_init_devices); 536arch_initcall(omap_init_devices);