Lines Matching refs:fc_regs
914 static void set_port_online(__be64 __iomem *fc_regs) in set_port_online() argument
918 cmdcfg = readq_be(&fc_regs[FC_MTIP_CMDCONFIG / 8]); in set_port_online()
921 writeq_be(cmdcfg, &fc_regs[FC_MTIP_CMDCONFIG / 8]); in set_port_online()
930 static void set_port_offline(__be64 __iomem *fc_regs) in set_port_offline() argument
934 cmdcfg = readq_be(&fc_regs[FC_MTIP_CMDCONFIG / 8]); in set_port_offline()
937 writeq_be(cmdcfg, &fc_regs[FC_MTIP_CMDCONFIG / 8]); in set_port_offline()
954 static int wait_port_online(__be64 __iomem *fc_regs, u32 delay_us, u32 nretry) in wait_port_online() argument
965 status = readq_be(&fc_regs[FC_MTIP_STATUS / 8]); in wait_port_online()
985 static int wait_port_offline(__be64 __iomem *fc_regs, u32 delay_us, u32 nretry) in wait_port_offline() argument
996 status = readq_be(&fc_regs[FC_MTIP_STATUS / 8]); in wait_port_offline()
1020 static int afu_set_wwpn(struct afu *afu, int port, __be64 __iomem *fc_regs, in afu_set_wwpn() argument
1025 set_port_offline(fc_regs); in afu_set_wwpn()
1027 if (!wait_port_offline(fc_regs, FC_PORT_STATUS_RETRY_INTERVAL_US, in afu_set_wwpn()
1035 writeq_be(wwpn, &fc_regs[FC_PNAME / 8]); in afu_set_wwpn()
1040 set_port_online(fc_regs); in afu_set_wwpn()
1042 if (!wait_port_online(fc_regs, FC_PORT_STATUS_RETRY_INTERVAL_US, in afu_set_wwpn()
1066 static void afu_link_reset(struct afu *afu, int port, __be64 __iomem *fc_regs) in afu_link_reset() argument
1076 set_port_offline(fc_regs); in afu_link_reset()
1077 if (!wait_port_offline(fc_regs, FC_PORT_STATUS_RETRY_INTERVAL_US, in afu_link_reset()
1082 set_port_online(fc_regs); in afu_link_reset()
1083 if (!wait_port_online(fc_regs, FC_PORT_STATUS_RETRY_INTERVAL_US, in afu_link_reset()
1170 reg = readq_be(&afu->afu_map->global.fc_regs[0][FC_CONFIG2 / 8]); in afu_err_intr_init()
1174 writeq_be(reg, &afu->afu_map->global.fc_regs[0][FC_CONFIG2 / 8]); in afu_err_intr_init()
1179 &afu->afu_map->global.fc_regs[i][FC_ERROR / 8]); in afu_err_intr_init()
1180 writeq_be(0, &afu->afu_map->global.fc_regs[i][FC_ERRCAP / 8]); in afu_err_intr_init()
1308 readq_be(&global->fc_regs[port][FC_STATUS / 8])); in cxlflash_async_err_irq()
1323 reg = readq_be(&global->fc_regs[port][FC_ERROR / 8]); in cxlflash_async_err_irq()
1333 writeq_be(reg, &global->fc_regs[port][FC_ERROR / 8]); in cxlflash_async_err_irq()
1334 writeq_be(0, &global->fc_regs[port][FC_ERRCAP / 8]); in cxlflash_async_err_irq()
1541 writeq_be(0, &afu->afu_map->global.fc_regs[i][FC_ERRMSK / 8]); in init_global()
1544 fc_regs[i][FC_CNT_CRCERR / 8]); in init_global()
1545 writeq_be(MC_CRC_THRESH, &afu->afu_map->global.fc_regs[i] in init_global()
1551 &afu->afu_map->global.fc_regs[i][0], in init_global()
2007 __be64 __iomem *fc_regs; in cxlflash_show_port_status() local
2012 fc_regs = &afu->afu_map->global.fc_regs[port][0]; in cxlflash_show_port_status()
2013 status = readq_be(&fc_regs[FC_MTIP_STATUS / 8]); in cxlflash_show_port_status()
2326 &afu->afu_map->global.fc_regs[port][0]); in cxlflash_worker_thread()