mirror of
https://xff.cz/git/u-boot/
synced 2025-09-28 22:11:16 +02:00
dm: pci: Switch to DM API for PCI address mapping
We should use the new address mapping functions unless we are in compatibility mode. Disable the old functions by default. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -99,6 +99,7 @@ __weak int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT)
|
||||||
/* Get a virtual address associated with a BAR region */
|
/* Get a virtual address associated with a BAR region */
|
||||||
void *pci_map_bar(pci_dev_t pdev, int bar, int flags)
|
void *pci_map_bar(pci_dev_t pdev, int bar, int flags)
|
||||||
{
|
{
|
||||||
@@ -271,7 +272,6 @@ pci_addr_t pci_hose_phys_to_bus(struct pci_controller *hose,
|
|||||||
return bus_addr;
|
return bus_addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT)
|
|
||||||
pci_dev_t pci_find_device(unsigned int vendor, unsigned int device, int index)
|
pci_dev_t pci_find_device(unsigned int vendor, unsigned int device, int index)
|
||||||
{
|
{
|
||||||
struct pci_device_id ids[2] = { {}, {0, 0} };
|
struct pci_device_id ids[2] = { {}, {0, 0} };
|
||||||
|
@@ -621,6 +621,7 @@ static inline void pci_set_ops(struct pci_controller *hose,
|
|||||||
extern void pci_setup_indirect(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data);
|
extern void pci_setup_indirect(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT)
|
||||||
extern phys_addr_t pci_hose_bus_to_phys(struct pci_controller* hose,
|
extern phys_addr_t pci_hose_bus_to_phys(struct pci_controller* hose,
|
||||||
pci_addr_t addr, unsigned long flags);
|
pci_addr_t addr, unsigned long flags);
|
||||||
extern pci_addr_t pci_hose_phys_to_bus(struct pci_controller* hose,
|
extern pci_addr_t pci_hose_phys_to_bus(struct pci_controller* hose,
|
||||||
@@ -656,7 +657,6 @@ extern pci_addr_t pci_hose_phys_to_bus(struct pci_controller* hose,
|
|||||||
pci_bus_to_virt((dev), (addr), PCI_REGION_IO, (len), (map_flags))
|
pci_bus_to_virt((dev), (addr), PCI_REGION_IO, (len), (map_flags))
|
||||||
|
|
||||||
/* For driver model these are defined in macros in pci_compat.c */
|
/* For driver model these are defined in macros in pci_compat.c */
|
||||||
#if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT)
|
|
||||||
extern int pci_hose_read_config_byte(struct pci_controller *hose,
|
extern int pci_hose_read_config_byte(struct pci_controller *hose,
|
||||||
pci_dev_t dev, int where, u8 *val);
|
pci_dev_t dev, int where, u8 *val);
|
||||||
extern int pci_hose_read_config_word(struct pci_controller *hose,
|
extern int pci_hose_read_config_word(struct pci_controller *hose,
|
||||||
|
Reference in New Issue
Block a user