Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
TsiChungLiew | 48dbfea | 2007-07-05 22:39:07 -0500 | [diff] [blame] | 2 | /* |
| 3 | * ColdFire Internal Memory Map and Defines |
| 4 | * |
Alison Wang | 45370e1 | 2012-10-18 19:25:51 +0000 | [diff] [blame] | 5 | * Copyright 2004-2012 Freescale Semiconductor, Inc. |
TsiChungLiew | 48dbfea | 2007-07-05 22:39:07 -0500 | [diff] [blame] | 6 | * TsiChung Liew (Tsi-Chung.Liew@freescale.com) |
TsiChungLiew | 48dbfea | 2007-07-05 22:39:07 -0500 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef __IMMAP_H |
| 10 | #define __IMMAP_H |
Stefan Roese | c883f6e | 2007-07-16 13:11:12 +0200 | [diff] [blame] | 11 | |
Tom Rini | 0701189 | 2023-10-12 19:03:56 -0400 | [diff] [blame] | 12 | #include <config.h> |
TsiChung Liew | bf9a521 | 2009-06-12 11:29:00 +0000 | [diff] [blame] | 13 | #if defined(CONFIG_MCF520x) |
| 14 | #include <asm/immap_520x.h> |
| 15 | #include <asm/m520x.h> |
| 16 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 17 | #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x4000)) |
TsiChung Liew | bf9a521 | 2009-06-12 11:29:00 +0000 | [diff] [blame] | 18 | |
| 19 | /* Timer */ |
Marek Vasut | 35d48ea | 2023-03-23 01:20:39 +0100 | [diff] [blame] | 20 | #if CONFIG_IS_ENABLED(MCFTMR) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 21 | #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 Vasut | 56c3aa9 | 2023-03-23 01:20:40 +0100 | [diff] [blame] | 29 | #else |
| 30 | #define CFG_SYS_UDELAY_BASE (MMAP_PIT0) |
TsiChung Liew | bf9a521 | 2009-06-12 11:29:00 +0000 | [diff] [blame] | 31 | #endif |
| 32 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 33 | #define CFG_SYS_INTR_BASE (MMAP_INTC0) |
| 34 | #define CFG_SYS_NUM_IRQS (128) |
TsiChung Liew | bf9a521 | 2009-06-12 11:29:00 +0000 | [diff] [blame] | 35 | #endif /* CONFIG_M520x */ |
| 36 | |
TsiChungLiew | 4a442d3 | 2007-08-16 19:23:50 -0500 | [diff] [blame] | 37 | #ifdef CONFIG_M5235 |
| 38 | #include <asm/immap_5235.h> |
| 39 | #include <asm/m5235.h> |
| 40 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 41 | #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40)) |
TsiChungLiew | 4a442d3 | 2007-08-16 19:23:50 -0500 | [diff] [blame] | 42 | |
| 43 | /* Timer */ |
Marek Vasut | 35d48ea | 2023-03-23 01:20:39 +0100 | [diff] [blame] | 44 | #if CONFIG_IS_ENABLED(MCFTMR) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 45 | #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 Vasut | 56c3aa9 | 2023-03-23 01:20:40 +0100 | [diff] [blame] | 53 | #else |
| 54 | #define CFG_SYS_UDELAY_BASE (MMAP_PIT0) |
TsiChungLiew | 4a442d3 | 2007-08-16 19:23:50 -0500 | [diff] [blame] | 55 | #endif |
| 56 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 57 | #define CFG_SYS_INTR_BASE (MMAP_INTC0) |
| 58 | #define CFG_SYS_NUM_IRQS (128) |
TsiChungLiew | 4a442d3 | 2007-08-16 19:23:50 -0500 | [diff] [blame] | 59 | #endif /* CONFIG_M5235 */ |
| 60 | |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 61 | #ifdef CONFIG_M5249 |
| 62 | #include <asm/immap_5249.h> |
| 63 | #include <asm/m5249.h> |
| 64 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 65 | #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40)) |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 66 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 67 | #define CFG_SYS_INTR_BASE (MMAP_INTC) |
| 68 | #define CFG_SYS_NUM_IRQS (64) |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 69 | |
| 70 | /* Timer */ |
Marek Vasut | 35d48ea | 2023-03-23 01:20:39 +0100 | [diff] [blame] | 71 | #if CONFIG_IS_ENABLED(MCFTMR) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 72 | #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 Vasut | 56c3aa9 | 2023-03-23 01:20:40 +0100 | [diff] [blame] | 80 | #else |
| 81 | #define CFG_SYS_UDELAY_BASE (MMAP_PIT0) |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 82 | #endif |
| 83 | #endif /* CONFIG_M5249 */ |
| 84 | |
TsiChungLiew | a1436a8 | 2007-08-16 13:20:50 -0500 | [diff] [blame] | 85 | #ifdef CONFIG_M5253 |
| 86 | #include <asm/immap_5253.h> |
| 87 | #include <asm/m5249.h> |
| 88 | #include <asm/m5253.h> |
| 89 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 90 | #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40)) |
TsiChungLiew | a1436a8 | 2007-08-16 13:20:50 -0500 | [diff] [blame] | 91 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 92 | #define CFG_SYS_INTR_BASE (MMAP_INTC) |
| 93 | #define CFG_SYS_NUM_IRQS (64) |
TsiChungLiew | a1436a8 | 2007-08-16 13:20:50 -0500 | [diff] [blame] | 94 | |
| 95 | /* Timer */ |
Marek Vasut | 35d48ea | 2023-03-23 01:20:39 +0100 | [diff] [blame] | 96 | #if CONFIG_IS_ENABLED(MCFTMR) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 97 | #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 Vasut | 56c3aa9 | 2023-03-23 01:20:40 +0100 | [diff] [blame] | 105 | #else |
| 106 | #define CFG_SYS_UDELAY_BASE (MMAP_PIT0) |
TsiChungLiew | a1436a8 | 2007-08-16 13:20:50 -0500 | [diff] [blame] | 107 | #endif |
| 108 | #endif /* CONFIG_M5253 */ |
| 109 | |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 110 | #ifdef CONFIG_M5271 |
| 111 | #include <asm/immap_5271.h> |
| 112 | #include <asm/m5271.h> |
| 113 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 114 | #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40)) |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 115 | |
| 116 | /* Timer */ |
Marek Vasut | 35d48ea | 2023-03-23 01:20:39 +0100 | [diff] [blame] | 117 | #if CONFIG_IS_ENABLED(MCFTMR) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 118 | #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 Vasut | 56c3aa9 | 2023-03-23 01:20:40 +0100 | [diff] [blame] | 126 | #else |
| 127 | #define CFG_SYS_UDELAY_BASE (MMAP_PIT0) |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 128 | #endif |
| 129 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 130 | #define CFG_SYS_INTR_BASE (MMAP_INTC0) |
| 131 | #define CFG_SYS_NUM_IRQS (128) |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 132 | #endif /* CONFIG_M5271 */ |
| 133 | |
| 134 | #ifdef CONFIG_M5272 |
| 135 | #include <asm/immap_5272.h> |
| 136 | #include <asm/m5272.h> |
| 137 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 138 | #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40)) |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 139 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 140 | #define CFG_SYS_INTR_BASE (MMAP_INTC) |
| 141 | #define CFG_SYS_NUM_IRQS (64) |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 142 | |
| 143 | /* Timer */ |
Marek Vasut | 35d48ea | 2023-03-23 01:20:39 +0100 | [diff] [blame] | 144 | #if CONFIG_IS_ENABLED(MCFTMR) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 145 | #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 Vasut | 56c3aa9 | 2023-03-23 01:20:40 +0100 | [diff] [blame] | 153 | #else |
| 154 | #define CFG_SYS_UDELAY_BASE (MMAP_PIT0) |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 155 | #endif |
| 156 | #endif /* CONFIG_M5272 */ |
| 157 | |
Matthew Fettke | f71d9d9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 158 | #ifdef CONFIG_M5275 |
| 159 | #include <asm/immap_5275.h> |
| 160 | #include <asm/m5275.h> |
| 161 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 162 | #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40)) |
Matthew Fettke | f71d9d9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 163 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 164 | #define CFG_SYS_INTR_BASE (MMAP_INTC0) |
| 165 | #define CFG_SYS_NUM_IRQS (192) |
Matthew Fettke | f71d9d9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 166 | |
| 167 | /* Timer */ |
Marek Vasut | 35d48ea | 2023-03-23 01:20:39 +0100 | [diff] [blame] | 168 | #if CONFIG_IS_ENABLED(MCFTMR) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 169 | #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 Vasut | 56c3aa9 | 2023-03-23 01:20:40 +0100 | [diff] [blame] | 177 | #else |
| 178 | #define CFG_SYS_UDELAY_BASE (MMAP_PIT0) |
Matthew Fettke | f71d9d9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 179 | #endif |
| 180 | #endif /* CONFIG_M5275 */ |
| 181 | |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 182 | #ifdef CONFIG_M5282 |
| 183 | #include <asm/immap_5282.h> |
| 184 | #include <asm/m5282.h> |
| 185 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 186 | #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40)) |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 187 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 188 | #define CFG_SYS_INTR_BASE (MMAP_INTC0) |
| 189 | #define CFG_SYS_NUM_IRQS (128) |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 190 | |
| 191 | /* Timer */ |
Marek Vasut | 35d48ea | 2023-03-23 01:20:39 +0100 | [diff] [blame] | 192 | #if CONFIG_IS_ENABLED(MCFTMR) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 193 | #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 Vasut | 56c3aa9 | 2023-03-23 01:20:40 +0100 | [diff] [blame] | 201 | #else |
| 202 | #define CFG_SYS_UDELAY_BASE (MMAP_PIT0) |
TsiChungLiew | 5611566 | 2007-08-15 19:38:15 -0500 | [diff] [blame] | 203 | #endif |
| 204 | #endif /* CONFIG_M5282 */ |
| 205 | |
angelo@sysam.it | e77e65d | 2015-02-12 01:40:00 +0100 | [diff] [blame] | 206 | #ifdef CONFIG_M5307 |
| 207 | #include <asm/immap_5307.h> |
| 208 | #include <asm/m5307.h> |
| 209 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 210 | #define CFG_SYS_UART_BASE (MMAP_UART0 + \ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 211 | (CFG_SYS_UART_PORT * 0x40)) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 212 | #define CFG_SYS_INTR_BASE (MMAP_INTC) |
| 213 | #define CFG_SYS_NUM_IRQS (64) |
angelo@sysam.it | e77e65d | 2015-02-12 01:40:00 +0100 | [diff] [blame] | 214 | |
| 215 | /* Timer */ |
Marek Vasut | 35d48ea | 2023-03-23 01:20:39 +0100 | [diff] [blame] | 216 | #if CONFIG_IS_ENABLED(MCFTMR) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 217 | #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.it | e77e65d | 2015-02-12 01:40:00 +0100 | [diff] [blame] | 225 | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 226 | #define CFG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8) |
Marek Vasut | 56c3aa9 | 2023-03-23 01:20:40 +0100 | [diff] [blame] | 227 | #else |
| 228 | #define CFG_SYS_UDELAY_BASE (MMAP_PIT0) |
angelo@sysam.it | e77e65d | 2015-02-12 01:40:00 +0100 | [diff] [blame] | 229 | #endif |
| 230 | #endif /* CONFIG_M5307 */ |
| 231 | |
TsiChung Liew | 536e7da | 2008-10-22 11:38:21 +0000 | [diff] [blame] | 232 | #if defined(CONFIG_MCF5301x) |
| 233 | #include <asm/immap_5301x.h> |
| 234 | #include <asm/m5301x.h> |
| 235 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 236 | #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x4000)) |
TsiChung Liew | 536e7da | 2008-10-22 11:38:21 +0000 | [diff] [blame] | 237 | |
TsiChung Liew | 536e7da | 2008-10-22 11:38:21 +0000 | [diff] [blame] | 238 | /* Timer */ |
Marek Vasut | 35d48ea | 2023-03-23 01:20:39 +0100 | [diff] [blame] | 239 | #if CONFIG_IS_ENABLED(MCFTMR) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 240 | #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 Vasut | 56c3aa9 | 2023-03-23 01:20:40 +0100 | [diff] [blame] | 248 | #else |
| 249 | #define CFG_SYS_UDELAY_BASE (MMAP_PIT0) |
TsiChung Liew | 536e7da | 2008-10-22 11:38:21 +0000 | [diff] [blame] | 250 | #endif |
| 251 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 252 | #define CFG_SYS_INTR_BASE (MMAP_INTC0) |
| 253 | #define CFG_SYS_NUM_IRQS (128) |
TsiChung Liew | 536e7da | 2008-10-22 11:38:21 +0000 | [diff] [blame] | 254 | #endif /* CONFIG_M5301x */ |
| 255 | |
TsiChungLiew | aa5f1f9 | 2008-01-14 17:23:08 -0600 | [diff] [blame] | 256 | #if defined(CONFIG_M5329) || defined(CONFIG_M5373) |
TsiChungLiew | 48dbfea | 2007-07-05 22:39:07 -0500 | [diff] [blame] | 257 | #include <asm/immap_5329.h> |
| 258 | #include <asm/m5329.h> |
| 259 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 260 | #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x4000)) |
TsiChungLiew | 48dbfea | 2007-07-05 22:39:07 -0500 | [diff] [blame] | 261 | |
| 262 | /* Timer */ |
Marek Vasut | 35d48ea | 2023-03-23 01:20:39 +0100 | [diff] [blame] | 263 | #if CONFIG_IS_ENABLED(MCFTMR) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 264 | #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 Vasut | 56c3aa9 | 2023-03-23 01:20:40 +0100 | [diff] [blame] | 272 | #else |
| 273 | #define CFG_SYS_UDELAY_BASE (MMAP_PIT0) |
TsiChungLiew | 48dbfea | 2007-07-05 22:39:07 -0500 | [diff] [blame] | 274 | #endif |
| 275 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 276 | #define CFG_SYS_INTR_BASE (MMAP_INTC0) |
| 277 | #define CFG_SYS_NUM_IRQS (128) |
TsiChungLiew | aa5f1f9 | 2008-01-14 17:23:08 -0600 | [diff] [blame] | 278 | #endif /* CONFIG_M5329 && CONFIG_M5373 */ |
Stefan Roese | c883f6e | 2007-07-16 13:11:12 +0200 | [diff] [blame] | 279 | |
Alison Wang | 45370e1 | 2012-10-18 19:25:51 +0000 | [diff] [blame] | 280 | #if defined(CONFIG_M54418) |
| 281 | #include <asm/immap_5441x.h> |
| 282 | #include <asm/m5441x.h> |
| 283 | |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 284 | #if (CFG_SYS_UART_PORT < 4) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 285 | #define CFG_SYS_UART_BASE (MMAP_UART0 + \ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 286 | (CFG_SYS_UART_PORT * 0x4000)) |
Alison Wang | 45370e1 | 2012-10-18 19:25:51 +0000 | [diff] [blame] | 287 | #else |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 288 | #define CFG_SYS_UART_BASE (MMAP_UART4 + \ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 289 | ((CFG_SYS_UART_PORT - 4) * 0x4000)) |
Alison Wang | 45370e1 | 2012-10-18 19:25:51 +0000 | [diff] [blame] | 290 | #endif |
| 291 | |
| 292 | #define MMAP_DSPI MMAP_DSPI0 |
Alison Wang | 45370e1 | 2012-10-18 19:25:51 +0000 | [diff] [blame] | 293 | |
| 294 | /* Timer */ |
Marek Vasut | 35d48ea | 2023-03-23 01:20:39 +0100 | [diff] [blame] | 295 | #if CONFIG_IS_ENABLED(MCFTMR) |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 296 | #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 Vasut | 56c3aa9 | 2023-03-23 01:20:40 +0100 | [diff] [blame] | 304 | #else |
| 305 | #define CFG_SYS_UDELAY_BASE (MMAP_PIT0) |
Alison Wang | 45370e1 | 2012-10-18 19:25:51 +0000 | [diff] [blame] | 306 | #endif |
| 307 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 308 | #define CFG_SYS_INTR_BASE (MMAP_INTC0) |
| 309 | #define CFG_SYS_NUM_IRQS (192) |
Alison Wang | 45370e1 | 2012-10-18 19:25:51 +0000 | [diff] [blame] | 310 | |
| 311 | #endif /* CONFIG_M54418 */ |
| 312 | |
TsiChungLiew | 4621fc3 | 2008-01-15 13:39:44 -0600 | [diff] [blame] | 313 | #ifdef CONFIG_M547x |
| 314 | #include <asm/immap_547x_8x.h> |
| 315 | #include <asm/m547x_8x.h> |
| 316 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 317 | #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x100)) |
TsiChungLiew | 4621fc3 | 2008-01-15 13:39:44 -0600 | [diff] [blame] | 318 | |
| 319 | #ifdef CONFIG_SLTTMR |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 320 | #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) |
TsiChungLiew | 4621fc3 | 2008-01-15 13:39:44 -0600 | [diff] [blame] | 328 | #endif |
| 329 | |
Tom Rini | 6e7df1d | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 330 | #define CFG_SYS_INTR_BASE (MMAP_INTC0) |
| 331 | #define CFG_SYS_NUM_IRQS (128) |
TsiChungLiew | 4621fc3 | 2008-01-15 13:39:44 -0600 | [diff] [blame] | 332 | |
| 333 | #ifdef CONFIG_PCI |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 334 | #define CFG_SYS_PCI_BAR0 (0x40000000) |
Tom Rini | aa6e94d | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 335 | #define CFG_SYS_PCI_BAR1 (CFG_SYS_SDRAM_BASE) |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 336 | #define CFG_SYS_PCI_TBATR0 (CFG_SYS_MBAR) |
Tom Rini | aa6e94d | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 337 | #define CFG_SYS_PCI_TBATR1 (CFG_SYS_SDRAM_BASE) |
TsiChungLiew | 4621fc3 | 2008-01-15 13:39:44 -0600 | [diff] [blame] | 338 | #endif |
| 339 | #endif /* CONFIG_M547x */ |
| 340 | |
TsiChungLiew | 48dbfea | 2007-07-05 22:39:07 -0500 | [diff] [blame] | 341 | #endif /* __IMMAP_H */ |