| 664 | } |
| 665 | |
| 666 | void |
| 667 | soc_id(uint32_t *dev, uint32_t *rev) |
| 668 | { |
| 669 | uint64_t mv_pcie_base = MV_PCIE_BASE; |
| 670 | phandle_t node; |
| 671 | |
| 672 | /* |
| 673 | * Notice: system identifiers are available in the registers range of |
| 674 | * PCIE controller, so using this function is only allowed (and |
| 675 | * possible) after the internal registers range has been mapped in via |
| 676 | * devmap_bootstrap(). |
| 677 | */ |
| 678 | *dev = 0; |
| 679 | *rev = 0; |
| 680 | if ((node = OF_finddevice("/")) == -1) |
| 681 | return; |
| 682 | if (ofw_bus_node_is_compatible(node, "marvell,armada380")) |
| 683 | mv_pcie_base = MV_PCIE_BASE_ARMADA38X; |
| 684 | |
| 685 | *dev = bus_space_read_4(fdtbus_bs_tag, mv_pcie_base, 0) >> 16; |
| 686 | *rev = bus_space_read_4(fdtbus_bs_tag, mv_pcie_base, 8) & 0xff; |
| 687 | } |
| 688 | |
| 689 | static void |
| 690 | soc_identify(uint32_t d, uint32_t r) |
no test coverage detected