Lines Matching refs:pACB
136 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, ®->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()
1237 static uint8_t arcmsr_hbaC_abort_allcmd(struct AdapterControlBlock *pACB) in arcmsr_hbaC_abort_allcmd() argument
1239 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_abort_allcmd()
1242 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_abort_allcmd()
1245 , pACB->host->host_no); in arcmsr_hbaC_abort_allcmd()
1251 static uint8_t arcmsr_hbaD_abort_allcmd(struct AdapterControlBlock *pACB) in arcmsr_hbaD_abort_allcmd() argument
1253 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_abort_allcmd()
1256 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) { in arcmsr_hbaD_abort_allcmd()
1258 "command' timeout\n", pACB->host->host_no); in arcmsr_hbaD_abort_allcmd()
1264 static uint8_t arcmsr_hbaE_abort_allcmd(struct AdapterControlBlock *pACB) in arcmsr_hbaE_abort_allcmd() argument
1266 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_abort_allcmd()
1269 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_abort_allcmd()
1270 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaE_abort_allcmd()
1271 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_abort_allcmd()
1273 "command' timeout\n", pACB->host->host_no); in arcmsr_hbaE_abort_allcmd()
1967 static void arcmsr_hbaC_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaC_stop_bgrb() argument
1969 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_stop_bgrb()
1970 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaC_stop_bgrb()
1973 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_stop_bgrb()
1976 , pACB->host->host_no); in arcmsr_hbaC_stop_bgrb()
1981 static void arcmsr_hbaD_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaD_stop_bgrb() argument
1983 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_stop_bgrb()
1985 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaD_stop_bgrb()
1987 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) in arcmsr_hbaD_stop_bgrb()
1989 "timeout\n", pACB->host->host_no); in arcmsr_hbaD_stop_bgrb()
1992 static void arcmsr_hbaE_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaE_stop_bgrb() argument
1994 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_stop_bgrb()
1996 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaE_stop_bgrb()
1998 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_stop_bgrb()
1999 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaE_stop_bgrb()
2000 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_stop_bgrb()
2002 "timeout\n", pACB->host->host_no); in arcmsr_hbaE_stop_bgrb()
2375 static void arcmsr_hbaC_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaC_doorbell_isr() argument
2378 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_doorbell_isr()
2391 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaC_doorbell_isr()
2393 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaC_doorbell_isr()
2395 arcmsr_hbaC_message_isr(pACB); in arcmsr_hbaC_doorbell_isr()
2402 static void arcmsr_hbaD_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaD_doorbell_isr() argument
2405 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_doorbell_isr()
2411 arcmsr_hbaD_message_isr(pACB); in arcmsr_hbaD_doorbell_isr()
2413 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaD_doorbell_isr()
2415 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaD_doorbell_isr()
2422 static void arcmsr_hbaE_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaE_doorbell_isr() argument
2425 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_doorbell_isr()
2427 if (pACB->adapter_type == ACB_ADAPTER_TYPE_F) { in arcmsr_hbaE_doorbell_isr()
2435 outbound_doorbell = in_doorbell ^ pACB->in_doorbell; in arcmsr_hbaE_doorbell_isr()
2439 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaE_doorbell_isr()
2442 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaE_doorbell_isr()
2445 arcmsr_hbaE_message_isr(pACB); in arcmsr_hbaE_doorbell_isr()
2453 pACB->in_doorbell = in_doorbell; in arcmsr_hbaE_doorbell_isr()
2751 static int arcmsr_hbaC_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaC_handle_isr() argument
2754 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_handle_isr()
2767 arcmsr_hbaC_doorbell_isr(pACB); in arcmsr_hbaC_handle_isr()
2770 arcmsr_hbaC_postqueue_isr(pACB); in arcmsr_hbaC_handle_isr()
2777 static irqreturn_t arcmsr_hbaD_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaD_handle_isr() argument
2780 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_handle_isr()
2791 arcmsr_hbaD_postqueue_isr(pACB); in arcmsr_hbaD_handle_isr()
2794 arcmsr_hbaD_doorbell_isr(pACB); in arcmsr_hbaD_handle_isr()
2802 static irqreturn_t arcmsr_hbaE_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaE_handle_isr() argument
2805 struct MessageUnit_E __iomem *pmu = pACB->pmuE; in arcmsr_hbaE_handle_isr()
2815 arcmsr_hbaE_doorbell_isr(pACB); in arcmsr_hbaE_handle_isr()
2819 arcmsr_hbaE_postqueue_isr(pACB); in arcmsr_hbaE_handle_isr()
2827 static irqreturn_t arcmsr_hbaF_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaF_handle_isr() argument
2830 struct MessageUnit_F __iomem *phbcmu = pACB->pmuF; in arcmsr_hbaF_handle_isr()
2840 arcmsr_hbaF_postqueue_isr(pACB); in arcmsr_hbaF_handle_isr()
2844 arcmsr_hbaE_doorbell_isr(pACB); in arcmsr_hbaF_handle_isr()
3277 static void arcmsr_get_adapter_config(struct AdapterControlBlock *pACB, uint32_t *rwbuffer) in arcmsr_get_adapter_config() argument
3280 uint32_t *acb_firm_model = (uint32_t *)pACB->firm_model; in arcmsr_get_adapter_config()
3281 uint32_t *acb_firm_version = (uint32_t *)pACB->firm_version; in arcmsr_get_adapter_config()
3282 uint32_t *acb_device_map = (uint32_t *)pACB->device_map; in arcmsr_get_adapter_config()
3308 pACB->signature = readl(&rwbuffer[0]); in arcmsr_get_adapter_config()
3309 pACB->firm_request_len = readl(&rwbuffer[1]); in arcmsr_get_adapter_config()
3310 pACB->firm_numbers_queue = readl(&rwbuffer[2]); in arcmsr_get_adapter_config()
3311 pACB->firm_sdram_size = readl(&rwbuffer[3]); in arcmsr_get_adapter_config()
3312 pACB->firm_hd_channels = readl(&rwbuffer[4]); in arcmsr_get_adapter_config()
3313 pACB->firm_cfg_version = readl(&rwbuffer[25]); in arcmsr_get_adapter_config()
3315 pACB->host->host_no, in arcmsr_get_adapter_config()
3316 pACB->firm_model, in arcmsr_get_adapter_config()
3317 pACB->firm_version); in arcmsr_get_adapter_config()
3354 static bool arcmsr_hbaC_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaC_get_config() argument
3357 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_get_config()
3363 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaC_get_config()
3368 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_get_config()
3370 miscellaneous data' timeout \n", pACB->host->host_no); in arcmsr_hbaC_get_config()
3373 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer); in arcmsr_hbaC_get_config()
3399 static bool arcmsr_hbaE_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaE_get_config() argument
3401 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_get_config()
3408 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaE_get_config()
3413 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_get_config()
3414 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaE_get_config()
3416 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_get_config()
3418 "miscellaneous data timeout\n", pACB->host->host_no); in arcmsr_hbaE_get_config()
3421 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer); in arcmsr_hbaE_get_config()
3425 static bool arcmsr_hbaF_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaF_get_config() argument
3427 struct MessageUnit_F __iomem *reg = pACB->pmuF; in arcmsr_hbaF_get_config()
3434 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaF_get_config()
3438 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaF_get_config()
3439 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaF_get_config()
3441 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaF_get_config()
3443 pACB->host->host_no); in arcmsr_hbaF_get_config()
3446 arcmsr_get_adapter_config(pACB, pACB->msgcode_rwbuffer); in arcmsr_hbaF_get_config()
4251 static void arcmsr_hbaC_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaC_start_bgrb() argument
4253 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_start_bgrb()
4254 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaC_start_bgrb()
4257 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_start_bgrb()
4259 rebuild' timeout \n", pACB->host->host_no); in arcmsr_hbaC_start_bgrb()
4264 static void arcmsr_hbaD_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaD_start_bgrb() argument
4266 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_start_bgrb()
4268 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaD_start_bgrb()
4270 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) { in arcmsr_hbaD_start_bgrb()
4272 "background rebuild' timeout\n", pACB->host->host_no); in arcmsr_hbaD_start_bgrb()
4276 static void arcmsr_hbaE_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaE_start_bgrb() argument
4278 struct MessageUnit_E __iomem *pmu = pACB->pmuE; in arcmsr_hbaE_start_bgrb()
4280 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaE_start_bgrb()
4282 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_start_bgrb()
4283 writel(pACB->out_doorbell, &pmu->iobound_doorbell); in arcmsr_hbaE_start_bgrb()
4284 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_start_bgrb()
4286 "background rebuild' timeout \n", pACB->host->host_no); in arcmsr_hbaE_start_bgrb()