Add DEVICE_SELF_OWNER which allows an address map to refer to the

owner of its owning device. Useful for CPU address map handlers for
CPU's that are part of a device.
This commit is contained in:
Aaron Giles 2010-12-20 14:08:32 +00:00
parent 6387823ea6
commit 7c2a83e1ef
2 changed files with 8 additions and 0 deletions

View File

@ -54,6 +54,11 @@ inline void map_handler_data::set_tag(const device_config &devconfig, const char
m_tag = NULL;
else if (strcmp(tag, DEVICE_SELF) == 0)
m_tag = devconfig.tag();
else if (strcmp(tag, DEVICE_SELF_OWNER) == 0)
{
assert(devconfig.owner() != NULL);
m_tag = devconfig.owner()->tag();
}
else
m_tag = devconfig.siblingtag(m_derived_tag, tag);
}

View File

@ -1082,5 +1082,8 @@ void ADDRESS_MAP_NAME(_name)(address_map &map, const device_config &devconfig) \
// use this to refer to the owning device when providing a device tag
static const char DEVICE_SELF[] = "";
// use this to refer to the owning device's owner when providing a device tag
static const char DEVICE_SELF_OWNER[] = "^";
#endif /* __ADDRMAP_H__ */