summaryrefslogtreecommitdiff
path: root/src/dev/arm/RealView.py
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2018-04-09 18:42:28 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2018-04-17 12:24:17 +0000
commit74e63a607af58c2df49cd2decbebd71a6d061915 (patch)
treeb5a4060f41089a8a9b8b2b7f82aa0b0b509ceb3f /src/dev/arm/RealView.py
parent68f99c93808ac4d8e12e39c87acec89d422fd8b4 (diff)
downloadgem5-74e63a607af58c2df49cd2decbebd71a6d061915.tar.xz
dev, arm: Use the PS/2 framework in the Pl050 model
The Pl050 KMI model currently has its own keyboard and mouse models. Use the generic PS/2 interface instead. Change-Id: I6523d26f8e38bcc8ba399d4d1a131723645d36c7 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/9767 Reviewed-by: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/dev/arm/RealView.py')
-rw-r--r--src/dev/arm/RealView.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py
index a59e1713f..7661db15a 100644
--- a/src/dev/arm/RealView.py
+++ b/src/dev/arm/RealView.py
@@ -62,6 +62,7 @@ from ClockDomain import SrcClockDomain
from SubSystem import SubSystem
from Graphics import ImageFormat
from ClockedObject import ClockedObject
+from PS2 import *
# Platforms with KVM support should generally use in-kernel GIC
# emulation. Use a GIC model that automatically switches between
@@ -465,11 +466,11 @@ class PL031(AmbaIntDevice):
class Pl050(AmbaIntDevice):
type = 'Pl050'
cxx_header = "dev/arm/kmi.hh"
- vnc = Param.VncInput(Parent.any, "Vnc server for remote frame buffer display")
- is_mouse = Param.Bool(False, "Is this interface a mouse, if not a keyboard")
int_delay = '1us'
amba_id = 0x00141050
+ ps2 = Param.PS2Device("PS/2 device")
+
def generateDeviceTree(self, state):
node = self.generateBasicPioDeviceNode(state, 'kmi', self.pio_addr,
0x1000, [int(self.int_num)])
@@ -624,8 +625,8 @@ class RealViewPBX(RealView):
local_cpu_timer = CpuLocalTimer(int_num_timer=29, int_num_watchdog=30,
pio_addr=0x1f000600)
clcd = Pl111(pio_addr=0x10020000, int_num=55)
- kmi0 = Pl050(pio_addr=0x10006000, int_num=52)
- kmi1 = Pl050(pio_addr=0x10007000, int_num=53, is_mouse=True)
+ kmi0 = Pl050(pio_addr=0x10006000, int_num=52, ps2=PS2Keyboard())
+ kmi1 = Pl050(pio_addr=0x10007000, int_num=53, ps2=PS2TouchKit())
a9scu = A9SCU(pio_addr=0x1f000000)
cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=7, pci_bus=2,
io_shift = 1, ctrl_offset = 2, Command = 0x1,
@@ -753,8 +754,8 @@ class RealViewEB(RealView):
timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
clcd = Pl111(pio_addr=0x10020000, int_num=23)
- kmi0 = Pl050(pio_addr=0x10006000, int_num=20)
- kmi1 = Pl050(pio_addr=0x10007000, int_num=21, is_mouse=True)
+ kmi0 = Pl050(pio_addr=0x10006000, int_num=20, ps2=PS2Keyboard())
+ kmi1 = Pl050(pio_addr=0x10007000, int_num=21, ps2=PS2TouchKit())
l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff, warn_access="1")
flash_fake = IsaFake(pio_addr=0x40000000, pio_size=0x20000000-1,
@@ -904,8 +905,8 @@ class VExpress_EMM(RealView):
timer0 = Sp804(int_num0=34, int_num1=34, pio_addr=0x1C110000, clock0='1MHz', clock1='1MHz')
timer1 = Sp804(int_num0=35, int_num1=35, pio_addr=0x1C120000, clock0='1MHz', clock1='1MHz')
clcd = Pl111(pio_addr=0x1c1f0000, int_num=46)
- kmi0 = Pl050(pio_addr=0x1c060000, int_num=44)
- kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, is_mouse=True)
+ kmi0 = Pl050(pio_addr=0x1c060000, int_num=44, ps2=PS2Keyboard())
+ kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, ps2=PS2TouchKit())
cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=0, pci_bus=2,
io_shift = 2, ctrl_offset = 2, Command = 0x1,
BAR0 = 0x1C1A0000, BAR0Size = '256B',
@@ -1136,8 +1137,8 @@ Interrupts:
uart0 = Pl011(pio_addr=0x1c090000, int_num=37)
- kmi0 = Pl050(pio_addr=0x1c060000, int_num=44)
- kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, is_mouse=True)
+ kmi0 = Pl050(pio_addr=0x1c060000, int_num=44, ps2=PS2Keyboard())
+ kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, ps2=PS2TouchKit())
rtc = PL031(pio_addr=0x1c170000, int_num=36)