ssb: mark bus as powered up earlier
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. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
25f63a5a37
commit
a6ef814383
@@ -1309,20 +1309,20 @@ EXPORT_SYMBOL(ssb_bus_may_powerdown);
|
|||||||
|
|
||||||
int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl)
|
int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl)
|
||||||
{
|
{
|
||||||
struct ssb_chipcommon *cc;
|
|
||||||
int err;
|
int err;
|
||||||
enum ssb_clkmode mode;
|
enum ssb_clkmode mode;
|
||||||
|
|
||||||
err = ssb_pci_xtal(bus, SSB_GPIO_XTAL | SSB_GPIO_PLL, 1);
|
err = ssb_pci_xtal(bus, SSB_GPIO_XTAL | SSB_GPIO_PLL, 1);
|
||||||
if (err)
|
if (err)
|
||||||
goto error;
|
goto error;
|
||||||
cc = &bus->chipco;
|
|
||||||
mode = dynamic_pctl ? SSB_CLKMODE_DYNAMIC : SSB_CLKMODE_FAST;
|
|
||||||
ssb_chipco_set_clockmode(cc, mode);
|
|
||||||
|
|
||||||
#ifdef CONFIG_SSB_DEBUG
|
#ifdef CONFIG_SSB_DEBUG
|
||||||
bus->powered_up = 1;
|
bus->powered_up = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
mode = dynamic_pctl ? SSB_CLKMODE_DYNAMIC : SSB_CLKMODE_FAST;
|
||||||
|
ssb_chipco_set_clockmode(&bus->chipco, mode);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
error:
|
error:
|
||||||
ssb_printk(KERN_ERR PFX "Bus powerup failed\n");
|
ssb_printk(KERN_ERR PFX "Bus powerup failed\n");
|
||||||
|
Reference in New Issue
Block a user