patch-2.4.5 linux/arch/ppc/xmon/start.c
Next file: linux/arch/ppc/xmon/start_8xx.c
Previous file: linux/arch/ppc/xmon/setjmp.c
Back to the patch index
Back to the overall index
- Lines: 85
- Date:
Mon May 21 17:04:47 2001
- Orig file:
v2.4.4/linux/arch/ppc/xmon/start.c
- Orig date:
Mon Jan 22 15:41:15 2001
diff -u --recursive --new-file v2.4.4/linux/arch/ppc/xmon/start.c linux/arch/ppc/xmon/start.c
@@ -1,4 +1,7 @@
/*
+ * BK Id: SCCS/s.start.c 1.12 05/21/01 21:39:13 paulus
+ */
+/*
* Copyright (C) 1996 Paul Mackerras.
*/
#include <linux/config.h>
@@ -28,7 +31,7 @@
static int console;
static int use_screen;
-static int via_modem = 1;
+static int via_modem;
static int xmon_use_sccb;
static struct device_node *macio_node;
@@ -61,27 +64,37 @@
struct device_node *np;
unsigned long addr;
#ifdef CONFIG_BOOTX_TEXT
- extern boot_infos_t *disp_bi;
+ if (!machine_is_compatible("iMac")) {
+ extern boot_infos_t *disp_bi;
- /* see if there is a keyboard in the device tree
- with a parent of type "adb" */
- for (np = find_devices("keyboard"); np; np = np->next)
- if (np->parent && np->parent->type
- && strcmp(np->parent->type, "adb") == 0)
- break;
+ /* see if there is a keyboard in the device tree
+ with a parent of type "adb" */
+ for (np = find_devices("keyboard"); np; np = np->next)
+ if (np->parent && np->parent->type
+ && strcmp(np->parent->type, "adb") == 0)
+ break;
- /* needs to be hacked if xmon_printk is to be used
- from within find_via_pmu() */
+ /* needs to be hacked if xmon_printk is to be used
+ from within find_via_pmu() */
#ifdef CONFIG_ADB_PMU
- if (np != NULL && disp_bi && find_via_pmu())
- use_screen = 1;
+ if (np != NULL && disp_bi && find_via_pmu())
+ use_screen = 1;
#endif
#ifdef CONFIG_ADB_CUDA
- if (np != NULL && disp_bi && find_via_cuda())
- use_screen = 1;
+ if (np != NULL && disp_bi && find_via_cuda())
+ use_screen = 1;
#endif
+ }
+ prom_drawstring("xmon uses ");
if (use_screen)
- prom_drawstring("xmon uses screen and keyboard\n");
+ prom_drawstring("screen and keyboard\n");
+ else {
+ if (via_modem)
+ prom_drawstring("modem on ");
+ prom_drawstring(xmon_use_sccb? "printer": "modem");
+ prom_drawstring(" port\n");
+ }
+
#endif /* CONFIG_BOOTX_TEXT */
#ifdef CHRP_ESCC
@@ -100,6 +113,15 @@
base = (volatile unsigned char *) ioremap(addr & PAGE_MASK, PAGE_SIZE);
sccc = base + (addr & ~PAGE_MASK);
sccd = sccc + 0x10;
+ }
+ else if ( _machine & _MACH_gemini )
+ {
+ /* should already be mapped by the kernel boot */
+ sccc = (volatile unsigned char *) 0xffeffb0d;
+ sccd = (volatile unsigned char *) 0xffeffb08;
+ TXRDY = 0x20;
+ RXRDY = 1;
+ console = 1;
}
else
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)