ssb: move ssb_commit_settings and export it
PATCH 1/2 ssb: move ssb_commit_settings and export it
Commiting settings is possible on devices without PCI core (but with CC core). Export it for usage in drivers supporting other cores.
--- drivers/ssb/driver_pcicore.c | 26 -------------------------- drivers/ssb/main.c | 25 +++++++++++++++++++++++++ include/linux/ssb/ssb.h | 1 + 3 files changed, 26 insertions(+), 26 deletions(-)
drivers/ssb/driver_pcicore.c +0 -26
@@ -21,8 +21,6 @@ static u16 ssb_pcie_mdio_read(struct ssb_pcicore *pc, u8 device, u8 address);static void ssb_pcie_mdio_write (struct ssb_pcicore *pc,u8 device,u8 address,u16 data); -static void ssb_commit_settings (struct ssb_bus *bus); -static inline u32 pcicore_read32 (struct ssb_pcicore *pc,u16 offset) {
@@ -659,30 +657,6 @@ static void ssb_pcie_mdio_write(struct ssb_pcicore *pc, u8 device,pcicore_write32 (pc, mdio_control,0 ); } -static void ssb_broadcast_value (struct ssb_device *dev, -u32 address,u32 data) -{ -/* This is used for both, PCI and ChipCommon core, so be careful. */ -BUILD_BUG_ON (SSB_PCICORE_BCAST_ADDR !=SSB_CHIPCO_BCAST_ADDR ); -BUILD_BUG_ON (SSB_PCICORE_BCAST_DATA !=SSB_CHIPCO_BCAST_DATA ); - -ssb_write32 (dev,SSB_PCICORE_BCAST_ADDR , address); -ssb_read32 (dev,SSB_PCICORE_BCAST_ADDR );/* flush */ -ssb_write32 (dev,SSB_PCICORE_BCAST_DATA , data); -ssb_read32 (dev,SSB_PCICORE_BCAST_DATA );/* flush */ -} - -static void ssb_commit_settings (struct ssb_bus *bus) -{ -struct ssb_device *dev; - - dev = bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev; -if (WARN_ON (!dev)) -return ; -/* This forces an update of the cached registers. */ -ssb_broadcast_value (dev,0xFD8 ,0 ); -} -int ssb_pcicore_dev_irqvecs_enable (struct ssb_pcicore *pc,struct ssb_device *dev) {
drivers/ssb/main.c +25 -0
@@ -1329,6 +1329,31 @@ error: }EXPORT_SYMBOL (ssb_bus_powerup); +static void ssb_broadcast_value (struct ssb_device *dev, +u32 address,u32 data) +{ +/* This is used for both, PCI and ChipCommon core, so be careful. */ +BUILD_BUG_ON (SSB_PCICORE_BCAST_ADDR !=SSB_CHIPCO_BCAST_ADDR ); +BUILD_BUG_ON (SSB_PCICORE_BCAST_DATA !=SSB_CHIPCO_BCAST_DATA ); + +ssb_write32 (dev,SSB_PCICORE_BCAST_ADDR , address); +ssb_read32 (dev,SSB_PCICORE_BCAST_ADDR );/* flush */ +ssb_write32 (dev,SSB_PCICORE_BCAST_DATA , data); +ssb_read32 (dev,SSB_PCICORE_BCAST_DATA );/* flush */ +} + +void ssb_commit_settings (struct ssb_bus *bus) +{ +struct ssb_device *dev; + + dev = bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev; +if (WARN_ON (!dev)) +return ; +/* This forces an update of the cached registers. */ +ssb_broadcast_value (dev,0xFD8 ,0 ); +} +EXPORT_SYMBOL (ssb_commit_settings); +u32 ssb_admatch_base (u32 adm) {u32 base =0 ;
include/linux/ssb/ssb.h +1 -0
@@ -518,6 +518,7 @@ extern int ssb_bus_may_powerdown(struct ssb_bus *bus);* Otherwise static always-on powercontrol will be used. */ extern int ssb_bus_powerup (struct ssb_bus *bus,bool dynamic_pctl); +extern void ssb_commit_settings (struct ssb_bus *bus);/* Various helper functions */ extern u32 ssb_admatch_base (u32 adm);
Signature · 1 line
1.7.3.4
PATCH 2/2 b43: implement timeouts workaround
Documented in: <[email protected]>
--- drivers/net/wireless/b43/main.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
drivers/net/wireless/b43/main.c +12 -1
@@ -4213,7 +4213,18 @@ static void b43_bluetooth_coext_disable(struct b43_wldev *dev)static void b43_imcfglo_timeouts_workaround (struct b43_wldev *dev) { -/* TODO: implement 80211 core workaround here */ +struct ssb_bus *bus = dev->dev->bus; +u32 tmp; + +if ((bus->chip_id ==0x4311 && bus->chip_rev ==2 ) || + (bus->chip_id ==0x4312 )) { + tmp =ssb_read32 (dev->dev,SSB_IMCFGLO ); + tmp &= ~SSB_IMCFGLO_REQTO ; + tmp &= ~SSB_IMCFGLO_SERTO ; + tmp |=0x3 ; +ssb_write32 (dev->dev,SSB_IMCFGLO , tmp); +ssb_commit_settings (bus); + } }static void b43_set_synth_pu_delay (struct b43_wldev *dev,bool idle)
Signature · 1 line
1.7.3.4
PATCH 2/2 b43: implement timeouts workaround
Quoted 1 line · Rafa? Mi?ecki
Documented in:<[email protected]>
This reference is not correct.
Larry
Quoted 30 lines
Signed-off-by Rafa? Mi?ecki<[email protected]>--- drivers/net/wireless/b43/main.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)drivers/net/wireless/b43/main.c +12
-1@@ -4213,7 +4213,18 @@ static void b43_bluetooth_coext_disable(struct b43_wldev *dev)static void b43_imcfglo_timeouts_workaround (struct b43_wldev *dev) { -/* TODO: implement 80211 core workaround here */ +struct ssb_bus *bus = dev->dev->bus; +u32 tmp; + +if ((bus->chip_id ==0x4311 && bus->chip_rev ==2 ) || + (bus->chip_id ==0x4312 )) { + tmp =ssb_read32 (dev->dev,SSB_IMCFGLO ); + tmp&= ~SSB_IMCFGLO_REQTO ; + tmp&= ~SSB_IMCFGLO_SERTO ; + tmp |=0x3 ; +ssb_write32 (dev->dev,SSB_IMCFGLO , tmp); +ssb_commit_settings (bus); + } }static void b43_set_synth_pu_delay (struct b43_wldev *dev,bool idle)
PATCH 2/2 b43: implement timeouts workaround
W dniu 11 maja 2011 01:42 u?ytkownik Larry Finger
<[email protected]> napisa?:
Quoted 5 lines · Rafa? Mi?ecki
Quoted 2 lines
Documented in:<[email protected]>
This reference is not correct.
Ouch, GMail seems to lie to me. Any change you can give me real message id of:
http://www.mail-archive.com/b43-dev at lists.infradead.org/msg00049.html ?
Signature · 1 line
Rafa?
PATCH 2/2 b43: implement timeouts workaround
Quoted 10 lines · Rafa? Mi?ecki
W dniu 11 maja 2011 01:42 u?ytkownik Larry Finger
<[email protected]> napisa?:Quoted 5 lines · Rafa? Mi?ecki
Quoted 2 lines
Documented in:<[email protected]>
This reference is not correct.
Ouch, GMail seems to lie to me. Any change you can give me real message id of:
http://www.mail-archive.com/b43-dev at lists.infradead.org/msg00049.html
This one is good.
Larry
PATCH 2/2 b43: implement timeouts workaround
W dniu 11 maja 2011 02:12 u?ytkownik Larry Finger
<[email protected]> napisa?:
Quoted 9 lines · Rafa? Mi?ecki
Quoted 8 lines
W dniu 11 maja 2011 01:42 u?ytkownik Larry Finger
<[email protected]> ?napisa?:Quoted 5 lines · Rafa? Mi?ecki
Quoted 2 lines
Documented in:<[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
This reference is not correct.
Ouch, GMail seems to lie to me. Any change you can give me real message id of:
http://www.mail-archive.com/b43-dev at lists.infradead.org/msg00049.htmlThis one is good.
Sorry, do you mean <[email protected]> is OK? Or should I use link I posted instead of message ID? Or do you know how to get message ID from the link above?
Signature · 1 line
Rafa?
PATCH 2/2 b43: implement timeouts workaround
Quoted 17 lines · Rafa? Mi?ecki
W dniu 11 maja 2011 02:12 u?ytkownik Larry Finger
<[email protected]> napisa?:Quoted 15 lines · Rafa? Mi?ecki
Quoted 13 lines
W dniu 11 maja 2011 01:42 u?ytkownik Larry Finger
<[email protected]> napisa?:Quoted 6 lines · Rafa? Mi?ecki
Quoted 2 lines
Documented in:<[email protected]>
This reference is not correct.
Ouch, GMail seems to lie to me. Any change you can give me real message id of:
http://www.mail-archive.com/b43-dev at lists.infradead.org/msg00049.html
Quoted 6 lines
Quoted 1 line
This one is good.
Sorry, do you mean<[email protected]> is OK? Or should I use link I posted instead of message ID? Or do you know how to get message ID from the link above?
Use the link
"http://www.mail-archive.com/b43-dev at lists.infradead.org/msg00049.html". <[email protected]> just points to a non-existent email address on my domain. I don't know how to get a message ID.
Larry
Michael Büsch
maintainerPATCH 2/2 b43: implement timeouts workaround
Quoted 25 lines · Larry Finger
Quoted 17 lines · Rafa? Mi?ecki
W dniu 11 maja 2011 02:12 u?ytkownik Larry Finger
<[email protected]> napisa?:Quoted 15 lines · Rafa? Mi?ecki
Quoted 13 lines
W dniu 11 maja 2011 01:42 u?ytkownik Larry Finger
<[email protected]> napisa?:Quoted 6 lines · Rafa? Mi?ecki
Quoted 2 lines
Documented in:<[email protected]>
This reference is not correct.
Ouch, GMail seems to lie to me. Any change you can give me real message id of:
http://www.mail-archive.com/b43-dev at lists.infradead.org/msg00049.htmlQuoted 6 lines
Quoted 1 line
This one is good.
Sorry, do you mean<[email protected]> is OK? Or should I use link I posted instead of message ID? Or do you know how to get message ID from the link above?
Quoted 4 lines
Use the link
"http://www.mail-archive.com/b43-dev at lists.infradead.org/msg00049.html". <[email protected]> just points to a non-existent email address on my domain. I don't know how to get a message ID.
It's just an email header added by your MUA.
For example: Message-ID: <[email protected]>
The advantage of this is that links change and vanish. However, message IDs don't. The message ID uniquely identifies a message, regardless of where it's stored. So even if the mail archive moves to another URL, it's still possible to find the actual mail by the ID.
Signature · 1 line
Greetings Michael.
PATCH 2/2 b43: implement timeouts workaround
Quoted 31 lines · Michael B?sch
Quoted 25 lines · Larry Finger
Quoted 17 lines · Rafa? Mi?ecki
W dniu 11 maja 2011 02:12 u?ytkownik Larry Finger
<[email protected]> napisa?:Quoted 15 lines · Rafa? Mi?ecki
Quoted 13 lines
W dniu 11 maja 2011 01:42 u?ytkownik Larry Finger
<[email protected]> napisa?:Quoted 6 lines · Rafa? Mi?ecki
Quoted 2 lines
Documented in:<[email protected]>
This reference is not correct.
Ouch, GMail seems to lie to me. Any change you can give me real message id of:
http://www.mail-archive.com/b43-dev at lists.infradead.org/msg00049.htmlQuoted 6 lines
Quoted 1 line
This one is good.
Sorry, do you mean<[email protected]> is OK? Or should I
use link I posted instead of message ID? Or do you know how to get message ID from the link above?Quoted 4 lines
Use the link
"http://www.mail-archive.com/b43-dev at lists.infradead.org/msg00049.html". <[email protected]> just points to a non-existent email address on my domain. I don't know how to get a message ID.
Quoted 7 lines
It's just an email header added by your MUA.
For example: Message-ID:<[email protected]>The advantage of this is that links change and vanish. However, message IDs don't. The message ID uniquely identifies a message, regardless of where it's stored. So even if the mail archive moves to another URL, it's still possible to find the actual mail by the ID.
Ahh. Yes, that Message ID is correct. I just rechecked the header in the mail that I sent. Sorry for the confusion and noise.
Larry