android_kernel_motorola_sm6375/arch/mips
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maciej W. Rozycki 1c74ded6a1 MIPS: Malta: Fix !EVA SOC-it PCI MMIO
commit ebd729fef31620e0bf74cbf8a4c7fda73a2a4e7e upstream.

Fix a regression that has caused accesses to the PCI MMIO window to
complete unclaimed in non-EVA configurations with the SOC-it family of
system controllers, preventing PCI devices from working that use MMIO.

In the non-EVA case PHYS_OFFSET is set to 0, meaning that PCI_BAR0 is
set with an empty mask (and PCI_HEAD4 matches addresses starting from 0
accordingly).  Consequently all addresses are matched for incoming DMA
accesses from PCI.  This seems to confuse the system controller's logic
and outgoing bus cycles targeting the PCI MMIO window seem not to make
it to the intended devices.

This happens as well when a wider mask is used with PCI_BAR0, such as
0x80000000 or 0xe0000000, that makes addresses match that overlap with
the PCI MMIO window, which starts at 0x10000000 in our configuration.

Set the mask in PCI_BAR0 to 0xf0000000 for non-EVA then, covering the
non-EVA maximum 256 MiB of RAM, which is what YAMON does and which used
to work correctly up to the offending commit.  Set PCI_P2SCMSKL to match
PCI_BAR0 as required by the system controller's specification, and match
PCI_P2SCMAPL to PCI_HEAD4 for identity mapping.

Verified with:

Core board type/revision =      0x0d (Core74K) / 0x01
System controller/revision =    MIPS SOC-it 101 OCP / 1.3   SDR-FW-4:1
Processor Company ID/options =  0x01 (MIPS Technologies, Inc.) / 0x1c
Processor ID/revision =         0x97 (MIPS 74Kf) / 0x4c

for non-EVA and with:

Core board type/revision =      0x0c (CoreFPGA-5) / 0x00
System controller/revision =    MIPS ROC-it2 / 0.0   FW-1:1 (CLK_unknown) GIC
Processor Company ID/options =  0x01 (MIPS Technologies, Inc.) / 0x00
Processor ID/revision =         0xa0 (MIPS interAptiv UP) / 0x20

for EVA/non-EVA, fixing:

defxx 0000:00:12.0: assign IRQ: got 10
defxx: v1.12 2021/03/10  Lawrence V. Stefani and others
0000:00:12.0: Could not read adapter factory MAC address!

vs:

defxx 0000:00:12.0: assign IRQ: got 10
defxx: v1.12 2021/03/10  Lawrence V. Stefani and others
0000:00:12.0: DEFPA at MMIO addr = 0x10142000, IRQ = 10, Hardware addr = 00-00-f8-xx-xx-xx
0000:00:12.0: registered as fddi0

for non-EVA and causing no change for EVA.

Signed-off-by: Maciej W. Rozycki <[email protected]>
Fixes: 422dd25664 ("MIPS: Malta: Allow PCI devices DMA to lower 2GB physical")
Cc: [email protected] # v4.9+
Signed-off-by: Thomas Bogendoerfer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2025-12-03 12:45:20 +01:00
..
alchemy MIPS: Alchemy: Fix an out-of-bound access in db1550_dev_setup() 2024-01-25 14:34:30 -08:00
ar7
ath25
ath79
bcm47xx MIPS: BCM47XX: Cast memcmp() of function to (void *) 2022-10-26 13:22:47 +02:00
bcm63xx MIPS: BCM63xx: Add check for NULL for clk in clk_enable 2023-01-18 11:40:58 +01:00
bmips mips: bmips: BCM6358: make sure CBR is correctly set 2024-07-05 09:08:22 +02:00
boot mips: lantiq: danube: add missing device_type in pci node 2025-12-03 12:45:10 +01:00
cavium-octeon MIPS: OCTEON: warn only once if deprecated link status is being used 2023-01-18 11:40:58 +01:00
cobalt
configs Remove DECnet support from kernel 2023-06-21 15:44:10 +02:00
crypto
dec MIPS: dec: Declare which_prom() as static 2025-05-02 07:39:23 +02:00
emma
fw MIPS: fw: Allow firmware to pass a empty env 2023-05-17 11:35:32 +02:00
generic
include MIPS: vpe-mt: add missing prototypes for vpe_{alloc,start,stop,free} 2025-08-28 16:21:28 +02:00
jazz dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
jz4740
kernel MIPS: Don't crash in stack_top() for tasks without ABI or vDSO 2025-08-28 16:21:28 +02:00
kvm MIPS: KVM: Fix a build warning about variable set but not used 2023-12-08 08:44:24 +01:00
lantiq mips: lantiq: xway: sysctrl: rename stp clock 2025-12-03 12:45:11 +01:00
lasat treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD() 2023-04-20 12:07:32 +02:00
lib treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
loongson32 MIPS: Loongson32: Fix PHY-mode being left unspecified 2022-09-28 11:04:06 +02:00
loongson64
math-emu
mm MIPS: mm: tlb-r4k: Uniquify TLB entries on init 2025-08-28 16:21:23 +02:00
mti-malta MIPS: Malta: Fix !EVA SOC-it PCI MMIO 2025-12-03 12:45:20 +01:00
net
netlogic
oprofile
paravirt
pci MIPS: Octeron: remove source file executable bit 2024-08-19 05:33:33 +02:00
pic32 MIPS: pic32: treat port as signed integer 2022-12-08 11:22:57 +01:00
pistachio
pmcs-msp71xx
pnx833x
power
ralink
rb532
sgi-ip22
sgi-ip27
sgi-ip32
sibyte
sni
tools
txx9
vdso mips: Add -std= flag specified in KBUILD_CFLAGS to vdso CFLAGS 2025-06-27 11:02:52 +01:00
vr41xx MIPS: Remove repetitive increase irq_err_count 2022-06-29 08:58:46 +02:00
Kbuild
Kbuild.platforms
Kconfig mips/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:56:34 +02:00
Kconfig.debug
Makefile mips: Include KBUILD_CPPFLAGS in CHECKFLAGS invocation 2025-08-28 16:21:33 +02:00
Makefile.postlink