RealView.py (13665:9c7fe3811b88) | RealView.py (13805:f6d331fa1303) |
---|---|
1# Copyright (c) 2009-2018 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 --- 107 unchanged lines hidden (view full) --- 116class GenericArmPciHost(GenericPciHost): 117 type = 'GenericArmPciHost' 118 cxx_header = "dev/arm/pci_host.hh" 119 120 int_policy = Param.ArmPciIntRouting("PCI interrupt routing policy") 121 int_base = Param.Unsigned("PCI interrupt base") 122 int_count = Param.Unsigned("Maximum number of interrupts used by this host") 123 | 1# Copyright (c) 2009-2018 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 --- 107 unchanged lines hidden (view full) --- 116class GenericArmPciHost(GenericPciHost): 117 type = 'GenericArmPciHost' 118 cxx_header = "dev/arm/pci_host.hh" 119 120 int_policy = Param.ArmPciIntRouting("PCI interrupt routing policy") 121 int_base = Param.Unsigned("PCI interrupt base") 122 int_count = Param.Unsigned("Maximum number of interrupts used by this host") 123 |
124 # This python parameter can be used in configuration scripts to turn 125 # on/off the fdt dma-coherent flag when doing dtb autogeneration 126 _dma_coherent = True 127 |
|
124 def generateDeviceTree(self, state): 125 local_state = FdtState(addr_cells=3, size_cells=2, cpu_cells=1) 126 intterrupt_cells = 1 127 128 node = FdtNode("pci") 129 130 if int(self.conf_device_bits) == 8: 131 node.appendCompatible("pci-host-cam-generic") --- 45 unchanged lines hidden (view full) --- 177 fatal("PCI interrupt count should be power of 2") 178 179 intmask = self.pciFdtAddr(device=int_count - 1, addr=0) + [0x0] 180 node.append(FdtPropertyWords("interrupt-map-mask", intmask)) 181 else: 182 m5.fatal("Unsupported PCI interrupt policy " + 183 "for Device Tree generation") 184 | 128 def generateDeviceTree(self, state): 129 local_state = FdtState(addr_cells=3, size_cells=2, cpu_cells=1) 130 intterrupt_cells = 1 131 132 node = FdtNode("pci") 133 134 if int(self.conf_device_bits) == 8: 135 node.appendCompatible("pci-host-cam-generic") --- 45 unchanged lines hidden (view full) --- 181 fatal("PCI interrupt count should be power of 2") 182 183 intmask = self.pciFdtAddr(device=int_count - 1, addr=0) + [0x0] 184 node.append(FdtPropertyWords("interrupt-map-mask", intmask)) 185 else: 186 m5.fatal("Unsupported PCI interrupt policy " + 187 "for Device Tree generation") 188 |
185 node.append(FdtProperty("dma-coherent")) | 189 if self._dma_coherent: 190 node.append(FdtProperty("dma-coherent")) |
186 187 yield node 188 189class RealViewCtrl(BasicPioDevice): 190 type = 'RealViewCtrl' 191 cxx_header = "dev/arm/rv_ctrl.hh" 192 proc_id0 = Param.UInt32(0x0C000000, "Processor ID, SYS_PROCID") 193 proc_id1 = Param.UInt32(0x0C000222, "Processor ID, SYS_PROCID1") --- 907 unchanged lines hidden --- | 191 192 yield node 193 194class RealViewCtrl(BasicPioDevice): 195 type = 'RealViewCtrl' 196 cxx_header = "dev/arm/rv_ctrl.hh" 197 proc_id0 = Param.UInt32(0x0C000000, "Processor ID, SYS_PROCID") 198 proc_id1 = Param.UInt32(0x0C000222, "Processor ID, SYS_PROCID1") --- 907 unchanged lines hidden --- |