Commit 9fe9293d authored by Linus Torvalds's avatar Linus Torvalds

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.
parents a4277bf1 64f68416
......@@ -16,6 +16,7 @@ config MMU
config NO_DMA
bool
depends on !COLDFIRE
default y
config FPU
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -30,9 +30,6 @@ int main(void)
DEFINE(TASK_MM, offsetof(struct task_struct, mm));
DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
/* offsets into the kernel_stat struct */
DEFINE(STAT_IRQ, offsetof(struct kernel_stat, irqs));
/* offsets into the irq_cpustat_t struct */
DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending));
......@@ -69,9 +66,6 @@ int main(void)
DEFINE(PT_VECTOR, offsetof(struct pt_regs, pc) + 4);
#endif
/* offsets into the kernel_stat struct */
DEFINE(STAT_IRQ, offsetof(struct kernel_stat, irqs));
/* signal defines */
DEFINE(SIGSEGV, SIGSEGV);
DEFINE(SEGV_MAPERR, SEGV_MAPERR);
......
......@@ -7,10 +7,9 @@
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <asm/io.h>
#include <asm/cacheflush.h>
void *dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t gfp)
......@@ -36,7 +35,39 @@ void dma_free_coherent(struct device *dev, size_t size,
free_pages((unsigned long)vaddr, get_order(size));
}
void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size, enum dma_data_direction dir)
void dma_sync_single_for_device(struct device *dev, dma_addr_t handle,
size_t size, enum dma_data_direction dir)
{
switch (dir) {
case DMA_TO_DEVICE:
flush_dcache_range(handle, size);
break;
case DMA_FROM_DEVICE:
/* Should be clear already */
break;
default:
if (printk_ratelimit())
printk("dma_sync_single_for_device: unsupported dir %u\n", dir);
break;
}
}
EXPORT_SYMBOL(dma_sync_single_for_device);
dma_addr_t dma_map_single(struct device *dev, void *addr, size_t size,
enum dma_data_direction dir)
{
dma_addr_t handle = virt_to_phys(addr);
flush_dcache_range(handle, size);
return handle;
}
EXPORT_SYMBOL(dma_map_single);
dma_addr_t dma_map_page(struct device *dev, struct page *page,
unsigned long offset, size_t size,
enum dma_data_direction dir)
{
dma_addr_t handle = page_to_phys(page) + offset;
dma_sync_single_for_device(dev, handle, size, dir);
return handle;
}
EXPORT_SYMBOL(dma_map_page);
......@@ -147,6 +147,8 @@ SECTIONS {
. = ALIGN(4);
_sdata = . ;
DATA_DATA
. = ALIGN(32);
*(.data.cacheline_aligned)
. = ALIGN(8192) ;
*(.data.init_task)
_edata = . ;
......
......@@ -189,10 +189,15 @@ static void __init m527x_fec_init(void)
m527x_fec_irq_init(0);
/* Set multi-function pins to ethernet mode for fec0 */
#if defined(CONFIG_M5271)
v = readb(MCF_IPSBAR + 0x100047);
writeb(v | 0xf0, MCF_IPSBAR + 0x100047);
#else
par = readw(MCF_IPSBAR + 0x100082);
writew(par | 0xf00, MCF_IPSBAR + 0x100082);
v = readb(MCF_IPSBAR + 0x100078);
writeb(v | 0xc0, MCF_IPSBAR + 0x100078);
#endif
#ifdef CONFIG_FEC2
m527x_fec_irq_init(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment