old mode 100644new mode 100755| .. | .. |
|---|
| 47 | 47 | #include <pcicfg.h> |
|---|
| 48 | 48 | #include <dhd_pcie.h> |
|---|
| 49 | 49 | #include <dhd_linux.h> |
|---|
| 50 | | -#if defined(CUSTOMER_HW_ROCKCHIP) && defined(CUSTOMER_HW_ROCKCHIP_RK3588) |
|---|
| 50 | +#ifdef CUSTOMER_HW_ROCKCHIP |
|---|
| 51 | 51 | #include <rk_dhd_pcie_linux.h> |
|---|
| 52 | | -#endif /* CUSTOMER_HW_ROCKCHIP && CUSTOMER_HW_ROCKCHIP_RK3588 */ |
|---|
| 52 | +#endif /* CUSTOMER_HW_ROCKCHIP */ |
|---|
| 53 | 53 | #ifdef OEM_ANDROID |
|---|
| 54 | 54 | #ifdef CONFIG_ARCH_MSM |
|---|
| 55 | 55 | #if defined(CONFIG_PCI_MSM) || defined(CONFIG_ARCH_MSM8996) |
|---|
| .. | .. |
|---|
| 271 | 271 | |
|---|
| 272 | 272 | static struct pci_driver dhdpcie_driver = { |
|---|
| 273 | 273 | node: {&dhdpcie_driver.node, &dhdpcie_driver.node}, |
|---|
| 274 | | - name: "pcieh"BUS_TYPE, |
|---|
| 274 | + name: "pcieh", |
|---|
| 275 | 275 | id_table: dhdpcie_pci_devid, |
|---|
| 276 | 276 | probe: dhdpcie_pci_probe, |
|---|
| 277 | 277 | remove: dhdpcie_pci_remove, |
|---|
| .. | .. |
|---|
| 620 | 620 | uint32 rc_l1ss_cap; |
|---|
| 621 | 621 | uint32 ep_l1ss_cap; |
|---|
| 622 | 622 | |
|---|
| 623 | | -#if defined(CUSTOMER_HW_ROCKCHIP) && defined(CUSTOMER_HW_ROCKCHIP_RK3588) |
|---|
| 624 | | - if (IS_ENABLED(CONFIG_PCIEASPM_ROCKCHIP_WIFI_EXTENSION)) { |
|---|
| 625 | | - if (rk_dhd_bus_is_rc_ep_l1ss_capable(bus)) { |
|---|
| 626 | | - DHD_ERROR(("%s L1ss is capable\n", __FUNCTION__)); |
|---|
| 627 | | - return TRUE; |
|---|
| 628 | | - } else { |
|---|
| 629 | | - DHD_ERROR(("%s L1ss is not capable\n", __FUNCTION__)); |
|---|
| 630 | | - return FALSE; |
|---|
| 631 | | - } |
|---|
| 632 | | - } |
|---|
| 633 | | -#endif /* CUSTOMER_HW_ROCKCHIP && CUSTOMER_HW_ROCKCHIP_RK3588 */ |
|---|
| 634 | | - |
|---|
| 623 | +#ifdef CUSTOMER_HW_ROCKCHIP |
|---|
| 624 | + if (IS_ENABLED(CONFIG_PCIEASPM_ROCKCHIP_WIFI_EXTENSION)) |
|---|
| 625 | + return rk_dhd_bus_is_rc_ep_l1ss_capable(bus); |
|---|
| 626 | +#endif |
|---|
| 635 | 627 | /* RC Extendend Capacility */ |
|---|
| 636 | 628 | rc_l1ss_cap = dhdpcie_access_cap(bus->rc_dev, PCIE_EXTCAP_ID_L1SS, |
|---|
| 637 | 629 | PCIE_EXTCAP_L1SS_CONTROL_OFFSET, TRUE, FALSE, 0); |
|---|
| .. | .. |
|---|
| 1591 | 1583 | goto exit; |
|---|
| 1592 | 1584 | } |
|---|
| 1593 | 1585 | |
|---|
| 1594 | | - printf("PCI_PROBE: bus 0x%X, slot 0x%X,vendor 0x%X, device 0x%X" |
|---|
| 1586 | + printf("PCI_PROBE: bus %X, slot %X,vendor %X, device %X" |
|---|
| 1595 | 1587 | "(good PCI location)\n", pdev->bus->number, |
|---|
| 1596 | 1588 | PCI_SLOT(pdev->devfn), pdev->vendor, pdev->device); |
|---|
| 1597 | 1589 | |
|---|
| .. | .. |
|---|
| 1752 | 1744 | { |
|---|
| 1753 | 1745 | dhd_bus_t *bus = dhdpcie_info->bus; |
|---|
| 1754 | 1746 | struct pci_dev *pdev = dhdpcie_info->bus->dev; |
|---|
| 1755 | | - int host_irq_disabled, err = 0; |
|---|
| 1747 | + int host_irq_disabled; |
|---|
| 1756 | 1748 | |
|---|
| 1757 | 1749 | if (!bus->irq_registered) { |
|---|
| 1758 | 1750 | snprintf(dhdpcie_info->pciname, sizeof(dhdpcie_info->pciname), |
|---|
| .. | .. |
|---|
| 1767 | 1759 | } |
|---|
| 1768 | 1760 | |
|---|
| 1769 | 1761 | if (bus->d2h_intr_method == PCIE_MSI) |
|---|
| 1770 | | - printf("%s: MSI enabled, irq=%d\n", __FUNCTION__, pdev->irq); |
|---|
| 1762 | + printf("%s: MSI enabled\n", __FUNCTION__); |
|---|
| 1771 | 1763 | else |
|---|
| 1772 | | - printf("%s: INTx enabled, irq=%d\n", __FUNCTION__, pdev->irq); |
|---|
| 1764 | + printf("%s: INTx enabled\n", __FUNCTION__); |
|---|
| 1773 | 1765 | |
|---|
| 1774 | | - err = request_irq(pdev->irq, dhdpcie_isr, IRQF_SHARED, |
|---|
| 1775 | | - dhdpcie_info->pciname, bus); |
|---|
| 1776 | | - if (err < 0) { |
|---|
| 1777 | | - DHD_ERROR(("%s: request_irq() failed with %d\n", __FUNCTION__, err)); |
|---|
| 1766 | + if (request_irq(pdev->irq, dhdpcie_isr, IRQF_SHARED, |
|---|
| 1767 | + dhdpcie_info->pciname, bus) < 0) { |
|---|
| 1768 | + DHD_ERROR(("%s: request_irq() failed\n", __FUNCTION__)); |
|---|
| 1778 | 1769 | if (bus->d2h_intr_method == PCIE_MSI) { |
|---|
| 1779 | 1770 | dhdpcie_disable_msi(pdev); |
|---|
| 1780 | 1771 | } |
|---|
| .. | .. |
|---|
| 2066 | 2057 | adapter->bus_num = pdev->bus->number; |
|---|
| 2067 | 2058 | adapter->slot_num = PCI_SLOT(pdev->devfn); |
|---|
| 2068 | 2059 | adapter->pci_dev = pdev; |
|---|
| 2069 | | - } else { |
|---|
| 2060 | + } else |
|---|
| 2070 | 2061 | DHD_ERROR(("%s: can't find adapter info for this chip\n", __FUNCTION__)); |
|---|
| 2071 | | -#ifdef ADAPTER_IDX |
|---|
| 2072 | | - break; |
|---|
| 2073 | | -#endif |
|---|
| 2074 | | - } |
|---|
| 2075 | 2062 | osl_static_mem_init(osh, adapter); |
|---|
| 2076 | 2063 | |
|---|
| 2077 | 2064 | /* allocate linux spcific pcie structure here */ |
|---|
| .. | .. |
|---|
| 2306 | 2293 | |
|---|
| 2307 | 2294 | if (dhdpcie_info) |
|---|
| 2308 | 2295 | dhdpcie_detach(dhdpcie_info); |
|---|
| 2309 | | - if (adapter) |
|---|
| 2310 | | - pci_disable_device(pdev); |
|---|
| 2296 | + pci_disable_device(pdev); |
|---|
| 2311 | 2297 | if (osh) |
|---|
| 2312 | 2298 | osl_detach(osh); |
|---|
| 2313 | 2299 | if (adapter != NULL) { |
|---|
| .. | .. |
|---|
| 3372 | 3358 | dhd_bus_mem_dump(g_dhd_bus->dhd); |
|---|
| 3373 | 3359 | return 0; |
|---|
| 3374 | 3360 | } |
|---|
| 3375 | | -#ifndef BCMDHD_MDRIVER |
|---|
| 3376 | 3361 | EXPORT_SYMBOL(dhd_dongle_mem_dump); |
|---|
| 3377 | | -#endif |
|---|
| 3378 | 3362 | #endif /* DHD_FW_COREDUMP */ |
|---|
| 3379 | 3363 | |
|---|
| 3380 | 3364 | #ifdef CONFIG_ARCH_MSM |
|---|
| .. | .. |
|---|
| 3405 | 3389 | |
|---|
| 3406 | 3390 | return isup; |
|---|
| 3407 | 3391 | } |
|---|
| 3408 | | -#ifndef BCMDHD_MDRIVER |
|---|
| 3409 | 3392 | EXPORT_SYMBOL(dhd_bus_check_driver_up); |
|---|
| 3410 | | -#endif |
|---|