From patchwork Tue Sep 20 12:50:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12982094 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 614E4C6FA8B for ; Tue, 20 Sep 2022 12:54:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=E9xkUpyUmg/QwI7y1Z9DJzbGHRFLArDvK4sPfU8EZSU=; b=XiS25k5wUVnLlP MnEP011GPUz2nBfbm9jCDnAI883pNydSoM9P2Nv9rfTkgwt99afVgf07VL+ql8CHuxqoQNlVOgAP7 JZvTBJgSZzP8nOZ0itTQcGfJ2IbRD8ftNHhgu9jzFfhWhtfACW35fgecze+Ef5pcZpKaq8GcHxFLi iQ4mP0uzc4ZUXw+jVtXoeLgsllz4DEsbzxgjQIKxUNTBT1ULoq8Qxb9CcJbQNmPZ2cvX2icS3UoPi FvpmZjH2J99OLvogsrggp2OWpvIZHdNug1u9P8lvOSkH+GAcmL2l5CbboSvhV9aioq4c9h0yNDFdH cwQ1sGg0Iwzih9LFSN5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oackM-003psU-EA; Tue, 20 Sep 2022 12:53:06 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oackJ-003ppm-J6; Tue, 20 Sep 2022 12:53:05 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 7B83A320094D; Tue, 20 Sep 2022 08:52:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 20 Sep 2022 08:53:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1663678379; x= 1663764779; bh=vbFyspAQsg3yNRKNMEYHBJbMt9LJYRJ5b26Dvh979Qk=; b=v sK/UngwTugPfIsTCCqWL0HVQiUHWOhNnKrheAMPeBbIzKFSh/qJuDg2zNEFA8dJ1 VBvd5kc6GPonPe5b8LqjLEUDl+o8vw33JBQZ+h6bS303QJ644l2WDqNeNzSbptzU L2m+sva5YL3/Ovh4G+D0cMkUk4dERjViK1u6B2L420cE1YWyZr1Ct4fHaCwVG30D 9+Uavi40C7ob1t38jkcKK9hyrig30SmS/5fdu0CkEA9/M6yCQi4GocsVqBMr2hCG fCKEcJuVgkPcqxITMAA7d3JDkEWv1/1U7ki8uQxegCDFYCm1ap3jbO9kxIUMHZIF qceiq0ARxytRc6Z2lfULg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1663678379; x= 1663764779; bh=vbFyspAQsg3yNRKNMEYHBJbMt9LJYRJ5b26Dvh979Qk=; b=S RepxWrcdnlKEvbeAOl3WQNvcm4uGmLtIotrMC3KIkGCM+TwK1WbDbhv/19bk04NM pmXfap/EfbnRlSKJ1d4u+LrANWJ1I9KAFdotFv7d3G0WksKoQKzJ0U7DPIei6nLz zjeX8uRvMseJCd0mnfL3yuPvGzx2KdRUlANmYZPSvaZGXh4kwO06HaObS6ZRfRgA k2us+gfY5iRF4axdQ+sEy4m9oWQK+XnnSDHoz3bLAYOcd3en8jRN/+F9A48MWoXI Q3JUSORlVw4MZv/KBVLfI8cojJVx+d76+CmWPq/m/tH18lnf2VRayrLdRgWkVO3n v5IRBvsud+f5XvwDDdbWg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvledgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtkeertdertdejnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepudduudfhveejteefgedvffdvvedvjedugedukeejhedtlefhffevtefh jeeltdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Sep 2022 08:52:58 -0400 (EDT) From: Maxime Ripard Date: Tue, 20 Sep 2022 14:50:21 +0200 Subject: [PATCH v2 2/7] firmware: raspberrypi: Move the clock IDs to the firmware header MIME-Version: 1.0 Message-Id: <20220815-rpi-fix-4k-60-v2-2-983276b83f62@cerno.tech> References: <20220815-rpi-fix-4k-60-v2-0-983276b83f62@cerno.tech> In-Reply-To: <20220815-rpi-fix-4k-60-v2-0-983276b83f62@cerno.tech> To: Daniel Vetter , Florian Fainelli , David Airlie , Broadcom internal kernel review list , Michael Turquette , Scott Branden , Stephen Boyd , Emma Anholt , Ray Jui , Maxime Ripard Cc: linux-rpi-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Dom Cobley , dri-devel@lists.freedesktop.org, Maxime Ripard , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.10.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2076; i=maxime@cerno.tech; h=from:subject:message-id; bh=TrD+SFGf4YZRmdJ85X/XZBFv+MxAtrE6oLVm8pSPxrw=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMma2/leWNqdblzx/Y+AwZ8j3HPZbF4dVSmZGliQHbXNb1LG mvNbO0pZGMS4GGTFFFlihM2XxJ2a9bqTjW8ezBxWJpAhDFycAjARtk2MDPP/1rtrfb6j+k36uGize3 Nk8e/Vtg/rfr2RWO55RuBP3xNGhlPLtO40VXrUJSzWeWgwS7AyteNG6gPzrVVTa9euCf2Qww4A X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220920_055303_815469_472CE594 X-CRM114-Status: UNSURE ( 7.11 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We'll need the clock IDs in more drivers than just the clock driver from now on, so let's move them in the firmware header. Signed-off-by: Maxime Ripard diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c index 876b37b8683c..1f5e6a1554e6 100644 --- a/drivers/clk/bcm/clk-raspberrypi.c +++ b/drivers/clk/bcm/clk-raspberrypi.c @@ -18,24 +18,6 @@ #include -enum rpi_firmware_clk_id { - RPI_FIRMWARE_EMMC_CLK_ID = 1, - RPI_FIRMWARE_UART_CLK_ID, - RPI_FIRMWARE_ARM_CLK_ID, - RPI_FIRMWARE_CORE_CLK_ID, - RPI_FIRMWARE_V3D_CLK_ID, - RPI_FIRMWARE_H264_CLK_ID, - RPI_FIRMWARE_ISP_CLK_ID, - RPI_FIRMWARE_SDRAM_CLK_ID, - RPI_FIRMWARE_PIXEL_CLK_ID, - RPI_FIRMWARE_PWM_CLK_ID, - RPI_FIRMWARE_HEVC_CLK_ID, - RPI_FIRMWARE_EMMC2_CLK_ID, - RPI_FIRMWARE_M2MC_CLK_ID, - RPI_FIRMWARE_PIXEL_BVB_CLK_ID, - RPI_FIRMWARE_NUM_CLK_ID, -}; - static char *rpi_firmware_clk_names[] = { [RPI_FIRMWARE_EMMC_CLK_ID] = "emmc", [RPI_FIRMWARE_UART_CLK_ID] = "uart", diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h index 63426082bcb9..74c7bcc1ac2a 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -136,6 +136,24 @@ enum rpi_firmware_property_tag { RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001, }; +enum rpi_firmware_clk_id { + RPI_FIRMWARE_EMMC_CLK_ID = 1, + RPI_FIRMWARE_UART_CLK_ID, + RPI_FIRMWARE_ARM_CLK_ID, + RPI_FIRMWARE_CORE_CLK_ID, + RPI_FIRMWARE_V3D_CLK_ID, + RPI_FIRMWARE_H264_CLK_ID, + RPI_FIRMWARE_ISP_CLK_ID, + RPI_FIRMWARE_SDRAM_CLK_ID, + RPI_FIRMWARE_PIXEL_CLK_ID, + RPI_FIRMWARE_PWM_CLK_ID, + RPI_FIRMWARE_HEVC_CLK_ID, + RPI_FIRMWARE_EMMC2_CLK_ID, + RPI_FIRMWARE_M2MC_CLK_ID, + RPI_FIRMWARE_PIXEL_BVB_CLK_ID, + RPI_FIRMWARE_NUM_CLK_ID, +}; + #if IS_ENABLED(CONFIG_RASPBERRYPI_FIRMWARE) int rpi_firmware_property(struct rpi_firmware *fw, u32 tag, void *data, size_t len);