treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
[linux-2.6-block.git] / arch / arm / plat-iop / i2c.c
CommitLineData
d2912cb1 1// SPDX-License-Identifier: GPL-2.0-only
e25d64f1
LB
2/*
3 * arch/arm/plat-iop/i2c.c
4 *
5 * Author: Nicolas Pitre <nico@cam.org>
6 * Copyright (C) 2001 MontaVista Software, Inc.
7 * Copyright (C) 2004 Intel Corporation.
e25d64f1
LB
8 */
9
10#include <linux/mm.h>
11#include <linux/init.h>
12#include <linux/major.h>
13#include <linux/fs.h>
14#include <linux/platform_device.h>
15#include <linux/serial.h>
16#include <linux/tty.h>
17#include <linux/serial_core.h>
fced80c7 18#include <linux/io.h>
e25d64f1
LB
19#include <asm/pgtable.h>
20#include <asm/page.h>
21#include <asm/mach/map.h>
22#include <asm/setup.h>
e25d64f1 23#include <asm/memory.h>
a09e64fb 24#include <mach/hardware.h>
e25d64f1 25#include <asm/hardware/iop3xx.h>
e25d64f1
LB
26#include <asm/mach/arch.h>
27
28#ifdef CONFIG_ARCH_IOP32X
c852ac80
LB
29#define IRQ_IOP3XX_I2C_0 IRQ_IOP32X_I2C_0
30#define IRQ_IOP3XX_I2C_1 IRQ_IOP32X_I2C_1
e25d64f1
LB
31#endif
32#ifdef CONFIG_ARCH_IOP33X
c852ac80
LB
33#define IRQ_IOP3XX_I2C_0 IRQ_IOP33X_I2C_0
34#define IRQ_IOP3XX_I2C_1 IRQ_IOP33X_I2C_1
e25d64f1
LB
35#endif
36
37static struct resource iop3xx_i2c0_resources[] = {
38 [0] = {
39 .start = 0xfffff680,
40 .end = 0xfffff697,
41 .flags = IORESOURCE_MEM,
42 },
43 [1] = {
44 .start = IRQ_IOP3XX_I2C_0,
45 .end = IRQ_IOP3XX_I2C_0,
46 .flags = IORESOURCE_IRQ,
47 },
48};
49
50struct platform_device iop3xx_i2c0_device = {
51 .name = "IOP3xx-I2C",
52 .id = 0,
53 .num_resources = 2,
54 .resource = iop3xx_i2c0_resources,
55};
56
57
58static struct resource iop3xx_i2c1_resources[] = {
59 [0] = {
60 .start = 0xfffff6a0,
61 .end = 0xfffff6b7,
62 .flags = IORESOURCE_MEM,
63 },
64 [1] = {
65 .start = IRQ_IOP3XX_I2C_1,
66 .end = IRQ_IOP3XX_I2C_1,
67 .flags = IORESOURCE_IRQ,
68 }
69};
70
71struct platform_device iop3xx_i2c1_device = {
72 .name = "IOP3xx-I2C",
73 .id = 1,
74 .num_resources = 2,
75 .resource = iop3xx_i2c1_resources,
76};