
On Sat, Mar 3, 2012 at 4:28 PM, Wolfgang Denk wd@denx.de wrote:
In message 1327967374-1727-1-git-send-email-linus.walleij@linaro.org you wrote:
The PCI support for the Integrator AP has apparently never been finished and I strongly suspect that it has never worked, so let's fix it. This is a list of the more or less un-splittable changes done in this driver rewrite:
- Replace the register definitions stashed into the config
file (!) with a copy if the register file from the Linux kernels arch/arm/include/asm/hardware/pci_v3.h
- Delete the unreadable gigantic macros that perform the
config accesses and replace them with copyedited code from Linux arch/arm/mach-integrator/pci_v3.c
- Rewrite the rest of the setup code to use the
v3_[read|write][lwb]() accessors.
Enable PCI by default in the AP board configuration.
Fix checkpatch warnings and make code more conformant.
Tested-by: Will Deacon will.deacon@arm.com Signed-off-by: Linus Walleij linus.walleij@linaro.org
This commit causes build warnings on a number of boards, for example:
Configuring for integratorap_cm926ejs - Board: integratorap, Options: CM926EJ_S pci.c: In function 'pci_init_board': pci.c:474:2: warning: implicit declaration of function 'pciauto_config_init' [-Wimplicit-function-declaration] pci.c:286:18: warning: variable 'j' set but not used [-Wunused-but-set-variable]
Please fix!
I've submitted two patches that I think solves the issues properly, thanks for reporting, especially the last one looks like a dangerously fragile construct that really needed to be removed.
The first one points to some mess in how some PCI autoscan stuff is declared, I suspect this could need a closer look, there seems to be some more functions that should have their declarations moved to <pci.h> but I didn't quite dare to touch them since I don't have very many test systems.
Thanks, Linus Walleij