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 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 platform = Param.Platform(Parent.any, "Platform this device is part of.") |
87 dist_addr = Param.Addr(0x1f001000, "Address for distributor") 88 cpu_addr = Param.Addr(0x1f000100, "Address for cpu") 89 dist_pio_delay = Param.Latency('10ns', "Delay for PIO r/w to distributor") 90 cpu_pio_delay = Param.Latency('10ns', "Delay for PIO r/w to cpu interface") 91 int_latency = Param.Latency('10ns', "Delay for interrupt to get to CPU") 92 it_lines = Param.UInt32(128, "Number of interrupt lines supported (max = 1020)") 93 94class AmbaFake(AmbaDevice): --- 78 unchanged lines hidden (view full) --- 173 gpio2_fake = AmbaFake(pio_addr=0x10015000) 174 ssp_fake = AmbaFake(pio_addr=0x1000d000) 175 sci_fake = AmbaFake(pio_addr=0x1000e000) 176 aaci_fake = AmbaFake(pio_addr=0x10004000) 177 mmc_fake = AmbaFake(pio_addr=0x10005000) 178 rtc_fake = AmbaFake(pio_addr=0x10017000, amba_id=0x41031) 179 180 |
181 # Attach I/O devices that are on chip 182 def attachOnChipIO(self, bus): |
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 188 # Attach I/O devices to specified bus object. Can't do this 189 # earlier, since the bus object itself is typically defined at the 190 # System level. 191 def attachIO(self, bus): 192 self.uart.pio = bus.port 193 self.realview_io.pio = bus.port 194 self.timer0.pio = bus.port 195 self.timer1.pio = bus.port 196 self.clcd.pio = bus.port |
197 self.kmi0.pio = bus.port 198 self.kmi1.pio = bus.port 199 self.cf_ctrl.pio = bus.port |
200 self.dmac_fake.pio = bus.port 201 self.uart1_fake.pio = bus.port 202 self.uart2_fake.pio = bus.port 203 self.uart3_fake.pio = bus.port 204 self.smc_fake.pio = bus.port 205 self.sp810_fake.pio = bus.port 206 self.watchdog_fake.pio = bus.port 207 self.gpio0_fake.pio = bus.port --- 36 unchanged lines hidden (view full) --- 244 ssp_fake = AmbaFake(pio_addr=0x1000d000) 245 sci_fake = AmbaFake(pio_addr=0x1000e000) 246 aaci_fake = AmbaFake(pio_addr=0x10004000) 247 mmc_fake = AmbaFake(pio_addr=0x10005000) 248 rtc_fake = AmbaFake(pio_addr=0x10017000, amba_id=0x41031) 249 250 251 |
252 # Attach I/O devices that are on chip 253 def attachOnChipIO(self, bus): |
254 self.gic.pio = bus.port 255 self.l2x0_fake.pio = bus.port |
256 257 # Attach I/O devices to specified bus object. Can't do this 258 # earlier, since the bus object itself is typically defined at the 259 # System level. 260 def attachIO(self, bus): 261 self.uart.pio = bus.port 262 self.realview_io.pio = bus.port 263 self.timer0.pio = bus.port 264 self.timer1.pio = bus.port 265 self.clcd.pio = bus.port |
266 self.kmi0.pio = bus.port 267 self.kmi1.pio = bus.port 268 self.dmac_fake.pio = bus.port 269 self.uart1_fake.pio = bus.port 270 self.uart2_fake.pio = bus.port 271 self.uart3_fake.pio = bus.port 272 self.smc_fake.pio = bus.port 273 self.sp810_fake.pio = bus.port --- 51 unchanged lines hidden (view full) --- 325 elba_aaci_fake = AmbaFake(pio_addr=0xE0004000) 326 mmc_fake = AmbaFake(pio_addr=0xE0005000) # not sure if we need this 327 rtc_fake = AmbaFake(pio_addr=0xE0017000, amba_id=0x41031) 328 spsc_fake = IsaFake(pio_addr=0xE001B000, pio_size=0x2000) 329 lan_fake = IsaFake(pio_addr=0xFA000000, pio_size=0xffff) 330 usb_fake = IsaFake(pio_addr=0xFB000000, pio_size=0x1ffff) 331 332 |
333 # Attach I/O devices that are on chip 334 def attachOnChipIO(self, bus): |
335 self.gic.pio = bus.port 336 self.a9scu.pio = bus.port |
337 338 # Attach I/O devices to specified bus object. Can't do this 339 # earlier, since the bus object itself is typically defined at the 340 # System level. 341 def attachIO(self, bus): 342 self.elba_uart.pio = bus.port 343 self.uart.pio = bus.port 344 self.realview_io.pio = bus.port 345 self.local_cpu_timer.pio = bus.port 346 self.v2m_timer0.pio = bus.port 347 self.v2m_timer1.pio = bus.port 348 self.elba_timer0.pio = bus.port 349 self.elba_timer1.pio = bus.port 350 self.clcd.pio = bus.port |
351 self.kmi0.pio = bus.port 352 self.kmi1.pio = bus.port 353 self.elba_kmi0.pio = bus.port 354 self.elba_kmi1.pio = bus.port 355 self.cf_ctrl.pio = bus.port |
356 self.ide.pio = bus.port |
357 self.ethernet.pio = bus.port |
358 self.pciconfig.pio = bus.default 359 bus.use_default_range = True 360 361 self.l2x0_fake.pio = bus.port 362 self.dmac_fake.pio = bus.port 363 self.uart1_fake.pio = bus.port 364 self.uart2_fake.pio = bus.port 365 self.uart3_fake.pio = bus.port 366 self.smc_fake.pio = bus.port 367 self.sp810_fake.pio = bus.port 368 self.watchdog_fake.pio = bus.port 369 self.aaci_fake.pio = bus.port 370 self.elba_aaci_fake.pio = bus.port 371 self.mmc_fake.pio = bus.port 372 self.rtc_fake.pio = bus.port 373 self.spsc_fake.pio = bus.port 374 self.lan_fake.pio = bus.port 375 self.usb_fake.pio = bus.port 376 |