Re: [PATCH 1/1] sh: dreamcast: Fix GAPS PCI bridge addressing
John Paul Adrian Glaubitz <[email protected]>
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.kernel |
|---|---|
| Message-ID | <1ba5bbc958e6e5e1e442d942d490aeea9cfda602.camel@physik.fu-berlin.de> |
Hi, On Sat, 2024-05-11 at 21:16 +0200, Artur Rojek wrote: > 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 <[email protected]> > Signed-off-by: Artur Rojek <[email protected]> > --- > arch/sh/Kconfig | 3 ++- > arch/sh/boards/mach-dreamcast/setup.c | 3 +++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig > index 217bdc4d0201..f723e2256c9c 100644 > --- a/arch/sh/Kconfig > +++ b/arch/sh/Kconfig > @@ -126,7 +126,8 @@ config ARCH_HAS_ILOG2_U64 > > config NO_IOPORT_MAP > def_bool !PCI > - depends on !SH_SHMIN && !SH_HP6XX && !SH_SOLUTION_ENGINE > + depends on !SH_SHMIN && !SH_HP6XX && !SH_SOLUTION_ENGINE && \ > + !SH_DREAMCAST > > config IO_TRAPPED > bool > diff --git a/arch/sh/boards/mach-dreamcast/setup.c b/arch/sh/boards/mach-dreamcast/setup.c > index 2d966c1c2cc1..daa8455549fa 100644 > --- a/arch/sh/boards/mach-dreamcast/setup.c > +++ b/arch/sh/boards/mach-dreamcast/setup.c > @@ -25,10 +25,13 @@ > #include <asm/irq.h> > #include <asm/rtc.h> > #include <asm/machvec.h> > +#include <cpu/addrspace.h> > #include <mach/sysasic.h> > > static void __init dreamcast_setup(char **cmdline_p) > { > + /* GAPS PCI bridge assumes P2 area relative addresses. */ > + __set_io_port_base(P2SEG); > } > > static struct sh_machine_vector mv_dreamcast __initmv = { Reviewed-by: John Paul Adrian Glaubitz <[email protected]> Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913