Lines Matching refs:pACB
132 static void arcmsr_hbaC_message_isr(struct AdapterControlBlock *pACB);
432 static uint8_t arcmsr_hbaC_wait_msgint_ready(struct AdapterControlBlock *pACB)
434 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC;
450 static bool arcmsr_hbaD_wait_msgint_ready(struct AdapterControlBlock *pACB)
452 struct MessageUnit_D *reg = pACB->pmuD;
467 static bool arcmsr_hbaE_wait_msgint_ready(struct AdapterControlBlock *pACB)
471 struct MessageUnit_E __iomem *phbcmu = pACB->pmuE;
475 if ((read_doorbell ^ pACB->in_doorbell) & ARCMSR_HBEMU_IOP2DRV_MESSAGE_CMD_DONE) {
477 pACB->in_doorbell = read_doorbell;
517 static void arcmsr_hbaC_flush_cache(struct AdapterControlBlock *pACB)
519 struct MessageUnit_C __iomem *reg = pACB->pmuC;
524 if (arcmsr_hbaC_wait_msgint_ready(pACB)) {
529 timeout,retry count down = %d \n", pACB->host->host_no, retry_count);
535 static void arcmsr_hbaD_flush_cache(struct AdapterControlBlock *pACB)
538 struct MessageUnit_D *reg = pACB->pmuD;
542 if (arcmsr_hbaD_wait_msgint_ready(pACB))
548 pACB->host->host_no, retry_count);
552 static void arcmsr_hbaE_flush_cache(struct AdapterControlBlock *pACB)
555 struct MessageUnit_E __iomem *reg = pACB->pmuE;
558 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE;
559 writel(pACB->out_doorbell, ®->iobound_doorbell);
561 if (arcmsr_hbaE_wait_msgint_ready(pACB))
566 pACB->host->host_no, retry_count);
1246 static uint8_t arcmsr_hbaC_abort_allcmd(struct AdapterControlBlock *pACB)
1248 struct MessageUnit_C __iomem *reg = pACB->pmuC;
1251 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) {
1254 , pACB->host->host_no);
1260 static uint8_t arcmsr_hbaD_abort_allcmd(struct AdapterControlBlock *pACB)
1262 struct MessageUnit_D *reg = pACB->pmuD;
1265 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) {
1267 "command' timeout\n", pACB->host->host_no);
1273 static uint8_t arcmsr_hbaE_abort_allcmd(struct AdapterControlBlock *pACB)
1275 struct MessageUnit_E __iomem *reg = pACB->pmuE;
1278 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE;
1279 writel(pACB->out_doorbell, ®->iobound_doorbell);
1280 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) {
1282 "command' timeout\n", pACB->host->host_no);
1974 static void arcmsr_hbaC_stop_bgrb(struct AdapterControlBlock *pACB)
1976 struct MessageUnit_C __iomem *reg = pACB->pmuC;
1977 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB;
1980 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) {
1983 , pACB->host->host_no);
1988 static void arcmsr_hbaD_stop_bgrb(struct AdapterControlBlock *pACB)
1990 struct MessageUnit_D *reg = pACB->pmuD;
1992 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB;
1994 if (!arcmsr_hbaD_wait_msgint_ready(pACB))
1996 "timeout\n", pACB->host->host_no);
1999 static void arcmsr_hbaE_stop_bgrb(struct AdapterControlBlock *pACB)
2001 struct MessageUnit_E __iomem *reg = pACB->pmuE;
2003 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB;
2005 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE;
2006 writel(pACB->out_doorbell, ®->iobound_doorbell);
2007 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) {
2009 "timeout\n", pACB->host->host_no);
2382 static void arcmsr_hbaC_doorbell_isr(struct AdapterControlBlock *pACB)
2385 struct MessageUnit_C __iomem *reg = pACB->pmuC;
2398 arcmsr_iop2drv_data_wrote_handle(pACB);
2400 arcmsr_iop2drv_data_read_handle(pACB);
2402 arcmsr_hbaC_message_isr(pACB);
2409 static void arcmsr_hbaD_doorbell_isr(struct AdapterControlBlock *pACB)
2412 struct MessageUnit_D *pmu = pACB->pmuD;
2418 arcmsr_hbaD_message_isr(pACB);
2420 arcmsr_iop2drv_data_wrote_handle(pACB);
2422 arcmsr_iop2drv_data_read_handle(pACB);
2429 static void arcmsr_hbaE_doorbell_isr(struct AdapterControlBlock *pACB)
2432 struct MessageUnit_E __iomem *reg = pACB->pmuE;
2434 if (pACB->adapter_type == ACB_ADAPTER_TYPE_F) {
2442 outbound_doorbell = in_doorbell ^ pACB->in_doorbell;
2446 arcmsr_iop2drv_data_wrote_handle(pACB);
2449 arcmsr_iop2drv_data_read_handle(pACB);
2452 arcmsr_hbaE_message_isr(pACB);
2460 pACB->in_doorbell = in_doorbell;
2758 static int arcmsr_hbaC_handle_isr(struct AdapterControlBlock *pACB)
2761 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC;
2774 arcmsr_hbaC_doorbell_isr(pACB);
2777 arcmsr_hbaC_postqueue_isr(pACB);
2784 static irqreturn_t arcmsr_hbaD_handle_isr(struct AdapterControlBlock *pACB)
2787 struct MessageUnit_D *pmu = pACB->pmuD;
2798 arcmsr_hbaD_postqueue_isr(pACB);
2801 arcmsr_hbaD_doorbell_isr(pACB);
2809 static irqreturn_t arcmsr_hbaE_handle_isr(struct AdapterControlBlock *pACB)
2812 struct MessageUnit_E __iomem *pmu = pACB->pmuE;
2822 arcmsr_hbaE_doorbell_isr(pACB);
2826 arcmsr_hbaE_postqueue_isr(pACB);
2834 static irqreturn_t arcmsr_hbaF_handle_isr(struct AdapterControlBlock *pACB)
2837 struct MessageUnit_F __iomem *phbcmu = pACB->pmuF;
2847 arcmsr_hbaF_postqueue_isr(pACB);
2851 arcmsr_hbaE_doorbell_isr(pACB);
3274 static void arcmsr_get_adapter_config(struct AdapterControlBlock *pACB, uint32_t *rwbuffer)
3277 uint32_t *acb_firm_model = (uint32_t *)pACB->firm_model;
3278 uint32_t *acb_firm_version = (uint32_t *)pACB->firm_version;
3279 uint32_t *acb_device_map = (uint32_t *)pACB->device_map;
3305 pACB->signature = readl(&rwbuffer[0]);
3306 pACB->firm_request_len = readl(&rwbuffer[1]);
3307 pACB->firm_numbers_queue = readl(&rwbuffer[2]);
3308 pACB->firm_sdram_size = readl(&rwbuffer[3]);
3309 pACB->firm_hd_channels = readl(&rwbuffer[4]);
3310 pACB->firm_cfg_version = readl(&rwbuffer[25]);
3312 pACB->host->host_no,
3313 pACB->firm_model,
3314 pACB->firm_version);
3351 static bool arcmsr_hbaC_get_config(struct AdapterControlBlock *pACB)
3354 struct MessageUnit_C __iomem *reg = pACB->pmuC;
3360 arcmsr_wait_firmware_ready(pACB);
3365 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) {
3367 miscellaneous data' timeout \n", pACB->host->host_no);
3370 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer);
3396 static bool arcmsr_hbaE_get_config(struct AdapterControlBlock *pACB)
3398 struct MessageUnit_E __iomem *reg = pACB->pmuE;
3405 arcmsr_wait_firmware_ready(pACB);
3410 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE;
3411 writel(pACB->out_doorbell, ®->iobound_doorbell);
3413 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) {
3415 "miscellaneous data timeout\n", pACB->host->host_no);
3418 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer);
3422 static bool arcmsr_hbaF_get_config(struct AdapterControlBlock *pACB)
3424 struct MessageUnit_F __iomem *reg = pACB->pmuF;
3431 arcmsr_wait_firmware_ready(pACB);
3435 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE;
3436 writel(pACB->out_doorbell, ®->iobound_doorbell);
3438 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) {
3440 pACB->host->host_no);
3443 arcmsr_get_adapter_config(pACB, pACB->msgcode_rwbuffer);
4248 static void arcmsr_hbaC_start_bgrb(struct AdapterControlBlock *pACB)
4250 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC;
4251 pACB->acb_flags |= ACB_F_MSG_START_BGRB;
4254 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) {
4256 rebuild' timeout \n", pACB->host->host_no);
4261 static void arcmsr_hbaD_start_bgrb(struct AdapterControlBlock *pACB)
4263 struct MessageUnit_D *pmu = pACB->pmuD;
4265 pACB->acb_flags |= ACB_F_MSG_START_BGRB;
4267 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) {
4269 "background rebuild' timeout\n", pACB->host->host_no);
4273 static void arcmsr_hbaE_start_bgrb(struct AdapterControlBlock *pACB)
4275 struct MessageUnit_E __iomem *pmu = pACB->pmuE;
4277 pACB->acb_flags |= ACB_F_MSG_START_BGRB;
4279 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE;
4280 writel(pACB->out_doorbell, &pmu->iobound_doorbell);
4281 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) {
4283 "background rebuild' timeout \n", pACB->host->host_no);