1 /****************************************************************************** 2 * 3 * Copyright(c) 2019 Realtek Corporation. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of version 2 of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 * 14 *****************************************************************************/ 15 #ifndef __PLATFORM_OPS_H__ 16 #define __PLATFORM_OPS_H__ 17 18 /* 19 * Return: 20 *0: power on successfully 21 *others: power on failed 22 */ 23 24 #ifdef CONFIG_PLATFORM_OPS 25 void pci_cache_wback(struct pci_dev *hwdev, 26 dma_addr_t *bus_addr, size_t size, int direction); 27 void pci_cache_inv(struct pci_dev *hwdev, 28 dma_addr_t *bus_addr, size_t size, int direction); 29 void pci_get_bus_addr(struct pci_dev *hwdev, 30 void *vir_addr, dma_addr_t *bus_addr, size_t size, int direction); 31 void pci_unmap_bus_addr(struct pci_dev *hwdev, 32 dma_addr_t *bus_addr, size_t size, int direction); 33 void *pci_alloc_cache_mem(struct pci_dev *pdev, 34 dma_addr_t *bus_addr, size_t size, int direction); 35 void *pci_alloc_noncache_mem(struct pci_dev *pdev, 36 dma_addr_t *bus_addr, size_t size); 37 void pci_free_cache_mem(struct pci_dev *pdev, void *vir_addr, 38 dma_addr_t *bus_addr, size_t size, int direction); 39 void pci_free_noncache_mem(struct pci_dev *pdev, void *vir_addr, 40 dma_addr_t *bus_addr, size_t size); 41 #endif 42 int platform_wifi_power_on(void); 43 void platform_wifi_power_off(void); 44 void platform_wifi_get_oob_irq(int *oob_irq); 45 void platform_wifi_mac_addr(u8 *mac_addr); 46 #endif /* __PLATFORM_OPS_H__ */ 47