1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2006 Freescale Semiconductor, Inc.
4 * Dave Liu <daveliu@freescale.com>
6 * Copyright (C) 2007 Logic Product Development, Inc.
7 * Peter Barada <peterb@logicpd.com>
9 * Copyright (C) 2007 MontaVista Software, Inc.
10 * Anton Vorontsov <avorontsov@ru.mvista.com>
13 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
15 * (C) Copyright 2010-2013
16 * Lukas Roggli, KEYMILE Ltd, lukas.roggli@keymile.com
17 * Holger Brunck, Keymile GmbH, holger.bruncl@keymile.com
24 * High Level Configuration Options
26 #if defined(CONFIG_KMSUPX5)
27 #define CONFIG_KM_BOARD_NAME "kmsupx5"
28 #define CONFIG_HOSTNAME "kmsupx5"
29 #elif defined(CONFIG_TUGE1)
30 #define CONFIG_KM_BOARD_NAME "tuge1"
31 #define CONFIG_HOSTNAME "tuge1"
32 #elif defined(CONFIG_TUXX1) /* TUXX1 board (tuxa1/tuda1) specific */
33 #define CONFIG_KM_BOARD_NAME "tuxx1"
34 #define CONFIG_HOSTNAME "tuxx1"
35 #elif defined(CONFIG_KMOPTI2)
36 #define CONFIG_KM_BOARD_NAME "kmopti2"
37 #define CONFIG_HOSTNAME "kmopti2"
38 #elif defined(CONFIG_KMTEPR2)
39 #define CONFIG_KM_BOARD_NAME "kmtepr2"
40 #define CONFIG_HOSTNAME "kmtepr2"
42 #error ("Board not supported")
45 /* include common defines/options for all 8321 Keymile boards */
46 #include "km/km8321-common.h"
48 #define CONFIG_SYS_APP1_BASE 0xA0000000 /* PAXG */
49 #define CONFIG_SYS_APP1_SIZE 256 /* Megabytes */
50 #if defined(CONFIG_TUXX1) || defined(CONFIG_KMOPTI2) || defined(CONFIG_KMTEPR2)
51 #define CONFIG_SYS_APP2_BASE 0xB0000000 /* PINC3 */
52 #define CONFIG_SYS_APP2_SIZE 256 /* Megabytes */
56 * Init Local Bus Memory Controller:
58 * Bank Bus Machine PortSz Size TUDA1 TUXA1 TUGE1 KMSUPX4 KMOPTI2
59 * -----------------------------------------------------------------------------
60 * 2 Local GPCM 8 bit 256MB PAXG LPXF PAXI LPXF PAXE
61 * 3 Local GPCM 8 bit 256MB PINC3 PINC2 unused unused OPI2(16 bit)
63 * Device on board (continued)
64 * Bank Bus Machine PortSz Size KMTEPR2
65 * -----------------------------------------------------------------------------
66 * 2 Local GPCM 8 bit 256MB NVRAM
67 * 3 Local GPCM 8 bit 256MB TEP2 (16 bit)
70 #if defined(CONFIG_KMTEPRO2)
72 * Configuration for C2 (NVRAM) on the local bus
74 #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_APP1_BASE
75 #define CONFIG_SYS_LBLAWAR2_PRELIM (LBLAWAR_EN | LBLAWAR_256MB)
76 #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_APP1_BASE | \
80 #define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_APP1_SIZE) | \
90 * Configuration for C2 on the local bus
92 /* Window base at flash base */
93 #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_APP1_BASE
94 /* Window size: 256 MB */
95 #define CONFIG_SYS_LBLAWAR2_PRELIM (LBLAWAR_EN | LBLAWAR_256MB)
97 #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_APP1_BASE | \
102 #define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_APP1_SIZE) | \
107 OR_GPCM_EHTR_CLEAR | \
111 #if defined(CONFIG_TUXX1)
113 * Configuration for C3 on the local bus
115 /* Access window base at PINC3 base */
116 #define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_APP2_BASE
117 /* Window size: 256 MB */
118 #define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_256MB)
120 #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_APP2_BASE | \
125 #define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_APP2_SIZE) | \
132 #define CONFIG_SYS_MAMR (MxMR_GPL_x4DIS | \
137 #if defined(CONFIG_KMOPTI2) || defined(CONFIG_KMTEPR2)
139 * Configuration for C3 on the local bus
141 #define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_APP2_BASE
142 #define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_256MB)
143 #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_APP2_BASE | \
147 #define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_APP2_SIZE) | \
149 OR_GPCM_TRLX_CLEAR | \
156 /* APP1: icache cacheable, but dcache-inhibit and guarded */
157 #define CONFIG_SYS_IBAT5L (CONFIG_SYS_APP1_BASE | \
160 /* 512M should also include APP2... */
161 #define CONFIG_SYS_IBAT5U (CONFIG_SYS_APP1_BASE | \
165 #define CONFIG_SYS_DBAT5L (CONFIG_SYS_APP1_BASE | \
167 BATL_CACHEINHIBIT | \
169 #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
171 #if defined(CONFIG_TUGE1) || defined(CONFIG_KMSUPX5)
172 #define CONFIG_SYS_IBAT6L (0)
173 #define CONFIG_SYS_IBAT6U (0)
174 #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
176 /* APP2: icache cacheable, but dcache-inhibit and guarded */
177 #define CONFIG_SYS_IBAT6L (CONFIG_SYS_APP2_BASE | \
180 #define CONFIG_SYS_IBAT6U (CONFIG_SYS_APP2_BASE | \
184 #define CONFIG_SYS_DBAT6L (CONFIG_SYS_APP2_BASE | \
186 BATL_CACHEINHIBIT | \
189 #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
191 #define CONFIG_SYS_IBAT7L (0)
192 #define CONFIG_SYS_IBAT7U (0)
193 #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
194 #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
196 #endif /* __CONFIG_H */