aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-10-28 12:44:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-28 12:44:56 -0400
commite4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7 (patch)
treeea51b391f7d74ca695dcb9f5e46eb02688a92ed9 /arch/arm/mach-omap2
parent81280572ca6f54009edfa4deee563e8678784218 (diff)
parenta4ac0d847af9dd34d5953a5e264400326144b6b2 (diff)
Merge 'staging-next' to Linus's tree
This merges the staging-next tree to Linus's tree and resolves some conflicts that were present due to changes in other trees that were affected by files here. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Makefile4
-rw-r--r--arch/arm/mach-omap2/dsp.c85
2 files changed, 89 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 7352412e491..60e51bcf53b 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -108,6 +108,10 @@ obj-y += $(iommu-m) $(iommu-y)
108i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o 108i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
109obj-y += $(i2c-omap-m) $(i2c-omap-y) 109obj-y += $(i2c-omap-m) $(i2c-omap-y)
110 110
111ifneq ($(CONFIG_TIDSPBRIDGE),)
112obj-y += dsp.o
113endif
114
111# Specific board support 115# Specific board support
112obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o 116obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
113obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o 117obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c
new file mode 100644
index 00000000000..6feeeae6c21
--- /dev/null
+++ b/arch/arm/mach-omap2/dsp.c
@@ -0,0 +1,85 @@
1/*
2 * TI's OMAP DSP platform device registration
3 *
4 * Copyright (C) 2005-2006 Texas Instruments, Inc.
5 * Copyright (C) 2009 Nokia Corporation
6 *
7 * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#include <linux/platform_device.h>
15#include "prm.h"
16#include "cm.h"
17#ifdef CONFIG_BRIDGE_DVFS
18#include <plat/omap-pm.h>
19#endif
20
21#include <plat/dsp.h>
22
23extern phys_addr_t omap_dsp_get_mempool_base(void);
24
25static struct platform_device *omap_dsp_pdev;
26
27static struct omap_dsp_platform_data omap_dsp_pdata __initdata = {
28#ifdef CONFIG_BRIDGE_DVFS
29 .dsp_set_min_opp = omap_pm_dsp_set_min_opp,
30 .dsp_get_opp = omap_pm_dsp_get_opp,
31 .cpu_set_freq = omap_pm_cpu_set_freq,
32 .cpu_get_freq = omap_pm_cpu_get_freq,
33#endif
34 .dsp_prm_read = prm_read_mod_reg,
35 .dsp_prm_write = prm_write_mod_reg,
36 .dsp_prm_rmw_bits = prm_rmw_mod_reg_bits,
37 .dsp_cm_read = cm_read_mod_reg,
38 .dsp_cm_write = cm_write_mod_reg,
39 .dsp_cm_rmw_bits = cm_rmw_mod_reg_bits,
40};
41
42static int __init omap_dsp_init(void)
43{
44 struct platform_device *pdev;
45 int err = -ENOMEM;
46 struct omap_dsp_platform_data *pdata = &omap_dsp_pdata;
47
48 pdata->phys_mempool_base = omap_dsp_get_mempool_base();
49
50 if (pdata->phys_mempool_base) {
51 pdata->phys_mempool_size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE;
52 pr_info("%s: %x bytes @ %x\n", __func__,
53 pdata->phys_mempool_size, pdata->phys_mempool_base);
54 }
55
56 pdev = platform_device_alloc("omap-dsp", -1);
57 if (!pdev)
58 goto err_out;
59
60 err = platform_device_add_data(pdev, pdata, sizeof(*pdata));
61 if (err)
62 goto err_out;
63
64 err = platform_device_add(pdev);
65 if (err)
66 goto err_out;
67
68 omap_dsp_pdev = pdev;
69 return 0;
70
71err_out:
72 platform_device_put(pdev);
73 return err;
74}
75module_init(omap_dsp_init);
76
77static void __exit omap_dsp_exit(void)
78{
79 platform_device_unregister(omap_dsp_pdev);
80}
81module_exit(omap_dsp_exit);
82
83MODULE_AUTHOR("Hiroshi DOYU");
84MODULE_DESCRIPTION("TI's OMAP DSP platform device registration");
85MODULE_LICENSE("GPL");