diff options
author | Tony Lindgren <tony@atomide.com> | 2012-05-09 12:59:26 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-05-09 17:33:20 -0400 |
commit | 7f28427b85d1c5371f996b1390a9d6e9620b67ad (patch) | |
tree | 306fec1d466fab8d1403a39d13f532e8af7e4f60 /arch/arm/mach-omap2 | |
parent | 49b1a616a77d02b2b0034e0a5ad4bc2e565f2c58 (diff) |
ARM: OMAP2+: Move omap_dsp_reserve_sdram_memblock() to mach-omap2
This hardware exists only on 2430 and later omaps, so there's no
need to have it in plat-omap/devices.c.
Note that we don't have any users for exported omap_dsp_get_mempool_base(),
so we can make it static.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/dsp.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c index 3376388b317a..845309f146fe 100644 --- a/arch/arm/mach-omap2/dsp.c +++ b/arch/arm/mach-omap2/dsp.c | |||
@@ -28,8 +28,6 @@ | |||
28 | 28 | ||
29 | #include <plat/dsp.h> | 29 | #include <plat/dsp.h> |
30 | 30 | ||
31 | extern phys_addr_t omap_dsp_get_mempool_base(void); | ||
32 | |||
33 | static struct platform_device *omap_dsp_pdev; | 31 | static struct platform_device *omap_dsp_pdev; |
34 | 32 | ||
35 | static struct omap_dsp_platform_data omap_dsp_pdata __initdata = { | 33 | static struct omap_dsp_platform_data omap_dsp_pdata __initdata = { |
@@ -47,6 +45,31 @@ static struct omap_dsp_platform_data omap_dsp_pdata __initdata = { | |||
47 | .dsp_cm_rmw_bits = omap2_cm_rmw_mod_reg_bits, | 45 | .dsp_cm_rmw_bits = omap2_cm_rmw_mod_reg_bits, |
48 | }; | 46 | }; |
49 | 47 | ||
48 | static phys_addr_t omap_dsp_phys_mempool_base; | ||
49 | |||
50 | void __init omap_dsp_reserve_sdram_memblock(void) | ||
51 | { | ||
52 | phys_addr_t size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE; | ||
53 | phys_addr_t paddr; | ||
54 | |||
55 | if (!size) | ||
56 | return; | ||
57 | |||
58 | paddr = arm_memblock_steal(size, SZ_1M); | ||
59 | if (!paddr) { | ||
60 | pr_err("%s: failed to reserve %llx bytes\n", | ||
61 | __func__, (unsigned long long)size); | ||
62 | return; | ||
63 | } | ||
64 | |||
65 | omap_dsp_phys_mempool_base = paddr; | ||
66 | } | ||
67 | |||
68 | static phys_addr_t omap_dsp_get_mempool_base(void) | ||
69 | { | ||
70 | return omap_dsp_phys_mempool_base; | ||
71 | } | ||
72 | |||
50 | static int __init omap_dsp_init(void) | 73 | static int __init omap_dsp_init(void) |
51 | { | 74 | { |
52 | struct platform_device *pdev; | 75 | struct platform_device *pdev; |