Some cleanup to allow build for multiple architectures.

This commit is contained in:
Jennifer Averett 2012-07-11 12:48:58 -05:00
parent 2f50f0a7a9
commit 59f69ea3cd
2 changed files with 16 additions and 13 deletions

View File

@ -217,7 +217,9 @@ bus_space_free(bus_space_tag_t bst __unused, bus_space_handle_t bsh, bus_size_t
#elif defined(__ppc__)
#include <freebsd/machine/bus_space-simple_memory.h>
#else
#error "Bus space routines not implemented for this architecture!!"
#warning "Bus space routines not implemented for this architecture!!"
#warning "Defaulting to simple-memory Bus space routines!!"
#include <freebsd/machine/bus_space-simple_memory.h>
#endif
#include <freebsd/machine/bus_dma.h>

View File

@ -53,23 +53,24 @@
#include <freebsd/machine/rtems-bsd-devicet.h>
#include <bsp/irq.h>
#include <rtems/irq.h>
#include <freebsd/machine/bus.h>
/* XXX Note: These defines should be moved. */
#if defined(__i386__)
#include <freebsd/machine/rtems-bsd-config.h>
#define I386_BUS_SPACE_MEM 0 /* space is mem space */
#endif
/* XXX */
#define NUM_IO_INTS 30
#ifdef __amd64__
#define BUS_SPACE_IO AMD64_BUS_SPACE_IO
#define BUS_SPACE_MEM AMD64_BUS_SPACE_MEM
#define BUS_SPACE_IO I386_BUS_SPACE_IO
#define BUS_SPACE_MEM I386_BUS_SPACE_MEM
#elif defined(__amd64__)
#define BUS_SPACE_IO AMD64_BUS_SPACE_IO
#define BUS_SPACE_MEM AMD64_BUS_SPACE_MEM
#else
#define BUS_SPACE_IO I386_BUS_SPACE_IO
#define BUS_SPACE_MEM I386_BUS_SPACE_MEM
#warning "Bus space information not implemented for this architecture!!"
#warning "Defaulting Bus space information!!"
#define BUS_SPACE_IO 0
#define BUS_SPACE_MEM 1
#endif
/* XXX - Just a guess */
#define NUM_IO_INTS 30
#define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev))