Deleted Added
sdiff udiff text old ( 8714:cd48e2802644 ) new ( 8742:9df38d259935 )
full compact
1# Copyright (c) 2009-2011 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
9# terms below provided that you ensure that this notice is replicated

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

78class RealViewCtrl(BasicPioDevice):
79 type = 'RealViewCtrl'
80 proc_id0 = Param.UInt32(0x0C000000, "Processor ID, SYS_PROCID")
81 proc_id1 = Param.UInt32(0x0C000222, "Processor ID, SYS_PROCID1")
82 idreg = Param.UInt32(0x00000000, "ID Register, SYS_ID")
83
84class Gic(PioDevice):
85 type = 'Gic'
86 dist_addr = Param.Addr(0x1f001000, "Address for distributor")
87 cpu_addr = Param.Addr(0x1f000100, "Address for cpu")
88 dist_pio_delay = Param.Latency('10ns', "Delay for PIO r/w to distributor")
89 cpu_pio_delay = Param.Latency('10ns', "Delay for PIO r/w to cpu interface")
90 int_latency = Param.Latency('10ns', "Delay for interrupt to get to CPU")
91 it_lines = Param.UInt32(128, "Number of interrupt lines supported (max = 1020)")
92
93class AmbaFake(AmbaDevice):

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

172 gpio2_fake = AmbaFake(pio_addr=0x10015000)
173 ssp_fake = AmbaFake(pio_addr=0x1000d000)
174 sci_fake = AmbaFake(pio_addr=0x1000e000)
175 aaci_fake = AmbaFake(pio_addr=0x10004000)
176 mmc_fake = AmbaFake(pio_addr=0x10005000)
177 rtc_fake = AmbaFake(pio_addr=0x10017000, amba_id=0x41031)
178
179
180 # Attach I/O devices that are on chip and also set the appropriate
181 # ranges for the bridge
182 def attachOnChipIO(self, bus, bridge):
183 self.gic.pio = bus.port
184 self.l2x0_fake.pio = bus.port
185 self.a9scu.pio = bus.port
186 self.local_cpu_timer.pio = bus.port
187 # Bridge ranges based on excluding what is part of on-chip I/O
188 # (gic, l2x0, a9scu, local_cpu_timer)
189 bridge.ranges = [AddrRange(self.realview_io.pio_addr,
190 self.a9scu.pio_addr - 1),
191 AddrRange(self.flash_fake.pio_addr, Addr.max)]
192
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
201 self.clcd.pio = bus.port
202 self.clcd.dma = bus.port
203 self.kmi0.pio = bus.port
204 self.kmi1.pio = bus.port
205 self.cf_ctrl.pio = bus.port
206 self.cf_ctrl.config = bus.port
207 self.cf_ctrl.dma = bus.port
208 self.dmac_fake.pio = bus.port
209 self.uart1_fake.pio = bus.port
210 self.uart2_fake.pio = bus.port
211 self.uart3_fake.pio = bus.port
212 self.smc_fake.pio = bus.port
213 self.sp810_fake.pio = bus.port
214 self.watchdog_fake.pio = bus.port
215 self.gpio0_fake.pio = bus.port

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

