The driver should map in its device's registers. The driver need to specify the following items:
Register set index
Data access characteristics of the device
Size of the register to be mapped
ddi_device_acc_attr_t dev_attributes;
dev_attributes.devacc_attr_version = DDI_DEVICE_ATTR_V0;
dev_attributes.devacc_attr_dataorder = DDI_STRICTORDER_ACC;
dev_attributes.devacc_attr_endian_flags = DDI_STRUCTURE_LE_ACC;
if (ddi_regs_map_setup(dip, 0, (caddr_t *)&isp->isp_reg,
0, sizeof (struct ispregs), &dev_attributes,
&isp->isp_acc_handle) != DDI_SUCCESS) {
/* do error recovery */
return (DDI_FAILURE);
}