diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 15:13:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 15:13:00 -0400 |
commit | f063a0c0c995d010960efcc1b2ed14b99674f25c (patch) | |
tree | 106e30acd1a58b3cf9f3c15abe1de83f1919e03b /arch/arm | |
parent | 3c3762957818dc902222733a8184f23102e24472 (diff) | |
parent | 5af634789c93b97cfb314a102436716be8fbc577 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (841 commits)
Staging: brcm80211: fix usage of roundup in structures
Staging: bcm: fix up network device reference counting
Staging: keucr: fix up US_ macro change
staging: brcm80211: brcmfmac: Removed codeversion from firmware filenames.
staging: brcm80211: Remove unnecessary header files.
staging: brcm80211: Remove unnecessary includes from bcmutils.c
staging: brcm80211: Removed unnecessary pktsetprio() function.
Staging: brcm80211: remove typedefs.h
Staging: brcm80211: remove uintptr typedef usage
Staging: hv: remove struct vmbus_channel_interface
Staging: hv: remove Open from struct vmbus_channel_interface
Staging: hv: storvsc: call vmbus_open directly
Staging: hv: netvsc: call vmbus_open directly
Staging: hv: channel: export vmbus_open to modules
Staging: hv: remove Close from struct vmbus_channel_interface
Staging: hv: netvsc: call vmbus_close directly
Staging: hv: storvsc: call vmbus_close directly
Staging: hv: channel: export vmbus_close to modules
Staging: hv: remove SendPacket from struct vmbus_channel_interface
Staging: hv: storvsc: call vmbus_sendpacket directly
...
Fix up conflicts in
drivers/staging/cx25821/cx25821-audio-upstream.c
drivers/staging/cx25821/cx25821-audio.h
due to warring whitespace cleanups (neither of which were all that great)
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/dsp.c | 85 | ||||
-rw-r--r-- | arch/arm/plat-omap/common.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/devices.c | 70 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/dsp.h | 31 |
5 files changed, 192 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 7352412e4917..60e51bcf53bd 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -108,6 +108,10 @@ obj-y += $(iommu-m) $(iommu-y) | |||
108 | i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o | 108 | i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o |
109 | obj-y += $(i2c-omap-m) $(i2c-omap-y) | 109 | obj-y += $(i2c-omap-m) $(i2c-omap-y) |
110 | 110 | ||
111 | ifneq ($(CONFIG_TIDSPBRIDGE),) | ||
112 | obj-y += dsp.o | ||
113 | endif | ||
114 | |||
111 | # Specific board support | 115 | # Specific board support |
112 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o | 116 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o |
113 | obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o | 117 | obj-$(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 000000000000..6feeeae6c21b --- /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 | |||
23 | extern phys_addr_t omap_dsp_get_mempool_base(void); | ||
24 | |||
25 | static struct platform_device *omap_dsp_pdev; | ||
26 | |||
27 | static 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 | |||
42 | static 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 | |||
71 | err_out: | ||
72 | platform_device_put(pdev); | ||
73 | return err; | ||
74 | } | ||
75 | module_init(omap_dsp_init); | ||
76 | |||
77 | static void __exit omap_dsp_exit(void) | ||
78 | { | ||
79 | platform_device_unregister(omap_dsp_pdev); | ||
80 | } | ||
81 | module_exit(omap_dsp_exit); | ||
82 | |||
83 | MODULE_AUTHOR("Hiroshi DOYU"); | ||
84 | MODULE_DESCRIPTION("TI's OMAP DSP platform device registration"); | ||
85 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index 221a675ebbae..f04731820301 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <plat/common.h> | 19 | #include <plat/common.h> |
20 | #include <plat/board.h> | 20 | #include <plat/board.h> |
21 | #include <plat/vram.h> | 21 | #include <plat/vram.h> |
22 | #include <plat/dsp.h> | ||
22 | 23 | ||
23 | 24 | ||
24 | #define NO_LENGTH_CHECK 0xffffffff | 25 | #define NO_LENGTH_CHECK 0xffffffff |
@@ -64,4 +65,5 @@ void __init omap_reserve(void) | |||
64 | { | 65 | { |
65 | omapfb_reserve_sdram_memblock(); | 66 | omapfb_reserve_sdram_memblock(); |
66 | omap_vram_reserve_sdram_memblock(); | 67 | omap_vram_reserve_sdram_memblock(); |
68 | omap_dsp_reserve_sdram_memblock(); | ||
67 | } | 69 | } |
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 1e2383eae638..6f42a18b8aa4 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/memblock.h> | ||
18 | 19 | ||
19 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
@@ -231,6 +232,75 @@ static void omap_init_uwire(void) | |||
231 | static inline void omap_init_uwire(void) {} | 232 | static inline void omap_init_uwire(void) {} |
232 | #endif | 233 | #endif |
233 | 234 | ||
235 | /*-------------------------------------------------------------------------*/ | ||
236 | |||
237 | #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) | ||
238 | |||
239 | static struct resource wdt_resources[] = { | ||
240 | { | ||
241 | .flags = IORESOURCE_MEM, | ||
242 | }, | ||
243 | }; | ||
244 | |||
245 | static struct platform_device omap_wdt_device = { | ||
246 | .name = "omap_wdt", | ||
247 | .id = -1, | ||
248 | .num_resources = ARRAY_SIZE(wdt_resources), | ||
249 | .resource = wdt_resources, | ||
250 | }; | ||
251 | |||
252 | static void omap_init_wdt(void) | ||
253 | { | ||
254 | if (cpu_is_omap16xx()) | ||
255 | wdt_resources[0].start = 0xfffeb000; | ||
256 | else if (cpu_is_omap2420()) | ||
257 | wdt_resources[0].start = 0x48022000; /* WDT2 */ | ||
258 | else if (cpu_is_omap2430()) | ||
259 | wdt_resources[0].start = 0x49016000; /* WDT2 */ | ||
260 | else if (cpu_is_omap343x()) | ||
261 | wdt_resources[0].start = 0x48314000; /* WDT2 */ | ||
262 | else if (cpu_is_omap44xx()) | ||
263 | wdt_resources[0].start = 0x4a314000; | ||
264 | else | ||
265 | return; | ||
266 | |||
267 | wdt_resources[0].end = wdt_resources[0].start + 0x4f; | ||
268 | |||
269 | (void) platform_device_register(&omap_wdt_device); | ||
270 | } | ||
271 | #else | ||
272 | static inline void omap_init_wdt(void) {} | ||
273 | #endif | ||
274 | |||
275 | #if defined(CONFIG_TIDSPBRIDGE) || defined(CONFIG_TIDSPBRIDGE_MODULE) | ||
276 | |||
277 | static phys_addr_t omap_dsp_phys_mempool_base; | ||
278 | |||
279 | void __init omap_dsp_reserve_sdram_memblock(void) | ||
280 | { | ||
281 | phys_addr_t size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE; | ||
282 | phys_addr_t paddr; | ||
283 | |||
284 | if (!size) | ||
285 | return; | ||
286 | |||
287 | paddr = __memblock_alloc_base(size, SZ_1M, MEMBLOCK_REAL_LIMIT); | ||
288 | if (!paddr) { | ||
289 | pr_err("%s: failed to reserve %x bytes\n", | ||
290 | __func__, size); | ||
291 | return; | ||
292 | } | ||
293 | |||
294 | omap_dsp_phys_mempool_base = paddr; | ||
295 | } | ||
296 | |||
297 | phys_addr_t omap_dsp_get_mempool_base(void) | ||
298 | { | ||
299 | return omap_dsp_phys_mempool_base; | ||
300 | } | ||
301 | EXPORT_SYMBOL(omap_dsp_get_mempool_base); | ||
302 | #endif | ||
303 | |||
234 | /* | 304 | /* |
235 | * This gets called after board-specific INIT_MACHINE, and initializes most | 305 | * This gets called after board-specific INIT_MACHINE, and initializes most |
236 | * on-chip peripherals accessible on this board (except for few like USB): | 306 | * on-chip peripherals accessible on this board (except for few like USB): |
diff --git a/arch/arm/plat-omap/include/plat/dsp.h b/arch/arm/plat-omap/include/plat/dsp.h new file mode 100644 index 000000000000..9c604b390f9f --- /dev/null +++ b/arch/arm/plat-omap/include/plat/dsp.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef __OMAP_DSP_H__ | ||
2 | #define __OMAP_DSP_H__ | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct omap_dsp_platform_data { | ||
7 | void (*dsp_set_min_opp) (u8 opp_id); | ||
8 | u8 (*dsp_get_opp) (void); | ||
9 | void (*cpu_set_freq) (unsigned long f); | ||
10 | unsigned long (*cpu_get_freq) (void); | ||
11 | unsigned long mpu_speed[6]; | ||
12 | |||
13 | /* functions to write and read PRCM registers */ | ||
14 | void (*dsp_prm_write)(u32, s16 , u16); | ||
15 | u32 (*dsp_prm_read)(s16 , u16); | ||
16 | u32 (*dsp_prm_rmw_bits)(u32, u32, s16, s16); | ||
17 | void (*dsp_cm_write)(u32, s16 , u16); | ||
18 | u32 (*dsp_cm_read)(s16 , u16); | ||
19 | u32 (*dsp_cm_rmw_bits)(u32, u32, s16, s16); | ||
20 | |||
21 | phys_addr_t phys_mempool_base; | ||
22 | phys_addr_t phys_mempool_size; | ||
23 | }; | ||
24 | |||
25 | #if defined(CONFIG_TIDSPBRIDGE) || defined(CONFIG_TIDSPBRIDGE_MODULE) | ||
26 | extern void omap_dsp_reserve_sdram_memblock(void); | ||
27 | #else | ||
28 | static inline void omap_dsp_reserve_sdram_memblock(void) { } | ||
29 | #endif | ||
30 | |||
31 | #endif | ||