ADDENDUM:<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>> { .ptr_type = 4, .addr = 0xB8002000, .val = 0x0000D003, },<br>
> { .ptr_type = 4, .addr = 0xB8002004, .val = 0x00330D01, },<br>
> { .ptr_type = 4, .addr = 0xB8002008, .val = 0x00220800, },<br>
<br>
</div>Do these values match the ones you read out of the registers using your<br>
U-Boot?<br></blockquote><div><br></div></div><div>Yep, the corresponing dcdheader.S entries:</div><div><br></div><div><div>DCDGEN( 1, 4, 0xB8002000, 0x0000D003) /* CS0_CSCRU */</div><div>DCDGEN( 2, 4, 0xB8002004, 0x00330d01) /* CS0_CSCRL */</div>
<div>DCDGEN( 3, 4, 0xB8002008, 0x00220800) /* CS0_CSCRA */</div></div><div><br></div><div>So I reckon at least I got this part working fine.</div><div class="im"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
> /* Set up 16bit NOR flash on WEIM CS0 */<br>
> writel(0xB8002000, 0x0000D003);<br>
> writel(0xB8002004, 0x00330D01);<br>
> writel(0xB8002008, 0x00220800);<br>
<br>
</div>You mixed up the argument order.<br>
<div><br></div></blockquote></div><div>Yikes!!!! I hope I didn't fry something. I'll quickly try the reversed order and report back.</div></div></blockquote><div><br></div><div>It does not change the fact that it still does not recognize my NOR. I am at my wits' end here, so I go along posting my patch to support the mx25 based device for review:</div>
<div><br></div><div>diff --git a/arch/arm/Makefile b/arch/arm/Makefile</div><div>index d0bfd71..483b47e 100644</div><div>--- a/arch/arm/Makefile</div><div>+++ b/arch/arm/Makefile</div><div>@@ -133,6 +133,7 @@ board-$(CONFIG_MACH_TX25)<span class="Apple-tab-span" style="white-space:pre"> </span>:= karo-tx25</div>
<div> board-$(CONFIG_MACH_TQMA53)<span class="Apple-tab-span" style="white-space:pre"> </span>:= tqma53</div><div> board-$(CONFIG_MACH_TX51)<span class="Apple-tab-span" style="white-space:pre"> </span>:= karo-tx51</div>
<div> board-$(CONFIG_MACH_MX6Q_ARM2)<span class="Apple-tab-span" style="white-space:pre"> </span>:= freescale-mx6-arm2</div><div>+board-$(CONFIG_MACH_MX25_NOAH)<span class="Apple-tab-span" style="white-space:pre"> </span>:= fq-sid1-mx25-noah</div>
<div> </div><div> machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))</div><div> </div><div>diff --git a/arch/arm/boards/fq-sid1-mx25-noah/Makefile b/arch/arm/boards/fq-sid1-mx25-noah/Makefile</div><div>new file mode 100644</div>
<div>index 0000000..1e9cd54</div><div>--- /dev/null</div><div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/Makefile</div><div>@@ -0,0 +1,26 @@</div><div>+#</div><div>+# (C) Copyright 2007 Juergen Beisert <<a href="mailto:jbe@pengutronix.de">jbe@pengutronix.de</a>></div>
<div>+#</div><div>+# See file CREDITS for list of people who contributed to this</div><div>+# project.</div><div>+#</div><div>+# This program is free software; you can redistribute it and/or</div><div>+# modify it under the terms of the GNU General Public License as</div>
<div>+# published by the Free Software Foundation; either version 2 of</div><div>+# the License, or (at your option) any later version.</div><div>+#</div><div>+# This program is distributed in the hope that it will be useful,</div>
<div>+# but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div>+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</div><div>+# GNU General Public License for more details.</div><div>+#</div>
<div>+# You should have received a copy of the GNU General Public License</div><div>+# along with this program; if not, write to the Free Software</div><div>+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,</div><div>
+# MA 02111-1307 USA</div><div>+#</div><div>+</div><div>+obj-y<span class="Apple-tab-span" style="white-space:pre"> </span>+= lowlevel.o</div><div>+obj-y<span class="Apple-tab-span" style="white-space:pre"> </span>+= sid1_noah.o</div>
<div>+obj-y<span class="Apple-tab-span" style="white-space:pre"> </span>+= extra_commands.o</div><div>+obj-$(CONFIG_ARCH_IMX_INTERNAL_BOOT)<span class="Apple-tab-span" style="white-space:pre"> </span>+= flash_header.o</div>
<div>diff --git a/arch/arm/boards/fq-sid1-mx25-noah/config.h b/arch/arm/boards/fq-sid1-mx25-noah/config.h</div><div>new file mode 100644</div><div>index 0000000..f35e8a0</div><div>--- /dev/null</div><div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/config.h</div>
<div>@@ -0,0 +1,31 @@</div><div>+/*</div><div>+ * (C) Copyright 2007 Juergen Beisert <<a href="mailto:jbe@pengutronix.de">jbe@pengutronix.de</a>></div><div>+ *</div><div>+ * This program is free software; you can redistribute it and/or</div>
<div>+ * modify it under the terms of the GNU General Public License as</div><div>+ * published by the Free Software Foundation; either version 2 of</div><div>+ * the License, or (at your option) any later version.</div>
<div>
+ *</div><div>+ * This program is distributed in the hope that it will be useful,</div><div>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</div>
<div>+ * GNU General Public License for more details.</div><div>+ *</div><div>+ * You should have received a copy of the GNU General Public License</div><div>+ * along with this program; if not, write to the Free Software</div>
<div>+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,</div><div>+ * MA 02111-1307 USA</div><div>+ */</div><div>+</div><div>+#ifndef __CONFIG_H</div><div>+#define __CONFIG_H</div><div>+</div><div>+/*</div><div>+ * Definitions related to passing arguments to kernel.</div>
<div>+ */</div><div>+</div><div>+#define CONFIG_MX25_HCLK_FREQ<span class="Apple-tab-span" style="white-space:pre"> </span>24000000</div><div>+</div><div>+#endif</div><div>+</div><div>+/* nothing to do here yet */</div><div>
diff --git a/arch/arm/boards/fq-sid1-mx25-noah/env/bin/_update b/arch/arm/boards/fq-sid1-mx25-noah/env/bin/_update</div><div>new file mode 100644</div><div>index 0000000..014bce3</div><div>--- /dev/null</div><div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/env/bin/_update</div>
<div>@@ -0,0 +1,36 @@</div><div>+#!/bin/sh</div><div>+</div><div>+if [ -z "$part" -o -z "$image" ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>echo "define \$part and \$image"</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>exit 1</div><div>+fi</div><div>+</div><div>+if [ ! -e "$part" ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>echo "Partition $part does not exist"</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>exit 1</div><div>+fi</div><div>+</div><div>+if [ $# = 1 ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>image=$1</div><div>
+fi</div><div>+</div><div>+if [ x$ip = xdhcp ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>dhcp</div><div>+fi</div><div>+</div><div>+ping $eth0.serverip</div><div>+if [ $? -ne 0 ] ; then</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>echo "update aborted"</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>exit 1</div><div>+fi</div><div>+</div><div>+unprotect $part</div>
<div>+</div><div>+echo</div><div>+echo "erasing partition $part"</div><div>+erase $part</div><div>+</div><div>+echo</div><div>+echo "flashing $image to $part"</div><div>+echo</div><div>+tftp $image $part</div>
<div>diff --git a/arch/arm/boards/fq-sid1-mx25-noah/env/bin/boot b/arch/arm/boards/fq-sid1-mx25-noah/env/bin/boot</div><div>new file mode 100644</div><div>index 0000000..d06fc16</div><div>--- /dev/null</div><div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/env/bin/boot</div>
<div>@@ -0,0 +1,38 @@</div><div>+#!/bin/sh</div><div>+</div><div>+. /env/config</div><div>+</div><div>+if [ x$1 != x ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>boot=$1</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>kernel=$1</div>
<div>+fi</div><div>+</div><div>+if [ x$boot = xnor ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>bootargs="$bootargs root=$nor_rootpart rootfstype=jffs2"</div><div>+elif [ x$boot = xmmc ]; then</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>bootargs="$bootargs root=$mmc_rootpart rootfstype=ext3"</div><div>+elif [ x$boot = xnfs ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>bootargs="$bootargs root=/dev/nfs nfsroot=$eth0.serverip:$nfsroot,v3,tcp"</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>if [ x$getip = xdhcp ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>bootargs="$bootargs ip=dhcp"</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>else</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::"</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>fi</div>
<div>+fi</div><div>+</div><div>+# Generally add mtdparts to kernel cmdline</div><div>+bootargs="$bootargs mtdparts=physmap-flash.0:$nor_parts"</div><div>+</div><div>+if [ x$kernel = xtftp -o x$kernel = xnfs ]; then</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>if [ x$getip = xdhcp ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>echo "BOOT: Fetching IP address from $eth0.serverip"</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>dhcp</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>fi</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>tftp $tftp_uimage uImage || exit 1</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>bootm uImage</div><div>+elif [ x$kernel = xmmc ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>bootm $mmc_kernel</div><div>
+elif [ x$kernel = xnor ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>bootm /dev/nor0.kernel</div><div>+fi</div><div>+</div><div>diff --git a/arch/arm/boards/fq-sid1-mx25-noah/env/bin/init b/arch/arm/boards/fq-sid1-mx25-noah/env/bin/init</div>
<div>new file mode 100644</div><div>index 0000000..070220d</div><div>--- /dev/null</div><div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/env/bin/init</div><div>@@ -0,0 +1,23 @@</div><div>+#!/bin/sh</div><div>+</div><div>+PATH=/env/bin</div>
<div>+export PATH</div><div>+</div><div>+. /env/config</div><div>+</div><div>+if [ -e /dev/nor0 ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>addpart /dev/nor0 $nor_parts</div><div>+fi</div>
<div>+</div><div>+echo</div><div>+echo -n "Hit any key to stop autoboot: "</div><div>+timeout -a $autoboot_timeout</div><div>+if [ $? != 0 ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>echo</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>echo "type update_kernel nor [<imagename>] to update kernel into flash"</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>echo "type update_root nor [<imagename>] to update rootfs into flash"</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>echo</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>exit</div><div>+fi</div><div>+</div><div>+boot</div><div>diff --git a/arch/arm/boards/fq-sid1-mx25-noah/env/bin/update_kernel b/arch/arm/boards/fq-sid1-mx25-noah/env/bin/update_kernel</div>
<div>new file mode 100644</div><div>index 0000000..49523aa</div><div>--- /dev/null</div><div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/env/bin/update_kernel</div><div>@@ -0,0 +1,13 @@</div><div>+#!/bin/sh</div><div>+</div>
<div>
+. /env/config</div><div>+</div><div>+image=$uimage</div><div>+if [ x$1 = xnor ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>part=/dev/nor0.kernel</div><div>+else</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>echo "usage: $0 nor [imagename]"</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>exit 1</div><div>+fi</div><div>+</div><div>+. /env/bin/_update $2</div><div>diff --git a/arch/arm/boards/fq-sid1-mx25-noah/env/bin/update_root b/arch/arm/boards/fq-sid1-mx25-noah/env/bin/update_root</div>
<div>new file mode 100644</div><div>index 0000000..0935bc1</div><div>--- /dev/null</div><div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/env/bin/update_root</div><div>@@ -0,0 +1,16 @@</div><div>+#!/bin/sh</div><div>+</div><div>
+. /env/config</div><div>+</div><div>+image=$uimage</div><div>+if [ x$1 = xnand ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>part=/dev/<a href="http://nand0.root.bb">nand0.root.bb</a></div>
<div>+elif [ x$1 = xnor ]; then</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>part=/dev/nor0.root</div><div>+else</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>echo "usage: $0 nor [imagename]"</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>exit 1</div><div>+fi</div><div>+</div><div>+. /env/bin/_update $2</div><div>+</div><div>diff --git a/arch/arm/boards/fq-sid1-mx25-noah/env/config b/arch/arm/boards/fq-sid1-mx25-noah/env/config</div>
<div>new file mode 100644</div><div>index 0000000..240056d</div><div>--- /dev/null</div><div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/env/config</div><div>@@ -0,0 +1,25 @@</div><div>+#!/bin/sh</div><div>+</div><div>+autoboot_timeout=5</div>
<div>+</div><div>+# can be either 'nfs', 'tftp', 'nor', or 'mmc'</div><div>+kernel=tftp</div><div>+root=mmc</div><div>+</div><div>+version=/v2.1.8-rc</div><div>+tftp_uimage=$version/uImage</div>
<div>+tftp_jffs2=$version/console-image.jffs2</div><div>+bootargs="console=ttymxc0,115200"</div><div>+nfsroot="/home/develop/SID1/nfsroot"</div><div>+nor_parts="512k(barebox)ro,512k(bareboxenv),3072k(kernel),-(root)"</div>
<div>+nor_rootpart="/dev/mtdblock3"</div><div>+mmc_kernel="/dev/mmcblk0p1"</div><div>+mmc_rootpart="/dev/mmcblk0p2"</div><div>+getip=dhcp</div><div>+</div><div>+# or set your networking parameters here</div>
<div>+#eth0.ipaddr=192.168.1.80</div><div>+#eth0.netmask=255.255.255.0</div><div>+#eth0.gateway=a.b.c.d</div><div>+eth0.serverip=192.168.1.23</div><div>+eth0.ethaddr=00:50:c2:8c:e6:0e</div><div>diff --git a/arch/arm/boards/fq-sid1-mx25-noah/extra_commands.c b/arch/arm/boards/fq-sid1-mx25-noah/extra_commands.c</div>
<div>new file mode 100644</div><div>index 0000000..e57c61f</div><div>--- /dev/null</div><div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/extra_commands.c</div><div>@@ -0,0 +1,66 @@</div><div>+/*</div><div>+ * (C) 2012 FQ Ingenieria, Roberto Nibali <<a href="mailto:rnibali@gmail.com">rnibali@gmail.com</a>></div>
<div>+ *</div><div>+ * This program is free software; you can redistribute it and/or</div><div>+ * modify it under the terms of the GNU General Public License as</div><div>+ * published by the Free Software Foundation; either version 2 of</div>
<div>+ * the License, or (at your option) any later version.</div><div>+ *</div><div>+ * This program is distributed in the hope that it will be useful,</div><div>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</div>
<div>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</div><div>+ * GNU General Public License for more details.</div><div>+ *</div><div>+ * You should have received a copy of the GNU General Public License</div>
<div>+ * along with this program; if not, write to the Free Software</div><div>+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,</div><div>+ * MA 02111-1307 USA</div><div>+ *</div><div>+ */</div><div>+</div><div>
+#include <io.h></div>
<div>+#include <common.h></div><div>+#include <command.h></div><div>+#include <mach/imx-regs.h></div><div>+#include <mach/imx-pll.h></div><div>+</div><div>+#define MPCTL_PARAM_399 (IMX_PLL_PD(0) | IMX_PLL_MFD(15) | IMX_PLL_MFI(8) | IMX_PLL_MFN(5))</div>
<div>+#define MPCTL_PARAM_532 ((1 << 31) | IMX_PLL_PD(0) | IMX_PLL_MFD(11) | IMX_PLL_MFI(11) | IMX_PLL_MFN(1))</div><div>+</div><div>+static int do_cpufreq(int argc, char *argv[])</div><div>+{</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* 15.3.3.1<span class="Apple-tab-span" style="white-space:pre"> </span>Core PLL (MPLL) Control Register (MPCTL) */</div>
<div>+ unsigned long freq;</div><div>+</div><div>+ if (argc != 2)</div><div>+ return COMMAND_ERROR_USAGE;</div><div>+</div><div>+ freq = simple_strtoul(argv[1], NULL, 0);</div><div>+</div>
<div>+ switch (freq) {</div><div>+ case 399:</div><div>+ writel(MPCTL_PARAM_399, IMX_CCM_BASE + CCM_MPCTL);</div><div>+ break;</div><div>+ case 532:</div><div>+ writel(MPCTL_PARAM_532, IMX_CCM_BASE + CCM_MPCTL);</div>
<div>+ break;</div><div>+ default:</div><div>+ return COMMAND_ERROR_USAGE;</div><div>+ }</div><div>+</div><div>+ printf("Switched CPU frequency to %ldMHz\n", freq);</div>
<div>+</div><div>+ return 0;</div><div>+}</div><div>+</div><div>+static const __maybe_unused char cmd_cpufreq_help[] =</div><div>+"Usage: cpufreq 399|532\n"</div><div>+"\n"</div><div>+"Set CPU frequency to <freq> MHz\n";</div>
<div>+</div><div>+BAREBOX_CMD_START(cpufreq)</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.cmd = do_cpufreq,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.usage = "adjust CPU frequency",</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>BAREBOX_CMD_HELP(cmd_cpufreq_help)</div><div>+BAREBOX_CMD_END</div><div>+</div><div>diff --git a/arch/arm/boards/fq-sid1-mx25-noah/flash_header.c b/arch/arm/boards/fq-sid1-mx25-noah/flash_header.c</div>
<div>new file mode 100644</div><div>index 0000000..982fc52</div><div>--- /dev/null</div><div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/flash_header.c</div><div>@@ -0,0 +1,88 @@</div><div>+#include <common.h></div><div>
+#include <mach/imx-flash-header.h></div><div>+#include <mach/imx-regs.h></div><div>+#include <asm/barebox-arm-head.h></div><div>+</div><div>+extern void exception_vectors(void);</div><div>+</div><div>+void __naked __flash_header_start go(void)</div>
<div>+{</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>barebox_arm_head();</div><div>+}</div><div>+</div><div>+/*</div><div>+ The Flash header is a data structure that the boot code reads from</div>
<div>+ Flash which provides information about the application. The Flash</div><div>+ header must be located at a known fixed address depending on the</div><div>+ type of external Flash device connected to i.MX25. The Flash header</div>
<div>+ is only required when an internal boot mode is selected from</div><div>+ BOOT_MODE[0:1]. The required offsets of the Flash header for each</div><div>+ device type are described in Table 7-10.</div><div>+</div>
<div>+ NOR: <span class="Apple-tab-span" style="white-space:pre"> </span> 4 Kbyte = 0x1000 bytes</div><div>+ NAND:<span class="Apple-tab-span" style="white-space:pre"> </span> 1 Kbyte = 0x400 bytes</div><div>+ OneNAND: <span class="Apple-tab-span" style="white-space:pre"> </span>256 bytes = 0x100 bytes</div>
<div>+ SD/eSD/MMC/eMMC: <span class="Apple-tab-span" style="white-space:pre"> </span> 1 kbyte = 0x400 bytes</div><div>+ I2C/CSPI EEPROM: <span class="Apple-tab-span" style="white-space:pre"> </span> 1 kbyte = 0x400 bytes</div>
<div>+</div><div>+ The above flash header offsets are set accordingly in:</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>arch/arm/mach-imx/include/mach/imx-flash-header.h</div><div>+</div><div>
+ TEXT_BASE = 0x83F00000</div>
<div>+ IMX_CS0_BASE = 0xA0000000</div><div>+ #if INTERNAL_BOOT</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>DEST_BASE = IMX_CS0_BASE</div><div>+ #else</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>DEST_BASE = TEXT_BASE</div>
<div>+ #endif</div><div>+ FLASH_HEADER_BASE = (DEST_BASE + FLASH_HEADER_OFFSET)</div><div>+ */</div><div>+</div><div>+struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* NOR flash, CS0_CSCRU, CS0_CSCRL, CS0_CSCRA */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0xB8002000, .val = 0x0000D003, },</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0xB8002004, .val = 0x00330D01, },</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0xB8002008, .val = 0x00220800, },</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* DDR2 init */</div><div>
+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0xb8001004, .val = 0x0076e83a, }, /* initial value for ESDCFG0 */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0xb8001010, .val = 0x00000204, }, /* ESD_MISC */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0xb8001000, .val = 0x92210000, }, /* CS0 precharge command */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0x80000f00, .val = 0x12344321, }, /* precharge all dummy write */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0xb8001000, .val = 0xb2210000, }, /* Load Mode Register command */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 1, .addr = 0x82000000, .val = 0xda, },<span class="Apple-tab-span" style="white-space:pre"> </span> /* dummy write Load EMR2 */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 1, .addr = 0x83000000, .val = 0xda, },<span class="Apple-tab-span" style="white-space:pre"> </span> /* dummy write Load EMR3 */</div><div>
+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 1, .addr = 0x81000400, .val = 0xda, },<span class="Apple-tab-span" style="white-space:pre"> </span> /* dummy write Load EMR1; enable DLL */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 1, .addr = 0x80000333, .val = 0xda, },<span class="Apple-tab-span" style="white-space:pre"> </span> /* dummy write Load MR; reset DLL */</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0xb8001000, .val = 0x92210000, }, /* CS0 precharge command */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0x80000400, .val = 0x12345678, }, /* precharge all dummy write */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0xb8001000, .val = 0xA2210000, }, /* select manual refresh mode */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0x80000000, .val = 0x87654321, }, /* manual refresh */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0x80000000, .val = 0x87654321, }, /* manual refresh twice */</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0xb8001000, .val = 0xb2210000, }, /* Load Mode Register command */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 1, .addr = 0x80000233, .val = 0xda, },<span class="Apple-tab-span" style="white-space:pre"> </span> /* Load MR; CL=3, BL=8, end DLL reset */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 1, .addr = 0x81000780, .val = 0xda, },<span class="Apple-tab-span" style="white-space:pre"> </span> /* Load EMR1; OCD default */</div><div>
+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 1, .addr = 0x81000400, .val = 0xda, },<span class="Apple-tab-span" style="white-space:pre"> </span> /* Load EMR1; OCD exit */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0xb8001000, .val = 0x82216080, }, /* normal mode */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* IOMUX_SW_PAD setup */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0x43FAC454, .val = 0x00001000, }, /* IOMUXC_SW_PAD_CTL_GRP_DDRTYPE(1-5) */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0x43FAC448, .val = 0x00002000, }, /* IOMUXC_SW_PAD NFC voltage 1.8 */</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* CLKCTL */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{ .ptr_type = 4, .addr = 0x53f80008, .val = 0x20034000, }, /* CLKCTL ARM=399 AHB=133 */</div><div>+};</div><div>+</div><div>+struct imx_flash_header __flash_header_section flash_header = {</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.app_code_jump_vector<span class="Apple-tab-span" style="white-space:pre"> </span>= DEST_BASE + ((unsigned int)&exception_vectors - TEXT_BASE),</div>
<div>
+<span class="Apple-tab-span" style="white-space:pre"> </span>.app_code_barker<span class="Apple-tab-span" style="white-space:pre"> </span>= APP_CODE_BARKER,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.app_code_csf<span class="Apple-tab-span" style="white-space:pre"> </span>= 0, /* non-secure boot (table 7-11) */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.dcd_ptr_ptr<span class="Apple-tab-span" style="white-space:pre"> </span>= FLASH_HEADER_BASE + offsetof(struct imx_flash_header, dcd),</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.super_root_key<span class="Apple-tab-span" style="white-space:pre"> </span>= 0, /* non-secure boot (table 7-11) */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.dcd<span class="Apple-tab-span" style="white-space:pre"> </span>= FLASH_HEADER_BASE + offsetof(struct imx_flash_header, dcd_barker),</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.app_dest<span class="Apple-tab-span" style="white-space:pre"> </span>= DEST_BASE,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.dcd_barker<span class="Apple-tab-span" style="white-space:pre"> </span>= DCD_BARKER,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.dcd_block_len<span class="Apple-tab-span" style="white-space:pre"> </span>= sizeof(dcd_entry),</div>
<div>+};</div><div>+</div><div>+unsigned long __image_len_section barebox_len = DCD_BAREBOX_SIZE;</div><div>diff --git a/arch/arm/boards/fq-sid1-mx25-noah/lowlevel.c b/arch/arm/boards/fq-sid1-mx25-noah/lowlevel.c</div><div>
new file mode 100644</div><div>index 0000000..04ece36</div><div>--- /dev/null</div><div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/lowlevel.c</div><div>@@ -0,0 +1,188 @@</div><div>+/*</div><div>+ *</div><div>+ * (c) 2011 Pengutronix, Sascha Hauer <<a href="mailto:s.hauer@pengutronix.de">s.hauer@pengutronix.de</a>></div>
<div>+ *</div><div>+ * See file CREDITS for list of people who contributed to this</div><div>+ * project.</div><div>+ *</div><div>+ * This program is free software; you can redistribute it and/or</div><div>+ * modify it under the terms of the GNU General Public License as</div>
<div>+ * published by the Free Software Foundation; either version 2 of</div><div>+ * the License, or (at your option) any later version.</div><div>+ *</div><div>+ * This program is distributed in the hope that it will be useful,</div>
<div>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</div><div>+ * GNU General Public License for more details.</div><div>+ *</div>
<div>+ * You should have received a copy of the GNU General Public License</div><div>+ * along with this program; if not, write to the Free Software</div><div>+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,</div>
<div>+ * MA 02111-1307 USA</div><div>+ */</div><div>+#include <common.h></div><div>+#include <init.h></div><div>+#include <mach/imx-regs.h></div><div>+#include <mach/esdctl.h></div><div>+#include <io.h></div>
<div>+#include <mach/imx-nand.h></div><div>+#include <asm/barebox-arm.h></div><div>+#include <asm/system.h></div><div>+#include <asm-generic/sections.h></div><div>+#include <asm-generic/memory_layout.h></div>
<div>+</div><div>+#ifdef CONFIG_NAND_IMX_BOOT</div><div>+static void __bare_init __naked insdram(void)</div><div>+{</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>uint32_t r;</div><div>+</div><div>
+<span class="Apple-tab-span" style="white-space:pre"> </span>/* setup a stack to be able to call imx_nand_load_image() */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>r = STACK_BASE + STACK_SIZE - 12;</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>__asm__ __volatile__("mov sp, %0" : : "r"(r));</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>imx_nand_load_image((void *)TEXT_BASE, barebox_image_size);</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>board_init_lowlevel_return();</div><div>+}</div><div>+#endif</div><div>+</div><div>+/* Check 24.3.3.1 and 24.5.4.1.1 */</div><div>+static inline void __bare_init setup_sdram(uint32_t base, uint32_t esdctl,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>uint32_t esdcfg)</div><div>+{</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>uint32_t esdctlreg = ESDCTL0;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>uint32_t esdcfgreg = ESDCFG0;</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>if (base == 0x90000000) {</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>esdctlreg += 8;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>esdcfgreg += 8;</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>esdctl |= ESDCTL0_SDE;</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(esdcfg, esdcfgreg);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(esdctl | ESDCTL0_SMODE_PRECHARGE, esdctlreg);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0, base + 1024);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(esdctl | ESDCTL0_SMODE_AUTO_REFRESH, esdctlreg);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>readb(base);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>readb(base);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(esdctl | ESDCTL0_SMODE_LOAD_MODE, esdctlreg);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writeb(0, base + 0x33);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(esdctl, esdctlreg);</div><div>+}</div><div>+</div><div>+void __bare_init __naked board_init_lowlevel(void)</div><div>+{</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>uint32_t r;</div>
<div>+#ifdef CONFIG_NAND_IMX_BOOT</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>unsigned int *trg, *src;</div><div>+#endif</div><div>+</div><div>+ /* restart the MPLL and wait until it's stable */</div>
<div>+ writel(readl(IMX_CCM_BASE + CCM_CCTL) | (1 << 27),</div><div>+ IMX_CCM_BASE + CCM_CCTL);</div><div>+ while (readl(IMX_CCM_BASE + CCM_CCTL) & (1 << 27)) {};</div>
<div>+</div><div>+ /* Configure dividers and ARM clock source</div><div>+ * ARM @ 400 MHz</div><div>+ * AHB @ 133 MHz</div><div>+ */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x20034000, IMX_CCM_BASE + CCM_CCTL);</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* Set up 16bit NOR flash on WEIM CS0 */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x0000D003, 0xB8002000);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x00330D01, 0xB8002004);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x00220800, 0xB8002008);</div><div>+</div>
<div>
+<span class="Apple-tab-span" style="white-space:pre"> </span>/* AIPS setup - Only setup MPROTx registers. The PACR default values are good.</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * Set all MPROTx to be non-bufferable, trusted for R/W,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * not forced to user-mode.</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x77777777, 0x43f00000);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x77777777, 0x43f00004);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x77777777, 0x53f00000);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x77777777, 0x53f00004);</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* MAX (Multi-Layer AHB Crossbar Switch) setup</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * MPR - priority for MX25 is (SDHC2/SDMA)>USBOTG>RTIC>IAHB>DAHB</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x00043210, 0x43f04000);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x00043210, 0x43f04100);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x00043210, 0x43f04200);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x00043210, 0x43f04300);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x00043210, 0x43f04400);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* SGPCR - always park on last master */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x10, 0x43f04010);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x10, 0x43f04110);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x10, 0x43f04210);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x10, 0x43f04310);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x10, 0x43f04410);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* MGPCR - restore default values */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x0, 0x43f04800);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x0, 0x43f04900);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x0, 0x43f04a00);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x0, 0x43f04b00);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x0, 0x43f04c00);</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* Configure M3IF registers</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * M3IF Control Register (M3IFCTL) for MX25</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * MRRP[0] = LCDC on priority list (1 << 0) = 0x00000001</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * MRRP[1] = MAX1 not on priority list (0 << 1) = 0x00000000</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * MRRP[2] = MAX0 not on priority list (0 << 2) = 0x00000000</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * MRRP[3] = USB HOST not on priority list (0 << 3) = 0x00000000</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * MRRP[4] = SDMA not on priority list (0 << 4) = 0x00000000</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * MRRP[5] = SD/ATA/FEC not on priority list (0 << 5) = 0x00000000</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * MRRP[6] = SCMFBC not on priority list (0 << 6) = 0x00000000</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * MRRP[7] = CSI not on priority list (0 << 7) = 0x00000000</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * ----------</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * 0x00000001</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x1, 0xb8003000);</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* enable all the clocks */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x1fffffff, IMX_CCM_BASE + CCM_CGCR0);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0xffffffff, IMX_CCM_BASE + CCM_CGCR1);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x000fdfff, IMX_CCM_BASE + CCM_CGCR2);</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* Set DDR2 and NFC group driver voltages */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x1000, IMX_IOMUXC_BASE + 0x454);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x2000, IMX_IOMUXC_BASE + 0x448);</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* Skip SDRAM initialization if we run from RAM */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>r = get_pc();</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>if (r > 0x80000000 && r < 0x90000000)</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>board_init_lowlevel_return();</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(ESDMISC_RST, ESDMISC);</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>while (!(readl(ESDMISC) & (1 << 31)));</div>
<div>+</div><div>+#define ESDCTLVAL<span class="Apple-tab-span" style="white-space:pre"> </span>(ESDCTL0_ROW13 | ESDCTL0_COL9 |<span class="Apple-tab-span" style="white-space:pre"> </span>ESDCTL0_DSIZ_15_0 | \</div><div>
+<span class="Apple-tab-span" style="white-space:pre"> </span> ESDCTL0_REF4 | ESDCTL0_PWDT_PRECHARGE_PWDN | ESDCTL0_BL)</div>
<div>+#define ESDCFGVAL<span class="Apple-tab-span" style="white-space:pre"> </span>(ESDCFGx_tRP_3 | ESDCFGx_tMRD_2 | ESDCFGx_tRAS_6 | \</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> ESDCFGx_tRRD_2 | ESDCFGx_tCAS_3 | ESDCFGx_tRCD_3 | \</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> ESDCFGx_tRC_9)</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>setup_sdram(0x80000000, ESDCTLVAL, ESDCFGVAL);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>setup_sdram(0x90000000, ESDCTLVAL, ESDCFGVAL);</div><div>+</div><div>+#ifdef CONFIG_NAND_IMX_BOOT</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* skip NAND boot if not running from NFC space */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>r = get_pc();</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>if (r < IMX_NFC_BASE || r > IMX_NFC_BASE + 0x800)</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>board_init_lowlevel_return();</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>src = (unsigned int *)IMX_NFC_BASE;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>trg = (unsigned int *)TEXT_BASE;</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* Move ourselves out of NFC SRAM */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>for (i = 0; i < 0x800 / sizeof(int); i++)</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>*trg++ = *src++;</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* Jump to SDRAM */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>r = (unsigned int)&insdram;</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>__asm__ __volatile__("mov pc, %0" : : "r"(r));</div><div>+#else</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>board_init_lowlevel_return();</div>
<div>+#endif</div><div>+}</div><div>diff --git a/arch/arm/boards/fq-sid1-mx25-noah/sid1_noah.c b/arch/arm/boards/fq-sid1-mx25-noah/sid1_noah.c</div><div>new file mode 100644</div><div>index 0000000..239d72a</div><div>--- /dev/null</div>
<div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/sid1_noah.c</div><div>@@ -0,0 +1,377 @@</div><div>+/*</div><div>+ * (C) 2012 FQ Ingenieria, Roberto Nibali <<a href="mailto:rnibali@gmail.com">rnibali@gmail.com</a>></div>
<div>+ *</div><div>+ * This program is free software; you can redistribute it and/or</div><div>+ * modify it under the terms of the GNU General Public License as</div><div>+ * published by the Free Software Foundation; either version 2 of</div>
<div>+ * the License, or (at your option) any later version.</div><div>+ *</div><div>+ * This program is distributed in the hope that it will be useful,</div><div>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</div>
<div>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</div><div>+ * GNU General Public License for more details.</div><div>+ *</div><div>+ * You should have received a copy of the GNU General Public License</div>
<div>+ * along with this program; if not, write to the Free Software</div><div>+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,</div><div>+ * MA 02111-1307 USA</div><div>+ *</div><div>+ */</div><div>+</div><div>
+#include <io.h></div>
<div>+#include <sizes.h></div><div>+#include <common.h></div><div>+#include <command.h></div><div>+#include <init.h></div><div>+#include <environment.h></div><div>+#include <partition.h></div>
<div>+#include <driver.h></div><div>+#include <fec.h></div><div>+#include <linux/err.h></div><div>+#include <i2c/i2c.h></div><div>+#include <generated/mach-types.h></div><div>+#include <asm/armlinux.h></div>
<div>+#include <asm/mmu.h></div><div>+#include <asm/barebox-arm-head.h></div><div>+#include <asm-generic/sections.h></div><div>+#include <mach/gpio.h></div><div>+#include <mach/iim.h></div><div>
+#include <mach/usb.h></div><div>+#include <mach/imx-regs.h></div><div>+#include <mach/imx-pll.h></div><div>+#include <mach/imx-flash-header.h></div><div>+#include <mach/iomux-mx25.h></div><div>
+#include <mach/generic.h></div><div>+#include <mach/devices-imx25.h></div><div>+</div><div>+/* The currently used MOSFET IRLMLL6402 needs</div><div>+ 3.3V driver voltage to function, however the</div><div>
+ basic GPIO driver voltage is 1.8V, which is</div>
<div>+ not sufficient, unless the MOSFET switches</div><div>+ starting from VGS > 1.5V.</div><div>+ */</div><div>+#define MX25_PAD_CS1__GPIO_4_3_DVS IOMUX_PAD(0x000, 0x050, 0x05, 0, 0, NO_PAD_CTRL | PAD_CTL_DVS)</div>
<div>+</div><div>+static struct fec_platform_data fec_info = {</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.xcv_type<span class="Apple-tab-span" style="white-space:pre"> </span>= RMII,</div><div>
+<span class="Apple-tab-span" style="white-space:pre"> </span>.phy_addr<span class="Apple-tab-span" style="white-space:pre"> </span>= 1,</div><div>+};</div><div>+</div><div>+#ifdef CONFIG_USB</div><div>+static void imx25_usb_init(void)</div>
<div>+{</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>uint32_t reg;</div><div>+</div><div>+ /* Host 1 */</div><div>+ reg = readl(IMX_OTG_BASE + 0x600);</div><div>+ reg &= ~(MX35_H1_SIC_MASK | MX35_H1_PM_BIT | MX35_H1_TLL_BIT |</div>
<div>+ MX35_H1_USBTE_BIT | MX35_H1_IPPUE_DOWN_BIT | MX35_H1_IPPUE_UP_BIT);</div><div>+ reg |= (MXC_EHCI_INTERFACE_SINGLE_UNI) << MX35_H1_SIC_SHIFT;</div><div>+ reg |= MX35_H1_USBTE_BIT;</div>
<div>+ reg |= MX35_H1_IPPUE_DOWN_BIT;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(reg, IMX_OTG_BASE + 0x600);</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>reg = readl(IMX_OTG_BASE + 0x584);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>reg |= 3 << 30;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(reg, IMX_OTG_BASE + 0x584);</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* Set to Host mode */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>reg = readl(IMX_OTG_BASE + 0x5a8);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(reg | 0x3, IMX_OTG_BASE + 0x5a8);</div>
<div>
+}</div><div>+#endif</div><div>+</div><div>+/*</div><div>+static struct at24_platform_data board_eeprom = {</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.byte_len = 65536,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.page_size = 128,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.flags = AT24_FLAG_ADDR16,</div><div>+};</div><div>+*/</div><div>+</div><div>+static struct i2c_board_info i2c_devices[] = {</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>I2C_BOARD_INFO("at24", 0x50),</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>//.platform_data = &board_eeprom,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>},</div><div>+};</div><div>+</div><div>+#if 0</div><div>+struct gpio_led noah_leds[] = {</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>{</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.led = { .name = "GPIO-LED", },</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.gpio = IMX_GPIO_NR(4, 10),</div><div>
+<span class="Apple-tab-span" style="white-space:pre"> </span>.active_low = 1,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>},</div><div>+};</div><div>+</div><div>+static void noah_leds_init(void)</div>
<div>+{</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>int i;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>for (i = 0; i < ARRAY_SIZE(noah_leds); i++)</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>led_gpio_register(&noah_leds[i]);</div>
<div>+}</div><div>+#endif</div><div>+</div><div>+#define MX25_NOAH_BOOT_UNKNOWN<span class="Apple-tab-span" style="white-space:pre"> </span>0</div><div>+#define MX25_NOAH_BOOT_NOR<span class="Apple-tab-span" style="white-space:pre"> </span>1</div>
<div>+#define MX25_NOAH_BOOT_MMC<span class="Apple-tab-span" style="white-space:pre"> </span>2</div><div>+static int noah_read_ccm_regs(void) {</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>uint32_t reg;</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* 15.3.3.12<span class="Apple-tab-span" style="white-space:pre"> </span>CCM Reset and Debug Register (CRDR) </div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>*/</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>reg = readl(IMX_CCM_BASE + CCM_CRDR);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>printf("%s: CCM CRDR = %08X\n", __func__, reg);</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* 15.3.3.11<span class="Apple-tab-span" style="white-space:pre"> </span>CCM Status Register (RCSR)</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>if (readl(IMX_CCM_BASE + CCM_RCSR) & (1 << 14))</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>nand_info.width = 2;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>reg = readl(IMX_CCM_BASE + CCM_RCSR);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>printf("%s: CCM RCSR = %08X\n", __func__, reg);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>if ((reg & (0x3 << 30)) == 0x3 << 30) {</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>printf("%s: Booting from expansion device: ", __func__);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>if ((reg & (0x3 << 28)) == 0x0 << 28) {</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>printf("SD/MMC\n");</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>return MX25_NOAH_BOOT_MMC;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>} else {</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>printf("unknown\n");</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>} else if ((reg & (0x3 << 30)) == 0x0 << 30) {</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>printf("%s: Booting from WEIM: ", __func__);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>if ((reg & (0x3 << 28)) == 0x0 << 28) {</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>printf("NOR\n");</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>return MX25_NOAH_BOOT_NOR;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>} else {</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>printf("unknown\n");</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>}<span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>return MX25_NOAH_BOOT_UNKNOWN;</div><div>+}</div><div>+</div><div>+#ifdef CONFIG_DRIVER_VIDEO_IMX</div><div>+static struct imx_fb_videomode imxfb_mode = {</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.mode = {</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.name<span class="Apple-tab-span" style="white-space:pre"> </span>= "Chunghwa CLAA057VA01CT",</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.refresh<span class="Apple-tab-span" style="white-space:pre"> </span>= 60,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.xres<span class="Apple-tab-span" style="white-space:pre"> </span>= 640,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.yres<span class="Apple-tab-span" style="white-space:pre"> </span>= 480,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.pixclock<span class="Apple-tab-span" style="white-space:pre"> </span>= KHZ2PICOS(25600),</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.left_margin<span class="Apple-tab-span" style="white-space:pre"> </span>= 46,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.right_margin<span class="Apple-tab-span" style="white-space:pre"> </span>= 114,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.upper_margin<span class="Apple-tab-span" style="white-space:pre"> </span>= 34,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.lower_margin<span class="Apple-tab-span" style="white-space:pre"> </span>= 11,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.hsync_len<span class="Apple-tab-span" style="white-space:pre"> </span>= 48,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.vsync_len<span class="Apple-tab-span" style="white-space:pre"> </span>= 3,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>},</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.bpp<span class="Apple-tab-span" style="white-space:pre"> </span>= 16,</div><div>
+<span class="Apple-tab-span" style="white-space:pre"> </span>.pcr<span class="Apple-tab-span" style="white-space:pre"> </span>= 0xFA000080, /* 16bpp: Check 33.3.10 of the IMX25RM: LPCR */</div><div>+};</div><div>+</div>
<div>
+static struct imx_fb_platform_data noah_fb_data = {</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.mode = &imxfb_mode,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.num_modes = 1,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.pwmr = 0x00A903FF,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.lscr1 = 0x00120300,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>.dmacr = 0x00020010,</div>
<div>+};</div><div>+#endif</div><div>+</div><div>+static iomux_v3_cfg_t imx25_pads[] = {</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* FEC RMII */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_FEC_MDC__FEC_MDC, /* Management data clock */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_FEC_MDIO__FEC_MDIO, /* Management data input/output */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_FEC_TX_EN__FEC_TX_EN, /* Transmit enable */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_FEC_RX_DV__FEC_RX_DV, /* Carrier sense / receive data valid */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_FEC_TX_CLK__FEC_TX_CLK, /* Synchronous clock reference (REF_CLK) */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_UART2_CTS__FEC_RX_ER, /* Receive error */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_FEC_RDATA0__FEC_RDATA0, /* Receive data */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_FEC_RDATA1__FEC_RDATA1, /* Receive data */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_FEC_TDATA0__FEC_TDATA0, /* Transmit data */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_FEC_TDATA1__FEC_TDATA1, /* Transmit data */</div><div>+#ifdef CONFIG_DRIVER_SERIAL_IMX</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* UART1 */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_UART1_RXD__UART1_RXD,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_UART1_TXD__UART1_TXD,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_UART1_RTS__UART1_RTS,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_UART1_CTS__UART1_CTS,</div><div>+#endif</div><div>+#ifdef CONFIG_USB</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* USBH2 */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_D9__USBH2_PWR,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_D8__USBH2_OC,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD0__USBH2_CLK,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD1__USBH2_DIR,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD2__USBH2_STP,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD3__USBH2_NXT,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD4__USBH2_DATA0,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD5__USBH2_DATA1,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD6__USBH2_DATA2,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD7__USBH2_DATA3,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_HSYNC__USBH2_DATA4,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_VSYNC__USBH2_DATA5,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LSCLK__USBH2_DATA6,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_OE_ACD__USBH2_DATA7,</div><div>+#endif</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* I2C1 */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_I2C1_CLK__I2C1_CLK,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_I2C1_DAT__I2C1_DAT,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* ESDHC */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/*</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_SD1_CMD__SD1_CMD_NPU,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_SD1_CLK__SD1_CLK_NPU,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_SD1_DATA0__SD1_DATA0_NPU,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_SD1_DATA1__SD1_DATA1_NPU,</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_SD1_DATA2__SD1_DATA2_NPU,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_SD1_DATA3__SD1_DATA3_NPU,</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>*/</div>
<div>+#ifdef CONFIG_DRIVER_VIDEO_IMX</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* LCD */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD0__LD0, /* TFT[19]: Blue[0] (LSB)*/</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD1__LD1, /* TFT[18]: Blue[1] */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD2__LD2, /* TFT[17]: Blue[2] */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD3__LD3, /* TFT[15]: Blue[3] */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD4__LD4, /* TFT[14]: Blue[4] */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD5__LD5, /* TFT[13]: Blue[5] (MSB) */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD6__LD6, /* TFT[27]: Green[0] (LSB) */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD7__LD7, /* TFT[26]: Green[1] */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD8__LD8, /* TFT[25]: Green[2] */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD9__LD9, /* TFT[23]: Green[3] */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD10__LD10, /* TFT[22]: Green[4] */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD11__LD11, /* TFT[21]: Green[5] (MSB) */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD12__LD12, /* TFT[35]: Red[0] (LSB) */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD13__LD13, /* TFT[34]: Red[1] */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD14__LD14, /* TFT[33]: Red[2] */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LD15__LD15, /* TFT[31]: Red[3] */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_GPIO_E__LD16, /* TFT[30]: Red[4] */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_GPIO_F__LD17, /* TFT[29]: Red[5] (MSB) */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_HSYNC__GPIO_1_22, /* TFT[ 3]: LCD_HSYNC */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_VSYNC__GPIO_1_23, /* TFT[ 8]: LCD_VSYNC */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_LSCLK__LSCLK, /* TFT[38]: LCD_LSCLK */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_OE_ACD__OE_ACD, /* TFT[ 9]: LCD_DRDY */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_CONTRAST__PWM4_PWMO, /* TFT[12]: LCD backlight (PWM): */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_CS1__GPIO_4_3_DVS, /* TFT[xx]: LCD_EN */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_EB1__GPIO_2_13, /* TFT[ 1]: LCD_UP_DOWN */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_BCLK__GPIO_4_4, /* TFT[40]: LCD_LEFT_RIGHT */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>MX25_PAD_CSI_D4__GPIO_1_29, /* TFT[ 2]: LCD_DMS */</div>
<div>+#endif</div><div>+};</div><div>+</div><div>+static int noah_fec_init(void)</div><div>+{</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/*</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * Set up the FEC_RESET_B and FEC_ENABLE GPIO pins.</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * Assert FEC_RESET_B, then power up the PHY by asserting</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * FEC_ENABLE, at the same time lifting FEC_RESET_B.</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> *</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * FEC_RESET_B: gpio2[3] is ALT 5 mode of pin A17</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> * FEC_ENABLE_B: gpio4[8] is ALT 5 mode of pin D12</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x8, IMX_IOMUXC_BASE + 0x0238); /* open drain */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>writel(0x0, IMX_IOMUXC_BASE + 0x028C); /* cmos, no pu/pd */</div>
<div>+</div><div>+#define FEC_ENABLE_GPIO<span class="Apple-tab-span" style="white-space:pre"> </span>35</div><div>+#define FEC_RESET_B_GPIO<span class="Apple-tab-span" style="white-space:pre"> </span>104</div><div>+</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* make the pins output */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>gpio_direction_output(FEC_ENABLE_GPIO, 0); /* drop PHY power */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>gpio_direction_output(FEC_RESET_B_GPIO, 0); /* assert reset */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>udelay(2);</div><div>
+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* turn on power & lift reset */</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>gpio_set_value(FEC_ENABLE_GPIO, 1);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>gpio_set_value(FEC_RESET_B_GPIO, 1);</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>return 0;</div><div>+}</div><div>
+late_initcall(noah_fec_init);</div><div>+</div><div>+static int imx25_mem_init(void)</div><div>+{</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* add memory bank to 0x80000000 (barebox_add_memory_bank()) */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>arm_add_mem_device("ram0", IMX_SDRAM_CS0, 64 * 1024 * 1024);</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>return 0;</div>
<div>+}</div><div>+mem_initcall(imx25_mem_init);</div><div>+</div><div>+static int imx25_devices_init(void)</div><div>+{</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>int bootdev;</div><div>+</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>bootdev = noah_read_ccm_regs();<span class="Apple-tab-span" style="white-space:pre"> </span></div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>mxc_iomux_v3_setup_multiple_pads(imx25_pads, ARRAY_SIZE(imx25_pads));</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>imx25_add_i2c0(NULL);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>imx25_add_mmc0(NULL);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>imx25_iim_register_fec_ethaddr();</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>imx25_add_fec(&fec_info);</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>printf("%s: Adding NOR flash device\n", __func__);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* Configure 16 bit nor flash on WEIM cs0 */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>imx25_setup_weimcs(0, 0x0000D003, 0x00330D01, 0x00220800);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* NOR flash starts at CS0 addr 0xA0000000, set to 64MB */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>add_cfi_flash_device(DEVICE_ID_DYNAMIC, IMX_CS0_BASE, SZ_64M, 0);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>printf("%s: Adding initial NOR flash partitions\n", __func__);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>devfs_add_partition("nor0", 0x00000, SZ_512K, PARTITION_FIXED, "self0");</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>devfs_add_partition("nor0", SZ_512K, SZ_512K, PARTITION_FIXED, "env0");</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>//protect_file("/dev/env0", 1);</div><div>+#ifdef CONFIG_USB</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>imx25_usb_init();</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>add_generic_usb_ehci_device(DEVICE_ID_DYNAMIC, IMX_OTG_BASE + 0x400, NULL);</div><div>+#endif</div><div>+#ifdef CONFIG_DRIVER_VIDEO_IMX</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>//imx25_add_fb(&noah_fb_data);</div>
<div>+#endif</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>//noah_leds_init();</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>armlinux_set_bootparams((void *)0x80000100);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>armlinux_set_architecture(MACH_TYPE_MX25_3DS);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>armlinux_set_serial(imx_uid());</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>return 0;</div><div>+}</div><div>+device_initcall(imx25_devices_init);</div><div>+</div><div>+static int imx25_console_init(void)</div><div>+{</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>//imx25_init_lowlevel(800) + imx25_core_setup();</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>imx25_add_uart0();</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>return 0;</div>
<div>+}</div><div>+console_initcall(imx25_console_init);</div><div>+</div><div>+/* Check arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c</div><div>+ for more information, especially with regard to low_level</div><div>
+ setup inside the core_setup part.</div><div>+*/</div><div>+static int imx25_core_setup(void)</div><div>+{</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>uint32_t reg;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* Enable clocks:</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> UART1: 15</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> FEC<span class="Apple-tab-span" style="white-space:pre"> </span>: 23</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> SDHC1: 3/21</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> USB<span class="Apple-tab-span" style="white-space:pre"> </span>: 28 </div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span> I2C<span class="Apple-tab-span" style="white-space:pre"> </span>: 6</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>*/</div><div>
+<span class="Apple-tab-span" style="white-space:pre"> </span>reg = readl(IMX_CCM_BASE + CCM_CGCR0);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>reg |= (1 << 6) | (1 << 23) | (1 << 15) | (1 << 21) | (1 << 3) | (1 << 28);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>reg = writel(reg, IMX_CCM_BASE + CCM_CGCR0);</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>reg = readl(IMX_CCM_BASE + CCM_CGCR1);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>reg |= (1 << 23) | (1 << 15) | (1 << 13);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>reg = writel(reg, IMX_CCM_BASE + CCM_CGCR1);</div>
<div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>reg = readl(IMX_CCM_BASE + CCM_CGCR2);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>reg |= (1 << 14);</div><div>
+<span class="Apple-tab-span" style="white-space:pre"> </span>reg = writel(reg, IMX_CCM_BASE + CCM_CGCR2);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* CCM clocks: PER_12 -- PER_15 (15.3.3.10) */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>//writel(0x03010101, IMX_CCM_BASE + CCM_PCDR3);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* CCM clocks: PER_8 -- PER_11 (15.3.3.9) */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>//writel(0x01010103, IMX_CCM_BASE + CCM_PCDR2);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>return 0;</div><div>+</div><div>+}</div>
<div>+core_initcall(imx25_core_setup);</div><div>diff --git a/arch/arm/boards/fq-sid1-mx25-noah/sid1_noah.dox b/arch/arm/boards/fq-sid1-mx25-noah/sid1_noah.dox</div><div>new file mode 100644</div><div>index 0000000..8b0e28a</div>
<div>--- /dev/null</div><div>+++ b/arch/arm/boards/fq-sid1-mx25-noah/sid1_noah.dox</div><div>@@ -0,0 +1,79 @@</div><div>+/** @page SID1 (FQ Ingeniería)</div><div>+</div><div>+This device is also known as "NOAH" (<a href="http://www.fqingenieria.es/">http://www.fqingenieria.es/</a>)</div>
<div>+</div><div>+This CPU card is based on a Freescale i.MX25 CPU. The card is shipped with:</div><div>+</div><div>+- 64 MiB synchronous dynamic RAM (DDR type)</div><div>+- 4 SIM/SAM sockets</div><div>+- USB OTG</div>
<div>
+- ...</div><div>+</div><div>+Memory layout when @b barebox is running:</div><div>+</div><div>+- 0x80000000 start of SDRAM (IMX_SDRAM_CS0)</div><div>+- 0x80000100 start of kernel's boot parameters</div><div>+ - below malloc area: stack area</div>
<div>+ - below barebox: malloc area</div><div>+- 0x82000000 start of @b barebox</div><div>+</div><div>+@section get_sid1_noah_binary How to get the bootloader binary image:</div><div>+</div><div>+Using the default configuration:</div>
<div>+</div><div>+@verbatim</div><div>+make ARCH=arm noah_defconfig</div><div>+@endverbatim</div><div>+</div><div>+Build the bootloader binary image:</div><div>+</div><div>+@verbatim</div><div>+make ARCH=arm CROSS_COMPILE=armv5compiler</div>
<div>+@endverbatim</div><div>+</div><div>+@note replace the armv5compiler with your ARM v5 cross compiler.</div><div>+</div><div>+@section setup_falconwing How to prepare an MCI card to boot the "chumby one" with barebox</div>
<div>+</div><div>+- Create four primary partitions on the SD card</div><div>+ - the second one for the persistant environment (512 kiB, at least 256k)</div><div>+ - the third one for the kernel (3 MiB ... 4 MiB in size)</div>
<div>+ - the fourth one for the root filesystem which can fill the rest of the available space</div><div>+</div><div>+- Copy the default @b barebox environment into the second partition (no filesystem required).</div><div>
+</div><div>+- Copy the kernel into the third partition (no filesystem required).</div><div>+</div><div>+- Create the root filesystem in the 4th partition. You may copy an image into this</div><div>+ partition or you can do it in the classic way: mkfs on it, mount it and copy</div>
<div>+ all required data and programs into it.</div><div>+</div><div>+@section gpio_falconwing Available GPIOs</div><div>+</div><div>+The SID1 NOAH uses some GPIOs to control various features. With the regular</div><div>
+GPIO commands these features can be controlled at @a barebox's runtime.</div><div>+</div><div>+<table width="100%" border="1" cellspacing="1" cellpadding="3"></div><div>
+ <tr></div>
<div>+ <td>No</td></div><div>+ <td>Direction</td></div><div>+ <td>Function</td></div><div>+ <td>Reset</td></div>
<div>
+ <td>Set</td></div><div>+ </tr></div><div>+ <tr></div><div>+ <td>60</td></div><div>+ <td>Output</td></div><div>+ <td>Display Backlight</td></div>
<div>+ <td>Backlight<br>Off</td></div><div>+ <td>Backlight<br>On (100 %)</td></div><div>+ </tr></div><div>+ <tr></div><div>+ <td>62</td></div>
<div>+ <td>Input</td></div><div>+ <td>Bend</td></div><div>+ <td>Not pressed</td></div><div>+ <td>Pressed</td></div>
<div>+ </tr></div><div>+</table></div><div>+*/</div><div>diff --git a/arch/arm/configs/noah_defconfig b/arch/arm/configs/noah_defconfig</div><div>new file mode 100644</div><div>index 0000000..152f0bf</div>
<div>--- /dev/null</div><div>+++ b/arch/arm/configs/noah_defconfig</div><div>@@ -0,0 +1,97 @@</div><div>+CONFIG_ARCH_IMX=y</div><div>+CONFIG_ARCH_IMX_EXTERNAL_BOOT=y</div><div>+CONFIG_ARCH_IMX25=y</div><div>+CONFIG_MACH_MX25_NOAH=y</div>
<div>+CONFIG_IMX_CLKO=y</div><div>+CONFIG_IMX_IIM=y</div><div>+CONFIG_AEABI=y</div><div>+CONFIG_ARM_UNWIND=y</div><div>+CONFIG_MMU=y</div><div>+CONFIG_BROKEN=y</div><div>+CONFIG_EXPERIMENTAL=y</div><div>+CONFIG_PROMPT="sid1-noah:"</div>
<div>+CONFIG_LONGHELP=y</div><div>+CONFIG_GLOB=y</div><div>+CONFIG_CMDLINE_EDITING=y</div><div>+CONFIG_AUTO_COMPLETE=y</div><div>+CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y</div><div>+CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/fq-sid1-mx25-noah/env"</div>
<div>+CONFIG_BAREBOXENV_TARGET=y</div><div>+CONFIG_ENABLE_FLASH_NOISE=y</div><div>+CONFIG_ENABLE_PARTITION_NOISE=y</div><div>+CONFIG_ENABLE_DEVICE_NOISE=y</div><div>+CONFIG_CMD_EDIT=y</div><div>+CONFIG_CMD_SLEEP=y</div><div>
+CONFIG_CMD_SAVEENV=y</div><div>+CONFIG_CMD_EXPORT=y</div><div>+CONFIG_CMD_PRINTENV=y</div><div>+CONFIG_CMD_READLINE=y</div><div>+CONFIG_CMD_TIME=y</div><div>+CONFIG_CMD_AUTOMOUNT=y</div><div>+CONFIG_CMD_ECHO_E=y</div><div>
+CONFIG_CMD_LOADB=y</div><div>+CONFIG_CMD_LOADY=y</div><div>+CONFIG_CMD_LOADS=y</div><div>+CONFIG_CMD_SAVES=y</div><div>+CONFIG_CMD_MEMINFO=y</div><div>+CONFIG_CMD_IOMEM=y</div><div>+CONFIG_CMD_MD5SUM=y</div><div>+CONFIG_CMD_SHA1SUM=y</div>
<div>+CONFIG_CMD_SHA256SUM=y</div><div>+CONFIG_CMD_SHA224SUM=y</div><div>+CONFIG_CMD_MTEST=y</div><div>+CONFIG_CMD_MTEST_ALTERNATIVE=y</div><div>+CONFIG_CMD_FLASH=y</div><div>+CONFIG_CMD_BOOTM_SHOW_TYPE=y</div><div>+CONFIG_CMD_BOOTM_VERBOSE=y</div>
<div>+CONFIG_CMD_BOOTM_INITRD=y</div><div>+CONFIG_CMD_BOOTM_OFTREE=y</div><div>+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y</div><div>+CONFIG_CMD_UIMAGE=y</div><div>+CONFIG_CMD_RESET=y</div><div>+CONFIG_CMD_GO=y</div><div>+CONFIG_CMD_OFTREE=y</div>
<div>+CONFIG_CMD_TIMEOUT=y</div><div>+CONFIG_CMD_PARTITION=y</div><div>+CONFIG_CMD_MAGICVAR=y</div><div>+CONFIG_CMD_MAGICVAR_HELP=y</div><div>+CONFIG_CMD_BMP=y</div><div>+CONFIG_CMD_GPIO=y</div><div>+CONFIG_CMD_UNCOMPRESS=y</div>
<div>+CONFIG_CMD_I2C=y</div><div>+CONFIG_CMD_LED=y</div><div>+CONFIG_NET=y</div><div>+CONFIG_NET_DHCP=y</div><div>+CONFIG_NET_NFS=y</div><div>+CONFIG_NET_PING=y</div><div>+CONFIG_NET_TFTP=y</div><div>+CONFIG_NET_TFTP_PUSH=y</div>
<div>+CONFIG_NET_NETCONSOLE=y</div><div>+CONFIG_NET_RESOLV=y</div><div>+CONFIG_DRIVER_NET_FEC_IMX=y</div><div>+CONFIG_DRIVER_SPI_IMX=y</div><div>+CONFIG_I2C=y</div><div>+CONFIG_I2C_IMX=y</div><div>+CONFIG_DRIVER_CFI=y</div>
<div>+# CONFIG_DRIVER_CFI_BANK_WIDTH_1 is not set</div><div>+# CONFIG_DRIVER_CFI_BANK_WIDTH_4 is not set</div><div>+CONFIG_MTD=y</div><div>+CONFIG_USB=y</div><div>+CONFIG_USB_EHCI=y</div><div>+CONFIG_USB_OHCI=y</div><div>
+CONFIG_USB_STORAGE=y</div><div>+CONFIG_VIDEO=y</div><div>+CONFIG_DRIVER_VIDEO_IMX=y</div><div>+CONFIG_MCI=y</div><div>+CONFIG_MCI_STARTUP=y</div><div>+CONFIG_MCI_IMX_ESDHC=y</div><div>+CONFIG_LED=y</div><div>+CONFIG_LED_GPIO=y</div>
<div>+CONFIG_EEPROM_AT25=y</div><div>+CONFIG_FS_CRAMFS=y</div><div>+CONFIG_FS_TFTP=y</div><div>+CONFIG_FS_FAT=y</div><div>+CONFIG_FS_FAT_WRITE=y</div><div>+CONFIG_FS_FAT_LFN=y</div><div>+CONFIG_BZLIB=y</div><div>+CONFIG_LZO_DECOMPRESS=y</div>
<div>diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig</div><div>index 3236762..839de09 100644</div><div>--- a/arch/arm/mach-imx/Kconfig</div><div>+++ b/arch/arm/mach-imx/Kconfig</div><div>@@ -23,6 +23,7 @@ config ARCH_TEXT_BASE</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span>default 0x7ff00000 if MACH_MX53_SMD</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>default 0x87f00000 if MACH_GUF_CUPID</div><div>
<span class="Apple-tab-span" style="white-space:pre"> </span>default 0x93d00000 if MACH_TX25</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>default 0x83f00000 if MACH_MX25_NOAH</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>default 0x7ff00000 if MACH_TQMA53</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span>default 0x97f00000 if MACH_TX51</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>default 0x4fc00000 if MACH_MX6Q_ARM2</div><div>@@ -47,6 +48,7 @@ config BOARDINFO</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span>default "Freescale i.MX53 SMD" if MACH_FREESCALE_MX53_SMD</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>default "Garz+Fricke Cupid" if MACH_GUF_CUPID</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span>default "Ka-Ro tx25" if MACH_TX25</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>default "SID1 NOAH" if MACH_MX25_NOAH</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span>default "TQ tqma53" if MACH_TQMA53</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>default "Ka-Ro tx51" if MACH_TX51</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span>default "Freescale i.MX6q armadillo2" if MACH_MX6Q_ARM2</div><div>@@ -251,6 +253,12 @@ config MACH_TX25</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>help</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span> Say Y here if you are using the Ka-Ro tx25 board</div><div> </div><div>+config MACH_MX25_NOAH</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>bool "SID1 NOAH"</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>select MACH_HAS_LOWLEVEL_INIT</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>help</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> Say Y here if you are using the SID1 NOAH board</div>
<div>+</div><div> endchoice</div><div> </div><div> endif</div><div>diff --git a/arch/arm/mach-imx/include/mach/imx25-regs.h b/arch/arm/mach-imx/include/mach/imx25-regs.h</div><div>index 73307c4..8225832 100644</div><div>
--- a/arch/arm/mach-imx/include/mach/imx25-regs.h</div>
<div>+++ b/arch/arm/mach-imx/include/mach/imx25-regs.h</div><div>@@ -72,6 +72,7 @@</div><div> #define CCM_LTR1<span class="Apple-tab-span" style="white-space:pre"> </span>0x44</div><div> #define CCM_LTR2<span class="Apple-tab-span" style="white-space:pre"> </span>0x48</div>
<div> #define CCM_LTR3<span class="Apple-tab-span" style="white-space:pre"> </span>0x4c</div><div>+#define CCM_MCR<span class="Apple-tab-span" style="white-space:pre"> </span>0x64</div><div> </div><div> #define PDR0_AUTO_MUX_DIV(x)<span class="Apple-tab-span" style="white-space:pre"> </span>(((x) & 0x7) << 9)</div>
<div> #define PDR0_CCM_PER_AHB(x)<span class="Apple-tab-span" style="white-space:pre"> </span>(((x) & 0x7) << 12)</div><div>@@ -107,6 +108,22 @@</div><div> #define CSCR_L(x) (WEIM_BASE + 4 + (x) * 0x10)</div>
<div> #define CSCR_A(x) (WEIM_BASE + 8 + (x) * 0x10)</div><div> </div><div>+/* Chip Select Registers */</div><div>+#define IMX_WEIM_BASE WEIM_BASE</div><div>+#define CSxU(x) __REG(IMX_WEIM_BASE + (cs * 0x10) + 0x00) /* Chip Select x Upper Register */</div>
<div>+#define CSxL(x) __REG(IMX_WEIM_BASE + (cs * 0x10) + 0x04) /* Chip Select x Lower Register */</div><div>+#define CSxA(x) __REG(IMX_WEIM_BASE + (cs * 0x10) + 0x08) /* Chip Select x Addition Register */</div><div>+#define EIM __REG(IMX_WEIM_BASE + 0x60) /* WEIM Configuration Register */</div>
<div>+</div><div>+#ifndef __ASSEMBLY__</div><div>+static inline void imx25_setup_weimcs(size_t cs, unsigned upper, unsigned lower, unsigned addional)</div><div>+{</div><div>+ CSxU(cs) = upper;</div><div>+ CSxL(cs) = lower;</div>
<div>+ CSxA(cs) = addional;</div><div>+}</div><div>+#endif /* __ASSEMBLY__ */</div><div>+</div><div> /*</div><div> * Definitions for the clocksource driver</div><div> *</div><div><br></div><div>Thanks and best regards</div>
<div>Roberto </div></div>