<div dir="ltr">it's way easier if you push your changes to gerrit marked as a WIP. People can see the code and will likely spot any problems very quickly.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 16, 2016 at 12:40 AM Agrain Patrick <<a href="mailto:patrick.agrain@al-enterprise.com">patrick.agrain@al-enterprise.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br class="gmail_msg">
<br class="gmail_msg">
I'm trying to add a new superIO chip to the source tree.<br class="gmail_msg">
The chip is an EXAR XR28V932.<br class="gmail_msg">
I tried to take example of the existing superIO chips, like the i3100 and it8716 to compose a correct source tree as following:<br class="gmail_msg">
[agrain1@frilldlin059 coreboot]$ ls -als ./src/superio/exar/xr28v382/<br class="gmail_msg">
total 10<br class="gmail_msg">
1 drwxr-xr-x 2 agrain1 dhs2  512 Dec 16 09:03 .<br class="gmail_msg">
1 drwxr-xr-x 3 agrain1 dhs2  512 Dec 15 09:41 ..<br class="gmail_msg">
1 -rw-r--r-- 1 agrain1 dhs2  687 Dec 15 09:34 Makefile.inc<br class="gmail_msg">
3 -rw-r--r-- 1 agrain1 dhs2 2614 Dec 16 09:03 superio.c<br class="gmail_msg">
2 -rw-r--r-- 1 agrain1 dhs2 1287 Dec 15 16:28 xr28v382.h<br class="gmail_msg">
<br class="gmail_msg">
I modified the devicetree.cb of my board (based on an Intel Mohon Peak) as following:<br class="gmail_msg">
                        device pci 1f.0 on end # LPC bridge<br class="gmail_msg">
                                chip superio/exar/xr28v382 # Super I/O<br class="gmail_msg">
                                  device pnp 2e.0 on            # Com1<br class="gmail_msg">
                                        io 0x60 = 0x3f8<br class="gmail_msg">
                                        irq 0x70 = 4<br class="gmail_msg">
                                  end<br class="gmail_msg">
                                  device pnp 2e.1 off           # Com2<br class="gmail_msg">
                                  end<br class="gmail_msg">
                                  device pnp 2e.8 off           # Watchdog<br class="gmail_msg">
                                  end<br class="gmail_msg">
                                end<br class="gmail_msg">
                        device pci 1f.3 on end # SMBus 0<br class="gmail_msg">
