* Some code cleanup
* Patch by Josef Baumgartner, 10 Feb 2004: Fixes for Coldfire port * Patch by Brad Kemp, 11 Feb 2004: Fix CFI flash driver problems
This commit is contained in:
@@ -41,6 +41,10 @@ ifeq ($(ARCH),nios)
|
||||
LOAD_ADDR = 0x01000000 -L $(gcclibdir)/m32 -T nios.lds
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),m68k)
|
||||
LOAD_ADDR = 0x20000 -L $(clibdir)
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/config.mk
|
||||
|
||||
SREC = hello_world.srec
|
||||
@@ -56,11 +60,6 @@ SREC += sched.srec
|
||||
BIN += sched.bin sched
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),m68k)
|
||||
SREC =
|
||||
BIN =
|
||||
endif
|
||||
|
||||
# The following example is pretty 8xx specific...
|
||||
ifeq ($(CPU),mpc8xx)
|
||||
SREC += timer.srec
|
||||
@@ -94,6 +93,7 @@ LIBCOBJS= stubs.o
|
||||
LIBOBJS = $(LIBAOBJS) $(LIBCOBJS)
|
||||
|
||||
gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
|
||||
clibdir := $(shell dirname `$(CC) $(CFLAGS) -print-file-name=libc.a`)
|
||||
|
||||
CPPFLAGS += -I..
|
||||
|
||||
|
||||
@@ -78,6 +78,22 @@ gd_t *global_data;
|
||||
" jmp %%g0\n" \
|
||||
" nop \n" \
|
||||
: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x) : "r0");
|
||||
#elif defined(CONFIG_M68K)
|
||||
/*
|
||||
* d7 holds the pointer to the global_data, a0 is a call-clobbered
|
||||
* register
|
||||
*/
|
||||
#define EXPORT_FUNC(x) \
|
||||
asm volatile ( \
|
||||
" .globl " #x "\n" \
|
||||
#x ":\n" \
|
||||
" move.l %%d7, %%a0\n" \
|
||||
" adda.l %0, %%a0\n" \
|
||||
" move.l (%%a0), %%a0\n" \
|
||||
" adda.l %1, %%a0\n" \
|
||||
" move.l (%%a0), %%a0\n" \
|
||||
" jmp (%%a0)\n" \
|
||||
: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "a0");
|
||||
#else
|
||||
#error stubs definition missing for this architecture
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user