Lines Matching refs:acc
388 static void raw_convert_status(struct scom_access *acc, uint32_t status) in raw_convert_status() argument
390 acc->pib_status = (status & SCOM_STATUS_PIB_RESP_MASK) >> in raw_convert_status()
392 acc->intf_errors = 0; in raw_convert_status()
395 acc->intf_errors |= SCOM_INTF_ERR_PROTECTION; in raw_convert_status()
397 acc->intf_errors |= SCOM_INTF_ERR_PARITY; in raw_convert_status()
399 acc->intf_errors |= SCOM_INTF_ERR_ABORT; in raw_convert_status()
401 acc->intf_errors |= SCOM_INTF_ERR_UNKNOWN; in raw_convert_status()
406 struct scom_access acc; in scom_raw_read() local
410 if (copy_from_user(&acc, argp, sizeof(struct scom_access))) in scom_raw_read()
413 rc = raw_get_scom(scom, &acc.data, acc.addr, &status); in scom_raw_read()
416 raw_convert_status(&acc, status); in scom_raw_read()
417 if (copy_to_user(argp, &acc, sizeof(struct scom_access))) in scom_raw_read()
425 struct scom_access acc; in scom_raw_write() local
429 if (copy_from_user(&acc, argp, sizeof(struct scom_access))) in scom_raw_write()
432 if (acc.mask) { in scom_raw_write()
433 rc = raw_get_scom(scom, &prev_data, acc.addr, &status); in scom_raw_write()
438 mask = acc.mask; in scom_raw_write()
442 data = (prev_data & ~mask) | (acc.data & mask); in scom_raw_write()
443 rc = raw_put_scom(scom, data, acc.addr, &status); in scom_raw_write()
447 raw_convert_status(&acc, status); in scom_raw_write()
448 if (copy_to_user(argp, &acc, sizeof(struct scom_access))) in scom_raw_write()