Modified uart capability for initial version of uattr, need to merge it

to bahadir's repo and hence new version of uattr.
This commit is contained in:
Amit Mahajan
2009-11-24 20:13:07 +05:30
parent 19a113237d
commit fccc2240a5

View File

@@ -142,10 +142,10 @@ cap_strings = { 'ipc' : \
, 'uart' : \
'''
\t\t\t[${idx}] = {
\t\t\t\t/* For device selection. */
\t\t\t\t/* For device selection */
\t\t\t\t.target = ${cid},
\t\t\t\t.devid = ${devid},
\t\t\t\t.type = CAP_DEVTYPE_UART | CAP_TYPE_MAP_PHYSMEM | CAP_RTYPE_CONTAINER,
\t\t\t\t.uattr = CAP_DEVTYPE_UART | ${devnum},
\t\t\t\t.type = CAP_TYPE_MAP_PHYSMEM | CAP_RTYPE_CONTAINER,
\t\t\t\t.access = CAP_MAP_READ | CAP_MAP_WRITE | CAP_MAP_EXEC |
\t\t\t\t\tCAP_MAP_CACHED | CAP_MAP_UNCACHED | CAP_MAP_UNMAP | CAP_MAP_UTCB,
\t\t\t\t.start = 0, .end = 0, .size = 0,
@@ -203,7 +203,7 @@ def prepare_typed_capability(cont, param, val):
# Special case for device
if 'DEVICE' in params:
# Extract device name and number
devnum = captype[-1:]
devid = captype[-1:]
devname = captype[: -1]
cont.caps[captype] = cap_strings[devname]
@@ -220,7 +220,7 @@ def prepare_typed_capability(cont, param, val):
# If device, amend current container id and devnum as default
if 'DEVICE' in params:
cont.caps[captype] = templ.safe_substitute(cid = cont.id, devid = devnum)
cont.caps[captype] = templ.safe_substitute(cid = cont.id, devnum = devid)
# Fill in the blank size field
elif 'SIZE' in params: