mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-22 14:43:08 +00:00
m1n1.fw.asc: Make DVA_OFFSET dynamic
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
2c28e13d25
commit
bacb19b301
3 changed files with 3 additions and 5 deletions
|
@ -21,6 +21,7 @@ disp_dart.dump_all()
|
|||
|
||||
dcp_addr = u.adt["arm-io/dcp"].get_reg(0)[0]
|
||||
dcp = DCPIBootClient(u, dcp_addr, dart, disp_dart)
|
||||
dcp.dva_offset = getattr(u.adt["/arm-io/dcp"][0], "asc_dram_mask", 0)
|
||||
|
||||
dcp.start()
|
||||
dcp.start_ep(0x23)
|
||||
|
|
|
@ -16,8 +16,6 @@ class ASCDummyEndpoint(ASCBaseEndpoint):
|
|||
SHORT = "dummy"
|
||||
|
||||
class StandardASC(ASC):
|
||||
DVA_OFFSET = 0
|
||||
|
||||
ENDPOINTS = {
|
||||
0: ASCManagementEndpoint,
|
||||
1: ASCCrashLogEndpoint,
|
||||
|
@ -35,6 +33,7 @@ class StandardASC(ASC):
|
|||
self.dart = dart
|
||||
self.eps = []
|
||||
self.epcls = {}
|
||||
self.dva_offset = 0
|
||||
|
||||
for cls in type(self).mro():
|
||||
eps = getattr(cls, "ENDPOINTS", None)
|
||||
|
@ -47,7 +46,7 @@ class StandardASC(ASC):
|
|||
def iomap(self, addr, size):
|
||||
if self.dart is None:
|
||||
return addr
|
||||
dva = self.DVA_OFFSET | self.dart.iomap(0, addr, size)
|
||||
dva = self.dva_offset | self.dart.iomap(0, addr, size)
|
||||
|
||||
self.dart.invalidate_streams(1)
|
||||
return dva
|
||||
|
|
|
@ -5,8 +5,6 @@ from ..asc import StandardASC
|
|||
from .dcpep import DCPEndpoint
|
||||
|
||||
class DCPClient(StandardASC):
|
||||
DVA_OFFSET = 0xf00000000
|
||||
|
||||
ENDPOINTS = {
|
||||
0x37: DCPEndpoint,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue