1 /* linux/arch/arm/mach-s3c2410/mach-n30.c
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
6 * Copyright (c) 2005 Christer Weinigel <christer@weinigel.se>
8 * There is a wiki with more information about the n30 port at
9 * http://handhelds.org/moin/moin.cgi/AcerN30Documentation .
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
16 #include <linux/kernel.h>
17 #include <linux/types.h>
18 #include <linux/interrupt.h>
19 #include <linux/list.h>
20 #include <linux/timer.h>
21 #include <linux/init.h>
22 #include <linux/delay.h>
23 #include <linux/serial_core.h>
24 #include <linux/platform_device.h>
25 #include <linux/kthread.h>
27 #include <asm/mach/arch.h>
28 #include <asm/mach/map.h>
29 #include <asm/mach/irq.h>
31 #include <asm/hardware.h>
34 #include <asm/mach-types.h>
36 #include <asm/arch/regs-serial.h>
37 #include <asm/arch/regs-gpio.h>
38 #include <asm/arch/iic.h>
40 #include <asm/plat-s3c24xx/s3c2410.h>
41 #include <asm/plat-s3c24xx/clock.h>
42 #include <asm/plat-s3c24xx/devs.h>
43 #include <asm/plat-s3c24xx/cpu.h>
45 static struct map_desc n30_iodesc[] __initdata = {
46 /* nothing here yet */
49 static struct s3c2410_uartcfg n30_uartcfgs[] = {
50 /* Normal serial port */
62 .uart_flags = UPF_CONS_FLOW,
67 /* The BlueTooth controller is connected to port 2 */
77 static struct platform_device *n30_devices[] __initdata = {
83 &s3c_device_usbgadget,
86 static struct s3c2410_platform_i2c n30_i2ccfg = {
93 static void __init n30_map_io(void)
95 s3c24xx_init_io(n30_iodesc, ARRAY_SIZE(n30_iodesc));
96 s3c24xx_init_clocks(0);
97 s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs));
100 static void __init n30_init_irq(void)
105 /* GPB3 is the line that controls the pull-up for the USB D+ line */
107 static void __init n30_init(void)
109 s3c_device_i2c.dev.platform_data = &n30_i2ccfg;
111 /* Turn off suspend on both USB ports, and switch the
112 * selectable USB port to USB device mode. */
114 s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
115 S3C2410_MISCCR_USBSUSPND0 |
116 S3C2410_MISCCR_USBSUSPND1, 0x0);
118 platform_add_devices(n30_devices, ARRAY_SIZE(n30_devices));
121 MACHINE_START(N30, "Acer-N30")
122 /* Maintainer: Christer Weinigel <christer@weinigel.se>,
123 Ben Dooks <ben-linux@fluff.org>
125 .phys_io = S3C2410_PA_UART,
126 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
127 .boot_params = S3C2410_SDRAM_PA + 0x100,
128 .timer = &s3c24xx_timer,
129 .init_machine = n30_init,
130 .init_irq = n30_init_irq,
131 .map_io = n30_map_io,
136 compile-command: "make ARCH=arm CROSS_COMPILE=/usr/local/arm/3.3.2/bin/arm-linux- -k -C ../../.."