blob: b118a917542855c34ed3f4529095b7eecd5a5523 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
TsiChungLiew2e0aeef2007-07-05 22:39:07 -05002/*
3 * ColdFire Internal Memory Map and Defines
4 *
Alison Wangfdc2fb12012-10-18 19:25:51 +00005 * Copyright 2004-2012 Freescale Semiconductor, Inc.
TsiChungLiew2e0aeef2007-07-05 22:39:07 -05006 * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
TsiChungLiew2e0aeef2007-07-05 22:39:07 -05007 */
8
9#ifndef __IMMAP_H
10#define __IMMAP_H
Stefan Roesef1110122007-07-16 13:11:12 +020011
Tom Rini3cb9c372023-10-12 19:03:56 -040012#include <config.h>
TsiChung Liewb354aef2009-06-12 11:29:00 +000013#if defined(CONFIG_MCF520x)
14#include <asm/immap_520x.h>
15#include <asm/m520x.h>
16
Tom Rini364d0022023-01-10 11:19:45 -050017#define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x4000))
TsiChung Liewb354aef2009-06-12 11:29:00 +000018
19/* Timer */
Marek Vasut38908f52023-03-23 01:20:39 +010020#if CONFIG_IS_ENABLED(MCFTMR)
Tom Rini364d0022023-01-10 11:19:45 -050021#define CFG_SYS_UDELAY_BASE (MMAP_DTMR0)
22#define CFG_SYS_TMR_BASE (MMAP_DTMR1)
23#define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprh0)
24#define CFG_SYS_TMRINTR_NO (INT0_HI_DTMR1)
25#define CFG_SYS_TMRINTR_MASK (INTC_IPRH_INT33)
26#define CFG_SYS_TMRINTR_PEND (CFG_SYS_TMRINTR_MASK)
27#define CFG_SYS_TMRINTR_PRI (6)
28#define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
Marek Vasut4c77f062023-03-23 01:20:40 +010029#else
30#define CFG_SYS_UDELAY_BASE (MMAP_PIT0)
TsiChung Liewb354aef2009-06-12 11:29:00 +000031#endif
32
Tom Rini364d0022023-01-10 11:19:45 -050033#define CFG_SYS_INTR_BASE (MMAP_INTC0)
34#define CFG_SYS_NUM_IRQS (128)
TsiChung Liewb354aef2009-06-12 11:29:00 +000035#endif /* CONFIG_M520x */
36
TsiChungLiewb859ef12007-08-16 19:23:50 -050037#ifdef CONFIG_M5235
38#include <asm/immap_5235.h>
39#include <asm/m5235.h>
40
Tom Rini364d0022023-01-10 11:19:45 -050041#define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40))
TsiChungLiewb859ef12007-08-16 19:23:50 -050042
43/* Timer */
Marek Vasut38908f52023-03-23 01:20:39 +010044#if CONFIG_IS_ENABLED(MCFTMR)
Tom Rini364d0022023-01-10 11:19:45 -050045#define CFG_SYS_UDELAY_BASE (MMAP_DTMR0)
46#define CFG_SYS_TMR_BASE (MMAP_DTMR3)
47#define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprl0)
48#define CFG_SYS_TMRINTR_NO (INT0_LO_DTMR3)
49#define CFG_SYS_TMRINTR_MASK (INTC_IPRL_INT22)
50#define CFG_SYS_TMRINTR_PEND (CFG_SYS_TMRINTR_MASK)
51#define CFG_SYS_TMRINTR_PRI (0x1E) /* Level must include inorder to work */
52#define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
Marek Vasut4c77f062023-03-23 01:20:40 +010053#else
54#define CFG_SYS_UDELAY_BASE (MMAP_PIT0)
TsiChungLiewb859ef12007-08-16 19:23:50 -050055#endif
56
Tom Rini364d0022023-01-10 11:19:45 -050057#define CFG_SYS_INTR_BASE (MMAP_INTC0)
58#define CFG_SYS_NUM_IRQS (128)
TsiChungLiewb859ef12007-08-16 19:23:50 -050059#endif /* CONFIG_M5235 */
60
TsiChungLiew0e81abc2007-08-15 19:38:15 -050061#ifdef CONFIG_M5249
62#include <asm/immap_5249.h>
63#include <asm/m5249.h>
64
Tom Rini364d0022023-01-10 11:19:45 -050065#define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40))
TsiChungLiew0e81abc2007-08-15 19:38:15 -050066
Tom Rini364d0022023-01-10 11:19:45 -050067#define CFG_SYS_INTR_BASE (MMAP_INTC)
68#define CFG_SYS_NUM_IRQS (64)
TsiChungLiew0e81abc2007-08-15 19:38:15 -050069
70/* Timer */
Marek Vasut38908f52023-03-23 01:20:39 +010071#if CONFIG_IS_ENABLED(MCFTMR)
Tom Rini364d0022023-01-10 11:19:45 -050072#define CFG_SYS_UDELAY_BASE (MMAP_DTMR0)
73#define CFG_SYS_TMR_BASE (MMAP_DTMR1)
74#define CFG_SYS_TMRPND_REG (mbar_readLong(MCFSIM_IPR))
75#define CFG_SYS_TMRINTR_NO (31)
76#define CFG_SYS_TMRINTR_MASK (0x00000400)
77#define CFG_SYS_TMRINTR_PEND (CFG_SYS_TMRINTR_MASK)
78#define CFG_SYS_TMRINTR_PRI (MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3)
79#define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 2000000) - 1) << 8)
Marek Vasut4c77f062023-03-23 01:20:40 +010080#else
81#define CFG_SYS_UDELAY_BASE (MMAP_PIT0)
TsiChungLiew0e81abc2007-08-15 19:38:15 -050082#endif
83#endif /* CONFIG_M5249 */
84
TsiChungLiew34674692007-08-16 13:20:50 -050085#ifdef CONFIG_M5253
86#include <asm/immap_5253.h>
87#include <asm/m5249.h>
88#include <asm/m5253.h>
89
Tom Rini364d0022023-01-10 11:19:45 -050090#define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40))
TsiChungLiew34674692007-08-16 13:20:50 -050091
Tom Rini364d0022023-01-10 11:19:45 -050092#define CFG_SYS_INTR_BASE (MMAP_INTC)
93#define CFG_SYS_NUM_IRQS (64)
TsiChungLiew34674692007-08-16 13:20:50 -050094
95/* Timer */
Marek Vasut38908f52023-03-23 01:20:39 +010096#if CONFIG_IS_ENABLED(MCFTMR)
Tom Rini364d0022023-01-10 11:19:45 -050097#define CFG_SYS_UDELAY_BASE (MMAP_DTMR0)
98#define CFG_SYS_TMR_BASE (MMAP_DTMR1)
99#define CFG_SYS_TMRPND_REG (mbar_readLong(MCFSIM_IPR))
100#define CFG_SYS_TMRINTR_NO (27)
101#define CFG_SYS_TMRINTR_MASK (0x00000400)
102#define CFG_SYS_TMRINTR_PEND (CFG_SYS_TMRINTR_MASK)
103#define CFG_SYS_TMRINTR_PRI (MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL3 | MCFSIM_ICR_PRI3)
104#define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 2000000) - 1) << 8)
Marek Vasut4c77f062023-03-23 01:20:40 +0100105#else
106#define CFG_SYS_UDELAY_BASE (MMAP_PIT0)
TsiChungLiew34674692007-08-16 13:20:50 -0500107#endif
108#endif /* CONFIG_M5253 */
109
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500110#ifdef CONFIG_M5271
111#include <asm/immap_5271.h>
112#include <asm/m5271.h>
113
Tom Rini364d0022023-01-10 11:19:45 -0500114#define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40))
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500115
116/* Timer */
Marek Vasut38908f52023-03-23 01:20:39 +0100117#if CONFIG_IS_ENABLED(MCFTMR)
Tom Rini364d0022023-01-10 11:19:45 -0500118#define CFG_SYS_UDELAY_BASE (MMAP_DTMR0)
119#define CFG_SYS_TMR_BASE (MMAP_DTMR3)
120#define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprl0)
121#define CFG_SYS_TMRINTR_NO (INT0_LO_DTMR3)
122#define CFG_SYS_TMRINTR_MASK (INTC_IPRL_INT22)
123#define CFG_SYS_TMRINTR_PEND (CFG_SYS_TMRINTR_MASK)
124#define CFG_SYS_TMRINTR_PRI (0x1E) /* Interrupt level 3, priority 6 */
125#define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
Marek Vasut4c77f062023-03-23 01:20:40 +0100126#else
127#define CFG_SYS_UDELAY_BASE (MMAP_PIT0)
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500128#endif
129
Tom Rini364d0022023-01-10 11:19:45 -0500130#define CFG_SYS_INTR_BASE (MMAP_INTC0)
131#define CFG_SYS_NUM_IRQS (128)
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500132#endif /* CONFIG_M5271 */
133
134#ifdef CONFIG_M5272
135#include <asm/immap_5272.h>
136#include <asm/m5272.h>
137
Tom Rini364d0022023-01-10 11:19:45 -0500138#define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40))
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500139
Tom Rini364d0022023-01-10 11:19:45 -0500140#define CFG_SYS_INTR_BASE (MMAP_INTC)
141#define CFG_SYS_NUM_IRQS (64)
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500142
143/* Timer */
Marek Vasut38908f52023-03-23 01:20:39 +0100144#if CONFIG_IS_ENABLED(MCFTMR)
Tom Rini364d0022023-01-10 11:19:45 -0500145#define CFG_SYS_UDELAY_BASE (MMAP_TMR0)
146#define CFG_SYS_TMR_BASE (MMAP_TMR3)
147#define CFG_SYS_TMRPND_REG (((volatile intctrl_t *)(CFG_SYS_INTR_BASE))->int_isr)
148#define CFG_SYS_TMRINTR_NO (INT_TMR3)
149#define CFG_SYS_TMRINTR_MASK (INT_ISR_INT24)
150#define CFG_SYS_TMRINTR_PEND (0)
151#define CFG_SYS_TMRINTR_PRI (INT_ICR1_TMR3PI | INT_ICR1_TMR3IPL(5))
152#define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
Marek Vasut4c77f062023-03-23 01:20:40 +0100153#else
154#define CFG_SYS_UDELAY_BASE (MMAP_PIT0)
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500155#endif
156#endif /* CONFIG_M5272 */
157
Matthew Fettke761e2e92008-02-04 15:38:20 -0600158#ifdef CONFIG_M5275
159#include <asm/immap_5275.h>
160#include <asm/m5275.h>
161
Tom Rini364d0022023-01-10 11:19:45 -0500162#define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40))
Matthew Fettke761e2e92008-02-04 15:38:20 -0600163
Tom Rini364d0022023-01-10 11:19:45 -0500164#define CFG_SYS_INTR_BASE (MMAP_INTC0)
165#define CFG_SYS_NUM_IRQS (192)
Matthew Fettke761e2e92008-02-04 15:38:20 -0600166
167/* Timer */
Marek Vasut38908f52023-03-23 01:20:39 +0100168#if CONFIG_IS_ENABLED(MCFTMR)
Tom Rini364d0022023-01-10 11:19:45 -0500169#define CFG_SYS_UDELAY_BASE (MMAP_DTMR0)
170#define CFG_SYS_TMR_BASE (MMAP_DTMR3)
171#define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprl0)
172#define CFG_SYS_TMRINTR_NO (INT0_LO_DTMR3)
173#define CFG_SYS_TMRINTR_MASK (INTC_IPRL_INT22)
174#define CFG_SYS_TMRINTR_PEND (CFG_SYS_TMRINTR_MASK)
175#define CFG_SYS_TMRINTR_PRI (0x1E)
176#define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
Marek Vasut4c77f062023-03-23 01:20:40 +0100177#else
178#define CFG_SYS_UDELAY_BASE (MMAP_PIT0)
Matthew Fettke761e2e92008-02-04 15:38:20 -0600179#endif
180#endif /* CONFIG_M5275 */
181
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500182#ifdef CONFIG_M5282
183#include <asm/immap_5282.h>
184#include <asm/m5282.h>
185
Tom Rini364d0022023-01-10 11:19:45 -0500186#define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40))
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500187
Tom Rini364d0022023-01-10 11:19:45 -0500188#define CFG_SYS_INTR_BASE (MMAP_INTC0)
189#define CFG_SYS_NUM_IRQS (128)
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500190
191/* Timer */
Marek Vasut38908f52023-03-23 01:20:39 +0100192#if CONFIG_IS_ENABLED(MCFTMR)
Tom Rini364d0022023-01-10 11:19:45 -0500193#define CFG_SYS_UDELAY_BASE (MMAP_DTMR0)
194#define CFG_SYS_TMR_BASE (MMAP_DTMR3)
195#define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprl0)
196#define CFG_SYS_TMRINTR_NO (INT0_LO_DTMR3)
197#define CFG_SYS_TMRINTR_MASK (1 << INT0_LO_DTMR3)
198#define CFG_SYS_TMRINTR_PEND (CFG_SYS_TMRINTR_MASK)
199#define CFG_SYS_TMRINTR_PRI (0x1E) /* Level must include inorder to work */
200#define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
Marek Vasut4c77f062023-03-23 01:20:40 +0100201#else
202#define CFG_SYS_UDELAY_BASE (MMAP_PIT0)
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500203#endif
204#endif /* CONFIG_M5282 */
205
angelo@sysam.itbb4ba2c2015-02-12 01:40:00 +0100206#ifdef CONFIG_M5307
207#include <asm/immap_5307.h>
208#include <asm/m5307.h>
209
Tom Rini364d0022023-01-10 11:19:45 -0500210#define CFG_SYS_UART_BASE (MMAP_UART0 + \
Tom Rini6a5dccc2022-11-16 13:10:41 -0500211 (CFG_SYS_UART_PORT * 0x40))
Tom Rini364d0022023-01-10 11:19:45 -0500212#define CFG_SYS_INTR_BASE (MMAP_INTC)
213#define CFG_SYS_NUM_IRQS (64)
angelo@sysam.itbb4ba2c2015-02-12 01:40:00 +0100214
215/* Timer */
Marek Vasut38908f52023-03-23 01:20:39 +0100216#if CONFIG_IS_ENABLED(MCFTMR)
Tom Rini364d0022023-01-10 11:19:45 -0500217#define CFG_SYS_UDELAY_BASE (MMAP_DTMR0)
218#define CFG_SYS_TMR_BASE (MMAP_DTMR1)
219#define CFG_SYS_TMRPND_REG (((volatile intctrl_t *) \
220 (CFG_SYS_INTR_BASE))->ipr)
221#define CFG_SYS_TMRINTR_NO (31)
222#define CFG_SYS_TMRINTR_MASK (0x00000400)
223#define CFG_SYS_TMRINTR_PEND (CFG_SYS_TMRINTR_MASK)
224#define CFG_SYS_TMRINTR_PRI (MCFSIM_ICR_AUTOVEC | \
angelo@sysam.itbb4ba2c2015-02-12 01:40:00 +0100225 MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3)
Tom Rini364d0022023-01-10 11:19:45 -0500226#define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
Marek Vasut4c77f062023-03-23 01:20:40 +0100227#else
228#define CFG_SYS_UDELAY_BASE (MMAP_PIT0)
angelo@sysam.itbb4ba2c2015-02-12 01:40:00 +0100229#endif
230#endif /* CONFIG_M5307 */
231
TsiChung Liewe7e4fc82008-10-22 11:38:21 +0000232#if defined(CONFIG_MCF5301x)
233#include <asm/immap_5301x.h>
234#include <asm/m5301x.h>
235
Tom Rini364d0022023-01-10 11:19:45 -0500236#define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x4000))
TsiChung Liewe7e4fc82008-10-22 11:38:21 +0000237
TsiChung Liewe7e4fc82008-10-22 11:38:21 +0000238/* Timer */
Marek Vasut38908f52023-03-23 01:20:39 +0100239#if CONFIG_IS_ENABLED(MCFTMR)
Tom Rini364d0022023-01-10 11:19:45 -0500240#define CFG_SYS_UDELAY_BASE (MMAP_DTMR0)
241#define CFG_SYS_TMR_BASE (MMAP_DTMR1)
242#define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprh0)
243#define CFG_SYS_TMRINTR_NO (INT0_HI_DTMR1)
244#define CFG_SYS_TMRINTR_MASK (INTC_IPRH_INT33)
245#define CFG_SYS_TMRINTR_PEND (CFG_SYS_TMRINTR_MASK)
246#define CFG_SYS_TMRINTR_PRI (6)
247#define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
Marek Vasut4c77f062023-03-23 01:20:40 +0100248#else
249#define CFG_SYS_UDELAY_BASE (MMAP_PIT0)
TsiChung Liewe7e4fc82008-10-22 11:38:21 +0000250#endif
251
Tom Rini364d0022023-01-10 11:19:45 -0500252#define CFG_SYS_INTR_BASE (MMAP_INTC0)
253#define CFG_SYS_NUM_IRQS (128)
TsiChung Liewe7e4fc82008-10-22 11:38:21 +0000254#endif /* CONFIG_M5301x */
255
TsiChungLiew6f8a0a32008-01-14 17:23:08 -0600256#if defined(CONFIG_M5329) || defined(CONFIG_M5373)
TsiChungLiew2e0aeef2007-07-05 22:39:07 -0500257#include <asm/immap_5329.h>
258#include <asm/m5329.h>
259
Tom Rini364d0022023-01-10 11:19:45 -0500260#define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x4000))
TsiChungLiew2e0aeef2007-07-05 22:39:07 -0500261
262/* Timer */
Marek Vasut38908f52023-03-23 01:20:39 +0100263#if CONFIG_IS_ENABLED(MCFTMR)
Tom Rini364d0022023-01-10 11:19:45 -0500264#define CFG_SYS_UDELAY_BASE (MMAP_DTMR0)
265#define CFG_SYS_TMR_BASE (MMAP_DTMR1)
266#define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprh0)
267#define CFG_SYS_TMRINTR_NO (INT0_HI_DTMR1)
268#define CFG_SYS_TMRINTR_MASK (INTC_IPRH_INT33)
269#define CFG_SYS_TMRINTR_PEND (CFG_SYS_TMRINTR_MASK)
270#define CFG_SYS_TMRINTR_PRI (6)
271#define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
Marek Vasut4c77f062023-03-23 01:20:40 +0100272#else
273#define CFG_SYS_UDELAY_BASE (MMAP_PIT0)
TsiChungLiew2e0aeef2007-07-05 22:39:07 -0500274#endif
275
Tom Rini364d0022023-01-10 11:19:45 -0500276#define CFG_SYS_INTR_BASE (MMAP_INTC0)
277#define CFG_SYS_NUM_IRQS (128)
TsiChungLiew6f8a0a32008-01-14 17:23:08 -0600278#endif /* CONFIG_M5329 && CONFIG_M5373 */
Stefan Roesef1110122007-07-16 13:11:12 +0200279
Alison Wangfdc2fb12012-10-18 19:25:51 +0000280#if defined(CONFIG_M54418)
281#include <asm/immap_5441x.h>
282#include <asm/m5441x.h>
283
Tom Rini6a5dccc2022-11-16 13:10:41 -0500284#if (CFG_SYS_UART_PORT < 4)
Tom Rini364d0022023-01-10 11:19:45 -0500285#define CFG_SYS_UART_BASE (MMAP_UART0 + \
Tom Rini6a5dccc2022-11-16 13:10:41 -0500286 (CFG_SYS_UART_PORT * 0x4000))
Alison Wangfdc2fb12012-10-18 19:25:51 +0000287#else
Tom Rini364d0022023-01-10 11:19:45 -0500288#define CFG_SYS_UART_BASE (MMAP_UART4 + \
Tom Rini6a5dccc2022-11-16 13:10:41 -0500289 ((CFG_SYS_UART_PORT - 4) * 0x4000))
Alison Wangfdc2fb12012-10-18 19:25:51 +0000290#endif
291
292#define MMAP_DSPI MMAP_DSPI0
Alison Wangfdc2fb12012-10-18 19:25:51 +0000293
294/* Timer */
Marek Vasut38908f52023-03-23 01:20:39 +0100295#if CONFIG_IS_ENABLED(MCFTMR)
Tom Rini364d0022023-01-10 11:19:45 -0500296#define CFG_SYS_UDELAY_BASE (MMAP_DTMR0)
297#define CFG_SYS_TMR_BASE (MMAP_DTMR1)
298#define CFG_SYS_TMRPND_REG (((int0_t *)(CFG_SYS_INTR_BASE))->iprh0)
299#define CFG_SYS_TMRINTR_NO (INT0_HI_DTMR1)
300#define CFG_SYS_TMRINTR_MASK (INTC_IPRH_INT33)
301#define CFG_SYS_TMRINTR_PEND (CFG_SYS_TMRINTR_MASK)
302#define CFG_SYS_TMRINTR_PRI (6)
303#define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
Marek Vasut4c77f062023-03-23 01:20:40 +0100304#else
305#define CFG_SYS_UDELAY_BASE (MMAP_PIT0)
Alison Wangfdc2fb12012-10-18 19:25:51 +0000306#endif
307
Tom Rini364d0022023-01-10 11:19:45 -0500308#define CFG_SYS_INTR_BASE (MMAP_INTC0)
309#define CFG_SYS_NUM_IRQS (192)
Alison Wangfdc2fb12012-10-18 19:25:51 +0000310
311#endif /* CONFIG_M54418 */
312
TsiChungLiew471b2c62008-01-15 13:39:44 -0600313#ifdef CONFIG_M547x
314#include <asm/immap_547x_8x.h>
315#include <asm/m547x_8x.h>
316
Tom Rini364d0022023-01-10 11:19:45 -0500317#define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x100))
TsiChungLiew471b2c62008-01-15 13:39:44 -0600318
319#ifdef CONFIG_SLTTMR
Tom Rini364d0022023-01-10 11:19:45 -0500320#define CFG_SYS_UDELAY_BASE (MMAP_SLT1)
321#define CFG_SYS_TMR_BASE (MMAP_SLT0)
322#define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprh0)
323#define CFG_SYS_TMRINTR_NO (INT0_HI_SLT0)
324#define CFG_SYS_TMRINTR_MASK (INTC_IPRH_INT54)
325#define CFG_SYS_TMRINTR_PEND (CFG_SYS_TMRINTR_MASK)
326#define CFG_SYS_TMRINTR_PRI (0x1E)
327#define CFG_SYS_TIMER_PRESCALER (gd->bus_clk / 1000000)
TsiChungLiew471b2c62008-01-15 13:39:44 -0600328#endif
329
Tom Rini364d0022023-01-10 11:19:45 -0500330#define CFG_SYS_INTR_BASE (MMAP_INTC0)
331#define CFG_SYS_NUM_IRQS (128)
TsiChungLiew471b2c62008-01-15 13:39:44 -0600332
333#ifdef CONFIG_PCI
Tom Rini56af6592022-11-16 13:10:33 -0500334#define CFG_SYS_PCI_BAR0 (0x40000000)
Tom Rinibb4dd962022-11-16 13:10:37 -0500335#define CFG_SYS_PCI_BAR1 (CFG_SYS_SDRAM_BASE)
Tom Rini6a5dccc2022-11-16 13:10:41 -0500336#define CFG_SYS_PCI_TBATR0 (CFG_SYS_MBAR)
Tom Rinibb4dd962022-11-16 13:10:37 -0500337#define CFG_SYS_PCI_TBATR1 (CFG_SYS_SDRAM_BASE)
TsiChungLiew471b2c62008-01-15 13:39:44 -0600338#endif
339#endif /* CONFIG_M547x */
340
TsiChungLiew2e0aeef2007-07-05 22:39:07 -0500341#endif /* __IMMAP_H */