diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-20 11:46:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-20 11:46:11 -0400 |
commit | 1bbe44f69d7ea20740aaf5aba356e331a74b58b3 (patch) | |
tree | 4e71676275f2de09672d347244fc1b2bb67f39b1 /arch/sh/mm/consistent.c | |
parent | 8498ffd66774ce0e8550afc61a56b2cbeee77e9c (diff) | |
parent | 9b9d6b2a4f6df5544a10de44760755fe757259e5 (diff) |
Merge branch 'sh/for-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
sh: Provide a FLAT_PLAT_INIT() definition.
binfmt_flat: Stub in a FLAT_PLAT_INIT().
video: export sh_mobile_lcdc panel size
sh: select memchunk size using kernel cmdline
sh: export sh7723 VEU as VEU2H
input: migor_ts compile and detection fix
sh: remove MSTPCR defines from Migo-R header file
sh: Update sh7763rdp defconfig
sh: Add support sh7760fb to sh7763rdp board
sh: Add support sh_eth to sh7763rdp board
sh: Disable 64kB hugetlbpage size when using 64kB PAGE_SIZE.
sh: Don't export __{s,u}divsi3_i4i from SH-2 libgcc.
fix SH7705_CACHE_32KB compilation
sh: mach-x3proto: Fix up smc91x platform data.
Diffstat (limited to 'arch/sh/mm/consistent.c')
-rw-r--r-- | arch/sh/mm/consistent.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index b2ce014401b5..895bb3f335c7 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c | |||
@@ -95,6 +95,29 @@ void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | |||
95 | } | 95 | } |
96 | EXPORT_SYMBOL(dma_cache_sync); | 96 | EXPORT_SYMBOL(dma_cache_sync); |
97 | 97 | ||
98 | static int __init memchunk_setup(char *str) | ||
99 | { | ||
100 | return 1; /* accept anything that begins with "memchunk." */ | ||
101 | } | ||
102 | __setup("memchunk.", memchunk_setup); | ||
103 | |||
104 | static void memchunk_cmdline_override(char *name, unsigned long *sizep) | ||
105 | { | ||
106 | char *p = boot_command_line; | ||
107 | int k = strlen(name); | ||
108 | |||
109 | while ((p = strstr(p, "memchunk."))) { | ||
110 | p += 9; /* strlen("memchunk.") */ | ||
111 | if (!strncmp(name, p, k) && p[k] == '=') { | ||
112 | p += k + 1; | ||
113 | *sizep = memparse(p, NULL); | ||
114 | pr_info("%s: forcing memory chunk size to 0x%08lx\n", | ||
115 | name, *sizep); | ||
116 | break; | ||
117 | } | ||
118 | } | ||
119 | } | ||
120 | |||
98 | int platform_resource_setup_memory(struct platform_device *pdev, | 121 | int platform_resource_setup_memory(struct platform_device *pdev, |
99 | char *name, unsigned long memsize) | 122 | char *name, unsigned long memsize) |
100 | { | 123 | { |
@@ -109,6 +132,10 @@ int platform_resource_setup_memory(struct platform_device *pdev, | |||
109 | return -EINVAL; | 132 | return -EINVAL; |
110 | } | 133 | } |
111 | 134 | ||
135 | memchunk_cmdline_override(name, &memsize); | ||
136 | if (!memsize) | ||
137 | return 0; | ||
138 | |||
112 | buf = dma_alloc_coherent(NULL, memsize, &dma_handle, GFP_KERNEL); | 139 | buf = dma_alloc_coherent(NULL, memsize, &dma_handle, GFP_KERNEL); |
113 | if (!buf) { | 140 | if (!buf) { |
114 | pr_warning("%s: unable to allocate memory\n", name); | 141 | pr_warning("%s: unable to allocate memory\n", name); |