summaryrefslogtreecommitdiffstats
path: root/arch/mips/philips/nino/prom.c
blob: bb4582099b2a3d11d501d9fccb5564dd205646ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
 *  linux/arch/mips/philips-hpc/nino/prom.c
 *
 *  Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *  
 *  Early initialization code for the Nino.
 */
#include <linux/config.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <asm/bootinfo.h>

char arcs_cmdline[COMMAND_LINE_SIZE];

#ifdef CONFIG_LL_DEBUG
extern void init_uart(void);

int __init prom_printf(const char * fmt, ...)
{
        extern void serial_outc(char);
        static char buf[1024];
        va_list args;
        char c;
        int i = 0;

        /*
         * Printing messages via serial port
         */
        va_start(args, fmt);
        vsprintf(buf, fmt, args);
        va_end(args);

        for (i = 0; buf[i] != '\0'; i++) {
                c = buf[i];
                if (c == '\n')
                        serial_outc('\r');
                serial_outc(c);
        }

        return i;
}
#endif

/* Do basic initialization */
void __init prom_init(int argc, char **argv,
		unsigned long magic, int *prom_vec)
{
	int i;

	/*
	 * collect args and prepare cmd_line
	 */
	for (i = 1; i < argc; i++) {
		strcat(arcs_cmdline, argv[i]);
		if (i < (argc - 1))
			strcat(arcs_cmdline, " ");
	}

#ifdef CONFIG_LL_DEBUG
	earlyInitUartPR31700();
#endif

	mips_machgroup = MACH_GROUP_PHILIPS;
	mips_machtype = MACH_PHILIPS_NINO;

	/* Add memory region */
#ifdef CONFIG_NINO_4MB
	add_memory_region(0,  4 << 20, BOOT_MEM_RAM); 
#elif CONFIG_NINO_8MB
	add_memory_region(0,  8 << 20, BOOT_MEM_RAM); 
#elif CONFIG_NINO_16MB
	add_memory_region(0, 16 << 20, BOOT_MEM_RAM); 
#endif
}

void __init prom_free_prom_memory (void)
{
}