2 * arch/ppc/platforms/4xx/redwood5.c
4 * Support for the IBM redwood5 eval board file
6 * Author: Armin Kuster <akuster@mvista.com>
8 * 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
14 #include <linux/config.h>
15 #include <linux/init.h>
16 #include <linux/pagemap.h>
17 #include <linux/platform_device.h>
18 #include <linux/ioport.h>
20 #include <asm/machdep.h>
21 #include <asm/ppc4xx_pic.h>
24 * Define external IRQ senses and polarities.
26 unsigned char ppc4xx_uic_ext_irq_cfg[] __initdata = {
27 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 0 */
28 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 1 */
29 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 2 */
30 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 3 */
31 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 4 */
32 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 5 */
35 static struct resource smc91x_resources[] = {
37 .start = SMC91111_BASE_ADDR,
38 .end = SMC91111_BASE_ADDR + SMC91111_REG_SIZE - 1,
39 .flags = IORESOURCE_MEM,
42 .start = SMC91111_IRQ,
44 .flags = IORESOURCE_IRQ,
48 static struct platform_device smc91x_device = {
51 .num_resources = ARRAY_SIZE(smc91x_resources),
52 .resource = smc91x_resources,
55 static struct platform_device *redwood5_devs[] __initdata = {
60 redwood5_platform_add_devices(void)
62 return platform_add_devices(redwood5_devs, ARRAY_SIZE(redwood5_devs));
66 redwood5_setup_arch(void)
70 #ifdef CONFIG_DEBUG_BRINGUP
72 printk("machine\t: %s\n", PPC4xx_MACHINE_NAME);
74 printk("bi_s_version\t %s\n", bip->bi_s_version);
75 printk("bi_r_version\t %s\n", bip->bi_r_version);
76 printk("bi_memsize\t 0x%8.8x\t %dMBytes\n", bip->bi_memsize,bip->bi_memsize/(1024*1000));
77 printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 0,
78 bip->bi_enetaddr[0], bip->bi_enetaddr[1],
79 bip->bi_enetaddr[2], bip->bi_enetaddr[3],
80 bip->bi_enetaddr[4], bip->bi_enetaddr[5]);
82 printk("bi_intfreq\t 0x%8.8x\t clock:\t %dMhz\n",
83 bip->bi_intfreq, bip->bi_intfreq/ 1000000);
85 printk("bi_busfreq\t 0x%8.8x\t plb bus clock:\t %dMHz\n",
86 bip->bi_busfreq, bip->bi_busfreq / 1000000 );
87 printk("bi_tbfreq\t 0x%8.8x\t TB freq:\t %dMHz\n",
88 bip->bi_tbfreq, bip->bi_tbfreq/1000000);
92 device_initcall(redwood5_platform_add_devices);
101 for (i = 0; i < 16; i++) {
104 /* 0x400x0000 -> 0xe00x0000 */
105 p = 0x40000000 | (i << 16);
106 v = STB04xxx_IO_BASE | (i << 16);
108 io_block_mapping(v, p, PAGE_SIZE,
109 _PAGE_NO_CACHE | pgprot_val(PAGE_KERNEL) | _PAGE_GUARDED);
116 platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
117 unsigned long r6, unsigned long r7)
119 ppc4xx_init(r3, r4, r5, r6, r7);
121 ppc_md.setup_arch = redwood5_setup_arch;
122 ppc_md.setup_io_mappings = redwood5_map_io;