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: 13036659 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 CAD3CC4332F for ; Tue, 8 Nov 2022 18:13:26 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pP/iI/i7KfZD1EHyrwiipQySbsNPhlhK7hLvu8ZjY3I=; b=BhVrII5ASPvmZs fGoYIO9zLEjMmRXrVf/rVM3aAGLXj6W1R/bEelAalx+JlmtuXXE29zXO9IuPafBy0YvtXQHjpY74P InHzNIxee8UKupu4AYAp5n2yOYiSB0JERHVNiVM/cnRo0B6Wq5zqlLqaUHWFdMspV2bZv9NHHtlUl hRBUol31nd1mcp7s+UbECl1v5SriPs4/JVvU9850oKXt48lfQFf5pb9q2R6842JWWLlfr1P9+gPbv hC9Vf5mLKwbnoOsSChjP18G1AgpCD7KLUOkb7BQi5iHgV8AoOOxdjm5MBlOAz75KBX2Ohq2agpZgF y9KEraLhvQxevJLq9h8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osT58-007NNw-W6; Tue, 08 Nov 2022 18:12:19 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1osT4s-007NFQ-Uz for linux-arm-kernel@lists.infradead.org; Tue, 08 Nov 2022 18:12:05 +0000 Received: by mail-wr1-x436.google.com with SMTP id h9so22334985wrt.0 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=E/sn2ZREDzLG1HherQNAhVOS59hJgqYWETZw2vdjk6Nj78JT+gKNbEcX6k/kjc4Wa0 tSYsoL3DhqSh7Qi31dMkDD4P2e8aV1tnmCnhs1aw4EDIcBWDvOT2AH/P0a7C1zKSpGrK 68+BDGLI4lGk4nwBttdzJVjb2oDRzTkDnQm4Urb7DIbuS5iYpDnYd4Dqev3CF/C1VqqJ 8zIzsNT9RhXXzLPxjGHEb4UZtoqAT9KB0P7GOrIaKiFi3fZWSqp1h267r8tOACBisxm4 +6Zs84cuNEwuQtwbC1ZCtwwPYoJVxMvReLTFrBLZ3msi+itr6Punt9tKtCTthy9Du5Qe WWDw== X-Gm-Message-State: ACrzQf25ZZvw5phlZMANYgmWOXBIfh84vak8br8hcVyLKqrK2uVdDijk kQF3/EC/BpyTdxb95HbwAbpRow== X-Google-Smtp-Source: AMsMyM4zwNIKjWHFWuuVksh8ihwA/QeBVm6znp/91kqCcZh6c1XMvSaZUB3EAGZQ+xveSVcckOCYDQ== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221108_101203_035768_2A764537 X-CRM114-Status: GOOD ( 15.57 ) 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 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");