linux/arch/mips/ath79
Gabor Juhos a68ad4d892 MIPS: ath79: allow to use board specific pci_plat_dev_init functions
Th current implementation causes NULL pointer dereference
if 'pci_data' is not set:

pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
pci 0000:00:00.0: BAR 0: set to [mem 0x10000000-0x1000ffff 64bit] (PCI
address [0x10000000-0x1000ffff])
CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 802daca0, ra == 802e78a4
Oops[#1]:
Cpu 0
$ 0   : 00000000 80420000 00000000 00000000
$ 4   : 00000000 00000000 00000001 00000001
$ 8   : 00000001 0000032c 81c54700 00000001
$12   : 0000032d 0000000f 00000000 ffffffff
$16   : 81c14c00 00000001 802dac74 80195f98
$20   : 802ea050 00000000 00000000 00000000
$24   : 00000003 800617f0
$28   : 81c20000 81c21e70 00000000 802e78a4
Hi    : 00000000
Lo    : 4190ab00
epc   : 802daca0 0x802daca0
    Not tainted
ra    : 802e78a4 0x802e78a4
Status: 1000c003    KERNEL EXL IE
Cause : 00800008
BadVA : 00000000
PrId  : 00019374 (MIPS 24Kc)
Modules linked in:
Process swapper (pid: 1, threadinfo=81c20000, task=81c18000, tls=00000000)
Stack : 00000000 8027d5d8 802e8ae0 00000000 01000000 802e8b5c 81c50600 00000000
        802ff290 00000000 80420000 802ea0bc 00000000 00000000 80420000 802ff290
        80420000 80060930 33390000 00000000 00002308 80140a80 00000028 802d0000
        00000000 800ba024 802ff004 802ff0c8 802ff290 00000000 00000000 00000000
        00000000 802d897c 01234567 7f827068 00000000 0045f798 00460000 00000000

This can be avoided by calling the 'ar724x_pci_add_data'
function from the board specific setup code. However it
makes no sense to use that function for every board,
especially when the board does not needs to set the
platform_data field of any PCI device.

The patch allows the board setup code to specify a board
specific function if that is required.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3499/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-05-15 17:49:05 +02:00
..
clock.c MIPS: ath79: add AR933X specific clock init 2011-12-07 22:02:45 +00:00
common.c MIPS: ath79: Store the SoC revision in a global variable 2011-12-07 22:02:47 +00:00
common.h
dev-common.c MIPS: ath79: register UART device for the AR933X SoCs 2011-12-07 22:02:46 +00:00
dev-common.h MIPS: ath79: add common watchdog device 2011-01-18 19:30:26 +01:00
dev-gpio-buttons.c MIPS: ath79: Use kmemdup rather than duplicating its implementation 2012-05-15 17:49:00 +02:00
dev-gpio-buttons.h MIPS: ath79: add common GPIO buttons device 2011-01-18 19:30:27 +01:00
dev-leds-gpio.c MIPS: ath79: Use kmemdup rather than duplicating its implementation 2012-05-15 17:49:00 +02:00
dev-leds-gpio.h MIPS: ath79: add common GPIO LEDs device 2011-01-18 19:30:26 +01:00
dev-spi.c MIPS: ath79: add common SPI controller device 2011-01-18 19:30:27 +01:00
dev-spi.h MIPS: ath79: add common SPI controller device 2011-01-18 19:30:27 +01:00
dev-usb.c USB: use generic platform driver on ath79 2012-03-15 12:45:43 -07:00
dev-usb.h MIPS: ath79: add common USB Host Controller device 2011-12-07 22:02:44 +00:00
dev-wmac.c MIPS: ath79: fix AR933X WMAC reset code 2012-04-27 15:18:30 +01:00
dev-wmac.h MIPS: ath79: Rename dev-ar913x-wmac.h to dev-wmac.h 2011-12-07 22:02:48 +00:00
early_printk.c MIPS: ath79: Add early printk support for the AR933X SoCs 2011-12-07 22:02:45 +00:00
gpio.c MIPS: ath79: add AR933X specific GPIO initialization 2011-12-07 22:02:46 +00:00
irq.c MIPS: ath79: Add AR933X specific IRQ initialization 2011-12-07 22:02:45 +00:00
Kconfig MIPS: ath79: Rename ATH79_DEV_AR913X_WMAC option to ATH79_DEV_WMAC 2011-12-07 22:02:48 +00:00
mach-ap81.c MIPS: ath79: Rename dev-ar913x-wmac.h to dev-wmac.h 2011-12-07 22:02:48 +00:00
mach-ap121.c MIPS: ath79: Rename dev-ar913x-wmac.h to dev-wmac.h 2011-12-07 22:02:48 +00:00
mach-pb44.c MIPS: ath79: add common USB Host Controller device 2011-12-07 22:02:44 +00:00
mach-ubnt-xm.c MIPS: ath79: allow to use board specific pci_plat_dev_init functions 2012-05-15 17:49:05 +02:00
machtypes.h Initial support for the Ubiquiti Networks XM board (rev 1.0). 2011-12-07 22:02:47 +00:00
Makefile MIPS: ath79: separate common PCI code 2012-05-15 17:49:00 +02:00
pci.c MIPS: ath79: allow to use board specific pci_plat_dev_init functions 2012-05-15 17:49:05 +02:00
pci.h MIPS: ath79: allow to use board specific pci_plat_dev_init functions 2012-05-15 17:49:05 +02:00
Platform
prom.c
setup.c Merge branches 'next/ar7', 'next/ath79', 'next/bcm63xx', 'next/bmips', 'next/cavium', 'next/generic', 'next/kprobes', 'next/lantiq', 'next/perf' and 'next/raza' into mips-for-linux-next 2012-01-11 15:42:31 +01:00