Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jul 2006 21:42:09 GMT
From:      "Wojciech A. Koszek" <wkoszek@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 101301 for review
Message-ID:  <200607112142.k6BLg9MN012994@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=101301

Change 101301 by wkoszek@wkoszek_laptop on 2006/07/11 21:42:06

	Remove MALTA specific stuff from machdep.c and move it to
	malta_machdep.c. Add lcd_init() and lcd_puts() functions to
	machdep.c and implement them in malta_machdep.c. Add malta_machdep.c
	to files.malta.

Affected files ...

.. //depot/projects/mips2/src/sys/mips/mips/machdep.c#13 edit
.. //depot/projects/mips2/src/sys/mips/mips4k/malta/files.malta#3 edit
.. //depot/projects/mips2/src/sys/mips/mips4k/malta/malta_machdep.c#1 add

Differences ...

==== //depot/projects/mips2/src/sys/mips/mips/machdep.c#13 (text+ko) ====

@@ -90,6 +90,7 @@
 void
 mips_init(void)
 {
+	printf("mips_init() executed!\n");
 	/*
 	 * This one is called from subr_param.c.
 	 */
@@ -312,53 +313,35 @@
 
 }
 
-#define MALTA_FPGA_BASE         0x1f000000  /* FPGA:            */
-#define MALTA_FPGA_SIZE         0x00c00000  /*    12 MByte      */
-
-#define MALTA_LEDBAR            (MALTA_FPGA_BASE + 0x408)
-#define MALTA_ASCIIWORD         (MALTA_FPGA_BASE + 0x410)
-#define MALTA_ASCII_BASE        (MALTA_FPGA_BASE + 0x418)
-#define MALTA_ASCIIPOS0         0x00
-#define MALTA_ASCIIPOS1         0x08
-#define MALTA_ASCIIPOS2         0x10
-#define MALTA_ASCIIPOS3         0x18
-#define MALTA_ASCIIPOS4         0x20
-#define MALTA_ASCIIPOS5         0x28
-#define MALTA_ASCIIPOS6         0x30
-#define MALTA_ASCIIPOS7         0x38
-
 /*
  *
  *  Existing code path
  *  ------------------
- *  locore.S:
+ *  locore.S
  *  |
  *  +->platform_start():	(here -- machdep.c)
  *     |
- *     +-MALTA_PUTCHAR()	(macros to get malta LCD working)
  *     +-mips_init():		(here -- machdep.c) 
  *       |
  *	 +-init_param2()	(subr_param.c)
  *	 +-mips_cpu_init()	(cpu.c)
  *	 +-pmap_bootstrap()	(pmap.c)
  */
+
+/*
+ * LCD initialization.
+ */
+extern void lcd_init(void);
+extern void lcd_puts(char *);
+
 void
 platform_start(int argc, char **argv)
 {
-	volatile uint32_t * dest_ch;
-
-#define MALTA_PUTCHAR(pos, ch)							\
-	dest_ch = (uint32_t *)						\
-	    MIPS_PHYS_TO_KSEG0(MALTA_ASCII_BASE + MALTA_ASCIIPOS ## pos);	\
-	*dest_ch = (uint32_t) (ch);
-
-	MALTA_PUTCHAR(0, 'F');
-	MALTA_PUTCHAR(1, 'r');
-	MALTA_PUTCHAR(2, 'e');
-	MALTA_PUTCHAR(3, 'E');
-	MALTA_PUTCHAR(4, 'B');
-	MALTA_PUTCHAR(5, 'S');
-	MALTA_PUTCHAR(6, 'D');
+	/*
+	 * XXXMIPS: I think I know how to get it working in more elegant way.
+	 * Use external functions for now.
+	 */
+	lcd_init();
 
 	cninit();
 	mips_init();

==== //depot/projects/mips2/src/sys/mips/mips4k/malta/files.malta#3 (text+ko) ====

@@ -3,3 +3,4 @@
 mips/mips4k/malta/uart_dev_maltausart.c		optional uart
 mips/mips4k/malta/uart_bus_maltausart.c		optional uart
 mips/mips4k/malta/malta_console.c		standard
+mips/mips4k/malta/malta_machdep.c		standard



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607112142.k6BLg9MN012994>