252 ssp_fake = AmbaFake(pio_addr=0x1000d000)
253 sci_fake = AmbaFake(pio_addr=0x1000e000)
254 aaci_fake = AmbaFake(pio_addr=0x10004000)
255 mmc_fake = AmbaFake(pio_addr=0x10005000)
256 rtc_fake = AmbaFake(pio_addr=0x10017000, amba_id=0x41031)
257
258
259
260 # Attach I/O devices that are on chip and also set the appropriate
261 # ranges for the bridge
262 def attachOnChipIO(self, bus, bridge):
263 self.gic.pio = bus.port
264 self.l2x0_fake.pio = bus.port
265 # Bridge ranges based on excluding what is part of on-chip I/O
266 # (gic, l2x0)
267 bridge.ranges = [AddrRange(self.realview_io.pio_addr,
268 self.gic.cpu_addr - 1),
269 AddrRange(self.flash_fake.pio_addr, Addr.max)]
270
271 # Attach I/O devices to specified bus object. Can't do this
272 # earlier, since the bus object itself is typically defined at the
273 # System level.
274 def attachIO(self, bus):
275 self.uart.pio = bus.port
276 self.realview_io.pio = bus.port
277 self.timer0.pio = bus.port
278 self.timer1.pio = bus.port
279 self.clcd.pio = bus.port
280 self.clcd.dma = bus.port
281 self.kmi0.pio = bus.port
282 self.kmi1.pio = bus.port
283 self.dmac_fake.pio = bus.port
284 self.uart1_fake.pio = bus.port
285 self.uart2_fake.pio = bus.port
286 self.uart3_fake.pio = bus.port
287 self.smc_fake.pio = bus.port
288 self.sp810_fake.pio = bus.port

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

340 elba_aaci_fake = AmbaFake(pio_addr=0xE0004000)
341 mmc_fake = AmbaFake(pio_addr=0xE0005000) # not sure if we need this
342 rtc_fake = AmbaFake(pio_addr=0xE0017000, amba_id=0x41031)
343 spsc_fake = IsaFake(pio_addr=0xE001B000, pio_size=0x2000)
344 lan_fake = IsaFake(pio_addr=0xFA000000, pio_size=0xffff)
345 usb_fake = IsaFake(pio_addr=0xFB000000, pio_size=0x1ffff)
346
347
348 # Attach I/O devices that are on chip and also set the appropriate
349 # ranges for the bridge
350 def attachOnChipIO(self, bus, bridge):
351 self.gic.pio = bus.port
352 self.a9scu.pio = bus.port
353 # Bridge ranges based on excluding what is part of on-chip I/O
354 # (gic, a9scu)
355 bridge.ranges = [AddrRange(self.pci_cfg_base, self.a9scu.pio_addr - 1),
356 AddrRange(self.local_cpu_timer.pio_addr, Addr.max)]
357
358 # Attach I/O devices to specified bus object. Can't do this
359 # earlier, since the bus object itself is typically defined at the
360 # System level.
361 def attachIO(self, bus):
362 self.elba_uart.pio = bus.port
363 self.uart.pio = bus.port
364 self.realview_io.pio = bus.port
365 self.local_cpu_timer.pio = bus.port
366 self.v2m_timer0.pio = bus.port
367 self.v2m_timer1.pio = bus.port
368 self.elba_timer0.pio = bus.port
369 self.elba_timer1.pio = bus.port
370 self.clcd.pio = bus.port
371 self.clcd.dma = bus.port
372 self.kmi0.pio = bus.port
373 self.kmi1.pio = bus.port
374 self.elba_kmi0.pio = bus.port
375 self.elba_kmi1.pio = bus.port
376 self.cf_ctrl.pio = bus.port
377 self.cf_ctrl.config = bus.port
378 self.cf_ctrl.dma = bus.port
379 self.ide.pio = bus.port
380 self.ide.config = bus.port
381 self.ide.dma = bus.port
382 self.ethernet.pio = bus.port
383 self.ethernet.config = bus.port
384 self.ethernet.dma = bus.port
385 self.pciconfig.pio = bus.default
386 bus.use_default_range = True
387
388 self.l2x0_fake.pio = bus.port
389 self.dmac_fake.pio = bus.port
390 self.uart1_fake.pio = bus.port
391 self.uart2_fake.pio = bus.port
392 self.uart3_fake.pio = bus.port
393 self.smc_fake.pio = bus.port
394 self.sp810_fake.pio = bus.port
395 self.watchdog_fake.pio = bus.port
396 self.aaci_fake.pio = bus.port
397 self.elba_aaci_fake.pio = bus.port
398 self.mmc_fake.pio = bus.port
399 self.rtc_fake.pio = bus.port
400 self.spsc_fake.pio = bus.port
401 self.lan_fake.pio = bus.port
402 self.usb_fake.pio = bus.port
403