From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Artur Rojek <contact@artur-rojek.eu>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
Paul Cercueil <paul@crapouillou.net>
Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] sh: dreamcast: Fix GAPS PCI bridge addressing
Date: Sat, 11 May 2024 21:30:15 +0200 [thread overview]
Message-ID: <1ba5bbc958e6e5e1e442d942d490aeea9cfda602.camel@physik.fu-berlin.de> (raw)
In-Reply-To: <20240511191614.68561-2-contact@artur-rojek.eu>
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 <paul@crapouillou.net>
> Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
> ---
> 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 <glaubitz@physik.fu-berlin.de>
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
prev parent reply other threads:[~2024-05-11 19:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-11 19:16 [PATCH 0/1] Fix Dreamcast GAPS PCI bridge Artur Rojek
2024-05-11 19:16 ` [PATCH 1/1] sh: dreamcast: Fix GAPS PCI bridge addressing Artur Rojek
2024-05-11 19:30 ` John Paul Adrian Glaubitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ba5bbc958e6e5e1e442d942d490aeea9cfda602.camel@physik.fu-berlin.de \
--to=glaubitz@physik.fu-berlin.de \
--cc=contact@artur-rojek.eu \
--cc=dalias@libc.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=paul@crapouillou.net \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).