Lines Matching refs:pACB
135 static void arcmsr_hbaC_message_isr(struct AdapterControlBlock *pACB);
439 static uint8_t arcmsr_hbaC_wait_msgint_ready(struct AdapterControlBlock *pACB)
441 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC;
457 static bool arcmsr_hbaD_wait_msgint_ready(struct AdapterControlBlock *pACB)
459 struct MessageUnit_D *reg = pACB->pmuD;
474 static bool arcmsr_hbaE_wait_msgint_ready(struct AdapterControlBlock *pACB)
478 struct MessageUnit_E __iomem *phbcmu = pACB->pmuE;
482 if ((read_doorbell ^ pACB->in_doorbell) & ARCMSR_HBEMU_IOP2DRV_MESSAGE_CMD_DONE) {
484 pACB->in_doorbell = read_doorbell;
524 static void arcmsr_hbaC_flush_cache(struct AdapterControlBlock *pACB)
526 struct MessageUnit_C __iomem *reg = pACB->pmuC;
531 if (arcmsr_hbaC_wait_msgint_ready(pACB)) {
536 timeout,retry count down = %d \n", pACB->host->host_no, retry_count);
542 static void arcmsr_hbaD_flush_cache(struct AdapterControlBlock *pACB)
545 struct MessageUnit_D *reg = pACB->pmuD;
549 if (arcmsr_hbaD_wait_msgint_ready(pACB))
555 pACB->host->host_no, retry_count);
559 static void arcmsr_hbaE_flush_cache(struct AdapterControlBlock *pACB)
562 struct MessageUnit_E __iomem *reg = pACB->pmuE;
565 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE;
566 writel(pACB->out_doorbell, ®->iobound_doorbell);
568 if (arcmsr_hbaE_wait_msgint_ready(pACB))
573 pACB->host->host_no, retry_count);
1243 static uint8_t arcmsr_hbaC_abort_allcmd(struct AdapterControlBlock *pACB)
1245 struct MessageUnit_C __iomem *reg = pACB->pmuC;
1248 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) {
1251 , pACB->host->host_no);
1257 static uint8_t arcmsr_hbaD_abort_allcmd(struct AdapterControlBlock *pACB)
1259 struct MessageUnit_D *reg = pACB->pmuD;
1262 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) {
1264 "command' timeout\n", pACB->host->host_no);
1270 static uint8_t arcmsr_hbaE_abort_allcmd(struct AdapterControlBlock *pACB)
1272 struct MessageUnit_E __iomem *reg = pACB->pmuE;
1275 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE;
1276 writel(pACB->out_doorbell, ®->iobound_doorbell);
1277 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) {
1279 "command' timeout\n", pACB->host->host_no);
1966 static void arcmsr_hbaC_stop_bgrb(struct AdapterControlBlock *pACB)
1968 struct MessageUnit_C __iomem *reg = pACB->pmuC;
1969 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB;
1972 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) {
1975 , pACB->host->host_no);
1980 static void arcmsr_hbaD_stop_bgrb(struct AdapterControlBlock *pACB)
1982 struct MessageUnit_D *reg = pACB->pmuD;
1984 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB;
1986 if (!arcmsr_hbaD_wait_msgint_ready(pACB))
1988 "timeout\n", pACB->host->host_no);
1991 static void arcmsr_hbaE_stop_bgrb(struct AdapterControlBlock *pACB)
1993 struct MessageUnit_E __iomem *reg = pACB->pmuE;
1995 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB;
1997 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE;
1998 writel(pACB->out_doorbell, ®->iobound_doorbell);
1999 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) {
2001 "timeout\n", pACB->host->host_no);
2377 static void arcmsr_hbaC_doorbell_isr(struct AdapterControlBlock *pACB)
2380 struct MessageUnit_C __iomem *reg = pACB->pmuC;
2393 arcmsr_iop2drv_data_wrote_handle(pACB);
2395 arcmsr_iop2drv_data_read_handle(pACB);
2397 arcmsr_hbaC_message_isr(pACB);
2404 static void arcmsr_hbaD_doorbell_isr(struct AdapterControlBlock *pACB)
2407 struct MessageUnit_D *pmu = pACB->pmuD;
2413 arcmsr_hbaD_message_isr(pACB);
2415 arcmsr_iop2drv_data_wrote_handle(pACB);
2417 arcmsr_iop2drv_data_read_handle(pACB);
2424 static void arcmsr_hbaE_doorbell_isr(struct AdapterControlBlock *pACB)
2427 struct MessageUnit_E __iomem *reg = pACB->pmuE;
2429 if (pACB->adapter_type == ACB_ADAPTER_TYPE_F) {
2437 outbound_doorbell = in_doorbell ^ pACB->in_doorbell;
2441 arcmsr_iop2drv_data_wrote_handle(pACB);
2444 arcmsr_iop2drv_data_read_handle(pACB);
2447 arcmsr_hbaE_message_isr(pACB);
2455 pACB->in_doorbell = in_doorbell;
2753 static int arcmsr_hbaC_handle_isr(struct AdapterControlBlock *pACB)
2756 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC;
2769 arcmsr_hbaC_doorbell_isr(pACB);
2772 arcmsr_hbaC_postqueue_isr(pACB);
2779 static irqreturn_t arcmsr_hbaD_handle_isr(struct AdapterControlBlock *pACB)
2782 struct MessageUnit_D *pmu = pACB->pmuD;
2793 arcmsr_hbaD_postqueue_isr(pACB);
2796 arcmsr_hbaD_doorbell_isr(pACB);
2804 static irqreturn_t arcmsr_hbaE_handle_isr(struct AdapterControlBlock *pACB)
2807 struct MessageUnit_E __iomem *pmu = pACB->pmuE;
2817 arcmsr_hbaE_doorbell_isr(pACB);
2821 arcmsr_hbaE_postqueue_isr(pACB);
2829 static irqreturn_t arcmsr_hbaF_handle_isr(struct AdapterControlBlock *pACB)
2832 struct MessageUnit_F __iomem *phbcmu = pACB->pmuF;
2842 arcmsr_hbaF_postqueue_isr(pACB);
2846 arcmsr_hbaE_doorbell_isr(pACB);
3279 static void arcmsr_get_adapter_config(struct AdapterControlBlock *pACB, uint32_t *rwbuffer)
3282 uint32_t *acb_firm_model = (uint32_t *)pACB->firm_model;
3283 uint32_t *acb_firm_version = (uint32_t *)pACB->firm_version;
3284 uint32_t *acb_device_map = (uint32_t *)pACB->device_map;
3310 pACB->signature = readl(&rwbuffer[0]);
3311 pACB->firm_request_len = readl(&rwbuffer[1]);
3312 pACB->firm_numbers_queue = readl(&rwbuffer[2]);
3313 pACB->firm_sdram_size = readl(&rwbuffer[3]);
3314 pACB->firm_hd_channels = readl(&rwbuffer[4]);
3315 pACB->firm_cfg_version = readl(&rwbuffer[25]);
3317 pACB->host->host_no,
3318 pACB->firm_model,
3319 pACB->firm_version);
3356 static bool arcmsr_hbaC_get_config(struct AdapterControlBlock *pACB)
3359 struct MessageUnit_C __iomem *reg = pACB->pmuC;
3365 arcmsr_wait_firmware_ready(pACB);
3370 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) {
3372 miscellaneous data' timeout \n", pACB->host->host_no);
3375 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer);
3401 static bool arcmsr_hbaE_get_config(struct AdapterControlBlock *pACB)
3403 struct MessageUnit_E __iomem *reg = pACB->pmuE;
3410 arcmsr_wait_firmware_ready(pACB);
3415 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE;
3416 writel(pACB->out_doorbell, ®->iobound_doorbell);
3418 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) {
3420 "miscellaneous data timeout\n", pACB->host->host_no);
3423 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer);
3427 static bool arcmsr_hbaF_get_config(struct AdapterControlBlock *pACB)
3429 struct MessageUnit_F __iomem *reg = pACB->pmuF;
3436 arcmsr_wait_firmware_ready(pACB);
3440 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE;
3441 writel(pACB->out_doorbell, ®->iobound_doorbell);
3443 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) {
3445 pACB->host->host_no);
3448 arcmsr_get_adapter_config(pACB, pACB->msgcode_rwbuffer);
4253 static void arcmsr_hbaC_start_bgrb(struct AdapterControlBlock *pACB)
4255 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC;
4256 pACB->acb_flags |= ACB_F_MSG_START_BGRB;
4259 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) {
4261 rebuild' timeout \n", pACB->host->host_no);
4266 static void arcmsr_hbaD_start_bgrb(struct AdapterControlBlock *pACB)
4268 struct MessageUnit_D *pmu = pACB->pmuD;
4270 pACB->acb_flags |= ACB_F_MSG_START_BGRB;
4272 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) {
4274 "background rebuild' timeout\n", pACB->host->host_no);
4278 static void arcmsr_hbaE_start_bgrb(struct AdapterControlBlock *pACB)
4280 struct MessageUnit_E __iomem *pmu = pACB->pmuE;
4282 pACB->acb_flags |= ACB_F_MSG_START_BGRB;
4284 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE;
4285 writel(pACB->out_doorbell, &pmu->iobound_doorbell);
4286 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) {
4288 "background rebuild' timeout \n", pACB->host->host_no);