2 * arch/arm/plat-iop/i2c.c
4 * Author: Nicolas Pitre <nico@cam.org>
5 * Copyright (C) 2001 MontaVista Software, Inc.
6 * Copyright (C) 2004 Intel Corporation.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
14 #include <linux/init.h>
15 #include <linux/major.h>
17 #include <linux/platform_device.h>
18 #include <linux/serial.h>
19 #include <linux/tty.h>
20 #include <linux/serial_core.h>
22 #include <asm/pgtable.h>
24 #include <asm/mach/map.h>
25 #include <asm/setup.h>
26 #include <asm/system.h>
27 #include <asm/memory.h>
28 #include <asm/hardware.h>
29 #include <asm/hardware/iop3xx.h>
30 #include <asm/mach-types.h>
31 #include <asm/mach/arch.h>
33 #ifdef CONFIG_ARCH_IOP32X
34 #define IRQ_IOP3XX_I2C_0 IRQ_IOP32X_I2C_0
35 #define IRQ_IOP3XX_I2C_1 IRQ_IOP32X_I2C_1
37 #ifdef CONFIG_ARCH_IOP33X
38 #define IRQ_IOP3XX_I2C_0 IRQ_IOP33X_I2C_0
39 #define IRQ_IOP3XX_I2C_1 IRQ_IOP33X_I2C_1
42 static struct resource iop3xx_i2c0_resources[] = {
46 .flags = IORESOURCE_MEM,
49 .start = IRQ_IOP3XX_I2C_0,
50 .end = IRQ_IOP3XX_I2C_0,
51 .flags = IORESOURCE_IRQ,
55 struct platform_device iop3xx_i2c0_device = {
59 .resource = iop3xx_i2c0_resources,
63 static struct resource iop3xx_i2c1_resources[] = {
67 .flags = IORESOURCE_MEM,
70 .start = IRQ_IOP3XX_I2C_1,
71 .end = IRQ_IOP3XX_I2C_1,
72 .flags = IORESOURCE_IRQ,
76 struct platform_device iop3xx_i2c1_device = {
80 .resource = iop3xx_i2c1_resources,