18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright 2003, 2007 Simtec Electronics
48c2ecf20Sopenharmony_ci *	http://armlinux.simtec.co.uk/
58c2ecf20Sopenharmony_ci *	Ben Dooks <ben@simtec.co.uk>
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * S3C - Memory map definitions (virtual addresses)
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#ifndef __ASM_PLAT_MAP_H
118c2ecf20Sopenharmony_ci#define __ASM_PLAT_MAP_H __FILE__
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci/* Fit all our registers in at 0xF6000000 upwards, trying to use as
148c2ecf20Sopenharmony_ci * little of the VA space as possible so vmalloc and friends have a
158c2ecf20Sopenharmony_ci * better chance of getting memory.
168c2ecf20Sopenharmony_ci *
178c2ecf20Sopenharmony_ci * we try to ensure stuff like the IRQ registers are available for
188c2ecf20Sopenharmony_ci * an single MOVS instruction (ie, only 8 bits of set data)
198c2ecf20Sopenharmony_ci */
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci#define S3C_ADDR_BASE	0xF6000000
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__
248c2ecf20Sopenharmony_ci#define S3C_ADDR(x)	((void __iomem __force *)S3C_ADDR_BASE + (x))
258c2ecf20Sopenharmony_ci#else
268c2ecf20Sopenharmony_ci#define S3C_ADDR(x)	(S3C_ADDR_BASE + (x))
278c2ecf20Sopenharmony_ci#endif
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci#define S3C_VA_IRQ	S3C_ADDR(0x00000000)	/* irq controller(s) */
308c2ecf20Sopenharmony_ci#define S3C_VA_SYS	S3C_ADDR(0x00100000)	/* system control */
318c2ecf20Sopenharmony_ci#define S3C_VA_MEM	S3C_ADDR(0x00200000)	/* memory control */
328c2ecf20Sopenharmony_ci#define S3C_VA_TIMER	S3C_ADDR(0x00300000)	/* timer block */
338c2ecf20Sopenharmony_ci#define S3C_VA_WATCHDOG	S3C_ADDR(0x00400000)	/* watchdog */
348c2ecf20Sopenharmony_ci#define S3C_VA_UART	S3C_ADDR(0x01000000)	/* UART */
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci/* This is used for the CPU specific mappings that may be needed, so that
378c2ecf20Sopenharmony_ci * they do not need to directly used S3C_ADDR() and thus make it easier to
388c2ecf20Sopenharmony_ci * modify the space for mapping.
398c2ecf20Sopenharmony_ci */
408c2ecf20Sopenharmony_ci#define S3C_ADDR_CPU(x)	S3C_ADDR(0x00500000 + (x))
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci#endif /* __ASM_PLAT_MAP_H */
43