Skip to content

Commit d526712

Browse files
committed
experiments/mtp.py: Clean up
Signed-off-by: Hector Martin <[email protected]>
1 parent 19e00f1 commit d526712

1 file changed

Lines changed: 2 additions & 31 deletions

File tree

proxyclient/experiments/mtp.py

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@
1515

1616
from construct import *
1717

18-
mon = RegMonitor(u)
19-
20-
#mon.add(0x23b700000, 0x10000)
21-
mon.add(0x23d28c000, 0x4000)
22-
mon.poll()
23-
mon.poll()
24-
mon.poll()
25-
mon.add(0x24e400000, 0x4000)
26-
mon.add(0x24e808000, 0x14000)
27-
2818
smc_addr = u.adt["arm-io/smc"].get_reg(0)[0]
2919
smc = SMCClient(u, smc_addr)
3020
smc.start()
@@ -48,35 +38,16 @@
4838

4939
mtp_addr = u.adt["/arm-io/mtp"].get_reg(0)[0]
5040
mtp = StandardASC(u, mtp_addr, dart, stream=1)
41+
mtp.boot()
42+
mtp.verbose = 3
5143
mtp.allow_phys = True
5244
print("pre start")
53-
mon.poll()
54-
mtp.start()
55-
print("started")
56-
mon.poll()
57-
print("ok")
5845

5946
def poll():
6047
mtp.work()
6148
mp.work_pending()
6249

63-
# 0x40: device reset
64-
# 0x42:
65-
66-
# 0 -> mbox?
67-
# 2 -> dapf?
68-
# 3 -> dart?
69-
# 3 -> dockchannel?
70-
# 5 -> mbox?
71-
def reset(i):
72-
reg = 0x23d28c000 + i*8
73-
p.set32(reg, 1<<10)
74-
p.set32(reg, 1<<31)
75-
p.clear32(reg, 1<<31)
76-
p.clear32(reg, 1<<10)
77-
7850
try:
79-
8051
mp = MTPProtocol(u, node, mtp, dc, smc)
8152

8253
mp.wait_init("keyboard")

0 commit comments

Comments
 (0)