* [U-Boot-Users] [PATCH 3/7] Configurations for ATI video card BIOS emulator
@ 2007-07-13 4:14 Jason Jin
2007-07-13 4:14 ` [U-Boot-Users] [PATCH 4/7] Fix some compile issues for MAI board Jason Jin
0 siblings, 1 reply; 4+ messages in thread
From: Jason Jin @ 2007-07-13 4:14 UTC (permalink / raw)
To: u-boot
This patch add definition of the BIOS emulator and the ATI framebuffer
driver for MPC8641HPCN board.
Signed-off-by: Jason Jin <Jason.jin@freescale.com>
Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
---
Makefile | 1 +
board/mpc8641hpcn/u-boot.lds | 1 +
include/configs/MPC8641HPCN.h | 32 +++++++++++++++++++++++++++-----
3 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 358d181..fab1ac9 100644
--- a/Makefile
+++ b/Makefile
@@ -201,6 +201,7 @@ LIBS += disk/libdisk.a
LIBS += rtc/librtc.a
LIBS += dtt/libdtt.a
LIBS += drivers/libdrivers.a
+LIBS += drivers/bios_emulator/libatibiosemu.a
LIBS += drivers/nand/libnand.a
LIBS += drivers/nand_legacy/libnand_legacy.a
ifeq ($(CPU),mpc83xx)
diff --git a/board/mpc8641hpcn/u-boot.lds b/board/mpc8641hpcn/u-boot.lds
index b34de8e..9a88466 100644
--- a/board/mpc8641hpcn/u-boot.lds
+++ b/board/mpc8641hpcn/u-boot.lds
@@ -77,6 +77,7 @@ SECTIONS
lib_generic/crc32.o (.text)
lib_ppc/extable.o (.text)
lib_generic/zlib.o (.text)
+ drivers/bios_emulator/atibios.o (.text)
*(.text)
*(.fixup)
*(.got1)
diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h
index 246ac7f..da21c02 100644
--- a/include/configs/MPC8641HPCN.h
+++ b/include/configs/MPC8641HPCN.h
@@ -233,7 +233,7 @@
#define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
#define CFG_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */
-#define CFG_MALLOC_LEN (128 * 1024) /* Reserved for malloc */
+#define CFG_MALLOC_LEN (1024 * 1024) /* Reserved for malloc */
/* Serial Port */
#define CONFIG_CONS_INDEX 1
@@ -312,7 +312,7 @@
#define CFG_PCI2_MEM_BASE 0xa0000000
#define CFG_PCI2_MEM_PHYS CFG_PCI2_MEM_BASE
-#define CFG_PCI2_MEM_SIZE 0x10000000 /* 256M */
+#define CFG_PCI2_MEM_SIZE 0x20000000 /* 512M */
#define CFG_PCI2_IO_BASE 0xe3000000
#define CFG_PCI2_IO_PHYS CFG_PCI2_IO_BASE
#define CFG_PCI2_IO_SIZE 0x1000000 /* 16M */
@@ -337,6 +337,26 @@
#define PCI_IDSEL_NUMBER 0x0c /* slot0->3(IDSEL)=12->15 */
#endif
+/*PCIE video card used*/
+#define VIDEO_IO_OFFSET CFG_PCI2_IO_PHYS
+
+/*PCI video card used*/
+/*#define VIDEO_IO_OFFSET CFG_PCI1_IO_PHYS*/
+
+/* video */
+#define CONFIG_VIDEO
+
+#if defined(CONFIG_VIDEO)
+#define CONFIG_BIOSEMU
+#define CONFIG_CFB_CONSOLE
+#define CONFIG_VIDEO_SW_CURSOR
+#define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_ATI_RADEON_FB
+#define CONFIG_VIDEO_LOGO
+/*#define CONFIG_CONSOLE_CURSOR*/
+#define CFG_ISA_IO_BASE_ADDRESS CFG_PCI2_IO_PHYS
+#endif
+
#undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
#define CONFIG_DOS_PARTITION
@@ -350,6 +370,8 @@
#define CFG_SCSI_MAXDEVICE CFG_SCSI_MAX_DEVICE
#endif
+#define CONFIG_MPC86XX_PCI2
+
#endif /* CONFIG_PCI */
#if defined(CONFIG_TSEC_ENET)
@@ -399,7 +421,7 @@
*/
#define CFG_DBAT1L ( CFG_PCI1_MEM_BASE | BATL_PP_RW \
| BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
-#define CFG_DBAT1U (CFG_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
+#define CFG_DBAT1U (CFG_PCI1_MEM_BASE | BATU_BL_1G | BATU_VS | BATU_VP)
#define CFG_IBAT1L (CFG_PCI1_MEM_BASE | BATL_PP_RW | BATL_CACHEINHIBIT)
#define CFG_IBAT1U CFG_DBAT1U
@@ -464,8 +486,8 @@
*/
#ifndef CFG_RAMBOOT
#define CFG_ENV_IS_IN_FLASH 1
- #define CFG_ENV_ADDR (CFG_MONITOR_BASE + 0x40000)
- #define CFG_ENV_SECT_SIZE 0x40000 /* 256K(one sector) for env */
+ #define CFG_ENV_ADDR (CFG_MONITOR_BASE + 0x60000)
+ #define CFG_ENV_SECT_SIZE 0x10000 /* 64K(one sector) for env */
#define CFG_ENV_SIZE 0x2000
#else
#define CFG_NO_FLASH 1 /* Flash is not usable now */
--
1.5.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot-Users] [PATCH 4/7] Fix some compile issues for MAI board.
2007-07-13 4:14 [U-Boot-Users] [PATCH 3/7] Configurations for ATI video card BIOS emulator Jason Jin
@ 2007-07-13 4:14 ` Jason Jin
2007-07-13 4:15 ` [U-Boot-Users] [PATCH 6/7] Makefile changes after removing the BIOS emulator from " Jason Jin
0 siblings, 1 reply; 4+ messages in thread
From: Jason Jin @ 2007-07-13 4:14 UTC (permalink / raw)
To: u-boot
Signed-off-by: Jason Jin <Jason.jin@freescale.com>
---
board/MAI/AmigaOneG3SE/AmigaOneG3SE.c | 86 ++++++++++++++++----------------
board/MAI/AmigaOneG3SE/video.c | 1 +
include/configs/AmigaOneG3SE.h | 1 +
3 files changed, 45 insertions(+), 43 deletions(-)
diff --git a/board/MAI/AmigaOneG3SE/AmigaOneG3SE.c b/board/MAI/AmigaOneG3SE/AmigaOneG3SE.c
index 40f41c7..b472176 100644
--- a/board/MAI/AmigaOneG3SE/AmigaOneG3SE.c
+++ b/board/MAI/AmigaOneG3SE/AmigaOneG3SE.c
@@ -30,49 +30,49 @@
#include "memio.h"
#include "via686.h"
-__asm(" .globl send_kb \n
- send_kb: \n
- lis r9, 0xfe00 \n
- \n
- li r4, 0x10 # retries \n
- mtctr r4 \n
- \n
- idle: \n
- lbz r4, 0x64(r9) \n
- andi. r4, r4, 0x02 \n
- bne idle \n
- \n
- ready: \n
- stb r3, 0x60(r9) \n
- \n
- check: \n
- lbz r4, 0x64(r9) \n
- andi. r4, r4, 0x01 \n
- beq check \n
- \n
- lbz r4, 0x60(r9) \n
- cmpwi r4, 0xfa \n
- beq done \n
- \n
- bdnz idle \n
- \n
- li r3, 0 \n
- blr \n
- \n
- done: \n
- li r3, 1 \n
- blr \n
- \n
- .globl test_kb \n
- test_kb: \n
- mflr r10 \n
- li r3, 0xed \n
- bl send_kb \n
- li r3, 0x01 \n
- bl send_kb \n
- mtlr r10 \n
- blr \n
-");
+__asm__(" .globl send_kb \n "
+ "send_kb: \n "
+ " lis r9, 0xfe00 \n "
+ " \n "
+ " li r4, 0x10 # retries \n "
+ " mtctr r4 \n "
+ " \n "
+ "idle: \n "
+ " lbz r4, 0x64(r9) \n "
+ " andi. r4, r4, 0x02 \n "
+ " bne idle \n "
+
+ "ready: \n "
+ " stb r3, 0x60(r9) \n "
+ " \n "
+ "check: \n "
+ " lbz r4, 0x64(r9) \n "
+ " andi. r4, r4, 0x01 \n "
+ " beq check \n "
+ " \n "
+ " lbz r4, 0x60(r9) \n "
+ " cmpwi r4, 0xfa \n "
+ " beq done \n "
+
+ " bdnz idle \n "
+
+ " li r3, 0 \n "
+ " blr \n "
+
+ "done: \n "
+ " li r3, 1 \n "
+ " blr \n "
+
+ ".globl test_kb \n "
+ "test_kb: \n "
+ " mflr r10 \n "
+ " li r3, 0xed \n "
+ " bl send_kb \n "
+ " li r3, 0x01 \n "
+ " bl send_kb \n "
+ " mtlr r10 \n "
+ " blr "
+);
int checkboard (void)
diff --git a/board/MAI/AmigaOneG3SE/video.c b/board/MAI/AmigaOneG3SE/video.c
index f6327f7..fc27c68 100644
--- a/board/MAI/AmigaOneG3SE/video.c
+++ b/board/MAI/AmigaOneG3SE/video.c
@@ -56,6 +56,7 @@ int video_rows(void);
int video_cols(void);
char *prompt_string = "=>";
+unsigned char video_get_attr(void);
void video_set_color(unsigned char attr)
{
diff --git a/include/configs/AmigaOneG3SE.h b/include/configs/AmigaOneG3SE.h
index ea50f41..9c89915 100644
--- a/include/configs/AmigaOneG3SE.h
+++ b/include/configs/AmigaOneG3SE.h
@@ -88,6 +88,7 @@
*/
#include <cmd_confdefs.h>
+#define atoi(x) simple_strtoul(x,NULL,10)
/*
* Miscellaneous configurable options
--
1.5.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot-Users] [PATCH 6/7] Makefile changes after removing the BIOS emulator from MAI board.
2007-07-13 4:14 ` [U-Boot-Users] [PATCH 4/7] Fix some compile issues for MAI board Jason Jin
@ 2007-07-13 4:15 ` Jason Jin
2007-07-13 4:15 ` [U-Boot-Users] [PATCH 7/7] Made MAI board to use BIOS emulator in drivers directory Jason Jin
0 siblings, 1 reply; 4+ messages in thread
From: Jason Jin @ 2007-07-13 4:15 UTC (permalink / raw)
To: u-boot
Signed-off-by: Jason Jin <Jason.jin@freescale.com>
---
board/MAI/AmigaOneG3SE/Makefile | 14 +++-----------
board/MAI/AmigaOneG3SE/config.mk | 5 +----
2 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/board/MAI/AmigaOneG3SE/Makefile b/board/MAI/AmigaOneG3SE/Makefile
index fa28d3b..1c1ac6a 100644
--- a/board/MAI/AmigaOneG3SE/Makefile
+++ b/board/MAI/AmigaOneG3SE/Makefile
@@ -24,33 +24,25 @@
include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../menu)
-$(shell mkdir -p $(obj)../bios_emulator)
endif
LIB = $(obj)lib$(BOARD).a
COBJS = $(BOARD).o articiaS.o flash.o serial.o smbus.o articiaS_pci.o \
- via686.o i8259.o ../bios_emulator/x86interface.o \
- ../bios_emulator/bios.o ../bios_emulator/glue.o \
+ via686.o i8259.o \
interrupts.o ps2kbd.o video.o usb_uhci.o enet.o \
../menu/cmd_menu.o cmd_boota.o nvram.o
SOBJS = board_asm_init.o memio.o
-EMUDIR = ../bios_emulator/scitech/src/x86emu/
-EMUOBJ = $(EMUDIR)decode.o $(EMUDIR)ops2.o $(EMUDIR)fpu.o $(EMUDIR)prim_ops.o \
- $(EMUDIR)ops.o $(EMUDIR)sys.o
-EMUSRC = $(EMUOBJ:.o=.c)
-
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
-EMUOBJ := $(addprefix $(obj),$(EMUOBJ))
+#EMUOBJ := $(addprefix $(obj),$(EMUOBJ))
$(LIB): $(obj).depend $(OBJS) $(SOBJS) $(EMUSRC)
- make $(obj)libx86emu.a -C ../bios_emulator/scitech/src/x86emu -f makefile.uboot CROSS_COMPILE=$(CROSS_COMPILE)
-rm $(LIB)
- $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) $(EMUOBJ)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
#########################################################################
diff --git a/board/MAI/AmigaOneG3SE/config.mk b/board/MAI/AmigaOneG3SE/config.mk
index 930a793..98442d3 100644
--- a/board/MAI/AmigaOneG3SE/config.mk
+++ b/board/MAI/AmigaOneG3SE/config.mk
@@ -24,9 +24,6 @@
#
# AmigaOneG3SE boards
#
-
-X86EMU = -I../bios_emulator/scitech/include -I../bios_emulator/scitech/src/x86emu
-
TEXT_BASE = 0xfff00000
-PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -Wa,-mregnames -DEASTEREGG $(X86EMU) -Dprintk=printf #-DDEBUG
+PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -Wa,-mregnames -DEASTEREGG -Dprintk=printf #-DDEBUG
--
1.5.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot-Users] [PATCH 7/7] Made MAI board to use BIOS emulator in drivers directory
2007-07-13 4:15 ` [U-Boot-Users] [PATCH 6/7] Makefile changes after removing the BIOS emulator from " Jason Jin
@ 2007-07-13 4:15 ` Jason Jin
0 siblings, 0 replies; 4+ messages in thread
From: Jason Jin @ 2007-07-13 4:15 UTC (permalink / raw)
To: u-boot
The BIOS emulator in the MAI board was removed, this patch made the MAI board
use the BIOS emulator in the drivers directory.
Signed-off-by: Jason Jin <Jason.jin@freescale.com>
---
board/MAI/AmigaOneG3SE/articiaS_pci.c | 17 ++++-------------
include/configs/AmigaOneG3SE.h | 19 +++++++++++++++++++
2 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/board/MAI/AmigaOneG3SE/articiaS_pci.c b/board/MAI/AmigaOneG3SE/articiaS_pci.c
index 45b8195..8333e6e 100644
--- a/board/MAI/AmigaOneG3SE/articiaS_pci.c
+++ b/board/MAI/AmigaOneG3SE/articiaS_pci.c
@@ -489,7 +489,7 @@ static short classes[] =
~0
};
-extern int execute_bios(pci_dev_t gr_dev, void *);
+/*extern int execute_bios(pci_dev_t gr_dev, void *);*/
pci_dev_t video_dev;
@@ -555,20 +555,11 @@ int articiaS_init_vga (void)
/*
* Now try to run the bios
*/
+#if defined(CONFIG_BIOSEMU)
PRINTF("Trying to run bios now\n");
- if (execute_bios(dev, gd->relocaddr))
- {
- printf("OK\n");
- video_dev = dev;
- }
- else
- {
- printf("ERROR\n");
- }
-
+ BootVideoCardBIOS(dev, NULL, 0);
PRINTF("Done scanning.\n");
-
- shutdown_bios();
+#endif
if (dev == PCI_ANY_ID) return -1;
else return 0;
diff --git a/include/configs/AmigaOneG3SE.h b/include/configs/AmigaOneG3SE.h
index 9c89915..ed66fa4 100644
--- a/include/configs/AmigaOneG3SE.h
+++ b/include/configs/AmigaOneG3SE.h
@@ -90,6 +90,25 @@
#define atoi(x) simple_strtoul(x,NULL,10)
+#ifdef CONFIG_PCI
+#define _IO_BASE 0
+#define ARTICIAS_PCI_PHYS 0x8000000
+/*PCIE video card used*/
+#define VIDEO_IO_OFFSET ARTICIAS_PCI_PHYS
+
+/* video */
+#define CONFIG_VIDEO
+
+#if defined(CONFIG_VIDEO)
+#define CONFIG_BIOSEMU
+#define CONFIG_CFB_CONSOLE
+#define CONFIG_VIDEO_SW_CURSOR
+#define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_VIDEO_LOGO
+/*#define CONFIG_CONSOLE_CURSOR*/
+#endif
+#endif
+
/*
* Miscellaneous configurable options
*/
--
1.5.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-13 4:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-13 4:14 [U-Boot-Users] [PATCH 3/7] Configurations for ATI video card BIOS emulator Jason Jin
2007-07-13 4:14 ` [U-Boot-Users] [PATCH 4/7] Fix some compile issues for MAI board Jason Jin
2007-07-13 4:15 ` [U-Boot-Users] [PATCH 6/7] Makefile changes after removing the BIOS emulator from " Jason Jin
2007-07-13 4:15 ` [U-Boot-Users] [PATCH 7/7] Made MAI board to use BIOS emulator in drivers directory Jason Jin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.