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: 6686441 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 153AE9F380 for ; Sun, 28 Jun 2015 15:17:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 366992054B for ; Sun, 28 Jun 2015 15:17:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 585CB203B5 for ; Sun, 28 Jun 2015 15:17:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752489AbbF1PR0 (ORCPT ); Sun, 28 Jun 2015 11:17:26 -0400 Received: from mail-la0-f42.google.com ([209.85.215.42]:35540 "EHLO mail-la0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752082AbbF1PRX (ORCPT ); Sun, 28 Jun 2015 11:17:23 -0400 Received: by lagh6 with SMTP id h6so28408234lag.2 for ; Sun, 28 Jun 2015 08:17:22 -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 Cc: Hauke Mehrtens , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= 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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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))