2000-12-10 22:01:54

by Bruce Korb

[permalink] [raw]
Subject: Patch to improve PCI consistency


This patch will unify the PCI device information between the
PCI driver database (pci.ids), the PCI-IDE bridges (ide-pci.c)
and the header that should enumerate all pci devices (pci_ids.h).
It does this by putting all the data into a single file and
tagging the values with names. These named values are then
inserted into the output files. This will provide for guaranteed
consistency, which is not now the case. In fact, there were some
unresolvable inconsistencies in the data that are marked with
``FIXME'' comments.

The patches are against linux-2.4.0-test11.

There are other PCI device tables that could be generated as well.
As it happens, though, I am only interested in PCI/IDE bridges.
The rest are left as exercises for the reader. :-)

Hand edited files:

pci.def -- replacement for drivers/pci/pci.ids
pci_ids.tpl -- Template for producing generated files
:mkpcidev -- Script for constructing files (read before use!)
PATCH -- a patch for the following files:

drivers/pci/gen-devlist.c -- obsolete
arch/i386/kernel/pci-irq.c
drivers/char/serial.c
drivers/pci/names.c
drivers/pci/Makefile
drivers/ide/ide-pci.c
drivers/parport/parport_pc.c

Generated files:

drivers/pci/devlist.h replacement for devlist.h and classlist.h
drivers/ide/ide-pci.h Replacement for hand-coded tables in ide-pci.c
include/linux/pci_ids.h replacement


The patches mostly remove data that are now generated.
However, some were changed because it is no longer possible to
create #define-d values with mixed case (a lower case `x').

For the ide-pci.c file, however, it also renames macros that
are inconsistent with the device names already defined in
pci.ids (pci.def).

=============

The tool that makes this all happen is:

http://AutoGen.SourceForge.net/


Attachments:
README (1.77 kB)