From patchwork Sun Sep 30 22:12:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1529251 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D72C63FE80 for ; Sun, 30 Sep 2012 22:13:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751564Ab2I3WNE (ORCPT ); Sun, 30 Sep 2012 18:13:04 -0400 Received: from server19320154104.serverpool.info ([193.201.54.104]:58433 "EHLO hauke-m.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751487Ab2I3WND (ORCPT ); Sun, 30 Sep 2012 18:13:03 -0400 Received: from localhost (localhost [127.0.0.1]) by hauke-m.de (Postfix) with ESMTP id 83CEA8F61; Mon, 1 Oct 2012 00:13:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hauke-m.de Received: from hauke-m.de ([127.0.0.1]) by localhost (hauke-m.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u3mTG-9P7ywM; Mon, 1 Oct 2012 00:12:57 +0200 (CEST) Received: from hauke.lan (unknown [134.102.133.158]) by hauke-m.de (Postfix) with ESMTPSA id AD0868F60; Mon, 1 Oct 2012 00:12:56 +0200 (CEST) From: Hauke Mehrtens To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, zajec5@gmail.com, Hauke Mehrtens Subject: [PATCH] bcma: do not initialize deactivated PCIe cores Date: Mon, 1 Oct 2012 00:12:54 +0200 Message-Id: <1349043174-5371-1-git-send-email-hauke@hauke-m.de> X-Mailer: git-send-email 1.7.9.5 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Before it was tried to initialize the deactivated PCIe core in client mode, but this causes the SoC to hang. Just do not initialize it at all and ignore the core it is not working and nothing is connected to it when the specific bit is set in the boardflags. Signed-off-by: Hauke Mehrtens --- drivers/bcma/driver_pci_host.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/bcma/driver_pci_host.c b/drivers/bcma/driver_pci_host.c index 63172c9..e564495 100644 --- a/drivers/bcma/driver_pci_host.c +++ b/drivers/bcma/driver_pci_host.c @@ -35,11 +35,6 @@ bool __devinit bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc) chipid_top != 0x5300) return false; - if (bus->sprom.boardflags_lo & BCMA_CORE_PCI_BFL_NOPCI) { - bcma_info(bus, "This PCI core is disabled and not working\n"); - return false; - } - bcma_core_enable(pc->core, 0); return !mips_busprobe32(tmp, pc->core->io_addr); @@ -396,6 +391,11 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc) bcma_info(bus, "PCIEcore in host mode found\n"); + if (bus->sprom.boardflags_lo & BCMA_CORE_PCI_BFL_NOPCI) { + bcma_info(bus, "This PCIE core is disabled and not working\n"); + return; + } + pc_host = kzalloc(sizeof(*pc_host), GFP_KERNEL); if (!pc_host) { bcma_err(bus, "can not allocate memory");