7 #include <linux/types.h>
8 #include <linux/errno.h>
10 #include <linux/string.h>
11 #include <linux/ctype.h>
12 #include <linux/kernel.h>
13 #include <linux/module.h>
15 #include <mach/pinmux.h>
16 #include <hwregs/gio_defs.h>
55 #define NBR_OF_PORTS ARRAY_SIZE(crisv32_ioports)
67 static unsigned long io_dummy;
79 static int __init crisv32_io_init(
void)
86 for (i = 0; i <
ARRAY_SIZE(crisv32_ioports); i++)
91 #if (defined(CONFIG_ETRAX_NBR_LED_GRP_ONE) || defined(CONFIG_ETRAX_NBR_LED_GRP_TWO))
94 CONFIG_ETRAX_LED_G_NET0);
96 if (
strcmp(CONFIG_ETRAX_LED_G_NET0, CONFIG_ETRAX_LED_R_NET0)) {
99 CONFIG_ETRAX_LED_R_NET0);
105 #ifdef CONFIG_ETRAX_NBR_LED_GRP_TWO
108 CONFIG_ETRAX_LED_G_NET1);
110 if (
strcmp(CONFIG_ETRAX_LED_G_NET1, CONFIG_ETRAX_LED_R_NET1)) {
112 CONFIG_ETRAX_LED_R_NET1);
134 unsigned int port,
unsigned int pin)
138 if (port > crisv32_ioports[port].pin_count)
142 iopin->
port = &crisv32_ioports[
port];
169 if (pin < 0 || pin > crisv32_ioports[port].pin_count)
173 iopin->
port = &crisv32_ioports[
port];
181 "crisv32_io_get_name: Allocated pin %d on port %d\n",