{
return irq - NR_GIC_IRQS + PIN_BASE;
}
-static inline int port_output_init(unsigned int value, int on, char *name)
-{
- int ret = 0;
- struct port_config port;
-
- port = get_port_config(value);
- ret = gpio_request(port.gpio, name);
- if(ret < 0)
- return ret;
- gpio_pull_updown(port.gpio, port.io.pull_mode);
- gpio_direction_output(port.gpio, (on)? !port.io.active_low: !!port.io.active_low);
-
- return 0;
-}
-static inline void port_output_on(unsigned int value)
-{
- struct port_config port;
-
- port = get_port_config(value);
- gpio_set_value(port.gpio, !port.io.active_low);
-}
-static inline void port_output_off(unsigned int value)
-{
- struct port_config port;
-
- port = get_port_config(value);
- gpio_set_value(port.gpio, !!port.io.active_low);
-}
-static inline void port_deinit(unsigned int value)
-{
- struct port_config port;
-
- port = get_port_config(value);
- gpio_free(port.gpio);
-}
-static inline int port_input_init(unsigned int value, char *name)
-{
- int ret = 0;
- struct port_config port;
-
- port = get_port_config(value);
- ret = gpio_request(port.gpio, name);
- if(ret < 0)
- return ret;
- gpio_pull_updown(port.gpio, port.io.pull_mode);
- gpio_direction_input(port.gpio);
-
- return 0;
-}
-static inline int port_get_value(unsigned int value)
-{
- struct port_config port;
-
- port = get_port_config(value);
- return gpio_get_value(port.gpio);
-}
#endif /* __ASSEMBLY__ */
obj-$(CONFIG_FIQ_DEBUGGER) += rk_fiq_debugger.o
obj-$(CONFIG_RK_EARLY_PRINTK) += early_printk.o ../kernel/debug.o
obj-y += mem_reserve.o
+obj-y += config.o
obj-y += sram.o
CFLAGS_sram.o += -mthumb
obj-$(CONFIG_DDR_TEST) += memtester.o
--- /dev/null
+#include <mach/gpio.h>
+#include <mach/board.h>
+
+int port_output_init(unsigned int value, int on, char *name)
+{
+ int ret = 0;
+ struct port_config port;
+
+ port = get_port_config(value);
+ ret = gpio_request(port.gpio, name);
+ if(ret < 0)
+ return ret;
+ gpio_pull_updown(port.gpio, port.io.pull_mode);
+ gpio_direction_output(port.gpio, (on)? !port.io.active_low: !!port.io.active_low);
+
+ return 0;
+}
+EXPORT_SYMBOL(port_output_init);
+void port_output_on(unsigned int value)
+{
+ struct port_config port;
+
+ port = get_port_config(value);
+ gpio_set_value(port.gpio, !port.io.active_low);
+}
+EXPORT_SYMBOL(port_output_on);
+void port_output_off(unsigned int value)
+{
+ struct port_config port;
+
+ port = get_port_config(value);
+ gpio_set_value(port.gpio, !!port.io.active_low);
+}
+EXPORT_SYMBOL(port_output_off);
+void port_deinit(unsigned int value)
+{
+ struct port_config port;
+
+ port = get_port_config(value);
+ gpio_free(port.gpio);
+}
+EXPORT_SYMBOL(port_deinit);
+int port_input_init(unsigned int value, char *name)
+{
+ int ret = 0;
+ struct port_config port;
+
+ port = get_port_config(value);
+ ret = gpio_request(port.gpio, name);
+ if(ret < 0)
+ return ret;
+ gpio_pull_updown(port.gpio, port.io.pull_mode);
+ gpio_direction_input(port.gpio);
+
+ return 0;
+}
+EXPORT_SYMBOL(port_input_init);
+int port_get_value(unsigned int value)
+{
+ struct port_config port;
+
+ port = get_port_config(value);
+ return gpio_get_value(port.gpio);
+}
+EXPORT_SYMBOL(port_get_value);
+
+
return port;
}
void gpio_set_iomux(int gpio);
+int port_output_init(unsigned int value, int on, char *name);
+void port_output_on(unsigned int value);
+void port_output_off(unsigned int value);
+int port_input_init(unsigned int value, char *name);
+int port_get_value(unsigned int value);
+void port_deinit(unsigned int value);
typedef enum eGPIOPinLevel
{