nommu: Add noMMU support to the DMA API
[deliverable/linux.git] / arch / arm / mm / nommu.c
CommitLineData
5924486d
RK
1/*
2 * linux/arch/arm/mm/nommu.c
3 *
4 * ARM uCLinux supporting functions.
5 */
6#include <linux/module.h>
e6b1b38c
RK
7#include <linux/mm.h>
8#include <linux/pagemap.h>
3ff1559e 9#include <linux/bootmem.h>
fced80c7 10#include <linux/io.h>
5924486d 11
e6b1b38c 12#include <asm/cacheflush.h>
37efe642 13#include <asm/sections.h>
5924486d 14#include <asm/page.h>
3ff1559e 15#include <asm/mach/arch.h>
5924486d 16
d111e8f9
RK
17#include "mm.h"
18
d111e8f9
RK
19/*
20 * Reserve the various regions of node 0
21 */
22void __init reserve_node_zero(pg_data_t *pgdat)
23{
24 /*
25 * Register the kernel text and data with bootmem.
26 * Note that this can only be in node 0.
27 */
28#ifdef CONFIG_XIP_KERNEL
37efe642 29 reserve_bootmem_node(pgdat, __pa(_data), _end - _data,
72a7fe39 30 BOOTMEM_DEFAULT);
d111e8f9 31#else
37efe642 32 reserve_bootmem_node(pgdat, __pa(_stext), _end - _stext,
72a7fe39 33 BOOTMEM_DEFAULT);
d111e8f9
RK
34#endif
35
36 /*
37 * Register the exception vector page.
38 * some architectures which the DRAM is the exception vector to trap,
39 * alloc_page breaks with error, although it is not NULL, but "0."
40 */
72a7fe39
BW
41 reserve_bootmem_node(pgdat, CONFIG_VECTORS_BASE, PAGE_SIZE,
42 BOOTMEM_DEFAULT);
d111e8f9
RK
43}
44
45/*
46 * paging_init() sets up the page tables, initialises the zone memory
47 * maps, and sets up the zero page, bad page and bad page tables.
48 */
4b5f32ce 49void __init paging_init(struct machine_desc *mdesc)
d111e8f9 50{
4b5f32ce 51 bootmem_init();
d111e8f9
RK
52}
53
80878d6c
RK
54/*
55 * We don't need to do anything here for nommu machines.
56 */
57void setup_mm_for_reboot(char mode)
58{
59}
60
e6b1b38c
RK
61void flush_dcache_page(struct page *page)
62{
63 __cpuc_flush_dcache_page(page_address(page));
64}
3e361225 65EXPORT_SYMBOL(flush_dcache_page);
e6b1b38c 66
3603ab2b
RK
67void __iomem *__arm_ioremap_pfn(unsigned long pfn, unsigned long offset,
68 size_t size, unsigned int mtype)
5924486d
RK
69{
70 if (pfn >= (0x100000000ULL >> PAGE_SHIFT))
71 return NULL;
72 return (void __iomem *) (offset + (pfn << PAGE_SHIFT));
73}
3603ab2b 74EXPORT_SYMBOL(__arm_ioremap_pfn);
5924486d 75
3603ab2b
RK
76void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size,
77 unsigned int mtype)
5924486d
RK
78{
79 return (void __iomem *)phys_addr;
80}
3603ab2b 81EXPORT_SYMBOL(__arm_ioremap);
5924486d 82
3ff1559e 83void __iounmap(volatile void __iomem *addr)
5924486d
RK
84{
85}
86EXPORT_SYMBOL(__iounmap);
This page took 0.309142 seconds and 5 git commands to generate.