mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-30 19:11:37 +00:00
x86: pci: Add handlers before and after a PCI hose scan
Some boards will want to do some setup before and after a PCI hose is scanned. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
a2f5d091cc
commit
e94ea6f656
2 changed files with 15 additions and 0 deletions
|
@ -33,6 +33,16 @@ int pci_early_init_hose(struct pci_controller **hosep)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__weak int board_pci_pre_scan(struct pci_controller *hose)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
__weak int board_pci_post_scan(struct pci_controller *hose)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void pci_init_board(void)
|
void pci_init_board(void)
|
||||||
{
|
{
|
||||||
struct pci_controller *hose = &x86_hose;
|
struct pci_controller *hose = &x86_hose;
|
||||||
|
@ -44,7 +54,9 @@ void pci_init_board(void)
|
||||||
pci_setup_type1(hose);
|
pci_setup_type1(hose);
|
||||||
pci_register_hose(hose);
|
pci_register_hose(hose);
|
||||||
|
|
||||||
|
board_pci_pre_scan(hose);
|
||||||
hose->last_busno = pci_hose_scan(hose);
|
hose->last_busno = pci_hose_scan(hose);
|
||||||
|
board_pci_post_scan(hose);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_controller *get_hose(void)
|
static struct pci_controller *get_hose(void)
|
||||||
|
|
|
@ -34,6 +34,9 @@ void board_pci_setup_hose(struct pci_controller *hose);
|
||||||
*/
|
*/
|
||||||
int pci_early_init_hose(struct pci_controller **hosep);
|
int pci_early_init_hose(struct pci_controller **hosep);
|
||||||
|
|
||||||
|
int board_pci_pre_scan(struct pci_controller *hose);
|
||||||
|
int board_pci_post_scan(struct pci_controller *hose);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Simple PCI access routines - these work from either the early PCI hose
|
* Simple PCI access routines - these work from either the early PCI hose
|
||||||
* or the 'real' one, created after U-Boot has memory available
|
* or the 'real' one, created after U-Boot has memory available
|
||||||
|
|
Loading…
Add table
Reference in a new issue