summaryrefslogtreecommitdiffstats
path: root/src/arch/x86/include/arch/io.h
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-01-06 15:21:02 -0700
committerMartin Roth <martinroth@google.com>2016-01-19 00:36:48 +0100
commite369010ab872aa4d90ef99af95a50cdd8353520e (patch)
tree5be36e1fd17d26047da9805c94335ffeb4313e65 /src/arch/x86/include/arch/io.h
parent67e11d1e4f5fa4ba7e864bb0487bf5a835fb2919 (diff)
downloadcoreboot-e369010ab872aa4d90ef99af95a50cdd8353520e.tar.gz
coreboot-e369010ab872aa4d90ef99af95a50cdd8353520e.tar.bz2
coreboot-e369010ab872aa4d90ef99af95a50cdd8353520e.zip
arch/x86: Indent using tabs not spaces
No functional changes - just whitespace fixes. Signed-off-by: Martin Roth <martinroth@google.com> Change-Id: I8ffa87240bcbd3d657ed9dc619b5e5bf9de734d7 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12853 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch/x86/include/arch/io.h')
-rw-r--r--src/arch/x86/include/arch/io.h84
1 files changed, 42 insertions, 42 deletions
diff --git a/src/arch/x86/include/arch/io.h b/src/arch/x86/include/arch/io.h
index 2f4206188ffd..a71e1a4e44a2 100644
--- a/src/arch/x86/include/arch/io.h
+++ b/src/arch/x86/include/arch/io.h
@@ -190,27 +190,27 @@ static inline __attribute__((always_inline)) void write32(volatile void *addr, u
#if defined(__ROMCC__)
static inline int log2(u32 value)
{
- unsigned int r = 0;
- __asm__ volatile (
- "bsrl %1, %0\n\t"
- "jnz 1f\n\t"
- "movl $-1, %0\n\t"
- "1:\n\t"
- : "=r" (r) : "r" (value));
- return r;
+ unsigned int r = 0;
+ __asm__ volatile (
+ "bsrl %1, %0\n\t"
+ "jnz 1f\n\t"
+ "movl $-1, %0\n\t"
+ "1:\n\t"
+ : "=r" (r) : "r" (value));
+ return r;
}
static inline int __ffs(u32 value)
{
- unsigned int r = 0;
- __asm__ volatile (
- "bsfl %1, %0\n\t"
- "jnz 1f\n\t"
- "movl $-1, %0\n\t"
- "1:\n\t"
- : "=r" (r) : "r" (value));
- return r;
+ unsigned int r = 0;
+ __asm__ volatile (
+ "bsfl %1, %0\n\t"
+ "jnz 1f\n\t"
+ "movl $-1, %0\n\t"
+ "1:\n\t"
+ : "=r" (r) : "r" (value));
+ return r;
}
#endif
@@ -218,15 +218,15 @@ static inline int __ffs(u32 value)
#ifdef __SIMPLE_DEVICE__
#define PCI_ADDR(SEGBUS, DEV, FN, WHERE) ( \
- (((SEGBUS) & 0xFFF) << 20) | \
- (((DEV) & 0x1F) << 15) | \
- (((FN) & 0x07) << 12) | \
- ((WHERE) & 0xFFF))
+ (((SEGBUS) & 0xFFF) << 20) | \
+ (((DEV) & 0x1F) << 15) | \
+ (((FN) & 0x07) << 12) | \
+ ((WHERE) & 0xFFF))
#define PCI_DEV(SEGBUS, DEV, FN) ( \
- (((SEGBUS) & 0xFFF) << 20) | \
- (((DEV) & 0x1F) << 15) | \
- (((FN) & 0x07) << 12))
+ (((SEGBUS) & 0xFFF) << 20) | \
+ (((DEV) & 0x1F) << 15) | \
+ (((FN) & 0x07) << 12))
#define PCI_ID(VENDOR_ID, DEVICE_ID) \
((((DEVICE_ID) & 0xFFFF) << 16) | ((VENDOR_ID) & 0xFFFF))
@@ -267,14 +267,14 @@ void pci_or_config32(pci_devfn_t dev, unsigned where, uint32_t value)
#define PCI_DEV_INVALID (0xffffffffU)
static inline pci_devfn_t pci_io_locate_device(unsigned pci_id, pci_devfn_t dev)
{
- for(; dev <= PCI_DEV(255, 31, 7); dev += PCI_DEV(0,0,1)) {
- unsigned int id;
- id = pci_io_read_config32(dev, 0);
- if (id == pci_id) {
- return dev;
- }
- }
- return PCI_DEV_INVALID;
+ for(; dev <= PCI_DEV(255, 31, 7); dev += PCI_DEV(0,0,1)) {
+ unsigned int id;
+ id = pci_io_read_config32(dev, 0);
+ if (id == pci_id) {
+ return dev;
+ }
+ }
+ return PCI_DEV_INVALID;
}
static inline pci_devfn_t pci_locate_device(unsigned pci_id, pci_devfn_t dev)
@@ -293,17 +293,17 @@ static inline pci_devfn_t pci_locate_device_on_bus(unsigned pci_id, unsigned bus
{
pci_devfn_t dev, last;
- dev = PCI_DEV(bus, 0, 0);
- last = PCI_DEV(bus, 31, 7);
-
- for(; dev <=last; dev += PCI_DEV(0,0,1)) {
- unsigned int id;
- id = pci_read_config32(dev, 0);
- if (id == pci_id) {
- return dev;
- }
- }
- return PCI_DEV_INVALID;
+ dev = PCI_DEV(bus, 0, 0);
+ last = PCI_DEV(bus, 31, 7);
+
+ for(; dev <=last; dev += PCI_DEV(0,0,1)) {
+ unsigned int id;
+ id = pci_read_config32(dev, 0);
+ if (id == pci_id) {
+ return dev;
+ }
+ }
+ return PCI_DEV_INVALID;
}
/* Generic functions for pnp devices */