mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-22 14:43:08 +00:00
m1n1.fw.agx.channels: Map the specific size for each state field type
Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
13cfe5028f
commit
63345c43ac
1 changed files with 5 additions and 1 deletions
|
@ -402,10 +402,14 @@ channelRings = (
|
|||
)
|
||||
|
||||
class ChannelStateFields(RegMap):
|
||||
_SIZE = 0x30
|
||||
|
||||
READ_PTR = 0x00, Register32
|
||||
WRITE_PTR = 0x20, Register32
|
||||
|
||||
class FWControlStateFields(RegMap):
|
||||
_SIZE = 0x20
|
||||
|
||||
READ_PTR = 0x00, Register32
|
||||
WRITE_PTR = 0x10, Register32
|
||||
|
||||
|
@ -419,7 +423,7 @@ class Channel(Reloadable):
|
|||
self.ring_defs = ring_defs
|
||||
self.info = info
|
||||
|
||||
self.st_maps = uat.iotranslate(0, info.state_addr, 0x30 * len(ring_defs))
|
||||
self.st_maps = uat.iotranslate(0, info.state_addr, state_fields._SIZE * len(ring_defs))
|
||||
assert len(self.st_maps) == 1
|
||||
self.state_phys = self.st_maps[0][0]
|
||||
self.state = []
|
||||
|
|
Loading…
Reference in a new issue