null.c (13866B)
1 /* 2 * 3 * 4 * 5 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 6 * 7 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 8 */ 9 10 #include <phymod/phymod.h> 11 #include <phymod/phymod.h> 12 #include <phymod/phymod_dispatch.h> 13 14 #include <phymod/chip/null.h> 15 16 #ifdef PHYMOD_NULL_SUPPORT 17 18 int null_core_identify(const phymod_core_access_t* core, uint32_t core_id, uint32_t* is_identified) 19 { 20 21 *is_identified = 1; 22 23 return PHYMOD_E_NONE; 24 25 } 26 27 28 int null_core_info_get(const phymod_core_access_t* core, phymod_core_info_t* info) 29 { 30 31 /* Place your code here */ 32 return phymod_core_info_t_init(info); 33 } 34 35 36 int null_core_lane_map_set(const phymod_core_access_t* core, const phymod_lane_map_t* lane_map) 37 { 38 39 /* Place your code here */ 40 41 42 return PHYMOD_E_NONE; 43 44 } 45 46 int null_core_lane_map_get(const phymod_core_access_t* core, phymod_lane_map_t* lane_map) 47 { 48 49 /* Place your code here */ 50 return phymod_lane_map_t_init(lane_map); 51 } 52 53 54 int null_core_reset_set(const phymod_core_access_t* core, phymod_reset_mode_t reset_mode, phymod_reset_direction_t direction) 55 { 56 57 /* Place your code here */ 58 59 60 return PHYMOD_E_NONE; 61 62 } 63 64 int null_core_reset_get(const phymod_core_access_t* core, phymod_reset_mode_t reset_mode, phymod_reset_direction_t* direction) 65 { 66 67 /* Place your code here */ 68 *direction = 0; 69 70 return PHYMOD_E_NONE; 71 72 } 73 74 75 int null_core_firmware_info_get(const phymod_core_access_t* core, phymod_core_firmware_info_t* fw_info) 76 { 77 78 /* Place your code here */ 79 return phymod_core_firmware_info_t_init(fw_info); 80 } 81 82 83 int null_phy_firmware_core_config_set(const phymod_phy_access_t* phy, phymod_firmware_core_config_t fw_core_config) 84 { 85 86 /* Place your code here */ 87 88 89 return PHYMOD_E_NONE; 90 91 } 92 93 int null_phy_firmware_core_config_get(const phymod_phy_access_t* phy, phymod_firmware_core_config_t* fw_core_config) 94 { 95 96 /* Place your code here */ 97 return phymod_firmware_core_config_t_init(fw_core_config); 98 } 99 100 101 int null_phy_firmware_lane_config_set(const phymod_phy_access_t* phy, phymod_firmware_lane_config_t fw_lane_config) 102 { 103 104 /* Place your code here */ 105 106 107 return PHYMOD_E_NONE; 108 109 } 110 111 int null_phy_firmware_lane_config_get(const phymod_phy_access_t* phy, phymod_firmware_lane_config_t* fw_lane_config) 112 { 113 114 /* Place your code here */ 115 return phymod_firmware_lane_config_t_init(fw_lane_config); 116 117 } 118 119 120 int null_core_pll_sequencer_restart(const phymod_core_access_t* core, uint32_t flags, phymod_sequencer_operation_t operation) 121 { 122 123 /* Place your code here */ 124 125 126 return PHYMOD_E_NONE; 127 128 } 129 130 131 int null_core_wait_event(const phymod_core_access_t* core, phymod_core_event_t event, uint32_t timeout) 132 { 133 134 /* Place your code here */ 135 136 137 return PHYMOD_E_NONE; 138 139 } 140 141 142 int null_phy_rx_restart(const phymod_phy_access_t* phy) 143 { 144 145 /* Place your code here */ 146 147 148 return PHYMOD_E_NONE; 149 150 } 151 152 153 int null_phy_polarity_set(const phymod_phy_access_t* phy, const phymod_polarity_t* polarity) 154 { 155 156 /* Place your code here */ 157 158 159 return PHYMOD_E_NONE; 160 161 } 162 163 int null_phy_polarity_get(const phymod_phy_access_t* phy, phymod_polarity_t* polarity) 164 { 165 166 /* Place your code here */ 167 return phymod_polarity_t_init(polarity); 168 169 } 170 171 172 int null_phy_tx_set(const phymod_phy_access_t* phy, const phymod_tx_t* tx) 173 { 174 175 /* Place your code here */ 176 177 178 return PHYMOD_E_NONE; 179 180 } 181 182 int null_phy_tx_get(const phymod_phy_access_t* phy, phymod_tx_t* tx) 183 { 184 185 /* Place your code here */ 186 return phymod_tx_t_init(tx); 187 188 } 189 190 191 int null_phy_media_type_tx_get(const phymod_phy_access_t* phy, phymod_media_typed_t media, phymod_tx_t* tx) 192 { 193 194 /* Place your code here */ 195 return phymod_tx_t_init(tx); 196 197 } 198 199 200 int null_phy_tx_override_set(const phymod_phy_access_t* phy, const phymod_tx_override_t* tx_override) 201 { 202 203 /* Place your code here */ 204 205 206 return PHYMOD_E_NONE; 207 208 } 209 210 int null_phy_tx_override_get(const phymod_phy_access_t* phy, phymod_tx_override_t* tx_override) 211 { 212 213 /* Place your code here */ 214 return phymod_tx_override_t_init(tx_override); 215 216 } 217 218 219 int null_phy_rx_set(const phymod_phy_access_t* phy, const phymod_rx_t* rx) 220 { 221 222 /* Place your code here */ 223 224 225 return PHYMOD_E_NONE; 226 227 } 228 229 int null_phy_rx_get(const phymod_phy_access_t* phy, phymod_rx_t* rx) 230 { 231 232 /* Place your code here */ 233 return phymod_rx_t_init(rx); 234 235 } 236 237 238 int null_phy_rx_adaptation_resume(const phymod_phy_access_t* phy) 239 { 240 241 /* Place your code here */ 242 243 244 return PHYMOD_E_NONE; 245 246 } 247 248 249 int null_phy_reset_set(const phymod_phy_access_t* phy, const phymod_phy_reset_t* reset) 250 { 251 252 /* Place your code here */ 253 254 255 return PHYMOD_E_NONE; 256 257 } 258 259 int null_phy_reset_get(const phymod_phy_access_t* phy, phymod_phy_reset_t* reset) 260 { 261 262 /* Place your code here */ 263 return phymod_phy_reset_t_init(reset); 264 265 } 266 267 268 int null_phy_power_set(const phymod_phy_access_t* phy, const phymod_phy_power_t* power) 269 { 270 271 /* Place your code here */ 272 273 274 return PHYMOD_E_NONE; 275 276 } 277 278 int null_phy_power_get(const phymod_phy_access_t* phy, phymod_phy_power_t* power) 279 { 280 281 /* Place your code here */ 282 return phymod_phy_power_t_init(power); 283 284 } 285 286 287 int null_phy_hg2_codec_control_set(const phymod_phy_access_t* phy, phymod_phy_hg2_codec_t hg2_codec) 288 { 289 290 /* Place your code here */ 291 292 293 return PHYMOD_E_NONE; 294 295 } 296 297 int null_phy_hg2_codec_control_get(const phymod_phy_access_t* phy, phymod_phy_hg2_codec_t* hg2_codec) 298 { 299 300 /* Place your code here */ 301 *hg2_codec = 0; 302 303 304 return PHYMOD_E_NONE; 305 306 } 307 308 309 int null_phy_tx_lane_control_set(const phymod_phy_access_t* phy, phymod_phy_tx_lane_control_t tx_control) 310 { 311 312 /* Place your code here */ 313 314 315 return PHYMOD_E_NONE; 316 317 } 318 319 int null_phy_tx_lane_control_get(const phymod_phy_access_t* phy, phymod_phy_tx_lane_control_t* tx_control) 320 { 321 322 /* Place your code here */ 323 *tx_control = 0; 324 325 326 return PHYMOD_E_NONE; 327 328 } 329 330 331 int null_phy_rx_lane_control_set(const phymod_phy_access_t* phy, phymod_phy_rx_lane_control_t rx_control) 332 { 333 334 /* Place your code here */ 335 336 337 return PHYMOD_E_NONE; 338 339 } 340 341 int null_phy_rx_lane_control_get(const phymod_phy_access_t* phy, phymod_phy_rx_lane_control_t* rx_control) 342 { 343 344 /* Place your code here */ 345 *rx_control = 0; 346 347 348 return PHYMOD_E_NONE; 349 350 } 351 352 353 int null_phy_fec_enable_set(const phymod_phy_access_t* phy, uint32_t enable) 354 { 355 356 /* Place your code here */ 357 358 359 return PHYMOD_E_NONE; 360 361 } 362 363 int null_phy_fec_enable_get(const phymod_phy_access_t* phy, uint32_t* enable) 364 { 365 366 /* Place your code here */ 367 *enable = 0; 368 369 370 return PHYMOD_E_NONE; 371 372 } 373 374 375 int null_phy_autoneg_oui_set(const phymod_phy_access_t* phy, phymod_autoneg_oui_t an_oui) 376 { 377 378 /* Place your code here */ 379 380 381 return PHYMOD_E_NONE; 382 383 } 384 385 int null_phy_autoneg_oui_get(const phymod_phy_access_t* phy, phymod_autoneg_oui_t* an_oui) 386 { 387 388 /* Place your code here */ 389 return phymod_autoneg_oui_t_init(an_oui); 390 391 } 392 393 394 int null_phy_eee_set(const phymod_phy_access_t* phy, uint32_t enable) 395 { 396 397 /* Place your code here */ 398 399 400 return PHYMOD_E_NONE; 401 402 } 403 404 int null_phy_eee_get(const phymod_phy_access_t* phy, uint32_t* enable) 405 { 406 407 /* Place your code here */ 408 *enable = 0; 409 410 411 return PHYMOD_E_NONE; 412 413 } 414 415 416 int null_phy_interface_config_set(const phymod_phy_access_t* phy, uint32_t flags, const phymod_phy_inf_config_t* config) 417 { 418 419 /* Place your code here */ 420 421 422 return PHYMOD_E_NONE; 423 424 } 425 426 int null_phy_interface_config_get(const phymod_phy_access_t* phy, uint32_t flags, phymod_ref_clk_t ref_clock, phymod_phy_inf_config_t* config) 427 { 428 429 /* Place your code here */ 430 return phymod_phy_inf_config_t_init(config); 431 432 } 433 434 435 int null_phy_cl72_set(const phymod_phy_access_t* phy, uint32_t cl72_en) 436 { 437 438 /* Place your code here */ 439 440 441 return PHYMOD_E_NONE; 442 443 } 444 445 int null_phy_cl72_get(const phymod_phy_access_t* phy, uint32_t* cl72_en) 446 { 447 448 /* Place your code here */ 449 *cl72_en = 0; 450 451 452 return PHYMOD_E_NONE; 453 454 } 455 456 457 int null_phy_cl72_status_get(const phymod_phy_access_t* phy, phymod_cl72_status_t* status) 458 { 459 460 /* Place your code here */ 461 return phymod_cl72_status_t_init(status); 462 463 } 464 465 466 int null_phy_autoneg_ability_set(const phymod_phy_access_t* phy, const phymod_autoneg_ability_t* an_ability_set_type) 467 { 468 469 /* Place your code here */ 470 471 472 return PHYMOD_E_NONE; 473 474 } 475 476 int null_phy_autoneg_ability_get(const phymod_phy_access_t* phy, phymod_autoneg_ability_t* an_ability_get_type) 477 { 478 479 /* Place your code here */ 480 return phymod_autoneg_ability_t_init(an_ability_get_type); 481 482 } 483 484 485 int null_phy_autoneg_remote_ability_get(const phymod_phy_access_t* phy, phymod_autoneg_ability_t* an_ability_get_type) 486 { 487 488 /* Place your code here */ 489 return phymod_autoneg_ability_t_init(an_ability_get_type); 490 491 } 492 493 494 int null_phy_autoneg_set(const phymod_phy_access_t* phy, const phymod_autoneg_control_t* an) 495 { 496 497 /* Place your code here */ 498 499 500 return PHYMOD_E_NONE; 501 502 } 503 504 int null_phy_autoneg_get(const phymod_phy_access_t* phy, phymod_autoneg_control_t* an, uint32_t* an_done) 505 { 506 507 /* Place your code here */ 508 *an_done = 1; 509 return phymod_autoneg_control_t_init(an); 510 } 511 512 513 int null_phy_autoneg_status_get(const phymod_phy_access_t* phy, phymod_autoneg_status_t* status) 514 { 515 516 /* Place your code here */ 517 return phymod_autoneg_status_t_init(status); 518 519 } 520 521 522 int null_core_init(const phymod_core_access_t* core, const phymod_core_init_config_t* init_config, const phymod_core_status_t* core_status) 523 { 524 525 /* Place your code here */ 526 527 528 return PHYMOD_E_NONE; 529 530 } 531 532 533 int null_phy_pll_multiplier_get(const phymod_phy_access_t* phy, uint32_t* core_vco_pll_multiplier) 534 { 535 536 /* Place your code here */ 537 *core_vco_pll_multiplier = 0; 538 539 540 return PHYMOD_E_NONE; 541 542 } 543 544 545 int null_phy_init(const phymod_phy_access_t* phy, const phymod_phy_init_config_t* init_config) 546 { 547 548 /* Place your code here */ 549 550 551 return PHYMOD_E_NONE; 552 553 } 554 555 556 int null_phy_loopback_set(const phymod_phy_access_t* phy, phymod_loopback_mode_t loopback, uint32_t enable) 557 { 558 559 /* Place your code here */ 560 561 562 return PHYMOD_E_NONE; 563 564 } 565 566 int null_phy_loopback_get(const phymod_phy_access_t* phy, phymod_loopback_mode_t loopback, uint32_t* enable) 567 { 568 569 /* Place your code here */ 570 *enable = 0; 571 572 573 return PHYMOD_E_NONE; 574 575 } 576 577 578 int null_phy_rx_pmd_locked_get(const phymod_phy_access_t* phy, uint32_t* rx_pmd_locked) 579 { 580 581 /* Place your code here */ 582 *rx_pmd_locked = 1; 583 584 585 return PHYMOD_E_NONE; 586 587 } 588 589 590 int null_phy_rx_signal_detect_get(const phymod_phy_access_t* phy, uint32_t* rx_signal_detect) 591 { 592 593 /* Place your code here */ 594 *rx_signal_detect = 1; 595 596 return PHYMOD_E_NONE; 597 598 } 599 600 601 int null_phy_link_status_get(const phymod_phy_access_t* phy, uint32_t* link_status) 602 { 603 604 /* Place your code here */ 605 *link_status = 1; 606 607 608 return PHYMOD_E_NONE; 609 610 } 611 612 613 int null_phy_pcs_userspeed_set(const phymod_phy_access_t* phy, const phymod_pcs_userspeed_config_t* config) 614 { 615 616 /* Place your code here */ 617 618 619 return PHYMOD_E_NONE; 620 621 } 622 623 int null_phy_pcs_userspeed_get(const phymod_phy_access_t* phy, phymod_pcs_userspeed_config_t* config) 624 { 625 626 /* Place your code here */ 627 return phymod_pcs_userspeed_config_t_init(config); 628 629 } 630 631 632 int null_phy_reg_read(const phymod_phy_access_t* phy, uint32_t reg_addr, uint32_t* val) 633 { 634 635 /* Place your code here */ 636 637 638 return PHYMOD_E_NONE; 639 640 } 641 642 643 int null_phy_reg_write(const phymod_phy_access_t* phy, uint32_t reg_addr, uint32_t val) 644 { 645 646 /* Place your code here */ 647 648 649 return PHYMOD_E_NONE; 650 651 } 652 653 654 int null_phy_eye_margin_est_get(const phymod_phy_access_t* phy, phymod_eye_margin_mode_t eye_margin_mode, uint32_t* value) 655 { 656 657 /* Place your code here */ 658 *value = 0; 659 660 661 return PHYMOD_E_NONE; 662 663 } 664 665 666 int null_phy_sw_autoneg_enable(const phymod_phy_access_t* phy, int enable) 667 { 668 669 /* Place your code here */ 670 671 672 return PHYMOD_E_NONE; 673 674 } 675 676 int null_phy_speed_config_set(const phymod_phy_access_t* phy, 677 const phymod_phy_speed_config_t* speed_config, 678 const phymod_phy_pll_state_t* old_pll_state, 679 phymod_phy_pll_state_t* new_pll_state) 680 { 681 /* Place your code here */ 682 683 684 return PHYMOD_E_NONE; 685 686 } 687 688 int null_phy_speed_config_get(const phymod_phy_access_t* phy, phymod_phy_speed_config_t* speed_config) 689 { 690 /* Place your code here */ 691 692 693 return PHYMOD_E_NONE; 694 695 } 696 697 int null_phy_tx_taps_default_get(const phymod_phy_access_t* phy, phymod_phy_signalling_method_t mode, phymod_tx_t* tx) 698 { 699 /* Place your code here */ 700 701 702 return PHYMOD_E_NONE; 703 704 } 705 706 int null_phy_lane_config_default_get(const phymod_phy_access_t* phy, phymod_phy_signalling_method_t mode, phymod_firmware_lane_config_t* lane_config) 707 { 708 /* Place your code here */ 709 710 711 return PHYMOD_E_NONE; 712 713 } 714 715 int null_phy_firmware_load_info_get(const phymod_phy_access_t* phy, phymod_firmware_load_info_t* info) 716 { 717 /* Place your code here */ 718 719 720 return PHYMOD_E_NONE; 721 722 } 723 724 int null_phy_autoneg_advert_ability_set(const phymod_phy_access_t* phy, 725 const phymod_autoneg_advert_abilities_t* an_advert_abilities, 726 const phymod_phy_pll_state_t* old_pll_adv_state, 727 phymod_phy_pll_state_t* new_pll_adv_state) 728 { 729 /* Place your code here */ 730 731 732 return PHYMOD_E_NONE; 733 734 } 735 736 int null_phy_autoneg_advert_ability_get(const phymod_phy_access_t* phy, 737 phymod_autoneg_advert_abilities_t* an_advert_abilities) 738 { 739 /* Place your code here */ 740 741 742 return PHYMOD_E_NONE; 743 744 } 745 746 int null_phy_autoneg_remote_advert_ability_get(const phymod_phy_access_t* phy, 747 phymod_autoneg_advert_abilities_t* an_advert_abilities) 748 { 749 /* Place your code here */ 750 751 752 return PHYMOD_E_NONE; 753 754 } 755 756 int null_phy_plls_reconfig(const phymod_phy_access_t* phy, uint32_t num_plls, const uint32_t* plls) 757 { 758 /* Place your code here */ 759 760 761 return PHYMOD_E_NONE; 762 763 } 764 765 #endif /* PHYMOD_NULL_SUPPORT */