RealView.py (7731:e1eace3a118a) RealView.py (7753:d3e613312953)
1# Copyright (c) 2009 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 40 unchanged lines hidden (view full) ---

49class AmbaDevice(BasicPioDevice):
50 type = 'AmbaDevice'
51 abstract = True
52 amba_id = Param.UInt32("ID of AMBA device for kernel detection")
53
54class AmbaDmaDevice(DmaDevice):
55 type = 'AmbaDmaDevice'
56 abstract = True
1# Copyright (c) 2009 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 40 unchanged lines hidden (view full) ---

49class AmbaDevice(BasicPioDevice):
50 type = 'AmbaDevice'
51 abstract = True
52 amba_id = Param.UInt32("ID of AMBA device for kernel detection")
53
54class AmbaDmaDevice(DmaDevice):
55 type = 'AmbaDmaDevice'
56 abstract = True
57 pio_addr = Param.Addr("Address for AMBA slave interface")
58 pio_latency = Param.Latency("10ns", "Time between action and write/read result by AMBA DMA Device")
59 gic = Param.Gic(Parent.any, "Gic to use for interrupting")
60 int_num = Param.UInt32("Interrupt number that connects to GIC")
57 amba_id = Param.UInt32("ID of AMBA device for kernel detection")
58
59class RealViewCtrl(BasicPioDevice):
60 type = 'RealViewCtrl'
61 proc_id = Param.UInt32(0x0C000000, "Platform ID")
62
63class Gic(PioDevice):
64 type = 'Gic'

--- 19 unchanged lines hidden (view full) ---

84 type = 'Sp804'
85 gic = Param.Gic(Parent.any, "Gic to use for interrupting")
86 int_num0 = Param.UInt32("Interrupt number that connects to GIC")
87 clock0 = Param.Clock('1MHz', "Clock speed of the input")
88 int_num1 = Param.UInt32("Interrupt number that connects to GIC")
89 clock1 = Param.Clock('1MHz', "Clock speed of the input")
90 amba_id = 0x00141804
91
61 amba_id = Param.UInt32("ID of AMBA device for kernel detection")
62
63class RealViewCtrl(BasicPioDevice):
64 type = 'RealViewCtrl'
65 proc_id = Param.UInt32(0x0C000000, "Platform ID")
66
67class Gic(PioDevice):
68 type = 'Gic'

--- 19 unchanged lines hidden (view full) ---

88 type = 'Sp804'
89 gic = Param.Gic(Parent.any, "Gic to use for interrupting")
90 int_num0 = Param.UInt32("Interrupt number that connects to GIC")
91 clock0 = Param.Clock('1MHz', "Clock speed of the input")
92 int_num1 = Param.UInt32("Interrupt number that connects to GIC")
93 clock1 = Param.Clock('1MHz', "Clock speed of the input")
94 amba_id = 0x00141804
95
96class Pl111(AmbaDmaDevice):
97 type = 'Pl111'
98 clock = Param.Clock('24MHz', "Clock speed of the input")
99 amba_id = 0x00141111
100
92class RealView(Platform):
93 type = 'RealView'
94 system = Param.System(Parent.any, "system")
95
101class RealView(Platform):
102 type = 'RealView'
103 system = Param.System(Parent.any, "system")
104
105# Reference for memory map and interrupt number
106# RealView Platform Baseboard Explore for Cortex-A9 User Guide(ARM DUI 0440A)
107# Chapter 4: Programmer's Reference
96class RealViewPBX(RealView):
97 uart = Pl011(pio_addr=0x10009000, int_num=44)
98 realview_io = RealViewCtrl(pio_addr=0x10000000)
99 gic = Gic()
100 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
101 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
108class RealViewPBX(RealView):
109 uart = Pl011(pio_addr=0x10009000, int_num=44)
110 realview_io = RealViewCtrl(pio_addr=0x10000000)
111 gic = Gic()
112 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
113 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
114 clcd = Pl111(pio_addr=0x10020000, int_num=55)
102
103 l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff)
104 flash_fake = IsaFake(pio_addr=0x40000000, pio_size=0x4000000)
105 dmac_fake = AmbaFake(pio_addr=0x10030000)
106 uart1_fake = AmbaFake(pio_addr=0x1000a000)
107 uart2_fake = AmbaFake(pio_addr=0x1000b000)
108 uart3_fake = AmbaFake(pio_addr=0x1000c000)
109 smc_fake = AmbaFake(pio_addr=0x100e1000)
115
116 l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff)
117 flash_fake = IsaFake(pio_addr=0x40000000, pio_size=0x4000000)
118 dmac_fake = AmbaFake(pio_addr=0x10030000)
119 uart1_fake = AmbaFake(pio_addr=0x1000a000)
120 uart2_fake = AmbaFake(pio_addr=0x1000b000)
121 uart3_fake = AmbaFake(pio_addr=0x1000c000)
122 smc_fake = AmbaFake(pio_addr=0x100e1000)
110 clcd_fake = AmbaFake(pio_addr=0x10020000)
111 sp810_fake = AmbaFake(pio_addr=0x10001000, ignore_access=True)
112 watchdog_fake = AmbaFake(pio_addr=0x10010000)
113 gpio0_fake = AmbaFake(pio_addr=0x10013000)
114 gpio1_fake = AmbaFake(pio_addr=0x10014000)
115 gpio2_fake = AmbaFake(pio_addr=0x10015000)
116 ssp_fake = AmbaFake(pio_addr=0x1000d000)
117 sci_fake = AmbaFake(pio_addr=0x1000e000)
118 aaci_fake = AmbaFake(pio_addr=0x10004000)

--- 12 unchanged lines hidden (view full) ---

131 # Attach I/O devices to specified bus object. Can't do this
132 # earlier, since the bus object itself is typically defined at the
133 # System level.
134 def attachIO(self, bus):
135 self.uart.pio = bus.port
136 self.realview_io.pio = bus.port
137 self.timer0.pio = bus.port
138 self.timer1.pio = bus.port
123 sp810_fake = AmbaFake(pio_addr=0x10001000, ignore_access=True)
124 watchdog_fake = AmbaFake(pio_addr=0x10010000)
125 gpio0_fake = AmbaFake(pio_addr=0x10013000)
126 gpio1_fake = AmbaFake(pio_addr=0x10014000)
127 gpio2_fake = AmbaFake(pio_addr=0x10015000)
128 ssp_fake = AmbaFake(pio_addr=0x1000d000)
129 sci_fake = AmbaFake(pio_addr=0x1000e000)
130 aaci_fake = AmbaFake(pio_addr=0x10004000)

--- 12 unchanged lines hidden (view full) ---

143 # Attach I/O devices to specified bus object. Can't do this
144 # earlier, since the bus object itself is typically defined at the
145 # System level.
146 def attachIO(self, bus):
147 self.uart.pio = bus.port
148 self.realview_io.pio = bus.port
149 self.timer0.pio = bus.port
150 self.timer1.pio = bus.port
151 self.clcd.pio = bus.port
139 self.dmac_fake.pio = bus.port
140 self.uart1_fake.pio = bus.port
141 self.uart2_fake.pio = bus.port
142 self.uart3_fake.pio = bus.port
143 self.smc_fake.pio = bus.port
152 self.dmac_fake.pio = bus.port
153 self.uart1_fake.pio = bus.port
154 self.uart2_fake.pio = bus.port
155 self.uart3_fake.pio = bus.port
156 self.smc_fake.pio = bus.port
144 self.clcd_fake.pio = bus.port
145 self.sp810_fake.pio = bus.port
146 self.watchdog_fake.pio = bus.port
147 self.gpio0_fake.pio = bus.port
148 self.gpio1_fake.pio = bus.port
149 self.gpio2_fake.pio = bus.port
150 self.ssp_fake.pio = bus.port
151 self.sci_fake.pio = bus.port
152 self.aaci_fake.pio = bus.port
153 self.mmc_fake.pio = bus.port
154 self.kmi0_fake.pio = bus.port
155 self.kmi1_fake.pio = bus.port
156 self.rtc_fake.pio = bus.port
157 self.flash_fake.pio = bus.port
158
157 self.sp810_fake.pio = bus.port
158 self.watchdog_fake.pio = bus.port
159 self.gpio0_fake.pio = bus.port
160 self.gpio1_fake.pio = bus.port
161 self.gpio2_fake.pio = bus.port
162 self.ssp_fake.pio = bus.port
163 self.sci_fake.pio = bus.port
164 self.aaci_fake.pio = bus.port
165 self.mmc_fake.pio = bus.port
166 self.kmi0_fake.pio = bus.port
167 self.kmi1_fake.pio = bus.port
168 self.rtc_fake.pio = bus.port
169 self.flash_fake.pio = bus.port
170
171# Interrupt numbers are wrong here
159class RealViewEB(RealView):
160 uart = Pl011(pio_addr=0x10009000, int_num=44)
161 realview_io = RealViewCtrl(pio_addr=0x10000000)
162 gic = Gic(dist_addr=0x10041000, cpu_addr=0x10040000)
163 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
164 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
172class RealViewEB(RealView):
173 uart = Pl011(pio_addr=0x10009000, int_num=44)
174 realview_io = RealViewCtrl(pio_addr=0x10000000)
175 gic = Gic(dist_addr=0x10041000, cpu_addr=0x10040000)
176 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
177 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
178 clcd = Pl111(pio_addr=0x10020000, int_num=55)
165
166 l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff, warn_access="1")
167 dmac_fake = AmbaFake(pio_addr=0x10030000)
168 uart1_fake = AmbaFake(pio_addr=0x1000a000)
169 uart2_fake = AmbaFake(pio_addr=0x1000b000)
170 uart3_fake = AmbaFake(pio_addr=0x1000c000)
171 smc_fake = AmbaFake(pio_addr=0x100e1000)
179
180 l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff, warn_access="1")
181 dmac_fake = AmbaFake(pio_addr=0x10030000)
182 uart1_fake = AmbaFake(pio_addr=0x1000a000)
183 uart2_fake = AmbaFake(pio_addr=0x1000b000)
184 uart3_fake = AmbaFake(pio_addr=0x1000c000)
185 smc_fake = AmbaFake(pio_addr=0x100e1000)
172 clcd_fake = AmbaFake(pio_addr=0x10020000)
173 sp810_fake = AmbaFake(pio_addr=0x10001000, ignore_access=True)
174 watchdog_fake = AmbaFake(pio_addr=0x10010000)
175 gpio0_fake = AmbaFake(pio_addr=0x10013000)
176 gpio1_fake = AmbaFake(pio_addr=0x10014000)
177 gpio2_fake = AmbaFake(pio_addr=0x10015000)
178 ssp_fake = AmbaFake(pio_addr=0x1000d000)
179 sci_fake = AmbaFake(pio_addr=0x1000e000)
180 aaci_fake = AmbaFake(pio_addr=0x10004000)

--- 12 unchanged lines hidden (view full) ---

193 # Attach I/O devices to specified bus object. Can't do this
194 # earlier, since the bus object itself is typically defined at the
195 # System level.
196 def attachIO(self, bus):
197 self.uart.pio = bus.port
198 self.realview_io.pio = bus.port
199 self.timer0.pio = bus.port
200 self.timer1.pio = bus.port
186 sp810_fake = AmbaFake(pio_addr=0x10001000, ignore_access=True)
187 watchdog_fake = AmbaFake(pio_addr=0x10010000)
188 gpio0_fake = AmbaFake(pio_addr=0x10013000)
189 gpio1_fake = AmbaFake(pio_addr=0x10014000)
190 gpio2_fake = AmbaFake(pio_addr=0x10015000)
191 ssp_fake = AmbaFake(pio_addr=0x1000d000)
192 sci_fake = AmbaFake(pio_addr=0x1000e000)
193 aaci_fake = AmbaFake(pio_addr=0x10004000)

--- 12 unchanged lines hidden (view full) ---

206 # Attach I/O devices to specified bus object. Can't do this
207 # earlier, since the bus object itself is typically defined at the
208 # System level.
209 def attachIO(self, bus):
210 self.uart.pio = bus.port
211 self.realview_io.pio = bus.port
212 self.timer0.pio = bus.port
213 self.timer1.pio = bus.port
214 self.clcd.pio = bus.port
201 self.dmac_fake.pio = bus.port
202 self.uart1_fake.pio = bus.port
203 self.uart2_fake.pio = bus.port
204 self.uart3_fake.pio = bus.port
205 self.smc_fake.pio = bus.port
215 self.dmac_fake.pio = bus.port
216 self.uart1_fake.pio = bus.port
217 self.uart2_fake.pio = bus.port
218 self.uart3_fake.pio = bus.port
219 self.smc_fake.pio = bus.port
206 self.clcd_fake.pio = bus.port
207 self.sp810_fake.pio = bus.port
208 self.watchdog_fake.pio = bus.port
209 self.gpio0_fake.pio = bus.port
210 self.gpio1_fake.pio = bus.port
211 self.gpio2_fake.pio = bus.port
212 self.ssp_fake.pio = bus.port
213 self.sci_fake.pio = bus.port
214 self.aaci_fake.pio = bus.port
215 self.mmc_fake.pio = bus.port
216 self.kmi0_fake.pio = bus.port
217 self.kmi1_fake.pio = bus.port
218 self.rtc_fake.pio = bus.port
219
220 self.sp810_fake.pio = bus.port
221 self.watchdog_fake.pio = bus.port
222 self.gpio0_fake.pio = bus.port
223 self.gpio1_fake.pio = bus.port
224 self.gpio2_fake.pio = bus.port
225 self.ssp_fake.pio = bus.port
226 self.sci_fake.pio = bus.port
227 self.aaci_fake.pio = bus.port
228 self.mmc_fake.pio = bus.port
229 self.kmi0_fake.pio = bus.port
230 self.kmi1_fake.pio = bus.port
231 self.rtc_fake.pio = bus.port
232