From e1bc7b5ab1e5892966b6828114775ffe66654a65 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 25 May 2009 18:36:49 +0000
Subject: [ar71xx] add preliminary support for the WRT160NL

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16068 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |  3 +
 target/linux/ar71xx/config-2.6.28                  |  1 +
 target/linux/ar71xx/config-2.6.30                  |  1 +
 target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig |  4 ++
 .../linux/ar71xx/files/arch/mips/ar71xx/Makefile   |  1 +
 .../ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c  | 83 ++++++++++++++++++++++
 target/linux/ar71xx/files/arch/mips/ar71xx/prom.c  |  3 +
 .../arch/mips/include/asm/mach-ar71xx/ar71xx.h     |  1 +
 target/linux/ar71xx/profiles/linksys.mk            | 10 +++
 9 files changed, 107 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c

(limited to 'target/linux')

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index ba69e7d5ca..c7a6063422 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -55,6 +55,9 @@ ar71xx_board_name() {
 	*WNR2000)
 		name="wnr2000"
 		;;
+	*WRT160NL)
+		name="wrt160nl"
+		;;
 	*WRT400N)
 		name="wrt400n"
 		;;
diff --git a/target/linux/ar71xx/config-2.6.28 b/target/linux/ar71xx/config-2.6.28
index 06e738110c..f272070026 100644
--- a/target/linux/ar71xx/config-2.6.28
+++ b/target/linux/ar71xx/config-2.6.28
@@ -20,6 +20,7 @@ CONFIG_AR71XX_MACH_TL_WR941ND=y
 CONFIG_AR71XX_MACH_UBNT=y
 CONFIG_AR71XX_MACH_WNR2000=y
 CONFIG_AR71XX_MACH_WP543=y
+CONFIG_AR71XX_MACH_WRT160NL=y
 CONFIG_AR71XX_MACH_WRT400N=y
 CONFIG_AR71XX_WDT=y
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
diff --git a/target/linux/ar71xx/config-2.6.30 b/target/linux/ar71xx/config-2.6.30
index 464a45d9ee..9ee6f72696 100644
--- a/target/linux/ar71xx/config-2.6.30
+++ b/target/linux/ar71xx/config-2.6.30
@@ -19,6 +19,7 @@ CONFIG_AR71XX_MACH_TL_WR941ND=y
 CONFIG_AR71XX_MACH_UBNT=y
 CONFIG_AR71XX_MACH_WNR2000=y
 CONFIG_AR71XX_MACH_WP543=y
+CONFIG_AR71XX_MACH_WRT160NL=y
 CONFIG_AR71XX_MACH_WRT400N=y
 CONFIG_AR71XX_WDT=y
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
index d5bffdc9b4..0682e015a3 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
@@ -35,6 +35,10 @@ config AR71XX_MACH_WP543
 	select MYLOADER
 	default y
 
+config AR71XX_MACH_WRT160NL
+	bool "Linksys WRT160NL board support"
+	default y
+
 config AR71XX_MACH_WRT400N
 	bool "Linksys WRT400N board support"
 	default y
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
index a70cc2b24b..720fddfdbe 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
@@ -24,4 +24,5 @@ obj-$(CONFIG_AR71XX_MACH_TL_WR941ND)	+= mach-tl-wr941nd.o
 obj-$(CONFIG_AR71XX_MACH_UBNT)		+= mach-ubnt.o
 obj-$(CONFIG_AR71XX_MACH_WNR2000)	+= mach-wnr2000.o
 obj-$(CONFIG_AR71XX_MACH_WP543)		+= mach-wp543.o
+obj-$(CONFIG_AR71XX_MACH_WRT160NL)	+= mach-wrt160nl.o
 obj-$(CONFIG_AR71XX_MACH_WRT400N)	+= mach-wrt400n.o
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c
new file mode 100644
index 0000000000..06cd05aa2f
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c
@@ -0,0 +1,83 @@
+/*
+ *  Linksys WRT160NL board support
+ *
+ *  Copyright (C) 2009 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 version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/flash.h>
+
+#include <asm/mips_machine.h>
+#include <asm/mach-ar71xx/ar71xx.h>
+
+#include "devices.h"
+
+#ifdef CONFIG_MTD_PARTITIONS
+static struct mtd_partition wrt160nl_partitions[] = {
+	{
+		.name		= "u-boot",
+		.offset		= 0,
+		.size		= 0x040000,
+		.mask_flags	= MTD_WRITEABLE,
+	} , {
+		.name		= "kernel",
+		.offset		= 0x040000,
+		.size		= 0x0e0000,
+	} , {
+		.name		= "filesytem",
+		.offset		= 0x120000,
+		.size		= 0x6c0000,
+	} , {
+		.name		= "nvram",
+		.offset		= 0x7e0000,
+		.size		= 0x010000,
+		.mask_flags	= MTD_WRITEABLE,
+	} , {
+		.name		= "ART",
+		.offset		= 0x<style>pre { line-height: 125%; margin: 0; }
td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #ffffff; }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */</style><div class="highlight"><pre><span></span><span class="gd">--- sangam_atm-07.01.00.10/tn7api.h	2006-10-26 16:48:34.000000000 +0200</span>
<span class="gi">+++ sangam_atm-07.01.00.10.new/tn7api.h	2007-07-24 12:43:04.000000000 +0200</span>
<span class="gu">@@ -104,7 +104,7 @@</span>
 
 int tn7dsl_proc_write_stats(struct file *fp, const char * buf, unsigned long count, void * data);
 int tn7dsl_proc_modem(char* buf, char **start, off_t offset, int count,int *eof, void *data);
<span class="gd">-inline int tn7dsl_handle_interrupt(void);</span>
<span class="gi">+int tn7dsl_handle_interrupt(void);</span>
 
 void tn7dsl_dslmod_sysctl_register(void);
 void tn7dsl_dslmod_sysctl_unregister(void);
</pre></div>
</code></pre></td></tr></table>
</div> <!-- class=content -->
<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.3</a> (<a href='https://git-scm.com/'>git 2.25.1</a>) at 2025-01-26 13:41:28 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>
