diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 5fd004f4df..15a3e7513e 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -54,9 +54,9 @@ $(obj)/linuxbios.stage2: $(obj)/stage0.init $(obj)/statictree.o # # main $(Q)$(CC) $(INITCFLAGS) -c $(src)/lib/stage2.c -o $(obj)/stage2.o - $(Q)$(CC) $(INITCFLAGS) -c $(src)/devices/device.c -o $(obj)/device.o - $(Q)$(CC) $(INITCFLAGS) -c $(src)/devices/device_util.c -o $(obj)/device_util.o - $(Q)$(CC) $(INITCFLAGS) -c $(src)/devices/root_device.c -o $(obj)/root_device.o + $(Q)$(CC) $(INITCFLAGS) -c $(src)/device/device.c -o $(obj)/device.o + $(Q)$(CC) $(INITCFLAGS) -c $(src)/device/device_util.c -o $(obj)/device_util.o + $(Q)$(CC) $(INITCFLAGS) -c $(src)/device/root_device.c -o $(obj)/root_device.o $(Q)$(CC) $(INITCFLAGS) -c $(src)/lib/mem.c -o $(obj)/mem.o $(Q)$(CC) $(INITCFLAGS) -c $(src)/lib/malloc.c -o $(obj)/malloc.o $(Q)$(CC) $(INITCFLAGS) -c $(src)/lib/clog2.c -o $(obj)/clog2.o diff --git a/devices/agp_device.c b/device/agp_device.c similarity index 100% rename from devices/agp_device.c rename to device/agp_device.c diff --git a/devices/cardbus_device.c b/device/cardbus_device.c similarity index 100% rename from devices/cardbus_device.c rename to device/cardbus_device.c diff --git a/devices/device.c b/device/device.c similarity index 100% rename from devices/device.c rename to device/device.c diff --git a/devices/device_util.c b/device/device_util.c similarity index 100% rename from devices/device_util.c rename to device/device_util.c diff --git a/devices/hypertransport.c b/device/hypertransport.c similarity index 100% rename from devices/hypertransport.c rename to device/hypertransport.c diff --git a/devices/pci_device.c b/device/pci_device.c similarity index 100% rename from devices/pci_device.c rename to device/pci_device.c diff --git a/devices/pci_ops.c b/device/pci_ops.c similarity index 100% rename from devices/pci_ops.c rename to device/pci_ops.c diff --git a/devices/pci_rom.c b/device/pci_rom.c similarity index 100% rename from devices/pci_rom.c rename to device/pci_rom.c diff --git a/devices/pciexp_device.c b/device/pciexp_device.c similarity index 100% rename from devices/pciexp_device.c rename to device/pciexp_device.c diff --git a/devices/pcix_device.c b/device/pcix_device.c similarity index 100% rename from devices/pcix_device.c rename to device/pcix_device.c diff --git a/devices/pnp_device.c b/device/pnp_device.c similarity index 100% rename from devices/pnp_device.c rename to device/pnp_device.c diff --git a/devices/root_device.c b/device/root_device.c similarity index 100% rename from devices/root_device.c rename to device/root_device.c diff --git a/devices/smbus_ops.c b/device/smbus_ops.c similarity index 100% rename from devices/smbus_ops.c rename to device/smbus_ops.c diff --git a/include/device/pci.h b/include/device/pci.h index 0ce5c473f8..18b67977a7 100644 --- a/include/device/pci.h +++ b/include/device/pci.h @@ -1,24 +1,26 @@ /* - 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; either version 2 of the License, or - (at your option) any later version. - - 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. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -*/ -/* - * PCI defines and function prototypes - * Copyright 1994, Drew Eckhardt - * Copyright 1997--1999 Martin Mares + * This file is part of the LinuxBIOS project. * + * PCI defines and function prototypes + * Copyright 1994, Drew Eckhardt + * Copyright 1997-1999 Martin Mares + * + * 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; either version 2 of the License, or + * (at your option) any later version. + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* * For more information, please consult the following manuals (look at * http://www.pcisig.com/ for how to get them): * @@ -98,6 +100,8 @@ void pci_dev_set_subsystem(struct device * dev, unsigned vendor, unsigned device #define PCI_IO_BRIDGE_ALIGN 4096 #define PCI_MEM_BRIDGE_ALIGN (1024*1024) +#define PCI_BUS_SEGN_BITS 0 + static inline const struct pci_operations *ops_pci(struct device * dev) { const struct pci_operations *pops; diff --git a/lib/malloc.c b/lib/malloc.c index bb861afc5a..141e1347c3 100644 --- a/lib/malloc.c +++ b/lib/malloc.c @@ -23,9 +23,9 @@ #include #if 0 -#define MALLOCDBG(x) +#define MALLOCDBG(x...) #else -#define MALLOCDBG(x) printk x +#define MALLOCDBG(x...) printk (BIOS_SPEW, x) #endif /* instead of ldscript magic, just declare an array. The array @@ -56,7 +56,7 @@ void *malloc(size_t size) { void *p; - MALLOCDBG(("%s Enter, size %d, free_mem_ptr %p\n", __FUNCTION__, size, free_mem_ptr)); + MALLOCDBG("%s Enter, size %d, free_mem_ptr %p\n", __FUNCTION__, size, free_mem_ptr); if (size < 0) die("Error! malloc: Size < 0"); if (free_mem_ptr <= 0) @@ -70,7 +70,7 @@ void *malloc(size_t size) if (free_mem_ptr >= free_mem_end_ptr) die("Error! malloc: free_mem_ptr >= free_mem_end_ptr"); - MALLOCDBG(("malloc 0x%08lx\n", (unsigned long)p)); + MALLOCDBG("malloc 0x%08lx\n", (unsigned long)p); return p; }