Re: Linux running on a PCI Option device?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jon,

Jon Ringle wrote:
On Friday 03 March 2006 09:40 am, Adrian Cox wrote:

Based on only a quick look at the code: if the Windows host is present,
don't call pci_common_init() in ixdp425_pci_init().


Doing this will prevent the code in ixp4xx_pci_preinit() from executing which handles some initialization for both PCI host and option modes. Should I go ahead and explicitly call ixp4xx_pci_preinit() from ixdp425_pci_init() if in PCI option mode?

The older 2.4 kernel code for the IXP425 support pretty much did it
this way (which is what makes it look like it supports the device
in option mode).

Code snippet from ixp425_pci_init() in arch/arm/mach-ixp425/ixp425-pci.c
(from patches for 2.4 kernels to support ixp425):

       ...
       if (ixp425_pci_is_host())
        {
                local_write_config_word(PCI_COMMAND, PCI_COMMAND_MASTER |
                        PCI_COMMAND_MEMORY);

                DBG("allocating hose\n");
                hose = pcibios_alloc_controller();
                if (!hose)
                panic("Could not allocate PCI hose");

                hose->first_busno = 0;
                hose->last_busno = 0;
                hose->io_space.start = 0;
                hose->io_space.end = 0xffffffff;
                hose->mem_space.start = 0x48000000;
                hose->mem_space.end = 0x4bffffff;

                /* autoconfig the bus */ DBG("AUTOCONFIG\n");
                hose->last_busno = pciauto_bus_scan(hose, 0);

                /* scan the bus */
                DBG("SCANNING THE BUS\n");
                pci_scan_bus(0, &ixp425_ops, sysdata);
         }


Pretty much the rest of the PCI init is the same, it just
doesn't do the bus scan.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     [email protected]
SnapGear -- a Secure Computing Company      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux