All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Franky Lin" <frankyl@broadcom.com>
To: gregkh@suse.de
Cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org
Subject: [PATCH 08/20] staging: brcm80211: remove fullmac module_param brcmf_dongle_memsize
Date: Mon, 19 Sep 2011 14:25:56 -0700	[thread overview]
Message-ID: <1316467568-27683-9-git-send-email-frankyl@broadcom.com> (raw)
In-Reply-To: <1316467568-27683-1-git-send-email-frankyl@broadcom.com>

remove unused module parameter brcmf_dongle_memsize and related code

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
---
 drivers/staging/brcm80211/brcmfmac/dhd_bus.h  |    3 --
 drivers/staging/brcm80211/brcmfmac/dhd_sdio.c |   35 +++---------------------
 2 files changed, 5 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_bus.h b/drivers/staging/brcm80211/brcmfmac/dhd_bus.h
index aa05b1c..d02cb10 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_bus.h
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_bus.h
@@ -24,9 +24,6 @@
  * Exported from brcmf bus module (brcmf_usb, brcmf_sdio)
  */
 
-/* dongle ram module parameter */
-extern int brcmf_dongle_memsize;
-
 /* Tx/Rx bounds module parameters */
 extern uint brcmf_txbound;
 extern uint brcmf_rxbound;
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
index 9d4850d..7090a36 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
@@ -568,7 +568,6 @@ struct brcmf_bus {
 	uint varsz;		/* Size of variables buffer */
 
 	u32 ramsize;		/* Size of RAM in SOCRAM (bytes) */
-	u32 orig_ramsize;	/* Size of RAM in SOCRAM (bytes) */
 
 	u32 hostintmask;	/* Copy of Host Interrupt Mask */
 	u32 intstatus;	/* Intstatus bits (events) pending */
@@ -772,11 +771,6 @@ module_param(brcmf_poll, uint, 0);
 uint brcmf_intr = true;
 module_param(brcmf_intr, uint, 0);
 
-/* override the RAM size if possible */
-#define DONGLE_MIN_MEMSIZE (128 * 1024)
-int brcmf_dongle_memsize;
-module_param(brcmf_dongle_memsize, int, 0);
-
 #define RETRYCHAN(chan) ((chan) == SDPCM_EVENT_CHANNEL)
 
 /* Retry count for register access failures */
@@ -857,17 +851,6 @@ static void brcmf_sdbrcm_pktfree2(struct brcmf_bus *bus, struct sk_buff *pkt)
 		brcmu_pkt_buf_free_skb(pkt);
 }
 
-static void brcmf_sdbrcm_setmemsize(struct brcmf_bus *bus, int mem_size)
-{
-	s32 min_size = DONGLE_MIN_MEMSIZE;
-	/* Restrict the memsize to user specified limit */
-	brcmf_dbg(ERROR, "user: Restrict the dongle ram size to %d, min %d\n",
-		  brcmf_dongle_memsize, min_size);
-	if ((brcmf_dongle_memsize > min_size) &&
-	    (brcmf_dongle_memsize < (s32) bus->orig_ramsize))
-		bus->ramsize = brcmf_dongle_memsize;
-}
-
 static void brcmf_sdbrcm_sdlock(struct brcmf_bus *bus)
 {
 	if (bus->threads_only)
@@ -3531,11 +3514,10 @@ static int brcmf_sdbrcm_write_vars(struct brcmf_bus *bus)
 	}
 
 	/* adjust to the user specified RAM */
-	brcmf_dbg(INFO, "Physical memory size: %d, usable memory size: %d\n",
-		  bus->orig_ramsize, bus->ramsize);
+	brcmf_dbg(INFO, "Physical memory size: %d\n", bus->ramsize);
 	brcmf_dbg(INFO, "Vars are at %d, orig varsize is %d\n",
 		  varaddr, varsize);
