fman 93 drivers/clk/clk-qoriq.c struct clk *fman[2]; fman 439 drivers/clk/clk-qoriq.c cg->fman[0] = cg->pll[CGA_PLL2].div[PLL_DIV2].clk; fman 441 drivers/clk/clk-qoriq.c cg->fman[0] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk; fman 451 drivers/clk/clk-qoriq.c cg->fman[0] = cg->pll[CGA_PLL3].div[PLL_DIV2].clk; fman 453 drivers/clk/clk-qoriq.c cg->fman[0] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk; fman 456 drivers/clk/clk-qoriq.c cg->fman[1] = cg->pll[CGA_PLL3].div[PLL_DIV2].clk; fman 458 drivers/clk/clk-qoriq.c cg->fman[1] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk; fman 471 drivers/clk/clk-qoriq.c cg->fman[0] = cg->pll[CGA_PLL2].div[div].clk; fman 473 drivers/clk/clk-qoriq.c cg->fman[0] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk; fman 486 drivers/clk/clk-qoriq.c cg->fman[0] = cg->pll[CGA_PLL3].div[div].clk; fman 488 drivers/clk/clk-qoriq.c cg->fman[0] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk; fman 491 drivers/clk/clk-qoriq.c cg->fman[1] = cg->pll[CGA_PLL3].div[div].clk; fman 493 drivers/clk/clk-qoriq.c cg->fman[1] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk; fman 498 drivers/clk/clk-qoriq.c cg->fman[0] = cg->hwaccel[1]; fman 503 drivers/clk/clk-qoriq.c cg->fman[0] = cg->pll[PLATFORM_PLL].div[PLL_DIV1].clk; fman 508 drivers/clk/clk-qoriq.c cg->fman[0] = cg->hwaccel[0]; fman 513 drivers/clk/clk-qoriq.c cg->fman[0] = cg->hwaccel[3]; fman 514 drivers/clk/clk-qoriq.c cg->fman[1] = cg->hwaccel[4]; fman 1349 drivers/clk/clk-qoriq.c if (idx >= ARRAY_SIZE(cg->fman)) fman 1351 drivers/clk/clk-qoriq.c clk = cg->fman[idx]; fman 441 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c vmw_fence_fifo_up(dev_priv->fman); fman 468 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c vmw_fence_fifo_down(dev_priv->fman); fman 510 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c vmw_fence_fifo_down(dev_priv->fman); fman 824 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c dev_priv->fman = vmw_fence_manager_init(dev_priv); fman 825 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c if (unlikely(dev_priv->fman == NULL)) { fman 938 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c vmw_fence_manager_takedown(dev_priv->fman); fman 990 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c vmw_fence_manager_takedown(dev_priv->fman); fman 1326 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c vmw_fence_fifo_down(dev_priv->fman); fman 1353 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c vmw_fence_fifo_up(dev_priv->fman); fman 527 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h struct vmw_fence_manager *fman; fman 3381 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c ret = vmw_user_fence_create(file_priv, dev_priv->fman, fman 3384 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c ret = vmw_fence_create(dev_priv->fman, sequence, p_fence); fman 4038 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c ret = vmw_wait_dma_fence(dev_priv->fman, in_fence); fman 117 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman = fman_from_fence(fence); fman 119 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_lock(&fman->lock); fman 121 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c --fman->num_fence_objects; fman 122 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_unlock(&fman->lock); fman 141 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman = fman_from_fence(fence); fman 142 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_private *dev_priv = fman->dev_priv; fman 168 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c static void __vmw_fences_update(struct vmw_fence_manager *fman); fman 175 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman = fman_from_fence(fence); fman 176 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_private *dev_priv = fman->dev_priv; fman 201 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c __vmw_fences_update(fman); fman 262 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman = fman 270 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c mutex_lock(&fman->goal_irq_mutex); fman 272 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_lock(&fman->lock); fman 273 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c list_splice_init(&fman->cleanup_list, &list); fman 274 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c seqno_valid = fman->seqno_valid; fman 275 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_unlock(&fman->lock); fman 277 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c if (!seqno_valid && fman->goal_irq_on) { fman 278 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->goal_irq_on = false; fman 279 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c vmw_goal_waiter_remove(fman->dev_priv); fman 281 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c mutex_unlock(&fman->goal_irq_mutex); fman 302 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman = kzalloc(sizeof(*fman), GFP_KERNEL); fman 304 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c if (unlikely(!fman)) fman 307 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->dev_priv = dev_priv; fman 308 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_lock_init(&fman->lock); fman 309 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c INIT_LIST_HEAD(&fman->fence_list); fman 310 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c INIT_LIST_HEAD(&fman->cleanup_list); fman 311 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c INIT_WORK(&fman->work, &vmw_fence_work_func); fman 312 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->fifo_down = true; fman 313 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->user_fence_size = ttm_round_pot(sizeof(struct vmw_user_fence)) + fman 315 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->fence_size = ttm_round_pot(sizeof(struct vmw_fence_obj)); fman 316 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->event_fence_action_size = fman 318 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c mutex_init(&fman->goal_irq_mutex); fman 319 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->ctx = dma_fence_context_alloc(1); fman 321 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c return fman; fman 324 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c void vmw_fence_manager_takedown(struct vmw_fence_manager *fman) fman 328 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c (void) cancel_work_sync(&fman->work); fman 330 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_lock(&fman->lock); fman 331 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c lists_empty = list_empty(&fman->fence_list) && fman 332 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c list_empty(&fman->cleanup_list); fman 333 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_unlock(&fman->lock); fman 336 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c kfree(fman); fman 339 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c static int vmw_fence_obj_init(struct vmw_fence_manager *fman, fman 345 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c dma_fence_init(&fence->base, &vmw_fence_ops, &fman->lock, fman 346 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->ctx, seqno); fman 350 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_lock(&fman->lock); fman 351 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c if (unlikely(fman->fifo_down)) { fman 355 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c list_add_tail(&fence->head, &fman->fence_list); fman 356 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c ++fman->num_fence_objects; fman 359 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_unlock(&fman->lock); fman 364 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c static void vmw_fences_perform_actions(struct vmw_fence_manager *fman, fman 371 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->pending_actions[action->type]--; fman 380 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c list_add_tail(&action->head, &fman->cleanup_list); fman 400 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c static bool vmw_fence_goal_new_locked(struct vmw_fence_manager *fman, fman 407 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c if (likely(!fman->seqno_valid)) fman 410 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fifo_mem = fman->dev_priv->mmio_virt; fman 415 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->seqno_valid = false; fman 416 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c list_for_each_entry(fence, &fman->fence_list, head) { fman 418 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->seqno_valid = true; fman 446 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman = fman_from_fence(fence); fman 453 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fifo_mem = fman->dev_priv->mmio_virt; fman 455 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c if (likely(fman->seqno_valid && fman 460 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->seqno_valid = true; fman 465 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c static void __vmw_fences_update(struct vmw_fence_manager *fman) fman 471 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c u32 *fifo_mem = fman->dev_priv->mmio_virt; fman 475 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c list_for_each_entry_safe(fence, next_fence, &fman->fence_list, head) { fman 482 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c vmw_fences_perform_actions(fman, &action_list); fman 493 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c needs_rerun = vmw_fence_goal_new_locked(fman, seqno); fman 502 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c if (!list_empty(&fman->cleanup_list)) fman 503 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c (void) schedule_work(&fman->work); fman 506 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c void vmw_fences_update(struct vmw_fence_manager *fman) fman 508 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_lock(&fman->lock); fman 509 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c __vmw_fences_update(fman); fman 510 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_unlock(&fman->lock); fman 515 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman = fman_from_fence(fence); fman 520 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c vmw_fences_update(fman); fman 550 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c int vmw_fence_create(struct vmw_fence_manager *fman, fman 561 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c ret = vmw_fence_obj_init(fman, fence, seqno, fman 579 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman = fman_from_fence(fence); fman 585 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c ttm_mem_global_free(vmw_mem_glob(fman->dev_priv), fman 586 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->user_fence_size); fman 601 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman, fman 609 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct ttm_mem_global *mem_glob = vmw_mem_glob(fman->dev_priv); fman 621 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c ret = ttm_mem_global_alloc(mem_glob, fman->user_fence_size, fman 632 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c ret = vmw_fence_obj_init(fman, &ufence->fence, seqno, fman 665 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c ttm_mem_global_free(mem_glob, fman->user_fence_size); fman 679 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c int vmw_wait_dma_fence(struct vmw_fence_manager *fman, fman 719 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c void vmw_fence_fifo_down(struct vmw_fence_manager *fman) fman 729 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_lock(&fman->lock); fman 730 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->fifo_down = true; fman 731 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c while (!list_empty(&fman->fence_list)) { fman 733 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c list_entry(fman->fence_list.prev, struct vmw_fence_obj, fman 736 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_unlock(&fman->lock); fman 747 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c vmw_fences_perform_actions(fman, &action_list); fman 752 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_lock(&fman->lock); fman 754 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_unlock(&fman->lock); fman 757 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c void vmw_fence_fifo_up(struct vmw_fence_manager *fman) fman 759 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_lock(&fman->lock); fman 760 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->fifo_down = false; fman 761 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_unlock(&fman->lock); fman 862 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman; fman 871 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman = fman_from_fence(fence); fman 876 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_lock(&fman->lock); fman 878 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_unlock(&fman->lock); fman 964 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman = fman_from_fence(fence); fman 967 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c mutex_lock(&fman->goal_irq_mutex); fman 968 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_lock(&fman->lock); fman 970 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->pending_actions[action->type]++; fman 976 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c vmw_fences_perform_actions(fman, &action_list); fman 987 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c spin_unlock(&fman->lock); fman 990 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c if (!fman->goal_irq_on) { fman 991 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c fman->goal_irq_on = true; fman 992 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c vmw_goal_waiter_add(fman->dev_priv); fman 994 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c vmw_fences_update(fman); fman 996 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c mutex_unlock(&fman->goal_irq_mutex); fman 1023 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman = fman_from_fence(fence); fman 1036 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c eaction->dev = fman->dev_priv->dev; fman 1057 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct vmw_fence_manager *fman = fman_from_fence(fence); fman 1058 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c struct drm_device *dev = fman->dev_priv->dev; fman 69 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h extern void vmw_fence_manager_takedown(struct vmw_fence_manager *fman); fman 89 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h extern void vmw_fences_update(struct vmw_fence_manager *fman); fman 99 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h extern int vmw_fence_create(struct vmw_fence_manager *fman, fman 104 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h struct vmw_fence_manager *fman, fman 109 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h extern int vmw_wait_dma_fence(struct vmw_fence_manager *fman, fman 112 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h extern void vmw_fence_fifo_up(struct vmw_fence_manager *fman); fman 114 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h extern void vmw_fence_fifo_down(struct vmw_fence_manager *fman); fman 53 drivers/gpu/drm/vmwgfx/vmwgfx_irq.c vmw_fences_update(dev_priv->fman); fman 126 drivers/gpu/drm/vmwgfx/vmwgfx_irq.c vmw_fences_update(dev_priv->fman); fman 574 drivers/net/ethernet/freescale/fman/fman.c static irqreturn_t fman_exceptions(struct fman *fman, fman 577 drivers/net/ethernet/freescale/fman/fman.c dev_dbg(fman->dev, "%s: FMan[%d] exception %d\n", fman 578 drivers/net/ethernet/freescale/fman/fman.c __func__, fman->state->fm_id, exception); fman 583 drivers/net/ethernet/freescale/fman/fman.c static irqreturn_t fman_bus_error(struct fman *fman, u8 __maybe_unused port_id, fman 588 drivers/net/ethernet/freescale/fman/fman.c dev_dbg(fman->dev, "%s: FMan[%d] bus error: port_id[%d]\n", fman 589 drivers/net/ethernet/freescale/fman/fman.c __func__, fman->state->fm_id, port_id); fman 594 drivers/net/ethernet/freescale/fman/fman.c static inline irqreturn_t call_mac_isr(struct fman *fman, u8 id) fman 596 drivers/net/ethernet/freescale/fman/fman.c if (fman->intr_mng[id].isr_cb) { fman 597 drivers/net/ethernet/freescale/fman/fman.c fman->intr_mng[id].isr_cb(fman->intr_mng[id].src_handle); fman 637 drivers/net/ethernet/freescale/fman/fman.c static void set_port_liodn(struct fman *fman, u8 port_id, fman 643 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->dma_regs->fmdmplr[port_id / 2]); fman 651 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->dma_regs->fmdmplr[port_id / 2]); fman 652 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(liodn_ofst, &fman->bmi_regs->fmbm_spliodn[port_id - 1]); fman 704 drivers/net/ethernet/freescale/fman/fman.c static int dma_init(struct fman *fman) fman 706 drivers/net/ethernet/freescale/fman/fman.c struct fman_dma_regs __iomem *dma_rg = fman->dma_regs; fman 707 drivers/net/ethernet/freescale/fman/fman.c struct fman_cfg *cfg = fman->cfg; fman 768 drivers/net/ethernet/freescale/fman/fman.c fman->cam_size = fman 769 drivers/net/ethernet/freescale/fman/fman.c (u32)(fman->cfg->dma_cam_num_of_entries * DMA_CAM_SIZEOF_ENTRY); fman 770 drivers/net/ethernet/freescale/fman/fman.c fman->cam_offset = fman_muram_alloc(fman->muram, fman->cam_size); fman 771 drivers/net/ethernet/freescale/fman/fman.c if (IS_ERR_VALUE(fman->cam_offset)) { fman 772 drivers/net/ethernet/freescale/fman/fman.c dev_err(fman->dev, "%s: MURAM alloc for DMA CAM failed\n", fman 777 drivers/net/ethernet/freescale/fman/fman.c if (fman->state->rev_info.major == 2) { fman 780 drivers/net/ethernet/freescale/fman/fman.c fman_muram_free_mem(fman->muram, fman->cam_offset, fman 781 drivers/net/ethernet/freescale/fman/fman.c fman->cam_size); fman 783 drivers/net/ethernet/freescale/fman/fman.c fman->cam_size = fman->cfg->dma_cam_num_of_entries * 72 + 128; fman 784 drivers/net/ethernet/freescale/fman/fman.c fman->cam_offset = fman_muram_alloc(fman->muram, fman 785 drivers/net/ethernet/freescale/fman/fman.c fman->cam_size); fman 786 drivers/net/ethernet/freescale/fman/fman.c if (IS_ERR_VALUE(fman->cam_offset)) { fman 787 drivers/net/ethernet/freescale/fman/fman.c dev_err(fman->dev, "%s: MURAM alloc for DMA CAM failed\n", fman 792 drivers/net/ethernet/freescale/fman/fman.c if (fman->cfg->dma_cam_num_of_entries % 8 || fman 793 drivers/net/ethernet/freescale/fman/fman.c fman->cfg->dma_cam_num_of_entries > 32) { fman 794 drivers/net/ethernet/freescale/fman/fman.c dev_err(fman->dev, "%s: wrong dma_cam_num_of_entries\n", fman 800 drivers/net/ethernet/freescale/fman/fman.c fman_muram_offset_to_vbase(fman->muram, fman 801 drivers/net/ethernet/freescale/fman/fman.c fman->cam_offset); fman 803 drivers/net/ethernet/freescale/fman/fman.c (32 - fman->cfg->dma_cam_num_of_entries)) - 1), fman 807 drivers/net/ethernet/freescale/fman/fman.c fman->cfg->cam_base_addr = fman->cam_offset; fman 952 drivers/net/ethernet/freescale/fman/fman.c static int enable(struct fman *fman, struct fman_cfg *cfg) fman 966 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(BMI_INIT_START, &fman->bmi_regs->fmbm_init); fman 968 drivers/net/ethernet/freescale/fman/fman.c &fman->qmi_regs->fmqm_gc); fman 973 drivers/net/ethernet/freescale/fman/fman.c static int set_exception(struct fman *fman, fman 980 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->dma_regs->fmdmmr); fman 986 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->dma_regs->fmdmmr); fman 991 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->dma_regs->fmdmmr); fman 996 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->dma_regs->fmdmmr); fman 999 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->fpm_regs->fmfp_ee); fman 1004 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->fpm_regs->fmfp_ee); fman 1007 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->fpm_regs->fmfp_ee); fman 1012 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->fpm_regs->fmfp_ee); fman 1015 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->fpm_regs->fmfp_ee); fman 1020 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->fpm_regs->fmfp_ee); fman 1023 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->qmi_regs->fmqm_ien); fman 1028 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->qmi_regs->fmqm_ien); fman 1031 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->qmi_regs->fmqm_eien); fman 1036 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->qmi_regs->fmqm_eien); fman 1039 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->qmi_regs->fmqm_eien); fman 1044 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->qmi_regs->fmqm_eien); fman 1047 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->bmi_regs->fmbm_ier); fman 1052 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->bmi_regs->fmbm_ier); fman 1055 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->bmi_regs->fmbm_ier); fman 1060 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->bmi_regs->fmbm_ier); fman 1063 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->bmi_regs->fmbm_ier); fman 1068 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->bmi_regs->fmbm_ier); fman 1071 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->bmi_regs->fmbm_ier); fman 1076 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->bmi_regs->fmbm_ier); fman 1079 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->fpm_regs->fm_rie); fman 1082 drivers/net/ethernet/freescale/fman/fman.c enable_rams_ecc(fman->fpm_regs); fman 1089 drivers/net/ethernet/freescale/fman/fman.c disable_rams_ecc(fman->fpm_regs); fman 1092 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->fpm_regs->fm_rie); fman 1095 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->fpm_regs->fm_rie); fman 1098 drivers/net/ethernet/freescale/fman/fman.c enable_rams_ecc(fman->fpm_regs); fman 1105 drivers/net/ethernet/freescale/fman/fman.c disable_rams_ecc(fman->fpm_regs); fman 1108 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(tmp, &fman->fpm_regs->fm_rie); fman 1215 drivers/net/ethernet/freescale/fman/fman.c static void free_init_resources(struct fman *fman) fman 1217 drivers/net/ethernet/freescale/fman/fman.c if (fman->cam_offset) fman 1218 drivers/net/ethernet/freescale/fman/fman.c fman_muram_free_mem(fman->muram, fman->cam_offset, fman 1219 drivers/net/ethernet/freescale/fman/fman.c fman->cam_size); fman 1220 drivers/net/ethernet/freescale/fman/fman.c if (fman->fifo_offset) fman 1221 drivers/net/ethernet/freescale/fman/fman.c fman_muram_free_mem(fman->muram, fman->fifo_offset, fman 1222 drivers/net/ethernet/freescale/fman/fman.c fman->fifo_size); fman 1225 drivers/net/ethernet/freescale/fman/fman.c static irqreturn_t bmi_err_event(struct fman *fman) fman 1228 drivers/net/ethernet/freescale/fman/fman.c struct fman_bmi_regs __iomem *bmi_rg = fman->bmi_regs; fman 1242 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_BMI_STORAGE_PROFILE_ECC); fman 1244 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_BMI_LIST_RAM_ECC); fman 1246 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_BMI_STATISTICS_RAM_ECC); fman 1248 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_BMI_DISPATCH_RAM_ECC); fman 1253 drivers/net/ethernet/freescale/fman/fman.c static irqreturn_t qmi_err_event(struct fman *fman) fman 1256 drivers/net/ethernet/freescale/fman/fman.c struct fman_qmi_regs __iomem *qmi_rg = fman->qmi_regs; fman 1271 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_QMI_DOUBLE_ECC); fman 1273 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, fman 1279 drivers/net/ethernet/freescale/fman/fman.c static irqreturn_t dma_err_event(struct fman *fman) fman 1284 drivers/net/ethernet/freescale/fman/fman.c struct fman_dma_regs __iomem *dma_rg = fman->dma_regs; fman 1314 drivers/net/ethernet/freescale/fman/fman.c hw_port_id_to_sw_port_id(fman->state->rev_info.major, port_id); fman 1318 drivers/net/ethernet/freescale/fman/fman.c ret = fman->bus_error_cb(fman, relative_port_id, addr, tnum, fman 1322 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_DMA_SINGLE_PORT_ECC); fman 1324 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_DMA_READ_ECC); fman 1326 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_DMA_SYSTEM_WRITE_ECC); fman 1328 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_DMA_FM_WRITE_ECC); fman 1333 drivers/net/ethernet/freescale/fman/fman.c static irqreturn_t fpm_err_event(struct fman *fman) fman 1336 drivers/net/ethernet/freescale/fman/fman.c struct fman_fpm_regs __iomem *fpm_rg = fman->fpm_regs; fman 1345 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_FPM_DOUBLE_ECC); fman 1347 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_FPM_STALL_ON_TASKS); fman 1350 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_FPM_SINGLE_ECC); fman 1355 drivers/net/ethernet/freescale/fman/fman.c static irqreturn_t muram_err_intr(struct fman *fman) fman 1358 drivers/net/ethernet/freescale/fman/fman.c struct fman_fpm_regs __iomem *fpm_rg = fman->fpm_regs; fman 1368 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_MURAM_ECC); fman 1373 drivers/net/ethernet/freescale/fman/fman.c static irqreturn_t qmi_event(struct fman *fman) fman 1376 drivers/net/ethernet/freescale/fman/fman.c struct fman_qmi_regs __iomem *qmi_rg = fman->qmi_regs; fman 1390 drivers/net/ethernet/freescale/fman/fman.c ret = fman->exception_cb(fman, FMAN_EX_QMI_SINGLE_ECC); fman 1395 drivers/net/ethernet/freescale/fman/fman.c static void enable_time_stamp(struct fman *fman) fman 1397 drivers/net/ethernet/freescale/fman/fman.c struct fman_fpm_regs __iomem *fpm_rg = fman->fpm_regs; fman 1398 drivers/net/ethernet/freescale/fman/fman.c u16 fm_clk_freq = fman->state->fm_clk_freq; fman 1402 drivers/net/ethernet/freescale/fman/fman.c ts_freq = (u32)(1 << fman->state->count1_micro_bit); fman 1427 drivers/net/ethernet/freescale/fman/fman.c fman->state->enabled_time_stamp = true; fman 1430 drivers/net/ethernet/freescale/fman/fman.c static int clear_iram(struct fman *fman) fman 1435 drivers/net/ethernet/freescale/fman/fman.c iram = fman->base_addr + IMEM_OFFSET; fman 1446 drivers/net/ethernet/freescale/fman/fman.c for (i = 0; i < (fman->state->fm_iram_size / 4); i++) fman 1449 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(fman->state->fm_iram_size - 4, &iram->iadd); fman 1550 drivers/net/ethernet/freescale/fman/fman.c static int set_size_of_fifo(struct fman *fman, u8 port_id, u32 *size_of_fifo, fman 1553 drivers/net/ethernet/freescale/fman/fman.c struct fman_bmi_regs __iomem *bmi_rg = fman->bmi_regs; fman 1562 drivers/net/ethernet/freescale/fman/fman.c if (extra_fifo && !fman->state->extra_fifo_pool_size) fman 1563 drivers/net/ethernet/freescale/fman/fman.c fman->state->extra_fifo_pool_size = fman 1564 drivers/net/ethernet/freescale/fman/fman.c fman->state->num_of_rx_ports * FMAN_BMI_FIFO_UNITS; fman 1566 drivers/net/ethernet/freescale/fman/fman.c fman->state->extra_fifo_pool_size = fman 1567 drivers/net/ethernet/freescale/fman/fman.c max(fman->state->extra_fifo_pool_size, extra_fifo); fman 1570 drivers/net/ethernet/freescale/fman/fman.c if ((fman->state->accumulated_fifo_size + fifo) > fman 1571 drivers/net/ethernet/freescale/fman/fman.c (fman->state->total_fifo_size - fman 1572 drivers/net/ethernet/freescale/fman/fman.c fman->state->extra_fifo_pool_size)) { fman 1573 drivers/net/ethernet/freescale/fman/fman.c dev_err(fman->dev, "%s: Requested fifo size and extra size exceed total FIFO size.\n", fman 1585 drivers/net/ethernet/freescale/fman/fman.c fman->state->accumulated_fifo_size += fifo; fman 1590 drivers/net/ethernet/freescale/fman/fman.c static int set_num_of_tasks(struct fman *fman, u8 port_id, u8 *num_of_tasks, fman 1593 drivers/net/ethernet/freescale/fman/fman.c struct fman_bmi_regs __iomem *bmi_rg = fman->bmi_regs; fman 1599 drivers/net/ethernet/freescale/fman/fman.c fman->state->extra_tasks_pool_size = fman 1600 drivers/net/ethernet/freescale/fman/fman.c max(fman->state->extra_tasks_pool_size, extra_tasks); fman 1603 drivers/net/ethernet/freescale/fman/fman.c if ((fman->state->accumulated_num_of_tasks + tasks) > fman 1604 drivers/net/ethernet/freescale/fman/fman.c (fman->state->total_num_of_tasks - fman 1605 drivers/net/ethernet/freescale/fman/fman.c fman->state->extra_tasks_pool_size)) { fman 1606 drivers/net/ethernet/freescale/fman/fman.c dev_err(fman->dev, "%s: Requested num_of_tasks and extra tasks pool for fm%d exceed total num_of_tasks.\n", fman 1607 drivers/net/ethernet/freescale/fman/fman.c __func__, fman->state->fm_id); fman 1611 drivers/net/ethernet/freescale/fman/fman.c fman->state->accumulated_num_of_tasks += tasks; fman 1623 drivers/net/ethernet/freescale/fman/fman.c static int set_num_of_open_dmas(struct fman *fman, u8 port_id, fman 1627 drivers/net/ethernet/freescale/fman/fman.c struct fman_bmi_regs __iomem *bmi_rg = fman->bmi_regs; fman 1649 drivers/net/ethernet/freescale/fman/fman.c fman->state->extra_open_dmas_pool_size = fman 1650 drivers/net/ethernet/freescale/fman/fman.c (u8)max(fman->state->extra_open_dmas_pool_size, fman 1652 drivers/net/ethernet/freescale/fman/fman.c fman->state->accumulated_num_of_open_dmas += current_val; fman 1659 drivers/net/ethernet/freescale/fman/fman.c fman->state->extra_open_dmas_pool_size = fman 1660 drivers/net/ethernet/freescale/fman/fman.c (u8)max(fman->state->extra_open_dmas_pool_size, fman 1663 drivers/net/ethernet/freescale/fman/fman.c if ((fman->state->rev_info.major < 6) && fman 1664 drivers/net/ethernet/freescale/fman/fman.c (fman->state->accumulated_num_of_open_dmas - current_val + fman 1665 drivers/net/ethernet/freescale/fman/fman.c open_dmas > fman->state->max_num_of_open_dmas)) { fman 1666 drivers/net/ethernet/freescale/fman/fman.c dev_err(fman->dev, "%s: Requested num_of_open_dmas for fm%d exceeds total num_of_open_dmas.\n", fman 1667 drivers/net/ethernet/freescale/fman/fman.c __func__, fman->state->fm_id); fman 1669 drivers/net/ethernet/freescale/fman/fman.c } else if ((fman->state->rev_info.major >= 6) && fman 1670 drivers/net/ethernet/freescale/fman/fman.c !((fman->state->rev_info.major == 6) && fman 1671 drivers/net/ethernet/freescale/fman/fman.c (fman->state->rev_info.minor == 0)) && fman 1672 drivers/net/ethernet/freescale/fman/fman.c (fman->state->accumulated_num_of_open_dmas - fman 1674 drivers/net/ethernet/freescale/fman/fman.c fman->state->dma_thresh_max_commq + 1)) { fman 1675 drivers/net/ethernet/freescale/fman/fman.c dev_err(fman->dev, "%s: Requested num_of_open_dmas for fm%d exceeds DMA Command queue (%d)\n", fman 1676 drivers/net/ethernet/freescale/fman/fman.c __func__, fman->state->fm_id, fman 1677 drivers/net/ethernet/freescale/fman/fman.c fman->state->dma_thresh_max_commq + 1); fman 1681 drivers/net/ethernet/freescale/fman/fman.c WARN_ON(fman->state->accumulated_num_of_open_dmas < current_val); fman 1683 drivers/net/ethernet/freescale/fman/fman.c fman->state->accumulated_num_of_open_dmas -= current_val; fman 1684 drivers/net/ethernet/freescale/fman/fman.c fman->state->accumulated_num_of_open_dmas += open_dmas; fman 1686 drivers/net/ethernet/freescale/fman/fman.c if (fman->state->rev_info.major < 6) fman 1688 drivers/net/ethernet/freescale/fman/fman.c (u8)(fman->state->accumulated_num_of_open_dmas + fman 1689 drivers/net/ethernet/freescale/fman/fman.c fman->state->extra_open_dmas_pool_size); fman 1710 drivers/net/ethernet/freescale/fman/fman.c static int fman_config(struct fman *fman) fman 1715 drivers/net/ethernet/freescale/fman/fman.c base_addr = fman->dts_params.base_addr; fman 1717 drivers/net/ethernet/freescale/fman/fman.c fman->state = kzalloc(sizeof(*fman->state), GFP_KERNEL); fman 1718 drivers/net/ethernet/freescale/fman/fman.c if (!fman->state) fman 1722 drivers/net/ethernet/freescale/fman/fman.c fman->cfg = kzalloc(sizeof(*fman->cfg), GFP_KERNEL); fman 1723 drivers/net/ethernet/freescale/fman/fman.c if (!fman->cfg) fman 1727 drivers/net/ethernet/freescale/fman/fman.c fman->muram = fman 1728 drivers/net/ethernet/freescale/fman/fman.c fman_muram_init(fman->dts_params.muram_res.start, fman 1729 drivers/net/ethernet/freescale/fman/fman.c resource_size(&fman->dts_params.muram_res)); fman 1730 drivers/net/ethernet/freescale/fman/fman.c if (!fman->muram) fman 1734 drivers/net/ethernet/freescale/fman/fman.c fman->state->fm_id = fman->dts_params.id; fman 1735 drivers/net/ethernet/freescale/fman/fman.c fman->state->fm_clk_freq = fman->dts_params.clk_freq; fman 1736 drivers/net/ethernet/freescale/fman/fman.c fman->state->qman_channel_base = fman->dts_params.qman_channel_base; fman 1737 drivers/net/ethernet/freescale/fman/fman.c fman->state->num_of_qman_channels = fman 1738 drivers/net/ethernet/freescale/fman/fman.c fman->dts_params.num_of_qman_channels; fman 1739 drivers/net/ethernet/freescale/fman/fman.c fman->state->res = fman->dts_params.res; fman 1740 drivers/net/ethernet/freescale/fman/fman.c fman->exception_cb = fman_exceptions; fman 1741 drivers/net/ethernet/freescale/fman/fman.c fman->bus_error_cb = fman_bus_error; fman 1742 drivers/net/ethernet/freescale/fman/fman.c fman->fpm_regs = base_addr + FPM_OFFSET; fman 1743 drivers/net/ethernet/freescale/fman/fman.c fman->bmi_regs = base_addr + BMI_OFFSET; fman 1744 drivers/net/ethernet/freescale/fman/fman.c fman->qmi_regs = base_addr + QMI_OFFSET; fman 1745 drivers/net/ethernet/freescale/fman/fman.c fman->dma_regs = base_addr + DMA_OFFSET; fman 1746 drivers/net/ethernet/freescale/fman/fman.c fman->hwp_regs = base_addr + HWP_OFFSET; fman 1747 drivers/net/ethernet/freescale/fman/fman.c fman->kg_regs = base_addr + KG_OFFSET; fman 1748 drivers/net/ethernet/freescale/fman/fman.c fman->base_addr = base_addr; fman 1750 drivers/net/ethernet/freescale/fman/fman.c spin_lock_init(&fman->spinlock); fman 1751 drivers/net/ethernet/freescale/fman/fman.c fman_defconfig(fman->cfg); fman 1753 drivers/net/ethernet/freescale/fman/fman.c fman->state->extra_fifo_pool_size = 0; fman 1754 drivers/net/ethernet/freescale/fman/fman.c fman->state->exceptions = (EX_DMA_BUS_ERROR | fman 1771 drivers/net/ethernet/freescale/fman/fman.c fman_get_revision(fman, &fman->state->rev_info); fman 1773 drivers/net/ethernet/freescale/fman/fman.c err = fill_soc_specific_params(fman->state); fman 1778 drivers/net/ethernet/freescale/fman/fman.c if (fman->state->rev_info.major >= 6) fman 1779 drivers/net/ethernet/freescale/fman/fman.c fman->cfg->dma_aid_mode = FMAN_DMA_AID_OUT_PORT_ID; fman 1781 drivers/net/ethernet/freescale/fman/fman.c fman->cfg->qmi_def_tnums_thresh = fman->state->qmi_def_tnums_thresh; fman 1783 drivers/net/ethernet/freescale/fman/fman.c fman->state->total_num_of_tasks = fman 1784 drivers/net/ethernet/freescale/fman/fman.c (u8)DFLT_TOTAL_NUM_OF_TASKS(fman->state->rev_info.major, fman 1785 drivers/net/ethernet/freescale/fman/fman.c fman->state->rev_info.minor, fman 1786 drivers/net/ethernet/freescale/fman/fman.c fman->state->bmi_max_num_of_tasks); fman 1788 drivers/net/ethernet/freescale/fman/fman.c if (fman->state->rev_info.major < 6) { fman 1789 drivers/net/ethernet/freescale/fman/fman.c fman->cfg->dma_comm_qtsh_clr_emer = fman 1790 drivers/net/ethernet/freescale/fman/fman.c (u8)DFLT_DMA_COMM_Q_LOW(fman->state->rev_info.major, fman 1791 drivers/net/ethernet/freescale/fman/fman.c fman->state->dma_thresh_max_commq); fman 1793 drivers/net/ethernet/freescale/fman/fman.c fman->cfg->dma_comm_qtsh_asrt_emer = fman 1794 drivers/net/ethernet/freescale/fman/fman.c (u8)DFLT_DMA_COMM_Q_HIGH(fman->state->rev_info.major, fman 1795 drivers/net/ethernet/freescale/fman/fman.c fman->state->dma_thresh_max_commq); fman 1797 drivers/net/ethernet/freescale/fman/fman.c fman->cfg->dma_cam_num_of_entries = fman 1798 drivers/net/ethernet/freescale/fman/fman.c DFLT_DMA_CAM_NUM_OF_ENTRIES(fman->state->rev_info.major); fman 1800 drivers/net/ethernet/freescale/fman/fman.c fman->cfg->dma_read_buf_tsh_clr_emer = fman 1801 drivers/net/ethernet/freescale/fman/fman.c DFLT_DMA_READ_INT_BUF_LOW(fman->state->dma_thresh_max_buf); fman 1803 drivers/net/ethernet/freescale/fman/fman.c fman->cfg->dma_read_buf_tsh_asrt_emer = fman 1804 drivers/net/ethernet/freescale/fman/fman.c DFLT_DMA_READ_INT_BUF_HIGH(fman->state->dma_thresh_max_buf); fman 1806 drivers/net/ethernet/freescale/fman/fman.c fman->cfg->dma_write_buf_tsh_clr_emer = fman 1807 drivers/net/ethernet/freescale/fman/fman.c DFLT_DMA_WRITE_INT_BUF_LOW(fman->state->dma_thresh_max_buf); fman 1809 drivers/net/ethernet/freescale/fman/fman.c fman->cfg->dma_write_buf_tsh_asrt_emer = fman 1810 drivers/net/ethernet/freescale/fman/fman.c DFLT_DMA_WRITE_INT_BUF_HIGH(fman->state->dma_thresh_max_buf); fman 1812 drivers/net/ethernet/freescale/fman/fman.c fman->cfg->dma_axi_dbg_num_of_beats = fman 1819 drivers/net/ethernet/freescale/fman/fman.c kfree(fman->cfg); fman 1821 drivers/net/ethernet/freescale/fman/fman.c kfree(fman->state); fman 1823 drivers/net/ethernet/freescale/fman/fman.c kfree(fman); fman 1827 drivers/net/ethernet/freescale/fman/fman.c static int fman_reset(struct fman *fman) fman 1832 drivers/net/ethernet/freescale/fman/fman.c if (fman->state->rev_info.major < 6) { fman 1833 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(FPM_RSTC_FM_RESET, &fman->fpm_regs->fm_rstc); fman 1838 drivers/net/ethernet/freescale/fman/fman.c } while (((ioread32be(&fman->fpm_regs->fm_rstc)) & fman 1855 drivers/net/ethernet/freescale/fman/fman.c dev_err(fman->dev, "%s: Couldn't find guts node\n", fman 1862 drivers/net/ethernet/freescale/fman/fman.c dev_err(fman->dev, "%s: Couldn't map %pOF regs\n", fman 1870 drivers/net/ethernet/freescale/fman/fman.c if (fman->dts_params.id == 0) fman 1880 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(FPM_RSTC_FM_RESET, &fman->fpm_regs->fm_rstc); fman 1886 drivers/net/ethernet/freescale/fman/fman.c } while (((ioread32be(&fman->fpm_regs->fm_rstc)) & fman 1911 drivers/net/ethernet/freescale/fman/fman.c dev_dbg(fman->dev, "%s: Didn't perform FManV3 reset due to Errata A007273!\n", fman 1919 drivers/net/ethernet/freescale/fman/fman.c static int fman_init(struct fman *fman) fman 1924 drivers/net/ethernet/freescale/fman/fman.c if (is_init_done(fman->cfg)) fman 1927 drivers/net/ethernet/freescale/fman/fman.c fman->state->count1_micro_bit = FM_TIMESTAMP_1_USEC_BIT; fman 1929 drivers/net/ethernet/freescale/fman/fman.c cfg = fman->cfg; fman 1932 drivers/net/ethernet/freescale/fman/fman.c if (fman->state->rev_info.major < 6) fman 1933 drivers/net/ethernet/freescale/fman/fman.c fman->state->exceptions &= ~FMAN_EX_BMI_DISPATCH_RAM_ECC; fman 1935 drivers/net/ethernet/freescale/fman/fman.c if (fman->state->rev_info.major >= 6) fman 1936 drivers/net/ethernet/freescale/fman/fman.c fman->state->exceptions &= ~FMAN_EX_QMI_SINGLE_ECC; fman 1939 drivers/net/ethernet/freescale/fman/fman.c memset_io((void __iomem *)(fman->base_addr + CGP_OFFSET), 0, fman 1940 drivers/net/ethernet/freescale/fman/fman.c fman->state->fm_port_num_of_cg); fman 1948 drivers/net/ethernet/freescale/fman/fman.c fman->liodn_offset[i] = fman 1949 drivers/net/ethernet/freescale/fman/fman.c ioread32be(&fman->bmi_regs->fmbm_spliodn[i - 1]); fman 1950 drivers/net/ethernet/freescale/fman/fman.c liodn_base = ioread32be(&fman->dma_regs->fmdmplr[i / 2]); fman 1959 drivers/net/ethernet/freescale/fman/fman.c fman->liodn_base[i] = liodn_base; fman 1962 drivers/net/ethernet/freescale/fman/fman.c err = fman_reset(fman); fman 1966 drivers/net/ethernet/freescale/fman/fman.c if (ioread32be(&fman->qmi_regs->fmqm_gs) & QMI_GS_HALT_NOT_BUSY) { fman 1967 drivers/net/ethernet/freescale/fman/fman.c resume(fman->fpm_regs); fman 1972 drivers/net/ethernet/freescale/fman/fman.c } while (((ioread32be(&fman->qmi_regs->fmqm_gs)) & fman 1975 drivers/net/ethernet/freescale/fman/fman.c dev_warn(fman->dev, "%s: QMI is in halt not busy state\n", fman 1979 drivers/net/ethernet/freescale/fman/fman.c if (clear_iram(fman) != 0) fman 1982 drivers/net/ethernet/freescale/fman/fman.c cfg->exceptions = fman->state->exceptions; fman 1986 drivers/net/ethernet/freescale/fman/fman.c err = dma_init(fman); fman 1988 drivers/net/ethernet/freescale/fman/fman.c free_init_resources(fman); fman 1993 drivers/net/ethernet/freescale/fman/fman.c fpm_init(fman->fpm_regs, fman->cfg); fman 1997 drivers/net/ethernet/freescale/fman/fman.c fman->fifo_offset = fman_muram_alloc(fman->muram, fman 1998 drivers/net/ethernet/freescale/fman/fman.c fman->state->total_fifo_size); fman 1999 drivers/net/ethernet/freescale/fman/fman.c if (IS_ERR_VALUE(fman->fifo_offset)) { fman 2000 drivers/net/ethernet/freescale/fman/fman.c free_init_resources(fman); fman 2001 drivers/net/ethernet/freescale/fman/fman.c dev_err(fman->dev, "%s: MURAM alloc for BMI FIFO failed\n", fman 2006 drivers/net/ethernet/freescale/fman/fman.c cfg->fifo_base_addr = fman->fifo_offset; fman 2007 drivers/net/ethernet/freescale/fman/fman.c cfg->total_fifo_size = fman->state->total_fifo_size; fman 2008 drivers/net/ethernet/freescale/fman/fman.c cfg->total_num_of_tasks = fman->state->total_num_of_tasks; fman 2009 drivers/net/ethernet/freescale/fman/fman.c cfg->clk_freq = fman->state->fm_clk_freq; fman 2012 drivers/net/ethernet/freescale/fman/fman.c bmi_init(fman->bmi_regs, fman->cfg); fman 2015 drivers/net/ethernet/freescale/fman/fman.c qmi_init(fman->qmi_regs, fman->cfg); fman 2018 drivers/net/ethernet/freescale/fman/fman.c hwp_init(fman->hwp_regs); fman 2021 drivers/net/ethernet/freescale/fman/fman.c fman->keygen = keygen_init(fman->kg_regs); fman 2022 drivers/net/ethernet/freescale/fman/fman.c if (!fman->keygen) fman 2025 drivers/net/ethernet/freescale/fman/fman.c err = enable(fman, cfg); fman 2029 drivers/net/ethernet/freescale/fman/fman.c enable_time_stamp(fman); fman 2031 drivers/net/ethernet/freescale/fman/fman.c kfree(fman->cfg); fman 2032 drivers/net/ethernet/freescale/fman/fman.c fman->cfg = NULL; fman 2037 drivers/net/ethernet/freescale/fman/fman.c static int fman_set_exception(struct fman *fman, fman 2042 drivers/net/ethernet/freescale/fman/fman.c if (!is_init_done(fman->cfg)) fman 2048 drivers/net/ethernet/freescale/fman/fman.c fman->state->exceptions |= bit_mask; fman 2050 drivers/net/ethernet/freescale/fman/fman.c fman->state->exceptions &= ~bit_mask; fman 2052 drivers/net/ethernet/freescale/fman/fman.c dev_err(fman->dev, "%s: Undefined exception (%d)\n", fman 2057 drivers/net/ethernet/freescale/fman/fman.c return set_exception(fman, exception, enable); fman 2073 drivers/net/ethernet/freescale/fman/fman.c void fman_register_intr(struct fman *fman, enum fman_event_modules module, fman 2083 drivers/net/ethernet/freescale/fman/fman.c fman->intr_mng[event].isr_cb = isr_cb; fman 2084 drivers/net/ethernet/freescale/fman/fman.c fman->intr_mng[event].src_handle = src_arg; fman 2099 drivers/net/ethernet/freescale/fman/fman.c void fman_unregister_intr(struct fman *fman, enum fman_event_modules module, fman 2107 drivers/net/ethernet/freescale/fman/fman.c fman->intr_mng[event].isr_cb = NULL; fman 2108 drivers/net/ethernet/freescale/fman/fman.c fman->intr_mng[event].src_handle = NULL; fman 2121 drivers/net/ethernet/freescale/fman/fman.c int fman_set_port_params(struct fman *fman, fman 2128 drivers/net/ethernet/freescale/fman/fman.c spin_lock_irqsave(&fman->spinlock, flags); fman 2130 drivers/net/ethernet/freescale/fman/fman.c err = set_num_of_tasks(fman, port_params->port_id, fman 2141 drivers/net/ethernet/freescale/fman/fman.c fman->state->accumulated_num_of_deq_tnums += fman 2143 drivers/net/ethernet/freescale/fman/fman.c enq_th = (ioread32be(&fman->qmi_regs->fmqm_gc) & fman 2148 drivers/net/ethernet/freescale/fman/fman.c if (enq_th >= (fman->state->qmi_max_num_of_tnums - fman 2149 drivers/net/ethernet/freescale/fman/fman.c fman->state->accumulated_num_of_deq_tnums)) { fman 2151 drivers/net/ethernet/freescale/fman/fman.c fman->state->qmi_max_num_of_tnums - fman 2152 drivers/net/ethernet/freescale/fman/fman.c fman->state->accumulated_num_of_deq_tnums - 1; fman 2154 drivers/net/ethernet/freescale/fman/fman.c reg = ioread32be(&fman->qmi_regs->fmqm_gc); fman 2157 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(reg, &fman->qmi_regs->fmqm_gc); fman 2160 drivers/net/ethernet/freescale/fman/fman.c deq_th = ioread32be(&fman->qmi_regs->fmqm_gc) & fman 2167 drivers/net/ethernet/freescale/fman/fman.c if ((deq_th <= fman->state->accumulated_num_of_deq_tnums) && fman 2168 drivers/net/ethernet/freescale/fman/fman.c (deq_th < fman->state->qmi_max_num_of_tnums - 1)) { fman 2169 drivers/net/ethernet/freescale/fman/fman.c deq_th = fman->state->accumulated_num_of_deq_tnums + 1; fman 2170 drivers/net/ethernet/freescale/fman/fman.c reg = ioread32be(&fman->qmi_regs->fmqm_gc); fman 2173 drivers/net/ethernet/freescale/fman/fman.c iowrite32be(reg, &fman->qmi_regs->fmqm_gc); fman 2177 drivers/net/ethernet/freescale/fman/fman.c err = set_size_of_fifo(fman, port_params->port_id, fman 2183 drivers/net/ethernet/freescale/fman/fman.c err = set_num_of_open_dmas(fman, port_params->port_id, fman 2189 drivers/net/ethernet/freescale/fman/fman.c set_port_liodn(fman, port_id, fman->liodn_base[port_id], fman 2190 drivers/net/ethernet/freescale/fman/fman.c fman->liodn_offset[port_id]); fman 2192 drivers/net/ethernet/freescale/fman/fman.c if (fman->state->rev_info.major < 6) fman 2193 drivers/net/ethernet/freescale/fman/fman.c set_port_order_restoration(fman->fpm_regs, port_id); fman 2195 drivers/net/ethernet/freescale/fman/fman.c mac_id = hw_port_id_to_sw_port_id(fman->state->rev_info.major, port_id); fman 2197 drivers/net/ethernet/freescale/fman/fman.c if (port_params->max_frame_length >= fman->state->mac_mfl[mac_id]) { fman 2198 drivers/net/ethernet/freescale/fman/fman.c fman->state->port_mfl[mac_id] = port_params->max_frame_length; fman 2200 drivers/net/ethernet/freescale/fman/fman.c dev_warn(fman->dev, "%s: Port (%d) max_frame_length is smaller than MAC (%d) current MTU\n", fman 2206 drivers/net/ethernet/freescale/fman/fman.c spin_unlock_irqrestore(&fman->spinlock, flags); fman 2211 drivers/net/ethernet/freescale/fman/fman.c spin_unlock_irqrestore(&fman->spinlock, flags); fman 2225 drivers/net/ethernet/freescale/fman/fman.c int fman_reset_mac(struct fman *fman, u8 mac_id) fman 2227 drivers/net/ethernet/freescale/fman/fman.c struct fman_fpm_regs __iomem *fpm_rg = fman->fpm_regs; fman 2230 drivers/net/ethernet/freescale/fman/fman.c if (fman->state->rev_info.major >= 6) { fman 2231 drivers/net/ethernet/freescale/fman/fman.c dev_err(fman->dev, "%s: FMan MAC reset no available for FMan V3!\n", fman 2269 drivers/net/ethernet/freescale/fman/fman.c dev_warn(fman->dev, "%s: Illegal MAC Id [%d]\n", fman 2296 drivers/net/ethernet/freescale/fman/fman.c int fman_set_mac_max_frame(struct fman *fman, u8 mac_id, u16 mfl) fman 2301 drivers/net/ethernet/freescale/fman/fman.c if ((!fman->state->port_mfl[mac_id]) || fman 2302 drivers/net/ethernet/freescale/fman/fman.c (mfl <= fman->state->port_mfl[mac_id])) { fman 2303 drivers/net/ethernet/freescale/fman/fman.c fman->state->mac_mfl[mac_id] = mfl; fman 2305 drivers/net/ethernet/freescale/fman/fman.c dev_warn(fman->dev, "%s: MAC max_frame_length is larger than Port max_frame_length\n", fman 2321 drivers/net/ethernet/freescale/fman/fman.c u16 fman_get_clock_freq(struct fman *fman) fman 2323 drivers/net/ethernet/freescale/fman/fman.c return fman->state->fm_clk_freq; fman 2334 drivers/net/ethernet/freescale/fman/fman.c u32 fman_get_bmi_max_fifo_size(struct fman *fman) fman 2336 drivers/net/ethernet/freescale/fman/fman.c return fman->state->bmi_max_fifo_size; fman 2351 drivers/net/ethernet/freescale/fman/fman.c void fman_get_revision(struct fman *fman, struct fman_rev_info *rev_info) fman 2355 drivers/net/ethernet/freescale/fman/fman.c tmp = ioread32be(&fman->fpm_regs->fm_ip_rev_1); fman 2371 drivers/net/ethernet/freescale/fman/fman.c u32 fman_get_qman_channel_id(struct fman *fman, u32 port_id) fman 2375 drivers/net/ethernet/freescale/fman/fman.c if (fman->state->rev_info.major >= 6) { fman 2381 drivers/net/ethernet/freescale/fman/fman.c for (i = 0; i < fman->state->num_of_qman_channels; i++) { fman 2391 drivers/net/ethernet/freescale/fman/fman.c for (i = 0; i < fman->state->num_of_qman_channels; i++) { fman 2397 drivers/net/ethernet/freescale/fman/fman.c if (i == fman->state->num_of_qman_channels) fman 2400 drivers/net/ethernet/freescale/fman/fman.c return fman->state->qman_channel_base + i; fman 2412 drivers/net/ethernet/freescale/fman/fman.c struct resource *fman_get_mem_region(struct fman *fman) fman 2414 drivers/net/ethernet/freescale/fman/fman.c return fman->state->res; fman 2516 drivers/net/ethernet/freescale/fman/fman.c struct fman *fman_bind(struct device *fm_dev) fman 2518 drivers/net/ethernet/freescale/fman/fman.c return (struct fman *)(dev_get_drvdata(get_device(fm_dev))); fman 2532 drivers/net/ethernet/freescale/fman/fman.c struct fman *fman = (struct fman *)handle; fman 2537 drivers/net/ethernet/freescale/fman/fman.c if (!is_init_done(fman->cfg)) fman 2540 drivers/net/ethernet/freescale/fman/fman.c fpm_rg = fman->fpm_regs; fman 2548 drivers/net/ethernet/freescale/fman/fman.c single_ret = bmi_err_event(fman); fman 2553 drivers/net/ethernet/freescale/fman/fman.c single_ret = qmi_err_event(fman); fman 2558 drivers/net/ethernet/freescale/fman/fman.c single_ret = fpm_err_event(fman); fman 2563 drivers/net/ethernet/freescale/fman/fman.c single_ret = dma_err_event(fman); fman 2568 drivers/net/ethernet/freescale/fman/fman.c single_ret = muram_err_intr(fman); fman 2575 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_ERR_MAC0 + 0); fman 2580 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_ERR_MAC0 + 1); fman 2585 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_ERR_MAC0 + 2); fman 2590 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_ERR_MAC0 + 3); fman 2595 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_ERR_MAC0 + 4); fman 2600 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_ERR_MAC0 + 5); fman 2605 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_ERR_MAC0 + 6); fman 2610 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_ERR_MAC0 + 7); fman 2615 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_ERR_MAC0 + 8); fman 2620 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_ERR_MAC0 + 9); fman 2630 drivers/net/ethernet/freescale/fman/fman.c struct fman *fman = (struct fman *)handle; fman 2635 drivers/net/ethernet/freescale/fman/fman.c if (!is_init_done(fman->cfg)) fman 2638 drivers/net/ethernet/freescale/fman/fman.c fpm_rg = fman->fpm_regs; fman 2646 drivers/net/ethernet/freescale/fman/fman.c single_ret = qmi_event(fman); fman 2653 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_MAC0 + 0); fman 2658 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_MAC0 + 1); fman 2663 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_MAC0 + 2); fman 2668 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_MAC0 + 3); fman 2673 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_MAC0 + 4); fman 2678 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_MAC0 + 5); fman 2683 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_MAC0 + 6); fman 2688 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_MAC0 + 7); fman 2693 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_MAC0 + 8); fman 2698 drivers/net/ethernet/freescale/fman/fman.c single_ret = call_mac_isr(fman, FMAN_EV_MAC0 + 9); fman 2713 drivers/net/ethernet/freescale/fman/fman.c static struct fman *read_dts_node(struct platform_device *of_dev) fman 2715 drivers/net/ethernet/freescale/fman/fman.c struct fman *fman; fman 2725 drivers/net/ethernet/freescale/fman/fman.c fman = kzalloc(sizeof(*fman), GFP_KERNEL); fman 2726 drivers/net/ethernet/freescale/fman/fman.c if (!fman) fman 2737 drivers/net/ethernet/freescale/fman/fman.c fman->dts_params.id = (u8)val; fman 2755 drivers/net/ethernet/freescale/fman/fman.c fman->dts_params.err_irq = res->start; fman 2771 drivers/net/ethernet/freescale/fman/fman.c __func__, fman->dts_params.id); fman 2778 drivers/net/ethernet/freescale/fman/fman.c __func__, fman->dts_params.id); fman 2782 drivers/net/ethernet/freescale/fman/fman.c fman->dts_params.clk_freq = DIV_ROUND_UP(clk_rate, 1000000); fman 2791 drivers/net/ethernet/freescale/fman/fman.c fman->dts_params.qman_channel_base = range[0]; fman 2792 drivers/net/ethernet/freescale/fman/fman.c fman->dts_params.num_of_qman_channels = range[1]; fman 2803 drivers/net/ethernet/freescale/fman/fman.c &fman->dts_params.muram_res); fman 2814 drivers/net/ethernet/freescale/fman/fman.c "fman", fman); fman 2821 drivers/net/ethernet/freescale/fman/fman.c if (fman->dts_params.err_irq != 0) { fman 2822 drivers/net/ethernet/freescale/fman/fman.c err = devm_request_irq(&of_dev->dev, fman->dts_params.err_irq, fman 2824 drivers/net/ethernet/freescale/fman/fman.c "fman-err", fman); fman 2827 drivers/net/ethernet/freescale/fman/fman.c __func__, fman->dts_params.err_irq, err); fman 2832 drivers/net/ethernet/freescale/fman/fman.c fman->dts_params.res = fman 2835 drivers/net/ethernet/freescale/fman/fman.c if (!fman->dts_params.res) { fman 2841 drivers/net/ethernet/freescale/fman/fman.c fman->dts_params.base_addr = fman 2843 drivers/net/ethernet/freescale/fman/fman.c if (!fman->dts_params.base_addr) { fman 2848 drivers/net/ethernet/freescale/fman/fman.c fman->dev = &of_dev->dev; fman 2862 drivers/net/ethernet/freescale/fman/fman.c return fman; fman 2867 drivers/net/ethernet/freescale/fman/fman.c kfree(fman); fman 2873 drivers/net/ethernet/freescale/fman/fman.c struct fman *fman; fman 2879 drivers/net/ethernet/freescale/fman/fman.c fman = read_dts_node(of_dev); fman 2880 drivers/net/ethernet/freescale/fman/fman.c if (!fman) fman 2883 drivers/net/ethernet/freescale/fman/fman.c err = fman_config(fman); fman 2889 drivers/net/ethernet/freescale/fman/fman.c if (fman_init(fman) != 0) { fman 2894 drivers/net/ethernet/freescale/fman/fman.c if (fman->dts_params.err_irq == 0) { fman 2895 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_DMA_BUS_ERROR, false); fman 2896 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_DMA_READ_ECC, false); fman 2897 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_DMA_SYSTEM_WRITE_ECC, false); fman 2898 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_DMA_FM_WRITE_ECC, false); fman 2899 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_DMA_SINGLE_PORT_ECC, false); fman 2900 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_FPM_STALL_ON_TASKS, false); fman 2901 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_FPM_SINGLE_ECC, false); fman 2902 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_FPM_DOUBLE_ECC, false); fman 2903 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_QMI_SINGLE_ECC, false); fman 2904 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_QMI_DOUBLE_ECC, false); fman 2905 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, fman 2907 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_BMI_LIST_RAM_ECC, false); fman 2908 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_BMI_STORAGE_PROFILE_ECC, fman 2910 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_BMI_STATISTICS_RAM_ECC, false); fman 2911 drivers/net/ethernet/freescale/fman/fman.c fman_set_exception(fman, FMAN_EX_BMI_DISPATCH_RAM_ECC, false); fman 2914 drivers/net/ethernet/freescale/fman/fman.c dev_set_drvdata(dev, fman); fman 2916 drivers/net/ethernet/freescale/fman/fman.c dev_dbg(dev, "FMan%d probed\n", fman->dts_params.id); fman 104 drivers/net/ethernet/freescale/fman/fman.h struct fman; /* FMan data */ fman 290 drivers/net/ethernet/freescale/fman/fman.h typedef irqreturn_t (fman_exceptions_cb)(struct fman *fman, fman 304 drivers/net/ethernet/freescale/fman/fman.h typedef irqreturn_t (fman_bus_error_cb)(struct fman *fman, u8 port_id, fman 374 drivers/net/ethernet/freescale/fman/fman.h void fman_get_revision(struct fman *fman, struct fman_rev_info *rev_info); fman 376 drivers/net/ethernet/freescale/fman/fman.h void fman_register_intr(struct fman *fman, enum fman_event_modules mod, fman 380 drivers/net/ethernet/freescale/fman/fman.h void fman_unregister_intr(struct fman *fman, enum fman_event_modules mod, fman 383 drivers/net/ethernet/freescale/fman/fman.h int fman_set_port_params(struct fman *fman, fman 386 drivers/net/ethernet/freescale/fman/fman.h int fman_reset_mac(struct fman *fman, u8 mac_id); fman 388 drivers/net/ethernet/freescale/fman/fman.h u16 fman_get_clock_freq(struct fman *fman); fman 390 drivers/net/ethernet/freescale/fman/fman.h u32 fman_get_bmi_max_fifo_size(struct fman *fman); fman 392 drivers/net/ethernet/freescale/fman/fman.h int fman_set_mac_max_frame(struct fman *fman, u8 mac_id, u16 mfl); fman 394 drivers/net/ethernet/freescale/fman/fman.h u32 fman_get_qman_channel_id(struct fman *fman, u32 port_id); fman 396 drivers/net/ethernet/freescale/fman/fman.h struct resource *fman_get_mem_region(struct fman *fman); fman 406 drivers/net/ethernet/freescale/fman/fman.h struct fman *fman_bind(struct device *dev); fman 448 drivers/net/ethernet/freescale/fman/fman_port.c struct fman *fman; /* FMan Handle */ fman 1337 drivers/net/ethernet/freescale/fman/fman_port.c port->fm = port->dts_params.fman; fman 1511 drivers/net/ethernet/freescale/fman/fman_port.c keygen = port->dts_params.fman->keygen; fman 1757 drivers/net/ethernet/freescale/fman/fman_port.c struct fman *fman; fman 1783 drivers/net/ethernet/freescale/fman/fman_port.c fman = dev_get_drvdata(&of_find_device_by_node(fm_node)->dev); fman 1785 drivers/net/ethernet/freescale/fman/fman_port.c if (!fman) { fman 1838 drivers/net/ethernet/freescale/fman/fman_port.c qman_channel_id = fman_get_qman_channel_id(fman, port_id); fman 1856 drivers/net/ethernet/freescale/fman/fman_port.c port->dts_params.fman = fman; fman 60 drivers/net/ethernet/freescale/fman/mac.c struct fman *fman; fman 110 drivers/net/ethernet/freescale/fman/mac.c params->fm = (void *)priv->fman; fman 676 drivers/net/ethernet/freescale/fman/mac.c priv->fman = fman_bind(&of_dev->dev); fman 677 drivers/net/ethernet/freescale/fman/mac.c if (!priv->fman) { fman 694 drivers/net/ethernet/freescale/fman/mac.c fman_get_mem_region(priv->fman),