1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

fixes mdio, adds runtime board configuration for ifxmips

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11609 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
blogic
2008-06-29 14:56:45 +00:00
parent adde7768a2
commit 2cccfb6609
5 changed files with 192 additions and 81 deletions

View File

@@ -45,9 +45,9 @@
#define PINS_PER_PORT 16
#ifdef CONFIG_IFXMIPS_GPIO_RST_BTN
#define IFXMIPS_RST_PIN 15
#define IFXMIPS_RST_PORT 1
unsigned int rst_port = 1;
unsigned int rst_pin = 15;
static struct timer_list rst_button_timer;
extern struct sock *uevent_sock;
@@ -306,7 +306,7 @@ reset_button_poll(unsigned long unused)
rst_button_timer.expires = jiffies + (HZ / 4);
add_timer(&rst_button_timer);
if (pressed != ifxmips_port_get_input(IFXMIPS_RST_PORT, IFXMIPS_RST_PIN))
if (pressed != ifxmips_port_get_input(rst_port, rst_pin))
{
if(pressed)
pressed = 0;
@@ -333,10 +333,12 @@ ifxmips_gpio_probe(struct platform_device *dev)
int retval = 0;
#ifdef CONFIG_IFXMIPS_GPIO_RST_BTN
ifxmips_port_set_open_drain(IFXMIPS_RST_PORT, IFXMIPS_RST_PIN);
ifxmips_port_clear_altsel0(IFXMIPS_RST_PORT, IFXMIPS_RST_PIN);
ifxmips_port_clear_altsel1(IFXMIPS_RST_PORT, IFXMIPS_RST_PIN);
ifxmips_port_set_dir_in(IFXMIPS_RST_PORT, IFXMIPS_RST_PIN);
rst_port = dev->resource[0].start;
rst_pin = dev->resource[0].end;
ifxmips_port_set_open_drain(rst_port, rst_pin);
ifxmips_port_clear_altsel0(rst_port, rst_pin);
ifxmips_port_clear_altsel1(rst_port, rst_pin);
ifxmips_port_set_dir_in(rst_port, rst_pin);
seen = jiffies;
init_timer(&rst_button_timer);
rst_button_timer.function = reset_button_poll;