From patchwork Tue Jul 25 00:42:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 125257 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2169950vqg; Mon, 24 Jul 2023 18:47:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMxRU+w87lyb0gqNXoFRCcB46Ai+3TpvoRTcBdA8Wb8LnBGfKwBRAgDsqrghBFxOEkYlD3 X-Received: by 2002:a25:d2d6:0:b0:d0a:fa7f:2fbf with SMTP id j205-20020a25d2d6000000b00d0afa7f2fbfmr5116565ybg.48.1690249667839; Mon, 24 Jul 2023 18:47:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690249667; cv=none; d=google.com; s=arc-20160816; b=bGlWhfuRAPeFvrmLA0Y5lzoY+tTNjDOaCfjWS16oyxaeqc81JwCepCq2VMTi2r7Ck6 uf1sjwVPqFww4C9QgR3I3nZjsZZmotMteuwZSheVcaXRy9iYFv8TRR0Ci6imho6aDJnj 7H2hzHG/Pe4Swm0x2LtiSCMBM81Ef7IcYUApbcI5kx8PAN0eWutJQmuySB6Y5ckqTPGM m/nOOa3MOC/UF9EXWD4HrARE2NjKEI4rvDhxCBUSc5A56+xSo88CsYDxNt1IXhRYymT4 X5jO7nZYmzEVcyOGHbFUcvFyrAT2qnQ+tAISUONKTzArjZswlHQ33X3UWtwaa/Vt547B IiZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cb3Vvpjv1LmFtv57q/x9jijKmz7uqCPq02odS2uEdoE=; fh=c18xmANgcW2kOO3w8g1Fr9CSWOxaOKK/VpT/WGyCUXg=; b=Ysd7Cso1v4grPm3rUfQg0OXzL+1Gg+XEkDEjOO71FVqvcfskUN2tqA/wNu4uaTCcY5 h6wQyXhNzmKIu6nse1ogOywWCRRS13bDk4JowS/ffY1nz7yOrRTZf/IqDrmSJh66Rq6l vwJy3FsufumKzxNOByK7f2kug/s4Q/B4rC/XKfSl6PTHrwhh1cFC5hWFcKl3YLjPq3KT gosZifi7hWdBuSvEf1wOHjN7IOJWxzUux1M69NuZcWhQAO1/WMF1qgVuzOJjttVJkm00 mj2Abmkn7np9r0WPGD1UHKea71miZPnmIwV+ZIF2/1lGG2YUctFoWY8tDtuoCnrxzUOs EpxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=NJz5Pqvz; 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=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q21-20020a656a95000000b0054ff0e193fesi10800768pgu.225.2023.07.24.18.47.35; Mon, 24 Jul 2023 18:47:47 -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=@sifive.com header.s=google header.b=NJz5Pqvz; 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=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229895AbjGYAnG (ORCPT + 99 others); Mon, 24 Jul 2023 20:43:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjGYAnA (ORCPT ); Mon, 24 Jul 2023 20:43:00 -0400 Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 908FE1993 for ; Mon, 24 Jul 2023 17:42:52 -0700 (PDT) Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-565f3881cbeso3483773eaf.2 for ; Mon, 24 Jul 2023 17:42:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1690245772; x=1690850572; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cb3Vvpjv1LmFtv57q/x9jijKmz7uqCPq02odS2uEdoE=; b=NJz5PqvzKA92Zx6p/keou7qhR4dQjMQTGZKceWN2gyyZABNNExi9h9o6AsUcaoHajk l2JHilIUtr+3NvwhkDMJHlH7sAUJQRGdWWLCPwhZWey4RMvp8ksoxj3Q+7fb6fXuQu2S FIlXGfZFfparRohpUUi7z8Aa58ncz1lz0ihykjLa8mM3fdx9rBxIei/vy4OcsRc0OxRz Nbpp5bkxj6JFCFYct3COrH2sM7Lh8rrWSATU1tzBP0K7o3qOO/YomOpvn6ExEeKE0DBh 0V4ipv7rGgmC2k1QtEcavM2waIfEj41z2ths0NsmFwxUs2TlDUXssTL2sG+D8vkbbGNH ImPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690245772; x=1690850572; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cb3Vvpjv1LmFtv57q/x9jijKmz7uqCPq02odS2uEdoE=; b=Vd1QQviVPUeLaUNxt8fNTGRHDwUadGfhiYe06F0Cs5WEYjm1f7KuI+e7w0d7LAirLI grpMTPWDEAtGRs/0SW9bHik33DC5eld/5IcRBQkv7G2Sb3EmbuGnzf9v3h7xhnmHgfBn cWRkcEi/qHOn5oBE9eylcsS28UWT+K7vijVAgAx0Ko48BHcd+1y8x4lCQrZjMg5f8g9m T0g0+PzG9ebws//qazoEoZyE5S/GNMxBdAodtyU4z9ecYI48F+NzpAZZvW1MDw9rSOR3 Ox+Nu8N37G3GVNrkJbIcRVCcgrcLTxafG69uNnG3875+OyhEoPqfSoTL74UyHFnbOO9U DFOQ== X-Gm-Message-State: ABy/qLYIQayWdsIEylhpa5jfHMrm+L2HUnQMZsHH0sj1J+AyjBrF8bcr iV7OUcnixyVS4kpCC1TDy3pegw== X-Received: by 2002:a05:6358:52d0:b0:132:d07d:8f3b with SMTP id z16-20020a05635852d000b00132d07d8f3bmr11668726rwz.28.1690245771818; Mon, 24 Jul 2023 17:42:51 -0700 (PDT) Received: from sw06.internal.sifive.com ([64.62.193.194]) by smtp.gmail.com with ESMTPSA id u135-20020a63798d000000b00553b9e0510esm9042655pgc.60.2023.07.24.17.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jul 2023 17:42:51 -0700 (PDT) From: Samuel Holland To: Michael Turquette , Stephen Boyd Cc: Emil Renner Berthing , Samuel Holland , Conor Dooley , Palmer Dabbelt , Paul Walmsley , Yang Li , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v2 2/2] clk: sifive: Allow building the driver as a module Date: Mon, 24 Jul 2023 17:42:48 -0700 Message-Id: <20230725004248.381868-2-samuel.holland@sifive.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230725004248.381868-1-samuel.holland@sifive.com> References: <20230725004248.381868-1-samuel.holland@sifive.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,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: INBOX X-GMAIL-THRID: 1772355235543439680 X-GMAIL-MSGID: 1772355235543439680 This can reduce the kernel image size in multiplatform configurations. Signed-off-by: Samuel Holland --- Changes in v2: - Add MODULE_AUTHOR and MODULE_DESCRIPTION drivers/clk/sifive/Kconfig | 2 +- drivers/clk/sifive/sifive-prci.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/clk/sifive/Kconfig b/drivers/clk/sifive/Kconfig index 2322f634a910..49597d95602e 100644 --- a/drivers/clk/sifive/Kconfig +++ b/drivers/clk/sifive/Kconfig @@ -10,7 +10,7 @@ menuconfig CLK_SIFIVE if CLK_SIFIVE config CLK_SIFIVE_PRCI - bool "PRCI driver for SiFive SoCs" + tristate "PRCI driver for SiFive SoCs" default ARCH_SIFIVE select RESET_CONTROLLER select RESET_SIMPLE diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c index e317f3454e93..09a76248a710 100644 --- a/drivers/clk/sifive/sifive-prci.c +++ b/drivers/clk/sifive/sifive-prci.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "sifive-prci.h" #include "fu540-prci.h" @@ -618,9 +619,8 @@ static struct platform_driver sifive_prci_driver = { }, .probe = sifive_prci_probe, }; +module_platform_driver(sifive_prci_driver); -static int __init sifive_prci_init(void) -{ - return platform_driver_register(&sifive_prci_driver); -} -core_initcall(sifive_prci_init); +MODULE_AUTHOR("Paul Walmsley "); +MODULE_DESCRIPTION("SiFive Power Reset Clock Interface (PRCI) driver"); +MODULE_LICENSE("GPL");