⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pci.readme

📁 microwindows移植到S3C44B0的源码
💻 README
字号:
Pete Popov, ppopov@pacbell.net07/11/2001This README briefly explains how to use the pci and pci_autocode in arch/mips/kernel.  The code was ported from PowerPC andmodified slightly. It has been tested pretty well on PPC on somerather complex systems with multiple bridges and devices behindeach bridge. However, at the time this README was written, themips port was tested only on boards with a single pci bus andno P2P bridges.  It's very possible that on boards with P2Pbridges some modifications have to be made. The code will evolve, no doubt, but currently every single mips boardis doing its own pcibios thing and it has become a bigmess.  This generic pci code is meant to clean up the mipspci mess and make it easier to add pci support to new boards.arch/mips/kernel/pci_auto.c has the pci bus enumeration code.This code scans the pci bus(es) and assigns all of the resources.Thus, you don't need the boot code to that, and many boot codesdon't do it correctly anyway.  To enable the pci_auto code, adddefine_bool CONFIG_PCI_AUTO y inside the define for your board in arch/mips/config.in. For example, the Galileo EV96100 board  looks like this:if [ "$CONFIG_MIPS_EV96100" = "y" ]; then	define_bool CONFIG_PCI y	define_bool CONFIG_MIPS_GT96100 y	define_bool CONFIG_NEW_PCI y	define_bool CONFIG_PCI_AUTO y	define_bool CONFIG_SWAP_IO_SPACE yfi Next, if you want to use the arch/mips/kernel/pci code, which has thepcibios_init() function, adddefine_bool CONFIG_NEW_PCI y inside the define for your board. Again, the EV96100 example aboveshow NEW_PCI turned on.Note that you can enable CONFIG_NEW_PCI code without enabling CONFIG_PCI_AUTO. But you can't do the opposite because the pci_autoroutines are called from pcibios_init(), which is part of the CONFIG_NEW_PCI code.Now you need to add your files to hook in your pci configurationcycles.  Usually you'll need only a couple of files named somethinglike pci_fixups.c and pci_ops.c.  You can copy the templatesprovided and fill in the code.The file pci_ops.c should contain the pci configuration cycles routines.It also has the mips_pci_channels[] array which contains the descriptorsof each pci controller.The file pci_fixups.c contains a few routines to do interrupt fixups,resources fixups, and, if needed, pci bios fixups.Usually you'll put your pci_fixups.c file in your board specific directory, since the functions in that file are board specific.  The functions inpci_ops.c, on the other hand, are usually pci controller specific so thatfile could be shared among a few different boards using the samepci controller.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -