Lines Matching refs:pACB

135 static void arcmsr_hbaC_message_isr(struct AdapterControlBlock *pACB);
435 static uint8_t arcmsr_hbaC_wait_msgint_ready(struct AdapterControlBlock *pACB) in arcmsr_hbaC_wait_msgint_ready() argument
437 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_wait_msgint_ready()
453 static bool arcmsr_hbaD_wait_msgint_ready(struct AdapterControlBlock *pACB) in arcmsr_hbaD_wait_msgint_ready() argument
455 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_wait_msgint_ready()
470 static bool arcmsr_hbaE_wait_msgint_ready(struct AdapterControlBlock *pACB) in arcmsr_hbaE_wait_msgint_ready() argument
474 struct MessageUnit_E __iomem *phbcmu = pACB->pmuE; in arcmsr_hbaE_wait_msgint_ready()
478 if ((read_doorbell ^ pACB->in_doorbell) & ARCMSR_HBEMU_IOP2DRV_MESSAGE_CMD_DONE) { in arcmsr_hbaE_wait_msgint_ready()
480 pACB->in_doorbell = read_doorbell; in arcmsr_hbaE_wait_msgint_ready()
520 static void arcmsr_hbaC_flush_cache(struct AdapterControlBlock *pACB) in arcmsr_hbaC_flush_cache() argument
522 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_flush_cache()
527 if (arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_flush_cache()
532 timeout,retry count down = %d \n", pACB->host->host_no, retry_count); in arcmsr_hbaC_flush_cache()
538 static void arcmsr_hbaD_flush_cache(struct AdapterControlBlock *pACB) in arcmsr_hbaD_flush_cache() argument
541 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_flush_cache()
545 if (arcmsr_hbaD_wait_msgint_ready(pACB)) in arcmsr_hbaD_flush_cache()
551 pACB->host->host_no, retry_count); in arcmsr_hbaD_flush_cache()
555 static void arcmsr_hbaE_flush_cache(struct AdapterControlBlock *pACB) in arcmsr_hbaE_flush_cache() argument
558 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_flush_cache()
561 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_flush_cache()
562 writel(pACB->out_doorbell, &reg->iobound_doorbell); in arcmsr_hbaE_flush_cache()
564 if (arcmsr_hbaE_wait_msgint_ready(pACB)) in arcmsr_hbaE_flush_cache()
569 pACB->host->host_no, retry_count); in arcmsr_hbaE_flush_cache()
1239 static uint8_t arcmsr_hbaC_abort_allcmd(struct AdapterControlBlock *pACB) in arcmsr_hbaC_abort_allcmd() argument
1241 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_abort_allcmd()
1244 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_abort_allcmd()
1247 , pACB->host->host_no); in arcmsr_hbaC_abort_allcmd()
1253 static uint8_t arcmsr_hbaD_abort_allcmd(struct AdapterControlBlock *pACB) in arcmsr_hbaD_abort_allcmd() argument
1255 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_abort_allcmd()
1258 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) { in arcmsr_hbaD_abort_allcmd()
1260 "command' timeout\n", pACB->host->host_no); in arcmsr_hbaD_abort_allcmd()
1266 static uint8_t arcmsr_hbaE_abort_allcmd(struct AdapterControlBlock *pACB) in arcmsr_hbaE_abort_allcmd() argument
1268 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_abort_allcmd()
1271 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_abort_allcmd()
1272 writel(pACB->out_doorbell, &reg->iobound_doorbell); in arcmsr_hbaE_abort_allcmd()
1273 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_abort_allcmd()
1275 "command' timeout\n", pACB->host->host_no); in arcmsr_hbaE_abort_allcmd()
1962 static void arcmsr_hbaC_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaC_stop_bgrb() argument
1964 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_stop_bgrb()
1965 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaC_stop_bgrb()
1968 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_stop_bgrb()
1971 , pACB->host->host_no); in arcmsr_hbaC_stop_bgrb()
1976 static void arcmsr_hbaD_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaD_stop_bgrb() argument
1978 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_stop_bgrb()
1980 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaD_stop_bgrb()
1982 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) in arcmsr_hbaD_stop_bgrb()
1984 "timeout\n", pACB->host->host_no); in arcmsr_hbaD_stop_bgrb()
1987 static void arcmsr_hbaE_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaE_stop_bgrb() argument
1989 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_stop_bgrb()
1991 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaE_stop_bgrb()
1993 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_stop_bgrb()
1994 writel(pACB->out_doorbell, &reg->iobound_doorbell); in arcmsr_hbaE_stop_bgrb()
1995 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_stop_bgrb()
1997 "timeout\n", pACB->host->host_no); in arcmsr_hbaE_stop_bgrb()
2373 static void arcmsr_hbaC_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaC_doorbell_isr() argument
2376 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_doorbell_isr()
2389 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaC_doorbell_isr()
2391 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaC_doorbell_isr()
2393 arcmsr_hbaC_message_isr(pACB); in arcmsr_hbaC_doorbell_isr()
2400 static void arcmsr_hbaD_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaD_doorbell_isr() argument
2403 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_doorbell_isr()
2409 arcmsr_hbaD_message_isr(pACB); in arcmsr_hbaD_doorbell_isr()
2411 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaD_doorbell_isr()
2413 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaD_doorbell_isr()
2420 static void arcmsr_hbaE_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaE_doorbell_isr() argument
2423 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_doorbell_isr()
2425 if (pACB->adapter_type == ACB_ADAPTER_TYPE_F) { in arcmsr_hbaE_doorbell_isr()
2433 outbound_doorbell = in_doorbell ^ pACB->in_doorbell; in arcmsr_hbaE_doorbell_isr()
2437 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaE_doorbell_isr()
2440 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaE_doorbell_isr()
2443 arcmsr_hbaE_message_isr(pACB); in arcmsr_hbaE_doorbell_isr()
2451 pACB->in_doorbell = in_doorbell; in arcmsr_hbaE_doorbell_isr()
2749 static int arcmsr_hbaC_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaC_handle_isr() argument
2752 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_handle_isr()
2765 arcmsr_hbaC_doorbell_isr(pACB); in arcmsr_hbaC_handle_isr()
2768 arcmsr_hbaC_postqueue_isr(pACB); in arcmsr_hbaC_handle_isr()
2775 static irqreturn_t arcmsr_hbaD_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaD_handle_isr() argument
2778 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_handle_isr()
2789 arcmsr_hbaD_postqueue_isr(pACB); in arcmsr_hbaD_handle_isr()
2792 arcmsr_hbaD_doorbell_isr(pACB); in arcmsr_hbaD_handle_isr()
2800 static irqreturn_t arcmsr_hbaE_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaE_handle_isr() argument
2803 struct MessageUnit_E __iomem *pmu = pACB->pmuE; in arcmsr_hbaE_handle_isr()
2813 arcmsr_hbaE_doorbell_isr(pACB); in arcmsr_hbaE_handle_isr()
2817 arcmsr_hbaE_postqueue_isr(pACB); in arcmsr_hbaE_handle_isr()
2825 static irqreturn_t arcmsr_hbaF_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaF_handle_isr() argument
2828 struct MessageUnit_F __iomem *phbcmu = pACB->pmuF; in arcmsr_hbaF_handle_isr()
2838 arcmsr_hbaF_postqueue_isr(pACB); in arcmsr_hbaF_handle_isr()
2842 arcmsr_hbaE_doorbell_isr(pACB); in arcmsr_hbaF_handle_isr()
3275 static void arcmsr_get_adapter_config(struct AdapterControlBlock *pACB, uint32_t *rwbuffer) in arcmsr_get_adapter_config() argument
3278 uint32_t *acb_firm_model = (uint32_t *)pACB->firm_model; in arcmsr_get_adapter_config()
3279 uint32_t *acb_firm_version = (uint32_t *)pACB->firm_version; in arcmsr_get_adapter_config()
3280 uint32_t *acb_device_map = (uint32_t *)pACB->device_map; in arcmsr_get_adapter_config()
3306 pACB->signature = readl(&rwbuffer[0]); in arcmsr_get_adapter_config()
3307 pACB->firm_request_len = readl(&rwbuffer[1]); in arcmsr_get_adapter_config()
3308 pACB->firm_numbers_queue = readl(&rwbuffer[2]); in arcmsr_get_adapter_config()
3309 pACB->firm_sdram_size = readl(&rwbuffer[3]); in arcmsr_get_adapter_config()
3310 pACB->firm_hd_channels = readl(&rwbuffer[4]); in arcmsr_get_adapter_config()
3311 pACB->firm_cfg_version = readl(&rwbuffer[25]); in arcmsr_get_adapter_config()
3313 pACB->host->host_no, in arcmsr_get_adapter_config()
3314 pACB->firm_model, in arcmsr_get_adapter_config()
3315 pACB->firm_version); in arcmsr_get_adapter_config()
3352 static bool arcmsr_hbaC_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaC_get_config() argument
3355 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_get_config()
3361 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaC_get_config()
3366 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_get_config()
3368 miscellaneous data' timeout \n", pACB->host->host_no); in arcmsr_hbaC_get_config()
3371 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer); in arcmsr_hbaC_get_config()
3397 static bool arcmsr_hbaE_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaE_get_config() argument
3399 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_get_config()
3406 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaE_get_config()
3411 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_get_config()
3412 writel(pACB->out_doorbell, &reg->iobound_doorbell); in arcmsr_hbaE_get_config()
3414 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_get_config()
3416 "miscellaneous data timeout\n", pACB->host->host_no); in arcmsr_hbaE_get_config()
3419 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer); in arcmsr_hbaE_get_config()
3423 static bool arcmsr_hbaF_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaF_get_config() argument
3425 struct MessageUnit_F __iomem *reg = pACB->pmuF; in arcmsr_hbaF_get_config()
3432 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaF_get_config()
3436 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaF_get_config()
3437 writel(pACB->out_doorbell, &reg->iobound_doorbell); in arcmsr_hbaF_get_config()
3439 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaF_get_config()
3441 pACB->host->host_no); in arcmsr_hbaF_get_config()
3444 arcmsr_get_adapter_config(pACB, pACB->msgcode_rwbuffer); in arcmsr_hbaF_get_config()
4249 static void arcmsr_hbaC_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaC_start_bgrb() argument
4251 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_start_bgrb()
4252 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaC_start_bgrb()
4255 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_start_bgrb()
4257 rebuild' timeout \n", pACB->host->host_no); in arcmsr_hbaC_start_bgrb()
4262 static void arcmsr_hbaD_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaD_start_bgrb() argument
4264 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_start_bgrb()
4266 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaD_start_bgrb()
4268 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) { in arcmsr_hbaD_start_bgrb()
4270 "background rebuild' timeout\n", pACB->host->host_no); in arcmsr_hbaD_start_bgrb()
4274 static void arcmsr_hbaE_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaE_start_bgrb() argument
4276 struct MessageUnit_E __iomem *pmu = pACB->pmuE; in arcmsr_hbaE_start_bgrb()
4278 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaE_start_bgrb()
4280 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_start_bgrb()
4281 writel(pACB->out_doorbell, &pmu->iobound_doorbell); in arcmsr_hbaE_start_bgrb()
4282 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_start_bgrb()
4284 "background rebuild' timeout \n", pACB->host->host_no); in arcmsr_hbaE_start_bgrb()