diff options
author | Tony Lindgren <tony@atomide.com> | 2006-12-07 16:58:10 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-05-08 15:36:31 -0400 |
commit | c40fae9525e6c29c87a4f4361ff0a8d67a36e448 (patch) | |
tree | 00c3e0008b3e963c5a622245b951f1135e456c24 /arch/arm/plat-omap/devices.c | |
parent | f4e4c324a5f81f18156499d1ade3732ba1f5b523 (diff) |
ARM: OMAP: Sync core code with linux-omap
This patch syncs omap specific core code with linux-omap.
Most of the changes are needed to fix bitrot caused by
driver updates in linux-omap tree.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-omap/devices.c')
-rw-r--r-- | arch/arm/plat-omap/devices.c | 70 |
1 files changed, 67 insertions, 3 deletions
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index eeb33fed6f7c..2fac7d3f2af3 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -25,7 +25,71 @@ | |||
25 | #include <asm/arch/gpio.h> | 25 | #include <asm/arch/gpio.h> |
26 | #include <asm/arch/menelaus.h> | 26 | #include <asm/arch/menelaus.h> |
27 | 27 | ||
28 | #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) | 28 | #if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE) |
29 | |||
30 | #include "../plat-omap/dsp/dsp_common.h" | ||
31 | |||
32 | static struct dsp_platform_data dsp_pdata = { | ||
33 | .kdev_list = LIST_HEAD_INIT(dsp_pdata.kdev_list), | ||
34 | }; | ||
35 | |||
36 | static struct resource omap_dsp_resources[] = { | ||
37 | { | ||
38 | .name = "dsp_mmu", | ||
39 | .start = -1, | ||
40 | .flags = IORESOURCE_IRQ, | ||
41 | }, | ||
42 | }; | ||
43 | |||
44 | static struct platform_device omap_dsp_device = { | ||
45 | .name = "dsp", | ||
46 | .id = -1, | ||
47 | .num_resources = ARRAY_SIZE(omap_dsp_resources), | ||
48 | .resource = omap_dsp_resources, | ||
49 | .dev = { | ||
50 | .platform_data = &dsp_pdata, | ||
51 | }, | ||
52 | }; | ||
53 | |||
54 | static inline void omap_init_dsp(void) | ||
55 | { | ||
56 | struct resource *res; | ||
57 | int irq; | ||
58 | |||
59 | if (cpu_is_omap15xx()) | ||
60 | irq = INT_1510_DSP_MMU; | ||
61 | else if (cpu_is_omap16xx()) | ||
62 | irq = INT_1610_DSP_MMU; | ||
63 | else if (cpu_is_omap24xx()) | ||
64 | irq = INT_24XX_DSP_MMU; | ||
65 | |||
66 | res = platform_get_resource_byname(&omap_dsp_device, | ||
67 | IORESOURCE_IRQ, "dsp_mmu"); | ||
68 | res->start = irq; | ||
69 | |||
70 | platform_device_register(&omap_dsp_device); | ||
71 | } | ||
72 | |||
73 | int dsp_kfunc_device_register(struct dsp_kfunc_device *kdev) | ||
74 | { | ||
75 | static DEFINE_MUTEX(dsp_pdata_lock); | ||
76 | |||
77 | mutex_init(&kdev->lock); | ||
78 | |||
79 | mutex_lock(&dsp_pdata_lock); | ||
80 | list_add_tail(&kdev->entry, &dsp_pdata.kdev_list); | ||
81 | mutex_unlock(&dsp_pdata_lock); | ||
82 | |||
83 | return 0; | ||
84 | } | ||
85 | EXPORT_SYMBOL(dsp_kfunc_device_register); | ||
86 | |||
87 | #else | ||
88 | static inline void omap_init_dsp(void) { } | ||
89 | #endif /* CONFIG_OMAP_DSP */ | ||
90 | |||
91 | /*-------------------------------------------------------------------------*/ | ||
92 | #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) | ||
29 | 93 | ||
30 | #define OMAP1_I2C_BASE 0xfffb3800 | 94 | #define OMAP1_I2C_BASE 0xfffb3800 |
31 | #define OMAP2_I2C_BASE1 0x48070000 | 95 | #define OMAP2_I2C_BASE1 0x48070000 |
@@ -376,7 +440,7 @@ static inline void omap_init_wdt(void) {} | |||
376 | 440 | ||
377 | /*-------------------------------------------------------------------------*/ | 441 | /*-------------------------------------------------------------------------*/ |
378 | 442 | ||
379 | #if defined(CONFIG_OMAP_RNG) || defined(CONFIG_OMAP_RNG_MODULE) | 443 | #if defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE) |
380 | 444 | ||
381 | #ifdef CONFIG_ARCH_OMAP24XX | 445 | #ifdef CONFIG_ARCH_OMAP24XX |
382 | #define OMAP_RNG_BASE 0x480A0000 | 446 | #define OMAP_RNG_BASE 0x480A0000 |
@@ -436,6 +500,7 @@ static int __init omap_init_devices(void) | |||
436 | /* please keep these calls, and their implementations above, | 500 | /* please keep these calls, and their implementations above, |
437 | * in alphabetical order so they're easier to sort through. | 501 | * in alphabetical order so they're easier to sort through. |
438 | */ | 502 | */ |
503 | omap_init_dsp(); | ||
439 | omap_init_i2c(); | 504 | omap_init_i2c(); |
440 | omap_init_kp(); | 505 | omap_init_kp(); |
441 | omap_init_mmc(); | 506 | omap_init_mmc(); |
@@ -446,4 +511,3 @@ static int __init omap_init_devices(void) | |||
446 | return 0; | 511 | return 0; |
447 | } | 512 | } |
448 | arch_initcall(omap_init_devices); | 513 | arch_initcall(omap_init_devices); |
449 | |||