<br class="gmail_msg">
Now the output of the console log (DEBUG level):<br class="gmail_msg">
<...><br class="gmail_msg">
PCI: pci_scan_bus for bus 00<br class="gmail_msg">
PCI: 00:00.0 [8086/1f0f] enabled<br class="gmail_msg">
PCI: Static device PCI: 00:01.0 not found, disabling it.<br class="gmail_msg">
child PNP: 002e.0 not a PCI device<br class="gmail_msg">
child PNP: 002e.1 not a PCI device<br class="gmail_msg">
child PNP: 002e.8 not a PCI device<br class="gmail_msg">
child PNP: 002e.0 not a PCI device<br class="gmail_msg">
child PNP: 002e.1 not a PCI device<br class="gmail_msg">
child PNP: 002e.8 not a PCI device<br class="gmail_msg">
child PNP: 002e.0 not a PCI device<br class="gmail_msg">
child PNP: 002e.1 not a PCI device<br class="gmail_msg">
child PNP: 002e.8 not a PCI device<br class="gmail_msg">
child PNP: 002e.0 not a PCI device<br class="gmail_msg">
<...><br class="gmail_msg">
PCI: 00:1f.0 [8086/1f38] enabled<br class="gmail_msg">
child PNP: 002e.0 not a PCI device<br class="gmail_msg">
child PNP: 002e.1 not a PCI device<br class="gmail_msg">
child PNP: 002e.8 not a PCI device<br class="gmail_msg">
child PNP: 002e.0 not a PCI device<br class="gmail_msg">
child PNP: 002e.1 not a PCI device<br class="gmail_msg">
child PNP: 002e.8 not a PCI device<br class="gmail_msg">
child PNP: 002e.0 not a PCI device<br class="gmail_msg">
child PNP: 002e.1 not a PCI device<br class="gmail_msg">
child PNP: 002e.8 not a PCI device<br class="gmail_msg">
PCI: 00:1f.3 [8086/1f3c] enabled<br class="gmail_msg">
child PNP: 002e.0 not a PCI device<br class="gmail_msg">
<...><br class="gmail_msg">
PCI: Left over static devices:<br class="gmail_msg">
PNP: 002e.0<br class="gmail_msg">
PNP: 002e.1<br class="gmail_msg">
PNP: 002e.8<br class="gmail_msg">
PCI: Check your devicetree.cb.<br class="gmail_msg">
PCI: pci_scan_bus for bus 01<br class="gmail_msg">
<...><br class="gmail_msg">
DOMAIN: 0000 (Intel Rangeley Northbridge)<br class="gmail_msg">
PCI: 00:00.0 (Intel Rangeley Northbridge)<br class="gmail_msg">
PCI: 00:01.0 (Intel Rangeley Northbridge)<br class="gmail_msg">
PCI: 00:02.0 (Intel Rangeley Northbridge)<br class="gmail_msg">
PCI: 00:03.0 (Intel Rangeley Northbridge)<br class="gmail_msg">
PCI: 00:04.0 (Intel Rangeley Northbridge)<br class="gmail_msg">
PCI: 00:0b.0 (Intel Rangeley Southbridge)<br class="gmail_msg">
PCI: 00:0e.0 (Intel Rangeley Southbridge)<br class="gmail_msg">
PCI: 00:13.0 (Intel Rangeley Southbridge)<br class="gmail_msg">
PCI: 00:14.0 (Intel Rangeley Southbridge)<br class="gmail_msg">
PCI: 00:14.1 (Intel Rangeley Southbridge)<br class="gmail_msg">
PCI: 00:14.2 (Intel Rangeley Southbridge)<br class="gmail_msg">
PCI: 00:14.3 (Intel Rangeley Southbridge)<br class="gmail_msg">
PCI: 00:16.0 (Intel Rangeley Southbridge)<br class="gmail_msg">
PCI: 00:17.0 (Intel Rangeley Southbridge)<br class="gmail_msg">
PCI: 00:18.0 (Intel Rangeley Southbridge)<br class="gmail_msg">
PCI: 00:1f.0 (Intel Rangeley Southbridge)<br class="gmail_msg">
PNP: 002e.0 (EXAR XR28V382 Super I/O)<br class="gmail_msg">
PNP: 002e.1 (EXAR XR28V382 Super I/O)<br class="gmail_msg">
PNP: 002e.8 (EXAR XR28V382 Super I/O)<br class="gmail_msg">
PCI: 00:1f.3 (Intel Rangeley Southbridge)<br class="gmail_msg">
PCI: 00:0f.0 (unknown)<br class="gmail_msg">
PCI: 01:00.0 (unknown)<br class="gmail_msg">
<br class="gmail_msg">
I guess that the "" are not normal, isn't it ?<br class="gmail_msg">
And so the " Check your devicetree.cb." ?<br class="gmail_msg">
Moreover, I put a printk() in the init function of the chip and do not see it in the log.<br class="gmail_msg">
What particular point should I also check to be sure that I do not miss anything ?<br class="gmail_msg">
<br class="gmail_msg">
Thanks for your help.<br class="gmail_msg">
Best regards,<br class="gmail_msg">
Patrick Agrain<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
coreboot mailing list: <a href="mailto:coreboot@coreboot.org" class="gmail_msg" target="_blank">coreboot@coreboot.org</a><br class="gmail_msg">
<a href="https://www.coreboot.org/mailman/listinfo/coreboot" rel="noreferrer" class="gmail_msg" target="_blank">https://www.coreboot.org/mailman/listinfo/coreboot</a><br class="gmail_msg">
</blockquote></div>