summaryrefslogtreecommitdiff
path: root/common/include/asm/arch/hardware.h
blob: 7eff0f5fda7f2c632eb456c40ed0314b644b2bac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 *  include/asm/arch/hardware.h
 *
 *  Copyright (C) 2012 MStar Semiconductor.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 */
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H

#include <asm/arch/ips/ips_access.h>

#ifdef LINUX_COMPILE
#include <asm/arch/platform.h>
#endif /* LINUX_COMPILE */

#if !defined(CONFIG_MMU) && defined(CONFIG_CPU_MXU_ENABLE)

#ifndef __ASSEMBLY__
extern unsigned int DMA_zone_base;
#endif

#define MMU_PAGETABLE_ADDR (SDRAM_BASE + 0x4000)

/* WARNING: THIS IS NEEDED TO PROTECT PAGETABLE */
#define MACH_RESERVE_BOOTMEM()  do { \
        reserve_bootmem_node(pgdat, MMU_PAGETABLE_ADDR, 0x4000); \
        reserve_bootmem_node(pgdat, DMA_zone_base, DMA_ZONE_SIZE); \
    } while(0)

#endif /* !CONFIG_MMU && CONFIG_CPU_MXU_ENABLE */

#endif  /* __ASM_ARCH_HARDWARE_H */