From patchwork Sun Jul 28 13:06:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Usyskin X-Patchwork-Id: 13743997 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 798342F30 for ; Sun, 28 Jul 2024 13:15:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722172553; cv=none; b=NHiBic3ZTYboM43CcbfrQyl0oMhTl7rG7fpoSkZfdpWsY83b5cQKyTEew4BdopYA9REZaONQFYZlaZz/B+o3aFkDIaZ8sTZ3tBqkBkV248dNLk1N4BfESGKteuB17CFDDY/2LDE8oqLrwH6rpHlbHQ2I6JdU4tBphcOn8Qby58U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722172553; c=relaxed/simple; bh=XwjfPtNKP3xj4mYiGTP+Pjdqb0DSUXkzIDtfWZSx5QA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fr1BGvYwbNOtdOfveQ7zhFJRSqltPCS13u7FWiPUg/iXbbjfpqsDLA0YRzQHPXMw/fQ6MtcqanhEJvuxgQJPRPCdrRD2nhTRngKyZU3lh+h4egx4P6jARFpOjJVAbRcj/emR1xtvieCGnvfwEywg/buLbevItZRJmliYZ0/zmg8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=OV1yKT1h; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="OV1yKT1h" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722172552; x=1753708552; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XwjfPtNKP3xj4mYiGTP+Pjdqb0DSUXkzIDtfWZSx5QA=; b=OV1yKT1hXs6Cx+07OXKRN49jgDwc+Ees+Vwy8eyQClmB/P1/DkiWUSUy dhWw8EXQLP8ffQmdrxzAaU7qqhiAzY1XI9y8kMfXkZYTT0GIXGeQCkiS4 jyAoO8LSqHYnlI2wRHOuHAX0oP4SrsQlOF3YTl1x8QA5S+z3gKErega8c iRcIHnvGRhK88oIA5FQTkcOXWUKsSZO47YgUU0OigQiHyNEdH6nZ/V7/I 5qIGq2hnSb0t1tmNE+VsL8YVZQKE0BO7o+WCUwSPG40dTVz79Gj1tvc0p 3/xPUO3tSY1+NYSfR4Ag2x9f7zy/tL+axZ7aulnh/rOX40pZgGAHnz3uV A==; X-CSE-ConnectionGUID: zXHbQqy5TbGNgZt3z7gerw== X-CSE-MsgGUID: RfZbNGN9SOGTBIqVU5aYiw== X-IronPort-AV: E=McAfee;i="6700,10204,11147"; a="23713471" X-IronPort-AV: E=Sophos;i="6.09,243,1716274800"; d="scan'208";a="23713471" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2024 06:15:52 -0700 X-CSE-ConnectionGUID: GKUJ5cVCT3elu3pnZhRXKw== X-CSE-MsgGUID: zflZxDNhQs28HbvgvRuCzA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,243,1716274800"; d="scan'208";a="53389324" Received: from sannilnx-dsk.jer.intel.com ([10.12.231.107]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2024 06:15:47 -0700 From: Alexander Usyskin To: Mark Brown , Lucas De Marchi , Oded Gabbay , =?utf-8?q?Thomas_Hellstr=C3=B6m?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin Cc: Tomas Winkler , Alexander Usyskin , Vitaly Lubart , intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-spi@vger.kernel.org, intel-gfx@lists.freedesktop.org Subject: [PATCH v4 09/12] drm/i915/spi: add intel_spi_region map Date: Sun, 28 Jul 2024 16:06:35 +0300 Message-Id: <20240728130638.1930463-10-alexander.usyskin@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728130638.1930463-1-alexander.usyskin@intel.com> References: <20240728130638.1930463-1-alexander.usyskin@intel.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Tomas Winkler Add the dGFX spi region map and convey it via auxiliary device to the spi child device. CC: Rodrigo Vivi CC: Lucas De Marchi Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin --- drivers/gpu/drm/i915/spi/intel_spi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/spi/intel_spi.c b/drivers/gpu/drm/i915/spi/intel_spi.c index 4b90e42b0f86..200139531d26 100644 --- a/drivers/gpu/drm/i915/spi/intel_spi.c +++ b/drivers/gpu/drm/i915/spi/intel_spi.c @@ -11,6 +11,13 @@ #define GEN12_GUNIT_SPI_SIZE 0x80 +static const struct intel_dg_spi_region regions[INTEL_DG_SPI_REGIONS] = { + [0] = { .name = "DESCRIPTOR", }, + [2] = { .name = "GSC", }, + [11] = { .name = "OptionROM", }, + [12] = { .name = "DAM", }, +}; + static void i915_spi_release_dev(struct device *dev) { } @@ -31,6 +38,7 @@ void intel_spi_init(struct drm_i915_private *dev_priv) spi->bar.end = spi->bar.start + GEN12_GUNIT_SPI_SIZE - 1; spi->bar.flags = IORESOURCE_MEM; spi->bar.desc = IORES_DESC_NONE; + spi->regions = regions; aux_dev->name = "spi"; aux_dev->id = (pci_domain_nr(pdev->bus) << 16) |