Lines Matching refs:pdata

177 	struct xgbe_prv_data *pdata = filp->private_data;  in xgmac_reg_addr_read()  local
179 return xgbe_common_read(buffer, count, ppos, pdata->debugfs_xgmac_reg); in xgmac_reg_addr_read()
186 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_addr_write() local
189 &pdata->debugfs_xgmac_reg); in xgmac_reg_addr_write()
195 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_value_read() local
198 value = XGMAC_IOREAD(pdata, pdata->debugfs_xgmac_reg); in xgmac_reg_value_read()
207 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_value_write() local
215 XGMAC_IOWRITE(pdata, pdata->debugfs_xgmac_reg, value); in xgmac_reg_value_write()
237 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_mmd_read() local
239 return xgbe_common_read(buffer, count, ppos, pdata->debugfs_xpcs_mmd); in xpcs_mmd_read()
245 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_mmd_write() local
248 &pdata->debugfs_xpcs_mmd); in xpcs_mmd_write()
254 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_reg_addr_read() local
256 return xgbe_common_read(buffer, count, ppos, pdata->debugfs_xpcs_reg); in xpcs_reg_addr_read()
262 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_reg_addr_write() local
265 &pdata->debugfs_xpcs_reg); in xpcs_reg_addr_write()
271 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_reg_value_read() local
274 value = XMDIO_READ(pdata, pdata->debugfs_xpcs_mmd, in xpcs_reg_value_read()
275 pdata->debugfs_xpcs_reg); in xpcs_reg_value_read()
284 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_reg_value_write() local
292 XMDIO_WRITE(pdata, pdata->debugfs_xpcs_mmd, pdata->debugfs_xpcs_reg, in xpcs_reg_value_write()
322 struct xgbe_prv_data *pdata = filp->private_data; in xprop_reg_addr_read() local
324 return xgbe_common_read(buffer, count, ppos, pdata->debugfs_xprop_reg); in xprop_reg_addr_read()
331 struct xgbe_prv_data *pdata = filp->private_data; in xprop_reg_addr_write() local
334 &pdata->debugfs_xprop_reg); in xprop_reg_addr_write()
340 struct xgbe_prv_data *pdata = filp->private_data; in xprop_reg_value_read() local
343 value = XP_IOREAD(pdata, pdata->debugfs_xprop_reg); in xprop_reg_value_read()
352 struct xgbe_prv_data *pdata = filp->private_data; in xprop_reg_value_write() local
360 XP_IOWRITE(pdata, pdata->debugfs_xprop_reg, value); in xprop_reg_value_write()
382 struct xgbe_prv_data *pdata = filp->private_data; in xi2c_reg_addr_read() local
384 return xgbe_common_read(buffer, count, ppos, pdata->debugfs_xi2c_reg); in xi2c_reg_addr_read()
391 struct xgbe_prv_data *pdata = filp->private_data; in xi2c_reg_addr_write() local
394 &pdata->debugfs_xi2c_reg); in xi2c_reg_addr_write()
400 struct xgbe_prv_data *pdata = filp->private_data; in xi2c_reg_value_read() local
403 value = XI2C_IOREAD(pdata, pdata->debugfs_xi2c_reg); in xi2c_reg_value_read()
412 struct xgbe_prv_data *pdata = filp->private_data; in xi2c_reg_value_write() local
420 XI2C_IOWRITE(pdata, pdata->debugfs_xi2c_reg, value); in xi2c_reg_value_write()
439 void xgbe_debugfs_init(struct xgbe_prv_data *pdata) in xgbe_debugfs_init() argument
445 pdata->debugfs_xgmac_reg = 0; in xgbe_debugfs_init()
446 pdata->debugfs_xpcs_mmd = 1; in xgbe_debugfs_init()
447 pdata->debugfs_xpcs_reg = 0; in xgbe_debugfs_init()
449 buf = kasprintf(GFP_KERNEL, "amd-xgbe-%s", pdata->netdev->name); in xgbe_debugfs_init()
453 pdata->xgbe_debugfs = debugfs_create_dir(buf, NULL); in xgbe_debugfs_init()
454 if (!pdata->xgbe_debugfs) { in xgbe_debugfs_init()
455 netdev_err(pdata->netdev, "debugfs_create_dir failed\n"); in xgbe_debugfs_init()
461 pdata->xgbe_debugfs, pdata, in xgbe_debugfs_init()
464 netdev_err(pdata->netdev, "debugfs_create_file failed\n"); in xgbe_debugfs_init()
467 pdata->xgbe_debugfs, pdata, in xgbe_debugfs_init()
470 netdev_err(pdata->netdev, "debugfs_create_file failed\n"); in xgbe_debugfs_init()
473 pdata->xgbe_debugfs, pdata, in xgbe_debugfs_init()
476 netdev_err(pdata->netdev, "debugfs_create_file failed\n"); in xgbe_debugfs_init()
479 pdata->xgbe_debugfs, pdata, in xgbe_debugfs_init()
482 netdev_err(pdata->netdev, "debugfs_create_file failed\n"); in xgbe_debugfs_init()
485 pdata->xgbe_debugfs, pdata, in xgbe_debugfs_init()
488 netdev_err(pdata->netdev, "debugfs_create_file failed\n"); in xgbe_debugfs_init()
490 if (pdata->xprop_regs) { in xgbe_debugfs_init()
492 pdata->xgbe_debugfs, pdata, in xgbe_debugfs_init()
495 netdev_err(pdata->netdev, in xgbe_debugfs_init()
499 pdata->xgbe_debugfs, pdata, in xgbe_debugfs_init()
502 netdev_err(pdata->netdev, in xgbe_debugfs_init()
506 if (pdata->xi2c_regs) { in xgbe_debugfs_init()
508 pdata->xgbe_debugfs, pdata, in xgbe_debugfs_init()
511 netdev_err(pdata->netdev, in xgbe_debugfs_init()
515 pdata->xgbe_debugfs, pdata, in xgbe_debugfs_init()
518 netdev_err(pdata->netdev, in xgbe_debugfs_init()
522 if (pdata->vdata->an_cdr_workaround) { in xgbe_debugfs_init()
524 pdata->xgbe_debugfs, in xgbe_debugfs_init()
525 &pdata->debugfs_an_cdr_workaround); in xgbe_debugfs_init()
527 netdev_err(pdata->netdev, in xgbe_debugfs_init()
531 pdata->xgbe_debugfs, in xgbe_debugfs_init()
532 &pdata->debugfs_an_cdr_track_early); in xgbe_debugfs_init()
534 netdev_err(pdata->netdev, in xgbe_debugfs_init()
541 void xgbe_debugfs_exit(struct xgbe_prv_data *pdata) in xgbe_debugfs_exit() argument
543 debugfs_remove_recursive(pdata->xgbe_debugfs); in xgbe_debugfs_exit()
544 pdata->xgbe_debugfs = NULL; in xgbe_debugfs_exit()
547 void xgbe_debugfs_rename(struct xgbe_prv_data *pdata) in xgbe_debugfs_rename() argument
552 if (!pdata->xgbe_debugfs) in xgbe_debugfs_rename()
555 buf = kasprintf(GFP_KERNEL, "amd-xgbe-%s", pdata->netdev->name); in xgbe_debugfs_rename()
559 if (!strcmp(pdata->xgbe_debugfs->d_name.name, buf)) in xgbe_debugfs_rename()
562 pfile = debugfs_rename(pdata->xgbe_debugfs->d_parent, in xgbe_debugfs_rename()
563 pdata->xgbe_debugfs, in xgbe_debugfs_rename()
564 pdata->xgbe_debugfs->d_parent, buf); in xgbe_debugfs_rename()
566 netdev_err(pdata->netdev, "debugfs_rename failed\n"); in xgbe_debugfs_rename()