MCPcopy Create free account
hub / github.com/coreboot/coreboot / print_gpios

Function print_gpios

util/inteltool/gpio.c:827–1226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

825}
826
827int print_gpios(struct pci_dev *sb, int show_all, int show_diffs)
828{
829 int i, j, size, defaults_size = 0;
830 const io_register_t *gpio_registers;
831 const gpio_default_t *gpio_defaults = NULL;
832 uint32_t gpio_diff;
833
834 switch (sb->device_id) {
835 case PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_FULL:
836 case PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_PREM:
837 case PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_BASE:
838 case PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_PREM:
839 case PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP:
840 gpiobase = pci_read_word(sb, 0x48) & 0xfffc;
841 gpio_registers = lynxpoint_lp_gpio_registers;
842 size = ARRAY_SIZE(lynxpoint_lp_gpio_registers);
843 break;
844 case PCI_DEVICE_ID_INTEL_C8_MOBILE:
845 case PCI_DEVICE_ID_INTEL_C8_DESKTOP:
846 case PCI_DEVICE_ID_INTEL_Z87:
847 case PCI_DEVICE_ID_INTEL_Z85:
848 case PCI_DEVICE_ID_INTEL_HM86:
849 case PCI_DEVICE_ID_INTEL_H87:
850 case PCI_DEVICE_ID_INTEL_HM87:
851 case PCI_DEVICE_ID_INTEL_Q85:
852 case PCI_DEVICE_ID_INTEL_Q87:
853 case PCI_DEVICE_ID_INTEL_QM87:
854 case PCI_DEVICE_ID_INTEL_B85:
855 case PCI_DEVICE_ID_INTEL_C222:
856 case PCI_DEVICE_ID_INTEL_C224:
857 case PCI_DEVICE_ID_INTEL_C226:
858 case PCI_DEVICE_ID_INTEL_H81:
859 case PCI_DEVICE_ID_INTEL_C9_MOBILE:
860 case PCI_DEVICE_ID_INTEL_C9_DESKTOP:
861 case PCI_DEVICE_ID_INTEL_HM97:
862 case PCI_DEVICE_ID_INTEL_Z97:
863 case PCI_DEVICE_ID_INTEL_H97:
864 case PCI_DEVICE_ID_INTEL_WELLSBURG_SUPER:
865 case PCI_DEVICE_ID_INTEL_WELLSBURG_C612:
866 case PCI_DEVICE_ID_INTEL_WELLSBURG_X99:
867 gpiobase = pci_read_word(sb, 0x48) & 0xfffc;
868 gpio_registers = pch_gpio_registers;
869 size = ARRAY_SIZE(pch_gpio_registers);
870 break;
871 case PCI_DEVICE_ID_INTEL_3400:
872 case PCI_DEVICE_ID_INTEL_3420:
873 case PCI_DEVICE_ID_INTEL_3450:
874 case PCI_DEVICE_ID_INTEL_3400_DESKTOP:
875 case PCI_DEVICE_ID_INTEL_B55_A:
876 case PCI_DEVICE_ID_INTEL_B55_B:
877 case PCI_DEVICE_ID_INTEL_H55:
878 case PCI_DEVICE_ID_INTEL_H57:
879 case PCI_DEVICE_ID_INTEL_P55:
880 case PCI_DEVICE_ID_INTEL_Q57:
881 gpiobase = pci_read_word(sb, 0x48) & 0xff80;
882 gpio_registers = pch_gpio_registers;
883 size = ARRAY_SIZE(pch_gpio_registers);
884 gpio_defaults = ip_pch_desktop_defaults;

Callers 1

inteltool.cFile · 0.70

Calls 8

pci_read_wordFunction · 0.85
print_gpio_groupsFunction · 0.85
printfFunction · 0.85
print_regFunction · 0.85
get_diffFunction · 0.85
print_diffFunction · 0.85
show_baytrail_pad_regFunction · 0.85
snprintfFunction · 0.50

Tested by

no test coverage detected