From patchwork Tue Jan 14 03:45:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Chen X-Patchwork-Id: 215175 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=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 0A9D3C33CA9 for ; Tue, 14 Jan 2020 03:45:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC760214AF for ; Tue, 14 Jan 2020 03:45:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729580AbgANDpo (ORCPT ); Mon, 13 Jan 2020 22:45:44 -0500 Received: from mail-sz.amlogic.com ([211.162.65.117]:56845 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729727AbgANDpl (ORCPT ); Mon, 13 Jan 2020 22:45:41 -0500 Received: from droid12-sz.software.amlogic (10.28.8.22) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server id 15.1.1591.10; Tue, 14 Jan 2020 11:45:58 +0800 From: Xingyu Chen To: Wim Van Sebroeck , Guenter Roeck , Kevin Hilman , Neil Armstrong CC: Xingyu Chen , Rob Herring , Jerome Brunet , Martin Blumenstingl , Qianggui Song , Jianxin Pan , Jian Hu , , , , Subject: [PATCH v6 2/5] firmware: meson_sm: populate platform device based on the child node Date: Tue, 14 Jan 2020 11:45:24 +0800 Message-ID: <1578973527-4759-3-git-send-email-xingyu.chen@amlogic.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578973527-4759-1-git-send-email-xingyu.chen@amlogic.com> References: <1578973527-4759-1-git-send-email-xingyu.chen@amlogic.com> MIME-Version: 1.0 X-Originating-IP: [10.28.8.22] Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org The child node of secure-monitor cann't be populated as platform device automatically during the kernel initialization phase, so we invoke of_platform_default_populate() to do it. Signed-off-by: Xingyu Chen --- drivers/firmware/meson/meson_sm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c index 8cdd405..d2b1e76 100644 --- a/drivers/firmware/meson/meson_sm.c +++ b/drivers/firmware/meson/meson_sm.c @@ -310,6 +310,8 @@ static int __init meson_sm_probe(struct platform_device *pdev) platform_set_drvdata(pdev, fw); + of_platform_default_populate(dev->of_node, NULL, dev); + pr_info("secure-monitor enabled\n"); if (sysfs_create_group(&pdev->dev.kobj, &meson_sm_sysfs_attr_group))