source: branches/backfire/target/linux/generic-2.6/patches-2.6.30/943-ssb_commit_settings_export.patch @ 27429

Last change on this file since 27429 was 27429, checked in by nbd, 5 years ago

kernel: backport the ssb_commit_settings export, required for the new compat-wireless version

File size: 2.4 KB
  • drivers/ssb/driver_pcicore.c

    a b static void ssb_pcie_mdio_write(struct s 
    476476        pcicore_write32(pc, mdio_control, 0); 
    477477} 
    478478 
    479 static void ssb_broadcast_value(struct ssb_device *dev, 
    480                                 u32 address, u32 data) 
    481 { 
    482         /* This is used for both, PCI and ChipCommon core, so be careful. */ 
    483         BUILD_BUG_ON(SSB_PCICORE_BCAST_ADDR != SSB_CHIPCO_BCAST_ADDR); 
    484         BUILD_BUG_ON(SSB_PCICORE_BCAST_DATA != SSB_CHIPCO_BCAST_DATA); 
    485  
    486         ssb_write32(dev, SSB_PCICORE_BCAST_ADDR, address); 
    487         ssb_read32(dev, SSB_PCICORE_BCAST_ADDR); /* flush */ 
    488         ssb_write32(dev, SSB_PCICORE_BCAST_DATA, data); 
    489         ssb_read32(dev, SSB_PCICORE_BCAST_DATA); /* flush */ 
    490 } 
    491  
    492 static void ssb_commit_settings(struct ssb_bus *bus) 
    493 { 
    494         struct ssb_device *dev; 
    495  
    496         dev = bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev; 
    497         if (WARN_ON(!dev)) 
    498                 return; 
    499         /* This forces an update of the cached registers. */ 
    500         ssb_broadcast_value(dev, 0xFD8, 0); 
    501 } 
    502  
    503479int ssb_pcicore_dev_irqvecs_enable(struct ssb_pcicore *pc, 
    504480                                   struct ssb_device *dev) 
    505481{ 
  • drivers/ssb/main.c

    a b error: 
    14061406} 
    14071407EXPORT_SYMBOL(ssb_bus_powerup); 
    14081408 
     1409static void ssb_broadcast_value(struct ssb_device *dev, 
     1410                                u32 address, u32 data) 
     1411{ 
     1412        /* This is used for both, PCI and ChipCommon core, so be careful. */ 
     1413        BUILD_BUG_ON(SSB_PCICORE_BCAST_ADDR != SSB_CHIPCO_BCAST_ADDR); 
     1414        BUILD_BUG_ON(SSB_PCICORE_BCAST_DATA != SSB_CHIPCO_BCAST_DATA); 
     1415 
     1416        ssb_write32(dev, SSB_PCICORE_BCAST_ADDR, address); 
     1417        ssb_read32(dev, SSB_PCICORE_BCAST_ADDR); /* flush */ 
     1418        ssb_write32(dev, SSB_PCICORE_BCAST_DATA, data); 
     1419        ssb_read32(dev, SSB_PCICORE_BCAST_DATA); /* flush */ 
     1420} 
     1421 
     1422void ssb_commit_settings(struct ssb_bus *bus) 
     1423{ 
     1424        struct ssb_device *dev; 
     1425 
     1426        dev = bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev; 
     1427        if (WARN_ON(!dev)) 
     1428                return; 
     1429        /* This forces an update of the cached registers. */ 
     1430        ssb_broadcast_value(dev, 0xFD8, 0); 
     1431} 
     1432EXPORT_SYMBOL(ssb_commit_settings); 
     1433 
    14091434u32 ssb_admatch_base(u32 adm) 
    14101435{ 
    14111436        u32 base = 0; 
  • include/linux/ssb/ssb.h

    a b extern int ssb_bus_may_powerdown(struct  
    675675 * Otherwise static always-on powercontrol will be used. */ 
    676676extern int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl); 
    677677 
     678extern void ssb_commit_settings(struct ssb_bus *bus); 
    678679 
    679680/* Various helper functions */ 
    680681extern u32 ssb_admatch_base(u32 adm); 
Note: See TracBrowser for help on using the repository browser.