aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2010-08-03 08:59:22 -0400
committerJesper Nilsson <jesper.nilsson@axis.com>2010-08-04 07:01:50 -0400
commite281a31e1c08e02d05c6fa1c11968c9369e4d809 (patch)
treed444f83be9cee56fde6f530cffe915011fc7b1fc /arch/cris
parentc9cbf097b79b9bde32f4e5aaa0bbc16212be3016 (diff)
CRIS: More ARTPEC-3 support and i2c-boardinfo.
Add standard i2d-devices. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch/cris')
-rw-r--r--arch/cris/arch-v32/kernel/setup.c74
1 files changed, 66 insertions, 8 deletions
diff --git a/arch/cris/arch-v32/kernel/setup.c b/arch/cris/arch-v32/kernel/setup.c
index 72e9e8331f63..61e10ae65296 100644
--- a/arch/cris/arch-v32/kernel/setup.c
+++ b/arch/cris/arch-v32/kernel/setup.c
@@ -9,6 +9,9 @@
9#include <linux/delay.h> 9#include <linux/delay.h>
10#include <linux/param.h> 10#include <linux/param.h>
11 11
12#include <linux/i2c.h>
13#include <linux/platform_device.h>
14
12#ifdef CONFIG_PROC_FS 15#ifdef CONFIG_PROC_FS
13 16
14#define HAS_FPU 0x0001 17#define HAS_FPU 0x0001
@@ -43,14 +46,15 @@ static struct cpu_info cpinfo[] = {
43 46
44 {"ETRAX 100LX v2", 11, 8, HAS_ETHERNET100 | HAS_SCSI | HAS_ATA | HAS_USB 47 {"ETRAX 100LX v2", 11, 8, HAS_ETHERNET100 | HAS_SCSI | HAS_ATA | HAS_USB
45 | HAS_MMU}, 48 | HAS_MMU},
46 49#ifdef CONFIG_ETRAXFS
47 {"ETRAX FS", 32, 32, HAS_ETHERNET100 | HAS_ATA | HAS_MMU}, 50 {"ETRAX FS", 32, 32, HAS_ETHERNET100 | HAS_ATA | HAS_MMU},
48 51#else
52 {"ARTPEC-3", 32, 32, HAS_ETHERNET100 | HAS_MMU},
53#endif
49 {"Unknown", 0, 0, 0} 54 {"Unknown", 0, 0, 0}
50}; 55};
51 56
52int 57int show_cpuinfo(struct seq_file *m, void *v)
53show_cpuinfo(struct seq_file *m, void *v)
54{ 58{
55 int i; 59 int i;
56 int cpu = (int)v - 1; 60 int cpu = (int)v - 1;
@@ -107,9 +111,63 @@ show_cpuinfo(struct seq_file *m, void *v)
107 111
108#endif /* CONFIG_PROC_FS */ 112#endif /* CONFIG_PROC_FS */
109 113
110void 114void show_etrax_copyright(void)
111show_etrax_copyright(void) 115{
116#ifdef CONFIG_ETRAXFS
117 printk(KERN_INFO "Linux/CRISv32 port on ETRAX FS "
118 "(C) 2003, 2004 Axis Communications AB\n");
119#else
120 printk(KERN_INFO "Linux/CRISv32 port on ARTPEC-3 "
121 "(C) 2003-2009 Axis Communications AB\n");
122#endif
123}
124
125static struct i2c_board_info __initdata i2c_info[] = {
126 {I2C_BOARD_INFO("camblock", 0x43)},
127 {I2C_BOARD_INFO("tmp100", 0x48)},
128 {I2C_BOARD_INFO("tmp100", 0x4A)},
129 {I2C_BOARD_INFO("tmp100", 0x4C)},
130 {I2C_BOARD_INFO("tmp100", 0x4D)},
131 {I2C_BOARD_INFO("tmp100", 0x4E)},
132#ifdef CONFIG_RTC_DRV_PCF8563
133 {I2C_BOARD_INFO("pcf8563", 0x51)},
134#endif
135#ifdef CONFIG_ETRAX_VIRTUAL_GPIO
136 {I2C_BOARD_INFO("vgpio", 0x20)},
137 {I2C_BOARD_INFO("vgpio", 0x21)},
138#endif
139 {I2C_BOARD_INFO("pca9536", 0x41)},
140 {I2C_BOARD_INFO("fnp300", 0x40)},
141 {I2C_BOARD_INFO("fnp300", 0x42)},
142 {I2C_BOARD_INFO("adc101", 0x54)},
143};
144
145static struct i2c_board_info __initdata i2c_info2[] = {
146 {I2C_BOARD_INFO("camblock", 0x43)},
147 {I2C_BOARD_INFO("tmp100", 0x48)},
148 {I2C_BOARD_INFO("tmp100", 0x4A)},
149 {I2C_BOARD_INFO("tmp100", 0x4C)},
150 {I2C_BOARD_INFO("tmp100", 0x4D)},
151 {I2C_BOARD_INFO("tmp100", 0x4E)},
152#ifdef CONFIG_ETRAX_VIRTUAL_GPIO
153 {I2C_BOARD_INFO("vgpio", 0x20)},
154 {I2C_BOARD_INFO("vgpio", 0x21)},
155#endif
156 {I2C_BOARD_INFO("pca9536", 0x41)},
157 {I2C_BOARD_INFO("fnp300", 0x40)},
158 {I2C_BOARD_INFO("fnp300", 0x42)},
159 {I2C_BOARD_INFO("adc101", 0x54)},
160};
161
162static struct i2c_board_info __initdata i2c_info3[] = {
163 {I2C_BOARD_INFO("adc101", 0x54)},
164};
165
166static int __init etrax_init(void)
112{ 167{
113 printk(KERN_INFO 168 i2c_register_board_info(0, i2c_info, ARRAY_SIZE(i2c_info));
114 "Linux/CRISv32 port on ETRAX FS (C) 2003, 2004 Axis Communications AB\n"); 169 i2c_register_board_info(1, i2c_info2, ARRAY_SIZE(i2c_info2));
170 i2c_register_board_info(2, i2c_info3, ARRAY_SIZE(i2c_info3));
171 return 0;
115} 172}
173arch_initcall(etrax_init);