Message ID | af18fb51-a0bc-68e2-7594-5583e3090f98@xenosoft.de (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
I mean: I haven't gotten an answer from Darren yet. Sorry because of my English. I am still learning. -- Christian On 22 December 2017 at 10:57AM, Christian Zigotzky wrote: > Hi Bjorn, > > Sorry I'm bothering you again. Is this small out of tree init routine in the Nemo patch? I haven't get an answer from Darren yet and I didn't found the small out of tree init routine in the Nemo patch. Please find attached the Nemo patch. Maybe you can find this small out of tree init routine. > > What do you think of this following code? > > if (sb600_bus == -1) > + { > + busp = pci_find_bus(0, 0); > + pa_pxp_read_config(busp, PCI_DEVFN(17,0), PCI_SECONDARY_BUS, 1, &val); > + > + sb600_bus = val; > + > + printk(KERN_CRIT "NEMO SB600 on bus %d.\n",sb600_bus); > + } > > Thanks, > Christian > > > On 04 December 2017 at 12:40PM, Darren Stevens wrote: > > Hello Bjorn > > > > Firstly sorry for not being able to join in this discussion, I have been > > moving house and only got my X1000 set up again yesterday.. > > > > On 30/11/2017, Bjorn Helgaas wrote: > >> I *think* something like the patch below should make this work if you > >> use the "pci=pcie_scan_all" parameter. We have some x86 DMI quirks > >> that set PCI_SCAN_ALL_PCIE_DEVS automatically. I don't know how to do > >> something similar on powerpc, but maybe you do? > > > > Actually the root ports on the Nemo's PA6T processor don't respond to the > > SB600 unless we turn on a special 'relax pci-e' bit in one of its control > > registers. We use a small out of tree init routine to do this, and there > > would be the ideal place to put a call to > > pci_set_flag(PCI_SCAN_ALL_PCIE_DEVS). > > > > This patch fixes the last major hurdle to getting the X1000 fully supported in > > the linux kernel, so thanks very much for that. > > > > Regards > > Darren > > > > >
Christian Zigotzky <chzigotzky@xenosoft.de> writes: > Hi Bjorn, > > Sorry I'm bothering you again. Is this small out of tree init routine in > the Nemo patch? I haven't get an answer from Darren yet and I didn't > found the small out of tree init routine in the Nemo patch. Please find > attached the Nemo patch. Maybe you can find this small out of tree init > routine. > > What do you think of this following code? > > if (sb600_bus == -1) > + { > + busp = pci_find_bus(0, 0); > + pa_pxp_read_config(busp, PCI_DEVFN(17,0), > PCI_SECONDARY_BUS, 1, &val); > + > + sb600_bus = val; > + > + printk(KERN_CRIT "NEMO SB600 on bus %d.\n",sb600_bus); > + } I suspect Darren was referring to all of sb600_set_flag(). What we'd really like is to be able to do something like: void __init pas_pci_init(void) { ... if (of_find_compatible_node(NULL, NULL, "nemo-something")) pci_set_flag(PCI_SCAN_ALL_PCIE_DEVS). But I don't know if there's anything in the NEMO device tree that we can use to uniquely identify those machines? ie. the "nemo-something" string. Can you attach the output of `lsprop /proc/device-tree` ? cheers
Hi Michael, Thanks a lot for your reply! :-) I have found two interesting lines in the device tree: compatible "pasemi,nemo" model "pasemi,nemo" What do you think? Please find attached the output of `lsprop /proc/device-tree`. Thanks, Christian On 22.12.2017 12:19, Michael Ellerman wrote: > > I suspect Darren was referring to all of sb600_set_flag(). > > What we'd really like is to be able to do something like: > > void __init pas_pci_init(void) > { > ... > > if (of_find_compatible_node(NULL, NULL, "nemo-something")) > pci_set_flag(PCI_SCAN_ALL_PCIE_DEVS). > > > But I don't know if there's anything in the NEMO device tree that we can > use to uniquely identify those machines? ie. the "nemo-something" string. > > Can you attach the output of `lsprop /proc/device-tree` ? > > cheers > compatible "pasemi,nemo" "pasemi,pa6t-1682m" "PA6T-1682M" "pasemi,pwrficient" "pasemi" device_type "bootrom" model "pasemi,nemo" #interrupt-cells 00000002 #address-cells 00000002 #size-cells 00000002 linux,phandle 7fdff018 (2145382424) platform-open-pic 00000000 fc000000 00000000 00041000 name "" /proc/device-tree/sdc@fc000000: compatible "1682m-sdc" "pasemi,pwrficient-sdc" "pasemi,sdc" device_type "sdc" #address-cells 00000001 #size-cells 00000001 reg 00000000 fc000000 00000000 00800000 linux,phandle 7fe2f458 (2145580120) name "sdc" /proc/device-tree/sdc@fc000000/rng@fc105000: compatible "1682m-rng" "pasemi,pwrficient-rng" "pasemi,rng" device_type "rng" reg fc105000 00001000 linux,phandle 7fe2fdd0 (2145582544) name "rng" /proc/device-tree/sdc@fc000000/mdio@0: compatible "gpio-mdio" mdc-pin 00000005 #address-cells 00000001 #size-cells 00000000 reg 00000000 00000000 linux,phandle 7fe3d5a0 (2145637792) mdio-pin 00000006 name "mdio" /proc/device-tree/sdc@fc000000/mdio@0/ethernet-phy@0: interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000007 00000001 reg 00000000 linux,phandle 7fe3d860 (2145638496) name "ethernet-phy" /proc/device-tree/sdc@fc000000/openpic@fc000000: compatible "pasemi,pwrficient-openpic" "chrp,open-pic" device_type "open-pic" msi-available-ranges 00000200 00000200 #interrupt-cells 00000002 #address-cells 00000000 reg fc000000 00100000 linux,phandle 7fe2f6e8 (2145580776) name "openpic" interrupt-controller /proc/device-tree/sdc@fc000000/gizmo@fc104000: compatible "1682m-gizmo" "pasemi,pwrficient-gizmo" "pasemi,gizmo" device_type "gizmo" reg fc104000 00001000 linux,phandle 7fe2fbf0 (2145582064) name "gizmo" /proc/device-tree/sdc@fc000000/gpio@fc103000: compatible "1682m-gpio" "pasemi,pwrficient-gpio" "pasemi,gpio" device_type "gpio" reg fc103000 00001000 linux,phandle 7fe2fa18 (2145581592) name "gpio" /proc/device-tree/options: MENU_2_LABEL "Debian Sid/experimental Kernel 4.9" MENU_4_COMMAND "set pmu -astate=A4 ; ramdisk -z -addr=0x24000000 -fatfs cf0:slitaz25.gz ; boot -elf -noints -fatfs cf0:vmlinux-3.13.14" ETH0_HWADDR "00:50:C2:20:DA:9E" CFE_MEMORYSIZE "8192" MENU_5_LABEL "Fedora 17 Kernel 3.13.9" MENU_8_LABEL "ubuntu MATE 16.04.2 LTS Kernel 4.9" MENU_1_COMMAND "setenv amigaboot_quiet Y ;boot -fs=iso atapi0.1:amigaboot.of" MENU_8_COMMAND "set pmu -astate=A4 ; setenv bootargs "root=/dev/sdb1 quiet ro splash" ; boot -elf -noints -fatfs cf0:vmlinux-4.9" bootargs "root=/dev/sda4" STARTUP "speed;menu" MENU_DEFAULT "0" MENU_0_LABEL "AmigaOS" MENU_5_COMMAND 73657420 706d7520 2d617374 6174653d 4134203b 20736574 656e7620 626f6f74 61726773 20227264 2e6d643d 30207264 2e6c766d 3d302072 642e646d 3d302053 5953464f 4e543d54 72756520 4b455954 41424c45 3d646520 72642e6c 756b733d 3020726f 6f743d2f 6465762f 73646233 204c414e 473d6465 5f44452e 5554462d [191 bytes total] MENU_3_LABEL "ubuntu MATE 17.04 Kernel 4.9" MENU_6_LABEL "Fedora 25 PPC64 Kernel 4.9" MENU_2_COMMAND "set pmu -astate=A4 ; setenv bootargs "root=/dev/sda4" ; boot -elf -noints -fatfs cf0:vmlinux-4.9" MENU_9_LABEL "openSUSE Tumbleweed Kernel 4.14" speed "set pmu -astate=A4" MENU_9_COMMAND "set pmu -astate=A4 ; setenv bootargs "root=/dev/sdb6 splash=silent" ; boot -elf -noints -fatfs cf0:vmlinux-4.14" BOOT_CONSOLE "pcconsole0" CFE_VERSION "PAS-2.0.30" little-endian? 00000000 MENU_6_COMMAND "set pmu -astate=A4 ; setenv bootargs "root=/dev/sdb4" ; boot -elf -noints -fatfs cf0:vmlinux-4.9" CFE_BOARDNAME "NEMO" MENU_1_LABEL "AmigaOS CD Boot" MENU_4_LABEL "SliTaz Snapshot 25 Kernel 3.13.14" MENU_3_COMMAND "set pmu -astate=A4 ; setenv bootargs "root=/dev/sdb7 quiet ro splash" ; boot -elf -noints -fatfs cf0:vmlinux-4.9" MENU_7_LABEL "openSUSE 11.1 Kernel 4.13" os4_commandline "DEBUGLEVEL=0 SERIAL" MENU_0_COMMAND "setenv amigaboot_quiet Y ;boot -fs=amigafs ide0.0:amigaboot.of" linux,phandle 7fe2f1f0 (2145579504) MENU_TIMEOUT "6" MENU_7_COMMAND "set pmu -astate=A4 ; setenv bootargs "root=/dev/sdb5" ; boot -elf -noints -fatfs cf0:vmlinux-4.13" framebuffer "800/600/8/0x90000000/832" name "options" /proc/device-tree/chosen: linux,stdout-package 7fe35880 (2145605760) bootargs "root=/dev/sda4" cpu 7fe30698 (2145584792) stdout 7fe35990 (2145606032) memory 7fe316c8 (2145588936) stdin 7fe35990 (2145606032) linux,stdout-path "/bootconsole" sdc-interrupt-controller 7fe2f6e8 (2145580776) linux,phandle 7fe34628 (2145601064) name "chosen" /proc/device-tree/openprom: device_type "BootROM" model "Open Firmware 3" linux,phandle 7fe2f2f0 (2145579760) name "openprom" /proc/device-tree/localbus@f0000000: compatible "pasemi,localbus" "localbus" device_type "localbus" ranges 00000000 00000000 f0000000 0c000000 #interrupt-cells 00000002 #address-cells 00000001 #size-cells 00000001 reg 00000000 f0000000 00000000 0c000000 linux,phandle 7fe342e0 (2145600224) name "localbus" /proc/device-tree/localbus@f0000000/cf@1000000: compatible "pasemi,chitra-cf" "pasemi,electra-cf" "electra-cf" card-3v-gpio 0000000a (10) device_type "electra-cf" card-vsense-gpio 00000001 interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000000 00000001 reg 00000000 00001000 01000000 00001000 card-detect-gpio 0000000e (14) linux,phandle 7fe3da70 (2145639024) card-5v-gpio 0000000b (11) name "cf" /proc/device-tree/memory: device_type "memory" available 00000000 00000000 00000000 7fd1d000 00000001 00000000 00000001 80000000 reg 00000000 00000000 00000000 80000000 00000001 00000000 00000001 80000000 linux,phandle 7fe316c8 (2145588936) name "memory" /proc/device-tree/pxp@0,e0000000: compatible "pasemi,rootbus" "pa-pxp" device_type "pci" interrupt-map-mask 00000000 00000000 00000000 000000ff model "pa" ranges 00000000 00000000 e0000000 00000000 e0000000 00000000 10000000 01000000 00000000 00000000 00000000 fc800000 00000000 00800000 02000000 00000000 80000000 00000000 80000000 00000000 60000000 02000000 00000000 e0000000 00000000 e0000000 00000000 00100000 02000000 00000000 fd800000 00000000 [168 bytes total] #interrupt-cells 00000001 bus-range 00000000 000000ff #address-cells 00000003 interrupt-map 00000000 00000000 00000000 00000030 7fe2f6e8 00000030 00000001 00000000 00000000 00000000 00000031 7fe2f6e8 00000031 00000001 00000000 00000000 00000000 00000032 7fe2f6e8 00000032 00000001 00000000 00000000 00000000 00000033 7fe2f6e8 00000033 00000001 #size-cells 00000002 reg 00000000 e0000000 00000000 10000000 linux,phandle 7fe2ffa8 (2145583016) name "pxp" interrupt-controller /proc/device-tree/pxp@0,e0000000/i2c@1c,2: assigned-addresses 8100e210 00000000 007f0280 00000000 00000040 device_type "i2c" revision-id 00000001 class-code 000c0500 (787712) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000048 00000001 device-id 0000a003 (40963) reg 0000e200 00000000 00000000 00000000 00000000 0100e210 00000000 00000000 00000000 00000040 linux,phandle 7fe33c80 (2145598592) name "i2c" /proc/device-tree/pxp@0,e0000000/pci@8: device_type "pci" revision-id 00000012 (18) class-code 000b2000 (729088) vendor-id 00001959 (6489) device-id 0000a000 (40960) reg 00004000 00000000 00000000 00000000 00000000 linux,phandle 7fe383f8 (2145616888) name "pci" /proc/device-tree/pxp@0,e0000000/serial@1d,1: current-speed 0001c200 (115200) compatible "ns16550" "pciclass,0700" assigned-addresses 8100e910 00000000 007f02f8 00000000 00000008 device_type "serial" revision-id 00000002 class-code 00070003 (458755) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 0000004a 00000001 device-id 0000a004 (40964) reg 0000e900 00000000 00000000 00000000 00000000 0100e910 00000000 00000000 00000000 00000008 clock-frequency 07f28155 (133333333) linux,phandle 7fe31db0 (2145590704) name "serial" /proc/device-tree/pxp@0,e0000000/pci@1b: device_type "pci" revision-id 00000011 (17) class-code 00088000 (557056) vendor-id 00001959 (6489) device-id 0000a00b (40971) reg 0000d800 00000000 00000000 00000000 00000000 linux,phandle 7fe38d78 (2145619320) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11,2: device_type "pci" revision-id 00000011 (17) class-code 00060400 (394240) vendor-id 00001959 (6489) #interrupt-cells 00000001 bus-range 00000008 00000008 #address-cells 00000003 #size-cells 00000002 device-id 0000a002 (40962) reg 00008a00 00000000 00000000 00000000 00000000 linux,phandle 7fe367d0 (2145609680) name "pci" /proc/device-tree/pxp@0,e0000000/pci@4: device_type "pci" revision-id 00000011 (17) class-code 00050000 (327680) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000058 00000001 device-id 0000a00a (40970) reg 00002000 00000000 00000000 00000000 00000000 linux,phandle 7fe37d08 (2145615112) name "pci" /proc/device-tree/pxp@0,e0000000/pci@10: device_type "pci" revision-id 00000011 (17) class-code 00060400 (394240) ranges 01000000 00000000 00002000 01000000 00000000 00002000 00000000 00001000 02000000 00000000 90000000 02000000 00000000 90000000 00000000 10100000 vendor-id 00001959 (6489) #interrupt-cells 00000001 bus-range 00000001 00000001 #address-cells 00000003 #size-cells 00000002 device-id 0000a002 (40962) reg 00008000 00000000 00000000 00000000 00000000 linux,phandle 7fe374d8 (2145613016) name "pci" /proc/device-tree/pxp@0,e0000000/pci@10/pci@0,1: assigned-addresses 82010110 00000000 a0040000 00000000 00004000 device_type "pci" revision-id 00000000 subsystem-id 0000aa88 (43656) class-code 00040300 (262912) vendor-id 00001002 (4098) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000031 00000001 device-id 0000aa88 (43656) reg 00010100 00000000 00000000 00000000 00000000 02010110 00000000 00000000 00000000 00004000 subsystem-vendor-id 00001682 (5762) linux,phandle 7fe39948 (2145622344) name "pci" /proc/device-tree/pxp@0,e0000000/pci@10/pci@0: assigned-addresses c2010010 00000000 90000000 00000000 10000000 82010018 00000000 a0020000 00000000 00020000 81010020 00000000 00002000 00000000 00000100 device_type "pci" revision-id 00000000 subsystem-id 00003107 (12551) class-code 00030000 (196608) vendor-id 00001002 (4098) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000030 00000001 device-id 00006738 (26424) reg 00010000 00000000 00000000 00000000 00000000 42010010 00000000 00000000 00000000 10000000 02010018 00000000 00000000 00000000 00020000 01010020 00000000 00000000 00000000 00000100 subsystem-vendor-id 00001682 (5762) linux,phandle 7fe39458 (2145621080) name "pci" /proc/device-tree/pxp@0,e0000000/i2c@1c,1: assigned-addresses 8100e110 00000000 007f0240 00000000 00000040 device_type "i2c" revision-id 00000001 class-code 000c0500 (787712) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000047 00000001 device-id 0000a003 (40963) reg 0000e100 00000000 00000000 00000000 00000000 0100e110 00000000 00000000 00000000 00000040 linux,phandle 7fe33890 (2145597584) name "i2c" /proc/device-tree/pxp@0,e0000000/pci@1e: assigned-addresses 8100f010 00000000 007f0400 00000000 00000100 8100f014 00000000 007f0500 00000000 00000100 device_type "pci" revision-id 00000012 (18) class-code 000601ff (393727) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000051 00000001 device-id 0000a008 (40968) reg 0000f000 00000000 00000000 00000000 00000000 0100f010 00000000 00000000 00000000 00000100 0100f014 00000000 00000000 00000000 00000100 linux,phandle 7fe39040 (2145620032) name "pci" /proc/device-tree/pxp@0,e0000000/pci@9: device_type "pci" revision-id 00000012 (18) class-code 000b2000 (729088) vendor-id 00001959 (6489) device-id 0000a000 (40960) reg 00004800 00000000 00000000 00000000 00000000 linux,phandle 7fe386c0 (2145617600) name "pci" /proc/device-tree/pxp@0,e0000000/io-bridge@0: compatible "pasemi,1682m-iob" "pasemi,io-bridge" assigned-addresses 82000000 00000000 e0000000 00000000 00002000 c2000000 00000000 fd800000 00000000 00001000 device_type "isa" revision-id 00000012 (18) class-code 00060000 (393216) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000056 00000001 device-id 0000a001 (40961) reg 00000000 00000000 00000000 00000000 00000000 82000000 00000000 e0000000 00000000 00002000 c2000000 00000000 fd800000 00000000 00001000 linux,phandle 7fe32728 (2145593128) name "io-bridge" /proc/device-tree/pxp@0,e0000000/pci@15: assigned-addresses 82000000 00000000 e00a8000 00000000 00001000 device_type "pci" revision-id 00000011 (17) class-code 00020000 (131072) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000044 00000001 device-id 0000a006 (40966) reg 0000a800 00000000 00000000 00000000 00000000 82000000 00000000 e00a8000 00000000 00001000 linux,phandle 7fe38988 (2145618312) name "pci" /proc/device-tree/pxp@0,e0000000/dma-engine@1a: compatible "1682m-dma" "pasemi,dma-engine" assigned-addresses 82000000 00000000 e00d0000 00000000 00001000 device_type "dma-engine" revision-id 00000012 (18) class-code 000801ff (524799) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000080 00000001 device-id 0000a007 (40967) reg 0000d000 00000000 00000000 00000000 00000000 82000000 00000000 e00d0000 00000000 00001000 linux,phandle 7fe322b8 (2145591992) name "dma-engine" /proc/device-tree/pxp@0,e0000000/pci@11,3: device_type "pci" revision-id 00000011 (17) class-code 00060400 (394240) vendor-id 00001959 (6489) #interrupt-cells 00000001 bus-range 00000009 00000009 #address-cells 00000003 #size-cells 00000002 device-id 0000a002 (40962) reg 00008b00 00000000 00000000 00000000 00000000 linux,phandle 7fe363a8 (2145608616) name "pci" /proc/device-tree/pxp@0,e0000000/pci@5: device_type "pci" revision-id 00000011 (17) class-code 00050000 (327680) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 0000005a 00000001 device-id 0000a00a (40970) reg 00002800 00000000 00000000 00000000 00000000 linux,phandle 7fe38080 (2145616000) name "pci" /proc/device-tree/pxp@0,e0000000/i2c@1c: assigned-addresses 8100e010 00000000 007f0200 00000000 00000040 device_type "i2c" revision-id 00000001 class-code 000c0500 (787712) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000046 00000001 device-id 0000a003 (40963) reg 0000e000 00000000 00000000 00000000 00000000 0100e010 00000000 00000000 00000000 00000040 linux,phandle 7fe334a0 (2145596576) name "i2c" /proc/device-tree/pxp@0,e0000000/cache-controller@1: compatible "pasemi,1682m-l2c" "pasemi,l2c" device_type "cache-controller" revision-id 00000011 (17) class-code 00058000 (360448) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000052 00000001 device-id 0000a009 (40969) reg 00000800 00000000 00000000 00000000 00000000 linux,phandle 7fe32bc8 (2145594312) name "cache-controller" /proc/device-tree/pxp@0,e0000000/pci@11: device_type "pci" revision-id 00000011 (17) class-code 00060400 (394240) ranges 01000000 00000000 00000000 01000000 00000000 00000000 00000000 00004000 02000000 00000000 a0100000 02000000 00000000 a0100000 00000000 00300000 vendor-id 00001959 (6489) #interrupt-cells 00000001 bus-range 00000005 00000006 #address-cells 00000003 #size-cells 00000002 device-id 0000a002 (40962) reg 00008800 00000000 00000000 00000000 00000000 linux,phandle 7fe37020 (2145611808) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@14,1: assigned-addresses 8105a110 00000000 00001030 00000000 00000008 8105a114 00000000 00001054 00000000 00000004 8105a118 00000000 00001038 00000000 00000008 8105a11c 00000000 00001050 00000000 00000004 8105a120 00000000 00001000 00000000 00000010 device_type "pci" revision-id 00000000 class-code 00010183 (65923) vendor-id 00001002 (4098) interrupt-parent 7fe2ffa8 (2145583016) interrupts 00000009 00000001 device-id 0000438c (17292) reg 0005a100 00000000 00000000 00000000 00000000 0105a110 00000000 00000000 00000000 00000008 0105a114 00000000 00000000 00000000 00000004 0105a118 00000000 00000000 00000000 00000008 0105a11c 00000000 00000000 00000000 00000004 0105a120 00000000 00000000 00000000 00000010 linux,phandle 7fe3bfb0 (2145632176) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@13,5: assigned-addresses 82059d10 00000000 a0209800 00000000 00000100 device_type "pci" revision-id 00000000 class-code 000c0320 (787232) vendor-id 00001002 (4098) interrupt-parent 7fe2ffa8 (2145583016) interrupts 0000000c 00000001 device-id 00004386 (17286) reg 00059d00 00000000 00000000 00000000 00000000 02059d10 00000000 00000000 00000000 00000100 linux,phandle 7fe3b858 (2145630296) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@13,3: assigned-addresses 82059b10 00000000 a0204000 00000000 00001000 device_type "pci" revision-id 00000000 class-code 000c0310 (787216) vendor-id 00001002 (4098) interrupt-parent 7fe2ffa8 (2145583016) interrupts 0000000a 00000001 device-id 0000438a (17290) reg 00059b00 00000000 00000000 00000000 00000000 02059b10 00000000 00000000 00000000 00001000 linux,phandle 7fe3b078 (2145628280) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@14: assigned-addresses 8105a010 00000000 00001020 00000000 00000010 8205a014 00000000 a0209000 00000000 00000400 device_type "pci" revision-id 00000014 (20) class-code 000c0500 (787712) vendor-id 00001002 (4098) device-id 00004385 (17285) reg 0005a000 00000000 00000000 00000000 00000000 0105a010 00000000 00000000 00000000 00000010 0205a014 00000000 00000000 00000000 00000400 linux,phandle 7fe3bc48 (2145631304) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@13,1: assigned-addresses 82059910 00000000 a0207000 00000000 00001000 device_type "pci" revision-id 00000000 class-code 000c0310 (787216) vendor-id 00001002 (4098) interrupt-parent 7fe2ffa8 (2145583016) interrupts 0000000a 00000001 device-id 00004388 (17288) reg 00059900 00000000 00000000 00000000 00000000 02059910 00000000 00000000 00000000 00001000 linux,phandle 7fe3a898 (2145626264) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@12: assigned-addresses 81059010 00000000 00001040 00000000 00000008 81059014 00000000 0000105c 00000000 00000004 81059018 00000000 00001048 00000000 00000008 8105901c 00000000 00001058 00000000 00000004 81059020 00000000 00001010 00000000 00000010 82059024 00000000 a0209400 00000000 00000400 device_type "pci" revision-id 00000000 class-code 0001018f (65935) vendor-id 00001002 (4098) interrupt-parent 7fe2ffa8 (2145583016) interrupts 00000009 00000001 device-id 00004380 (17280) reg 00059000 00000000 00000000 00000000 00000000 01059010 00000000 00000000 00000000 00000008 01059014 00000000 00000000 00000000 00000004 01059018 00000000 00000000 00000000 00000008 0105901c 00000000 00000000 00000000 00000004 01059020 00000000 00000000 00000000 00000010 02059024 00000000 [140 bytes total] linux,phandle 7fe39de8 (2145623528) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@12/ide0.0: device_type "block" linux,phandle 7fe3a2a0 (2145624736) name "ide0.0" /proc/device-tree/pxp@0,e0000000/pci@11/pci@12/atapi0.1: device_type "block" linux,phandle 7fe3a3a0 (2145624992) name "atapi0.1" /proc/device-tree/pxp@0,e0000000/pci@11/pci@14,4: device_type "pci" revision-id 00000000 class-code 00060400 (394240) ranges 01000000 00000000 00003000 01000000 00000000 00003000 00000000 00001000 02000000 00000000 a0300000 02000000 00000000 a0300000 00000000 00100000 vendor-id 00001002 (4098) #interrupt-cells 00000001 bus-range 00000006 00000006 #address-cells 00000003 #size-cells 00000002 device-id 00004384 (17284) reg 0005a400 00000000 00000000 00000000 00000000 linux,phandle 7fe3cc20 (2145635360) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@14,4/pci@5: assigned-addresses 81062810 00000000 00003000 00000000 00000100 82062814 00000000 a0310000 00000000 00000100 device_type "pci" revision-id 00000010 (16) subsystem-id 00008139 (33081) class-code 00020000 (131072) vendor-id 000010ec (4332) interrupt-parent 7fe2ffa8 (2145583016) interrupts 00000004 00000001 device-id 00008139 (33081) reg 00062800 00000000 00000000 00000000 00000000 01062810 00000000 00000000 00000000 00000100 02062814 00000000 00000000 00000000 00000100 subsystem-vendor-id 000010ec (4332) linux,phandle 7fe3d0d8 (2145636568) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@14,2: assigned-addresses 8205a210 00000000 a0200000 00000000 00004000 device_type "pci" revision-id 00000000 subsystem-id 00001000 (4096) class-code 00040300 (262912) vendor-id 00001002 (4098) interrupt-parent 7fe2ffa8 (2145583016) interrupts 00000009 00000001 device-id 00004383 (17283) reg 0005a200 00000000 00000000 00000000 00000000 0205a210 00000000 00000000 00000000 00004000 subsystem-vendor-id 00001888 (6280) linux,phandle 7fe3c440 (2145633344) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@13,4: assigned-addresses 82059c10 00000000 a0205000 00000000 00001000 device_type "pci" revision-id 00000000 class-code 000c0310 (787216) vendor-id 00001002 (4098) interrupt-parent 7fe2ffa8 (2145583016) interrupts 0000000b 00000001 device-id 0000438b (17291) reg 00059c00 00000000 00000000 00000000 00000000 02059c10 00000000 00000000 00000000 00001000 linux,phandle 7fe3b468 (2145629288) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@13,2: assigned-addresses 82059a10 00000000 a0206000 00000000 00001000 device_type "pci" revision-id 00000000 class-code 000c0310 (787216) vendor-id 00001002 (4098) interrupt-parent 7fe2ffa8 (2145583016) interrupts 0000000b 00000001 device-id 00004389 (17289) reg 00059a00 00000000 00000000 00000000 00000000 02059a10 00000000 00000000 00000000 00001000 linux,phandle 7fe3ac88 (2145627272) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@13: assigned-addresses 82059810 00000000 a0208000 00000000 00001000 device_type "pci" revision-id 00000000 class-code 000c0310 (787216) vendor-id 00001002 (4098) interrupt-parent 7fe2ffa8 (2145583016) interrupts 00000009 00000001 device-id 00004387 (17287) reg 00059800 00000000 00000000 00000000 00000000 02059810 00000000 00000000 00000000 00001000 linux,phandle 7fe3a4a8 (2145625256) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11/pci@14,3: assigned-addresses 8205a310 00000000 a0100000 00000000 00100000 device_type "pci" revision-id 00000000 class-code 00060100 (393472) vendor-id 00001002 (4098) device-id 0000438d (17293) reg 0005a300 00000000 00000000 00000000 00000000 0205a310 00000000 00000000 00000000 00100000 linux,phandle 7fe3c8e0 (2145634528) name "pci" /proc/device-tree/pxp@0,e0000000/pci@11,1: device_type "pci" revision-id 00000011 (17) class-code 00060400 (394240) vendor-id 00001959 (6489) #interrupt-cells 00000001 bus-range 00000007 00000007 #address-cells 00000003 #size-cells 00000002 device-id 0000a002 (40962) reg 00008900 00000000 00000000 00000000 00000000 linux,phandle 7fe36bf8 (2145610744) name "pci" /proc/device-tree/pxp@0,e0000000/serial@1d: current-speed 0001c200 (115200) compatible "ns16550" "pciclass,0700" assigned-addresses 8100e810 00000000 007f03f8 00000000 00000008 device_type "serial" revision-id 00000002 class-code 00070003 (458755) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000049 00000001 device-id 0000a004 (40964) reg 0000e800 00000000 00000000 00000000 00000000 0100e810 00000000 00000000 00000000 00000008 clock-frequency 07f28155 (133333333) linux,phandle 7fe318a8 (2145589416) name "serial" /proc/device-tree/pxp@0,e0000000/ethernet@14,3: phy-handle 7fe3d860 (2145638496) compatible "pasemi,1682m-gmac" "pasemi,ethernet" assigned-addresses 82000000 00000000 e00a3000 00000000 00001000 local-mac-address 02 00 ffffffe0 0a 30 00 ....0. device_type "ethernet" revision-id 00000011 (17) class-code 00020000 (131072) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000043 00000001 device-id 0000a005 (40965) reg 0000a300 00000000 00000000 00000000 00000000 82000000 00000000 e00a3000 00000000 00001000 linux,phandle 7fe32fd0 (2145595344) name "ethernet" /proc/device-tree/pxp@0,e0000000/pci@3: device_type "pci" revision-id 00000013 (19) class-code 00080080 (524416) vendor-id 00001959 (6489) interrupt-parent 7fe2f6e8 (2145580776) interrupts 00000054 00000001 device-id 0000a00c (40972) reg 00001800 00000000 00000000 00000000 00000000 linux,phandle 7fe37990 (2145614224) name "pci" /proc/device-tree/lpc@fe000000: device_type "lpc" ranges fe000000 00000000 fe000000 02000000 #address-cells 00000001 #size-cells 00000001 reg 00000000 fe000000 00000000 02000000 linux,phandle 7fe34070 (2145599600) name "lpc" /proc/device-tree/bootconsole: device_type "bootconsole" linux,phandle 7fe35880 (2145605760) name "bootconsole" /proc/device-tree/cpus: #address-cells 00000001 #size-cells 00000000 linux,phandle 7fe30540 (2145584448) name "cpus" /proc/device-tree/cpus/PowerPC,PA6T@0: bus-frequency 35a4e900 (900000000) 64-bit timebase-frequency 03f940aa (66666666) graphics device_type "cpu" ibm,segment-page-sizes 0000000c 00000000 00000001 0000000c 00000000 0000000e 00000020 00000001 0000000e 00000001 00000010 00000110 00000001 00000010 00000003 00000012 00000130 00000001 00000012 0000000f 00000014 00000030 00000001 00000014 0000001f 00000018 00000100 00000001 00000018 00000000 0000001e 00000120 [140 bytes total] i-cache-line-size 00000040 (64) cpu-version 00900102 (9437442) i-cache-block-size 00000040 (64) reg 00000000 d-cache-block-size 00000040 (64) clock-frequency 6b49d200 (1800000000) ibm,processor-segment-sizes 0000001c 00000028 linux,phandle 7fe30698 (2145584792) d-cache-size 00010000 (65536) i-cache-size 00010000 (65536) general-purpose name "PowerPC,PA6T" ibm,processor-page-sizes 0000000c 0000000e 00000010 00000012 00000014 00000018 0000001e d-cache-sets 00000002 i-cache-sets 00000002 d-cache-line-size 00000040 (64) /proc/device-tree/cpus/PowerPC,PA6T@1: bus-frequency 35a4e900 (900000000) 64-bit timebase-frequency 03f940aa (66666666) graphics device_type "cpu" ibm,segment-page-sizes 0000000c 00000000 00000001 0000000c 00000000 0000000e 00000020 00000001 0000000e 00000001 00000010 00000110 00000001 00000010 00000003 00000012 00000130 00000001 00000012 0000000f 00000014 00000030 00000001 00000014 0000001f 00000018 00000100 00000001 00000018 00000000 0000001e 00000120 [140 bytes total] i-cache-line-size 00000040 (64) cpu-version 00900102 (9437442) i-cache-block-size 00000040 (64) reg 00000001 d-cache-block-size 00000040 (64) clock-frequency 6b49d200 (1800000000) ibm,processor-segment-sizes 0000001c 00000028 linux,phandle 7fe30eb0 (2145586864) d-cache-size 00010000 (65536) i-cache-size 00010000 (65536) general-purpose name "PowerPC,PA6T" ibm,processor-page-sizes 0000000c 0000000e 00000010 00000012 00000014 00000018 0000001e d-cache-sets 00000002 i-cache-sets 00000002 d-cache-line-size 00000040 (64)
diff -rupN a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c --- a/arch/powerpc/platforms/pasemi/pci.c 2017-09-11 17:04:18.257586417 +0200 +++ b/arch/powerpc/platforms/pasemi/pci.c 2017-09-11 17:03:43.040599938 +0200 @@ -27,6 +27,7 @@ #include <linux/pci.h> #include <asm/pci-bridge.h> +#include <asm/isa-bridge.h> #include <asm/machdep.h> #include <asm/ppc-pci.h> @@ -108,6 +109,69 @@ static int workaround_5945(struct pci_bu return 1; } +#ifdef CONFIG_PPC_PASEMI_NEMO +static int sb600_bus = 5; +static void __iomem *iob_mapbase = NULL; + +static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, + int offset, int len, u32 *val); + +static void sb600_set_flag(int bus) +{ + struct resource res; + struct device_node *dn; + struct pci_bus *busp; + u32 val; + int err; + + if (sb600_bus == -1) + { + busp = pci_find_bus(0, 0); + pa_pxp_read_config(busp, PCI_DEVFN(17,0), PCI_SECONDARY_BUS, 1, &val); + + sb600_bus = val; + + printk(KERN_CRIT "NEMO SB600 on bus %d.\n",sb600_bus); + } + + if (iob_mapbase == NULL) + { + dn = of_find_compatible_node(NULL, "isa", "pasemi,1682m-iob"); + if (!dn) + { + printk(KERN_CRIT "NEMO SB600 missing iob node\n"); + return; + } + + err = of_address_to_resource(dn, 0, &res); + of_node_put(dn); + + if (err) + { + printk(KERN_CRIT "NEMO SB600 missing resource\n"); + return; + } + + printk(KERN_CRIT "NEMO SB600 IOB base %08lx\n",res.start); + + iob_mapbase = ioremap(res.start + 0x100, 0x94); + } + + if (iob_mapbase != NULL) + { + if (bus == sb600_bus) + { + out_le32(iob_mapbase + 4, in_le32(iob_mapbase + 4) | 0x800); + } + else + { + out_le32(iob_mapbase + 4, in_le32(iob_mapbase + 4) & ~0x800); + } + } +} +#endif + + static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) { @@ -126,6 +190,10 @@ static int pa_pxp_read_config(struct pci addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset); +#ifdef CONFIG_PPC_PASEMI_NEMO + sb600_set_flag(bus->number); +#endif + /* * Note: the caller has already checked that offset is * suitably aligned and that len is 1, 2 or 4. @@ -210,6 +278,9 @@ static int __init pas_add_bridge(struct /* Interpret the "ranges" property */ pci_process_bridge_OF_ranges(hose, dev, 1); + /* Scan for an isa bridge. */ + isa_bridge_find_early(hose); + return 0; } diff -rupN a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c --- a/arch/powerpc/platforms/pasemi/setup.c 2017-09-11 17:04:18.256586450 +0200 +++ b/arch/powerpc/platforms/pasemi/setup.c 2017-09-11 17:03:43.042599888 +0200 @@ -34,6 +34,7 @@ #include <asm/prom.h> #include <asm/iommu.h> #include <asm/machdep.h> +#include <asm/i8259.h> #include <asm/mpic.h> #include <asm/smp.h> #include <asm/time.h> @@ -72,6 +73,17 @@ static void __noreturn pas_restart(char out_le32(reset_reg, 0x6000000); } +#ifdef CONFIG_PPC_PASEMI_NEMO +void pas_shutdown(void) +{ + /* (added by DStevens 19/06/13) + Set the PLD bit that makes the SB600 think the power button is being pressed */ + void __iomem *pld_map = ioremap(0xf5000000,4096); + while (1) + out_8(pld_map+7,0x01); +} +#endif + #ifdef CONFIG_SMP static arch_spinlock_t timebase_lock; static unsigned long timebase; @@ -183,16 +195,30 @@ static int __init pas_setup_mce_regs(voi } machine_device_initcall(pasemi, pas_setup_mce_regs); +#ifdef CONFIG_PPC_PASEMI_NEMO +static void sb600_8259_cascade(struct irq_desc *desc) +{ + struct irq_chip *chip = irq_desc_get_chip(desc); + unsigned int cascade_irq = i8259_irq(); + + if (cascade_irq !=NO_IRQ) + generic_handle_irq(cascade_irq); + + chip->irq_eoi(&desc->irq_data); +} +#endif + static __init void pas_init_IRQ(void) { struct device_node *np; - struct device_node *root, *mpic_node; + struct device_node *root, *mpic_node, *i8259_node; unsigned long openpic_addr; const unsigned int *opprop; int naddr, opplen; int mpic_flags; const unsigned int *nmiprop; struct mpic *mpic; + int gpio_virq; mpic_node = NULL; @@ -244,6 +270,22 @@ static __init void pas_init_IRQ(void) mpic_unmask_irq(irq_get_irq_data(nmi_virq)); } + +#ifdef CONFIG_PPC_PASEMI_NEMO + // Connect legacy i8259 controller in SB600 + i8259_node = of_find_node_by_path("/pxp@0,e0000000"); + printk("Init i8259\n"); + i8259_init(i8259_node, 0); + of_node_put(i8259_node); + + gpio_virq = irq_create_mapping(NULL, 3); + irq_set_irq_type(gpio_virq, IRQ_TYPE_LEVEL_HIGH); + irq_set_chained_handler(gpio_virq, sb600_8259_cascade); + mpic_unmask_irq(irq_get_irq_data(gpio_virq)); + + irq_set_default_host(mpic->irqhost); + +#endif of_node_put(mpic_node); of_node_put(root); } @@ -398,6 +440,18 @@ static const struct of_device_id pasemi_ {}, }; +static struct resource rtc_resource[] = {{ + .name = "rtc", + .start = 0x70, + .end = 0x71, + .flags = IORESOURCE_IO, +}, { + .name = "rtc", + .start = 8, + .end = 8, + .flags = IORESOURCE_IRQ, +}}; + static int __init pasemi_publish_devices(void) { pasemi_pcmcia_init(); @@ -405,6 +459,10 @@ static int __init pasemi_publish_devices /* Publish OF platform devices for SDC and other non-PCI devices */ of_platform_bus_probe(NULL, pasemi_bus_ids, NULL); +#ifdef CONFIG_PPC_PASEMI_NEMO + platform_device_register_simple("rtc_cmos", -1, rtc_resource, 2); +#endif + return 0; } machine_device_initcall(pasemi, pasemi_publish_devices); @@ -421,9 +479,13 @@ static int __init pas_probe(void) iommu_init_early_pasemi(); +#ifdef CONFIG_PPC_PASEMI_NEMO + pm_power_off = pas_shutdown; // Varisys provided a way to turn us off +#endif return 1; } + define_machine(pasemi) { .name = "PA Semi PWRficient", .probe = pas_probe, @@ -435,4 +497,7 @@ define_machine(pasemi) { .calibrate_decr = generic_calibrate_decr, .progress = pas_progress, .machine_check_exception = pas_machine_check_handler, +#if 0 // def CONFIG_PPC_PASEMI_NEMO + .pci_probe_mode = sb600_pci_probe_mode, +#endif }; diff -rupN a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c --- a/drivers/ata/pata_atiixp.c 2017-09-11 17:04:26.591307805 +0200 +++ b/drivers/ata/pata_atiixp.c 2017-09-11 17:03:43.043599863 +0200 @@ -278,6 +278,12 @@ static int atiixp_init_one(struct pci_de }; const struct ata_port_info *ppi[] = { &info, &info }; + /* SB600 on the Nemo board doesn't have secondary port wired */ + #ifdef CONFIG_PPC_PASEMI_NEMO + if((pdev->device == PCI_DEVICE_ID_ATI_IXP600_IDE)) + ppi[1] = &ata_dummy_port_info; + #endif + return ata_pci_bmdma_init_one(pdev, ppi, &atiixp_sht, NULL, ATA_HOST_PARALLEL_SCAN); } diff -rupN a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c --- a/drivers/ata/pata_of_platform.c 2017-09-11 17:04:26.565308689 +0200 +++ b/drivers/ata/pata_of_platform.c 2017-09-11 17:03:43.044599838 +0200 @@ -40,14 +40,36 @@ static int pata_of_platform_probe(struct return -EINVAL; } - ret = of_address_to_resource(dn, 1, &ctl_res); - if (ret) { - dev_err(&ofdev->dev, "can't get CTL address from " - "device tree\n"); - return -EINVAL; + if (of_device_is_compatible(dn, "electra-ide")) { + /* Altstatus is really at offset 0x3f6 from the primary window + * on electra-ide. Adjust ctl_res and io_res accordingly. + */ + ctl_res = io_res; + ctl_res.start = ctl_res.start+0x3f6; + io_res.end = ctl_res.start-1; + +#ifdef CONFIG_PPC_PASEMI_NEMO + } else if (of_device_is_compatible(dn, "electra-cf")) { + /* Task regs are at 0x800, with alt status @ 0x80e in the primary window + * on electra-cf. Adjust ctl_res and io_res accordingly. + */ + ctl_res = io_res; + io_res.start += 0x800; + ctl_res.start = ctl_res.start + 0x80e; + io_res.end = ctl_res.start-1; +#endif + } else { + ret = of_address_to_resource(dn, 1, &ctl_res); + if (ret) { + dev_err(&ofdev->dev, "can't get CTL address from " + "device tree\n"); + return -EINVAL; + } } irq_res = platform_get_resource(ofdev, IORESOURCE_IRQ, 0); + if (irq_res) + irq_res->flags = 0; of_property_read_u32(dn, "reg-shift", ®_shift); @@ -60,6 +82,11 @@ static int pata_of_platform_probe(struct dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n"); } +#ifdef CONFIG_PPC_PASEMI_NEMO + irq_res = 0; // force irq off (doesn't seem to work) +#endif + + pio_mask = 1 << pio_mode; pio_mask |= (1 << pio_mode) - 1; @@ -69,6 +96,10 @@ static int pata_of_platform_probe(struct static const struct of_device_id pata_of_platform_match[] = { { .compatible = "ata-generic", }, + { .compatible = "electra-ide", }, +#ifdef CONFIG_PPC_PASEMI_NEMO + { .compatible = "electra-cf",}, +#endif { }, }; MODULE_DEVICE_TABLE(of, pata_of_platform_match); diff -rupN a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c --- a/drivers/i2c/busses/i2c-pasemi.c 2017-09-11 17:04:23.084427043 +0200 +++ b/drivers/i2c/busses/i2c-pasemi.c 2017-09-11 17:03:43.045599813 +0200 @@ -365,7 +365,6 @@ static int pasemi_smb_probe(struct pci_d smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; smbus->adapter.algo = &smbus_algorithm; smbus->adapter.algo_data = smbus; - smbus->adapter.nr = PCI_FUNC(dev->devfn); /* set up the sysfs linkage to our parent device */ smbus->adapter.dev.parent = &dev->dev; @@ -373,7 +372,7 @@ static int pasemi_smb_probe(struct pci_d reg_write(smbus, REG_CTL, (CTL_MTR | CTL_MRR | (CLK_100K_DIV & CTL_CLK_M))); - error = i2c_add_numbered_adapter(&smbus->adapter); + error = i2c_add_adapter(&smbus->adapter); if (error) goto out_release_region; diff -rupN a/drivers/pci/probe.c b/drivers/pci/probe.c --- a/drivers/pci/probe.c 2017-09-11 17:04:23.683406677 +0200 +++ b/drivers/pci/probe.c 2017-09-11 17:03:43.050599688 +0200 @@ -2177,6 +2177,8 @@ static int only_one_child(struct pci_bus if (!parent || !pci_is_pcie(parent)) return 0; + #ifndef CONFIG_PPC_PASEMI_NEMO + // SB600 has non-zero devices on non-root bus. if (pci_pcie_type(parent) == PCI_EXP_TYPE_ROOT_PORT) return 1; @@ -2189,6 +2191,7 @@ static int only_one_child(struct pci_bus if (parent->has_secondary_link && !pci_has_flag(PCI_SCAN_ALL_PCIE_DEVS)) return 1; + #endif return 0; }