linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>
Cc: "Rafał Miłecki" <zajec5@gmail.com>
Subject: [PATCH wireless?] bcma: keep info about parallel flash presentence
Date: Thu,  9 Aug 2012 22:38:10 +0200	[thread overview]
Message-ID: <1344544690-11280-1-git-send-email-zajec5@gmail.com> (raw)

This allows drivers to access flash conditionally and stop crashing some
devices.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
---
John: I suggest taking it for wirelesss, AKA fix
---
 drivers/bcma/driver_mips.c                  |    2 +-
 include/linux/bcma/bcma_driver_chipcommon.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c
index cc65b45..55acba9 100644
--- a/drivers/bcma/driver_mips.c
+++ b/drivers/bcma/driver_mips.c
@@ -192,12 +192,12 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
 		bcma_debug(bus, "Found parallel flash\n");
 		bus->drv_cc.pflash.window = 0x1c000000;
 		bus->drv_cc.pflash.window_size = 0x02000000;
-
 		if ((bcma_read32(bus->drv_cc.core, BCMA_CC_FLASH_CFG) &
 		     BCMA_CC_FLASH_CFG_DS) == 0)
 			bus->drv_cc.pflash.buswidth = 1;
 		else
 			bus->drv_cc.pflash.buswidth = 2;
+		bus->drv_cc.pflash.present = true;
 		break;
 	default:
 		bcma_err(bus, "Flash type not supported\n");
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h
index 3fb8bba..16c266c 100644
--- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
@@ -510,6 +510,7 @@ struct bcma_chipcommon_pmu {
 
 #ifdef CONFIG_BCMA_DRIVER_MIPS
 struct bcma_pflash {
+	bool present;
 	u8 buswidth;
 	u32 window;
 	u32 window_size;
-- 
1.7.7


             reply	other threads:[~2012-08-09 20:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09 20:38 Rafał Miłecki [this message]
2012-08-10  9:02 ` [PATCH wireless?] bcma: keep info about parallel flash presentence Arend van Spriel
2012-08-10  9:32   ` Rafał Miłecki
2012-08-10  9:32     ` Rafał Miłecki
2012-08-10 12:23     ` Hauke Mehrtens
2012-08-10 12:25       ` Rafał Miłecki
2012-08-10 13:20         ` John W. Linville
2012-08-10 13:36           ` Rafał Miłecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1344544690-11280-1-git-send-email-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).