aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120/image
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2008-09-23 14:56:29 +0000
committerGabor Juhos <juhosg@openwrt.org>2008-09-23 14:56:29 +0000
commit0f0cd3f0c7f2455faf308643f1deb0158fe21925 (patch)
tree0c7a44c83c9059418c27ef12db4fde06316f9346 /target/linux/adm5120/image
parent8db5c02f5f90ac4d15c9e7e5ef2b06c3dcde83c0 (diff)
downloadmaster-187ad058-0f0cd3f0c7f2455faf308643f1deb0158fe21925.tar.gz
master-187ad058-0f0cd3f0c7f2455faf308643f1deb0158fe21925.tar.bz2
master-187ad058-0f0cd3f0c7f2455faf308643f1deb0158fe21925.zip
[adm5120] experimental support for the Motorola MU Gateway
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12662 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120/image')
-rw-r--r--target/linux/adm5120/image/lzma-loader/src/board.c17
-rw-r--r--target/linux/adm5120/image/lzma-loader/src/config.h12
-rw-r--r--target/linux/adm5120/image/lzma-loader/src/decompress.c5
-rw-r--r--target/linux/adm5120/image/router_le.mk7
4 files changed, 34 insertions, 7 deletions
diff --git a/target/linux/adm5120/image/lzma-loader/src/board.c b/target/linux/adm5120/image/lzma-loader/src/board.c
index 22317f9683..5ebdbc3b12 100644
--- a/target/linux/adm5120/image/lzma-loader/src/board.c
+++ b/target/linux/adm5120/image/lzma-loader/src/board.c
@@ -1,8 +1,8 @@
/*
* ADM5120 specific board support for LZMA decompressor
*
- * Copyright (C) 2007 OpenWrt.org
- * Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (C) 2007-2008 OpenWrt.org
+ * Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "config.h"
#include <stddef.h>
#define READREG(r) *(volatile unsigned int *)(r)
@@ -35,7 +36,8 @@
/*
* UART definitions
*/
-#define UART_BASE 0xB2600000
+#define UART0_BASE 0xB2600000
+#define UART1_BASE 0xB2800000
/* UART registers */
#define UART_REG_DATA 0x00 /* Data register */
#define UART_REG_ECR 0x04 /* Error Clear register */
@@ -91,8 +93,13 @@
* UART routines
*/
-#define UART_READ(r) READREG(UART_BASE+(r))
-#define UART_WRITE(r,v) WRITEREG(UART_BASE+(r),(v))
+#if defined(CONFIG_USE_UART0)
+# define UART_READ(r) READREG(UART0_BASE+(r))
+# define UART_WRITE(r,v) WRITEREG(UART0_BASE+(r),(v))
+#else
+# define UART_READ(r) READREG(UART1_BASE+(r))
+# define UART_WRITE(r,v) WRITEREG(UART1_BASE+(r),(v))
+#endif
static void uart_init(void)
{
diff --git a/target/linux/adm5120/image/lzma-loader/src/config.h b/target/linux/adm5120/image/lzma-loader/src/config.h
index 74ae9afa20..4e8b5f647c 100644
--- a/target/linux/adm5120/image/lzma-loader/src/config.h
+++ b/target/linux/adm5120/image/lzma-loader/src/config.h
@@ -98,6 +98,14 @@
#endif
/*
+ * Motorola boards
+ */
+#if defined(CONFIG_BOARD_POWERLINEMUGW)
+# define CONFIG_BOARD_NAME "Powerline MU Gateway"
+# define CONFIG_USE_UART1 1
+#endif
+
+/*
* ZyXEL boards
*/
#if defined(CONFIG_BOARD_P334WT)
@@ -121,4 +129,8 @@
# define CONFIG_FLASH_SIZE FLASH_2M
#endif
+#if !defined(CONFIG_USE_UART0) && !defined(CONFIG_USE_UART1)
+# define CONFIG_USE_UART0
+#endif
+
#endif /* _CONFIG_H_ */
diff --git a/target/linux/adm5120/image/lzma-loader/src/decompress.c b/target/linux/adm5120/image/lzma-loader/src/decompress.c
index 4a20a6b425..de6c937d37 100644
--- a/target/linux/adm5120/image/lzma-loader/src/decompress.c
+++ b/target/linux/adm5120/image/lzma-loader/src/decompress.c
@@ -4,7 +4,8 @@
* LZMA compressed kernel decompressor for ADM5120 boards
*
* Copyright (C) 2005 by Oleg I. Vdovikin <oleg@cs.msu.su>
- * Copyright (C) 2007 OpenWrt.org
+ * Copyright (C) 2007-2008 OpenWrt.org
+ * Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -293,7 +294,7 @@ void decompress_entry(unsigned long reg_a0, unsigned long reg_a1,
board_init();
printf("\n\nLZMA loader for " CONFIG_BOARD_NAME
- ", Copyright (C) 2007 OpenWrt.org\n\n");
+ ", Copyright (C) 2007-2008 OpenWrt.org\n\n");
decompress_init();
diff --git a/target/linux/adm5120/image/router_le.mk b/target/linux/adm5120/image/router_le.mk
index db2dc50381..ddfb7e2707 100644
--- a/target/linux/adm5120/image/router_le.mk
+++ b/target/linux/adm5120/image/router_le.mk
@@ -302,6 +302,10 @@ define Image/Build/Profile/EASY5120PATA
$(call Image/Build/Template/Infineon/$(1),easy-5120p-ata)
endef
+define Image/Build/Profile/PMUGW
+ $(call Image/Build/Template/Infineon/$(1),powerline-mugw)
+endef
+
define Image/Build/Profile/RouterBoard
$(call Image/Build/Template/Mikrotik/$(1))
endef
@@ -321,6 +325,8 @@ ifeq ($(CONFIG_BROKEN),y)
$(call Image/Build/Profile/CAS861W,$(1))
$(call Image/Build/Profile/NFS101U,$(1))
$(call Image/Build/Profile/NFS101WU,$(1))
+ # Motorola
+ $(call Image/Build/Profile/PMUGW,$(1))
endef
endif
@@ -340,6 +346,7 @@ define Image/Build/Profile/Generic
$(call Image/Build/Profile/EASY5120PATA,$(1))
# Mikrotik
$(call Image/Build/Profile/RB1xx/$(1))
+
$(call Image/Build/Experimental,$(1))
endef