Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1211259lqo; Sat, 11 May 2024 12:17:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXyoU0R8VD1Ev81Ye7YTW2g9or1+y7pw0MTU6378vA7ldIk2zgVvZX3/crPENo1blfTBvCv58ZAgflbD4JRZfj8B9Pg1n2ue+/7WE4CQQ== X-Google-Smtp-Source: AGHT+IHEr1VefjwqqONAFrPxXe4egj3mRq/GUjgPLdeeBuUQXdKnLnJrJ28lWC53FgIbt4XnqslX X-Received: by 2002:a9d:77d6:0:b0:6f0:85dd:130d with SMTP id 46e09a7af769-6f0e90f26c2mr6153868a34.4.1715455068606; Sat, 11 May 2024 12:17:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715455068; cv=pass; d=google.com; s=arc-20160816; b=Wnou5Ck3ciXTAwq83/slm35XDhOKXFAdyQA46aDZubung4dQ2uvoSca/SsjIZIBEb4 +3ycaXmZvja9UJPzozXPPerb5gupCgjSyV2koBWTcYILExdc+hlfYRbsJF3Xx6ws9xH1 XxbJjoc0hVjt37z60vhI+gPaKYApyRtAi3JLgNdR7ygfsnLLOIK0gv4AjWjgJOdU07Te PZsnJzpBTG56LMvh5FE1CLeR/dYYUCIoEpj8LfQi6fKaKi48egVqhGAwfDB1eIYyAFgk vhMFflEf/Uy/P/VptpVqrk5zN3hCMrwogydp98n1bU0CmTan62rShRLdWuxMN15P+YK5 f2sQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=N6DaWqx+D4oI3FBt8Lvercw3EMptHVkFTyXvQbCMJKw=; fh=iavadByEOFZQ+bZ9ERRzplOQ+BVjn61Grf3VAfI3iks=; b=H5b5647b7c2WnlfkAfhAkc7oUVFHD6YhwQ6qD6DipxybGNCkXDnKySB/goMk31Pu1S qhq83Ch35m+j/fYHtc30T5UVlEgqQzjG4WG6F0y+fVvJM+qElywMT6ZwYFpvIdDdwTyj Dgt5tq69/E83MAIOHH1OLYl3SpKSJoapUlAsHCteEZdyr95XPBL9CuJ/Vkmt20JjvYJb xS2UOfb5OiQYqvApRRxACep4lvZ6zt9ypS8C4l/aIqZaxwua2q/dFXOlcqFMzOpHrzDz kk/s+s40CxXBE4XA9LKJ3dSn51+If1E6Te9pXYDALEtnpYewFoLBaxGqHpvLqpmHOIxn DloQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=artur-rojek.eu); spf=pass (google.com: domain of linux-kernel+bounces-176693-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176693-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792bf38d4b2si690685485a.728.2024.05.11.12.17.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 12:17:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176693-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=artur-rojek.eu); spf=pass (google.com: domain of linux-kernel+bounces-176693-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176693-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 548931C20B33 for ; Sat, 11 May 2024 19:17:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92700208A9; Sat, 11 May 2024 19:17:30 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 888411CABF; Sat, 11 May 2024 19:17:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715455050; cv=none; b=CvtPgQBCB64AVI0Ld7/8L+J4RtB3M3NAyOF5YUfUjU2/EMtk20I9rQ7V4qJSSAmB/1wxGxKT2OM2TjUSCFy8oVKd4SIfZt8wIC0+yZytGu9fuhrDzycX5QmyR7+DJf4OT7gJTMIStjME1tdilf/0vAiyo5uK1UeLCwnA7w0+OUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715455050; c=relaxed/simple; bh=26xCqLa3bHFY0yayOPph5pktQTDIuMbgEypxVupkULk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EsgyYA4ZBTZfEbFOzfgS58odjsCGrIZrsqzFqaIpK2QusFl4dzgBQNQ+1AcbnlxdlyXrpxWaNV9pFKYGJx94C9UyamxuRGqmKFQqhEMcNSCu8beSvkJe+f6iEDvl8j424yj2Q/olAyRano2V3Eqo/E3VwdVJ4/m2tT50Ej/wYFY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=artur-rojek.eu; spf=pass smtp.mailfrom=artur-rojek.eu; arc=none smtp.client-ip=217.70.183.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=artur-rojek.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=artur-rojek.eu Received: by mail.gandi.net (Postfix) with ESMTPSA id 4B588E0006; Sat, 11 May 2024 19:17:18 +0000 (UTC) From: Artur Rojek To: Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , Paul Cercueil Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Artur Rojek Subject: [PATCH 1/1] sh: dreamcast: Fix GAPS PCI bridge addressing Date: Sat, 11 May 2024 21:16:14 +0200 Message-ID: <20240511191614.68561-2-contact@artur-rojek.eu> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240511191614.68561-1-contact@artur-rojek.eu> References: <20240511191614.68561-1-contact@artur-rojek.eu> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: contact@artur-rojek.eu 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 Signed-off-by: Artur Rojek --- 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 #include #include +#include #include 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 = { -- 2.45.0