From patchwork Thu Oct 13 09:13:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13005778 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 6BB60C433FE for ; Thu, 13 Oct 2022 09:14:49 +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=BClelvjjz5+02qCyAFSQFw7qZNzA9ox8HMhgShF3an8=; b=nqVvQskR9oDm49 MhhCmawa8XtkHBTKfPzXBpKXr5WALyghk0SF7NJ9zgga0G2/ldHyJCFbgGUma1sQoDQ+ps0yu4Ycm 12H8t0Wfr4pd3PfxBLTmQBBbNN8AdJAGq30oag76WKFLJH+ScF3ivkoR7Rg31Qcl5xcyueRoqdLqf 15OPKxDgGJbjQgwIarg0t/3pqhJLZ2WD7fQ6yHUHFNDjliC9hPajX4ElJwvU6irIkAVMbWLnuIZ0J C4nFIDxOHX4JLAr0xGK/uZcMMuAI+1ujVeAHMgdtllA7B04mnb6zbpUECpfW0XDJw7UqOZ4IFxZVg 1AVlQyaxOk9o3wzUci1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiuHZ-00BEW8-4i; Thu, 13 Oct 2022 09:13:37 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiuHE-00BEP0-Mz; Thu, 13 Oct 2022 09:13:18 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1BE895C010E; Thu, 13 Oct 2022 05:13:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 13 Oct 2022 05:13:16 -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=fm3; t=1665652396; x= 1665738796; bh=ML+ODx52p7Zj2uoXLzDPtbac1cZv+/aiKbj3DuchnPg=; b=Z ztm9CmuT4VAB2juZKzyeSFGG0KmTGkeilo+yzIa/RX04+1ExkNDcceHwrUeyNLXu SdWtvJX7aLLK4UNNx9F1G1LRM1KqzEoyiKH0HGR5qk0G0xshUja5+6xSiTXF6mBV lHsd8qw3DBLDUHzeEskY8WtuKRubrlj/6gE2LkMYA7scjNcYENBupDXJUdJ9mJJu KO82lWdbMAEJKqWwPFlM1Hozom5N7yEdriGlK8Ug0dlMfNU+4NhY5Sw8xyouK9Lm 7xhCZTV7s2t4x/bc6HRs4+sFdBqx0pFaFyz8VCX7b6bPeHYNK87e1h3WXfeU7EC6 sk1FiWS1xVUP3t+yaUp7Q== 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=fm3; t=1665652396; x= 1665738796; bh=ML+ODx52p7Zj2uoXLzDPtbac1cZv+/aiKbj3DuchnPg=; b=n HtSHUb+wyBBcF54w7Q/rgZo9noa80Q6Wy3vhZzQMn5q9KrDzuYiSV4U/VYPAB7gd 7FpGt0Iu6v9Txu8wQ7PUs2uNOJ9duxR4vyYDYsNgDaaJtNLP7t5DDWF1ZYik5ju6 37K8qzUCY20Rnxk14/wKdeh7mGiwGadenzCG2Ny7Ji1lpyK90nu6JWPvTGAGCiGt yo64YhTK2FszaEQmfsS8HaU2qJrFtOAiUL2MRBncL21iVriQ1SdpBeW7K1AIm4hi 1JAZZfRb53t43Z4u3yuAXighP8b1FYUyyQzgzbmJaftCOtMf1BpmEMki8yI3/k+r S3xvxUqOSf76qlNfp2IYQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeektddgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtkeertdertdejnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepudduudfhveejteefgedvffdvvedvjedugedukeejhedtlefhffevtefh jeeltdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Oct 2022 05:13:15 -0400 (EDT) From: Maxime Ripard Date: Thu, 13 Oct 2022 11:13:09 +0200 Subject: [PATCH v3 2/7] firmware: raspberrypi: Move the clock IDs to the firmware header MIME-Version: 1.0 Message-Id: <20220815-rpi-fix-4k-60-v3-2-fc56729d11fe@cerno.tech> References: <20220815-rpi-fix-4k-60-v3-0-fc56729d11fe@cerno.tech> In-Reply-To: <20220815-rpi-fix-4k-60-v3-0-fc56729d11fe@cerno.tech> To: Florian Fainelli , Michael Turquette , Emma Anholt , Stephen Boyd , Ray Jui , Scott Branden , Broadcom internal kernel review list , Daniel Vetter , David Airlie , Maxime Ripard Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Maxime Ripard , Stefan Wahren , linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Dom Cobley , dri-devel@lists.freedesktop.org X-Mailer: b4 0.11.0-dev-7da52 X-Developer-Signature: v=1; a=openpgp-sha256; l=2282; i=maxime@cerno.tech; h=from:subject:message-id; bh=O/C1GjD9JjcVdok+PjgiTRoaq2K0l0WecgWMoNXNBjc=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMnu15b0K5av2VF75NSt4gqL5EWt6vqMOaZyr9vz33GyT5uZ et6zo5SFQYyLQVZMkSVG2HxJ3KlZrzvZ+ObBzGFlAhnCwMUpABPhYmJkOC+wr4r35bX1EyYeelvuFv DyUGPewwUFHOI36zNnfb3Xe5+R4Y1a/5b89Y5n9/w8uts69sa/cotjuYu1rgiuP9lyuenwYj4A 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-20221013_021316_849883_211B070E X-CRM114-Status: UNSURE ( 7.92 ) 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 Acked-by: Stephen Boyd Reviewed-by: Florian Fainelli --- drivers/clk/bcm/clk-raspberrypi.c | 18 ------------------ include/soc/bcm2835/raspberrypi-firmware.h | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 18 deletions(-) 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);