From patchwork Sun Jun 28 15:17:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 6686451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3720DC05AC for ; Sun, 28 Jun 2015 15:19:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5BEE120444 for ; Sun, 28 Jun 2015 15:19:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 90C9720439 for ; Sun, 28 Jun 2015 15:19:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z9EL6-0005r8-4V; Sun, 28 Jun 2015 15:17:48 +0000 Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z9EL2-0005pb-Dg for linux-arm-kernel@lists.infradead.org; Sun, 28 Jun 2015 15:17:45 +0000 Received: by lacny3 with SMTP id ny3so100046116lac.3 for ; Sun, 28 Jun 2015 08:17:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=AeFbWxajQD8cH6DJqeYAjHUcusONG13M/PwAERXBqPQ=; b=ndk0GdBwZ8wTka+A0dLwiJCnAnGmLu6c3H+0QMe1ZdlHch7uZcGTx7gteameJXljVv HMssY1bxiV3Xrq2afGM5n+ZszUZM7Ypl1Wwn+wbhhUBV13ofFCb/35AfeITMXv7QBkdc r0sk6VhBVeLGY/OsMgBgxf/Nh61Blx5Sl39eHMGrxR2bk3sOovvCd96K3UmCIZbVGJ55 +9DQDr2fBUf39pZIX8IAzUaSMAN5qYP0aSg+3juJ1cUX3oi7TgoySDBojXj+BgLvJ3nf ulRjFAi6DzW7mSlf9uIOYe4SnZopukCtRDFP3TCdD3LqdROhCJJALFcX+c/Lkv2rsYuq Jyaw== X-Received: by 10.112.137.232 with SMTP id ql8mr10105809lbb.121.1435504641842; Sun, 28 Jun 2015 08:17:21 -0700 (PDT) Received: from linux-tdhb.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by mx.google.com with ESMTPSA id h3sm9882884lbj.19.2015.06.28.08.17.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jun 2015 08:17:20 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo , linux-wireless@vger.kernel.org Subject: [PATCH] bcma: populate bus DT subnodes as platform_device-s Date: Sun, 28 Jun 2015 17:17:13 +0200 Message-Id: <1435504633-20831-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150628_081744_668381_805CF07C X-CRM114-Status: GOOD ( 10.77 ) X-Spam-Score: -2.5 (--) Cc: Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , linux-arm-kernel@lists.infradead.org, Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Our bus should allow defining children nodes as we may want to specify devices attached to the bus. This is required e.g. to specify NAND or ChipCommon cores and use bus's address and IRQ mappings. Signed-off-by: Rafa? Mi?ecki --- drivers/bcma/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 9635f10..5912847 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c @@ -12,6 +12,7 @@ #include #include #include +#include MODULE_DESCRIPTION("Broadcom's specific AMBA driver"); MODULE_LICENSE("GPL"); @@ -409,6 +410,13 @@ int bcma_bus_register(struct bcma_bus *bus) bcma_core_pci_early_init(&bus->drv_pci[0]); } + if (bus->host_pdev) { + struct device *dev = &bus->host_pdev->dev; + + of_platform_populate(dev->of_node, of_default_bus_match_table, + NULL, dev); + } + /* Cores providing flash access go before SPROM init */ list_for_each_entry(core, &bus->cores, list) { if (bcma_is_core_needed_early(core->id.id))