From owner-p4-projects@FreeBSD.ORG Tue Jul 11 21:42:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6EBD716A500; Tue, 11 Jul 2006 21:42:15 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3546F16A4DD for ; Tue, 11 Jul 2006 21:42:15 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E03443D70 for ; Tue, 11 Jul 2006 21:42:10 +0000 (GMT) (envelope-from wkoszek@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6BLgAo7012997 for ; Tue, 11 Jul 2006 21:42:10 GMT (envelope-from wkoszek@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6BLg9MN012994 for perforce@freebsd.org; Tue, 11 Jul 2006 21:42:09 GMT (envelope-from wkoszek@FreeBSD.org) Date: Tue, 11 Jul 2006 21:42:09 GMT Message-Id: <200607112142.k6BLg9MN012994@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wkoszek@FreeBSD.org using -f From: "Wojciech A. Koszek" To: Perforce Change Reviews Cc: Subject: PERFORCE change 101301 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2006 21:42:15 -0000 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