mc7 245 drivers/net/ethernet/chelsio/cxgb3/adapter.h struct mc7 pmrx; mc7 246 drivers/net/ethernet/chelsio/cxgb3/adapter.h struct mc7 pmtx; mc7 247 drivers/net/ethernet/chelsio/cxgb3/adapter.h struct mc7 cm; mc7 465 drivers/net/ethernet/chelsio/cxgb3/common.h static inline unsigned int t3_mc7_size(const struct mc7 *p) mc7 702 drivers/net/ethernet/chelsio/cxgb3/common.h int t3_mc7_bd_read(struct mc7 *mc7, unsigned int start, unsigned int n, mc7 2446 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct mc7 *mem; mc7 311 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c struct mc7 *mem; mc7 145 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c int t3_mc7_bd_read(struct mc7 *mc7, unsigned int start, unsigned int n, mc7 151 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c unsigned int size64 = mc7->size / 8; /* # of 64-bit words */ mc7 152 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c struct adapter *adap = mc7->adapter; mc7 157 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c start *= (8 << mc7->width); mc7 162 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c for (i = (1 << mc7->width) - 1; i >= 0; --i) { mc7 166 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, mc7->offset + A_MC7_BD_ADDR, start); mc7 167 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, mc7->offset + A_MC7_BD_OP, 0); mc7 168 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c val = t3_read_reg(adap, mc7->offset + A_MC7_BD_OP); mc7 171 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->offset + A_MC7_BD_OP); mc7 175 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c val = t3_read_reg(adap, mc7->offset + A_MC7_BD_DATA1); mc7 176 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (mc7->width == 0) { mc7 178 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->offset + mc7 182 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (mc7->width > 1) mc7 183 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c val >>= shift[mc7->width]; mc7 184 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c val64 |= (u64) val << (step[mc7->width] * i); mc7 1791 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static void mc7_intr_handler(struct mc7 *mc7) mc7 1793 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c struct adapter *adapter = mc7->adapter; mc7 1794 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c u32 cause = t3_read_reg(adapter, mc7->offset + A_MC7_INT_CAUSE); mc7 1797 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->stats.corr_err++; mc7 1799 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c "data 0x%x 0x%x 0x%x\n", mc7->name, mc7 1800 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_reg(adapter, mc7->offset + A_MC7_CE_ADDR), mc7 1801 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_reg(adapter, mc7->offset + A_MC7_CE_DATA0), mc7 1802 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_reg(adapter, mc7->offset + A_MC7_CE_DATA1), mc7 1803 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_reg(adapter, mc7->offset + A_MC7_CE_DATA2)); mc7 1807 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->stats.uncorr_err++; mc7 1809 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c "data 0x%x 0x%x 0x%x\n", mc7->name, mc7 1810 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_reg(adapter, mc7->offset + A_MC7_UE_ADDR), mc7 1811 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_reg(adapter, mc7->offset + A_MC7_UE_DATA0), mc7 1812 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_reg(adapter, mc7->offset + A_MC7_UE_DATA1), mc7 1813 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_reg(adapter, mc7->offset + A_MC7_UE_DATA2)); mc7 1817 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->stats.parity_err++; mc7 1819 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->name, G_PE(cause)); mc7 1827 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->offset + A_MC7_ERR_ADDR); mc7 1828 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->stats.addr_err++; mc7 1830 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->name, addr); mc7 1836 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adapter, mc7->offset + A_MC7_INT_CAUSE, cause); mc7 3194 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static int mc7_init(struct mc7 *mc7, unsigned int mc7_clock, int mem_type) mc7 3209 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c struct adapter *adapter = mc7->adapter; mc7 3212 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (!mc7->size) mc7 3215 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c val = t3_read_reg(adapter, mc7->offset + A_MC7_CFG); mc7 3220 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adapter, mc7->offset + A_MC7_CFG, val | F_IFEN); mc7 3221 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c val = t3_read_reg(adapter, mc7->offset + A_MC7_CFG); /* flush */ mc7 3225 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adapter, mc7->offset + A_MC7_CAL, F_SGL_CAL_EN); mc7 3226 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_reg(adapter, mc7->offset + A_MC7_CAL); mc7 3228 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (t3_read_reg(adapter, mc7->offset + A_MC7_CAL) & mc7 3231 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->name); mc7 3236 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adapter, mc7->offset + A_MC7_PARM, mc7 3242 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adapter, mc7->offset + A_MC7_CFG, mc7 3244 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_reg(adapter, mc7->offset + A_MC7_CFG); /* flush */ mc7 3247 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adapter, mc7->offset + A_MC7_DLL, F_DLLENB, mc7 3252 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (wrreg_wait(adapter, mc7->offset + A_MC7_PRE, 0) || mc7 3253 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c wrreg_wait(adapter, mc7->offset + A_MC7_EXT_MODE2, 0) || mc7 3254 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c wrreg_wait(adapter, mc7->offset + A_MC7_EXT_MODE3, 0) || mc7 3255 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c wrreg_wait(adapter, mc7->offset + A_MC7_EXT_MODE1, val)) mc7 3259 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adapter, mc7->offset + A_MC7_MODE, 0x100); mc7 3260 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adapter, mc7->offset + A_MC7_DLL, F_DLLRST, 0); mc7 3264 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (wrreg_wait(adapter, mc7->offset + A_MC7_PRE, 0) || mc7 3265 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c wrreg_wait(adapter, mc7->offset + A_MC7_REF, 0) || mc7 3266 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c wrreg_wait(adapter, mc7->offset + A_MC7_REF, 0) || mc7 3267 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c wrreg_wait(adapter, mc7->offset + A_MC7_MODE, mc7 3269 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c wrreg_wait(adapter, mc7->offset + A_MC7_EXT_MODE1, val | 0x380) || mc7 3270 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c wrreg_wait(adapter, mc7->offset + A_MC7_EXT_MODE1, val)) mc7 3277 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adapter, mc7->offset + A_MC7_REF, mc7 3279 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_reg(adapter, mc7->offset + A_MC7_REF); /* flush */ mc7 3281 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adapter, mc7->offset + A_MC7_ECC, F_ECCGENEN | F_ECCCHKEN); mc7 3282 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adapter, mc7->offset + A_MC7_BIST_DATA, 0); mc7 3283 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adapter, mc7->offset + A_MC7_BIST_ADDR_BEG, 0); mc7 3284 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adapter, mc7->offset + A_MC7_BIST_ADDR_END, mc7 3285 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c (mc7->size << width) - 1); mc7 3286 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adapter, mc7->offset + A_MC7_BIST_OP, V_OP(1)); mc7 3287 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_reg(adapter, mc7->offset + A_MC7_BIST_OP); /* flush */ mc7 3292 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c val = t3_read_reg(adapter, mc7->offset + A_MC7_BIST_OP); mc7 3295 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c CH_ERR(adapter, "%s MC7 BIST timed out\n", mc7->name); mc7 3300 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adapter, mc7->offset + A_MC7_CFG, 0, F_RDY); mc7 3526 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static void mc7_prep(struct adapter *adapter, struct mc7 *mc7, mc7 3531 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->adapter = adapter; mc7 3532 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->name = name; mc7 3533 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->offset = base_addr - MC7_PMRX_BASE_ADDR; mc7 3534 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c cfg = t3_read_reg(adapter, mc7->offset + A_MC7_CFG); mc7 3535 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->size = G_DEN(cfg) == M_DEN ? 0 : mc7_calc_size(cfg); mc7 3536 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mc7->width = G_WIDTH(cfg);