aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorChristoph Egger <siccegge@cs.fau.de>2010-07-05 09:31:54 -0400
committerTony Lindgren <tony@atomide.com>2010-07-05 09:31:54 -0400
commitab6f7751905e5cf713d081dbb3b97b8f6909ab34 (patch)
treecdd361fa5b1ee831374052ddd068edfbc46f0b5c /arch
parent4705c1ca8b7c7cca23d7e534c830e5d6ac914535 (diff)
Removing dead OMAP_DSP
OMAP_DSP doesn't exist in Kconfig, therefore removing all references for it from the source code. Signed-off-by: Christoph Egger <siccegge@cs.fau.de> [tony@atomide.com: updated to apply on top of already queued patches] Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c134
-rw-r--r--arch/arm/mach-omap1/devices.c37
-rw-r--r--arch/arm/mach-omap1/mcbsp.c3
-rw-r--r--arch/arm/plat-omap/devices.c63
-rw-r--r--arch/arm/plat-omap/include/plat/dsp_common.h40
5 files changed, 0 insertions, 277 deletions
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index c9e9e37c5676..5224b67f7f1c 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -32,7 +32,6 @@
32#include <plat/board.h> 32#include <plat/board.h>
33#include <plat/keypad.h> 33#include <plat/keypad.h>
34#include <plat/common.h> 34#include <plat/common.h>
35#include <plat/dsp_common.h>
36#include <plat/hwa742.h> 35#include <plat/hwa742.h>
37#include <plat/lcd_mipid.h> 36#include <plat/lcd_mipid.h>
38#include <plat/mmc.h> 37#include <plat/mmc.h>
@@ -242,138 +241,6 @@ static inline void nokia770_mmc_init(void)
242} 241}
243#endif 242#endif
244 243
245#if defined(CONFIG_OMAP_DSP)
246/*
247 * audio power control
248 */
249#define HEADPHONE_GPIO 14
250#define AMPLIFIER_CTRL_GPIO 58
251
252static struct clk *dspxor_ck;
253static DEFINE_MUTEX(audio_pwr_lock);
254/*
255 * audio_pwr_state
256 * +--+-------------------------+---------------------------------------+
257 * |-1|down |power-up request -> 0 |
258 * +--+-------------------------+---------------------------------------+
259 * | 0|up |power-down(1) request -> 1 |
260 * | | |power-down(2) request -> (ignore) |
261 * +--+-------------------------+---------------------------------------+
262 * | 1|up, |power-up request -> 0 |
263 * | |received down(1) request |power-down(2) request -> -1 |
264 * +--+-------------------------+---------------------------------------+
265 */
266static int audio_pwr_state = -1;
267
268static inline void aic23_power_up(void)
269{
270}
271static inline void aic23_power_down(void)
272{
273}
274
275/*
276 * audio_pwr_up / down should be called under audio_pwr_lock
277 */
278static void nokia770_audio_pwr_up(void)
279{
280 clk_enable(dspxor_ck);
281
282 /* Turn on codec */
283 aic23_power_up();
284
285 if (gpio_get_value(HEADPHONE_GPIO))
286 /* HP not connected, turn on amplifier */
287 gpio_set_value(AMPLIFIER_CTRL_GPIO, 1);
288 else
289 /* HP connected, do not turn on amplifier */
290 printk("HP connected\n");
291}
292
293static void codec_delayed_power_down(struct work_struct *work)
294{
295 mutex_lock(&audio_pwr_lock);
296 if (audio_pwr_state == -1)
297 aic23_power_down();
298 clk_disable(dspxor_ck);
299 mutex_unlock(&audio_pwr_lock);
300}
301
302static DECLARE_DELAYED_WORK(codec_power_down_work, codec_delayed_power_down);
303
304static void nokia770_audio_pwr_down(void)
305{
306 /* Turn off amplifier */
307 gpio_set_value(AMPLIFIER_CTRL_GPIO, 0);
308
309 /* Turn off codec: schedule delayed work */
310 schedule_delayed_work(&codec_power_down_work, HZ / 20); /* 50ms */
311}
312
313static int
314nokia770_audio_pwr_up_request(struct dsp_kfunc_device *kdev, int stage)
315{
316 mutex_lock(&audio_pwr_lock);
317 if (audio_pwr_state == -1)
318 nokia770_audio_pwr_up();
319 /* force audio_pwr_state = 0, even if it was 1. */
320 audio_pwr_state = 0;
321 mutex_unlock(&audio_pwr_lock);
322 return 0;
323}
324
325static int
326nokia770_audio_pwr_down_request(struct dsp_kfunc_device *kdev, int stage)
327{
328 mutex_lock(&audio_pwr_lock);
329 switch (stage) {
330 case 1:
331 if (audio_pwr_state == 0)
332 audio_pwr_state = 1;
333 break;
334 case 2:
335 if (audio_pwr_state == 1) {
336 nokia770_audio_pwr_down();
337 audio_pwr_state = -1;
338 }
339 break;
340 }
341 mutex_unlock(&audio_pwr_lock);
342 return 0;
343}
344
345static struct dsp_kfunc_device nokia770_audio_device = {
346 .name = "audio",
347 .type = DSP_KFUNC_DEV_TYPE_AUDIO,
348 .enable = nokia770_audio_pwr_up_request,
349 .disable = nokia770_audio_pwr_down_request,
350};
351
352static __init int omap_dsp_init(void)
353{
354 int ret;
355
356 dspxor_ck = clk_get(0, "dspxor_ck");
357 if (IS_ERR(dspxor_ck)) {
358 printk(KERN_ERR "couldn't acquire dspxor_ck\n");
359 return PTR_ERR(dspxor_ck);
360 }
361
362 ret = dsp_kfunc_device_register(&nokia770_audio_device);
363 if (ret) {
364 printk(KERN_ERR
365 "KFUNC device registration faild: %s\n",
366 nokia770_audio_device.name);
367 goto out;
368 }
369 return 0;
370 out:
371 return ret;
372}
373#else
374#define omap_dsp_init() do {} while (0)
375#endif /* CONFIG_OMAP_DSP */
376
377static void __init omap_nokia770_init(void) 244static void __init omap_nokia770_init(void)
378{ 245{
379 platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices)); 246 platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices));
@@ -382,7 +249,6 @@ static void __init omap_nokia770_init(void)
382 omap_gpio_init(); 249 omap_gpio_init();
383 omap_serial_init(); 250 omap_serial_init();
384 omap_register_i2c_bus(1, 100, NULL, 0); 251 omap_register_i2c_bus(1, 100, NULL, 0);
385 omap_dsp_init();
386 hwa742_dev_init(); 252 hwa742_dev_init();
387 ads7846_dev_init(); 253 ads7846_dev_init();
388 mipid_dev_init(); 254 mipid_dev_init();
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 379100c17639..c00d602a2599 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -63,44 +63,7 @@ static void omap_init_rtc(void)
63static inline void omap_init_rtc(void) {} 63static inline void omap_init_rtc(void) {}
64#endif 64#endif
65 65
66#if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
67
68#if defined(CONFIG_ARCH_OMAP15XX)
69# define OMAP1_MBOX_SIZE 0x23
70# define INT_DSP_MAILBOX1 INT_1510_DSP_MAILBOX1
71#elif defined(CONFIG_ARCH_OMAP16XX)
72# define OMAP1_MBOX_SIZE 0x2f
73# define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1
74#endif
75
76#define OMAP1_MBOX_BASE OMAP16XX_MAILBOX_BASE
77
78static struct resource mbox_resources[] = {
79 {
80 .start = OMAP1_MBOX_BASE,
81 .end = OMAP1_MBOX_BASE + OMAP1_MBOX_SIZE,
82 .flags = IORESOURCE_MEM,
83 },
84 {
85 .start = INT_DSP_MAILBOX1,
86 .flags = IORESOURCE_IRQ,
87 },
88};
89
90static struct platform_device mbox_device = {
91 .name = "omap1-mailbox",
92 .id = -1,
93 .num_resources = ARRAY_SIZE(mbox_resources),
94 .resource = mbox_resources,
95};
96
97static inline void omap_init_mbox(void)
98{
99 platform_device_register(&mbox_device);
100}
101#else
102static inline void omap_init_mbox(void) { } 66static inline void omap_init_mbox(void) { }
103#endif
104 67
105/*-------------------------------------------------------------------------*/ 68/*-------------------------------------------------------------------------*/
106 69
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index e9bdff192f82..b3a796a6da03 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -23,7 +23,6 @@
23#include <plat/mux.h> 23#include <plat/mux.h>
24#include <plat/cpu.h> 24#include <plat/cpu.h>
25#include <plat/mcbsp.h> 25#include <plat/mcbsp.h>
26#include <plat/dsp_common.h>
27 26
28#define DPS_RSTCT2_PER_EN (1 << 0) 27#define DPS_RSTCT2_PER_EN (1 << 0)
29#define DSP_RSTCT2_WD_PER_EN (1 << 1) 28#define DSP_RSTCT2_WD_PER_EN (1 << 1)
@@ -46,7 +45,6 @@ static void omap1_mcbsp_request(unsigned int id)
46 clk_enable(api_clk); 45 clk_enable(api_clk);
47 clk_enable(dsp_clk); 46 clk_enable(dsp_clk);
48 47
49 omap_dsp_request_mem();
50 /* 48 /*
51 * DSP external peripheral reset 49 * DSP external peripheral reset
52 * FIXME: This should be moved to dsp code 50 * FIXME: This should be moved to dsp code
@@ -62,7 +60,6 @@ static void omap1_mcbsp_free(unsigned int id)
62{ 60{
63 if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) { 61 if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) {
64 if (--dsp_use == 0) { 62 if (--dsp_use == 0) {
65 omap_dsp_release_mem();
66 if (!IS_ERR(api_clk)) { 63 if (!IS_ERR(api_clk)) {
67 clk_disable(api_clk); 64 clk_disable(api_clk);
68 clk_put(api_clk); 65 clk_put(api_clk);
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index ca5b2290f5a3..d1920be7833b 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -27,70 +27,8 @@
27#include <mach/gpio.h> 27#include <mach/gpio.h>
28#include <plat/menelaus.h> 28#include <plat/menelaus.h>
29#include <plat/mcbsp.h> 29#include <plat/mcbsp.h>
30#include <plat/dsp_common.h>
31#include <plat/omap44xx.h> 30#include <plat/omap44xx.h>
32 31
33#if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
34
35static struct dsp_platform_data dsp_pdata = {
36 .kdev_list = LIST_HEAD_INIT(dsp_pdata.kdev_list),
37};
38
39static struct resource omap_dsp_resources[] = {
40 {
41 .name = "dsp_mmu",
42 .start = -1,
43 .flags = IORESOURCE_IRQ,
44 },
45};
46
47static struct platform_device omap_dsp_device = {
48 .name = "dsp",
49 .id = -1,
50 .num_resources = ARRAY_SIZE(omap_dsp_resources),
51 .resource = omap_dsp_resources,
52 .dev = {
53 .platform_data = &dsp_pdata,
54 },
55};
56
57static inline void omap_init_dsp(void)
58{
59 struct resource *res;
60 int irq;
61
62 if (cpu_is_omap15xx())
63 irq = INT_1510_DSP_MMU;
64 else if (cpu_is_omap16xx())
65 irq = INT_1610_DSP_MMU;
66 else if (cpu_is_omap24xx())
67 irq = INT_24XX_DSP_MMU;
68
69 res = platform_get_resource_byname(&omap_dsp_device,
70 IORESOURCE_IRQ, "dsp_mmu");
71 res->start = irq;
72
73 platform_device_register(&omap_dsp_device);
74}
75
76int dsp_kfunc_device_register(struct dsp_kfunc_device *kdev)
77{
78 static DEFINE_MUTEX(dsp_pdata_lock);
79
80 spin_lock_init(&kdev->lock);
81
82 mutex_lock(&dsp_pdata_lock);
83 list_add_tail(&kdev->entry, &dsp_pdata.kdev_list);
84 mutex_unlock(&dsp_pdata_lock);
85
86 return 0;
87}
88EXPORT_SYMBOL(dsp_kfunc_device_register);
89
90#else
91static inline void omap_init_dsp(void) { }
92#endif /* CONFIG_OMAP_DSP */
93
94/*-------------------------------------------------------------------------*/ 32/*-------------------------------------------------------------------------*/
95 33
96#if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE) 34#if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE)
@@ -359,7 +297,6 @@ static int __init omap_init_devices(void)
359 /* please keep these calls, and their implementations above, 297 /* please keep these calls, and their implementations above,
360 * in alphabetical order so they're easier to sort through. 298 * in alphabetical order so they're easier to sort through.
361 */ 299 */
362 omap_init_dsp();
363 omap_init_rng(); 300 omap_init_rng();
364 omap_init_mcpdm(); 301 omap_init_mcpdm();
365 omap_init_uwire(); 302 omap_init_uwire();
diff --git a/arch/arm/plat-omap/include/plat/dsp_common.h b/arch/arm/plat-omap/include/plat/dsp_common.h
deleted file mode 100644
index da97736f3efa..000000000000
--- a/arch/arm/plat-omap/include/plat/dsp_common.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * This file is part of OMAP DSP driver (DSP Gateway version 3.3.1)
3 *
4 * Copyright (C) 2004-2006 Nokia Corporation. All rights reserved.
5 *
6 * Contact: Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 *
22 */
23
24#ifndef ASM_ARCH_DSP_COMMON_H
25#define ASM_ARCH_DSP_COMMON_H
26
27#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_OMAP_MMU_FWK)
28extern void omap_dsp_request_mpui(void);
29extern void omap_dsp_release_mpui(void);
30extern int omap_dsp_request_mem(void);
31extern int omap_dsp_release_mem(void);
32#else
33static inline int omap_dsp_request_mem(void)
34{
35 return 0;
36}
37#define omap_dsp_release_mem() do {} while (0)
38#endif
39
40#endif /* ASM_ARCH_DSP_COMMON_H */