<!-- Generator: GNU source-highlight 2.4
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>#
#
# delete "packages/madwifi/madwifi-ng_r1844-20061208.bb"

# delete "packages/madwifi/madwifi-ng_r2100-20070210.bb"

# delete "packages/madwifi/madwifi-ng_r2156-20070225.bb"

# delete "packages/madwifi/madwifi-ng_r2182-20070308.bb"

# delete "packages/madwifi/madwifi-ng_r2187-20070309.bb"

# delete "packages/madwifi/madwifi-ng_r2518-20070626.bb"

# delete "packages/madwifi/madwifi-ng_r2702-20070903.bb"

# add_dir "packages/netbase/netbase/mpc8313e-rdb"

# add_dir "packages/u-boot/u-boot-1.3.2"

# add_file "packages/binutils/binutils-2.17/binutils-2.17.atmel.1.2.6.patch.bz2"
#  content [61afa951e7c1dbe064e1134cfd7c2c4e9f919fb7]

# add_file "packages/binutils/binutils-avr32.inc"
#  content [5bd29b107e09714fb7b1d4bf3f8e6d5196a9ca37]

# add_file "packages/gcc/gcc-4.2.2/901-avr32-no-cond-exec-before-reload-by-default.patch"
#  content [a993a533b9e9b03a015aae1cbf427aa4e7f323e7]

# add_file "packages/gcc/gcc-4.2.2/gcc-4.2.2.atmel.1.0.8.patch.bz2"
#  content [65d3733847d1b916ba3fafcf88127711a6fec8ba]

# add_file "packages/gdb/gdb-avr32.inc"
#  content [7494151dbc5adbc235fbc5181d3392875c7f4e35]

# add_file "packages/linux/linux-omap2-git/beagleboard/usb-timout.patch"
#  content [7acb9cec9859f0c448ef4b56bf2ebd12e8b84c2b]

# add_file "packages/netbase/netbase/mpc8313e-rdb/interfaces"
#  content [2ece41786062e70093a58ef17e23d35ea084c316]

# add_file "packages/u-boot/u-boot-1.3.2/mpc8313e-rdb-autoboot.patch"
#  content [d10d1edb2510c27cbbfca47e962cfc8da45f0788]

# add_file "packages/u-boot/u-boot-1.3.2/mpc8313e-rdb-mtdparts.patch"
#  content [20746984bb1c6ef2789381da1283a8e06a74b0ac]

# add_file "packages/u-boot/u-boot-1.3.2/mpc8313e-rdb-nand.patch"
#  content [64eee6cc9ba75710f130f074b0632df44049ca14]

# patch "MAINTAINERS"
#  from [5556c9277c3381070987310400058abdd5f4c820]
#    to [df1acfac3b7175de3f71ec85623148d285a64116]

# patch "classes/kernel.bbclass"
#  from [8d92c5a7b6420490dd6b3115e8146b3fc0a0f854]
#    to [8ed575119a74e50c5bcb39266997cba3f60792c2]

# patch "conf/distro/angstrom-2008.1.conf"
#  from [6f251e8e8c830f7c3e1ebbed08e46a6c642556d9]
#    to [dd2138b465f663603f99ce6be674dfd46af8c33f]

# patch "conf/distro/include/angstrom-uclibc.inc"
#  from [bd467a8983d81901f98163052c0537bbf2909f15]
#    to [ed3615a8cce5b329c1b4354ca91a98190a64f862]

# patch "conf/machine/mpc8313e-rdb.conf"
#  from [9521bcf148591a9c5c88e316475ce8493488eaf2]
#    to [ca05aff54fbbce7e6178f63cd81e0262c9607193]

# patch "packages/binutils/binutils.inc"
#  from [f448bed26fe1742f47791f2fa478603cc6c038b5]
#    to [ec08872ebf090adf38f8ae73969a35b3cf0f98ae]

# patch "packages/binutils/binutils_2.17.bb"
#  from [22565b10082a0e16f29e89a55311c299acbc31c1]
#    to [99e9c269f46aafaced069158eb736ec2b3c100b9]

# patch "packages/gcc/gcc-4.2.2.inc"
#  from [e1a01a5ff03489319241b841ece209ab4fdcbc72]
#    to [6281a032714b397b43955b47208a1dd89efdd74b]

# patch "packages/gdb/gdb-cross.inc"
#  from [f22b5bdf741d9b9ce7a69086a1b6ff8dc8383420]
#    to [fc0d500641c93bb88bc035f650bb82fd9a102324]

# patch "packages/linux/linux-omap2-git/beagleboard/defconfig"
#  from [ffa35a912f2d6c8016f6ea1d0f7ebb27987a9b28]
#    to [6defc6fa96f79492acbfbaed1cc6553abe5edc13]

# patch "packages/linux/linux-omap2_git.bb"
#  from [c46412b985389cdee793c4670885ae00a0bfc7c3]
#    to [d2df9d873b73d322c1d6a7918ef9c8786b091e48]

# patch "packages/madwifi/madwifi-ng_r3314-20080131.bb"
#  from [aa87cb14b8005f3b927e4701b1ae845bf2099ec2]
#    to [24403394f09cfebacade21edca4dbf1c9fe180ba]

# patch "packages/meta/slugos-packages.bb"
#  from [46c8ac8a7503c5e222ee23a677a92db2e2ea9dcb]
#    to [f62c22f94a5ba8a475afc6d43721c4e29386ca2e]

# patch "packages/opkg/opkg_svn.bb"
#  from [bc27245782ad8e3348db57c3d14c9e75b4f1b404]
#    to [e034851c3a5985b17cbde739bc5bb59a8c69d323]

# patch "packages/u-boot/u-boot_1.3.2.bb"
#  from [8cfd5293c0214179a38b2304fbd10c77a3912aff]
#    to [33ac513192e4695c4ea43a787d866c98c2a011ef]

#   set "packages/binutils/binutils-2.17/binutils-2.17.atmel.1.2.6.patch.bz2"
#  attr "mtn:manual_merge"
# value "true"

