@@ -433,12 +433,18 @@ static int amd_sdw_port_params(struct sdw_bus *bus, struct sdw_port_params *p_pa
433
433
u32 frame_fmt_reg , dpn_frame_fmt ;
434
434
435
435
dev_dbg (amd_manager -> dev , "p_params->num:0x%x\n" , p_params -> num );
436
- switch (amd_manager -> instance ) {
437
- case ACP_SDW0 :
438
- frame_fmt_reg = sdw0_manager_dp_reg [p_params -> num ].frame_fmt_reg ;
439
- break ;
440
- case ACP_SDW1 :
441
- frame_fmt_reg = sdw1_manager_dp_reg [p_params -> num ].frame_fmt_reg ;
436
+ switch (amd_manager -> acp_rev ) {
437
+ case ACP63_PCI_REV_ID :
438
+ switch (amd_manager -> instance ) {
439
+ case ACP_SDW0 :
440
+ frame_fmt_reg = acp63_sdw0_dp_reg [p_params -> num ].frame_fmt_reg ;
441
+ break ;
442
+ case ACP_SDW1 :
443
+ frame_fmt_reg = acp63_sdw1_dp_reg [p_params -> num ].frame_fmt_reg ;
444
+ break ;
445
+ default :
446
+ return - EINVAL ;
447
+ }
442
448
break ;
443
449
default :
444
450
return - EINVAL ;
@@ -465,20 +471,28 @@ static int amd_sdw_transport_params(struct sdw_bus *bus,
465
471
u32 frame_fmt_reg , sample_int_reg , hctrl_dp0_reg ;
466
472
u32 offset_reg , lane_ctrl_ch_en_reg ;
467
473
468
- switch (amd_manager -> instance ) {
469
- case ACP_SDW0 :
470
- frame_fmt_reg = sdw0_manager_dp_reg [params -> port_num ].frame_fmt_reg ;
471
- sample_int_reg = sdw0_manager_dp_reg [params -> port_num ].sample_int_reg ;
472
- hctrl_dp0_reg = sdw0_manager_dp_reg [params -> port_num ].hctrl_dp0_reg ;
473
- offset_reg = sdw0_manager_dp_reg [params -> port_num ].offset_reg ;
474
- lane_ctrl_ch_en_reg = sdw0_manager_dp_reg [params -> port_num ].lane_ctrl_ch_en_reg ;
475
- break ;
476
- case ACP_SDW1 :
477
- frame_fmt_reg = sdw1_manager_dp_reg [params -> port_num ].frame_fmt_reg ;
478
- sample_int_reg = sdw1_manager_dp_reg [params -> port_num ].sample_int_reg ;
479
- hctrl_dp0_reg = sdw1_manager_dp_reg [params -> port_num ].hctrl_dp0_reg ;
480
- offset_reg = sdw1_manager_dp_reg [params -> port_num ].offset_reg ;
481
- lane_ctrl_ch_en_reg = sdw1_manager_dp_reg [params -> port_num ].lane_ctrl_ch_en_reg ;
474
+ switch (amd_manager -> acp_rev ) {
475
+ case ACP63_PCI_REV_ID :
476
+ switch (amd_manager -> instance ) {
477
+ case ACP_SDW0 :
478
+ frame_fmt_reg = acp63_sdw0_dp_reg [params -> port_num ].frame_fmt_reg ;
479
+ sample_int_reg = acp63_sdw0_dp_reg [params -> port_num ].sample_int_reg ;
480
+ hctrl_dp0_reg = acp63_sdw0_dp_reg [params -> port_num ].hctrl_dp0_reg ;
481
+ offset_reg = acp63_sdw0_dp_reg [params -> port_num ].offset_reg ;
482
+ lane_ctrl_ch_en_reg =
483
+ acp63_sdw0_dp_reg [params -> port_num ].lane_ctrl_ch_en_reg ;
484
+ break ;
485
+ case ACP_SDW1 :
486
+ frame_fmt_reg = acp63_sdw1_dp_reg [params -> port_num ].frame_fmt_reg ;
487
+ sample_int_reg = acp63_sdw1_dp_reg [params -> port_num ].sample_int_reg ;
488
+ hctrl_dp0_reg = acp63_sdw1_dp_reg [params -> port_num ].hctrl_dp0_reg ;
489
+ offset_reg = acp63_sdw1_dp_reg [params -> port_num ].offset_reg ;
490
+ lane_ctrl_ch_en_reg =
491
+ acp63_sdw1_dp_reg [params -> port_num ].lane_ctrl_ch_en_reg ;
492
+ break ;
493
+ default :
494
+ return - EINVAL ;
495
+ }
482
496
break ;
483
497
default :
484
498
return - EINVAL ;
@@ -520,12 +534,20 @@ static int amd_sdw_port_enable(struct sdw_bus *bus,
520
534
u32 dpn_ch_enable ;
521
535
u32 lane_ctrl_ch_en_reg ;
522
536
523
- switch (amd_manager -> instance ) {
524
- case ACP_SDW0 :
525
- lane_ctrl_ch_en_reg = sdw0_manager_dp_reg [enable_ch -> port_num ].lane_ctrl_ch_en_reg ;
526
- break ;
527
- case ACP_SDW1 :
528
- lane_ctrl_ch_en_reg = sdw1_manager_dp_reg [enable_ch -> port_num ].lane_ctrl_ch_en_reg ;
537
+ switch (amd_manager -> acp_rev ) {
538
+ case ACP63_PCI_REV_ID :
539
+ switch (amd_manager -> instance ) {
540
+ case ACP_SDW0 :
541
+ lane_ctrl_ch_en_reg =
542
+ acp63_sdw0_dp_reg [enable_ch -> port_num ].lane_ctrl_ch_en_reg ;
543
+ break ;
544
+ case ACP_SDW1 :
545
+ lane_ctrl_ch_en_reg =
546
+ acp63_sdw1_dp_reg [enable_ch -> port_num ].lane_ctrl_ch_en_reg ;
547
+ break ;
548
+ default :
549
+ return - EINVAL ;
550
+ }
529
551
break ;
530
552
default :
531
553
return - EINVAL ;
@@ -927,15 +949,21 @@ static int amd_sdw_manager_probe(struct platform_device *pdev)
927
949
* information.
928
950
*/
929
951
amd_manager -> bus .controller_id = 0 ;
930
-
931
- switch (amd_manager -> instance ) {
932
- case ACP_SDW0 :
933
- amd_manager -> num_dout_ports = AMD_SDW0_MAX_TX_PORTS ;
934
- amd_manager -> num_din_ports = AMD_SDW0_MAX_RX_PORTS ;
935
- break ;
936
- case ACP_SDW1 :
937
- amd_manager -> num_dout_ports = AMD_SDW1_MAX_TX_PORTS ;
938
- amd_manager -> num_din_ports = AMD_SDW1_MAX_RX_PORTS ;
952
+ dev_dbg (dev , "acp_rev:0x%x\n" , amd_manager -> acp_rev );
953
+ switch (amd_manager -> acp_rev ) {
954
+ case ACP63_PCI_REV_ID :
955
+ switch (amd_manager -> instance ) {
956
+ case ACP_SDW0 :
957
+ amd_manager -> num_dout_ports = AMD_ACP63_SDW0_MAX_TX_PORTS ;
958
+ amd_manager -> num_din_ports = AMD_ACP63_SDW0_MAX_RX_PORTS ;
959
+ break ;
960
+ case ACP_SDW1 :
961
+ amd_manager -> num_dout_ports = AMD_ACP63_SDW1_MAX_TX_PORTS ;
962
+ amd_manager -> num_din_ports = AMD_ACP63_SDW1_MAX_RX_PORTS ;
963
+ break ;
964
+ default :
965
+ return - EINVAL ;
966
+ }
939
967
break ;
940
968
default :
941
969
return - EINVAL ;
0 commit comments