-	varsize = ((bus->orig_ramsize - 4) - varaddr);
+	varsize = ((bus->ramsize - 4) - varaddr);
 
 	/*
 	 * Determine the length token:
@@ -3555,7 +3537,7 @@ static int brcmf_sdbrcm_write_vars(struct brcmf_bus *bus)
 		  varsize, varsizew);
 
 	/* Write the length token to the last word */
-	bcmerror = brcmf_sdbrcm_membytes(bus, true, (bus->orig_ramsize - 4),
+	bcmerror = brcmf_sdbrcm_membytes(bus, true, (bus->ramsize - 4),
 					 (u8 *)&varsizew_le, 4);
 
 	return bcmerror;
@@ -4630,17 +4612,11 @@ brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, u32 regsva)
 	/* Get info on the ARM and SOCRAM cores... */
 	brcmf_sdcard_reg_read(bus->sdiodev,
 		  CORE_SB(bus->ci->armcorebase, sbidhigh), 4);
-	bus->orig_ramsize = bus->ci->ramsize;
-	if (!(bus->orig_ramsize)) {
+	bus->ramsize = bus->ci->ramsize;
+	if (!(bus->ramsize)) {
 		brcmf_dbg(ERROR, "failed to find SOCRAM memory!\n");
 		goto fail;
 	}
-	bus->ramsize = bus->orig_ramsize;
-	if (brcmf_dongle_memsize)
-		brcmf_sdbrcm_setmemsize(bus, brcmf_dongle_memsize);
-
-	brcmf_dbg(ERROR, "DHD: dongle ram size is set to %d(orig %d)\n",
-		  bus->ramsize, bus->orig_ramsize);
 
 	/* Set core control so an SDIO reset does a backplane reset */
 	reg_addr = bus->ci->buscorebase +
@@ -4819,7 +4795,6 @@ void *brcmf_sdbrcm_probe(u16 bus_no, u16 slot, u16 func, uint bustype,
 	 */
 	brcmf_txbound = BRCMF_TXBOUND;
 	brcmf_rxbound = BRCMF_RXBOUND;
-	brcmf_dongle_memsize = 0;
 	brcmf_txminmax = BRCMF_TXMINMAX;
 
 	brcmf_c_init();
-- 
1.7.1



  parent reply	other threads:[~2011-09-19 21:26 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-19 21:25 [PATCH 00/20] staging: brcm80211: 7th reaction for mainline patch #2 Franky Lin
2011-09-19 21:25 ` [PATCH 01/20] staging: brcm80211: sparse endianness warnings on dongle events Franky Lin
2011-09-19 21:25 ` [PATCH 02/20] staging: brcm80211: various fulmac sparse endianness fixes Franky Lin
2011-09-19 21:25 ` [PATCH 03/20] staging: brcm80211: sparse endianness warnings for struct brcmf_proto_cdc_ioctl Franky Lin
2011-09-19 21:25 ` [PATCH 04/20] staging: brcm80211: sparse endianness warnings for struct sdpcm_shared Franky Lin
2011-09-19 21:25 ` [PATCH 05/20] staging: brcm80211: more fullmac sparse endianness scan related changes Franky Lin
2011-09-19 21:25 ` [PATCH 06/20] staging: brcm80211: remove unconditional code blocks from brcmfmac Franky Lin
2011-09-19 21:25 ` [PATCH 07/20] staging: brcm80211: remove event handler thread from fullmac Franky Lin
2011-09-19 21:25 ` Franky Lin [this message]
2011-09-19 21:25 ` [PATCH 09/20] staging: brcm80211: remove fullmac module_param brcmf_sdiod_drive_strength Franky Lin
2011-09-19 21:25 ` [PATCH 10/20] staging: brcm80211: remove fullmac module_param for watchdog Franky Lin
2011-09-19 21:25 ` [PATCH 11/20] staging: brcm80211: remove fullmac module_param brcmf_idletime Franky Lin
2011-09-19 21:26 ` [PATCH 12/20] staging: brcm80211: remove global variables for data frame boundary Franky Lin
2011-09-19 21:26 ` [PATCH 13/20] staging: brcm80211: removed two fullmac sparse spinlock warnings Franky Lin
2011-09-19 21:26 ` [PATCH 14/20] staging: brcm80211: added endianness check flag to fullmac Makefile Franky Lin
2011-09-19 21:26 ` [PATCH 15/20] staging: brcm80211: removed likely/unlikely calls Franky Lin
2011-09-19 21:26 ` [PATCH 16/20] staging: brcm80211: removed log after kzalloc()/kmalloc() failure Franky Lin
2011-09-19 21:26 ` [PATCH 17/20] staging: brcm80211: clarified fullmac io and event codes Franky Lin
2011-09-19 21:26 ` [PATCH 18/20] staging: brcm80211: consistent naming of struct net_device *ndev Franky Lin
2011-09-19 21:26 ` [PATCH 19/20] staging: brcm80211: simplified internal ioctl function once more Franky Lin
2011-09-19 21:26 ` [PATCH 20/20] staging: brcm80211: reduced checkpatch warnings to zero Franky Lin
2011-09-20  0:04   ` Joe Perches
2011-09-20  0:59     ` Joe Perches
2011-09-20  1:12       ` Franky Lin
2011-09-20  1:04     ` Franky Lin
2011-09-20 13:03 ` [PATCH 00/20] staging: brcm80211: 7th reaction for mainline patch #2 Greg KH
2011-09-20 13:21   ` Johannes Berg
2011-09-20 13:36     ` John W. Linville
2011-09-20 13:45       ` Rafał Miłecki
2011-09-20 13:40     ` Rafał Miłecki
2011-09-20 13:50     ` Rafał Miłecki
2011-09-20 20:56     ` Rafał Miłecki
2011-09-20 21:12       ` Alex Deucher
2011-09-20 21:23         ` Rafał Miłecki
2011-09-21 23:26         ` Luis R. Rodriguez
2011-09-21 13:40       ` John W. Linville
2011-09-21 13:52         ` Rafał Miłecki
2011-09-21 13:55           ` Rafał Miłecki
2011-09-21 14:39             ` Larry Finger
2011-09-20 13:22   ` John W. Linville
2011-09-20 14:00     ` Greg KH
2011-09-21 18:33       ` Brett Rudley
2011-09-21 20:01         ` Rafał Miłecki
2011-09-21 22:12           ` Brett Rudley
2011-09-21 22:35             ` Michael Büsch
2011-09-21 23:15               ` Brett Rudley
2011-09-21 23:28                 ` Michael Büsch
2011-09-22  2:07                   ` Brett Rudley
2011-09-22  6:36                     ` Rafał Miłecki
2011-09-22  8:53                   ` Arend Van Spriel
2011-09-22  8:57                     ` Rafał Miłecki
2011-09-22  9:10                       ` Arend Van Spriel
2011-09-22  9:12                         ` Rafał Miłecki
2011-09-22 10:07                     ` Jonas Gorski
2011-09-22 13:39                       ` Arend Van Spriel
2011-09-22  9:44               ` Johannes Berg
2011-09-22 10:29                 ` Michael Büsch
2011-09-22  6:47             ` Hauke Mehrtens
2011-09-22  9:04               ` Arend Van Spriel
2011-09-22  9:08                 ` Rafał Miłecki
2011-09-22 10:38                   ` Michael Büsch
2011-09-22  6:54             ` Rafał Miłecki
2011-09-22  7:24               ` Rafał Miłecki
2011-09-22  7:28             ` Rafał Miłecki
2011-09-22 14:31             ` Christoph Hellwig
2011-09-22 18:37               ` Arend Van Spriel

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=1316467568-27683-9-git-send-email-frankyl@broadcom.com \
    --to=frankyl@broadcom.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=linux-wireless@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.