From dcb84b7208ade0bbebbeb56bec9c2c64f8b2eede Mon Sep 17 00:00:00 2001 From: Joe Hamman Date: Thu, 9 Aug 2007 09:08:18 -0500 Subject: tsec: Allow Ten Bit Interface address to be configurable Allow the address of the Ten Bit Interface (TBI) to be changed in the event of a conflict with another device. Signed-off by: Joe Hamman diff --git a/drivers/tsec.c b/drivers/tsec.c index 60bef9a..c9e7f97 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -296,9 +296,9 @@ static int init_phy(struct eth_device *dev) volatile tsec_t *regs = (volatile tsec_t *)(TSEC_BASE_ADDR); /* Assign a Physical address to the TBI */ - regs->tbipa = TBIPA_VALUE; + regs->tbipa = CFG_TBIPA_VALUE; regs = (volatile tsec_t *)(TSEC_BASE_ADDR + TSEC_SIZE); - regs->tbipa = TBIPA_VALUE; + regs->tbipa = CFG_TBIPA_VALUE; asm("sync"); /* Reset MII (due to new addresses) */ diff --git a/drivers/tsec.h b/drivers/tsec.h index 7bf3dee..2f0092a 100644 --- a/drivers/tsec.h +++ b/drivers/tsec.h @@ -70,7 +70,9 @@ #define miim_end -2 #define miim_read -1 -#define TBIPA_VALUE 0x1f +#ifndef CFG_TBIPA_VALUE + #define CFG_TBIPA_VALUE 0x1f +#endif #define MIIMCFG_INIT_VALUE 0x00000003 #define MIIMCFG_RESET 0x80000000 -- cgit v0.10.2 From ed8106433522f2ea8933e9808346860d061d7731 Mon Sep 17 00:00:00 2001 From: Zach Sadecki Date: Tue, 31 Jul 2007 12:27:25 -0500 Subject: tsec: fix multiple PHY support The change entitled "Reduce CONFIG_MPC8YXX_TSECx to CONFIG_TSECx" broke multiple PHY support in tsec.c. This fixes it. Signed-off-by: Zach Sadecki Signed-off-by: Kim Phillips diff --git a/drivers/tsec.c b/drivers/tsec.c index c9e7f97..c011123 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -71,6 +71,7 @@ static struct tsec_info_struct tsec_info[] = { #else {TSEC1_PHY_ADDR, TSEC_GIGABIT, TSEC1_PHYIDX}, #endif +#else {0, 0, 0}, #endif #if defined(CONFIG_TSEC2) @@ -79,6 +80,7 @@ static struct tsec_info_struct tsec_info[] = { #else {TSEC2_PHY_ADDR, TSEC_GIGABIT, TSEC2_PHYIDX}, #endif +#else {0, 0, 0}, #endif #ifdef CONFIG_MPC85XX_FEC -- cgit v0.10.2 From ce981dc857adfc8036ca2f6d5d5a06c2a8aa77d6 Mon Sep 17 00:00:00 2001 From: Jason Jin Date: Wed, 8 Aug 2007 08:33:11 +0800 Subject: Add CONFIG_BIOSEMU define to guard all the bios emulator code Signed-off-by: Jason Jin This patch fix the compile issue on the board that did not enable the bios emulator diff --git a/drivers/bios_emulator/besys.c b/drivers/bios_emulator/besys.c index 2a8e1a0..4c4bc8d 100644 --- a/drivers/bios_emulator/besys.c +++ b/drivers/bios_emulator/besys.c @@ -49,6 +49,7 @@ #include "biosemui.h" +#if defined(CONFIG_BIOSEMU) /*------------------------- Global Variables ------------------------------*/ #ifndef __i386__ @@ -717,3 +718,4 @@ void X86API BE_outl(X86EMU_pioAddr port, u32 val) #endif LOG_outpd(port, val); } +#endif diff --git a/drivers/bios_emulator/bios.c b/drivers/bios_emulator/bios.c index ed5437e..7aa1bfb2e 100644 --- a/drivers/bios_emulator/bios.c +++ b/drivers/bios_emulator/bios.c @@ -43,6 +43,7 @@ #include "biosemui.h" +#if defined(CONFIG_BIOSEMU) /*----------------------------- Implementation ----------------------------*/ /**************************************************************************** @@ -319,3 +320,4 @@ void _BE_bios_init(u32 * intrTab) bios_intr_tab[0x6D] = int10; X86EMU_setupIntrFuncs(bios_intr_tab); } +#endif diff --git a/drivers/bios_emulator/biosemu.c b/drivers/bios_emulator/biosemu.c index 06d4ad3..4c3aedf 100644 --- a/drivers/bios_emulator/biosemu.c +++ b/drivers/bios_emulator/biosemu.c @@ -48,6 +48,8 @@ #include "biosemui.h" #include +#if defined(CONFIG_BIOSEMU) + BE_sysEnv _BE_env = {{0}}; static X86EMU_memFuncs _BE_mem __attribute__((section(".got2"))) = { BE_rdb, @@ -368,3 +370,4 @@ int X86API BE_int86x(int intno, RMREGS * in, RMREGS * out, RMSREGS * sregs) sregs->gs = M.x86.R_GS; return out->x.ax; } +#endif diff --git a/drivers/bios_emulator/x86emu/debug.c b/drivers/bios_emulator/x86emu/debug.c index 0f58a69..915739c 100644 --- a/drivers/bios_emulator/x86emu/debug.c +++ b/drivers/bios_emulator/x86emu/debug.c @@ -40,6 +40,8 @@ #include "x86emu/x86emui.h" #include +#if defined(CONFIG_BIOSEMU) + /*----------------------------- Implementation ----------------------------*/ #ifdef DEBUG @@ -459,3 +461,5 @@ void x86emu_dump_xregs(void) printk("NC "); printk("\n"); } + +#endif diff --git a/drivers/bios_emulator/x86emu/decode.c b/drivers/bios_emulator/x86emu/decode.c index 1e2dcfe..879f0a0 100644 --- a/drivers/bios_emulator/x86emu/decode.c +++ b/drivers/bios_emulator/x86emu/decode.c @@ -39,6 +39,8 @@ #include "x86emu/x86emui.h" +#if defined(CONFIG_BIOSEMU) + /*----------------------------- Implementation ----------------------------*/ /**************************************************************************** @@ -1142,3 +1144,5 @@ unsigned decode_rmXX_address(int mod, int rm) return decode_rm01_address(rm); return decode_rm10_address(rm); } + +#endif diff --git a/drivers/bios_emulator/x86emu/ops.c b/drivers/bios_emulator/x86emu/ops.c index d1380ce..d334fb5 100644 --- a/drivers/bios_emulator/x86emu/ops.c +++ b/drivers/bios_emulator/x86emu/ops.c @@ -76,6 +76,9 @@ ****************************************************************************/ #include "x86emu/x86emui.h" + +#if defined(CONFIG_BIOSEMU) + /*----------------------------- Implementation ----------------------------*/ /* constant arrays to do several instructions in just one function */ @@ -5429,3 +5432,5 @@ void (*x86emu_optab[256])(u8) __attribute__ ((section(".got2"))) = /* 0xfe */ x86emuOp_opcFE_byte_RM, /* 0xff */ x86emuOp_opcFF_word_RM, }; + +#endif diff --git a/drivers/bios_emulator/x86emu/ops2.c b/drivers/bios_emulator/x86emu/ops2.c index 631a340..81c0d49 100644 --- a/drivers/bios_emulator/x86emu/ops2.c +++ b/drivers/bios_emulator/x86emu/ops2.c @@ -46,6 +46,8 @@ #include "x86emu/x86emui.h" +#if defined(CONFIG_BIOSEMU) + /*----------------------------- Implementation ----------------------------*/ /**************************************************************************** @@ -1768,3 +1770,5 @@ void (*x86emu_optab2[256])(u8) __attribute__((section(".got2"))) = /* 0xfe */ x86emuOp2_illegal_op, /* 0xff */ x86emuOp2_illegal_op, }; + +#endif diff --git a/drivers/bios_emulator/x86emu/prim_ops.c b/drivers/bios_emulator/x86emu/prim_ops.c index e0827d7..c1152ea 100644 --- a/drivers/bios_emulator/x86emu/prim_ops.c +++ b/drivers/bios_emulator/x86emu/prim_ops.c @@ -100,6 +100,8 @@ #define PRIM_OPS_NO_REDEFINE_ASM #include "x86emu/x86emui.h" +#if defined(CONFIG_BIOSEMU) + /*------------------------- Global Variables ------------------------------*/ static u32 x86emu_parity_tab[8] = @@ -2443,3 +2445,5 @@ DB( if (CHECK_SP_ACCESS()) M.x86.R_SP += 4; return res; } + +#endif diff --git a/drivers/bios_emulator/x86emu/sys.c b/drivers/bios_emulator/x86emu/sys.c index bb7fcd9..566389f 100644 --- a/drivers/bios_emulator/x86emu/sys.c +++ b/drivers/bios_emulator/x86emu/sys.c @@ -41,6 +41,8 @@ #include "x86emu/x86emui.h" +#if defined(CONFIG_BIOSEMU) + /*------------------------- Global Variables ------------------------------*/ X86EMU_sysEnv _X86EMU_env; /* Global emulator machine state */ @@ -320,3 +322,5 @@ void X86EMU_prepareForInt(int num) M.x86.R_IP = mem_access_word(num * 4); M.x86.intr = 0; } + +#endif -- cgit v0.10.2 From 0dc4279b08ff82472bec2e2c90858602459febe8 Mon Sep 17 00:00:00 2001 From: Jason Jin Date: Wed, 8 Aug 2007 09:01:46 +0800 Subject: Minor fix for bios emulator makefile Add $(obj) to LIB avoiding objects be built in the source dir Signed-off-by: Jason Jin diff --git a/drivers/bios_emulator/Makefile b/drivers/bios_emulator/Makefile index ba7d436..586e83b 100644 --- a/drivers/bios_emulator/Makefile +++ b/drivers/bios_emulator/Makefile @@ -1,6 +1,6 @@ include $(TOPDIR)/config.mk -LIB := libatibiosemu.a +LIB := $(obj)libatibiosemu.a X86DIR = ./x86emu -- cgit v0.10.2 From a22806469a8f2b69c829f4fd5361fdebd0cb01b4 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 8 Aug 2007 04:14:28 -0500 Subject: Treat ppc64 host as ppc Signed-off-by: Kumar Gala diff --git a/Makefile b/Makefile index 988dba8..2ff3e06 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ HOSTARCH := $(shell uname -m | \ -e s/arm.*/arm/ \ -e s/sa110/arm/ \ -e s/powerpc/ppc/ \ + -e s/ppc64/ppc/ \ -e s/macppc/ppc/) HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \ -- cgit v0.10.2