OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [mips/] [philips/] [nino/] [prom.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 *  arch/mips/philips/nino/prom.c
3
 *
4
 *  Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
5
 *
6
 * This program is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License version 2 as
8
 * published by the Free Software Foundation.
9
 *
10
 *  Early initialization code for the Philips Nino
11
 */
12
#include <linux/config.h>
13
#include <linux/init.h>
14
#include <linux/kernel.h>
15
#include <linux/string.h>
16
#include <asm/bootinfo.h>
17
#include <asm/addrspace.h>
18
#include <asm/page.h>
19
 
20
char arcs_cmdline[CL_SIZE];
21
 
22
#ifdef CONFIG_FB_TX3912
23
extern unsigned long tx3912fb_paddr;
24
extern unsigned long tx3912fb_vaddr;
25
extern unsigned long tx3912fb_size;
26
#endif
27
 
28
const char *get_system_type(void)
29
{
30
        return "Philips Nino";
31
}
32
 
33
/* Do basic initialization */
34
void __init prom_init(int argc, char **argv, unsigned long magic, int *prom_vec)
35
{
36
        unsigned long mem_size;
37
 
38
        strcpy(arcs_cmdline, "console=tty0 console=ttyS0,115200");
39
 
40
        mips_machgroup = MACH_GROUP_PHILIPS;
41
        mips_machtype = MACH_PHILIPS_NINO;
42
 
43
#ifdef CONFIG_NINO_4MB
44
        mem_size = 4 << 20;
45
#elif CONFIG_NINO_8MB
46
        mem_size = 8 << 20;
47
#elif CONFIG_NINO_16MB
48
        mem_size = 16 << 20;
49
#endif
50
 
51
#ifdef CONFIG_FB_TX3912
52
{
53
        unsigned long free_end;
54
 
55
        /*
56
         * The LCD controller requires that the framebuffer
57
         * start address fall within a 1MB segment and is
58
         * aligned on a 16 byte boundary. The way to assure
59
         * this is to place the framebuffer at the end of
60
         * memory and mark it as reserved.
61
         */
62
        free_end = (mem_size - tx3912fb_size) & PAGE_MASK;
63
        add_memory_region(0, free_end, BOOT_MEM_RAM);
64
        add_memory_region(free_end, (mem_size - free_end), BOOT_MEM_RESERVED);
65
 
66
        /*
67
         * Calculate physical and virtual addresses for
68
         * the beginning of the framebuffer.
69
         */
70
        tx3912fb_paddr = PHYSADDR(free_end);
71
        tx3912fb_vaddr = KSEG1ADDR(free_end);
72
}
73
#else
74
        add_memory_region(0, mem_size, BOOT_MEM_RAM);
75
#endif
76
}
77
 
78
void __init prom_free_prom_memory (void)
79
{
80
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.