source: branches/backfire/target/linux/generic-2.6/patches-2.6.32/976-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: 
    13581358} 
    13591359EXPORT_SYMBOL(ssb_bus_powerup); 
    13601360 
     1361static void ssb_broadcast_value(struct ssb_device *dev, 
     1362                                u32 address, u32 data) 
     1363{ 
     1364        /* This is used for both, PCI and ChipCommon core, so be careful. */ 
     1365        BUILD_BUG_ON(SSB_PCICORE_BCAST_ADDR != SSB_CHIPCO_BCAST_ADDR); 
     1366        BUILD_BUG_ON(SSB_PCICORE_BCAST_DATA != SSB_CHIPCO_BCAST_DATA); 
     1367 
     1368        ssb_write32(dev, SSB_PCICORE_BCAST_ADDR, address); 
     1369        ssb_read32(dev, SSB_PCICORE_BCAST_ADDR); /* flush */ 
     1370        ssb_write32(dev, SSB_PCICORE_BCAST_DATA, data); 
     1371        ssb_read32(dev, SSB_PCICORE_BCAST_DATA); /* flush */ 
     1372} 
     1373 
     1374void ssb_commit_settings(struct ssb_bus *bus) 
     1375{ 
     1376        struct ssb_device *dev; 
     1377 
     1378        dev = bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev; 
     1379        if (WARN_ON(!dev)) 
     1380                return; 
     1381        /* This forces an update of the cached registers. */ 
     1382        ssb_broadcast_value(dev, 0xFD8, 0); 
     1383} 
     1384EXPORT_SYMBOL(ssb_commit_settings); 
     1385 
    13611386u32 ssb_admatch_base(u32 adm) 
    13621387{ 
    13631388        u32 base = 0; 
  • include/linux/ssb/ssb.h

    a b extern int ssb_bus_may_powerdown(struct  
    671671 * Otherwise static always-on powercontrol will be used. */ 
    672672extern int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl); 
    673673 
     674extern void ssb_commit_settings(struct ssb_bus *bus); 
    674675 
    675676/* Various helper functions */ 
    676677extern u32 ssb_admatch_base(u32 adm); 
Note: See TracBrowser for help on using the repository browser.