From: Stefano Brivio <stefano.brivio@polimi.it>
To: netdev@vger.kernel.org
Cc: Edgar Hucek <hostmaster@ed-soft.at>,
Matthew Garrett <mjg59@srcf.ucam.org>,
Louis E Garcia II <louisg00@bellsouth.net>,
Stefano Brivio <stefano.brivio@polimi.it>
Subject: [patch 08/10] [RFT] bcm43xx: powercontrol support for PCI-E devices
Date: Fri, 19 May 2006 00:00:08 +0200 [thread overview]
Message-ID: <20060519155739.833990000@polimi.it> (raw)
In-Reply-To: 20060519154451.042749000@polimi.it
[-- Attachment #1: bcm43xx-pcie_powercontrol.diff --]
[-- Type: text/plain, Size: 1910 bytes --]
Add powercontrol support for PCI-E devices.
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Index: wireless-dev/drivers/net/wireless/bcm43xx/bcm43xx.h
===================================================================
--- wireless-dev.orig/drivers/net/wireless/bcm43xx/bcm43xx.h
+++ wireless-dev/drivers/net/wireless/bcm43xx/bcm43xx.h
@@ -140,6 +140,7 @@
/* Chipcommon registers. */
#define BCM43xx_CHIPCOMMON_CAPABILITIES 0x04
+#define BCM43xx_CHIPCOMMON_CTL 0x28
#define BCM43xx_CHIPCOMMON_PLLONDELAY 0xB0
#define BCM43xx_CHIPCOMMON_FREFSELDELAY 0xB4
#define BCM43xx_CHIPCOMMON_SLOWCLKCTL 0xB8
Index: wireless-dev/drivers/net/wireless/bcm43xx/bcm43xx_power.c
===================================================================
--- wireless-dev.orig/drivers/net/wireless/bcm43xx/bcm43xx_power.c
+++ wireless-dev/drivers/net/wireless/bcm43xx/bcm43xx_power.c
@@ -153,8 +153,6 @@ int bcm43xx_pctl_init(struct bcm43xx_pri
int err, maxfreq;
struct bcm43xx_coreinfo *old_core;
- if (!(bcm->chipcommon_capabilities & BCM43xx_CAPABILITIES_PCTL))
- return 0;
old_core = bcm->current_core;
err = bcm43xx_switch_core(bcm, &bcm->core_chipcommon);
if (err == -ENODEV)
@@ -162,6 +160,21 @@ int bcm43xx_pctl_init(struct bcm43xx_pri
if (err)
goto out;
+ if (bcm->chip_id == 0x4321) {
+ if (bcm->chip_rev == 1)
+ bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_CTL, 0x00A4);
+ if (bcm->chip_rev == 0)
+ bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_CTL, 0x03A4);
+ }
+
+ if (!(bcm->chipcommon_capabilities & BCM43xx_CAPABILITIES_PCTL))
+ return 0;
+
+ if (bcm->current_core->rev >= 10)
+ bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_SYSCLKCTL,
+ (bcm43xx_read32(bcm, BCM43xx_CHIPCOMMON_SYSCLKCTL)
+ & 0x0000FFFF) | 0x40000);
+
maxfreq = bcm43xx_pctl_clockfreqlimit(bcm, 1);
bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_PLLONDELAY,
(maxfreq * 150 + 999999) / 1000000);
--
Ciao
Stefano
next prev parent reply other threads:[~2006-05-19 15:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-19 15:44 [patch 00/10] [RFT] bcm43xx: support for PCI-E devices Stefano Brivio
2006-05-18 22:00 ` [patch 01/10] [RFT] bcm43xx: add core ID for PCI-E core Stefano Brivio
2006-05-18 22:00 ` [patch 02/10] [RFT] bcm43xx: functions for access to PCI-E registers and PCI-E MDIO Stefano Brivio
2006-05-18 22:00 ` [patch 03/10] [RFT] bcm43xx: fix reading core ID and revision from sb_id_hi Stefano Brivio
2006-05-18 22:00 ` [patch 04/10] [RFT] bcm43xx: use PCI-E core as a PCI core, allow wireless core with rev 10 Stefano Brivio
2006-05-18 22:00 ` [patch 05/10] [RFT] bcm43xx: wireless core initialization for PCI-E devices Stefano Brivio
2006-05-18 22:00 ` [patch 06/10] [RFT] bcm43xx: fix bcm43xx_wireless_core_mark_inactive Stefano Brivio
2006-05-18 22:00 ` [patch 07/10] [RFT] bcm43xx: allow PHY revision 8, dont give up on unknown phy_rev Stefano Brivio
2006-05-18 22:00 ` Stefano Brivio [this message]
2006-05-18 22:00 ` [patch 09/10] [RFT] bcm43xx: backplane setup for PCI-E devices and devices with PCI core ID > 10 Stefano Brivio
2006-05-18 22:00 ` [patch 10/10] [RFT] bcm43xx: add PCI ID for bcm4311 Stefano Brivio
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=20060519155739.833990000@polimi.it \
--to=stefano.brivio@polimi.it \
--cc=hostmaster@ed-soft.at \
--cc=louisg00@bellsouth.net \
--cc=mjg59@srcf.ucam.org \
--cc=netdev@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 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).