From patchwork Tue Nov 8 18:11:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frayer X-Patchwork-Id: 17156 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2869909wru; Tue, 8 Nov 2022 10:15:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf5qul3dewrSYre1vpOOvkMKtyI0nEvmfT0swF+qYafwohax4rsa6EetR3meEF+gVcHYQH3a X-Received: by 2002:a17:902:8a97:b0:188:8cad:f8ca with SMTP id p23-20020a1709028a9700b001888cadf8camr3056302plo.84.1667931330487; Tue, 08 Nov 2022 10:15:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667931330; cv=none; d=google.com; s=arc-20160816; b=EXgZnlaR2Ea9SB8Td5+bg7ZTssDNuftmyNLvsVqAAgL18MUl9eRbbnqMlkBHi2KvhG MJ1PlRdtemS1VKkRAWK3Pv39JTD6mGDzC5PElTgiiDSZPg5+JyAcJ6K8h+nhd2wRKZKK bnCnEZXBTKuAwNmcQPB6tbkPa+ABYU1TJmRfAt29+zYrNoSXL+Vc0rCkNSG7O6c12pWs oCha4sXHtTKG+nZTdNmGEXWMXrnFECcBZxQB53SzArZMo0OQsRu68UARKcea1Tqn67Fl qBUL3NeuSUoIO/vhJAGLXz0eOSZPPZLYeyxw4JFbityR7rrIt5pZb6u9Hw7GYbF2rWdA HK4Q== 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=1m1DidO2rzjDMZlrvrKtja69hwcXTFXw0zP1Dxjbaww=; b=wELGrvvXq3Z8+SP6fp1vrC8bb4bBbOMxBl3IOKNWzti01zTXTa/sb819jhfDTqaQFc +7YDxngWV66ga0hdbX/V5Vpyvlq6+p12ENQywsu+wP5pMBdbKsF97FGU3DzTQ0g1IGgE SqbUU9x3Q0mqdEpmLPeHCkTm54l+s+hd7SeLNLPfJYYTLLqz8/ySRseVxE1dTHHSbjMi Jkb74/ABdIWW5i4GE0MjXvHn+sEgGYJ1HKejJkGUfLhEVDlEVil5/igrsS3InbzwOq5M erhhasgMV7oRc+2MPWXonErF2D8mORty0z9dq6NRhsU6fxkyRwigvV/EYqc8tiw+1rNV mmtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=P1bMXtA9; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a1709026b4c00b0018862b8c9a2si14133337plt.12.2022.11.08.10.15.17; Tue, 08 Nov 2022 10:15:30 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=P1bMXtA9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234638AbiKHSMY (ORCPT + 99 others); Tue, 8 Nov 2022 13:12:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234430AbiKHSMD (ORCPT ); Tue, 8 Nov 2022 13:12:03 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CCE458BC0 for ; Tue, 8 Nov 2022 10:12:00 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id v1so22248829wrt.11 for ; Tue, 08 Nov 2022 10:12:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; 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=1m1DidO2rzjDMZlrvrKtja69hwcXTFXw0zP1Dxjbaww=; b=P1bMXtA9ILahSmDOLipS/vaBF54BtW3he0nIKaV3F1tou04OZJoD1ZlskG63rQ/p/e f5QqCc36wvzp5Wcs+dnGtQ6GV5bmbADV9jb8khubwXHU2YVQd5Xcobtw+ab0rr8bGP5y RF4IoulpEZo6LZt+n9U1NK4OT8LfR+BAZUQjGkcqp0ymrEYTmsCP8bKANJgFFfqIB3ex sSAz9wt9TtxnZks6JtFG/IdC4ncWgjTEWd3/ls8cvd2uTo5/OQV1ffhJatQ/Ru8OXOYE +ZZhB+4M24NZbsexDA2VUToTZAIAw3V3FXgmj8s3ryRuBh8z9DtioUDF+y+VYamqhFEF jMpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=1m1DidO2rzjDMZlrvrKtja69hwcXTFXw0zP1Dxjbaww=; b=i+TelVv/fwstYk4JhMg0xBtPq5TnT6HuQV/P2AO1qmmYSmeJVEJzkhMuEmXxdLz9Lh ChU4i1R3rLNFBLlp8wS+CpNJ2BA8uG2EyCdqZ0+L23SLJSnH1ZQGbKWh5cNOcG2qmtRD UI4g5p70UbWTtaA4M4ZhSDzCVDieccxlW1CTFm30m3m90+sPCungx2iO6f3+ncCfh4ls roMQ+RtIe7bBhcpLLIxkkHJyOr7vWmd5vq2qa7bDT0DG1KEBoSAoJ9QzFPov+KMfvoA8 Peq1fmdyoouCbHXfWCFMaPf3FU8gQQO56cDOnBrRgjfGkxo60yTJkXyclILfncJ4p4fr nwiw== X-Gm-Message-State: ACrzQf1qXTL+pj1jK5SGpaG11Er4/rSLPhTHNZW3FhD1Ss9Juko9kbb8 gSlbYEw2m//E3ZBqA9RBVC4DVA== X-Received: by 2002:adf:f943:0:b0:232:ce6b:40d4 with SMTP id q3-20020adff943000000b00232ce6b40d4mr37395557wrr.453.1667931118943; Tue, 08 Nov 2022 10:11:58 -0800 (PST) Received: from nicolas-Precision-3551.home ([2001:861:5180:dcc0:7d10:e9e8:fd9a:2f72]) by smtp.gmail.com with ESMTPSA id q12-20020a5d61cc000000b002238ea5750csm13037109wrv.72.2022.11.08.10.11.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 10:11:58 -0800 (PST) From: Nicolas Frayer To: nm@ti.com, ssantosh@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, peter.ujfalusi@gmail.com, vkoul@kernel.org, dmaengine@vger.kernel.org, grygorii.strashko@ti.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-omap@vger.kernel.org, netdev@vger.kernel.org Cc: khilman@baylibre.com, glaroque@baylibre.com, nfrayer@baylibre.com Subject: [PATCH v4 2/4] soc: ti: Add module build support Date: Tue, 8 Nov 2022 19:11:42 +0100 Message-Id: <20221108181144.433087-3-nfrayer@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221108181144.433087-1-nfrayer@baylibre.com> References: <20221108181144.433087-1-nfrayer@baylibre.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1748952762387085201?= X-GMAIL-MSGID: =?utf-8?q?1748952762387085201?= Added module build support for the TI K3 SoC info driver. Signed-off-by: Nicolas Frayer --- arch/arm64/Kconfig.platforms | 1 - drivers/soc/ti/Kconfig | 3 ++- drivers/soc/ti/k3-socinfo.c | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 76580b932e44..4f2f92eb499f 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -130,7 +130,6 @@ config ARCH_K3 select TI_SCI_PROTOCOL select TI_SCI_INTR_IRQCHIP select TI_SCI_INTA_IRQCHIP - select TI_K3_SOCINFO help This enables support for Texas Instruments' K3 multicore SoC architecture. diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig index 7e2fb1c16af1..1a730c057cce 100644 --- a/drivers/soc/ti/Kconfig +++ b/drivers/soc/ti/Kconfig @@ -74,7 +74,8 @@ config TI_K3_RINGACC If unsure, say N. config TI_K3_SOCINFO - bool + tristate "TI K3 SoC info driver" + default y depends on ARCH_K3 || COMPILE_TEST select SOC_BUS select MFD_SYSCON diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c index 19f3e74f5376..98348f998e0f 100644 --- a/drivers/soc/ti/k3-socinfo.c +++ b/drivers/soc/ti/k3-socinfo.c @@ -13,6 +13,7 @@ #include #include #include +#include #define CTRLMMR_WKUP_JTAGID_REG 0 /* @@ -141,6 +142,7 @@ static const struct of_device_id k3_chipinfo_of_match[] = { { .compatible = "ti,am654-chipid", }, { /* sentinel */ }, }; +MODULE_DEVICE_TABLE(of, k3_chipinfo_of_match); static struct platform_driver k3_chipinfo_driver = { .driver = { @@ -156,3 +158,12 @@ static int __init k3_chipinfo_init(void) return platform_driver_register(&k3_chipinfo_driver); } subsys_initcall(k3_chipinfo_init); + +static void __exit k3_chipinfo_exit(void) +{ + platform_driver_unregister(&k3_chipinfo_driver); +} +module_exit(k3_chipinfo_exit); + +MODULE_DESCRIPTION("TI K3 SoC info driver"); +MODULE_LICENSE("GPL");