/* Sets the local host master port lock and destination ID register with the host device ID value. The host device ID value is provided by the platform. Returns %0 on success or %-1 on failure.  */
static int rio_enum_host(struct rio_mport *port)
/* Sets the local host master port lock and destination ID register with the host device ID value. The host device ID value is provided by the platform. Returns %0 on success or %-1 on failure.  */
static int rio_enum_host(struct rio_mport *port)
{
	u32 result;
	rio_local_write_config_32(port, RIO_HOST_DID_LOCK_CSR,
				  port->host_deviceid);
	rio_local_read_config_32(port, RIO_HOST_DID_LOCK_CSR, &result);
	if ((result & 0xffff) != port->host_deviceid)
		return -1;
	rio_local_set_device_id(port, port->host_deviceid);
	if (next_destid == port->host_deviceid)
		next_destid++;
	return 0;
}