adc765f5e0b4ae4ab1903e16bb3cbac5db9b34bb
4 * Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
12 #include <linux/kernel.h>
13 #include <linux/init.h>
15 #include <asm/bootinfo.h>
16 #include <linux/gpio.h>
18 #include <asm/mach-adm5120/adm5120_info.h>
19 #include <asm/mach-adm5120/adm5120_board.h>
20 #include <asm/mach-adm5120/adm5120_platform.h>
21 #include <asm/mach-adm5120/adm5120_irq.h>
23 #define COMPEX_GPIO_DEV_MASK (1 << ADM5120_GPIO_PIN5)
25 static void switch_bank_gpio5(unsigned bank
)
29 gpio_set_value(ADM5120_GPIO_PIN5
, 0);
32 gpio_set_value(ADM5120_GPIO_PIN5
, 1);
37 void __init
compex_generic_setup(void)
39 gpio_request(ADM5120_GPIO_PIN5
, NULL
); /* for flash A20 line */
40 gpio_direction_output(ADM5120_GPIO_PIN5
, 0);
42 adm5120_flash0_data
.switch_bank
= switch_bank_gpio5
;
43 adm5120_add_device_flash(0);
45 adm5120_add_device_gpio(COMPEX_GPIO_DEV_MASK
);
This page took 0.053938 seconds and 3 git commands to generate.