summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-05-27 16:20:21 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-05-27 16:20:21 +0000
commit3241f2e6afb0144ecf5c9537989e3eaf7fab5612 (patch)
treebf456b16788cff81bd74481946086895d29206e7
parentb49e880ccb038f1e0f9326410ade340421406477 (diff)
[ar7] include missing atm-tools to setup pppoe/a links
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16112 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ar7/Makefile4
-rw-r--r--target/linux/ar7/files/arch/mips/ar7/setup.c38
2 files changed, 39 insertions, 3 deletions
diff --git a/target/linux/ar7/Makefile b/target/linux/ar7/Makefile
index a78c703f41..67334cc5fe 100644
--- a/target/linux/ar7/Makefile
+++ b/target/linux/ar7/Makefile
@@ -15,8 +15,8 @@ LINUX_VERSION:=2.6.27.22
include $(INCLUDE_DIR)/target.mk
-DEFAULT_PACKAGES+= kmod-pppoa ppp-mod-pppoa br2684ctl kmod-acx \
- kmod-sangam-atm-annex-a kmod-sangam-atm-annex-b
+DEFAULT_PACKAGES+= kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl \
+ kmod-acx kmod-sangam-atm-annex-a kmod-sangam-atm-annex-b
define Target/Description
Build firmware images for TI AR7 based routers
diff --git a/target/linux/ar7/files/arch/mips/ar7/setup.c b/target/linux/ar7/files/arch/mips/ar7/setup.c
index 3448fd2626..f54aedc2a4 100644
--- a/target/linux/ar7/files/arch/mips/ar7/setup.c
+++ b/target/linux/ar7/files/arch/mips/ar7/setup.c
@@ -19,6 +19,9 @@
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/pm.h>
+#include <linux/console.h>
+#include <linux/serial.h>
+#include <linux/serial_8250.h>
#include <asm/reboot.h>
#include <asm/time.h>
@@ -69,7 +72,40 @@ const char *get_system_type(void)
static int __init ar7_init_console(void)
{
- return 0;
+ int res;
+
+ static struct uart_port uart_port[2];
+
+ memset(uart_port, 0, sizeof(struct uart_port) * 2);
+
+ uart_port[0].type = PORT_AR7;
+ uart_port[0].line = 0;
+ uart_port[0].irq = AR7_IRQ_UART0;
+ uart_port[0].uartclk = ar7_bus_freq() / 2;
+ uart_port[0].iotype = UPIO_MEM;
+ uart_port[0].mapbase = AR7_REGS_UART0;
+ uart_port[0].membase = ioremap(uart_port[0].mapbase, 256);
+ uart_port[0].regshift = 2;
+ res = early_serial_setup(&uart_port[0]);
+ if (res)
+ return res;
+
+ /* Only TNETD73xx have a second serial port */
+ if (ar7_has_second_uart()) {
+ uart_port[1].type = PORT_AR7;
+ uart_port[1].line = 1;
+ uart_port[1].irq = AR7_IRQ_UART1;
+ uart_port[1].uartclk = ar7_bus_freq() / 2;
+ uart_port[1].iotype = UPIO_MEM;
+ uart_port[1].mapbase = UR8_REGS_UART1;
+ uart_port[1].membase = ioremap(uart_port[1].mapbase, 256);
+ uart_port[1].regshift = 2;
+ res = early_serial_setup(&uart_port[1]);
+ if (res)
+ return res;
+ }
+
+ return add_preferred_console("ttyS", 0, NULL);
}
/*