2 * Renesas Technology Sales RTS7751R2D Support.
4 * Copyright (C) 2002 Atom Create Engineering Co., Ltd.
5 * Copyright (C) 2004 - 2006 Paul Mundt
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
11 #include <linux/init.h>
12 #include <linux/platform_device.h>
13 #include <linux/serial_8250.h>
16 #include <asm/mach/rts7751r2d.h>
17 #include <asm/voyagergx.h>
19 static struct plat_serial8250_port uart_platform_data[] = {
21 .membase = (void *)VOYAGER_UART_BASE,
22 .mapbase = VOYAGER_UART_BASE,
24 .irq = VOYAGER_UART0_IRQ,
25 .flags = UPF_BOOT_AUTOCONF,
27 .uartclk = (9600 * 16),
33 static void __init voyagergx_serial_init(void)
40 val = inl(GPIO_MUX_HIGH);
42 outl(val, GPIO_MUX_HIGH);
47 val = inl(POWER_MODE0_GATE);
48 val |= (POWER_MODE0_GATE_U0 | POWER_MODE0_GATE_U1);
49 outl(val, POWER_MODE0_GATE);
51 val = inl(POWER_MODE1_GATE);
52 val |= (POWER_MODE1_GATE_U0 | POWER_MODE1_GATE_U1);
53 outl(val, POWER_MODE1_GATE);
56 static struct platform_device uart_device = {
60 .platform_data = uart_platform_data,
64 static struct platform_device *rts7751r2d_devices[] __initdata = {
68 static int __init rts7751r2d_devices_setup(void)
70 return platform_add_devices(rts7751r2d_devices,
71 ARRAY_SIZE(rts7751r2d_devices));
73 __initcall(rts7751r2d_devices_setup);
75 const char *get_system_type(void)
80 static void rts7751r2d_power_off(void)
82 ctrl_outw(0x0001, PA_POWOFF);
86 * Initialize the board
88 void __init platform_setup(void)
90 printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n");
91 ctrl_outw(0x0000, PA_OUTPORT);
92 pm_power_off = rts7751r2d_power_off;
94 voyagergx_serial_init();