Lines Matching refs:ifc_ctrl
60 static struct fsl_ifc_ctrl *ifc_ctrl; variable
770 ifc_ctrl = kzalloc(sizeof(*ifc_ctrl), GFP_KERNEL); in fsl_ifc_ctrl_init()
771 if (!ifc_ctrl) in fsl_ifc_ctrl_init()
774 ifc_ctrl->regs.gregs = IFC_FCM_BASE_ADDR; in fsl_ifc_ctrl_init()
776 ver = ifc_in32(&ifc_ctrl->regs.gregs->ifc_rev); in fsl_ifc_ctrl_init()
778 ifc_ctrl->regs.rregs = in fsl_ifc_ctrl_init()
781 ifc_ctrl->regs.rregs = in fsl_ifc_ctrl_init()
785 ifc_out32(&ifc_ctrl->regs.rregs->ifc_nand.nand_evter_stat, ~0U); in fsl_ifc_ctrl_init()
786 ifc_out32(&ifc_ctrl->regs.rregs->ifc_nand.pgrdcmpl_evt_stat, ~0U); in fsl_ifc_ctrl_init()
789 ifc_out32(&ifc_ctrl->regs.rregs->ifc_nand.nand_evter_en, in fsl_ifc_ctrl_init()
795 ifc_out32(&ifc_ctrl->regs.rregs->ifc_nand.ncfgr, 0x0); in fsl_ifc_ctrl_init()
804 struct fsl_ifc_runtime *ifc = ifc_ctrl->regs.rregs; in fsl_ifc_sram_init()
817 ifc_ctrl->status = in fsl_ifc_sram_init()
820 if (!(ifc_ctrl->status & IFC_NAND_SRAM_INIT_EN)) in fsl_ifc_sram_init()
830 csor = ifc_in32(&ifc_ctrl->regs.gregs->csor_cs[cs].csor); in fsl_ifc_sram_init()
831 csor_ext = ifc_in32(&ifc_ctrl->regs.gregs->csor_cs[cs].csor_ext); in fsl_ifc_sram_init()
835 ifc_out32(&ifc_ctrl->regs.gregs->csor_cs[cs].csor, csor_8k); in fsl_ifc_sram_init()
836 ifc_out32(&ifc_ctrl->regs.gregs->csor_cs[cs].csor_ext, 0x0000400); in fsl_ifc_sram_init()
862 ifc_ctrl->status = ifc_in32(&ifc->ifc_nand.nand_evter_stat); in fsl_ifc_sram_init()
864 if (ifc_ctrl->status & IFC_NAND_EVTER_STAT_OPC) in fsl_ifc_sram_init()
868 if (ifc_ctrl->status != IFC_NAND_EVTER_STAT_OPC) { in fsl_ifc_sram_init()
873 ifc_out32(&ifc->ifc_nand.nand_evter_stat, ifc_ctrl->status); in fsl_ifc_sram_init()
876 ifc_out32(&ifc_ctrl->regs.gregs->csor_cs[cs].csor, csor); in fsl_ifc_sram_init()
877 ifc_out32(&ifc_ctrl->regs.gregs->csor_cs[cs].csor_ext, csor_ext); in fsl_ifc_sram_init()
892 if (!ifc_ctrl) { in fsl_ifc_chip_init()
894 if (!ifc_ctrl) in fsl_ifc_chip_init()
902 priv->ctrl = ifc_ctrl; in fsl_ifc_chip_init()
904 gregs = ifc_ctrl->regs.gregs; in fsl_ifc_chip_init()
929 ifc_ctrl->chips[priv->bank] = priv; in fsl_ifc_chip_init()
955 nand->controller = &ifc_ctrl->controller; in fsl_ifc_chip_init()