src: Move {pci,pnp}_devfn_t to common 'device/pci_type.h'

Definitions of these types are arch-agnostic. Shared device
subsystem files cannot include arch/pci_ops.h for ARM
and arch/io.h for x86.

Change-Id: I6a3deea676308e2dc703b5e06558b05235191044
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/29947
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
Elyes HAOUAS 2018-12-03 09:32:31 +01:00 committed by Kyösti Mälkki
parent f9e47cc4c2
commit e3682b6c1c
6 changed files with 27 additions and 9 deletions

View File

@ -17,8 +17,7 @@
#define ARCH_ARM_PCI_OPS_H
#include <stdint.h>
typedef u32 pci_devfn_t;
#include <device/pci_type.h>
#ifdef __SIMPLE_DEVICE__
u8 pci_read_config8(pci_devfn_t dev, unsigned int where);

View File

@ -17,8 +17,7 @@
#define ARCH_ARM64_PCI_OPS_H
#include <stdint.h>
typedef u32 pci_devfn_t;
#include <device/pci_type.h>
#ifdef __SIMPLE_DEVICE__
u8 pci_read_config8(pci_devfn_t dev, unsigned int where);

View File

@ -17,8 +17,7 @@
#define ARCH_MIPS_PCI_OPS_H
#include <stdint.h>
typedef u32 pci_devfn_t;
#include <device/pci_type.h>
#ifdef __SIMPLE_DEVICE__
u8 pci_read_config8(pci_devfn_t dev, unsigned int where);

View File

@ -17,9 +17,7 @@
#include <endian.h>
#include <stdint.h>
#include <rules.h>
typedef u32 pci_devfn_t;
typedef u32 pnp_devfn_t;
#include <device/pci_type.h>
/*
* This file contains the definitions for the x86 IO instructions

View File

@ -14,6 +14,7 @@
#include <rules.h>
#include <device/resource.h>
#include <device/path.h>
#include <device/pci_type.h>
#include <arch/io.h>
struct device;

View File

@ -0,0 +1,22 @@
/*
* This file is part of the coreboot project.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef DEVICE_PCI_TYPE_H
#define DEVICE_PCI_TYPE_H
#include <stdint.h>
typedef u32 pci_devfn_t;
typedef u32 pnp_devfn_t;
#endif /* DEVICE_PCI_TYPE_H */