Skip to content

Commit 10c88ca

Browse files
zearglaubitz
authored andcommitted
sh: dreamcast: Fix GAPS PCI bridge addressing
The G2-to-PCI bridge chip found in SEGA Dreamcast assumes P2 area relative addresses. Set the appropriate IOPORT base offset. Tested-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Artur Rojek <contact@artur-rojek.eu> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: https://lore.kernel.org/r/20240511191614.68561-2-contact@artur-rojek.eu Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
1 parent 21b8651 commit 10c88ca

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

arch/sh/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ config ARCH_HAS_ILOG2_U64
125125

126126
config NO_IOPORT_MAP
127127
def_bool !PCI
128-
depends on !SH_SHMIN && !SH_HP6XX && !SH_SOLUTION_ENGINE
128+
depends on !SH_SHMIN && !SH_HP6XX && !SH_SOLUTION_ENGINE && \
129+
!SH_DREAMCAST
129130

130131
config IO_TRAPPED
131132
bool

arch/sh/boards/mach-dreamcast/setup.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@
2525
#include <asm/irq.h>
2626
#include <asm/rtc.h>
2727
#include <asm/machvec.h>
28+
#include <cpu/addrspace.h>
2829
#include <mach/sysasic.h>
2930

3031
static void __init dreamcast_setup(char **cmdline_p)
3132
{
33+
/* GAPS PCI bridge assumes P2 area relative addresses. */
34+
__set_io_port_base(P2SEG);
3235
}
3336

3437
static struct sh_machine_vector mv_dreamcast __initmv = {

0 commit comments

Comments
 (0)