From patchwork Thu Oct 20 09:12:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 6071 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp150438wrs; Thu, 20 Oct 2022 02:19:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6M8mbLMkqYSMm77lHcbVRg/CNM5JVbQuZEUfh+zEdvR876HRrsU6+PfoOpwdIv9snFTk+b X-Received: by 2002:a17:902:6a86:b0:176:a6bc:54c0 with SMTP id n6-20020a1709026a8600b00176a6bc54c0mr13146034plk.87.1666257548565; Thu, 20 Oct 2022 02:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666257548; cv=none; d=google.com; s=arc-20160816; b=ueOdhFdnNx7m+U0D/EnPf6FITWVecHLntsAdd1OPM/6BmZV8gCtUKh/RwXsco2DF4j 1ukYGcb7Lr2HrB7Os2TLdrvGMD1Aii4RPo9Kt149kJhuNk4SGchhPqr6BburAhIW4tPD CLHdWhB53RCl+SxfJby//RngiPmTyuciKY2XEQqvqIlotG1NPbeGhp/hqItbMkrwxpVd x763g4eP+R+qhFCsXKkWv9Ri5zCnf/pEhXjG/97bof1vdCHN3vm/2j1RUXtfDCSQmW6G gnhjrZpeLuflhuDO6PZizEdXCRac1WDm1bFrt9P1FKr+EyUIjGNDGFLkdybBe+eUUhOy DUAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :feedback-id:dkim-signature:dkim-signature; bh=Sk4BFebag+VOrDKszwVl8BLZy6XUc1sTCb5w0z0P9Kk=; b=Vy5ksIO32oL3E/uisdLPOCAou42h8o2O/2NhmIGboFL9r1CYP+lJukihVNiM9Z2l+v U/2S0YdVz+JtohZWMJCK2w1Iit+kHGQ/58Que1Qt8Osx2K3FzPaRqCOyhYZ9RJ0T9Kj7 Rd63ceACd0FypEt69wso+c/ZbxwqAovJBWNT8M5bpAR/YsHTf1kFTKhkIUfsUa/Ro0MW n6QXWlJNekFFfSGxBr9TRvv36I6E1U7ywREkONgBaY8FIKv+aDyy2kCvIgGUwkefWC4D pait1eVes57b1JNkifR9deGWG4xGQTFo6H4cKaFtoO6oL9T0G5YHWcnDfIFmqdZ8PuRB ViIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=hHn1Iw9V; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=CwGp57QQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020a170902748a00b001865c55049dsi3434133pll.570.2022.10.20.02.18.54; Thu, 20 Oct 2022 02:19:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=hHn1Iw9V; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=CwGp57QQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229670AbiJTJNn (ORCPT + 99 others); Thu, 20 Oct 2022 05:13:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229962AbiJTJNd (ORCPT ); Thu, 20 Oct 2022 05:13:33 -0400 Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E74B91A20A1; Thu, 20 Oct 2022 02:13:32 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id F29E22B05E5C; Thu, 20 Oct 2022 05:13:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 20 Oct 2022 05:13:32 -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=1666257209; x= 1666264409; bh=Sk4BFebag+VOrDKszwVl8BLZy6XUc1sTCb5w0z0P9Kk=; b=h Hn1Iw9VXUhyUR8FZ0DpuIURN5Euth77P6CoLSy5SSMcakOGxvAqKIU0fYPTJG5Q/ XsbCm2c0x7cqXwo+TmsQoOnRCbgKoWeqyTdLo2YiBFIZBt2OT0kIeRpLX46+rHa9 mcqa3MikNc2aMoSXq2/I4zIb8QwOxuOXgyPZ4KP/K/RT4rzigbcsIeatgPW+aVto AUq6bsf5vShwxLJTktA4CIgHWDhmOibMtF6EMM2eag7hUsflbIw/1wDOmX9rCEyk B8LPVb48twCPFfkPCq8xWV0CnKjXsD5fqxCktwWrmB7dheF72ISv6LreejXv5PeE SNdPIC+F8EZ3KUeffYPlg== 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=1666257209; x= 1666264409; bh=Sk4BFebag+VOrDKszwVl8BLZy6XUc1sTCb5w0z0P9Kk=; b=C wGp57QQ4UJpxrp7H0eY0fOuPo76k8qtNIxkTqtAlbu5MdGSerFuttC6H6CE0v5pe FGYZJD7TA0X7C4EoHZ8P8LmY6HxFbhfB4lFub4J9wsgJHYnGIHJ9pvTRkq6bkIx6 VpbptG+Kh78vF7++d6LzrlcRaC/WR4P0rY0iVdg1Z9HhrZcUGohYV8+ozX/+ft/k 9igicH0yt5wClMCTaG29mzfFi6JBC9OZPrTU7THSJpxqasP83TCSUMEy2EVqvFKM ufFPmT54i3Vc61H9lwshID2YEB80vaEiYQjFBW5uGTIRd8u0U5pcowZ9LXJPL2+v KR3KCJrnkjVTA5mjgz23A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeliedguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtkeertdertdejnecuhfhrohhmpehmrgig ihhmvgestggvrhhnohdrthgvtghhnecuggftrfgrthhtvghrnhepfeduhfegveehhfeftd euveeuleduuddttedutddvvdegkeehleevhfetkeetiefhnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvg gthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 20 Oct 2022 05:13:28 -0400 (EDT) From: maxime@cerno.tech Date: Thu, 20 Oct 2022 11:12:10 +0200 Subject: [PATCH v4 2/7] firmware: raspberrypi: Move the clock IDs to the firmware header MIME-Version: 1.0 Message-Id: <20220815-rpi-fix-4k-60-v4-2-a1b40526df3e@cerno.tech> References: <20220815-rpi-fix-4k-60-v4-0-a1b40526df3e@cerno.tech> In-Reply-To: <20220815-rpi-fix-4k-60-v4-0-a1b40526df3e@cerno.tech> To: Daniel Vetter , Emma Anholt , Michael Turquette , Stephen Boyd , Maxime Ripard , Ray Jui , Florian Fainelli , David Airlie , Broadcom internal kernel review list , Scott Branden Cc: Stefan Wahren , Maxime Ripard , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Dom Cobley , linux-rpi-kernel@lists.infradead.org X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2427; i=maxime@cerno.tech; h=from:subject:message-id; bh=vQwC10pcDMgH3Z7jjy/OWWSa/J/Ej9oSOOOeog/wkXk=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMmBAq+0dydstwg5tbeuM0JC5LqA3bZTzlP2HigTkFv9kO98 t+PWjlIWBjEuBlkxRZYYYfMlcadmve5k45sHM4eVCWQIAxenAEzEfT8jw67NRSdfM88q27fhy5tzax hMHs75FG6nvZn9wto4W7+9x20YGe79LXr/cPtk/Ws8r74ctT1lqHnn1tzWuONme7yczq37wcAIAA== X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747197675112404068?= X-GMAIL-MSGID: =?utf-8?q?1747197675112404068?= 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. Reviewed-by: Florian Fainelli Acked-by: Stephen Boyd Signed-off-by: Maxime Ripard --- drivers/clk/bcm/clk-raspberrypi.c | 19 ------------------- include/soc/bcm2835/raspberrypi-firmware.h | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c index 679f4649a7ef..ce2f93479736 100644 --- a/drivers/clk/bcm/clk-raspberrypi.c +++ b/drivers/clk/bcm/clk-raspberrypi.c @@ -18,25 +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_VEC_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..9b1db12d013f 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -136,6 +136,25 @@ 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_VEC_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);