android_kernel_xiaomi_sm8350/arch/sh/drivers/pci
Hideo Saito bb68660943 sh: Fix PCI BAR address-space wraparound.
When a SH7751R system includes a card that has wide range space
like a graphics card, the pci-pci bridge controller can't set the
correct address range.

For example, when *lower_limit is 0xfd000000 and bar_size is
0x4000000, in the following code at arch/sh/drivers/pci/pci-auto.c,
0x0 is set in bar_value.

pciauto_setup_bars()
{
...
                bar_value = ((*lower_limit - 1) & ~(bar_size - 1)) + bar_size;
...
                *lower_limit = bar_value + bar_size;
}

As a result, 0x4000000 is set in *lower_limit, but this value is wrong.

The following patch avoids this problem by checking the range of the
value and refusing to update the BAR if the calculated value ends up
being bogus.

Signed-off-by: Hideo Saito <saito@densan.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-12 14:50:49 +09:00
..
dma-dreamcast.c fix file specification in comments 2006-10-03 23:01:26 +02:00
fixups-dreamcast.c fix file specification in comments 2006-10-03 23:01:26 +02:00
fixups-r7780rp.c
fixups-rts7751r2d.c
fixups-sh03.c
Kconfig
Makefile sh: Kill off dead bigsur and ec3104 boards. 2007-02-14 15:06:09 +09:00
ops-dreamcast.c fix file specification in comments 2006-10-03 23:01:26 +02:00
ops-landisk.c sh: Kill off remaining config.h references. 2006-10-03 13:19:02 +09:00
ops-r7780rp.c sh: Cleanup board header directories. 2006-10-19 16:30:32 +09:00
ops-rts7751r2d.c sh: Cleanup board header directories. 2006-10-19 16:30:32 +09:00
ops-sh4.c
ops-sh03.c sh: build fixes for defconfigs. 2006-10-03 13:14:04 +09:00
ops-snapgear.c
ops-titan.c sh: sh775x/titan fixes for irq header changes. 2006-12-06 12:05:02 +09:00
pci-auto.c sh: Fix PCI BAR address-space wraparound. 2007-03-12 14:50:49 +09:00
pci-sh4.h
pci-sh7751.c sh: Kill off dead bigsur and ec3104 boards. 2007-02-14 15:06:09 +09:00
pci-sh7751.h
pci-sh7780.c sh: Drop CPU subtype IRQ headers. 2006-12-06 10:45:37 +09:00
pci-sh7780.h
pci-st40.c sh: Updates for IRQ handler changes. 2006-10-06 15:31:16 +09:00
pci-st40.h
pci.c