arch/io.h: Fix PCI and PNP simple typedefs
Provide clean separation for PCI and PNP headers, followup will also move PNP outside <arch/io.h>. Change-Id: I85db254d50f18ea34a5e95bc517eac4085a5fafa Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/31690 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
e132d5711d
commit
3e6913b389
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <device/pci_type.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file contains the definitions for the x86 IO instructions
|
* This file contains the definitions for the x86 IO instructions
|
||||||
|
@ -203,6 +202,8 @@ static __always_inline void write64(volatile void *addr,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef u32 pnp_devfn_t;
|
||||||
|
|
||||||
#ifdef __SIMPLE_DEVICE__
|
#ifdef __SIMPLE_DEVICE__
|
||||||
|
|
||||||
#define PNP_DEV(PORT, FUNC) (((PORT) << 8) | (FUNC))
|
#define PNP_DEV(PORT, FUNC) (((PORT) << 8) | (FUNC))
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
#ifndef _PCI_EHCI_H_
|
#ifndef _PCI_EHCI_H_
|
||||||
#define _PCI_EHCI_H_
|
#define _PCI_EHCI_H_
|
||||||
|
|
||||||
#include <arch/io.h>
|
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
|
#include <device/pci_type.h>
|
||||||
|
|
||||||
#define EHCI_BAR_INDEX 0x10
|
#define EHCI_BAR_INDEX 0x10
|
||||||
#define PCI_EHCI_CLASSCODE 0x0c0320 /* USB2.0 with EHCI controller */
|
#define PCI_EHCI_CLASSCODE 0x0c0320 /* USB2.0 with EHCI controller */
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
|
#include <device/pci_type.h>
|
||||||
#include <arch/pci_ops.h>
|
#include <arch/pci_ops.h>
|
||||||
|
|
||||||
#ifdef __SIMPLE_DEVICE__
|
#ifdef __SIMPLE_DEVICE__
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef u32 pci_devfn_t;
|
typedef u32 pci_devfn_t;
|
||||||
typedef u32 pnp_devfn_t;
|
|
||||||
|
|
||||||
#define PCI_DEV(SEGBUS, DEV, FN) ( \
|
#define PCI_DEV(SEGBUS, DEV, FN) ( \
|
||||||
(((SEGBUS) & 0xFFF) << 20) | \
|
(((SEGBUS) & 0xFFF) << 20) | \
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
#define REG_SCRIPT_H
|
#define REG_SCRIPT_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <arch/io.h>
|
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
|
#include <device/pci_type.h>
|
||||||
#include <device/resource.h>
|
#include <device/resource.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
#include <device/pci_type.h>
|
||||||
#include <device/pci_def.h>
|
#include <device/pci_def.h>
|
||||||
|
|
||||||
u32 pci_read_config32_index(pci_devfn_t dev, u32 index_reg, u32 index);
|
u32 pci_read_config32_index(pci_devfn_t dev, u32 index_reg, u32 index);
|
||||||
|
|
Loading…
Reference in New Issue