From patchwork Tue Oct 20 21:05:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 11847895 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3A1DC388F2 for ; Tue, 20 Oct 2020 21:06:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 43E532225F for ; Tue, 20 Oct 2020 21:06:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZWt1lPgk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="krqgZs6S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 43E532225F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GO3Z31K8ZSHjNayHGJnB480S8vHp2HLtpTLZ1iyaDyo=; b=ZWt1lPgknoMsfMcI0+uvWbmB9 qM/MIxgYjtLySJZMsYmhm3dNc5WLv7vWUzwYeoj+aCDtEQ3HaZkhUBds7u5IRSnalz7pA/MlWI6dG lOymii3cA9Vk8DnX3w3Ri17rCCZBa6vc6NMyrptgy4PNXN/owUjbWBPogJkQAfh9KDcq0tvpDoAzy updoUA1QwkmI+4u1USwwTv9nwgqjmNEppgIy2pDN/rFHv8YwLkhrTAtZ+Rp2Y25Ho9xHpPQ1MiKTb MRoWm/Wxd7piL/HbStUAdK4I815HorzThEsOsIe/jq9b2TBlWr+JzsvQJ2EOB7iQCceyXdmeskQpa XXuUOhL1w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUyov-0000LR-8q; Tue, 20 Oct 2020 21:05:25 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUyol-0000I9-Qh for linux-arm-kernel@lists.infradead.org; Tue, 20 Oct 2020 21:05:17 +0000 Received: by mail-pj1-x1041.google.com with SMTP id b6so1273184pju.1 for ; Tue, 20 Oct 2020 14:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lG0doM2xKDlS9CL9eIQhGhhVEvgRv8sVLWPG9BPQTzY=; b=krqgZs6SItweDkvof+cJREyp08gwBuFXaMmC44ZjEu8V0vIHWmO62p7pddDaRLyhd1 6L7TraCSdlOoCFBjU/BPf8Awky8uXzwLgt7FCiOqzDioqIlmYC8alo8bCSEQYf9vU059 105WvEz+RNeDh7oXPje2OdnM/B+uFztgO5WJ/Yw+7tJ4GMxcJlPE1XGbyuk2MJ7iX3vc T0PKdLWhcwXhiKjlrmUWPpFTEKEGC+JdeH8QKJXe/HdvVzUaH+Lk6rijRN7zFd37zq6W igg+2TYc4cd3j/fAZj3UfWZeOgfWROdv4QD/zamcSYLO/U4eNDyLd0B5XzYpAVT7ieeZ Cw0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lG0doM2xKDlS9CL9eIQhGhhVEvgRv8sVLWPG9BPQTzY=; b=OaFaG0KQkMTBgAUC3QzNPR80I49PARS+SaDupThTNcOi0EjOeVO0CIkAC1N1kSIFkB N4N5ow+gVjWRmgG0EHZ84BJ/epHcIksfk03pq98xGqL4ng+3BvA/DgfOH7M5WLlYfYqM tCTiHx2MJqLCmKRQK2cn6VAjcLjY+7ux8uYAnuZ1tIwwVHZjbVxNrtSbtboWC2aYN1TF GDg2GMFnfNzUi1N4kXMRlJAISBNPxgIRiQNUpflUkBQr4MTuoQ2mn81M/j6o4jy/qVM1 VOJZ+UArlgNbzAVMw0/B8yyGaMj2jLYGx+k9J+dmsITbTjOMhFgw1tCx/+Od42kznJte jM6Q== X-Gm-Message-State: AOAM531zpRC3Cn0o/KVqxUwgKD9WHqPM7keyCj3nUheGucowb57W+AT/ HIdBEAWfU2GpsY8CcNoyzehyFH+XnoQPdXxE X-Google-Smtp-Source: ABdhPJxr/aAH51YVxVss3vVMz9n8kY0Tn0Qb6S8RxyCkspu6tp8FpHhO1n81Fpla19dxPdYZDuJIMg== X-Received: by 2002:a17:902:d90d:b029:d5:ee36:3438 with SMTP id c13-20020a170902d90db02900d5ee363438mr39217plz.77.1603227913674; Tue, 20 Oct 2020 14:05:13 -0700 (PDT) Received: from localhost (c-71-197-186-152.hsd1.wa.comcast.net. [71.197.186.152]) by smtp.gmail.com with ESMTPSA id v6sm82666pjh.10.2020.10.20.14.05.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 14:05:13 -0700 (PDT) From: Kevin Hilman To: linux-amlogic@lists.infradead.org Subject: [PATCH v2 2/2] soc: meson: enable building drivers as modules Date: Tue, 20 Oct 2020 14:05:11 -0700 Message-Id: <20201020210511.20184-2-khilman@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020210511.20184-1-khilman@baylibre.com> References: <20201020210511.20184-1-khilman@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201020_170515_889189_60AAB482 X-CRM114-Status: GOOD ( 16.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Enable SoC drivers for 64-bit Amlogic SoCs to be built as modules. Signed-off-by: Kevin Hilman --- drivers/soc/amlogic/Kconfig | 8 ++++---- drivers/soc/amlogic/meson-clk-measure.c | 5 ++++- drivers/soc/amlogic/meson-ee-pwrc.c | 5 ++++- drivers/soc/amlogic/meson-gx-pwrc-vpu.c | 5 ++++- drivers/soc/amlogic/meson-secure-pwrc.c | 5 ++++- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/soc/amlogic/Kconfig b/drivers/soc/amlogic/Kconfig index 08a27d9cbc7f..174a9b011461 100644 --- a/drivers/soc/amlogic/Kconfig +++ b/drivers/soc/amlogic/Kconfig @@ -9,7 +9,7 @@ config MESON_CANVAS Say yes to support the canvas IP for Amlogic SoCs. config MESON_CLK_MEASURE - bool "Amlogic Meson SoC Clock Measure driver" + tristate "Amlogic Meson SoC Clock Measure driver" depends on ARCH_MESON || COMPILE_TEST default ARCH_MESON select REGMAP_MMIO @@ -27,7 +27,7 @@ config MESON_GX_SOCINFO information about the type, package and version. config MESON_GX_PM_DOMAINS - bool "Amlogic Meson GX Power Domains driver" + tristate "Amlogic Meson GX Power Domains driver" depends on ARCH_MESON || COMPILE_TEST depends on PM && OF default ARCH_MESON @@ -38,7 +38,7 @@ config MESON_GX_PM_DOMAINS Generic Power Domains. config MESON_EE_PM_DOMAINS - bool "Amlogic Meson Everything-Else Power Domains driver" + tristate "Amlogic Meson Everything-Else Power Domains driver" depends on ARCH_MESON || COMPILE_TEST depends on PM && OF default ARCH_MESON @@ -49,7 +49,7 @@ config MESON_EE_PM_DOMAINS Generic Power Domains. config MESON_SECURE_PM_DOMAINS - bool "Amlogic Meson Secure Power Domains driver" + tristate "Amlogic Meson Secure Power Domains driver" depends on (ARCH_MESON || COMPILE_TEST) && MESON_SM depends on PM && OF depends on HAVE_ARM_SMCCC diff --git a/drivers/soc/amlogic/meson-clk-measure.c b/drivers/soc/amlogic/meson-clk-measure.c index 0fa47d77577d..e1957476a006 100644 --- a/drivers/soc/amlogic/meson-clk-measure.c +++ b/drivers/soc/amlogic/meson-clk-measure.c @@ -10,6 +10,7 @@ #include #include #include +#include static DEFINE_MUTEX(measure_lock); @@ -681,6 +682,7 @@ static const struct of_device_id meson_msr_match_table[] = { }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, meson_msr_match_table); static struct platform_driver meson_msr_driver = { .probe = meson_msr_probe, @@ -689,4 +691,5 @@ static struct platform_driver meson_msr_driver = { .of_match_table = meson_msr_match_table, }, }; -builtin_platform_driver(meson_msr_driver); +module_platform_driver(meson_msr_driver); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/soc/amlogic/meson-ee-pwrc.c b/drivers/soc/amlogic/meson-ee-pwrc.c index 5164a4dc2352..ed7d2fbb47f2 100644 --- a/drivers/soc/amlogic/meson-ee-pwrc.c +++ b/drivers/soc/amlogic/meson-ee-pwrc.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -602,6 +603,7 @@ static const struct of_device_id meson_ee_pwrc_match_table[] = { }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, meson_ee_pwrc_match_table); static struct platform_driver meson_ee_pwrc_driver = { .probe = meson_ee_pwrc_probe, @@ -611,4 +613,5 @@ static struct platform_driver meson_ee_pwrc_driver = { .of_match_table = meson_ee_pwrc_match_table, }, }; -builtin_platform_driver(meson_ee_pwrc_driver); +module_platform_driver(meson_ee_pwrc_driver); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c index 21b4bc811c00..8790627e3098 100644 --- a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c +++ b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c @@ -14,6 +14,7 @@ #include #include #include +#include /* AO Offsets */ @@ -364,6 +365,7 @@ static const struct of_device_id meson_gx_pwrc_vpu_match_table[] = { }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, meson_gx_pwrc_vpu_match_table); static struct platform_driver meson_gx_pwrc_vpu_driver = { .probe = meson_gx_pwrc_vpu_probe, @@ -373,4 +375,5 @@ static struct platform_driver meson_gx_pwrc_vpu_driver = { .of_match_table = meson_gx_pwrc_vpu_match_table, }, }; -builtin_platform_driver(meson_gx_pwrc_vpu_driver); +module_platform_driver(meson_gx_pwrc_vpu_driver); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c index 5fb29a475879..59bd195fa9c9 100644 --- a/drivers/soc/amlogic/meson-secure-pwrc.c +++ b/drivers/soc/amlogic/meson-secure-pwrc.c @@ -13,6 +13,7 @@ #include #include #include +#include #define PWRC_ON 1 #define PWRC_OFF 0 @@ -193,6 +194,7 @@ static const struct of_device_id meson_secure_pwrc_match_table[] = { }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, meson_secure_pwrc_match_table); static struct platform_driver meson_secure_pwrc_driver = { .probe = meson_secure_pwrc_probe, @@ -201,4 +203,5 @@ static struct platform_driver meson_secure_pwrc_driver = { .of_match_table = meson_secure_pwrc_match_table, }, }; -builtin_platform_driver(meson_secure_pwrc_driver); +module_platform_driver(meson_secure_pwrc_driver); +MODULE_LICENSE("Dual MIT/GPL");