aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-24 11:45:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-24 11:45:53 -0400
commit9fe9293d14e8418f29136216f0180f47270a916a (patch)
tree62e4efbb4833940a6eafd98d950275c5b3f08c66 /arch/m68knommu/kernel
parenta4277bf122e907e4fec509fc0bd9bf5fde30b14e (diff)
parent64f68416e794d59a42ddffdf1c5b7f026a4f23d5 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: update the default config for the ColdFire 5407C3 board m68knommu: update the default config for the ColdFire 5307C3 board m68knommu: update the default config for the ColdFire 5257EVB board m68knommu: update the default config for the ColdFire 5249EVB. m68knommu: add a defconfig for the ColdFire M5272C3 board m68knommu: update the defconfig for the ColdFire 5208evb board m68knommu: fix DMA support for ColdFire m68knommu: remove unused kernel stats offsets m68knommu: fix missing .data.cacheline_aligned section m68knommu: Fixed GPIO pin initialization for CONFIG_M5271 FEC.
Diffstat (limited to 'arch/m68knommu/kernel')
-rw-r--r--arch/m68knommu/kernel/asm-offsets.c6
-rw-r--r--arch/m68knommu/kernel/dma.c37
-rw-r--r--arch/m68knommu/kernel/vmlinux.lds.S2
3 files changed, 36 insertions, 9 deletions
diff --git a/arch/m68knommu/kernel/asm-offsets.c b/arch/m68knommu/kernel/asm-offsets.c
index c785d07c02cc..f500dd6935d6 100644
--- a/arch/m68knommu/kernel/asm-offsets.c
+++ b/arch/m68knommu/kernel/asm-offsets.c
@@ -30,9 +30,6 @@ int main(void)
30 DEFINE(TASK_MM, offsetof(struct task_struct, mm)); 30 DEFINE(TASK_MM, offsetof(struct task_struct, mm));
31 DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); 31 DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
32 32
33 /* offsets into the kernel_stat struct */
34 DEFINE(STAT_IRQ, offsetof(struct kernel_stat, irqs));
35
36 /* offsets into the irq_cpustat_t struct */ 33 /* offsets into the irq_cpustat_t struct */
37 DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending)); 34 DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending));
38 35
@@ -69,9 +66,6 @@ int main(void)
69 DEFINE(PT_VECTOR, offsetof(struct pt_regs, pc) + 4); 66 DEFINE(PT_VECTOR, offsetof(struct pt_regs, pc) + 4);
70#endif 67#endif
71 68
72 /* offsets into the kernel_stat struct */
73 DEFINE(STAT_IRQ, offsetof(struct kernel_stat, irqs));
74
75 /* signal defines */ 69 /* signal defines */
76 DEFINE(SIGSEGV, SIGSEGV); 70 DEFINE(SIGSEGV, SIGSEGV);
77 DEFINE(SEGV_MAPERR, SEGV_MAPERR); 71 DEFINE(SEGV_MAPERR, SEGV_MAPERR);
diff --git a/arch/m68knommu/kernel/dma.c b/arch/m68knommu/kernel/dma.c
index 936125806638..aaf38bbbb6cd 100644
--- a/arch/m68knommu/kernel/dma.c
+++ b/arch/m68knommu/kernel/dma.c
@@ -7,10 +7,9 @@
7 7
8#include <linux/types.h> 8#include <linux/types.h>
9#include <linux/mm.h> 9#include <linux/mm.h>
10#include <linux/string.h>
11#include <linux/device.h> 10#include <linux/device.h>
12#include <linux/dma-mapping.h> 11#include <linux/dma-mapping.h>
13#include <asm/io.h> 12#include <asm/cacheflush.h>
14 13
15void *dma_alloc_coherent(struct device *dev, size_t size, 14void *dma_alloc_coherent(struct device *dev, size_t size,
16 dma_addr_t *dma_handle, gfp_t gfp) 15 dma_addr_t *dma_handle, gfp_t gfp)
@@ -36,7 +35,39 @@ void dma_free_coherent(struct device *dev, size_t size,
36 free_pages((unsigned long)vaddr, get_order(size)); 35 free_pages((unsigned long)vaddr, get_order(size));
37} 36}
38 37
39void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size, enum dma_data_direction dir) 38void dma_sync_single_for_device(struct device *dev, dma_addr_t handle,
39 size_t size, enum dma_data_direction dir)
40{ 40{
41 switch (dir) {
42 case DMA_TO_DEVICE:
43 flush_dcache_range(handle, size);
44 break;
45 case DMA_FROM_DEVICE:
46 /* Should be clear already */
47 break;
48 default:
49 if (printk_ratelimit())
50 printk("dma_sync_single_for_device: unsupported dir %u\n", dir);
51 break;
52 }
53}
54
55EXPORT_SYMBOL(dma_sync_single_for_device);
56dma_addr_t dma_map_single(struct device *dev, void *addr, size_t size,
57 enum dma_data_direction dir)
58{
59 dma_addr_t handle = virt_to_phys(addr);
60 flush_dcache_range(handle, size);
61 return handle;
41} 62}
63EXPORT_SYMBOL(dma_map_single);
42 64
65dma_addr_t dma_map_page(struct device *dev, struct page *page,
66 unsigned long offset, size_t size,
67 enum dma_data_direction dir)
68{
69 dma_addr_t handle = page_to_phys(page) + offset;
70 dma_sync_single_for_device(dev, handle, size, dir);
71 return handle;
72}
73EXPORT_SYMBOL(dma_map_page);
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
index 69ba9b10767a..b7fe505e358d 100644
--- a/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/arch/m68knommu/kernel/vmlinux.lds.S
@@ -147,6 +147,8 @@ SECTIONS {
147 . = ALIGN(4); 147 . = ALIGN(4);
148 _sdata = . ; 148 _sdata = . ;
149 DATA_DATA 149 DATA_DATA
150 . = ALIGN(32);
151 *(.data.cacheline_aligned)
150 . = ALIGN(8192) ; 152 . = ALIGN(8192) ;
151 *(.data.init_task) 153 *(.data.init_task)
152 _edata = . ; 154 _edata = . ;