mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-05 19:10:13 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
61 lines
1.9 KiB
C
61 lines
1.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Internal PCI functions, not exported outside drivers/pci
|
|
*
|
|
* Copyright (c) 2015 Google, Inc
|
|
* Written by Simon Glass <sjg@chromium.org>
|
|
*/
|
|
|
|
#ifndef __pci_internal_h
|
|
#define __pci_internal_h
|
|
|
|
/**
|
|
* dm_pciauto_prescan_setup_bridge() - Set up a bridge for scanning
|
|
*
|
|
* This gets a bridge ready so that its downstream devices can be scanned.
|
|
* It sets up the bus number and memory range registers. Once the scan is
|
|
* completed, dm_pciauto_postscan_setup_bridge() should be called.
|
|
*
|
|
* @dev: Bridge device to be scanned
|
|
* @sub_bus: Bus number of the 'other side' of the bridge
|
|
*/
|
|
void dm_pciauto_prescan_setup_bridge(struct udevice *dev, int sub_bus);
|
|
|
|
/**
|
|
* dm_pciauto_postscan_setup_bridge() - Finish set up of a bridge after scanning
|
|
*
|
|
* This should be called after a bus scan is complete. It adjusts the memory
|
|
* ranges to fit with the devices actually found on the other side (downstream)
|
|
* of the bridge.
|
|
*
|
|
* @dev: Bridge device that was scanned
|
|
* @sub_bus: Bus number of the 'other side' of the bridge
|
|
*/
|
|
void dm_pciauto_postscan_setup_bridge(struct udevice *dev, int sub_bus);
|
|
|
|
/**
|
|
* dm_pciauto_config_device() - Configure a PCI device ready for use
|
|
*
|
|
* If the device is a bridge, downstream devices will be probed.
|
|
*
|
|
* @dev: Device to configure
|
|
* @return the maximum PCI bus number found by this device. If there are no
|
|
* bridges, this just returns the device's bus number. If the device is a
|
|
* bridge then it will return a larger number, depending on the devices on
|
|
* that bridge. On error, returns a -ve error number.
|
|
*/
|
|
int dm_pciauto_config_device(struct udevice *dev);
|
|
|
|
/**
|
|
* pci_get_bus() - Get a pointer to a bus, given its number
|
|
*
|
|
* This looks up a PCI bus based on its bus number. The bus is probed if
|
|
* necessary.
|
|
*
|
|
* @busnum: PCI bus number to look up
|
|
* @busp: Returns PCI bus on success
|
|
* @return 0 on success, or -ve error
|
|
*/
|
|
int pci_get_bus(int busnum, struct udevice **busp);
|
|
|
|
#endif
|