Ühel kenal päeval, T, 2009-01-06 kell 00:38, kirjutas Peter Stuge:
> Uwe Hermann wrote:
> > > There's a pciconf.h with PCI conf constants - lets actually use it
> > >
> > > PCI_CONF_REG_{INDEX,DATA} constants instead of 0xCF8 and 0xCFF everywhere.
> > > Not touching YABEL as I'm not sure it would want to include that header.
> > >
> > > Signed-off-by: Mart Raudsepp <[email protected]>
> >
> > Acked-by: Uwe Hermann <[email protected]>
>
> Please don't commit this. I would rather see the 0xcf8 and cfc
> defines removed. This is PCI code, these ports will never change
> for PCI buses, and they are the first thing most learn about PCI
> programming.
>
> Defines add indirection = complexity = error sources. I'm with
> Stefan, we should use them carefully.
Hence the sentence "In case it's a good idea to use these constants from
that header" in my mail :)
I simply noticed the fact that there are constant defined, and that the
same thing is used per value. Lets perhaps fix the inconsistency another
way then. Proposed patch attached.
Mart Raudsepp
>From 8958dfebdb60fd646b9a841e2dff22f616113088 Mon Sep 17 00:00:00 2001
From: Mart Raudsepp <[email protected]>
Date: Tue, 6 Jan 2009 11:32:38 +0200
Subject: [PATCH] Remove unused pciconf.h header with constants that everyone uses by value instead per convention
Signed-off-by: Mart Raudsepp <[email protected]>
---
arch/x86/pci_ops_auto.c | 1 -
arch/x86/pci_ops_conf1.c | 1 -
arch/x86/pci_ops_mmconf.c | 1 -
device/pci_ops.c | 1 -
include/arch/x86/pciconf.h | 13 -------------
5 files changed, 0 insertions(+), 17 deletions(-)
delete mode 100644 include/arch/x86/pciconf.h
diff --git a/arch/x86/pci_ops_auto.c b/arch/x86/pci_ops_auto.c
index 33634bc..d5fbe43 100644
--- a/arch/x86/pci_ops_auto.c
+++ b/arch/x86/pci_ops_auto.c
@@ -1,6 +1,5 @@
#include <console.h>
#include <device/device.h>
-#include <pciconf.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
diff --git a/arch/x86/pci_ops_conf1.c b/arch/x86/pci_ops_conf1.c
index a9a7fea..83b06ea 100644
--- a/arch/x86/pci_ops_conf1.c
+++ b/arch/x86/pci_ops_conf1.c
@@ -1,6 +1,5 @@
#include <console.h>
#include <device/device.h>
-#include <pciconf.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
diff --git a/arch/x86/pci_ops_mmconf.c b/arch/x86/pci_ops_mmconf.c
index e09692c..358e2d2 100644
--- a/arch/x86/pci_ops_mmconf.c
+++ b/arch/x86/pci_ops_mmconf.c
@@ -1,6 +1,5 @@
#include <console.h>
#include <device/device.h>
-#include <pciconf.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
diff --git a/device/pci_ops.c b/device/pci_ops.c
index 411f927..2109701 100644
--- a/device/pci_ops.c
+++ b/device/pci_ops.c
@@ -20,7 +20,6 @@
#include <console.h>
#include <device/device.h>
-#include <pciconf.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
diff --git a/include/arch/x86/pciconf.h b/include/arch/x86/pciconf.h
deleted file mode 100644
index 265dac7..0000000
--- a/include/arch/x86/pciconf.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef ARCH_X86_PCICONF_H
-#define ARCH_X86_PCICONF_H
-
-#ifndef PCI_CONF_REG_INDEX
-
-// These are defined in the PCI spec, and hence are theoretically
-// inclusive of ANYTHING that uses a PCI bus.
-#define PCI_CONF_REG_INDEX 0xcf8
-#define PCI_CONF_REG_DATA 0xcfc
-
-#endif
-
-#endif /* ARCH_X86_PCICONF_H */
--
1.6.0.4
--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot