Skip to contentSkip to conversation

ssb: mark bus as powered up earlier?

RFC PATCH New Rafał Miłecki 2 participants 4 messages Apr 20, 2011 Sonics silicon backplane driver (ssb)

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 ssb: mark bus as powered up earlier?

---
This order seems to be wrong for me, but how we didn't get any reports about errors? Are cores supported by ssb_chipco_set_clockmode so rare? Or is ssb so rarely compiled with DEBUG?

The problem is that ssb_chipco_set_clockmode may want to touch CC registers to control power of the bus. However touching registers without powered_up set causes warnings.

Am I right at this?

---
 drivers/ssb/main.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/ssb/main.c +4 -4
index e06d634..076362e 100644
@@ -1309,20 +1309,20 @@ EXPORT_SYMBOL(ssb_bus_may_powerdown);
 
 int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl)
 {
-	struct ssb_chipcommon *cc;
 	int err;
 	enum ssb_clkmode mode;
 
 	err = ssb_pci_xtal(bus, SSB_GPIO_XTAL | SSB_GPIO_PLL, 1);
 	if (err)
 		goto error;
-	cc = &bus->chipco;
-	mode = dynamic_pctl ? SSB_CLKMODE_DYNAMIC : SSB_CLKMODE_FAST;
-	ssb_chipco_set_clockmode(cc, mode);
 
 #ifdef CONFIG_SSB_DEBUG
 	bus->powered_up = 1;
 #endif
+
+	mode = dynamic_pctl ? SSB_CLKMODE_DYNAMIC : SSB_CLKMODE_FAST;
+	ssb_chipco_set_clockmode(&bus->chipco, mode);
+
 	return 0;
 error:
 	ssb_printk(KERN_ERR PFX "Bus powerup failed\n");
Signature · 1 line
1.7.3.4
maintainer
#1 lore raw

RFC PATCH 1/1 ssb: mark bus as powered up earlier?

Just in case you don't know: Please send patches to John directly and just CC me. And if I don't complain, it's an ACK ;)

Signature · 1 line
Greetings Michael.
#2 lore raw

RFC PATCH 1/1 ssb: mark bus as powered up earlier?

W dniu 20 kwietnia 2011 20:33 u?ytkownik Michael B?sch <[email protected]> napisa?:

Quoted 2 lines

Just in case you don't know: Please send patches to John directly and just CC me. And if I don't complain, it's an ACK ;)

I wanted to make sure about this one, so I just posted it without Signed-off-by or to:John. Will resend later with correct "to" and signed.

Signature · 1 line
Rafa?
maintainer
#3 lore raw

RFC PATCH 1/1 ssb: mark bus as powered up earlier?

Quoted 8 lines · Rafa? Mi?ecki

W dniu 20 kwietnia 2011 20:33 u?ytkownik Michael B?sch <[email protected]> napisa?:

Quoted 2 lines

Just in case you don't know: Please send patches to John directly and just CC me. And if I don't complain, it's an ACK ;)

I wanted to make sure about this one, so I just posted it without Signed-off-by or to:John. Will resend later with correct "to" and signed.

Ah ok. Yes it seems nobody with an affected device ever tested with debugging enabled.

Signature · 1 line
Greetings Michael.