http://www.hht-eu.com/pls/hht/docs/F3140/bcm963xx_Speedport500V.0.09.04L.300L01.V27_c...
[bcm963xx.git] / kernel / linux / arch / ppc / platforms / pq2ads_setup.c
1 /*
2  * arch/ppc/platforms/pq2ads_setup.c
3  *
4  * PQ2ADS platform support
5  *
6  * Author: Kumar Gala <kumar.gala@freescale.com>
7  * Derived from: est8260_setup.c by Allen Curtis
8  *
9  * Copyright 2004 Freescale Semiconductor, Inc.
10  *
11  * This program is free software; you can redistribute  it and/or modify it
12  * under  the terms of  the GNU General  Public License as published by the
13  * Free Software Foundation;  either version 2 of the  License, or (at your
14  * option) any later version.
15  */
16
17 #include <linux/config.h>
18 #include <linux/seq_file.h>
19
20 #include <asm/mpc8260.h>
21 #include <asm/machdep.h>
22
23 static void (*callback_setup_arch)(void);
24
25 extern unsigned char __res[sizeof(bd_t)];
26
27 extern void m8260_init(unsigned long r3, unsigned long r4,
28         unsigned long r5, unsigned long r6, unsigned long r7);
29
30 static int
31 pq2ads_show_cpuinfo(struct seq_file *m)
32 {
33         bd_t    *binfo = (bd_t *)__res;
34
35         seq_printf(m, "vendor\t\t: Motorola\n"
36                       "machine\t\t: PQ2 ADS PowerPC\n"
37                       "\n"
38                       "mem size\t\t: 0x%08lx\n"
39                       "console baud\t\t: %ld\n"
40                       "\n",
41                       binfo->bi_memsize,
42                       binfo->bi_baudrate);
43         return 0;
44 }
45
46 static void __init
47 pq2ads_setup_arch(void)
48 {
49         printk("PQ2 ADS Port\n");
50         callback_setup_arch();
51         *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_RS232_EN2;
52 }
53
54 void __init
55 platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
56               unsigned long r6, unsigned long r7)
57 {
58         /* Generic 8260 platform initialization */
59         m8260_init(r3, r4, r5, r6, r7);
60
61         /* Anything special for this platform */
62         ppc_md.show_cpuinfo     = pq2ads_show_cpuinfo;
63
64         callback_setup_arch     = ppc_md.setup_arch;
65         ppc_md.setup_arch       = pq2ads_setup_arch;
66 }