1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * arch/arm/plat-omap/include/mach/tc.h
4  *
5  * OMAP Traffic Controller
6  *
7  * Copyright (C) 2004 Nokia Corporation
8  * Author: Imre Deak <imre.deak@nokia.com>
9  */
10 
11 #ifndef __ASM_ARCH_TC_H
12 #define __ASM_ARCH_TC_H
13 
14 #define TCMIF_BASE		0xfffecc00
15 #define OMAP_TC_OCPT1_PRIOR	(TCMIF_BASE + 0x00)
16 #define OMAP_TC_EMIFS_PRIOR	(TCMIF_BASE + 0x04)
17 #define OMAP_TC_EMIFF_PRIOR	(TCMIF_BASE + 0x08)
18 #define EMIFS_CONFIG		(TCMIF_BASE + 0x0c)
19 #define EMIFS_CS0_CONFIG	(TCMIF_BASE + 0x10)
20 #define EMIFS_CS1_CONFIG	(TCMIF_BASE + 0x14)
21 #define EMIFS_CS2_CONFIG	(TCMIF_BASE + 0x18)
22 #define EMIFS_CS3_CONFIG	(TCMIF_BASE + 0x1c)
23 #define EMIFF_SDRAM_CONFIG	(TCMIF_BASE + 0x20)
24 #define EMIFF_MRS		(TCMIF_BASE + 0x24)
25 #define TC_TIMEOUT1		(TCMIF_BASE + 0x28)
26 #define TC_TIMEOUT2		(TCMIF_BASE + 0x2c)
27 #define TC_TIMEOUT3		(TCMIF_BASE + 0x30)
28 #define TC_ENDIANISM		(TCMIF_BASE + 0x34)
29 #define EMIFF_SDRAM_CONFIG_2	(TCMIF_BASE + 0x3c)
30 #define EMIF_CFG_DYNAMIC_WS	(TCMIF_BASE + 0x40)
31 #define EMIFS_ACS0		(TCMIF_BASE + 0x50)
32 #define EMIFS_ACS1		(TCMIF_BASE + 0x54)
33 #define EMIFS_ACS2		(TCMIF_BASE + 0x58)
34 #define EMIFS_ACS3		(TCMIF_BASE + 0x5c)
35 #define OMAP_TC_OCPT2_PRIOR	(TCMIF_BASE + 0xd0)
36 
37 /* external EMIFS chipselect regions */
38 #define	OMAP_CS0_PHYS		0x00000000
39 #define	OMAP_CS0_SIZE		SZ_64M
40 
41 #define	OMAP_CS1_PHYS		0x04000000
42 #define	OMAP_CS1_SIZE		SZ_64M
43 
44 #define	OMAP_CS1A_PHYS		OMAP_CS1_PHYS
45 #define	OMAP_CS1A_SIZE		SZ_32M
46 
47 #define	OMAP_CS1B_PHYS		(OMAP_CS1A_PHYS + OMAP_CS1A_SIZE)
48 #define	OMAP_CS1B_SIZE		SZ_32M
49 
50 #define	OMAP_CS2_PHYS		0x08000000
51 #define	OMAP_CS2_SIZE		SZ_64M
52 
53 #define	OMAP_CS2A_PHYS		OMAP_CS2_PHYS
54 #define	OMAP_CS2A_SIZE		SZ_32M
55 
56 #define	OMAP_CS2B_PHYS		(OMAP_CS2A_PHYS + OMAP_CS2A_SIZE)
57 #define	OMAP_CS2B_SIZE		SZ_32M
58 
59 #define	OMAP_CS3_PHYS		0x0c000000
60 #define	OMAP_CS3_SIZE		SZ_64M
61 
62 #ifndef	__ASSEMBLER__
63 
64 /* EMIF Slow Interface Configuration Register */
65 #define OMAP_EMIFS_CONFIG_FR		(1 << 4)
66 #define OMAP_EMIFS_CONFIG_PDE		(1 << 3)
67 #define OMAP_EMIFS_CONFIG_PWD_EN	(1 << 2)
68 #define OMAP_EMIFS_CONFIG_BM		(1 << 1)
69 #define OMAP_EMIFS_CONFIG_WP		(1 << 0)
70 
71 #define EMIFS_CCS(n)		(EMIFS_CS0_CONFIG + (4 * (n)))
72 #define EMIFS_ACS(n)		(EMIFS_ACS0 + (4 * (n)))
73 
74 #endif	/* __ASSEMBLER__ */
75 
76 #endif	/* __ASM_ARCH_TC_H */
77