#   set "packages/gcc/gcc-4.2.2/gcc-4.2.2.atmel.1.0.8.patch.bz2"
#  attr "mtn:manual_merge"
# value "true"
#
============================================================
# packages/binutils/binutils-2.17/binutils-2.17.atmel.1.2.6.patch.bz2 is binary
============================================================
<font color="#FF6600">--- packages/binutils/binutils-avr32.inc        5bd29b107e09714fb7b1d4bf3f8e6d5196a9ca37</font>
<font color="#009900">+++ packages/binutils/binutils-avr32.inc        5bd29b107e09714fb7b1d4bf3f8e6d5196a9ca37</font>
<font color="#0000FF">@@ -0,0 +1,31 @@</font>
<font color="#009900">+# Extra tasks required when using Atmel's patches to binutils</font>
<font color="#009900">+# See http://avr32linux.org/twiki/bin/view/Main/BinutilsPatches for</font>
<font color="#009900">+# more information</font>
<font color="#009900">+</font>
<font color="#009900">+</font>
<font color="#009900">+do_avr32_reconf () {</font>
<font color="#009900">+        if test ${TARGET_ARCH} == avr32; then</font>
<font color="#009900">+            (cd ${S} &amp;&amp; autoconf-2.13) || die "Error running autoconf"</font>
<font color="#009900">+            for dir in bfd opcodes binutils ld; do</font>
<font color="#009900">+                (cd "${S}/$dir" &amp;&amp;</font>
<font color="#009900">+                 aclocal-1.9 &amp;&amp;</font>
<font color="#009900">+                 autoconf &amp;&amp;</font>
<font color="#009900">+                 automake-1.9 &amp;&amp;</font>
<font color="#009900">+                 autoheader) || die "Error reconfiguring $dir"</font>
<font color="#009900">+            done</font>
<font color="#009900">+        fi</font>
<font color="#009900">+}</font>
<font color="#009900">+</font>
<font color="#009900">+</font>
<font color="#009900">+do_avr32_configure_bfd () {</font>
<font color="#009900">+        if test ${TARGET_ARCH} == avr32; then</font>
<font color="#009900">+            (cd ${B} &amp;&amp; make configure-bfd) || die "Error running 'make configure-bfd'"</font>
<font color="#009900">+            (cd ${B}/bfd &amp;&amp; make headers) || die "Error running 'make headers'"</font>
<font color="#009900">+        fi</font>
<font color="#009900">+}</font>
<font color="#009900">+</font>
<font color="#009900">+</font>
<font color="#009900">+</font>
<font color="#009900">+addtask avr32_reconf after do_patch before do_configure</font>
<font color="#009900">+addtask avr32_configure_bfd after do_configure before do_compile</font>
<font color="#009900">+          </font>
============================================================
<font color="#FF6600">--- packages/gcc/gcc-4.2.2/901-avr32-no-cond-exec-before-reload-by-default.patch        a993a533b9e9b03a015aae1cbf427aa4e7f323e7</font>
<font color="#009900">+++ packages/gcc/gcc-4.2.2/901-avr32-no-cond-exec-before-reload-by-default.patch        a993a533b9e9b03a015aae1cbf427aa4e7f323e7</font>
<font color="#0000FF">@@ -0,0 +1,13 @@</font>
<font color="#009900">+Index: gcc-4.2.2/gcc/config/avr32/avr32.c</font>
<font color="#009900">+===================================================================</font>
<font color="#009900">+--- gcc-4.2.2.orig/gcc/config/avr32/avr32.c        2008-04-08 10:42:47.000000000 +0200</font>
<font color="#009900">++++ gcc-4.2.2/gcc/config/avr32/avr32.c        2008-04-08 10:43:33.000000000 +0200</font>
<font color="#009900">+@@ -161,7 +161,7 @@</font>
<font color="#009900">+ /* Set default target_flags. */</font>
<font color="#009900">+ #undef TARGET_DEFAULT_TARGET_FLAGS</font>
<font color="#009900">+ #define TARGET_DEFAULT_TARGET_FLAGS \</font>
<font color="#009900">+-  (MASK_HAS_ASM_ADDR_PSEUDOS | MASK_MD_REORG_OPTIMIZATION | MASK_COND_EXEC_BEFORE_RELOAD)</font>
<font color="#009900">++  (MASK_HAS_ASM_ADDR_PSEUDOS | MASK_MD_REORG_OPTIMIZATION)</font>
<font color="#009900">+ </font>
<font color="#009900">+ void </font>
<font color="#009900">+ avr32_optimization_options (int level,</font>
============================================================
# packages/gcc/gcc-4.2.2/gcc-4.2.2.atmel.1.0.8.patch.bz2 is binary
============================================================
<font color="#FF6600">--- packages/gdb/gdb-avr32.inc        7494151dbc5adbc235fbc5181d3392875c7f4e35</font>
<font color="#009900">+++ packages/gdb/gdb-avr32.inc        7494151dbc5adbc235fbc5181d3392875c7f4e35</font>
<font color="#0000FF">@@ -0,0 +1,32 @@</font>
<font color="#009900">+# Perform tasks required to use Atmel's AVR32 patches</font>
<font color="#009900">+# See http://avr32linux.org/twiki/bin/view/Main/GDBPatches for more info</font>
<font color="#009900">+</font>
<font color="#009900">+</font>
<font color="#009900">+do_avr32_reconf () {</font>
<font color="#009900">+    if test ${TARGET_ARCH} == "avr32"; then</font>
<font color="#009900">+        (cd ${S} &amp;&amp; autoconf) || \</font>
<font color="#009900">+            die "failure running autoconf in top-level gdb"</font>
<font color="#009900">+</font>
<font color="#009900">+        (cd ${S}/bfd &amp;&amp; autoreconf) || \</font>
<font color="#009900">+            die "failure running autoreconf in bfd/"</font>
<font color="#009900">+</font>
<font color="#009900">+        (cd ${S}/opcodes &amp;&amp; autoreconf) || \</font>
<font color="#009900">+            die "failure running autoreconf in opcodes/"</font>
<font color="#009900">+    fi</font>
<font color="#009900">+</font>
<font color="#009900">+}</font>
<font color="#009900">+</font>
<font color="#009900">+</font>
<font color="#009900">+</font>
<font color="#009900">+do_avr32_configure_bfd () {</font>
<font color="#009900">+    if test ${TARGET_ARCH} == "avr32"; then</font>
<font color="#009900">+        (cd ${B} &amp;&amp; make configure-bfd) || die "Error running configure-bfd"</font>
<font color="#009900">+        (cd ${B}/bfd &amp;&amp; make headers) || \</font>
<font color="#009900">+                die "error running 'make headers' in bfd"</font>
<font color="#009900">+    fi</font>
<font color="#009900">+}</font>
<font color="#009900">+</font>
<font color="#009900">+</font>
<font color="#009900">+addtask avr32_reconf after do_patch before do_configure</font>
<font color="#009900">+addtask avr32_configure_bfd after do_configure before do_compile</font>
<font color="#009900">+</font>
============================================================
<font color="#FF6600">--- packages/linux/linux-omap2-git/beagleboard/usb-timout.patch        7acb9cec9859f0c448ef4b56bf2ebd12e8b84c2b</font>
<font color="#009900">+++ packages/linux/linux-omap2-git/beagleboard/usb-timout.patch        7acb9cec9859f0c448ef4b56bf2ebd12e8b84c2b</font>
<font color="#0000FF">@@ -0,0 +1,11 @@</font>
<font color="#009900">+--- /tmp/ehci-hub.c        2008-04-30 11:41:59.381876290 +0200</font>
<font color="#009900">++++ git/drivers/usb/host/ehci-hub.c        2008-04-30 11:42:20.522875367 +0200</font>
<font color="#009900">+@@ -734,7 +734,7 @@</font>
<font color="#009900">+                          * this bit; seems too long to spin routinely...</font>
<font color="#009900">+                          */</font>
<font color="#009900">+                         retval = handshake(ehci, status_reg,</font>
<font color="#009900">+-                                        PORT_RESET, 0, 750);</font>
<font color="#009900">++                                        PORT_RESET, 0, 1250);</font>
<font color="#009900">+                         if (retval != 0) {</font>
<font color="#009900">+                                 ehci_err (ehci, "port %d reset error %d\n",</font>
<font color="#009900">+                                         wIndex + 1, retval);</font>
============================================================
<font color="#FF6600">--- packages/netbase/netbase/mpc8313e-rdb/interfaces        2ece41786062e70093a58ef17e23d35ea084c316</font>
<font color="#009900">+++ packages/netbase/netbase/mpc8313e-rdb/interfaces        2ece41786062e70093a58ef17e23d35ea084c316</font>
<font color="#0000FF">@@ -0,0 +1,16 @@</font>
<font color="#009900">+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)</font>
<font color="#009900">+ </font>
<font color="#009900">+# The loopback interface</font>
<font color="#009900">+auto lo</font>
<font color="#009900">+iface lo inet loopback</font>
<font color="#009900">+</font>
<font color="#009900">+# Wired interface</font>
<font color="#009900">+auto eth1</font>
<font color="#009900">+iface eth1 inet dhcp</font>
<font color="#009900">+</font>
<font color="#009900">+# Wireless interface</font>
<font color="#009900">+auto ath0</font>
<font color="#009900">+iface ath0 inet static</font>
<font color="#009900">+        address 192.168.99.1</font>
<font color="#009900">+        netmask 255.255.255.0</font>
<font color="#009900">+</font>
============================================================
<font color="#FF6600">--- packages/u-boot/u-boot-1.3.2/mpc8313e-rdb-autoboot.patch        d10d1edb2510c27cbbfca47e962cfc8da45f0788</font>
<font color="#009900">+++ packages/u-boot/u-boot-1.3.2/mpc8313e-rdb-autoboot.patch        d10d1edb2510c27cbbfca47e962cfc8da45f0788</font>
<font color="#0000FF">@@ -0,0 +1,12 @@</font>
<font color="#009900">+diff -urN u-boot-1.3.1.orig/include/configs/MPC8313ERDB.h u-boot-1.3.1/include/configs/MPC8313ERDB.h</font>
<font color="#009900">+--- u-boot-1.3.1.orig/include/configs/MPC8313ERDB.h        2007-12-06 10:21:19.000000000 +0100</font>
<font color="#009900">++++ u-boot-1.3.1/include/configs/MPC8313ERDB.h        2008-01-31 17:38:10.000000000 +0100</font>
<font color="#009900">+@@ -522,7 +522,7 @@</font>
<font color="#009900">+ #define CONFIG_FDTFILE                mpc8313erdb.dtb</font>
<font color="#009900">+ </font>
<font color="#009900">+ #define CONFIG_LOADADDR                200000        /* default location for tftp and bootm */</font>
<font color="#009900">+-#define CONFIG_BOOTDELAY        -1        /* -1 disables auto-boot */</font>
<font color="#009900">++#define CONFIG_BOOTDELAY        3        /* autoboot after 3 seconds     */</font>
<font color="#009900">+ #define CONFIG_BAUDRATE                115200</font>
<font color="#009900">+ </font>
<font color="#009900">+ #define XMK_STR(x)        #x</font>
============================================================
<font color="#FF6600">--- packages/u-boot/u-boot-1.3.2/mpc8313e-rdb-mtdparts.patch        20746984bb1c6ef2789381da1283a8e06a74b0ac</font>
<font color="#009900">+++ packages/u-boot/u-boot-1.3.2/mpc8313e-rdb-mtdparts.patch        20746984bb1c6ef2789381da1283a8e06a74b0ac</font>
<font color="#0000FF">@@ -0,0 +1,35 @@</font>
<font color="#009900">+diff -urN u-boot-1.3.2.orig/include/configs/MPC8313ERDB.h u-boot-1.3.2/include/configs/MPC8313ERDB.h</font>
<font color="#009900">+--- u-boot-1.3.2.orig/include/configs/MPC8313ERDB.h        2008-03-09 16:20:02.000000000 +0100</font>
<font color="#009900">++++ u-boot-1.3.2/include/configs/MPC8313ERDB.h        2008-04-21 19:20:51.000000000 +0200</font>
<font color="#009900">+@@ -179,7 +179,7 @@</font>
<font color="#009900">+ #define CFG_INIT_SP_OFFSET        CFG_GBL_DATA_OFFSET</font>
<font color="#009900">+ </font>
<font color="#009900">+ /* CFG_MONITOR_LEN must be a multiple of CFG_ENV_SECT_SIZE */</font>
<font color="#009900">+-#define CFG_MONITOR_LEN                (256 * 1024)        /* Reserve 256 kB for Mon */</font>
<font color="#009900">++#define CFG_MONITOR_LEN                (384 * 1024)        /* Reserve 384 kB for Mon */</font>
<font color="#009900">+ #define CFG_MALLOC_LEN                (512 * 1024)        /* Reserved for malloc */</font>
<font color="#009900">+ </font>
<font color="#009900">+ /*</font>
<font color="#009900">+@@ -354,6 +354,7 @@</font>
<font color="#009900">+ #define CONFIG_CMD_PING</font>
<font color="#009900">+ #define CONFIG_CMD_DHCP</font>
<font color="#009900">+ #define CONFIG_CMD_I2C</font>
<font color="#009900">++#define CONFIG_CMD_JFFS2</font>
<font color="#009900">+ #define CONFIG_CMD_MII</font>
<font color="#009900">+ #define CONFIG_CMD_DATE</font>
<font color="#009900">+ #define CONFIG_CMD_PCI</font>
<font color="#009900">+@@ -365,6 +366,14 @@</font>
<font color="#009900">+ </font>
<font color="#009900">+ #define CONFIG_CMDLINE_EDITING 1</font>
<font color="#009900">+ </font>
<font color="#009900">++/*</font>
<font color="#009900">++ * JFFS2 partitions (mtdparts command line support)</font>
<font color="#009900">++ */</font>
<font color="#009900">++#define CONFIG_JFFS2_CMDLINE</font>
<font color="#009900">++#define CONFIG_JFFS2_NAND</font>
<font color="#009900">++#define MTDIDS_DEFAULT                "nor0=physmap-flash.0,nand0=nand0"</font>
<font color="#009900">++#define MTDPARTS_DEFAULT        "mtdparts=physmap-flash.0:384k(uboot),64k(env)"</font>
<font color="#009900">++</font>
<font color="#009900">+ </font>
<font color="#009900">+ /*</font>
<font color="#009900">+  * Miscellaneous configurable options</font>
============================================================
<font color="#FF6600">--- packages/u-boot/u-boot-1.3.2/mpc8313e-rdb-nand.patch        64eee6cc9ba75710f130f074b0632df44049ca14</font>
<font color="#009900">+++ packages/u-boot/u-boot-1.3.2/mpc8313e-rdb-nand.patch        64eee6cc9ba75710f130f074b0632df44049ca14</font>
<font color="#0000FF">@@ -0,0 +1,895 @@</font>
<font color="#009900">+diff -urN u-boot-1.3.1.orig/board/freescale/mpc8313erdb/Makefile u-boot-1.3.1/board/freescale/mpc8313erdb/Makefile</font>
<font color="#009900">+--- u-boot-1.3.1.orig/board/freescale/mpc8313erdb/Makefile        2007-12-06 10:21:19.000000000 +0100</font>
<font color="#009900">++++ u-boot-1.3.1/board/freescale/mpc8313erdb/Makefile        2008-01-31 17:35:43.000000000 +0100</font>
<font color="#009900">+@@ -25,7 +25,7 @@</font>
<font color="#009900">+ </font>
<font color="#009900">+ LIB        = $(obj)lib$(BOARD).a</font>
<font color="#009900">+ </font>
<font color="#009900">+-COBJS        := $(BOARD).o sdram.o</font>
<font color="#009900">++COBJS        := $(BOARD).o sdram.o nand.o</font>
<font color="#009900">+ </font>
<font color="#009900">+ SRCS        := $(SOBJS:.o=.S) $(COBJS:.o=.c)</font>
<font color="#009900">+ OBJS        := $(addprefix $(obj),$(COBJS))</font>
<font color="#009900">+diff -urN u-boot-1.3.1.orig/board/freescale/mpc8313erdb/nand.c u-boot-1.3.1/board/freescale/mpc8313erdb/nand.c</font>
<font color="#009900">+--- u-boot-1.3.1.orig/board/freescale/mpc8313erdb/nand.c        1970-01-01 01:00:00.000000000 +0100</font>
<font color="#009900">++++ u-boot-1.3.1/board/freescale/mpc8313erdb/nand.c        2008-01-31 17:35:26.000000000 +0100</font>
<font color="#009900">+@@ -0,0 +1,868 @@</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * Copyright (C) Freescale Semiconductor, Inc. 2006. </font>
<font color="#009900">++ * </font>
<font color="#009900">++ * Initialized by Nick.Spence@freescale.com</font>
<font color="#009900">++ *                Wilson.Lo@freescale.com</font>
<font color="#009900">++ *</font>
<font color="#009900">++ * See file CREDITS for list of people who contributed to this</font>
<font color="#009900">++ * project.</font>
<font color="#009900">++ *</font>
<font color="#009900">++ * This program is free software; you can redistribute it and/or</font>
<font color="#009900">++ * modify it under the terms of the GNU General Public License as</font>
<font color="#009900">++ * published by the Free Software Foundation; either version 2 of</font>
<font color="#009900">++ * the License, or (at your option) any later version.</font>
<font color="#009900">++ *</font>
<font color="#009900">++ * This program is distributed in the hope that it will be useful,</font>
<font color="#009900">++ * but WITHOUT ANY WARRANTY; without even the implied warranty of</font>
<font color="#009900">++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</font>
<font color="#009900">++ * GNU General Public License for more details.</font>
<font color="#009900">++ *</font>
<font color="#009900">++ * You should have received a copy of the GNU General Public License</font>
<font color="#009900">++ * along with this program; if not, write to the Free Software</font>
<font color="#009900">++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,</font>
<font color="#009900">++ * MA 02111-1307 USA</font>
<font color="#009900">++ */</font>
<font color="#009900">++</font>
<font color="#009900">++#include &lt;common.h&gt;</font>
<font color="#009900">++</font>
<font color="#009900">++#if defined(CONFIG_CMD_NAND)</font>
<font color="#009900">++#if defined(CFG_NAND_LEGACY)</font>
<font color="#009900">++ #error "U-Boot legacy NAND commands not supported."</font>
<font color="#009900">++#else</font>
<font color="#009900">++</font>
<font color="#009900">++#include &lt;malloc.h&gt;</font>
<font color="#009900">++#include &lt;asm/errno.h&gt;</font>
<font color="#009900">++#include &lt;nand.h&gt;</font>
<font color="#009900">++</font>
<font color="#009900">++#undef CFG_FCM_DEBUG</font>
<font color="#009900">++#define CFG_FCM_DEBUG_LVL 1</font>
<font color="#009900">++#ifdef CFG_FCM_DEBUG</font>
<font color="#009900">++#define FCM_DEBUG(n, args...)                                \</font>
<font color="#009900">++        do {                                                \</font>
<font color="#009900">++                if (n &lt;= (CFG_FCM_DEBUG_LVL + 0))        \</font>
<font color="#009900">++                        printf(args);                        \</font>
<font color="#009900">++        } while(0)</font>
<font color="#009900">++#else /* CONFIG_FCM_DEBUG */</font>
<font color="#009900">++#define FCM_DEBUG(n, args...) do { } while(0)</font>
<font color="#009900">++#endif</font>
<font color="#009900">++</font>
<font color="#009900">++#define MIN(x, y)                ((x &lt; y) ? x : y)</font>
<font color="#009900">++</font>
<font color="#009900">++#define ERR_BYTE 0xFF        /* Value returned for read bytes when read failed */</font>
<font color="#009900">++</font>
<font color="#009900">++#define FCM_TIMEOUT_USECS 100000 /* Maximum number of uSecs to wait for FCM */</font>
<font color="#009900">++</font>
<font color="#009900">++/* Private structure holding NAND Flash device specific information */</font>
<font color="#009900">++struct fcm_nand {</font>
<font color="#009900">++        int                bank;       /* Chip select bank number             */</font>
<font color="#009900">++        unsigned int        base;       /* Chip select base address            */</font>
<font color="#009900">++        int                pgs;        /* NAND page size                      */</font>
<font color="#009900">++        int                oobbuf;     /* Pointer to OOB block                */</font>
<font color="#009900">++        unsigned int        page;       /* Last page written to / read from    */</font>
<font color="#009900">++        unsigned int        fmr;        /* FCM Flash Mode Register value       */</font>
<font color="#009900">++        unsigned int        mdr;        /* UPM/FCM Data Register value         */</font>
<font color="#009900">++        unsigned int        use_mdr;    /* Non zero if the MDR is to be set    */</font>
<font color="#009900">++        u_char               *addr;       /* Address of assigned FCM buffer      */</font>
<font color="#009900">++        unsigned int        read_bytes; /* Number of bytes read during command */</font>
<font color="#009900">++        unsigned int        index;      /* Pointer to next byte to 'read'      */</font>
<font color="#009900">++        unsigned int        req_bytes;  /* Number of bytes read if command ok  */</font>
<font color="#009900">++        unsigned int        req_index;  /* New read index if command ok        */</font>
<font color="#009900">++        unsigned int        status;     /* status read from LTESR after last op*/</font>
<font color="#009900">++};</font>
<font color="#009900">++</font>
<font color="#009900">++</font>
<font color="#009900">++/* These map to the positions used by the FCM hardware ECC generator */</font>
<font color="#009900">++</font>
<font color="#009900">++/* Small Page FLASH with FMR[ECCM] = 0 */</font>
<font color="#009900">++static struct nand_oobinfo fcm_oob_sp_eccm0 = { /* TODO */</font>
<font color="#009900">++        .useecc = MTD_NANDECC_AUTOPL_USR, /* MTD_NANDECC_PLACEONLY, */</font>
<font color="#009900">++        .eccbytes = 3,</font>
<font color="#009900">++        .eccpos = {6, 7, 8},</font>
<font color="#009900">++        .oobfree = { {0, 5}, {9, 7} }</font>
<font color="#009900">++};</font>
<font color="#009900">++</font>
<font color="#009900">++/* Small Page FLASH with FMR[ECCM] = 1 */</font>
<font color="#009900">++static struct nand_oobinfo fcm_oob_sp_eccm1 = { /* TODO */</font>
<font color="#009900">++        .useecc = MTD_NANDECC_AUTOPL_USR, /* MTD_NANDECC_PLACEONLY, */</font>
<font color="#009900">++        .eccbytes = 3,</font>
<font color="#009900">++        .eccpos = {8, 9, 10},</font>
<font color="#009900">++        .oobfree = { {0, 5}, {6, 2}, {11, 5} }</font>
<font color="#009900">++};</font>
<font color="#009900">++</font>
<font color="#009900">++/* Large Page FLASH with FMR[ECCM] = 0 */</font>
<font color="#009900">++static struct nand_oobinfo fcm_oob_lp_eccm0 = {</font>
<font color="#009900">++        .useecc = MTD_NANDECC_AUTOPL_USR, /* MTD_NANDECC_PLACEONLY, */</font>
<font color="#009900">++        .eccbytes = 12,</font>
<font color="#009900">++        .eccpos = {6, 7, 8, 22, 23, 24, 38, 39, 40, 54, 55, 56},</font>
<font color="#009900">++        .oobfree = { {1, 5}, {9, 13}, {25, 13}, {41, 13}, {57, 7} }</font>
<font color="#009900">++};</font>
<font color="#009900">++</font>
<font color="#009900">++/* Large Page FLASH with FMR[ECCM] = 1 */</font>
<font color="#009900">++static struct nand_oobinfo fcm_oob_lp_eccm1 = {</font>
<font color="#009900">++        .useecc = MTD_NANDECC_AUTOPL_USR, /* MTD_NANDECC_PLACEONLY, */</font>
<font color="#009900">++        .eccbytes = 12,</font>
<font color="#009900">++        .eccpos = {8, 9, 10, 24, 25, 26, 40, 41, 42, 56, 57, 58},</font>
<font color="#009900">++        .oobfree = { {1, 7}, {11, 13}, {27, 13}, {43, 13}, {59, 5} }</font>
<font color="#009900">++};</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * execute FCM command and wait for it to complete</font>
<font color="#009900">++ */</font>
<font color="#009900">++static int fcm_run_command(struct mtd_info *mtd)</font>
<font color="#009900">++{</font>
<font color="#009900">++        volatile immap_t *im = (immap_t *) CFG_IMMR;</font>
<font color="#009900">++        volatile lbus83xx_t *lbc= &amp;im-&gt;lbus;</font>
<font color="#009900">++        register struct nand_chip *this = mtd-&gt;priv;</font>
<font color="#009900">++        struct fcm_nand *fcm = this-&gt;priv;</font>
<font color="#009900">++        long long end_tick;</font>
<font color="#009900">++</font>
<font color="#009900">++        /* Setup the FMR[OP] to execute without write protection */</font>
<font color="#009900">++        lbc-&gt;fmr = fcm-&gt;fmr | 3;</font>
<font color="#009900">++        if (fcm-&gt;use_mdr)</font>
<font color="#009900">++                lbc-&gt;mdr = fcm-&gt;mdr;</font>
<font color="#009900">++</font>
<font color="#009900">++        FCM_DEBUG(5,"fcm_run_command: fmr= %08X fir= %08X fcr= %08X\n",</font>
<font color="#009900">++                lbc-&gt;fmr, lbc-&gt;fir, lbc-&gt;fcr);</font>
<font color="#009900">++        FCM_DEBUG(5,"fcm_run_command: fbar=%08X fpar=%08X fbcr=%08X bank=%d\n",</font>
<font color="#009900">++                lbc-&gt;fbar, lbc-&gt;fpar, lbc-&gt;fbcr, fcm-&gt;bank);</font>
<font color="#009900">++</font>
<font color="#009900">++        /* clear event registers */</font>
<font color="#009900">++        lbc-&gt;lteatr = 0;</font>
<font color="#009900">++        lbc-&gt;ltesr |= (LTESR_FCT | LTESR_PAR | LTESR_CC);</font>
<font color="#009900">++</font>
<font color="#009900">++        /* execute special operation */</font>
<font color="#009900">++        lbc-&gt;lsor = fcm-&gt;bank;</font>
<font color="#009900">++</font>
<font color="#009900">++        /* wait for FCM complete flag or timeout */</font>
<font color="#009900">++        fcm-&gt;status = 0;</font>
<font color="#009900">++        end_tick = usec2ticks(FCM_TIMEOUT_USECS) + get_ticks();</font>
<font color="#009900">++</font>
<font color="#009900">++        while (end_tick &gt; get_ticks()) {</font>
<font color="#009900">++                if (lbc-&gt;ltesr &amp; LTESR_CC) {</font>
<font color="#009900">++                        fcm-&gt;status = lbc-&gt;ltesr &amp;</font>
<font color="#009900">++                                        (LTESR_FCT | LTESR_PAR | LTESR_CC);</font>
<font color="#009900">++                        break;</font>
<font color="#009900">++                }</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        /* store mdr value in case it was needed */</font>
<font color="#009900">++        if (fcm-&gt;use_mdr)</font>
<font color="#009900">++                fcm-&gt;mdr = lbc-&gt;mdr;</font>
<font color="#009900">++</font>
<font color="#009900">++        fcm-&gt;use_mdr = 0;</font>
<font color="#009900">++</font>
<font color="#009900">++        FCM_DEBUG(5,"fcm_run_command: stat=%08X mdr= %08X fmr= %08X\n",</font>
<font color="#009900">++                fcm-&gt;status, fcm-&gt;mdr, lbc-&gt;fmr);</font>
<font color="#009900">++</font>
<font color="#009900">++        /* if the operation completed ok then set the read buffer pointers */</font>
<font color="#009900">++        if (fcm-&gt;status == LTESR_CC) {</font>
<font color="#009900">++                fcm-&gt;read_bytes = fcm-&gt;req_bytes;</font>
<font color="#009900">++                fcm-&gt;index      = fcm-&gt;req_index;</font>
<font color="#009900">++                return 0;</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        return -1;</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * Set up the FCM hardware block and page address fields, and the fcm</font>
<font color="#009900">++ * structure addr field to point to the correct FCM buffer in memory</font>
<font color="#009900">++ */</font>
<font color="#009900">++static void set_addr(struct mtd_info *mtd, int column, int page_addr, int oob)</font>
<font color="#009900">++{</font>
<font color="#009900">++        volatile immap_t *im = (immap_t *) CFG_IMMR;</font>
<font color="#009900">++        volatile lbus83xx_t *lbc= &amp;im-&gt;lbus;</font>
<font color="#009900">++        register struct nand_chip *this = mtd-&gt;priv;</font>
<font color="#009900">++        struct fcm_nand *fcm = this-&gt;priv;</font>
<font color="#009900">++        int buf_num;</font>
<font color="#009900">++</font>
<font color="#009900">++        fcm-&gt;page = page_addr;</font>
<font color="#009900">++</font>
<font color="#009900">++        lbc-&gt;fbar = page_addr &gt;&gt; (this-&gt;phys_erase_shift - this-&gt;page_shift);</font>
<font color="#009900">++        if (fcm-&gt;pgs) {</font>
<font color="#009900">++                lbc-&gt;fpar = ((page_addr &lt;&lt; FPAR_LP_PI_SHIFT) &amp; FPAR_LP_PI) |</font>
<font color="#009900">++                            ( oob ? FPAR_LP_MS : 0) |</font>
<font color="#009900">++                              column;</font>
<font color="#009900">++                buf_num = (page_addr &amp; 1) &lt;&lt; 2;</font>
<font color="#009900">++        } else {</font>
<font color="#009900">++                lbc-&gt;fpar = ((page_addr &lt;&lt; FPAR_SP_PI_SHIFT) &amp; FPAR_SP_PI) |</font>
<font color="#009900">++                            ( oob ? FPAR_SP_MS : 0) |</font>
<font color="#009900">++                              column;</font>
<font color="#009900">++                buf_num = page_addr &amp; 7;</font>
<font color="#009900">++        }</font>
<font color="#009900">++        fcm-&gt;addr = (unsigned char*)(fcm-&gt;base + (buf_num * 1024));</font>
<font color="#009900">++</font>
<font color="#009900">++        /* for OOB data point to the second half of the buffer */</font>
<font color="#009900">++        if (oob) {</font>
<font color="#009900">++                fcm-&gt;addr += (fcm-&gt;pgs ? 2048 : 512);</font>
<font color="#009900">++        }</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++/* not required for FCM */</font>
<font color="#009900">++static void fcm_hwcontrol(struct mtd_info *mtdinfo, int cmd)</font>
<font color="#009900">++{</font>
<font color="#009900">++        return;</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * FCM does not support 16 bit data busses</font>
<font color="#009900">++ */</font>
<font color="#009900">++static u16 fcm_read_word(struct mtd_info *mtd)</font>
<font color="#009900">++{</font>
<font color="#009900">++        printf("fcm_read_word: UNIMPLEMENTED.\n");</font>
<font color="#009900">++        return 0;</font>
<font color="#009900">++}</font>
<font color="#009900">++static void fcm_write_word(struct mtd_info *mtd, u16 word)</font>
<font color="#009900">++{</font>
<font color="#009900">++        printf("fcm_write_word: UNIMPLEMENTED.\n");</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * Write buf to the FCM Controller Data Buffer</font>
<font color="#009900">++ */</font>
<font color="#009900">++static void fcm_write_buf(struct mtd_info *mtd, const u_char *buf, int len)</font>
<font color="#009900">++{</font>
<font color="#009900">++        register struct nand_chip *this = mtd-&gt;priv;</font>
<font color="#009900">++        struct fcm_nand *fcm = this-&gt;priv;</font>
<font color="#009900">++</font>
<font color="#009900">++        FCM_DEBUG(3,"fcm_write_buf: writing %d bytes starting with 0x%x"</font>
<font color="#009900">++                    " at %d.\n", len, *((unsigned long*) buf), fcm-&gt;index);</font>
<font color="#009900">++</font>
<font color="#009900">++        /* If armed catch the address of the OOB buffer so that it can be */</font>
<font color="#009900">++        /* updated with the real signature after the program comletes */</font>
<font color="#009900">++        if (!fcm-&gt;oobbuf)</font>
<font color="#009900">++                fcm-&gt;oobbuf = (int) buf;</font>
<font color="#009900">++</font>
<font color="#009900">++        /* copy the data into the FCM hardware buffer and update the index */</font>
<font color="#009900">++        memcpy(&amp;(fcm-&gt;addr[fcm-&gt;index]), buf, len);</font>
<font color="#009900">++        fcm-&gt;index += len;</font>
<font color="#009900">++        return;</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * FCM does not support individual writes. Instead these are either commands</font>
<font color="#009900">++ * or data being written, both of which are handled through the cmdfunc</font>
<font color="#009900">++ * handler.</font>
<font color="#009900">++ */</font>
<font color="#009900">++static void fcm_write_byte(struct mtd_info *mtd, u_char byte)</font>
<font color="#009900">++{</font>
<font color="#009900">++        printf("fcm_write_byte: UNIMPLEMENTED.\n");</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * read a byte from either the FCM hardware buffer if it has any data left</font>
<font color="#009900">++ * otherwise issue a command to read a single byte.</font>
<font color="#009900">++ */</font>
<font color="#009900">++static u_char fcm_read_byte(struct mtd_info *mtd)</font>
<font color="#009900">++{</font>
<font color="#009900">++        volatile immap_t *im = (immap_t *) CFG_IMMR;</font>
<font color="#009900">++        volatile lbus83xx_t *lbc= &amp;im-&gt;lbus;</font>
<font color="#009900">++        register struct nand_chip *this = mtd-&gt;priv;</font>
<font color="#009900">++        struct fcm_nand *fcm = this-&gt;priv;</font>
<font color="#009900">++        unsigned char byte;</font>
<font color="#009900">++</font>
<font color="#009900">++        /* If there are still bytes in the FCM then use the next byte */</font>
<font color="#009900">++        if(fcm-&gt;index &lt; fcm-&gt;read_bytes) {</font>
<font color="#009900">++                byte = fcm-&gt;addr[(fcm-&gt;index)++];</font>
<font color="#009900">++                FCM_DEBUG(4,"fcm_read_byte: byte %u (%02X): %d of %d.\n",</font>
<font color="#009900">++                          byte, byte, fcm-&gt;index-1, fcm-&gt;read_bytes);</font>
<font color="#009900">++        } else {</font>
<font color="#009900">++                /* otherwise issue a command to read 1 byte */</font>
<font color="#009900">++                lbc-&gt;fir = (FIR_OP_RSW &lt;&lt; FIR_OP0_SHIFT);</font>
<font color="#009900">++                fcm-&gt;use_mdr = 1;</font>
<font color="#009900">++                fcm-&gt;read_bytes = 0;</font>
<font color="#009900">++                fcm-&gt;index = 0;</font>
<font color="#009900">++                fcm-&gt;req_bytes = 0;</font>
<font color="#009900">++                fcm-&gt;req_index = 0;</font>
<font color="#009900">++                byte = fcm_run_command(mtd) ? ERR_BYTE : fcm-&gt;mdr &amp; 0xff;</font>
<font color="#009900">++                FCM_DEBUG(4,"fcm_read_byte: byte %u (%02X) from bus.\n",</font>
<font color="#009900">++                          byte, byte);</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        return byte;</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * Read from the FCM Controller Data Buffer</font>
<font color="#009900">++ */</font>
<font color="#009900">++static void fcm_read_buf(struct mtd_info *mtd, u_char* buf, int len)</font>
<font color="#009900">++{</font>
<font color="#009900">++        volatile immap_t *im = (immap_t *) CFG_IMMR;</font>
<font color="#009900">++        volatile lbus83xx_t *lbc= &amp;im-&gt;lbus;</font>
<font color="#009900">++        register struct nand_chip *this = mtd-&gt;priv;</font>
<font color="#009900">++        struct fcm_nand *fcm = this-&gt;priv;</font>
<font color="#009900">++        int i;</font>
<font color="#009900">++        int rest;</font>
<font color="#009900">++</font>
<font color="#009900">++        FCM_DEBUG(3,"fcm_read_buf: reading %d bytes.\n", len);</font>
<font color="#009900">++</font>
<font color="#009900">++        /* If last read failed then return error bytes */</font>
<font color="#009900">++        if (fcm-&gt;status != LTESR_CC) {</font>
<font color="#009900">++                /* just keep copying bytes so that the oob works */</font>
<font color="#009900">++                memcpy(buf, &amp;(fcm-&gt;addr[(fcm-&gt;index)]), len);</font>
<font color="#009900">++                fcm-&gt;index += len;</font>
<font color="#009900">++        }</font>
<font color="#009900">++        else</font>
<font color="#009900">++        {</font>
<font color="#009900">++                /* see how much is still in the FCM buffer */</font>
<font color="#009900">++                i = min(len, (fcm-&gt;read_bytes - fcm-&gt;index));</font>
<font color="#009900">++                rest = i - len;</font>
<font color="#009900">++                len = i;</font>
<font color="#009900">++</font>
<font color="#009900">++                memcpy(buf, &amp;(fcm-&gt;addr[(fcm-&gt;index)]), len);</font>
<font color="#009900">++                fcm-&gt;index += len;</font>
<font color="#009900">++</font>
<font color="#009900">++                /* If more data is needed then issue another block read */</font>
<font color="#009900">++                if (rest) {</font>
<font color="#009900">++                        FCM_DEBUG(3,"fcm_read_buf: getting %d more bytes.\n",</font>
<font color="#009900">++                                    rest);</font>
<font color="#009900">++                        buf += len;</font>
<font color="#009900">++                        lbc-&gt;fir = (FIR_OP_RBW &lt;&lt; FIR_OP0_SHIFT);</font>
<font color="#009900">++                        set_addr(mtd, 0, 0, 0);</font>
<font color="#009900">++                        lbc-&gt;fbcr = rest;</font>
<font color="#009900">++                        fcm-&gt;req_bytes = lbc-&gt;fbcr;</font>
<font color="#009900">++                        fcm-&gt;req_index = 0;</font>
<font color="#009900">++                        fcm-&gt;use_mdr = 0;</font>
<font color="#009900">++                        if (!fcm_run_command(mtd))</font>
<font color="#009900">++                                fcm_read_buf(mtd, buf, rest);</font>
<font color="#009900">++                        else</font>
<font color="#009900">++                                memcpy(buf, fcm-&gt;addr, rest);</font>
<font color="#009900">++                }</font>
<font color="#009900">++        }</font>
<font color="#009900">++        return;</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * Verify buffer against the FCM Controller Data Buffer</font>
<font color="#009900">++ */</font>
<font color="#009900">++static int fcm_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)</font>
<font color="#009900">++{</font>
<font color="#009900">++        volatile immap_t *im = (immap_t *) CFG_IMMR;</font>
<font color="#009900">++        volatile lbus83xx_t *lbc= &amp;im-&gt;lbus;</font>
<font color="#009900">++        register struct nand_chip *this = mtd-&gt;priv;</font>
<font color="#009900">++        struct fcm_nand *fcm = this-&gt;priv;</font>
<font color="#009900">++        int i;</font>
<font color="#009900">++        int rest;</font>
<font color="#009900">++</font>
<font color="#009900">++        FCM_DEBUG(3,"fcm_verify_buf: checking %d bytes starting with 0x%02x.\n",</font>
<font color="#009900">++                len, *((unsigned long*) buf));</font>
<font color="#009900">++        /* If last read failed then return error bytes */</font>
<font color="#009900">++        if (fcm-&gt;status != LTESR_CC) {</font>
<font color="#009900">++                return EFAULT;</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        /* see how much is still in the FCM buffer */</font>
<font color="#009900">++        i = min(len, (fcm-&gt;read_bytes - fcm-&gt;index));</font>
<font color="#009900">++        rest = i - len;</font>
<font color="#009900">++        len = i;</font>
<font color="#009900">++</font>
<font color="#009900">++        if (memcmp(buf,        &amp;(fcm-&gt;addr[(fcm-&gt;index)]), len)) {</font>
<font color="#009900">++                return EFAULT;</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        fcm-&gt;index += len;</font>
<font color="#009900">++        if (rest) {</font>
<font color="#009900">++                FCM_DEBUG(3,"fcm_verify_buf: getting %d more bytes.\n", rest);</font>
<font color="#009900">++                buf += len;</font>
<font color="#009900">++                lbc-&gt;fir = (FIR_OP_RBW &lt;&lt; FIR_OP0_SHIFT);</font>
<font color="#009900">++                set_addr(mtd, 0, 0, 0);</font>
<font color="#009900">++                lbc-&gt;fbcr = rest;</font>
<font color="#009900">++                fcm-&gt;req_bytes = lbc-&gt;fbcr;</font>
<font color="#009900">++                fcm-&gt;req_index = 0;</font>
<font color="#009900">++                fcm-&gt;use_mdr = 0;</font>
<font color="#009900">++                if (fcm_run_command(mtd))</font>
<font color="#009900">++                        return EFAULT;</font>
<font color="#009900">++                return fcm_verify_buf(mtd, buf, rest);</font>
<font color="#009900">++</font>
<font color="#009900">++        }</font>
<font color="#009900">++        return 0;</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++/* this function is called after Program and Erase Operations to</font>
<font color="#009900">++ * check for success or failure */</font>
<font color="#009900">++static int fcm_wait(struct mtd_info *mtd, struct nand_chip *this, int state)</font>
<font color="#009900">++{</font>
<font color="#009900">++        volatile immap_t *im = (immap_t *) CFG_IMMR;</font>
<font color="#009900">++        volatile lbus83xx_t *lbc= &amp;im-&gt;lbus;</font>
<font color="#009900">++        struct fcm_nand *fcm = this-&gt;priv;</font>
<font color="#009900">++</font>
<font color="#009900">++        if (fcm-&gt;status != LTESR_CC) {</font>
<font color="#009900">++                return(0x1); /* Status Read error */</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        /* Use READ_STATUS command, but wait for the device to be ready */</font>
<font color="#009900">++        fcm-&gt;use_mdr = 0;</font>
<font color="#009900">++        fcm-&gt;req_index = 0;</font>
<font color="#009900">++        fcm-&gt;read_bytes = 0;</font>
<font color="#009900">++        fcm-&gt;index = 0;</font>
<font color="#009900">++        fcm-&gt;oobbuf = -1;</font>
<font color="#009900">++        lbc-&gt;fir = (FIR_OP_CW0 &lt;&lt; FIR_OP0_SHIFT) |</font>
<font color="#009900">++                   (FIR_OP_RBW &lt;&lt; FIR_OP1_SHIFT);</font>
<font color="#009900">++        lbc-&gt;fcr = (NAND_CMD_STATUS &lt;&lt; FCR_CMD0_SHIFT);</font>
<font color="#009900">++        set_addr(mtd, 0, 0, 0);</font>
<font color="#009900">++        lbc-&gt;fbcr = 1;</font>
<font color="#009900">++        fcm-&gt;req_bytes = lbc-&gt;fbcr;</font>
<font color="#009900">++        fcm_run_command(mtd);</font>
<font color="#009900">++        if (fcm-&gt;status != LTESR_CC) {</font>
<font color="#009900">++                return(0x1); /* Status Read error */</font>
<font color="#009900">++        }</font>
<font color="#009900">++        return this-&gt;read_byte(mtd);</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++</font>
<font color="#009900">++/* cmdfunc send commands to the FCM */</font>
<font color="#009900">++static void fcm_cmdfunc(struct mtd_info *mtd, unsigned command,</font>
<font color="#009900">++                        int column, int page_addr)</font>
<font color="#009900">++{</font>
<font color="#009900">++        volatile immap_t *im = (immap_t *) CFG_IMMR;</font>
<font color="#009900">++        volatile lbus83xx_t *lbc= &amp;im-&gt;lbus;</font>
<font color="#009900">++        register struct nand_chip *this = mtd-&gt;priv;</font>
<font color="#009900">++        struct fcm_nand *fcm = this-&gt;priv;</font>
<font color="#009900">++</font>
<font color="#009900">++        fcm-&gt;use_mdr = 0;</font>
<font color="#009900">++        fcm-&gt;req_index = 0;</font>
<font color="#009900">++</font>
<font color="#009900">++        /* clear the read buffer */</font>
<font color="#009900">++        fcm-&gt;read_bytes = 0;</font>
<font color="#009900">++        if (command != NAND_CMD_PAGEPROG) {</font>
<font color="#009900">++                fcm-&gt;index = 0;</font>
<font color="#009900">++                fcm-&gt;oobbuf = -1;</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        switch (command) {</font>
<font color="#009900">++        /* READ0 and READ1 read the entire buffer to use hardware ECC */</font>
<font color="#009900">++        case NAND_CMD_READ1:</font>
<font color="#009900">++                FCM_DEBUG(2,"fcm_cmdfunc: NAND_CMD_READ1, page_addr:"</font>
<font color="#009900">++                            " 0x%x, column: 0x%x.\n", page_addr, column);</font>
<font color="#009900">++                fcm-&gt;req_index = column + 256;</font>
<font color="#009900">++                goto read0;</font>
<font color="#009900">++        case NAND_CMD_READ0:</font>
<font color="#009900">++                FCM_DEBUG(2,"fcm_cmdfunc: NAND_CMD_READ0, page_addr:"</font>
<font color="#009900">++                            " 0x%x, column: 0x%x.\n", page_addr, column);</font>
<font color="#009900">++                fcm-&gt;req_index = column;</font>
<font color="#009900">++read0:</font>
<font color="#009900">++                if (fcm-&gt;pgs) {</font>
<font color="#009900">++                        lbc-&gt;fir = (FIR_OP_CW0 &lt;&lt; FIR_OP0_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_CA  &lt;&lt; FIR_OP1_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_PA  &lt;&lt; FIR_OP2_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_CW1 &lt;&lt; FIR_OP3_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_RBW &lt;&lt; FIR_OP4_SHIFT);</font>
<font color="#009900">++                } else {</font>
<font color="#009900">++                        lbc-&gt;fir = (FIR_OP_CW0 &lt;&lt; FIR_OP0_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_CA  &lt;&lt; FIR_OP1_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_PA  &lt;&lt; FIR_OP2_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_RBW &lt;&lt; FIR_OP3_SHIFT);</font>
<font color="#009900">++                }</font>
<font color="#009900">++                lbc-&gt;fcr = (NAND_CMD_READ0     &lt;&lt; FCR_CMD0_SHIFT) |</font>
<font color="#009900">++                           (NAND_CMD_READSTART &lt;&lt; FCR_CMD1_SHIFT);</font>
<font color="#009900">++                lbc-&gt;fbcr = 0; /* read entire page to enable ECC */</font>
<font color="#009900">++                set_addr(mtd, 0, page_addr, 0);</font>
<font color="#009900">++                fcm-&gt;req_bytes = mtd-&gt;oobblock + mtd-&gt;oobsize;</font>
<font color="#009900">++                goto write_cmd2;</font>
<font color="#009900">++        /* READOOB read only the OOB becasue no ECC is performed */</font>
<font color="#009900">++        case NAND_CMD_READOOB:</font>
<font color="#009900">++                FCM_DEBUG(2,"fcm_cmdfunc: NAND_CMD_READOOB, page_addr:"</font>
<font color="#009900">++                            " 0x%x, column: 0x%x.\n", page_addr, column);</font>
<font color="#009900">++                if (fcm-&gt;pgs) {</font>
<font color="#009900">++                        lbc-&gt;fir = (FIR_OP_CW0 &lt;&lt; FIR_OP0_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_CA  &lt;&lt; FIR_OP1_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_PA  &lt;&lt; FIR_OP2_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_CW1 &lt;&lt; FIR_OP3_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_RBW &lt;&lt; FIR_OP4_SHIFT);</font>
<font color="#009900">++                        lbc-&gt;fcr = (NAND_CMD_READ0     &lt;&lt; FCR_CMD0_SHIFT) |</font>
<font color="#009900">++                                   (NAND_CMD_READSTART &lt;&lt; FCR_CMD1_SHIFT);</font>
<font color="#009900">++                } else {</font>
<font color="#009900">++                        lbc-&gt;fir = (FIR_OP_CW0 &lt;&lt; FIR_OP0_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_CA  &lt;&lt; FIR_OP1_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_PA  &lt;&lt; FIR_OP2_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_RBW &lt;&lt; FIR_OP3_SHIFT);</font>
<font color="#009900">++                        lbc-&gt;fcr = (NAND_CMD_READOOB &lt;&lt; FCR_CMD0_SHIFT);</font>
<font color="#009900">++                }</font>
<font color="#009900">++                lbc-&gt;fbcr = mtd-&gt;oobsize - column;</font>
<font color="#009900">++                set_addr(mtd, column, page_addr, 1);</font>
<font color="#009900">++                goto write_cmd1;</font>
<font color="#009900">++        /* READID must read all 5 possible bytes while CEB is active */</font>
<font color="#009900">++        case NAND_CMD_READID:</font>
<font color="#009900">++                FCM_DEBUG(2,"fcm_cmdfunc: NAND_CMD_READID.\n");</font>
<font color="#009900">++                lbc-&gt;fir = (FIR_OP_CW0 &lt;&lt; FIR_OP0_SHIFT) |</font>
<font color="#009900">++                           (FIR_OP_UA  &lt;&lt; FIR_OP1_SHIFT) |</font>
<font color="#009900">++                           (FIR_OP_RBW &lt;&lt; FIR_OP2_SHIFT);</font>
<font color="#009900">++                lbc-&gt;fcr = (NAND_CMD_READID &lt;&lt; FCR_CMD0_SHIFT);</font>
<font color="#009900">++                lbc-&gt;fbcr = 5; /* 5 bytes for manuf, device and exts */</font>
<font color="#009900">++                fcm-&gt;use_mdr = 1;</font>
<font color="#009900">++                fcm-&gt;mdr = 0;</font>
<font color="#009900">++                goto write_cmd0;</font>
<font color="#009900">++        /* ERASE1 stores the block and page address */</font>
<font color="#009900">++        case NAND_CMD_ERASE1:</font>
<font color="#009900">++                FCM_DEBUG(2,"fcm_cmdfunc: NAND_CMD_ERASE1, page_addr:"</font>
<font color="#009900">++                            " 0x%x.\n", page_addr);</font>
<font color="#009900">++                set_addr(mtd, 0, page_addr, 0);</font>
<font color="#009900">++                goto end;</font>
<font color="#009900">++        /* ERASE2 uses the block and page address from ERASE1 */</font>
<font color="#009900">++        case NAND_CMD_ERASE2:</font>
<font color="#009900">++                FCM_DEBUG(2,"fcm_cmdfunc: NAND_CMD_ERASE2.\n");</font>
<font color="#009900">++                lbc-&gt;fir = (FIR_OP_CW0 &lt;&lt; FIR_OP0_SHIFT) |</font>
<font color="#009900">++                           (FIR_OP_PA  &lt;&lt; FIR_OP1_SHIFT) |</font>
<font color="#009900">++                           (FIR_OP_CM1 &lt;&lt; FIR_OP2_SHIFT);</font>
<font color="#009900">++                lbc-&gt;fcr = (NAND_CMD_ERASE1 &lt;&lt; FCR_CMD0_SHIFT) |</font>
<font color="#009900">++                           (NAND_CMD_ERASE2 &lt;&lt; FCR_CMD1_SHIFT);</font>
<font color="#009900">++                lbc-&gt;fbcr = 0;</font>
<font color="#009900">++                goto write_cmd1;</font>
<font color="#009900">++        /* SEQIN sets up the addr buffer and all registers except the length */</font>
<font color="#009900">++        case NAND_CMD_SEQIN:</font>
<font color="#009900">++                FCM_DEBUG(2,"fcm_cmdfunc: NAND_CMD_SEQIN/PAGE_PROG, page_addr:"</font>
<font color="#009900">++                            " 0x%x, column: 0x%x.\n", page_addr, column);</font>
<font color="#009900">++                if (column == 0) {</font>
<font color="#009900">++                        lbc-&gt;fbcr = 0; /* write entire page to enable ECC */</font>
<font color="#009900">++                } else {</font>
<font color="#009900">++                        lbc-&gt;fbcr = 1; /* mark as partial page so no HW ECC */</font>
<font color="#009900">++                }</font>
<font color="#009900">++                if (fcm-&gt;pgs) {</font>
<font color="#009900">++                        /* always use READ0 for large page devices */</font>
<font color="#009900">++                        lbc-&gt;fir = (FIR_OP_CW0 &lt;&lt; FIR_OP0_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_CA  &lt;&lt; FIR_OP1_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_PA  &lt;&lt; FIR_OP2_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_WB  &lt;&lt; FIR_OP3_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_CW1 &lt;&lt; FIR_OP4_SHIFT);</font>
<font color="#009900">++                        lbc-&gt;fcr = (NAND_CMD_SEQIN &lt;&lt; FCR_CMD0_SHIFT) |</font>
<font color="#009900">++                                   (NAND_CMD_PAGEPROG &lt;&lt; FCR_CMD1_SHIFT);</font>
<font color="#009900">++                        set_addr(mtd, column, page_addr, 0);</font>
<font color="#009900">++                } else {</font>
<font color="#009900">++                        lbc-&gt;fir = (FIR_OP_CW0 &lt;&lt; FIR_OP0_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_CM2 &lt;&lt; FIR_OP1_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_CA  &lt;&lt; FIR_OP2_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_PA  &lt;&lt; FIR_OP3_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_WB  &lt;&lt; FIR_OP4_SHIFT) |</font>
<font color="#009900">++                                   (FIR_OP_CW1 &lt;&lt; FIR_OP5_SHIFT);</font>
<font color="#009900">++                        if (column &gt;= mtd-&gt;oobblock) {</font>
<font color="#009900">++                                /* OOB area --&gt; READOOB */</font>
<font color="#009900">++                                column -= mtd-&gt;oobblock;</font>
<font color="#009900">++                                lbc-&gt;fcr = (NAND_CMD_READOOB &lt;&lt; FCR_CMD0_SHIFT)</font>
<font color="#009900">++                                         | (NAND_CMD_PAGEPROG&lt;&lt; FCR_CMD1_SHIFT)</font>
<font color="#009900">++                                         | (NAND_CMD_SEQIN &lt;&lt; FCR_CMD2_SHIFT);</font>
<font color="#009900">++                                set_addr(mtd, column, page_addr, 1);</font>
<font color="#009900">++                        } else if (column &lt; 256) {</font>
<font color="#009900">++                                /* First 256 bytes --&gt; READ0 */</font>
<font color="#009900">++                                lbc-&gt;fcr = (NAND_CMD_READ0 &lt;&lt; FCR_CMD0_SHIFT)</font>
<font color="#009900">++                                         | (NAND_CMD_PAGEPROG&lt;&lt; FCR_CMD1_SHIFT)</font>
<font color="#009900">++                                         | (NAND_CMD_SEQIN &lt;&lt; FCR_CMD2_SHIFT);</font>
<font color="#009900">++                                set_addr(mtd, column, page_addr, 0);</font>
<font color="#009900">++                        } else {</font>
<font color="#009900">++                                /* Second 256 bytes --&gt; READ1 */</font>
<font color="#009900">++                                column -= 256;</font>
<font color="#009900">++                                lbc-&gt;fcr = (NAND_CMD_READ1 &lt;&lt; FCR_CMD0_SHIFT)</font>
<font color="#009900">++                                         | (NAND_CMD_PAGEPROG&lt;&lt; FCR_CMD1_SHIFT)</font>
<font color="#009900">++                                         | (NAND_CMD_SEQIN &lt;&lt; FCR_CMD2_SHIFT);</font>
<font color="#009900">++                                set_addr(mtd, column, page_addr, 0);</font>
<font color="#009900">++                        }</font>
<font color="#009900">++                }</font>
<font color="#009900">++                goto end;</font>
<font color="#009900">++        /* PAGEPROG reuses all of the setup from SEQIN and adds the length */</font>
<font color="#009900">++        case NAND_CMD_PAGEPROG:</font>
<font color="#009900">++                FCM_DEBUG(2,"fcm_cmdfunc: NAND_CMD_PAGEPROG"</font>
<font color="#009900">++                            " writing %d bytes.\n",fcm-&gt;index);</font>
<font color="#009900">++                /* if the write did not start at 0 or is not a full page */</font>
<font color="#009900">++                /* then set the exact length, otherwise use a full page  */</font>
<font color="#009900">++                /* write so the HW generates the ECC. */</font>
<font color="#009900">++                if (lbc-&gt;fbcr ||</font>
<font color="#009900">++                   (fcm-&gt;index != (mtd-&gt;oobblock + mtd-&gt;oobsize)))</font>
<font color="#009900">++                        lbc-&gt;fbcr = fcm-&gt;index;</font>
<font color="#009900">++                fcm-&gt;req_bytes = 0;</font>
<font color="#009900">++                goto write_cmd2;</font>
<font color="#009900">++        /* CMD_STATUS must read the status byte while CEB is active */</font>
<font color="#009900">++        /* Note - it does not wait for the ready line */</font>
<font color="#009900">++        case NAND_CMD_STATUS:</font>
<font color="#009900">++                FCM_DEBUG(2,"fcm_cmdfunc: NAND_CMD_STATUS.\n");</font>
<font color="#009900">++                lbc-&gt;fir = (FIR_OP_CM0 &lt;&lt; FIR_OP0_SHIFT) |</font>
<font color="#009900">++                           (FIR_OP_RBW &lt;&lt; FIR_OP1_SHIFT);</font>
<font color="#009900">++                lbc-&gt;fcr = (NAND_CMD_STATUS &lt;&lt; FCR_CMD0_SHIFT);</font>
<font color="#009900">++                lbc-&gt;fbcr = 1;</font>
<font color="#009900">++                goto write_cmd0;</font>
<font color="#009900">++        /* RESET without waiting for the ready line */</font>
<font color="#009900">++        case NAND_CMD_RESET:</font>
<font color="#009900">++                FCM_DEBUG(2,"fcm_cmdfunc: NAND_CMD_RESET.\n");</font>
<font color="#009900">++                lbc-&gt;fir = (FIR_OP_CM0 &lt;&lt; FIR_OP0_SHIFT);</font>
<font color="#009900">++                lbc-&gt;fcr = (NAND_CMD_RESET &lt;&lt; FCR_CMD0_SHIFT);</font>
<font color="#009900">++                lbc-&gt;fbcr = 0;</font>
<font color="#009900">++                goto write_cmd0;</font>
<font color="#009900">++        default:</font>
<font color="#009900">++                printk("fcm_cmdfunc: error, unsupported command.\n");</font>
<font color="#009900">++                goto end;</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        /* Short cuts fall through to save code */</font>
<font color="#009900">++ write_cmd0:</font>
<font color="#009900">++        set_addr(mtd, 0, 0, 0);</font>
<font color="#009900">++ write_cmd1:</font>
<font color="#009900">++        fcm-&gt;req_bytes = lbc-&gt;fbcr;</font>
<font color="#009900">++ write_cmd2:</font>
<font color="#009900">++        fcm_run_command(mtd);</font>
<font color="#009900">++</font>
<font color="#009900">++#ifdef CONFIG_MTD_NAND_VERIFY_WRITE</font>
<font color="#009900">++        /* if we wrote a page then read back the oob to get the ECC */</font>
<font color="#009900">++        if ((command == NAND_CMD_PAGEPROG) &amp;&amp;</font>
<font color="#009900">++            (this-&gt;eccmode &gt; NAND_ECC_SOFT) &amp;&amp;</font>
<font color="#009900">++            (lbc-&gt;fbcr == 0) &amp;&amp;</font>
<font color="#009900">++            (fcm-&gt;oobbuf != 0) &amp;&amp;</font>
<font color="#009900">++            (fcm-&gt;oobbuf != -1)) {</font>
<font color="#009900">++                int i;</font>
<font color="#009900">++                uint *oob_config;</font>
<font color="#009900">++                unsigned char *oob_buf;</font>
<font color="#009900">++</font>
<font color="#009900">++                i = fcm-&gt;page;</font>
<font color="#009900">++                oob_buf = (unsigned char*) fcm-&gt;oobbuf;</font>
<font color="#009900">++                oob_config = this-&gt;autooob-&gt;eccpos;</font>
<font color="#009900">++</font>
<font color="#009900">++                /* wait for the write to complete and check it passed */</font>
<font color="#009900">++                if (!(this-&gt;waitfunc(mtd, this, FL_WRITING) &amp; 0x01)) {</font>
<font color="#009900">++                        /* read back the OOB */</font>
<font color="#009900">++                        fcm_cmdfunc(mtd, NAND_CMD_READOOB, 0, i);</font>
<font color="#009900">++                        /* if it succeeded then copy the ECC bytes */</font>
<font color="#009900">++                        if (fcm-&gt;status == LTESR_CC) {</font>
<font color="#009900">++                                for (i = 0; i &lt; this-&gt;eccbytes; i++) {</font>
<font color="#009900">++                                        oob_buf[oob_config[i]] =</font>
<font color="#009900">++                                                fcm-&gt;addr[oob_config[i]];</font>
<font color="#009900">++                                }</font>
<font color="#009900">++                        }</font>
<font color="#009900">++                }</font>
<font color="#009900">++        }</font>
<font color="#009900">++#endif</font>
<font color="#009900">++</font>
<font color="#009900">++ end:</font>
<font color="#009900">++        return;</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * fcm_enable_hwecc - start ECC generation</font>
<font color="#009900">++ */</font>
<font color="#009900">++static void fcm_enable_hwecc(struct mtd_info *mtd, int mode)</font>
<font color="#009900">++{</font>
<font color="#009900">++        return;</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * fcm_calculate_ecc - Calculate the ECC bytes</font>
<font color="#009900">++ * This is done by hardware during the write process, so we use this</font>
<font color="#009900">++ * to arm the oob buf capture on the next write_buf() call. The ECC bytes</font>
<font color="#009900">++ * only need to be captured if CONFIG_MTD_NAND_VERIFY_WRITE is defined which</font>
<font color="#009900">++ * reads back the pages and checks they match the data and oob buffers.</font>
<font color="#009900">++ */</font>
<font color="#009900">++static int fcm_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code)</font>
<font color="#009900">++{</font>
<font color="#009900">++        register struct nand_chip *this = mtd-&gt;priv;</font>
<font color="#009900">++        struct fcm_nand *fcm = this-&gt;priv;</font>
<font color="#009900">++</font>
<font color="#009900">++#ifdef CONFIG_MTD_NAND_VERIFY_WRITE</font>
<font color="#009900">++        /* arm capture of oob buf ptr on next write_buf */</font>
<font color="#009900">++        fcm-&gt;oobbuf = 0;</font>
<font color="#009900">++#endif</font>
<font color="#009900">++        return 0;</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * fcm_correct_data - Detect and correct bit error(s)</font>
<font color="#009900">++ * The detection and correction is done automatically by the hardware,</font>
<font color="#009900">++ * if the complete page was read. If the status code is okay then there</font>
<font color="#009900">++ * was no error, otherwise we return an error code indicating an uncorrectable</font>
<font color="#009900">++ * error.</font>
<font color="#009900">++ */</font>
<font color="#009900">++static int fcm_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc)</font>
<font color="#009900">++{</font>
<font color="#009900">++        register struct nand_chip *this = mtd-&gt;priv;</font>
<font color="#009900">++        struct fcm_nand *fcm = this-&gt;priv;</font>
<font color="#009900">++</font>
<font color="#009900">++        /* No errors */</font>
<font color="#009900">++        if (fcm-&gt;status == LTESR_CC)</font>
<font color="#009900">++                return 0;</font>
<font color="#009900">++</font>
<font color="#009900">++        return -1; /* uncorrectable error */</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * Dummy scan_bbt to complete setup of the FMR based on NAND size</font>
<font color="#009900">++ */</font>
<font color="#009900">++static int fcm_scan_bbt (struct mtd_info *mtd)</font>
<font color="#009900">++{</font>
<font color="#009900">++        volatile immap_t *im = (immap_t *) CFG_IMMR;</font>
<font color="#009900">++        volatile lbus83xx_t *lbc= &amp;im-&gt;lbus;</font>
<font color="#009900">++        register struct nand_chip *this = mtd-&gt;priv;</font>
<font color="#009900">++        struct fcm_nand *fcm = this-&gt;priv;</font>
<font color="#009900">++        unsigned int i;</font>
<font color="#009900">++        unsigned int al;</font>
<font color="#009900">++</font>
<font color="#009900">++        if (!fcm) {</font>
<font color="#009900">++                printk (KERN_ERR "fcm_scan_bbt():" \</font>
<font color="#009900">++                        " Failed to allocate chip specific data structure\n");</font>
<font color="#009900">++                return -1;</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        /* calculate FMR Address Length field */</font>
<font color="#009900">++        al = 0;</font>
<font color="#009900">++        for (i = this-&gt;pagemask &gt;&gt; 16; i ; i &gt;&gt;= 8) {</font>
<font color="#009900">++                al++;</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        /* add to ECCM mode set in fcm_init */</font>
<font color="#009900">++        fcm-&gt;fmr |= 12 &lt;&lt; FMR_CWTO_SHIFT |  /* Timeout &gt; 12 mSecs */</font>
<font color="#009900">++                    al &lt;&lt; FMR_AL_SHIFT;</font>
<font color="#009900">++</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;options  =   %08X\n", this-&gt;options);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;numchips = %10d\n", this-&gt;numchips);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;chipsize = %10d\n", this-&gt;chipsize);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;pagemask = %10X\n", this-&gt;pagemask);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;eccmode  = %10d\n", this-&gt;eccmode );</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;eccsize  = %10d\n", this-&gt;eccsize );</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;eccbytes = %10d\n", this-&gt;eccbytes);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;eccsteps = %10d\n", this-&gt;eccsteps);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;chip_delay = %8d\n", this-&gt;chip_delay);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;badblockpos = %7d\n", this-&gt;badblockpos);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;chip_shift = %8d\n", this-&gt;chip_shift);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;page_shift = %8d\n", this-&gt;page_shift);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: nand-&gt;phys_erase_shift = %2d\n",</font>
<font color="#009900">++                                                      this-&gt;phys_erase_shift);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: mtd-&gt;flags     =   %08X\n", mtd-&gt;flags);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: mtd-&gt;size      = %10d\n", mtd-&gt;size);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: mtd-&gt;erasesize = %10d\n", mtd-&gt;erasesize);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: mtd-&gt;oobblock  = %10d\n", mtd-&gt;oobblock);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: mtd-&gt;oobsize   = %10d\n", mtd-&gt;oobsize);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: mtd-&gt;oobavail  = %10d\n", mtd-&gt;oobavail);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: mtd-&gt;ecctype   = %10d\n", mtd-&gt;ecctype);</font>
<font color="#009900">++        FCM_DEBUG(1,"fcm_init: mtd-&gt;eccsize   = %10d\n", mtd-&gt;eccsize);</font>
<font color="#009900">++</font>
<font color="#009900">++        /* adjust Option Register and ECC to match Flash page size */</font>
<font color="#009900">++        if (mtd-&gt;oobblock == 512)</font>
<font color="#009900">++                lbc-&gt;bank[fcm-&gt;bank].or &amp;= ~(OR_FCM_PGS);</font>
<font color="#009900">++        else if (mtd-&gt;oobblock == 2048) {</font>
<font color="#009900">++                lbc-&gt;bank[fcm-&gt;bank].or |= OR_FCM_PGS;</font>
<font color="#009900">++                /* adjust ecc setup if needed */</font>
<font color="#009900">++                if ( (lbc-&gt;bank[fcm-&gt;bank].br &amp; BR_DECC) == BR_DECC_CHK_GEN) {</font>
<font color="#009900">++                        mtd-&gt;eccsize = 2048;</font>
<font color="#009900">++                        mtd-&gt;oobavail -= 9;</font>
<font color="#009900">++                        this-&gt;eccmode = NAND_ECC_HW12_2048;</font>
<font color="#009900">++                        this-&gt;eccsize = 2048;</font>
<font color="#009900">++                        this-&gt;eccbytes += 9;</font>
<font color="#009900">++                        this-&gt;eccsteps = 1;</font>
<font color="#009900">++                        this-&gt;autooob = (fcm-&gt;fmr &amp; FMR_ECCM) ?</font>
<font color="#009900">++                                        &amp;fcm_oob_lp_eccm1 : &amp;fcm_oob_lp_eccm0;</font>
<font color="#009900">++                        memcpy(&amp;mtd-&gt;oobinfo, this-&gt;autooob,</font>
<font color="#009900">++                                        sizeof(mtd-&gt;oobinfo));</font>
<font color="#009900">++                }</font>
<font color="#009900">++        }</font>
<font color="#009900">++        else {</font>
<font color="#009900">++                printf("fcm_init: page size %d is not supported\n",</font>
<font color="#009900">++                        mtd-&gt;oobblock);</font>
<font color="#009900">++                return -1;</font>
<font color="#009900">++        }</font>
<font color="#009900">++        fcm-&gt;pgs = (lbc-&gt;bank[fcm-&gt;bank].or&gt;&gt;OR_FCM_PGS_SHIFT) &amp; 1;</font>
<font color="#009900">++</font>
<font color="#009900">++        if (al &gt; 2) {</font>
<font color="#009900">++                printf("fcm_init: %d address bytes is not supported\n", al+2);</font>
<font color="#009900">++                return -1;</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        /* restore default scan_bbt function and call it */</font>
<font color="#009900">++        this-&gt;scan_bbt = nand_default_bbt;</font>
<font color="#009900">++        return nand_default_bbt(mtd);</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++/*</font>
<font color="#009900">++ * Board-specific NAND initialization. The following members of the</font>
<font color="#009900">++ * argument are board-specific (per include/linux/mtd/nand_new.h):</font>
<font color="#009900">++ * - IO_ADDR_R?: address to read the 8 I/O lines of the flash device</font>
<font color="#009900">++ * - IO_ADDR_W?: address to write the 8 I/O lines of the flash device</font>
<font color="#009900">++ * - hwcontrol: hardwarespecific function for accesing control-lines</font>
<font color="#009900">++ * - dev_ready: hardwarespecific function for accesing device ready/busy line</font>
<font color="#009900">++ * - enable_hwecc: function to enable (reset) hardware ecc generator. Must</font>
<font color="#009900">++ *   only be provided if a hardware ECC is available</font>
<font color="#009900">++ * - eccmode: mode of ecc, see defines</font>
<font color="#009900">++ * - chip_delay: chip dependent delay for transfering data from array to</font>
<font color="#009900">++ *   read regs (tR)</font>
<font color="#009900">++ * - options: various chip options. They can partly be set to inform</font>
<font color="#009900">++ *   nand_scan about special functionality. See the defines for further</font>
<font color="#009900">++ *   explanation</font>
<font color="#009900">++ * Members with a "?" were not set in the merged testing-NAND branch,</font>
<font color="#009900">++ * so they are not set here either.</font>
<font color="#009900">++ */</font>
<font color="#009900">++int board_nand_init(struct nand_chip *nand)</font>
<font color="#009900">++{</font>
<font color="#009900">++        volatile immap_t *im = (immap_t *) CFG_IMMR;</font>
<font color="#009900">++        volatile lbus83xx_t *lbc= &amp;im-&gt;lbus;</font>
<font color="#009900">++        struct fcm_nand *fcm;</font>
<font color="#009900">++        unsigned int bank;</font>
<font color="#009900">++</font>
<font color="#009900">++        /* Enable FCM detection of timeouts, ECC errors and completion */</font>
<font color="#009900">++        lbc-&gt;ltedr &amp;= ~(LTESR_FCT | LTESR_PAR | LTESR_CC);</font>
<font color="#009900">++</font>
<font color="#009900">++        fcm = kmalloc (sizeof(struct fcm_nand), GFP_KERNEL);</font>
<font color="#009900">++        if (!fcm) {</font>
<font color="#009900">++                printk (KERN_ERR "board_nand_init():" \</font>
<font color="#009900">++                        " Cannot allocate read buffer data structure\n");</font>
<font color="#009900">++                return;</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        /* Find which chip select bank is being used for this device */</font>
<font color="#009900">++        for (bank=0; bank&lt;8; bank++) {</font>
<font color="#009900">++                if ( (lbc-&gt;bank[bank].br &amp; BR_V) &amp;&amp;</font>
<font color="#009900">++                   ( (lbc-&gt;bank[bank].br &amp; BR_MSEL) == BR_MS_FCM ) &amp;&amp;</font>
<font color="#009900">++                   ( (lbc-&gt;bank[bank].br &amp; BR_BA) ==</font>
<font color="#009900">++                     (lbc-&gt;bank[bank].or &amp; OR_FCM_AM &amp;</font>
<font color="#009900">++                        (unsigned int)(nand-&gt;IO_ADDR_R) ) ) ) {</font>
<font color="#009900">++                        fcm-&gt;bank = bank;</font>
<font color="#009900">++// TODO                        fcm-&gt;fmr = FMR_ECCM; /* rest filled in later */</font>
<font color="#009900">++                        fcm-&gt;fmr = 0; /* rest filled in later */</font>
<font color="#009900">++                        fcm-&gt;read_bytes = 0;</font>
<font color="#009900">++                        fcm-&gt;index = 0;</font>
<font color="#009900">++                        fcm-&gt;pgs = (lbc-&gt;bank[bank].or&gt;&gt;OR_FCM_PGS_SHIFT) &amp; 1;</font>
<font color="#009900">++                        fcm-&gt;base = lbc-&gt;bank[bank].br &amp; BR_BA;</font>
<font color="#009900">++                        fcm-&gt;addr = (unsigned char*) (fcm-&gt;base);</font>
<font color="#009900">++                        nand-&gt;priv = fcm;</font>
<font color="#009900">++                        fcm-&gt;oobbuf = -1;</font>
<font color="#009900">++                        break;</font>
<font color="#009900">++                }</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        if (!nand-&gt;priv) {</font>
<font color="#009900">++                printk (KERN_ERR "board_nand_init():" \</font>
<font color="#009900">++                        " Could not find matching Chip Select\n");</font>
<font color="#009900">++                return -1;</font>
<font color="#009900">++        }</font>
<font color="#009900">++</font>
<font color="#009900">++        /* set up nand options */</font>
<font color="#009900">++        nand-&gt;options = 0;</font>
<font color="#009900">++        /* set up function call table */</font>
<font color="#009900">++        nand-&gt;hwcontrol = fcm_hwcontrol;</font>
<font color="#009900">++        nand-&gt;waitfunc = fcm_wait;</font>
<font color="#009900">++        nand-&gt;read_byte = fcm_read_byte;</font>
<font color="#009900">++        nand-&gt;write_byte = fcm_write_byte;</font>
<font color="#009900">++        nand-&gt;read_word = fcm_read_word;</font>
<font color="#009900">++        nand-&gt;write_word = fcm_write_word;</font>
<font color="#009900">++        nand-&gt;read_buf = fcm_read_buf;</font>
<font color="#009900">++        nand-&gt;verify_buf = fcm_verify_buf;</font>
<font color="#009900">++        nand-&gt;write_buf = fcm_write_buf;</font>
<font color="#009900">++        nand-&gt;cmdfunc = fcm_cmdfunc;</font>
<font color="#009900">++        nand-&gt;scan_bbt = fcm_scan_bbt;</font>
<font color="#009900">++</font>
<font color="#009900">++        /* If CS Base Register selects full hardware ECC then use it */</font>
<font color="#009900">++        if ( ( (lbc-&gt;bank[bank].br &amp; BR_DECC) &gt;&gt; BR_DECC_SHIFT) == 2) {</font>
<font color="#009900">++                /* put in small page settings and adjust later if needed */</font>
<font color="#009900">++                nand-&gt;eccmode = NAND_ECC_HW3_512;</font>
<font color="#009900">++                nand-&gt;autooob = (fcm-&gt;fmr &amp; FMR_ECCM) ?</font>
<font color="#009900">++                                &amp;fcm_oob_sp_eccm1 : &amp;fcm_oob_sp_eccm0;</font>
<font color="#009900">++                nand-&gt;calculate_ecc = fcm_calculate_ecc;</font>
<font color="#009900">++                nand-&gt;correct_data = fcm_correct_data;</font>
<font color="#009900">++                nand-&gt;enable_hwecc = fcm_enable_hwecc;</font>
<font color="#009900">++        } else {</font>
<font color="#009900">++                /* otherwise fall back to default software ECC */</font>
<font color="#009900">++                nand-&gt;eccmode = NAND_ECC_SOFT;</font>
<font color="#009900">++        }</font>
<font color="#009900">++        return 0;</font>
<font color="#009900">++}</font>
<font color="#009900">++</font>
<font color="#009900">++#endif</font>
<font color="#009900">++#endif</font>
<font color="#009900">+diff -urN u-boot-1.3.1.orig/include/configs/MPC8313ERDB.h u-boot-1.3.1/include/configs/MPC8313ERDB.h</font>
<font color="#009900">+--- u-boot-1.3.1.orig/include/configs/MPC8313ERDB.h        2007-12-06 10:21:19.000000000 +0100</font>
<font color="#009900">++++ u-boot-1.3.1/include/configs/MPC8313ERDB.h        2008-01-31 17:36:18.000000000 +0100</font>
<font color="#009900">+@@ -360,6 +360,7 @@</font>
<font color="#009900">+ #define CONFIG_CMD_MII</font>
<font color="#009900">+ #define CONFIG_CMD_DATE</font>
<font color="#009900">+ #define CONFIG_CMD_PCI</font>
<font color="#009900">++#define CONFIG_CMD_NAND</font>
<font color="#009900">+ </font>
<font color="#009900">+ #if defined(CFG_RAMBOOT)</font>
<font color="#009900">+     #undef CONFIG_CMD_ENV</font>
============================================================
<font color="#FF6600">--- MAINTAINERS        5556c9277c3381070987310400058abdd5f4c820</font>
<font color="#009900">+++ MAINTAINERS        df1acfac3b7175de3f71ec85623148d285a64116</font>
<font color="#0000FF">@@ -97,7 +97,8 @@ Recipes:    libexosip2, python-cheetah, </font>
 Website:    http://www.jerryweb.org/
 Machines:   mpc8313e-rdb
 Recipes:    libexosip2, python-cheetah, python-django, python-pyopenssl,
<font color="#FF6600">-Recipes:    pump, squid, squidview</font>
<font color="#009900">+Recipes:    pump, squid, squidview, hostap-daemon, wpa-supplicant, linux,</font>
<font color="#009900">+Recipes:    u-boot</font>
 
 Person:     Joaquim Duran
 Mail:       joaquinduran@adtelecom.es
============================================================
<font color="#FF6600">--- classes/kernel.bbclass        8d92c5a7b6420490dd6b3115e8146b3fc0a0f854</font>
<font color="#009900">+++ classes/kernel.bbclass        8ed575119a74e50c5bcb39266997cba3f60792c2</font>
<font color="#0000FF">@@ -471,7 +471,7 @@ do_deploy() {</font>
         install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin
         package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin
 
<font color="#FF6600">-        if [ -d "${D}lib" ]; then</font>
<font color="#009900">+        if [ -d "${D}/lib" ]; then</font>
         tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${PV}-${PR}-${MACHINE}.tgz -C ${D} lib
         fi
 
============================================================
<font color="#FF6600">--- conf/distro/angstrom-2008.1.conf        6f251e8e8c830f7c3e1ebbed08e46a6c642556d9</font>
<font color="#009900">+++ conf/distro/angstrom-2008.1.conf        dd2138b465f663603f99ce6be674dfd46af8c33f</font>
<font color="#0000FF">@@ -119,11 +119,11 @@ require conf/distro/include/preferred-xo</font>
 require conf/distro/include/preferred-e-versions.inc
 require conf/distro/include/preferred-xorg-versions-X11R7.3.inc
 
<font color="#FF6600">-#avr32 only has patches for binutils 2.17 and gcc 4.2.1 in OE</font>
<font color="#FF6600">-PREFERRED_VERSION_gcc_avr32               = "4.2.1"</font>
<font color="#FF6600">-PREFERRED_VERSION_gcc-cross_avr32         = "4.2.1"</font>
<font color="#FF6600">-PREFERRED_VERSION_gcc-cross-sdk_avr32     = "4.2.1"</font>
<font color="#FF6600">-PREFERRED_VERSION_gcc-cross-initial_avr32 = "4.2.1"</font>
<font color="#009900">+#avr32 only has patches for binutils 2.17 and gcc 4.2.2 in OE</font>
<font color="#009900">+PREFERRED_VERSION_gcc_avr32               = "4.2.2"</font>
<font color="#009900">+PREFERRED_VERSION_gcc-cross_avr32         = "4.2.2"</font>
<font color="#009900">+PREFERRED_VERSION_gcc-cross-sdk_avr32     = "4.2.2"</font>
<font color="#009900">+PREFERRED_VERSION_gcc-cross-initial_avr32 = "4.2.2"</font>
 PREFERRED_VERSION_binutils_avr32 = "2.17"
 PREFERRED_VERSION_binutils-cross_avr32 = "2.17"
 PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17"
============================================================
<font color="#FF6600">--- conf/distro/include/angstrom-uclibc.inc        bd467a8983d81901f98163052c0537bbf2909f15</font>
<font color="#009900">+++ conf/distro/include/angstrom-uclibc.inc        ed3615a8cce5b329c1b4354ca91a98190a64f862</font>
<font color="#0000FF">@@ -16,8 +16,15 @@ BUILD_OPTIMIZATION = "-Os"</font>
 BUILD_OPTIMIZATION = "-Os"
 
 #Gcc will die with 'internal consistency error when using the above optimizations
<font color="#FF6600">-FULL_OPTIMIZATION_avr32 = ""</font>
<font color="#FF6600">-BUILD_OPTIMIZATION_avr32 = ""</font>
<font color="#009900">+#with gcc-4.2.1-atmel.1.0.3 (and probably most other avr32 gcc ports).</font>
<font color="#009900">+#However, some packages require optimizations to compile (e.g. libmad).</font>
<font color="#009900">+#It appears the guilty optimization is "-frename-registers", leaving that one </font>
<font color="#009900">+#out allows the build to proceed normally.  -fexpensive-optimizations may be OK,</font>
<font color="#009900">+#it was removed while debugging an issue that ultimately turned out to be due</font>
<font color="#009900">+#to the ICE fixed by gcc-pr32889.patch.  It needs to be tested again. </font>
<font color="#009900">+#Note that this testing was done without the gcc-pr32889.patch.</font>
<font color="#009900">+FULL_OPTIMIZATION_avr32 = "-Os -fomit-frame-pointer"</font>
 
<font color="#009900">+</font>
 CXXFLAGS += "-fvisibility-inlines-hidden"
 
============================================================
<font color="#FF6600">--- conf/machine/mpc8313e-rdb.conf        9521bcf148591a9c5c88e316475ce8493488eaf2</font>
<font color="#009900">+++ conf/machine/mpc8313e-rdb.conf        ca05aff54fbbce7e6178f63cd81e0262c9607193</font>
<font color="#0000FF">@@ -11,7 +11,7 @@ KERNEL_IMAGETYPE = "uImage"</font>
 
 KERNEL_IMAGETYPE = "uImage"
 
<font color="#FF6600">-PREFERRED_VERSION_u-boot = "1.3.1"</font>
<font color="#009900">+PREFERRED_VERSION_u-boot = "1.3.2"</font>
 UBOOT_MACHINE = "MPC8313ERDB_33_config"
 UBOOT_ENTRYPOINT = "0"
 UBOOT_LOADADDRESS = "0"
============================================================
<font color="#FF6600">--- packages/binutils/binutils.inc        f448bed26fe1742f47791f2fa478603cc6c038b5</font>
<font color="#009900">+++ packages/binutils/binutils.inc        ec08872ebf090adf38f8ae73969a35b3cf0f98ae</font>
<font color="#0000FF">@@ -67,6 +67,11 @@ do_configure () {</font>
 
 do_configure () {
         (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
<font color="#009900">+</font>
<font color="#009900">+        # Fix for issues when system's texinfo version &gt;= 4.10</font>
<font color="#009900">+        # (See https://bugzilla.redhat.com/show_bug.cgi?id=345621)</font>
<font color="#009900">+        sed -i -e "s@egrep 'texinfo.*'@egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|4.[1-9][0-9]+|[5-9])'@" '${S}/configure'</font>
<font color="#009900">+</font>
         oe_runconf
 #
 # must prime config.cache to ensure the build of libiberty
============================================================
<font color="#FF6600">--- packages/binutils/binutils_2.17.bb        22565b10082a0e16f29e89a55311c299acbc31c1</font>
<font color="#009900">+++ packages/binutils/binutils_2.17.bb        99e9c269f46aafaced069158eb736ec2b3c100b9</font>
<font color="#0000FF">@@ -1,6 +1,7 @@ require binutils.inc</font>
 require binutils.inc
<font color="#009900">+require binutils-avr32.inc</font>
 
<font color="#FF6600">-PR = "r4"</font>
<font color="#009900">+PR = "r5"</font>
 
 SRC_URI = \
     "http://ftp.gnu.org/gnu/binutils/binutils-${PV}.tar.bz2 \
<font color="#0000FF">@@ -18,9 +19,14 @@ SRC_URI += "\</font>
         file://300-012_check_ldrunpath_length.patch;patch=1 \
         file://300-001_ld_makefile_patch.patch;patch=1 \
         file://400-mips-ELF_MAXPAGESIZE-4K.patch;patch=1 \
<font color="#FF6600">-        file://500-avr32-atmel.1.3.0.patch;patch=1 \</font>
<font color="#FF6600">-        file://501-avr32-fix-pool-alignment.patch;patch=1 \</font>
 "
<font color="#009900">+# removed in favor of the atmel 1.2.6 patch which is supposedly newer (yes)</font>
<font color="#009900">+#        file://500-avr32-atmel.1.3.0.patch;patch=1 \</font>
<font color="#009900">+#        file://501-avr32-fix-pool-alignment.patch;patch=1 \</font>
 
<font color="#009900">+SRC_URI_append_avr32 = "\</font>
<font color="#009900">+        file://binutils-2.17.atmel.1.2.6.patch.bz2;patch=1 \</font>
<font color="#009900">+"</font>
<font color="#009900">+</font>
 # Zecke's OSX fixes
 SRC_URI += " file://warning-free.patch;patch=1 "
============================================================
<font color="#FF6600">--- packages/gcc/gcc-4.2.2.inc        e1a01a5ff03489319241b841ece209ab4fdcbc72</font>
<font color="#009900">+++ packages/gcc/gcc-4.2.2.inc        6281a032714b397b43955b47208a1dd89efdd74b</font>
<font color="#0000FF">@@ -40,6 +40,13 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc</font>
         file://intermask-bigendian.patch;patch=1 \
 "
 
<font color="#009900">+</font>
<font color="#009900">+SRC_URI_append_avr32 = " \</font>
<font color="#009900">+        file://gcc-4.2.2.atmel.1.0.8.patch.bz2;patch=1 \</font>
<font color="#009900">+        file://901-avr32-no-cond-exec-before-reload-by-default.patch;patch=1 \</font>
<font color="#009900">+"</font>
<font color="#009900">+</font>
<font color="#009900">+</font>
 SRC_URI_append_ep93xx = " \
         file://arm-crunch-saveregs.patch;patch=1 \
         file://arm-crunch-20000320.patch;patch=1 \
============================================================
<font color="#FF6600">--- packages/gdb/gdb-cross.inc        f22b5bdf741d9b9ce7a69086a1b6ff8dc8383420</font>
<font color="#009900">+++ packages/gdb/gdb-cross.inc        fc0d500641c93bb88bc035f650bb82fd9a102324</font>
<font color="#0000FF">@@ -10,6 +10,12 @@ do_configure () {</font>
 # override this function to avoid the autoconf/automake/aclocal/autoheader
 # calls for now
         (cd ${S} &amp;&amp; gnu-configize) || die "failure in running gnu-configize"
<font color="#009900">+</font>
<font color="#009900">+        # Fix for issues when system's texinfo version &gt;= 4.10</font>
<font color="#009900">+        # (See https://bugzilla.redhat.com/show_bug.cgi?id=345621)</font>
<font color="#009900">+        sed -i -e "s@egrep 'texinfo.*'@egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|4.[1-9][0-9]+|[5-9])'@" '${S}/configure'</font>
<font color="#009900">+</font>
<font color="#009900">+</font>
         oe_runconf
 }
 
============================================================
<font color="#FF6600">--- packages/linux/linux-omap2-git/beagleboard/defconfig        ffa35a912f2d6c8016f6ea1d0f7ebb27987a9b28</font>
<font color="#009900">+++ packages/linux/linux-omap2-git/beagleboard/defconfig        6defc6fa96f79492acbfbaed1cc6553abe5edc13</font>
<font color="#0000FF">@@ -1,7 +1,7 @@</font>
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.25-omap1
<font color="#FF6600">-# Thu Apr 24 21:02:00 2008</font>
<font color="#009900">+# Wed Apr 30 11:44:55 2008</font>
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
<font color="#0000FF">@@ -941,9 +941,10 @@ CONFIG_VIDEO_V4L2_COMMON=y</font>
 #
 CONFIG_VIDEO_DEV=y
 CONFIG_VIDEO_V4L2_COMMON=y
<font color="#FF6600">-# CONFIG_VIDEO_V4L1 is not set</font>
<font color="#009900">+CONFIG_VIDEO_ALLOW_V4L1=y</font>
 CONFIG_VIDEO_V4L1_COMPAT=y
 CONFIG_VIDEO_V4L2=y
<font color="#009900">+CONFIG_VIDEO_V4L1=y</font>
 CONFIG_VIDEO_CAPTURE_DRIVERS=y
 # CONFIG_VIDEO_ADV_DEBUG is not set
 # CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
<font color="#0000FF">@@ -973,11 +974,21 @@ CONFIG_VIDEO_WM8775=m</font>
 #
 # Video decoders
 #
<font color="#009900">+# CONFIG_VIDEO_BT819 is not set</font>
<font color="#009900">+# CONFIG_VIDEO_BT856 is not set</font>
<font color="#009900">+# CONFIG_VIDEO_BT866 is not set</font>
<font color="#009900">+# CONFIG_VIDEO_KS0127 is not set</font>
 # CONFIG_VIDEO_OV7670 is not set
 # CONFIG_VIDEO_TCM825X is not set
 # CONFIG_VIDEO_OV9640 is not set
<font color="#009900">+# CONFIG_VIDEO_SAA7110 is not set</font>
<font color="#009900">+# CONFIG_VIDEO_SAA7111 is not set</font>
<font color="#009900">+# CONFIG_VIDEO_SAA7114 is not set</font>
 CONFIG_VIDEO_SAA711X=m
<font color="#009900">+# CONFIG_VIDEO_SAA717X is not set</font>
<font color="#009900">+# CONFIG_VIDEO_SAA7191 is not set</font>
 # CONFIG_VIDEO_TVP5150 is not set
<font color="#009900">+# CONFIG_VIDEO_VPX3220 is not set</font>
 
 #
 # Video and audio decoders
<font color="#0000FF">@@ -993,6 +1004,9 @@ CONFIG_VIDEO_CX2341X=m</font>
 # Video encoders
 #
 # CONFIG_VIDEO_SAA7127 is not set
<font color="#009900">+# CONFIG_VIDEO_SAA7185 is not set</font>
<font color="#009900">+# CONFIG_VIDEO_ADV7170 is not set</font>
<font color="#009900">+# CONFIG_VIDEO_ADV7175 is not set</font>
 
 #
 # Video improvement chips
<font color="#0000FF">@@ -1000,22 +1014,39 @@ CONFIG_VIDEO_VIVI=m</font>
 # CONFIG_VIDEO_UPD64031A is not set
 # CONFIG_VIDEO_UPD64083 is not set
 CONFIG_VIDEO_VIVI=m
<font color="#009900">+# CONFIG_VIDEO_CPIA is not set</font>
<font color="#009900">+# CONFIG_VIDEO_CPIA2 is not set</font>
 CONFIG_VIDEO_SAA5246A=m
 CONFIG_VIDEO_SAA5249=m
<font color="#009900">+# CONFIG_TUNER_3036 is not set</font>
<font color="#009900">+# CONFIG_VIDEO_AU0828 is not set</font>
 CONFIG_V4L_USB_DRIVERS=y
 CONFIG_VIDEO_PVRUSB2=m
 CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR=y
 CONFIG_VIDEO_PVRUSB2_ONAIR_USB2=y
 CONFIG_VIDEO_PVRUSB2_SYSFS=y
<font color="#009900">+# CONFIG_VIDEO_PVRUSB2_DVB is not set</font>
 # CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
 CONFIG_VIDEO_EM28XX=m
 CONFIG_VIDEO_EM28XX_ALSA=m
<font color="#009900">+# CONFIG_VIDEO_EM28XX_DVB is not set</font>
 CONFIG_VIDEO_USBVISION=m
<font color="#009900">+# CONFIG_USB_VICAM is not set</font>
<font color="#009900">+# CONFIG_USB_IBMCAM is not set</font>
<font color="#009900">+# CONFIG_USB_KONICAWC is not set</font>
<font color="#009900">+# CONFIG_USB_QUICKCAM_MESSENGER is not set</font>
 CONFIG_USB_ET61X251=m
<font color="#009900">+# CONFIG_VIDEO_OVCAMCHIP is not set</font>
<font color="#009900">+# CONFIG_USB_W9968CF is not set</font>
<font color="#009900">+# CONFIG_USB_OV511 is not set</font>
<font color="#009900">+# CONFIG_USB_SE401 is not set</font>
 CONFIG_USB_SN9C102=m
<font color="#009900">+# CONFIG_USB_STV680 is not set</font>
 CONFIG_USB_ZC0301=m
<font color="#009900">+# CONFIG_USB_PWC is not set</font>
 CONFIG_USB_ZR364XX=m
 CONFIG_USB_STKWEBCAM=m
<font color="#009900">+# CONFIG_SOC_CAMERA is not set</font>
 # CONFIG_RADIO_ADAPTERS is not set
 CONFIG_DVB_CORE=m
 CONFIG_DVB_CORE_ATTACH=y
<font color="#0000FF">@@ -1094,6 +1125,7 @@ CONFIG_DVB_DIB7000P=m</font>
 CONFIG_DVB_DIB3000MC=m
 CONFIG_DVB_DIB7000M=m
 CONFIG_DVB_DIB7000P=m
<font color="#009900">+# CONFIG_DVB_TDA10048 is not set</font>
 
 #
 # DVB-C (cable) frontends
<font color="#0000FF">@@ -1112,6 +1144,7 @@ CONFIG_DVB_S5H1409=m</font>
 CONFIG_DVB_BCM3510=m
 CONFIG_DVB_LGDT330X=m
 CONFIG_DVB_S5H1409=m
<font color="#009900">+# CONFIG_DVB_AU8522 is not set</font>
 
 #
 # Tuners/PLL support
<font color="#0000FF">@@ -1126,11 +1159,13 @@ CONFIG_DVB_TUNER_XC5000=m</font>
 CONFIG_DVB_TUNER_MT2131=m
 CONFIG_DVB_TUNER_DIB0070=m
 CONFIG_DVB_TUNER_XC5000=m
<font color="#009900">+# CONFIG_DVB_TUNER_ITD1000 is not set</font>
 
 #
 # Miscellaneous devices
 #
 CONFIG_DVB_LNBP21=m
<font color="#009900">+# CONFIG_DVB_ISL6405 is not set</font>
 CONFIG_DVB_ISL6421=m
 CONFIG_DVB_TUA6100=m
 CONFIG_VIDEO_TUNER=m
<font color="#0000FF">@@ -1263,10 +1298,6 @@ CONFIG_SND_SOC=y</font>
 CONFIG_SND_SOC=y
 
 #
<font color="#FF6600">-# SoC Audio support for SuperH</font>
<font color="#FF6600">-#</font>
<font color="#FF6600">-</font>
<font color="#FF6600">-#</font>
 # ALSA SoC audio for Freescale SOCs
 #
 
<font color="#0000FF">@@ -1312,7 +1343,7 @@ CONFIG_USB_SUSPEND=y</font>
 #
 # USB Host Controller Drivers
 #
<font color="#FF6600">-CONFIG_USB_EHCI_HCD=y</font>
<font color="#009900">+CONFIG_USB_EHCI_HCD=m</font>
 CONFIG_OMAP_EHCI_PHY_MODE=y
 # CONFIG_OMAP_EHCI_TLL_MODE is not set
 CONFIG_USB_EHCI_ROOT_HUB_TT=y
<font color="#0000FF">@@ -1434,7 +1465,7 @@ CONFIG_USB_LED=m</font>
 # CONFIG_USB_IDMOUSE is not set
 # CONFIG_USB_FTDI_ELAN is not set
 # CONFIG_USB_APPLEDISPLAY is not set
<font color="#FF6600">-CONFIG_USB_SISUSBVGA=y</font>
<font color="#009900">+CONFIG_USB_SISUSBVGA=m</font>
 CONFIG_USB_SISUSBVGA_CON=y
 # CONFIG_USB_LD is not set
 # CONFIG_USB_TRANCEVIBRATOR is not set
<font color="#0000FF">@@ -1638,7 +1669,6 @@ CONFIG_NFS_V4=y</font>
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 CONFIG_NFS_V4=y
<font color="#FF6600">-# CONFIG_NFS_DIRECTIO is not set</font>
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
============================================================
<font color="#FF6600">--- packages/linux/linux-omap2_git.bb        c46412b985389cdee793c4670885ae00a0bfc7c3</font>
<font color="#009900">+++ packages/linux/linux-omap2_git.bb        d2df9d873b73d322c1d6a7918ef9c8786b091e48</font>
<font color="#0000FF">@@ -2,16 +2,17 @@ FILESDIR = "${@os.path.dirname(bb.data.g</font>
 
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-omap2-git/${MACHINE}"
 
<font color="#FF6600">-SRCREV = "b1224e0086dc0b27a5af1e7b4f59709521569060"</font>
<font color="#009900">+SRCREV = "59586cd959b31f91f29cf96c1d3f8ff52c3c0607"</font>
 
 PV = "2.6.25+git${SRCREV}"
<font color="#FF6600">-PR = "r5"</font>
<font color="#009900">+PR = "r6"</font>
 
 
 SRC_URI = "git://source.mvista.com/git/linux-omap-2.6.git;protocol=git \
<font color="#FF6600">-           file://defconfig"</font>
<font color="#009900">+           file://defconfig"</font>
 
 SRC_URI_append_beagleboard = " file://no-harry-potter.diff;patch=1 \
<font color="#009900">+                               file://usb-timout.patch;patch=1 \</font>
 "
 
 COMPATIBLE_MACHINE = "omap2430sdp|omap2420h4|beagleboard"
============================================================
<font color="#FF6600">--- packages/madwifi/madwifi-ng_r3314-20080131.bb        aa87cb14b8005f3b927e4701b1ae845bf2099ec2</font>
<font color="#009900">+++ packages/madwifi/madwifi-ng_r3314-20080131.bb        24403394f09cfebacade21edca4dbf1c9fe180ba</font>
<font color="#0000FF">@@ -1,8 +1,5 @@</font>
 # Bitbake recipe for the madwifi-ng driver
 
<font color="#FF6600">-DEFAULT_PREFERENCE = "-1"</font>
<font color="#FF6600">-DEFAULT_PREFERENCE_ixp4xx = "1"</font>
<font color="#FF6600">-</font>
 # Disable stripping of kernel modules, since this action strips too
 # much out, and the resulting module won't load.
 INHIBIT_PACKAGE_STRIP = "1"
============================================================
<font color="#FF6600">--- packages/meta/slugos-packages.bb        46c8ac8a7503c5e222ee23a677a92db2e2ea9dcb</font>
<font color="#009900">+++ packages/meta/slugos-packages.bb        f62c22f94a5ba8a475afc6d43721c4e29386ca2e</font>
<font color="#0000FF">@@ -5,7 +5,7 @@ LICENSE = "MIT"</font>
 DESCRIPTION = "Packages that are compatible with the SlugOS firmware"
 HOMEPAGE = "http://www.nslu2-linux.org"
 LICENSE = "MIT"
<font color="#FF6600">-PR = "r51"</font>
<font color="#009900">+PR = "r53"</font>
 CONFLICTS = "db3"
 
 COMPATIBLE_MACHINE = "nslu2|ixp4xx"
<font color="#0000FF">@@ -50,6 +50,7 @@ SLUGOS_PACKAGES = "\</font>
         bluez-utils \
         bluez-hcidump \
         bogofilter \
<font color="#009900">+        bonnie++ \</font>
         boost \
         bridge-utils \
         bzip2 \
<font color="#0000FF">@@ -103,6 +104,7 @@ SLUGOS_PACKAGES = "\</font>
         hdparm \
         ifupdown \
         inetutils \
<font color="#009900">+        iozone3 \</font>
         iperf \
         ipkg-utils \
         iptables \
============================================================
<font color="#FF6600">--- packages/opkg/opkg_svn.bb        bc27245782ad8e3348db57c3d14c9e75b4f1b404</font>
<font color="#009900">+++ packages/opkg/opkg_svn.bb        e034851c3a5985b17cbde739bc5bb59a8c69d323</font>
<font color="#0000FF">@@ -1,6 +1,6 @@ require opkg.inc</font>
 require opkg.inc
 
<font color="#FF6600">-PR = "r3"</font>
<font color="#009900">+PR = "r4"</font>
 
 PACKAGES =+ "libopkg-dev libopkg"
 
<font color="#0000FF">@@ -12,7 +12,7 @@ OPKG_INIT_POSITION_slugos = "41"</font>
 OPKG_INIT_POSITION = "98"
 OPKG_INIT_POSITION_slugos = "41"
 
<font color="#FF6600">-pkg_postinst_opkg () {</font>
<font color="#009900">+pkg_postinst_${PN} () {</font>
 #!/bin/sh
 if [ "x$D" != "x" ]; then
         install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
<font color="#0000FF">@@ -26,7 +26,7 @@ update-alternatives --install ${bindir}/</font>
 update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
 }
 
<font color="#FF6600">-pkg_postrm_opkg () {</font>
<font color="#009900">+pkg_postrm_${PN} () {</font>
 #!/bin/sh
 update-alternatives --remove opkg ${bindir}/opkg-cl
 }
============================================================
<font color="#FF6600">--- packages/u-boot/u-boot_1.3.2.bb        8cfd5293c0214179a38b2304fbd10c77a3912aff</font>
<font color="#009900">+++ packages/u-boot/u-boot_1.3.2.bb        33ac513192e4695c4ea43a787d866c98c2a011ef</font>
<font color="#0000FF">@@ -2,6 +2,11 @@ DEFAULT_PREFERENCE = "-1"</font>
 
 DEFAULT_PREFERENCE = "-1"
 
<font color="#FF6600">-SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2"</font>
<font color="#009900">+PR = "r1"</font>
 
<font color="#009900">+SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \</font>
<font color="#009900">+           file://mpc8313e-rdb-autoboot.patch;patch=1 \</font>
<font color="#009900">+           file://mpc8313e-rdb-mtdparts.patch;patch=1 \</font>
<font color="#009900">+           file://mpc8313e-rdb-nand.patch;patch=1"</font>
<font color="#009900">+</font>
 PACKAGE_ARCH = "${MACHINE_ARCH}"
</tt></pre>