From patchwork Thu Nov 17 09:54:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frayer X-Patchwork-Id: 13046507 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 65731C4332F for ; Thu, 17 Nov 2022 10:20:52 +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=U62MJu2n+QJxw7345WHw71bc4RCwfUAY+BltGB8ESFI=; b=f/riArF88opS0k vSCdSaGgiohIgyqFyYgCGOza3TTJSLSoRug5vjiibUzeTaFHHD2TOpWVS9ZhhbNdl9gMO5KDEbODI qxiccjtWnp/lUpAKnJzEYyF5SEuL4aZUKq832stiq/paIw3P4kCjArfH5drgXGohFMcCZCYXJ5bD8 uVWv+eeZ3p09pkh932JqKBsN1hVatuwx23tJgJWRvPi0HuukeKTgoxGZsGppcRItpMCvKU/8708K6 JdSWBFVNqkU54N/eGOIVgSOYrsSGkNB8taOUFQEYDiEB3AKfHvCJZ4PIsav4chHuzQn6fseiVKogy j6QRwh3Ssvyv3ZUiGE3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovbzb-00CUNk-II; Thu, 17 Nov 2022 10:19:37 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovbbN-00CIlJ-UC for linux-arm-kernel@lists.infradead.org; Thu, 17 Nov 2022 09:54:35 +0000 Received: by mail-wr1-x434.google.com with SMTP id v1so2810220wrt.11 for ; Thu, 17 Nov 2022 01:54:29 -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=Ge4h32WeUIGGUsdbGaeuk/Z15cXvVv3yHykriwBprs8=; b=M841FhfJxObnrtEdbOtKlI0HLA5EgEowM7jaDkLFjHo+tSzLuXoqvpgB1W9CQQRSUc WcPNX/YceioFB0+Ml+eMl+I/hZSIGBE2NhE7Gk4hREUP5LujErdd0HWMLEMnA/ZlevcA +/gvqiuSx+X9b/mjXWZVJshxmkO3rgLb9fQ09CIZBeVsYDEFDmIPICcILs4xjHRMuE4o svl+8lFebrbRSZ0uoFUK4+lXFujmpz9/jeneQJ99kbUzLnxR7XlXoGE5jgdvp6+T7Y/s nVVV5It5qbuK1EB9DXk8kA3zpOGSjwA94caU9eop3kaIwOo7NWlLTw8yvk6uTIkQQcO/ /y6w== 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=Ge4h32WeUIGGUsdbGaeuk/Z15cXvVv3yHykriwBprs8=; b=PjULdJZM6TTWdKyPZfCSIPA6PFfkXCnouiZvffSXrWFbemuGtQWSESYHo/ZnXvrR6/ a+mQCmGSj4cEGqEKOBUDT+HoNBaW2XTzKcXUOP4iP3CCPLNja6oT2eJ7WV/wokhZIOAL dCQPnID7jkavqy6H3MOb86L4jwmZe53vk7zgIDkFOm1QApXVE2BRlYiSaNzoNqmrLbgF LSNkkDheyqKvJcmgdzv+Tn1ksaJNESVquhsN2znqx2VWM13KfEF9giaTcO/UXlzXIhvV d5soc4sD9ixXlFJTXt6tFjXh6bb72iPTMgUgmIsViLYiFpLScjRhxBwjKHPOGFbUnnZV y4sQ== X-Gm-Message-State: ANoB5pmlNBj+g/FVfDUoB4+844veHlowpg7miIrT7GqmXdKctBStAcpZ zmJ4EfihpLTfxdohsIDotF4cMQ== X-Google-Smtp-Source: AA0mqf6l0cQKDF/K1HFMIuXcsrD+LUWBqTwTOQ+o6QUUg5NOe9UpujiBnif5Ji3qGRkiw+9jw/SAWg== X-Received: by 2002:adf:e648:0:b0:236:774e:5b78 with SMTP id b8-20020adfe648000000b00236774e5b78mr980201wrn.351.1668678868797; Thu, 17 Nov 2022 01:54:28 -0800 (PST) Received: from nicolas-Precision-3551.home ([2001:861:5180:dcc0:9287:74a3:4740:e7a0]) by smtp.gmail.com with ESMTPSA id v18-20020a5d6112000000b00236e834f050sm497021wrt.35.2022.11.17.01.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 01:54:28 -0800 (PST) From: Nicolas Frayer To: nm@ti.com, ssantosh@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: khilman@baylibre.com, glaroque@baylibre.com, nfrayer@baylibre.com Subject: [PATCH v6 2/2] soc: ti: k3-socinfo: Add module build support Date: Thu, 17 Nov 2022 10:54:19 +0100 Message-Id: <20221117095419.171906-3-nfrayer@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221117095419.171906-1-nfrayer@baylibre.com> References: <20221117095419.171906-1-nfrayer@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221117_015434_007875_41FD6559 X-CRM114-Status: GOOD ( 14.47 ) 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..3244fa8a5b0e 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 ARCH_K3 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");