162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright 2003, 2007 Simtec Electronics
462306a36Sopenharmony_ci *	http://armlinux.simtec.co.uk/
562306a36Sopenharmony_ci *	Ben Dooks <ben@simtec.co.uk>
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * S3C - Memory map definitions (virtual addresses)
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#ifndef __ASM_PLAT_MAP_H
1162306a36Sopenharmony_ci#define __ASM_PLAT_MAP_H __FILE__
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci/* Fit all our registers in at 0xF6000000 upwards, trying to use as
1462306a36Sopenharmony_ci * little of the VA space as possible so vmalloc and friends have a
1562306a36Sopenharmony_ci * better chance of getting memory.
1662306a36Sopenharmony_ci *
1762306a36Sopenharmony_ci * we try to ensure stuff like the IRQ registers are available for
1862306a36Sopenharmony_ci * an single MOVS instruction (ie, only 8 bits of set data)
1962306a36Sopenharmony_ci */
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci#define S3C_ADDR_BASE	0xF6000000
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci#ifndef __ASSEMBLY__
2462306a36Sopenharmony_ci#define S3C_ADDR(x)	((void __iomem __force *)S3C_ADDR_BASE + (x))
2562306a36Sopenharmony_ci#else
2662306a36Sopenharmony_ci#define S3C_ADDR(x)	(S3C_ADDR_BASE + (x))
2762306a36Sopenharmony_ci#endif
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci#define S3C_VA_IRQ	S3C_ADDR(0x00000000)	/* irq controller(s) */
3062306a36Sopenharmony_ci#define S3C_VA_SYS	S3C_ADDR(0x00100000)	/* system control */
3162306a36Sopenharmony_ci#define S3C_VA_MEM	S3C_ADDR(0x00200000)	/* memory control */
3262306a36Sopenharmony_ci#define S3C_VA_TIMER	S3C_ADDR(0x00300000)	/* timer block */
3362306a36Sopenharmony_ci#define S3C_VA_WATCHDOG	S3C_ADDR(0x00400000)	/* watchdog */
3462306a36Sopenharmony_ci#define S3C_VA_UART	S3C_ADDR(0x01000000)	/* UART */
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci/* ISA device mapping for BAST to use with inb()/outb() on 8-bit I/O.
3762306a36Sopenharmony_ci * 16-bit I/O on BAST now requires driver modifications to manually
3862306a36Sopenharmony_ci * ioremap CS3.
3962306a36Sopenharmony_ci */
4062306a36Sopenharmony_ci#define S3C24XX_VA_ISA_BYTE	PCI_IOBASE
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci/* This is used for the CPU specific mappings that may be needed, so that
4362306a36Sopenharmony_ci * they do not need to directly used S3C_ADDR() and thus make it easier to
4462306a36Sopenharmony_ci * modify the space for mapping.
4562306a36Sopenharmony_ci */
4662306a36Sopenharmony_ci#define S3C_ADDR_CPU(x)	S3C_ADDR(0x00500000 + (x))
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci#endif /* __ASM_PLAT_MAP_H */
49