more changes on original files
[linux-2.4.git] / arch / ppc / platforms / redwood5.c
1 /*
2  *
3  *    Copyright 2000-2001 MontaVista Software Inc.
4  *      Completed implementation.
5  *      Author: Armin Kuster
6  *
7  *    Module name: redwood5.c
8  *
9  *    Description:
10  *      IBM redwood5 eval board file
11  *
12  *      History:  12/29/2001 - Armin
13  *      initail release
14  *
15  * Please read the COPYING file for all license details.
16  */
17
18 #include <linux/config.h>
19 #include <linux/init.h>
20 #include <linux/pagemap.h>
21 #include <asm/io.h>
22 #include <asm/machdep.h>
23
24 void __init
25 board_setup_arch(void)
26 {
27
28         bd_t *bip = (bd_t *)__res;
29
30 #ifdef CONFIG_DEBUG_BRINGUP
31         printk("\n");
32         printk("machine\t: %s\n", PPC4xx_MACHINE_NAME);
33         printk("\n");
34         printk("bi_s_version\t %s\n",      bip->bi_s_version);
35         printk("bi_r_version\t %s\n",      bip->bi_r_version);
36         printk("bi_memsize\t 0x%8.8x\t %dMBytes\n", bip->bi_memsize,bip->bi_memsize/(1024*1000));
37         printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 0,
38         bip->bi_enetaddr[0], bip->bi_enetaddr[1],
39         bip->bi_enetaddr[2], bip->bi_enetaddr[3],
40         bip->bi_enetaddr[4], bip->bi_enetaddr[5]);
41
42         printk("bi_intfreq\t 0x%8.8x\t clock:\t %dMhz\n",
43                bip->bi_intfreq, bip->bi_intfreq/ 1000000);
44
45         printk("bi_busfreq\t 0x%8.8x\t plb bus clock:\t %dMHz\n",
46                 bip->bi_busfreq, bip->bi_busfreq / 1000000 );
47         printk("bi_tbfreq\t 0x%8.8x\t TB freq:\t %dMHz\n",
48                bip->bi_tbfreq, bip->bi_tbfreq/1000000);
49
50         printk("\n");
51 #endif
52
53 }
54
55 void __init
56 board_io_mapping(void)
57 {
58         int i;
59
60         for (i = 0; i < 16; i++) {
61          unsigned long v, p;
62
63         /* 0x400x0000 -> 0xe00x0000 */
64         p = 0x40000000 | (i << 16);
65         v = STB04xxx_IO_BASE | (i << 16);
66
67         io_block_mapping(v, p, PAGE_SIZE,
68                  _PAGE_NO_CACHE | pgprot_val(PAGE_KERNEL) | _PAGE_GUARDED);
69         }
70
71
72 }
73
74 void __init
75 board_setup_irq(void)
76 {
77 }
78
79 void __init
80 board_init(void)
81 {
82 }