From 1fb6c756aeb5bb82c3c0da0cde699f0913e0b5ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Tue, 28 Jan 2014 15:49:05 +0000 Subject: [PATCH] modified to throw errors if an unknown machine type is detected --- Makefile | 13 ++++++++----- bas.lk.in | 10 ++++++---- dma/dma.c | 8 ++++++-- include/wait.h | 8 ++++++-- net/am79c874.c | 4 +++- net/bcm5222.c | 2 ++ net/fec.c | 2 ++ net/net_timer.c | 2 ++ sys/driver_mem.c | 8 ++++++-- sys/mmu.c | 2 ++ sys/sysinit.c | 11 +++++++---- 11 files changed, 50 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index caace3b..32a72a3 100644 --- a/Makefile +++ b/Makefile @@ -170,21 +170,24 @@ clean: # flags for targets m5484lite/bas.$(EXE): MACHINE=MACHINE_M5484LITE +m54455/bas.$(EXE): MACHINE=MACHINE_M54455 firebee/bas.$(EXE): MACHINE=MACHINE_FIREBEE m5484lite/ram.$(EXE): MACHINE=MACHINE_M5484LITE +m54455/ram.$(EXE): MACHINE=MACHINE_M54455 firebee/ram.$(EXE): MACHINE=MACHINE_FIREBEE m5484lite/basflash.$(EXE): MACHINE=MACHINE_M5484LITE +m54455/basflash.$(EXE): MACHINE=MACHINE_M54455 firebee/basflash.$(EXE): MACHINE=MACHINE_FIREBEE # # generate pattern rules for different object files # define CC_TEMPLATE -ifeq (firebee,$(1)) - MACHINE=MACHINE_FIREBEE -else - MACHINE=MACHINE_M5484LITE -endif +#ifeq (firebee,$(1)) + #MACHINE=MACHINE_FIREBEE +#else + #MACHINE=MACHINE_M5484LITE +#endif # always optimize x86 emulator objects $(1)/objs/x86decode.o: CFLAGS=$(CFLAGS_OPTIMIZED) diff --git a/bas.lk.in b/bas.lk.in index 8b5482f..2ef308a 100644 --- a/bas.lk.in +++ b/bas.lk.in @@ -1,9 +1,11 @@ -#ifdef MACHINE_FIREBEE +#if defined(MACHINE_FIREBEE) #include "firebee.h" -#endif /* MACHINE_FIREBEE */ - -#ifdef MACHINE_M5484LITE +#elif defined(MACHINE_M5484LITE) #include "m5484l.h" +#elif defined(MACHINE_M54455) +#include "m54455.h" +#else +#error "unknown machine!" #endif /* MACHINE_M5484LITE */ /* make bas_rom access flags rx if compiling to RAM */ diff --git a/dma/dma.c b/dma/dma.c index 8f288b2..269dc42 100644 --- a/dma/dma.c +++ b/dma/dma.c @@ -29,10 +29,14 @@ #include "cache.h" #include "exceptions.h" -#if MACHINE_FIREBEE +#if defined(MACHINE_FIREBEE) #include "firebee.h" -#elif MACHINE_M5484LITE +#elif defined(MACHINE_M5484LITE) #include "m5484l.h" +#elif defined(MACHINE_M54455) +#include "m54455.h" +#else +#error "unknown machine!" #endif /* MACHINE_FIREBEE */ //#define DBG_DMA diff --git a/include/wait.h b/include/wait.h index b6d89b3..cd6b7cd 100644 --- a/include/wait.h +++ b/include/wait.h @@ -29,10 +29,14 @@ #include -#if MACHINE_FIREBEE +#if defined(MACHINE_FIREBEE) #include "firebee.h" -#elif MACHINE_M5484LITE +#elif defined(MACHINE_M5484LITE) #include "m5484l.h" +#elif defined(MACHINE_M54455) +#include "m54455.h" +#else +#error "unknown machine" #endif /* MACHINE_FIREBEE */ #include "MCF5475.h" diff --git a/net/am79c874.c b/net/am79c874.c index d2f90f1..eefb40d 100644 --- a/net/am79c874.c +++ b/net/am79c874.c @@ -13,8 +13,10 @@ #include "firebee.h" #elif defined(MACHINE_M5484LITE) #include "m5484l.h" +#elif defined(MACHINE_M54455) +#include "m54455.h" #else -#error "unknown machine" +#error "unknown machine!" #endif //#define DBG_AM79 diff --git a/net/bcm5222.c b/net/bcm5222.c index 9dedc65..ce872ef 100644 --- a/net/bcm5222.c +++ b/net/bcm5222.c @@ -18,6 +18,8 @@ #include "firebee.h" #elif defined(MACHINE_M5484LITE) #include "m5484l.h" +#elif defined(MACHINE_M54455) +#include "m54455.h" #else #error "Unknown machine!" #endif diff --git a/net/fec.c b/net/fec.c index 2ec484a..72e6328 100644 --- a/net/fec.c +++ b/net/fec.c @@ -26,6 +26,8 @@ #include "firebee.h" #elif defined(MACHINE_M5484LITE) #include "m5484l.h" +#elif defined(MACHINE_M54455) +#include "m54455.h" #else #error Unknown machine! #endif diff --git a/net/net_timer.c b/net/net_timer.c index 4601ad8..f58ffad 100644 --- a/net/net_timer.c +++ b/net/net_timer.c @@ -24,6 +24,8 @@ #include "firebee.h" #elif defined(MACHINE_M5484LITE) #include "m5484l.h" +#elif defined(MACHINE_M54455) +#include "m54455.h" #else #error unknown machine! #endif diff --git a/sys/driver_mem.c b/sys/driver_mem.c index 04832a9..7a9f5bd 100644 --- a/sys/driver_mem.c +++ b/sys/driver_mem.c @@ -18,10 +18,14 @@ #include "usb.h" #include "exceptions.h" /* set_ipl() */ -#if MACHINE_FIREBEE +#if defined(MACHINE_FIREBEE) #include "firebee.h" -#elif MACHINE_M5484LITE +#elif defined(MACHINE_M5484LITE) #include "m5484l.h" +#elif defined(MACHINE_M54455) +#include "m54455.h" +#else +#error "unknown machine!" #endif //#define DBG_DM diff --git a/sys/mmu.c b/sys/mmu.c index 7a08f34..efe5311 100644 --- a/sys/mmu.c +++ b/sys/mmu.c @@ -36,6 +36,8 @@ #include "firebee.h" #elif defined(MACHINE_M5484LITE) #include "m5484l.h" +#elif defined(MACHINE_M54455) +#include "m54455.h" #else #error "unknown machine!" #endif /* MACHINE_FIREBEE */ diff --git a/sys/sysinit.c b/sys/sysinit.c index 063492c..2c18f88 100644 --- a/sys/sysinit.c +++ b/sys/sysinit.c @@ -37,14 +37,17 @@ #include "wait.h" #include "util.h" #include "version.h" -#ifdef MACHINE_FIREBEE +#if defined(MACHINE_FIREBEE) #include "firebee.h" -#endif /* MACHINE_FIREBEE */ - -#ifdef MACHINE_M5484LITE +#elif defined(MACHINE_M5484LITE) #include "m5484l.h" +#elif defined(MACHINE_M54455) +#include "m54455.h" +#else +#error "unknown machine" #endif /* MACHINE_M5484LITE */ +# #include "dma.h" #include "mod_devicetable.h" #include "pci_ids.h"