diff options
Diffstat (limited to 'drivers/misc/cxl/pci.c')
-rw-r--r-- | drivers/misc/cxl/pci.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index 9a092f6cd8d4..23b8a330e057 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c | |||
@@ -377,7 +377,7 @@ static int calc_capp_routing(struct pci_dev *dev, u64 *chipid, u64 *capp_unit_id | |||
377 | return 0; | 377 | return 0; |
378 | } | 378 | } |
379 | 379 | ||
380 | static int init_implementation_adapter_regs_psl(struct cxl *adapter, struct pci_dev *dev) | 380 | static int init_implementation_adapter_regs_psl8(struct cxl *adapter, struct pci_dev *dev) |
381 | { | 381 | { |
382 | u64 psl_dsnctl, psl_fircntl; | 382 | u64 psl_dsnctl, psl_fircntl; |
383 | u64 chipid; | 383 | u64 chipid; |
@@ -434,7 +434,7 @@ static int init_implementation_adapter_regs_xsl(struct cxl *adapter, struct pci_ | |||
434 | /* For the PSL this is a multiple for 0 < n <= 7: */ | 434 | /* For the PSL this is a multiple for 0 < n <= 7: */ |
435 | #define PSL_2048_250MHZ_CYCLES 1 | 435 | #define PSL_2048_250MHZ_CYCLES 1 |
436 | 436 | ||
437 | static void write_timebase_ctrl_psl(struct cxl *adapter) | 437 | static void write_timebase_ctrl_psl8(struct cxl *adapter) |
438 | { | 438 | { |
439 | cxl_p1_write(adapter, CXL_PSL_TB_CTLSTAT, | 439 | cxl_p1_write(adapter, CXL_PSL_TB_CTLSTAT, |
440 | TBSYNC_CNT(2 * PSL_2048_250MHZ_CYCLES)); | 440 | TBSYNC_CNT(2 * PSL_2048_250MHZ_CYCLES)); |
@@ -455,7 +455,7 @@ static void write_timebase_ctrl_xsl(struct cxl *adapter) | |||
455 | TBSYNC_CNT(XSL_4000_CLOCKS)); | 455 | TBSYNC_CNT(XSL_4000_CLOCKS)); |
456 | } | 456 | } |
457 | 457 | ||
458 | static u64 timebase_read_psl(struct cxl *adapter) | 458 | static u64 timebase_read_psl8(struct cxl *adapter) |
459 | { | 459 | { |
460 | return cxl_p1_read(adapter, CXL_PSL_Timebase); | 460 | return cxl_p1_read(adapter, CXL_PSL_Timebase); |
461 | } | 461 | } |
@@ -513,7 +513,7 @@ static void cxl_setup_psl_timebase(struct cxl *adapter, struct pci_dev *dev) | |||
513 | return; | 513 | return; |
514 | } | 514 | } |
515 | 515 | ||
516 | static int init_implementation_afu_regs_psl(struct cxl_afu *afu) | 516 | static int init_implementation_afu_regs_psl8(struct cxl_afu *afu) |
517 | { | 517 | { |
518 | /* read/write masks for this slice */ | 518 | /* read/write masks for this slice */ |
519 | cxl_p1n_write(afu, CXL_PSL_APCALLOC_A, 0xFFFFFFFEFEFEFEFEULL); | 519 | cxl_p1n_write(afu, CXL_PSL_APCALLOC_A, 0xFFFFFFFEFEFEFEFEULL); |
@@ -996,7 +996,7 @@ static int cxl_afu_descriptor_looks_ok(struct cxl_afu *afu) | |||
996 | return 0; | 996 | return 0; |
997 | } | 997 | } |
998 | 998 | ||
999 | static int sanitise_afu_regs_psl(struct cxl_afu *afu) | 999 | static int sanitise_afu_regs_psl8(struct cxl_afu *afu) |
1000 | { | 1000 | { |
1001 | u64 reg; | 1001 | u64 reg; |
1002 | 1002 | ||
@@ -1526,40 +1526,40 @@ static void cxl_deconfigure_adapter(struct cxl *adapter) | |||
1526 | pci_disable_device(pdev); | 1526 | pci_disable_device(pdev); |
1527 | } | 1527 | } |
1528 | 1528 | ||
1529 | static const struct cxl_service_layer_ops psl_ops = { | 1529 | static const struct cxl_service_layer_ops psl8_ops = { |
1530 | .adapter_regs_init = init_implementation_adapter_regs_psl, | 1530 | .adapter_regs_init = init_implementation_adapter_regs_psl8, |
1531 | .invalidate_all = cxl_invalidate_all_psl, | 1531 | .invalidate_all = cxl_invalidate_all_psl8, |
1532 | .afu_regs_init = init_implementation_afu_regs_psl, | 1532 | .afu_regs_init = init_implementation_afu_regs_psl8, |
1533 | .sanitise_afu_regs = sanitise_afu_regs_psl, | 1533 | .sanitise_afu_regs = sanitise_afu_regs_psl8, |
1534 | .register_serr_irq = cxl_native_register_serr_irq, | 1534 | .register_serr_irq = cxl_native_register_serr_irq, |
1535 | .release_serr_irq = cxl_native_release_serr_irq, | 1535 | .release_serr_irq = cxl_native_release_serr_irq, |
1536 | .handle_interrupt = cxl_irq_psl, | 1536 | .handle_interrupt = cxl_irq_psl8, |
1537 | .fail_irq = cxl_fail_irq_psl, | 1537 | .fail_irq = cxl_fail_irq_psl, |
1538 | .activate_dedicated_process = cxl_activate_dedicated_process_psl, | 1538 | .activate_dedicated_process = cxl_activate_dedicated_process_psl8, |
1539 | .attach_afu_directed = cxl_attach_afu_directed_psl, | 1539 | .attach_afu_directed = cxl_attach_afu_directed_psl8, |
1540 | .attach_dedicated_process = cxl_attach_dedicated_process_psl, | 1540 | .attach_dedicated_process = cxl_attach_dedicated_process_psl8, |
1541 | .update_dedicated_ivtes = cxl_update_dedicated_ivtes_psl, | 1541 | .update_dedicated_ivtes = cxl_update_dedicated_ivtes_psl8, |
1542 | .debugfs_add_adapter_regs = cxl_debugfs_add_adapter_regs_psl, | 1542 | .debugfs_add_adapter_regs = cxl_debugfs_add_adapter_regs_psl8, |
1543 | .debugfs_add_afu_regs = cxl_debugfs_add_afu_regs_psl, | 1543 | .debugfs_add_afu_regs = cxl_debugfs_add_afu_regs_psl8, |
1544 | .psl_irq_dump_registers = cxl_native_irq_dump_regs_psl, | 1544 | .psl_irq_dump_registers = cxl_native_irq_dump_regs_psl8, |
1545 | .err_irq_dump_registers = cxl_native_err_irq_dump_regs, | 1545 | .err_irq_dump_registers = cxl_native_err_irq_dump_regs, |
1546 | .debugfs_stop_trace = cxl_stop_trace_psl, | 1546 | .debugfs_stop_trace = cxl_stop_trace_psl8, |
1547 | .write_timebase_ctrl = write_timebase_ctrl_psl, | 1547 | .write_timebase_ctrl = write_timebase_ctrl_psl8, |
1548 | .timebase_read = timebase_read_psl, | 1548 | .timebase_read = timebase_read_psl8, |
1549 | .capi_mode = OPAL_PHB_CAPI_MODE_CAPI, | 1549 | .capi_mode = OPAL_PHB_CAPI_MODE_CAPI, |
1550 | .needs_reset_before_disable = true, | 1550 | .needs_reset_before_disable = true, |
1551 | }; | 1551 | }; |
1552 | 1552 | ||
1553 | static const struct cxl_service_layer_ops xsl_ops = { | 1553 | static const struct cxl_service_layer_ops xsl_ops = { |
1554 | .adapter_regs_init = init_implementation_adapter_regs_xsl, | 1554 | .adapter_regs_init = init_implementation_adapter_regs_xsl, |
1555 | .invalidate_all = cxl_invalidate_all_psl, | 1555 | .invalidate_all = cxl_invalidate_all_psl8, |
1556 | .sanitise_afu_regs = sanitise_afu_regs_psl, | 1556 | .sanitise_afu_regs = sanitise_afu_regs_psl8, |
1557 | .handle_interrupt = cxl_irq_psl, | 1557 | .handle_interrupt = cxl_irq_psl8, |
1558 | .fail_irq = cxl_fail_irq_psl, | 1558 | .fail_irq = cxl_fail_irq_psl, |
1559 | .activate_dedicated_process = cxl_activate_dedicated_process_psl, | 1559 | .activate_dedicated_process = cxl_activate_dedicated_process_psl8, |
1560 | .attach_afu_directed = cxl_attach_afu_directed_psl, | 1560 | .attach_afu_directed = cxl_attach_afu_directed_psl8, |
1561 | .attach_dedicated_process = cxl_attach_dedicated_process_psl, | 1561 | .attach_dedicated_process = cxl_attach_dedicated_process_psl8, |
1562 | .update_dedicated_ivtes = cxl_update_dedicated_ivtes_psl, | 1562 | .update_dedicated_ivtes = cxl_update_dedicated_ivtes_psl8, |
1563 | .debugfs_add_adapter_regs = cxl_debugfs_add_adapter_regs_xsl, | 1563 | .debugfs_add_adapter_regs = cxl_debugfs_add_adapter_regs_xsl, |
1564 | .write_timebase_ctrl = write_timebase_ctrl_xsl, | 1564 | .write_timebase_ctrl = write_timebase_ctrl_xsl, |
1565 | .timebase_read = timebase_read_xsl, | 1565 | .timebase_read = timebase_read_xsl, |
@@ -1574,8 +1574,8 @@ static void set_sl_ops(struct cxl *adapter, struct pci_dev *dev) | |||
1574 | adapter->native->sl_ops = &xsl_ops; | 1574 | adapter->native->sl_ops = &xsl_ops; |
1575 | adapter->min_pe = 1; /* Workaround for CX-4 hardware bug */ | 1575 | adapter->min_pe = 1; /* Workaround for CX-4 hardware bug */ |
1576 | } else { | 1576 | } else { |
1577 | dev_info(&dev->dev, "Device uses a PSL\n"); | 1577 | dev_info(&dev->dev, "Device uses a PSL8\n"); |
1578 | adapter->native->sl_ops = &psl_ops; | 1578 | adapter->native->sl_ops = &psl8_ops; |
1579 | } | 1579 | } |
1580 | } | 1580 | } |
1581 | 1581 | ||