TCX 24 bit model support

git-svn-id: svn://coreboot.org/openbios/openbios-devel@126 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2007-04-21 19:47:16 +00:00
parent 7baa8329a3
commit a389f6e924
4 changed files with 72 additions and 19 deletions

View File

@@ -95,18 +95,17 @@ arch_init( void )
void setup_timers(void);
modules_init();
#ifdef CONFIG_DRIVER_SBUS
ob_init_mmu(hwdef->iommu_high, hwdef->iommu_base);
ob_sbus_init(hwdef->iommu_high, hwdef->iommu_base + 0x1000, hwdef->machine_id);
#ifdef CONFIG_DEBUG_CONSOLE_VIDEO
init_video();
#endif
#endif
#ifdef CONFIG_DRIVER_OBIO
ob_obio_init(hwdef->slavio_high, hwdef->slavio_base, hwdef->fd_offset,
hwdef->counter_offset, hwdef->intr_offset);
nvram_init();
#endif
#ifdef CONFIG_DRIVER_SBUS
#ifdef CONFIG_DEBUG_CONSOLE_VIDEO
init_video();
#endif
ob_sbus_init(hwdef->iommu_high, hwdef->iommu_base + 0x1000, hwdef->machine_id);
#endif
device_end();

View File

@@ -88,8 +88,6 @@ new-device
h# 300 encode-int " height" property
h# 400 encode-int " width" property
h# 400 encode-int " linebytes" property
d# 24 encode-int " depth" property
" no" encode-string " tcx-8-bit" property
5 encode-int 0 encode-int encode+ " intr" property
5 encode-int " interrupts" property
finish-device

View File

@@ -349,6 +349,7 @@ ob_nvram_init(unsigned long base, unsigned long offset)
extern char boot_device;
extern char obp_stdin, obp_stdout;
extern const char *obp_stdin_path, *obp_stdout_path;
extern uint16_t graphic_depth;
const char *stdin, *stdout, *cpuname;
unsigned int i;
@@ -386,6 +387,7 @@ ob_nvram_init(unsigned long base, unsigned long offset)
boot_device = nv_info.boot_device;
nographic = nv_info.nographic;
graphic_depth = nv_info.depth;
push_str("mk48t08");
fword("model");

View File

@@ -77,6 +77,8 @@ ob_le_init(unsigned int slot, unsigned long base, unsigned long offset)
fword("property");
}
uint16_t graphic_depth;
static void
ob_tcx_init(unsigned int slot, unsigned long base)
{
@@ -98,7 +100,11 @@ ob_tcx_init(unsigned int slot, unsigned long base)
PUSH(0x02000000);
fword("encode-int");
fword("encode+");
if (graphic_depth == 24) {
PUSH(0x00400000);
} else {
PUSH(0x00000001);
}
fword("encode-int");
fword("encode+");
@@ -108,7 +114,11 @@ ob_tcx_init(unsigned int slot, unsigned long base)
PUSH(0x04000000);
fword("encode-int");
fword("encode+");
if (graphic_depth == 24) {
PUSH(0x00400000);
} else {
PUSH(0x00000001);
}
fword("encode-int");
fword("encode+");
@@ -128,7 +138,11 @@ ob_tcx_init(unsigned int slot, unsigned long base)
PUSH(0x0a000000);
fword("encode-int");
fword("encode+");
if (graphic_depth == 24) {
PUSH(0x00400000);
} else {
PUSH(0x00000001);
}
fword("encode-int");
fword("encode+");
@@ -138,7 +152,11 @@ ob_tcx_init(unsigned int slot, unsigned long base)
PUSH(0x0c000000);
fword("encode-int");
fword("encode+");
if (graphic_depth == 24) {
PUSH(0x00800000);
} else {
PUSH(0x00000001);
}
fword("encode-int");
fword("encode+");
@@ -148,7 +166,11 @@ ob_tcx_init(unsigned int slot, unsigned long base)
PUSH(0x0e000000);
fword("encode-int");
fword("encode+");
if (graphic_depth == 24) {
PUSH(0x00800000);
} else {
PUSH(0x00000001);
}
fword("encode-int");
fword("encode+");
@@ -168,17 +190,29 @@ ob_tcx_init(unsigned int slot, unsigned long base)
PUSH(0x00200000);
fword("encode-int");
fword("encode+");
if (graphic_depth == 24) {
PUSH(0x00004000);
} else {
PUSH(0x00000004);
}
fword("encode-int");
fword("encode+");
PUSH(slot);
fword("encode-int");
fword("encode+");
if (graphic_depth == 24) {
PUSH(0x00301000);
} else {
PUSH(0x00300000);
}
fword("encode-int");
fword("encode+");
if (graphic_depth == 24) {
PUSH(0x00001000);
} else {
PUSH(0x0000081c);
}
fword("encode-int");
fword("encode+");
@@ -198,7 +232,11 @@ ob_tcx_init(unsigned int slot, unsigned long base)
PUSH(0x00240000);
fword("encode-int");
fword("encode+");
if (graphic_depth == 24) {
PUSH(0x00004000);
} else {
PUSH(0x00000004);
}
fword("encode-int");
fword("encode+");
@@ -208,12 +246,28 @@ ob_tcx_init(unsigned int slot, unsigned long base)
PUSH(0x00280000);
fword("encode-int");
fword("encode+");
if (graphic_depth == 24) {
PUSH(0x00008000);
} else {
PUSH(0x00000001);
}
fword("encode-int");
fword("encode+");
push_str("reg");
fword("property");
PUSH((int)graphic_depth);
fword("encode-int");
push_str("depth");
fword("property");
if (graphic_depth == 8) {
push_str("true");
fword("encode-string");
push_str("tcx-8-bit");
fword("property");
}
}
static void