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: 11331247 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F3B60139A for ; Tue, 14 Jan 2020 03:45:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC29C207FD 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))