Author: blueswirl
Date: 2007-04-21 21:47:16 +0200 (Sat, 21 Apr 2007)
New Revision: 126
Modified:
openbios-devel/arch/sparc32/openbios.c
openbios-devel/arch/sparc32/tree.fs
openbios-devel/drivers/obio.c
openbios-devel/drivers/sbus.c
Log:
TCX 24 bit model support
Modified: openbios-devel/arch/sparc32/openbios.c
===================================================================
--- openbios-devel/arch/sparc32/openbios.c 2007-04-16 16:52:52 UTC (rev 125)
+++ openbios-devel/arch/sparc32/openbios.c 2007-04-21 19:47:16 UTC (rev 126)
@@ -95,19 +95,18 @@
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();
bind_func("platform-boot", boot );
Modified: openbios-devel/arch/sparc32/tree.fs
===================================================================
--- openbios-devel/arch/sparc32/tree.fs 2007-04-16 16:52:52 UTC (rev 125)
+++ openbios-devel/arch/sparc32/tree.fs 2007-04-21 19:47:16 UTC (rev 126)
@@ -88,8 +88,6 @@
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
Modified: openbios-devel/drivers/obio.c
===================================================================
--- openbios-devel/drivers/obio.c 2007-04-16 16:52:52 UTC (rev 125)
+++ openbios-devel/drivers/obio.c 2007-04-21 19:47:16 UTC (rev 126)
@@ -349,6 +349,7 @@
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 @@
boot_device = nv_info.boot_device;
nographic = nv_info.nographic;
+ graphic_depth = nv_info.depth;
push_str("mk48t08");
fword("model");
Modified: openbios-devel/drivers/sbus.c
===================================================================
--- openbios-devel/drivers/sbus.c 2007-04-16 16:52:52 UTC (rev 125)
+++ openbios-devel/drivers/sbus.c 2007-04-21 19:47:16 UTC (rev 126)
@@ -77,6 +77,8 @@
fword("property");
}
+uint16_t graphic_depth;
+
static void
ob_tcx_init(unsigned int slot, unsigned long base)
{
@@ -98,7 +100,11 @@
PUSH(0x02000000);
fword("encode-int");
fword("encode+");
- PUSH(0x00000001);
+ if (graphic_depth == 24) {
+ PUSH(0x00400000);
+ } else {
+ PUSH(0x00000001);
+ }
fword("encode-int");
fword("encode+");
@@ -108,7 +114,11 @@
PUSH(0x04000000);
fword("encode-int");
fword("encode+");
- PUSH(0x00000001);
+ if (graphic_depth == 24) {
+ PUSH(0x00400000);
+ } else {
+ PUSH(0x00000001);
+ }
fword("encode-int");
fword("encode+");
@@ -128,7 +138,11 @@
PUSH(0x0a000000);
fword("encode-int");
fword("encode+");
- PUSH(0x00000001);
+ if (graphic_depth == 24) {
+ PUSH(0x00400000);
+ } else {
+ PUSH(0x00000001);
+ }
fword("encode-int");
fword("encode+");
@@ -138,7 +152,11 @@
PUSH(0x0c000000);
fword("encode-int");
fword("encode+");
- PUSH(0x00000001);
+ if (graphic_depth == 24) {
+ PUSH(0x00800000);
+ } else {
+ PUSH(0x00000001);
+ }
fword("encode-int");
fword("encode+");
@@ -148,7 +166,11 @@
PUSH(0x0e000000);
fword("encode-int");
fword("encode+");
- PUSH(0x00000001);
+ if (graphic_depth == 24) {
+ PUSH(0x00800000);
+ } else {
+ PUSH(0x00000001);
+ }
fword("encode-int");
fword("encode+");
@@ -168,17 +190,29 @@
PUSH(0x00200000);
fword("encode-int");
fword("encode+");
- PUSH(0x00000004);
+ if (graphic_depth == 24) {
+ PUSH(0x00004000);
+ } else {
+ PUSH(0x00000004);
+ }
fword("encode-int");
fword("encode+");
PUSH(slot);
fword("encode-int");
fword("encode+");
- PUSH(0x00300000);
+ if (graphic_depth == 24) {
+ PUSH(0x00301000);
+ } else {
+ PUSH(0x00300000);
+ }
fword("encode-int");
fword("encode+");
- PUSH(0x0000081c);
+ if (graphic_depth == 24) {
+ PUSH(0x00001000);
+ } else {
+ PUSH(0x0000081c);
+ }
fword("encode-int");
fword("encode+");
@@ -198,7 +232,11 @@
PUSH(0x00240000);
fword("encode-int");
fword("encode+");
- PUSH(0x00000004);
+ if (graphic_depth == 24) {
+ PUSH(0x00004000);
+ } else {
+ PUSH(0x00000004);
+ }
fword("encode-int");
fword("encode+");
@@ -208,12 +246,28 @@
PUSH(0x00280000);
fword("encode-int");
fword("encode+");
- PUSH(0x00000001);
+ 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