On Monday 03 November 2008, Benjamin Herrenschmidt wrote:
> > I will try to add endpoint support for PCI as well. I would like to have
> > a single PCI node and let the device_type attribute decide if we are
> > running in hostbridge or endpoint mode.
>
> Don't use device_type. Do the same we do for PCI-E (whatever it is, I
> don't have the source code at hand right now).

It is device_type for PCIe right now, I'm afraid. This was what we agreed 
upon. Here a code sniplet from the patch:

        /* Check if device_type property is set to "pci" or "pci-endpoint".
         * Resulting from this setup this PCIe port will be configured
         * as root-complex or as endpoint.
         */
        val = of_get_property(port->node, "device_type", NULL);
        if (!strcmp(val, "pci-endpoint")) {
                port->endpoint = 1;
        } else if (!strcmp(val, "pci")) {
                port->endpoint = 0;
        } else {
                printk(KERN_ERR "PCIE: missing or incorrect device_type for 
%s\n",
                       np->full_name);
                return;
        }

Best regards,
Stefan
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to