]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Starterkit-4 Release 1.2
authorlothar <lothar>
Fri, 30 May 2008 07:38:38 +0000 (07:38 +0000)
committerlothar <lothar>
Fri, 30 May 2008 07:38:38 +0000 (07:38 +0000)
17 files changed:
MAKEALL
Makefile
board/triton320/config.mk
board/triton320/lowlevel_init.S
board/triton320/nand.c
board/triton320/triton320.c
build.sh
common/cmd_jffs2.c
common/main.c
cpu/pxa/config.mk
cpu/pxa/start.S
drivers/nand/nand_base.c
drivers/nand/nand_bbt.c
include/asm-arm/arch-pxa/pxa-regs.h
include/configs/triton320.h
include/cramfs/cramfs_fs.h
include/linux/mtd/mtd.h

diff --git a/MAKEALL b/MAKEALL
index 81d599b0e5cae6ef9988ed9ab83db09f74f4eff0..5372804f937eaea365a254b2b50c17cfd132a30a 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -220,7 +220,7 @@ LIST_pxa="  \
        adsvix          cerf250         cradle          csb226          \
        delta           innokom         lubbock         pleb2           \
        pxa255_idp      wepep250        xaeniax         xm250           \
-       xsengine        zylonite        triton320                               \
+       xsengine        zylonite        triton320                       \
 "
 
 LIST_ixp="ixdp425      ixdpg425        pdnb3"
@@ -319,10 +319,10 @@ build_target() {
        target=$1
 
        ${MAKE} distclean >/dev/null
-       ${MAKE} ${target}_config
+       ${MAKE} ${target}_config || exit
 
        ${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \
-                               | tee ${LOG_DIR}/$target.ERR
+                               | tee ${LOG_DIR}/$target.ERR || exit
 
        ${CROSS_COMPILE:-ppc_8xx-}size ${BUILD_DIR}/u-boot \
                                | tee -a ${LOG_DIR}/$target.MAKELOG
index 660b3cdaec928bfb559950b7c5b005ed8fb6e785..12b024be7dffd31681af694b45a59ae3b1d29be9 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
-CROSS_COMPILE = arm-linux-
+
 VERSION = 1
 PATCHLEVEL = 1
 SUBLEVEL = 6
index 2969d10ff212391fe954ac67f8fe1d3810f791c5..e80bb16654ef8d946a882256e87ff6eb9b64af46 100755 (executable)
@@ -1,4 +1,7 @@
-####PLATFORM_CPPFLAGS+= -Wa,-mfpu=softvfp 
 #PLATFORM_CPPFLAGS+= -DDEBUG
-TEXT_BASE = 0x800c0000
-#####TEXT_BASE = 0x007c0000
+PLATFORM_CPPFLAGS += -march=armv5 -mtune=xscale
+PLATFORM_CPPFLAGS += -mno-thumb-interwork
+PLATFORM_CPPFLAGS += -mabi=apcs-gnu -mno-thumb-interwork
+PLATFORM_RELFLAGS += -msoft-float -Wa,-mfpu=vfp
+
+TEXT_BASE = 0xa3fc0000
index 8753737fa5afa363971ee18d37c34130968906df..7674540b250898f24bd57844e3242575723d743a 100755 (executable)
 #include <version.h>\r
 #include <asm/arch/pxa-regs.h>\r
 \r
+#define                DAVICOM_RDF     8\r
+#define                DAVICOM_RDN     4\r
+#define                DAVICOM_RT      4       /* VLIO */\r
 \r
-#define                DAVICOM_RDF             4\r
-#define                DAVICOM_RDN     2\r
-#define                DAVICOM_RT              4       /* VLIO */\r
-\r
-#define                DEFAULT_RDF             15\r
-#define                DEFAULT_RDN             15\r
-#define                DEFAULT_RT              0\r
-\r
-\r
+#define                DEFAULT_RDF     15\r
+#define                DEFAULT_RDN     15\r
+#define                DEFAULT_RT      0\r
 \r
+       .equ    UART_LSR,       FFLSR - FFUART\r
+       .equ    UART_THR,       FFTHR - FFUART\r
 \r
 DRAM_SIZE:  .long   CFG_DRAM_SIZE\r
 \r
-/* wait for coprocessor write complete */\r
-.macro CPWAIT reg\r
-       mrc     p15,0,\reg,c2,c0,0\r
-       mov     \reg,\reg\r
-       sub     pc,pc,#4\r
-.endm\r
-\r
-\r
-.macro wait time\r
-       ldr             r2, =OSCR\r
-       mov             r3, #0\r
-       str             r3, [r2]\r
-0:\r
-       ldr             r3, [r2]\r
-       cmp             r3, \time\r
-       bls             0b\r
-.endm\r
-\r
+/* R12 (IP) must not be modified by this code! */\r
 \r
        // macro to print a string\r
-       // modifies r9-r12\r
+       // modifies r9-r11\r
 .macro PRINT_STRING_FF address\r
-       ldr             r9, =\address                   \r
-       ldr             r10, =FFLSR\r
-       ldr             r11, =FFTHR\r
-       \r
-       \r
-12:\r
-       ldr             r12, [r10]              // LSR\r
-       and             r12, r12, #32\r
-       cmp             r12, #32\r
-       bne             12b\r
-       \r
-       ldrb    r12, [r9], #1\r
-       str             r12, [r11]\r
-       cmp             r12, #0\r
-       bne             12b\r
+#if 0\r
+       ldr     r9, =\address\r
+       ldr     r10, =FFUART\r
+2:\r
+       ldr     r11, [r10, #UART_LSR]\r
+       ands    r11, r11, #32\r
+       bne     2b\r
+\r
+       ldrb    r11, [r9], #1\r
+       cmp     r11, #0\r
+       strne   r11, [r10, #UART_THR]\r
+       bne     2b\r
+#endif\r
 .endm\r
 \r
+.macro set_mask reg, mask, val\r
+       ldr     r0, =(\reg)\r
+       ldr     r2, =~(\mask)\r
+       ldr     r1, [r0]\r
+       ldr     r3, =(\val)\r
+       and     r1, r1, r2\r
+       orr     r1, r1, r3\r
+       str     r1, [r0]\r
+.endm\r
 \r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
+.macro wait_mask reg, mask, val\r
+       ldr     r0, =(\reg)\r
+       ldr     r2, =(\mask)\r
+       ldr     r3, =(\val)\r
+1:\r
+       ldr     r1, [r0]\r
+       and     r1, r1, r2\r
+       cmp     r1, r3\r
+       bne     1b\r
+.endm\r
 \r
 /*\r
  *     Memory setup is already done by system boot loader\r
  */\r
-\r
 .globl lowlevel_init\r
 lowlevel_init:\r
-\r
        mov     r8, lr          @ save link register contents\r
-\r
-#if 0\r
-       b 930f\r
-__string_good_1:\r
-\r
-       .ascii "\r\nup to now, it is ok \r\n\0"     \r
-       .balign 4\r
-\r
-930:\r
-       PRINT_STRING_FF __string_good_1\r
-\r
-#endif \r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-       \r
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-@                                                                                                                                                                                                                                                              @\r
-@                                                                                                                                                                                                                                                              @\r
-@                      first enable the clocks we need for the board                                                                                                                                           @\r
-@                                                                                                                                                                                                                                                              @\r
-@                                                                                                                                                                                                                                                              @\r
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-       \r
-\r
-       ldr             r0, =CKENA\r
-       ldr             r2, [r0]\r
-       ldr             r3, =(CKENA_4_NAND | CKENA_10_SRAM | CKENA_9_SMC | CKENA_8_DMC | CKENA_22_FFUART)\r
-       orr             r2, r2, r3\r
-       str             r2, [r0]\r
-\r
-\r
-\r
-\r
-       ldr             r0, =CKENB\r
-       ldr             r2, [r0]\r
-       ldr     r3, =CKENB_7_GPIO\r
-       orr             r2, r2, r3\r
-       str             r2, [r0]\r
-       \r
-\r
-\r
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-@                                                                                                                                                                                                                                                              @\r
-@                                                                                                                                                                                                                                                              @\r
-@                      init GPIO pins now                                                                                                                                                                                                      @\r
-@                                                                                                                                                                                                                                                              @\r
-@                                                                                                                                                                                                                                                              @\r
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-\r
-                                                                                                        \r
-\r
-\r
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
+@                                                                                              @\r
+@ first enable the clocks we need for the board                                                        @\r
+@                                                                                              @\r
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
+__init_clocks:\r
+#if 1\r
+       /* Fixup VCC_APPS voltage settings */\r
+       ldr     r0, =AVCR\r
+       ldr     r1, [r0]\r
+       mvn     r2, #0x20\r
+       and     r1, r1, r2\r
+       orr     r1, #0x0f\r
+       str     r1, [r0]\r
+#endif\r
+       ldr     r0, =CKENA\r
+       ldr     r3, =(CKENA_RSRVD | CKENA_4_NAND | CKENA_10_SRAM | CKENA_9_SMC | CKENA_8_DMC | CKENA_22_FFUART)\r
+       ldr     r2, [r0]\r
+       orr     r2, r2, r3\r
+       str     r2, [r0]\r
+\r
+       ldr     r0, =CKENB\r
+       ldr     r3, =(CKENB_RSRVD | CKENB_7_GPIO)\r
+       ldr     r2, [r0]\r
+       orr     r2, r2, r3\r
+       str     r2, [r0]\r
+\r
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
+@                                                                                      @\r
+@      init GPIO pins now                                                              @\r
+@                                                                                      @\r
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
 __init_GPIO_pins_start:\r
-\r
-       \r
-       \r
-       \r
        @       must set the GPIOs up before any chip selects will work\r
        @       first, clear all values\r
-       ldr             r1,     =0xffffffff\r
+       ldr     r1, =0xffffffff\r
        @ reset all output registers\r
-       ldr             r0,     =GPCR0\r
-       str             r1, [r0], #4\r
-       str             r1, [r0], #4\r
-       str             r1, [r0]\r
-       ldr             r0,     =GPCR3\r
-       str             r1, [r0]\r
-\r
-\r
-\r
-    add     r1, pc,   #(__hal_gpio_init_table_0 - (.+8))               @ load table base \r
-       mov             r3, #GPIO_HIGH                                          @ feature mask of output = high/low\r
-       \r
-       \r
-       ldr             r2, =GPSR0                                                      \r
-       bl              hal_init_gpio_register                          @ Output Set Register for GPIO [31..0]\r
-       bl              hal_init_gpio_register                          @ Output Set Register for GPIO [63..32]\r
-       bl              hal_init_gpio_register                          @ Output Set Register for GPIO [95..64]\r
-       ldr             r2, =GPSR3                                                      \r
-       bl              hal_init_gpio_register                          @ Output Set Register for GPIO [127..96]\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-    add     r1, pc,   #(__hal_gpio_init_table_0 - (.+8))               @ load table base \r
-       mov             r3, #GPIO_DIR_OUTPUT                            @ feature mask of output direction\r
-       \r
-       \r
-       ldr             r2, =GPDR0                                                      \r
-       bl              hal_init_gpio_register                          @ Output Direction Register for GPIO [31..0]\r
-       bl              hal_init_gpio_register                          @ Output Direction Register for GPIO [63..32]\r
-       bl              hal_init_gpio_register                          @ Output Direction Register for GPIO [95..64]\r
-       ldr             r2, =GPDR3                                                      \r
-       bl              hal_init_gpio_register                          @ Output Direction Register for GPIO [127..96]\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-    add     r1, pc,   #(__hal_gpio_init_table_0 - (.+8))               @ load table base \r
-       mov             r3, #GPIO_REDGE                                         @ feature mask of rising edge\r
-       \r
-       \r
-       ldr             r2, =GRER0                                                      \r
-       bl              hal_init_gpio_register                          @ Output Rising Edge Register for GPIO [31..0]\r
-       bl              hal_init_gpio_register                          @ Output Rising Edge Register for GPIO [63..32]\r
-       bl              hal_init_gpio_register                          @ Output Rising Edge Register for GPIO [95..64]\r
-       ldr             r2, =GRER3                                                      \r
-       bl              hal_init_gpio_register                          @ Output Rising Edge Register for GPIO [127..96]\r
-\r
-\r
-\r
-\r
-    add     r1, pc,   #(__hal_gpio_init_table_0 - (.+8))               @ load table base \r
-       mov             r3, #GPIO_FEDGE                                         @ feature mask of rising edge\r
-       \r
-       \r
-       ldr             r2, =GFER0                                                      \r
-       bl              hal_init_gpio_register                          @ Output Falling Edge Register for GPIO [31..0]\r
-       bl              hal_init_gpio_register                          @ Output Falling Edge Register for GPIO [63..32]\r
-       bl              hal_init_gpio_register                          @ Output Falling Edge Register for GPIO [95..64]\r
-       ldr             r2, =GFER3                                                               \r
-       bl              hal_init_gpio_register                          @ Output Falling Edge Register for GPIO [127..96]\r
-\r
-\r
-\r
-\r
+       ldr     r0, =GPCR0\r
+       str     r1, [r0], #4\r
+       str     r1, [r0], #4\r
+       str     r1, [r0]\r
+       ldr     r0, =GPCR3\r
+       str     r1, [r0]\r
+\r
+       ldr     r1, =__hal_gpio_init_table_0\r
+       mov     r3, #GPIO_HIGH                  @ feature mask of output = high/low\r
+\r
+       ldr     r2, =GPSR0\r
+       bl      hal_init_gpio_register          @ Output Set Register for GPIO [31..0]\r
+       bl      hal_init_gpio_register          @ Output Set Register for GPIO [63..32]\r
+       bl      hal_init_gpio_register          @ Output Set Register for GPIO [95..64]\r
+       ldr     r2, =GPSR3\r
+       bl      hal_init_gpio_register          @ Output Set Register for GPIO [127..96]\r
+\r
+       ldr     r1, =__hal_gpio_init_table_0\r
+       mov     r3, #GPIO_DIR_OUTPUT            @ feature mask of output direction\r
+\r
+       ldr     r2, =GPDR0\r
+       bl      hal_init_gpio_register          @ Output Direction Register for GPIO [31..0]\r
+       bl      hal_init_gpio_register          @ Output Direction Register for GPIO [63..32]\r
+       bl      hal_init_gpio_register          @ Output Direction Register for GPIO [95..64]\r
+       ldr     r2, =GPDR3\r
+       bl      hal_init_gpio_register          @ Output Direction Register for GPIO [127..96]\r
+\r
+       ldr     r1, =__hal_gpio_init_table_0\r
+       mov     r3, #GPIO_REDGE                 @ feature mask of rising edge\r
+\r
+       ldr     r2, =GRER0\r
+       bl      hal_init_gpio_register          @ Output Rising Edge Register for GPIO [31..0]\r
+       bl      hal_init_gpio_register          @ Output Rising Edge Register for GPIO [63..32]\r
+       bl      hal_init_gpio_register          @ Output Rising Edge Register for GPIO [95..64]\r
+       ldr     r2, =GRER3\r
+       bl      hal_init_gpio_register          @ Output Rising Edge Register for GPIO [127..96]\r
+\r
+       ldr     r1, =__hal_gpio_init_table_0\r
+       mov     r3, #GPIO_FEDGE                 @ feature mask of rising edge\r
+\r
+       ldr     r2, =GFER0\r
+       bl      hal_init_gpio_register          @ Output Falling Edge Register for GPIO [31..0]\r
+       bl      hal_init_gpio_register          @ Output Falling Edge Register for GPIO [63..32]\r
+       bl      hal_init_gpio_register          @ Output Falling Edge Register for GPIO [95..64]\r
+       ldr     r2, =GFER3\r
+       bl      hal_init_gpio_register          @ Output Falling Edge Register for GPIO [127..96]\r
 \r
        @ reset all edge detect registers\r
-       ldr             r1,     =0xffffffff\r
+       ldr     r1, =0xffffffff\r
        @ reset all output registers\r
-       ldr             r0,     =GEDR0\r
-       str             r1, [r0], #4\r
-       str             r1, [r0], #4\r
-       str             r1, [r0]\r
-       ldr             r0,     =GEDR3\r
-       str             r1, [r0]\r
-               \r
-__init_GPIO_pins_end:  \r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-@                                                                                                                                                                                                                                                              @\r
-@                                                                                                                                                                                                                                                              @\r
-@                         init MPFR now                                                                                                                                                                                                        @\r
-@                                                                                                                                                                                                                                                              @\r
-@                                                                                                                                                                                                                                                              @\r
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-\r
-                                                                                                        \r
-\r
-\r
+       ldr     r0, =GEDR0\r
+       str     r1, [r0], #4\r
+       str     r1, [r0], #4\r
+       str     r1, [r0]\r
+       ldr     r0, =GEDR3\r
+       str     r1, [r0]\r
+__init_GPIO_pins_end:\r
+\r
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
+@                                                                                      @\r
+@      init MPFR now                                                                   @\r
+@                                                                                      @\r
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
 __init_MPFR_start:\r
-       \r
-\r
-       ldr             r2,             =0x40e10000                                                                             @ physical base address of MFPRs\r
-    add     r1,     pc,  #(__hal_MFPR_init_table - (.+8))              @ Address of data for MFPR settings \r
-\r
-\r
+       ldr     r2, =0x40e10000                 @ physical base address of MFPRs\r
+       add     r1, pc, #(__hal_MFPR_init_table - (.+8))        @ Address of data for MFPR settings\r
 1:\r
-       ldrh    r3, [r1], #2                                    @ load offset of MFPR\r
-       cmp             r3, #0\r
-       beq             __init_MFPR_end                                 @ if offset = 0 -> end of table\r
-       add             r3, r3, r2                                              @ r3 = MFPR address now\r
-\r
-       ldrh    r4, [r1], #2                                    @ load bits [31..16]\r
-       mov             r4, r4, lsl #16                                 @ shift it up 16 bits\r
-       ldrh    r5, [r1], #2                                    @ load bits [15..0]\r
-       add             r4,     r4,     r5\r
-\r
-       str             r4, [r3]                                                @ store data\r
-       ldr             r4, [r3]                                                @ dummy read to be sure that the value is stored\r
-       b               1b\r
-\r
-\r
-\r
-               \r
-       \r
-               \r
-__init_MFPR_end:       \r
-\r
-\r
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-@                                                                                                                                                                                                                                                              @\r
-@                                                                                                                                                                                                                                                              @\r
-@                         Initialize static Memory Controller                                                                                                                                                          @\r
-@                                                                                                                                                                                                                                                              @\r
-@                                                                                                                                                                                                                                                              @\r
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-\r
-                                                                                                        \r
-\r
-\r
+       ldrh    r3, [r1], #2                    @ load offset of MFPR\r
+       cmp     r3, #0\r
+       beq     __init_MFPR_end                 @ if offset = 0 -> end of table\r
+       add     r3, r3, r2                      @ r3 = MFPR address now\r
+\r
+       ldrh    r4, [r1], #2                    @ load bits [15..0]\r
+\r
+       str     r4, [r3]                        @ store data\r
+       b       1b\r
+__init_MFPR_end:\r
+       @ Spec. Update MP-5454 (Rev. 0.75 page 93)\r
+       @ clear EMPI SCLK\r
+       ldr     r1, =0x48100100\r
+       @ r3 is zero as exit condition from the loop above\r
+       str     r3, [r1, #0x2c]\r
+       ldr     r3, [r1]\r
+       orr     r3, #0x40000000\r
+       str     r3, [r1]\r
+\r
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
+@                                                                                      @\r
+@      Initialize static Memory Controller                                             @\r
+@                                                                                      @\r
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
 __init_Static_Mem_Contr_start:\r
-\r
-\r
        ldr r0, =CSMSADRCFG             @ Clock Configuration Register\r
-       mov r1, #2      \r
+       mov r1, #2\r
        str r1, [r0]\r
 \r
-\r
-\r
        @ initialise the CS Address Configuration Register\r
-       \r
+\r
        ldr r0, =CSADRCFG0              @ only synchronus flash is allowed\r
-       ldr r1, =CSADRCFG_ALW1  @ not used in the moment\r
+       ldr r1, =CSADRCFG_ALW1          @ not used at the moment\r
        str r1, [r0]\r
 \r
        ldr r0, =CSADRCFG1              @ only synchronus flash is allowed\r
-       ldr r1, =CSADRCFG_ALW1  @ not used in the moment\r
+       ldr r1, =CSADRCFG_ALW1          @ not used at the moment\r
        str r1, [r0]\r
 \r
        ldr r0, =CSADRCFG2              @ only synchronus flash is allowed\r
@@ -317,464 +211,391 @@ __init_Static_Mem_Contr_start:
        str r1, [r0]\r
 \r
        ldr r0, =CSADRCFG3              @ only synchronus flash is allowed\r
-       ldr r1, =CSADRCFG_ALW1  @ not used in the moment\r
+       ldr r1, =CSADRCFG_ALW1          @ not used at the moment\r
        str r1, [r0]\r
 \r
-\r
-\r
-\r
-\r
-\r
-       ldr r0, =MSC0           \r
+#if 0\r
+       ldr r0, =MSC0\r
        ldr r1, = (DEFAULT_RDN<<24) | (DEFAULT_RDF<<20) | (1<<19) | (DEFAULT_RT<<16) | (DEFAULT_RDN<<8) | (DEFAULT_RDF<<4) | (1<<3) | DEFAULT_RT\r
        str r1, [r0]\r
+#endif\r
        ldr r0, =MSC1\r
        ldr r1, =(DEFAULT_RDN<<24) | (DEFAULT_RDF<<20) | (1<<19) | (DEFAULT_RT<<16) | (DAVICOM_RDN<<8) | (DAVICOM_RDF<<4) | (1<<3) | DAVICOM_RT\r
        str r1, [r0]\r
 \r
-\r
        @@@ Compact Flash Setup @@@\r
        ldr r0, =MCMEM0\r
-       ldr r1, =0x0003c80f                                     @ 4081\r
+       ldr r1, =0x0003c80f                     @ 4081\r
        str r1, [r0]\r
-       \r
-       ldr r0, =MCATT0 \r
+\r
+       ldr r0, =MCATT0\r
        ldr r1, =0x0003c80f\r
        str r1, [r0]\r
 \r
        ldr r0, =MCIO0\r
        ldr r1, =0x0003c80f\r
        str r1, [r0]\r
-       \r
+\r
        ldr r0, =CSADRCFG_P\r
        ldr r1, =0x003e080C\r
        str r1, [r0]\r
 \r
        ldr r0, =MECR\r
-       mov r1, #2              @Set the CIT (Card Is There) bit\r
+       mov r1, #2                              @ Set the CIT (Card Is There) bit\r
        str r1, [r0]\r
 \r
-\r
-\r
-\r
 __init_Static_Mem_Contr_end:\r
-\r
-\r
-\r
-\r
-\r
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-@                                                                                                                                                                                                                                                              @\r
-@                                                                                                                                                                                                                                                              @\r
-@                         clear the RDH bit in the ASCR register                                                                                                                                                       @\r
-@                                                                                                                                                                                                                                                              @\r
-@                                                                                                                                                                                                                                                              @\r
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-\r
-\r
-\r
-       ldr             r0, =ASCR\r
-       ldr             r1,     [r0]\r
-       ldr             r2, =0x80000000\r
-       bic             r1, r1, r2\r
-       str             r1, [r0]\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-@                                                                                                                                                                                                                                                              @\r
-@                                                                                                                                                                                                                                                              @\r
-@                         undo Reset for DAVICOM                                                                                                                                                                       @\r
-@                                                                                                                                                                                                                                                              @\r
-@                                                                                                                                                                                                                                                              @\r
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-\r
-\r
-\r
-       ldr             r0, =GPCR3\r
-       ldr             r1,     =0x00000080\r
-       str             r1, [r0]\r
-\r
-\r
-\r
-\r
-\r
-       /* ---------------------------------------------------------------- */\r
-       /* End lowlevel_init                                                     */\r
-       /* ---------------------------------------------------------------- */\r
-\r
+       @ assert UP2OCR[HSOE] (enable USB device port2)\r
+       ldr     r0, =0x40600020 @ base address of UP2OCR\r
+       ldr     r1, [r0]\r
+       orr     r1, #(1 << 17)  @ UP2OCR_HSOE\r
+       str     r1, [r0]\r
+\r
+       @ clear the RDH bit in the ASCR register\r
+       ldr     r0, =ASCR\r
+       ldr     r1, [r0]\r
+       bic     r1, r1, #(1 << 31)              @ RDH\r
+       bic     r1, r1, #0x7                    @ mask off the DxS status bits\r
+       str     r1, [r0]\r
+\r
+       @ deassert Reset for DAVICOM\r
+       ldr     r0, =GPCR3\r
+       ldr     r1, =0x00000080\r
+       str     r1, [r0]\r
 endlowlevel_init:\r
-\r
        mov     pc, r8\r
 \r
 \r
-\r
 hal_init_gpio_register:\r
        @ r1 = table address\r
        @ r2 = register address\r
        @ r3 = feature mask\r
 \r
-       mov r4, #1                                              @ mask register\r
-       mov r5, #0                                              @ this is the register where the value is composed\r
-\r
+       mov     r4, #1          @ mask register\r
+       mov     r5, #0          @ this is the register where the value is composed\r
 1:\r
-       ldrb    r6,     [r1], #1                        @ load table entry, increase pointer\r
-       tst             r6, r3                                  @ test the table entry with feature mask\r
-       orrne   r5, r5, r4                              @ OR mask bit to value if Z=0, means bit was 1\r
-\r
-       movs    r4, r4, lsl #1                  @ shift mask bit\r
-       bne     1b\r
-\r
-       str             r5, [r2], #4                    @ store register and increase address\r
-       mov             pc, lr                                  @ jump back to calling function\r
-\r
-\r
+       ldrb    r6, [r1], #1    @ load table entry, increase pointer\r
+       tst     r6, r3          @ test the table entry with feature mask\r
+       orrne   r5, r5, r4      @ OR mask bit to value if Z=0, means bit was 1\r
 \r
+       movs    r4, r4, lsl #1  @ shift mask bit\r
+       bne     1b\r
 \r
-\r
-\r
-                                                                               \r
+       str     r5, [r2], #4    @ store register and increase address\r
+       mov     pc, lr          @ jump back to calling function\r
 \r
        .balign 32\r
-\r
-\r
-\r
-__hal_MFPR_init_table:                                                          \r
-        .short         0x0124,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO0    -> GPIO Input (GPIO0 key)\r
-        .short         0x0128,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO1    -> GPIO Input (unused) \r
-        .short         0x012C,         0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO2    -> RDY  \r
-        .short         0x0130,         0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO3    -> nCS2 (Ethernet) \r
-        .short         0x0134,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO4    -> GPIO Input (unused)  \r
-        .short         0x028C,         0x0000,         AF_SEL_3 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO5    -> nPIOR  \r
-        .short         0x0290,         0x0000,         AF_SEL_3 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO6    -> nPIOW \r
-        .short         0x0294,         0x0000,         AF_SEL_3 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO7    -> nIOS16\r
-        .short         0x0298,         0x0000,         AF_SEL_3 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO8    -> nPWAIT \r
-        .short         0x029C,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO9    -> GPIO Input (USB Power Detect)  \r
-        .short         0x0458,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO10   -> GPIO Input (USB Cable Detect)  \r
-        .short         0x02A0,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO11   -> GPIO Input (unused)  \r
-        .short         0x02A4,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO12   -> GPIO Input (unused)  \r
-        .short         0x02A8,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO13   -> GPIO Input (unused)  \r
-        .short         0x02AC,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO14   -> GPIO Output (Backlight Enable) \r
-        .short         0x02B0,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO15   -> GPIO Output (nMIC_PWR)   \r
-        .short         0x02B4,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO16   -> GPIO Input (CF-Card BVD1)  \r
-        .short         0x02B8,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO17   -> GPIO Input (CF-Card BVD2)\r
-        .short         0x02BC,     0x0000,             AF_SEL_4 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO18   -> MM1_DAT0\r
-        .short         0x02C0,     0x0000,             AF_SEL_4 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO19   -> MM1_DAT1\r
-        .short         0x02C4,     0x0000,             AF_SEL_4 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO20   -> MM1_DAT2\r
-        .short         0x02C8,     0x0000,             AF_SEL_4 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO21   -> MM1_DAT3\r
-        .short         0x02CC,     0x0000,             AF_SEL_4 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO22   -> MM1_MMCLK\r
-        .short         0x02D0,     0x0000,             AF_SEL_4 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO23   -> MM1_MMCMD\r
-        .short         0x02D4,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO24   -> GPIO Input (unused)\r
-        .short         0x02D8,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO25   -> GPIO Input (unused)\r
-        .short         0x02DC,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO26   -> GPIO Input (unused)\r
-        .short         0x0400,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO27   -> GPIO Input (unused)\r
-        .short         0x0404,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO28   -> GPIO Input (unused)\r
-        .short         0x0408,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO29   -> GPIO Input (unused)\r
-        .short         0x040C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO30   -> GPIO Input (ETN Wakeup)\r
-        .short         0x0410,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO31   -> GPIO Input (ETN Interrupt)\r
-        .short         0x0414,         0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO32   -> SCL\r
-        .short         0x0418,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO33   -> SDA\r
-        .short         0x041C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO34   -> GPIO Input (AC97 IRQ)\r
-        .short         0x0420,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO35   -> AC97_SDATAIN0\r
-        .short         0x0424,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO36   -> GPIO Input (unused)\r
-        .short         0x0428,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO37   -> AC97_SDATAOUT\r
-        .short         0x042C,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO38   -> AC97_SYNC\r
-        .short         0x0430,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO39   -> AC97_BITCLK\r
-        .short         0x0434,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO40   -> nAC97_Reset\r
-        .short         0x0438,     0x0000,             AF_SEL_2 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO41   -> FF_RxD\r
-        .short         0x043C,     0x0000,             AF_SEL_2 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO42   -> FF_TxD\r
-        .short         0x0440,     0x0000,             AF_SEL_2 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO43   -> FF_CTS               \r
-        .short         0x0444,     0x0000,             AF_SEL_2 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO44   -> FF_DCD\r
-        .short         0x0448,     0x0000,             AF_SEL_2 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO45   -> FF_DSR\r
-        .short         0x044C,     0x0000,             AF_SEL_2 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO46   -> FF_RI\r
-        .short         0x0450,     0x0000,             AF_SEL_2 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO47   -> FF_DTR\r
-        .short         0x0454,         0x0000,         AF_SEL_2 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO48   -> FF_RTS  \r
-        .short         0x045C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO49   -> GPIO Input (unused)           \r
-        .short         0x0460,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO50   -> GPIO Input (unused)           \r
-        .short         0x0464,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO51   -> GPIO Input (unused)           \r
-        .short         0x0468,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO52   -> GPIO Input (unused)           \r
-        .short         0x046C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO53   -> GPIO Input (unused)           \r
-        .short         0x0470,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO54   -> GPIO Input (unused)           \r
-        .short         0x0474,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO55   -> GPIO Input (unused)           \r
-        .short         0x0478,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO56   -> GPIO Input (unused)\r
-        .short         0x047C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO57   -> GPIO Input (unused)           \r
-        .short         0x0480,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO58   -> GPIO Input (unused)           \r
-        .short         0x0484,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO59   -> GPIO Input (unused)\r
-        .short         0x0488,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO60   -> GPIO Input (unused)\r
-        .short         0x048C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO61   -> GPIO Input (unused)\r
-        .short         0x0490,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO62   -> GPIO Input (unused)\r
-        .short         0x04B4,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO63   -> LDD[8] \r
-        .short         0x04B8,         0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO64   -> LDD[9]      \r
-        .short         0x04BC,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO65   -> LDD[10]     \r
-        .short         0x04C0,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO66   -> LDD[11]     \r
-        .short         0x04C4,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO67   -> LDD[12]     \r
-        .short         0x04C8,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO68   -> LDD[13]     \r
-        .short         0x04CC,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO69   -> LDD[14]     \r
-        .short         0x04D0,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO70   -> LDD[15]     \r
-        .short         0x04D4,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO71   -> LDD[16]     \r
-        .short         0x04D8,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO72   -> LDD[17]     \r
-        .short         0x04DC,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO73   -> GPIO Input (LCD Header)   \r
-        .short         0x04F0,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO74   -> GPIO Input (LCD Header) \r
-        .short         0x04F4,     0x0000,             AF_SEL_0 |      DRIVE_SLOW_10mA | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO75   -> GPIO Output (userLED red) \r
-        .short         0x04F8,     0x0000,             AF_SEL_0 |      DRIVE_SLOW_10mA | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO76   -> GPIO Output (userLED green) \r
-        .short         0x04FC,     0x0000,             AF_SEL_0 |      DRIVE_SLOW_10mA | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO77   -> GPIO Output (userLED red) \r
-        .short         0x0500,     0x0000,             AF_SEL_0 |      DRIVE_SLOW_10mA | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO78   -> GPIO Output (userLED green) \r
-        .short         0x0504,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO79   -> GPIO Input (unused) \r
-        .short         0x0508,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO80   -> GPIO Input (unused)   \r
-        .short         0x050C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO81   -> GPIO Input (unused)  \r
-        .short         0X0510,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO82   -> GPIO Input (unused)  \r
-        .short         0X0514,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO83   -> GPIO Input (unused)  \r
-        .short         0x0518,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO84   -> GPIO Input (unused)  \r
-        .short         0x051C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO85   -> GPIO Input (unused)  \r
-        .short         0x0520,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO86   -> GPIO Input (unused)  \r
-        .short         0x0524,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO87   -> GPIO Input (unused)  \r
-        .short         0x0528,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO88   -> GPIO Input (unused)  \r
-        .short         0x052C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO89   -> GPIO Input (unused)  \r
-        .short         0x0530,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO90   -> GPIO Input (unused) \r
-        .short         0x0534,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO91   -> GPIO Input (unused) \r
-        .short         0x0538,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO92   -> GPIO Input (unused) \r
-        .short         0x053C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO93   -> GPIO Input (unused) \r
-        .short         0x0540,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO94   -> GPIO Input (unused) \r
-        .short         0x0544,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO95   -> GPIO Input (unused) \r
-        .short         0x0548,         0x0000,         AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO96   -> GPIO Input (unused)   \r
-        .short         0x054C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO97   ->  CF_IREQ_RDY\r
-        .short         0x0550,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO98   ->  CF_CD      \r
-        .short         0x0600,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO99   ->  CF_RESET   \r
-        .short         0x0604,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |                  | PULL_SEL                      @ MFPR GPIO100  ->  GPIO Input (Boot option) \r
-        .short         0x0608,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |                  | PULL_SEL                      @ MFPR GPIO101  ->  GPIO Input (Boot option) \r
-        .short         0x060C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |                                  | PULL_SEL                      @ MFPR GPIO102  ->  GPIO Input (Boot option) \r
-        .short         0x0610,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO103  ->  GPIO Output (ETN_RST)\r
-        .short         0x0614,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO104  ->  GPIO Output (nSD_PWR)\r
-        .short         0x0618,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO105  ->  GPIO Input (nSD_CD) \r
-        .short         0x061C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO106  ->  GPIO Input (nSD_WP) \r
-        .short         0x0620,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO107  -> ICP_TxD \r
-        .short         0x0624,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO108  -> ICP_RxD \r
-        .short         0x0628,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO109  -> BT_RTS  \r
-        .short         0x062C,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO110  -> BT_RxD  \r
-        .short         0x0630,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO111  -> BT_TxD  \r
-        .short         0x0634,         0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN               | PULL_SEL                      @ MFPR GPIO112  -> BT_CTS    \r
-        .short         0x0638,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO113  -> GPIO Input (unused)    \r
-        .short         0x063C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO114  -> GPIO Input (unused)   \r
-        .short         0x0640,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO115  -> GPIO Input (unused)    \r
-        .short         0x0644,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO116  -> GPIO Input (unused)    \r
-        .short         0x0648,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO117  -> GPIO Input (unused)    \r
-        .short         0x064C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO118  -> GPIO Input (unused)    \r
-        .short         0x0650,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO119  -> GPIO Input (unused)    \r
-        .short         0x0654,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO120  -> GPIO Input (unused)    \r
-        .short         0x0658,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO121  -> GPIO Input (unused)    \r
-        .short         0x065C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO122  -> GPIO Input (unused)   \r
-        .short         0x0660,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO123  -> GPIO Input (unused)   \r
-        .short         0x0664,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO124  -> GPIO Input (unused)   \r
-        .short         0x0668,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO125  -> GPIO Input (unused)   \r
-        .short         0x066C,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO126  -> GPIO Input (unused)   \r
-        .short         0x0670,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO127  -> GPIO Input (User Key)  \r
-                                                                                                                                                                 \r
-        .short         0x0674,         0x0000,         AF_SEL_2 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN       | PULL_SEL                      @ MFPR GPIO0_2   ->  1Wire   \r
-        .short         0x0678,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO1_2   ->  unused  \r
-        .short         0x067C,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN       | PULL_SEL                      @ MFPR GPIO2_2   ->  GPIO Output (USBHPEN1 USB Host Power Enable)\r
-        .short         0x0680,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN       | PULL_SEL                      @ MFPR GPIO3_2   ->  GPIO Input (USBHPWR1 USB Host Power Fault)\r
-        .short         0x0684,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO4_2   ->  GPIO Input (unused)  \r
-        .short         0x0688,     0x0000,             AF_SEL_0 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO5_2   ->  GPIO Input (unused)  \r
-        .short         0x0494,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO6_2   ->  LDD[0]  \r
-        .short         0x0498,         0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO7_2   ->  LDD[1]  \r
-        .short         0x049C,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO9_2   ->  LDD[2]  \r
-        .short         0x04A0,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO9_2   ->  LDD[3]  \r
-        .short         0x04A4,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO10_2  ->  LDD[4]  \r
-        .short         0x04A8,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO11_2  ->  LDD[5]  \r
-        .short         0x04AC,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO12_2  ->  LDD[6]  \r
-        .short         0x04B0,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO13_2  ->  LDD[7]  \r
-        .short         0x04E0,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO14_2  ->  FCLK    \r
-        .short         0x04E4,         0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO15_2  ->  LCLK    \r
-        .short         0x04E8,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO16_2  ->  PCLK    \r
-        .short         0x04EC,     0x0000,             AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ MFPR GPIO17_2  ->  BIAS    \r
-\r
-\r
-\r
-\r
-\r
-\r
-@@        .short               0x23C,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ DF_ADDR0\r
-@@        .short               0x240,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ DF_ADDR1\r
-@@        .short               0x244,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ DF_ADDR2\r
-@@        .short               0x248,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ DF_ADDR3                                \r
-@@        .short               0x238,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN       | PULL_SEL                      @ nLLA\r
-@@        .short           0x204,      0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ DF_CLE_NOE\r
-@@             .short          0x208,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ DF_ALE_WE1\r
-@@             .short          0x20C,          0x0000,         AF_SEL_1 |                          EDGE_CLEAR                                                  @ Reserved (INTEL BBU writes this value)\r
-@@             .short          0x210,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ DF_SCLK_E\r
-@@             .short          0x214,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN           | PULL_SEL                  @ nBE0\r
-@@             .short          0x218,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN           | PULL_SEL                  @ nBE1\r
-@@             .short          0x21C,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ DF_ALE_WE2               \r
-@@        .short               0x220,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLDOWN_EN     | PULL_SEL                      @ DF_INT_RnB\r
-@@        .short               0x224,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN           | PULL_SEL                  @ DF_nCS0\r
-@@        .short               0x228,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN           | PULL_SEL                  @ DF_nCS1\r
-@@        .short               0x22C,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN           | PULL_SEL                  @ DF_nWE\r
-@@        .short               0x230,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN           | PULL_SEL                  @ DF_nRE\r
-@@        .short               0x234,          0x0000,         AF_SEL_1 |      DRIVE_FAST_4mA  | EDGE_CLEAR |  PULLUP_EN           | PULL_SEL                  @ nLUA\r
-               .short          0x0000,         0x0000,         0x0000                                                                                                                                  @ table end                                                                                                                                                                                                                                                                     \r
-                                                                               \r
-       \r
-\r
-\r
-\r
-       .equ GPIO_DIR_INPUT,    0\r
-       .equ GPIO_DIR_OUTPUT,   1\r
-       .equ GPIO_LOW,                  0\r
-       .equ GPIO_HIGH,                 2\r
-       .equ GPIO_REDGE,                0x80\r
-       .equ GPIO_FEDGE,                0x40\r
-       .equ GPIO_NOEDGE,               0\r
-       \r
-\r
-\r
-\r
+__hal_MFPR_init_table:\r
+       .short 0x00CC, 1        @ MFPR EMPI SCLK (see Spec. Update Rev 0.75 page 93)\r
+       .short 0x0124, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL @ MFPR GPIO0    -> GPIO Input (GPIO0 key)\r
+        .short 0x0128, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO1    -> GPIO Input (unused)\r
+        .short 0x012C, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO2    -> RDY\r
+        .short 0x0130, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO3    -> nCS2 (Ethernet)\r
+        .short 0x0134, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO4    -> GPIO Input (unused)\r
+        .short 0x028C, AF_SEL_3 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO5    -> nPIOR\r
+        .short 0x0290, AF_SEL_3 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO6    -> nPIOW\r
+        .short 0x0294, AF_SEL_3 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO7    -> nIOS16\r
+        .short 0x0298, AF_SEL_3 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO8    -> nPWAIT\r
+        .short 0x029C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO9    -> GPIO Input (USB Power Detect)\r
+        .short 0x0458, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO10   -> GPIO Input (USB Cable Detect)\r
+        .short 0x02A0, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO11   -> GPIO Input (unused)\r
+        .short 0x02A4, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO12   -> GPIO Input (unused)\r
+        .short 0x02A8, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO13   -> GPIO Input (unused)\r
+        .short 0x02AC, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO14   -> GPIO Output (Backlight Enable)\r
+        .short 0x02B0, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO15   -> GPIO Output (nMIC_PWR)\r
+        .short 0x02B4, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO16   -> GPIO Input (CF-Card BVD1)\r
+        .short 0x02B8, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO17   -> GPIO Input (CF-Card BVD2)\r
+        .short 0x02BC, AF_SEL_4 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO18   -> MM1_DAT0\r
+        .short 0x02C0, AF_SEL_4 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO19   -> MM1_DAT1\r
+        .short 0x02C4, AF_SEL_4 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO20   -> MM1_DAT2\r
+        .short 0x02C8, AF_SEL_4 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO21   -> MM1_DAT3\r
+        .short 0x02CC, AF_SEL_4 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO22   -> MM1_MMCLK\r
+        .short 0x02D0, AF_SEL_4 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO23   -> MM1_MMCMD\r
+        .short 0x02D4, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO24   -> GPIO Input (unused)\r
+        .short 0x02D8, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO25   -> GPIO Input (unused)\r
+        .short 0x02DC, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO26   -> GPIO Input (unused)\r
+        .short 0x0400, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO27   -> GPIO Input (unused)\r
+        .short 0x0404, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO28   -> GPIO Input (unused)\r
+        .short 0x0408, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO29   -> GPIO Input (unused)\r
+        .short 0x040C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO30   -> GPIO Input (ETN Wakeup)\r
+        .short 0x0410, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO31   -> GPIO Input (ETN Interrupt)\r
+        .short 0x0414, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO32   -> SCL\r
+        .short 0x0418, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO33   -> SDA\r
+        .short 0x041C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO34   -> GPIO Input (AC97 IRQ)\r
+        .short 0x0420, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO35   -> AC97_SDATAIN0\r
+        .short 0x0424, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO36   -> GPIO Input (unused)\r
+        .short 0x0428, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO37   -> AC97_SDATAOUT\r
+        .short 0x042C, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO38   -> AC97_SYNC\r
+        .short 0x0430, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO39   -> AC97_BITCLK\r
+        .short 0x0434, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO40   -> nAC97_Reset\r
+        .short 0x0438, AF_SEL_2 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO41   -> FF_RxD\r
+        .short 0x043C, AF_SEL_2 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO42   -> FF_TxD\r
+        .short 0x0440, AF_SEL_2 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO43   -> FF_CTS\r
+        .short 0x0444, AF_SEL_2 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO44   -> FF_DCD\r
+        .short 0x0448, AF_SEL_2 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO45   -> FF_DSR\r
+        .short 0x044C, AF_SEL_2 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO46   -> FF_RI\r
+        .short 0x0450, AF_SEL_2 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO47   -> FF_DTR\r
+        .short 0x0454, AF_SEL_2 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO48   -> FF_RTS\r
+        .short 0x045C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO49   -> GPIO Input (unused)\r
+        .short 0x0460, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO50   -> GPIO Input (unused)\r
+        .short 0x0464, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO51   -> GPIO Input (unused)\r
+        .short 0x0468, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO52   -> GPIO Input (unused)\r
+        .short 0x046C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO53   -> GPIO Input (unused)\r
+        .short 0x0470, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO54   -> GPIO Input (unused)\r
+        .short 0x0474, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO55   -> GPIO Input (unused)\r
+        .short 0x0478, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO56   -> GPIO Input (unused)\r
+        .short 0x047C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO57   -> GPIO Input (unused)\r
+        .short 0x0480, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO58   -> GPIO Input (unused)\r
+        .short 0x0484, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO59   -> GPIO Input (unused)\r
+        .short 0x0488, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO60   -> GPIO Input (unused)\r
+        .short 0x048C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO61   -> GPIO Input (unused)\r
+        .short 0x0490, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO62   -> GPIO Input (unused)\r
+        .short 0x04B4, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO63   -> LDD[8]\r
+        .short 0x04B8, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO64   -> LDD[9]\r
+        .short 0x04BC, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO65   -> LDD[10]\r
+        .short 0x04C0, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO66   -> LDD[11]\r
+        .short 0x04C4, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO67   -> LDD[12]\r
+        .short 0x04C8, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO68   -> LDD[13]\r
+        .short 0x04CC, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO69   -> LDD[14]\r
+        .short 0x04D0, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO70   -> LDD[15]\r
+        .short 0x04D4, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO71   -> LDD[16]\r
+        .short 0x04D8, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO72   -> LDD[17]\r
+        .short 0x04DC, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO73   -> GPIO Input (LCD Header)\r
+        .short 0x04F0, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO74   -> GPIO Input (LCD Header)\r
+        .short 0x04F4, AF_SEL_0 | DRIVE_SLOW_10mA | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO75   -> GPIO Output (userLED red)\r
+        .short 0x04F8, AF_SEL_0 | DRIVE_SLOW_10mA | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO76   -> GPIO Output (userLED green)\r
+        .short 0x04FC, AF_SEL_0 | DRIVE_SLOW_10mA | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO77   -> GPIO Output (userLED red)\r
+        .short 0x0500, AF_SEL_0 | DRIVE_SLOW_10mA | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO78   -> GPIO Output (userLED green)\r
+        .short 0x0504, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO79   -> GPIO Input (unused)\r
+        .short 0x0508, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO80   -> GPIO Input (unused)\r
+        .short 0x050C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO81   -> GPIO Input (unused)\r
+        .short 0X0510, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO82   -> GPIO Input (unused)\r
+        .short 0X0514, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO83   -> GPIO Input (unused)\r
+        .short 0x0518, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO84   -> GPIO Input (unused)\r
+        .short 0x051C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO85   -> GPIO Input (unused)\r
+        .short 0x0520, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO86   -> GPIO Input (unused)\r
+        .short 0x0524, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO87   -> GPIO Input (unused)\r
+        .short 0x0528, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO88   -> GPIO Input (unused)\r
+        .short 0x052C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO89   -> GPIO Input (unused)\r
+        .short 0x0530, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO90   -> GPIO Input (unused)\r
+        .short 0x0534, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO91   -> GPIO Input (unused)\r
+        .short 0x0538, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO92   -> GPIO Input (unused)\r
+        .short 0x053C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO93   -> GPIO Input (unused)\r
+        .short 0x0540, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO94   -> GPIO Input (unused)\r
+        .short 0x0544, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO95   -> GPIO Input (unused)\r
+        .short 0x0548, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO96   -> GPIO Input (unused)\r
+        .short 0x054C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO97   ->  CF_IREQ_RDY\r
+        .short 0x0550, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO98   ->  CF_CD\r
+        .short 0x0600, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO99   ->  CF_RESET\r
+        .short 0x0604, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR |               PULL_SEL        @ MFPR GPIO100  ->  GPIO Input (Boot option)\r
+        .short 0x0608, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR |               PULL_SEL        @ MFPR GPIO101  ->  GPIO Input (Boot option)\r
+        .short 0x060C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR |              PULL_SEL @ MFPR GPIO102  ->  GPIO Input (Boot option)\r
+        .short 0x0610, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO103  ->  GPIO Output (ETN_RST)\r
+        .short 0x0614, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO104  ->  GPIO Output (nSD_PWR)\r
+        .short 0x0618, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO105  ->  GPIO Input (nSD_CD)\r
+        .short 0x061C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO106  ->  GPIO Input (nSD_WP)\r
+        .short 0x0620, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO107  -> ICP_TxD\r
+        .short 0x0624, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO108  -> ICP_RxD\r
+        .short 0x0628, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO109  -> BT_RTS\r
+        .short 0x062C, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO110  -> BT_RxD\r
+        .short 0x0630, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO111  -> BT_TxD\r
+        .short 0x0634, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO112  -> BT_CTS\r
+        .short 0x0638, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO113  -> GPIO Input (unused)\r
+        .short 0x063C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO114  -> GPIO Input (unused)\r
+        .short 0x0640, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO115  -> GPIO Input (unused)\r
+        .short 0x0644, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO116  -> GPIO Input (unused)\r
+        .short 0x0648, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO117  -> GPIO Input (unused)\r
+        .short 0x064C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO118  -> GPIO Input (unused)\r
+        .short 0x0650, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO119  -> GPIO Input (unused)\r
+        .short 0x0654, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO120  -> GPIO Input (unused)\r
+        .short 0x0658, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO121  -> GPIO Input (unused)\r
+        .short 0x065C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO122  -> GPIO Input (unused)\r
+        .short 0x0660, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO123  -> GPIO Input (unused)\r
+        .short 0x0664, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO124  -> GPIO Input (unused)\r
+        .short 0x0668, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO125  -> GPIO Input (unused)\r
+        .short 0x066C, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO126  -> GPIO Input (unused)\r
+        .short 0x0670, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO127  -> GPIO Input (User Key)\r
+\r
+        .short 0x0674, AF_SEL_2 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO0_2   ->  1Wire\r
+        .short 0x0678, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO1_2   ->  unused\r
+        .short 0x067C, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO2_2   ->  GPIO Output (USBHPEN1 USB Host Power Enable)\r
+        .short 0x0680, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL        @ MFPR GPIO3_2   ->  GPIO Input (USBHPWR1 USB Host Power Fault)\r
+        .short 0x0684, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO4_2   ->  GPIO Input (unused)\r
+        .short 0x0688, AF_SEL_0 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO5_2   ->  GPIO Input (unused)\r
+        .short 0x0494, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO6_2   ->  LDD[0]\r
+        .short 0x0498, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO7_2   ->  LDD[1]\r
+        .short 0x049C, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO9_2   ->  LDD[2]\r
+        .short 0x04A0, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO9_2   ->  LDD[3]\r
+        .short 0x04A4, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO10_2  ->  LDD[4]\r
+        .short 0x04A8, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO11_2  ->  LDD[5]\r
+        .short 0x04AC, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO12_2  ->  LDD[6]\r
+        .short 0x04B0, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO13_2  ->  LDD[7]\r
+        .short 0x04E0, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO14_2  ->  FCLK\r
+        .short 0x04E4, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO15_2  ->  LCLK\r
+        .short 0x04E8, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO16_2  ->  PCLK\r
+        .short 0x04EC, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL        @ MFPR GPIO17_2  ->  BIAS\r
+\r
+@@     .short 0x023C, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL @ DF_ADDR0\r
+@@     .short 0x0240, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL @ DF_ADDR1\r
+@@     .short 0x0244, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL @ DF_ADDR2\r
+@@     .short 0x0248, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL @ DF_ADDR3\r
+@@     .short 0x0238, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL @ nLLA\r
+@@     .short 0x0204, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL @ DF_CLE_NOE\r
+@@     .short 0x0208, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL @ DF_ALE_WE1\r
+@@     .short 0x020C, AF_SEL_1 |                   EDGE_CLEAR                          @ Reserved (INTEL BBU writes this value)\r
+@@     .short 0x0210, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL @ DF_SCLK_E\r
+@@     .short 0x0214, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL @ nBE0\r
+@@     .short 0x0218, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL @ nBE1\r
+@@     .short 0x021C, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL @ DF_ALE_WE2\r
+@@     .short 0x0220, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLDOWN_EN | PULL_SEL @ DF_INT_RnB\r
+@@     .short 0x0224, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL @ DF_nCS0\r
+@@     .short 0x0228, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL @ DF_nCS1\r
+@@     .short 0x022C, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL @ DF_nWE\r
+@@     .short 0x0230, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL @ DF_nRE\r
+@@     .short 0x0234, AF_SEL_1 | DRIVE_FAST_4mA  | EDGE_CLEAR | PULLUP_EN   | PULL_SEL @ nLUA\r
+       .short 0x0000, 0x0000                                                                                                                                   @ table end\r
+\r
+       .equ GPIO_DIR_INPUT,    0x00\r
+       .equ GPIO_DIR_OUTPUT,   0x01\r
+       .equ GPIO_LOW,          0x00\r
+       .equ GPIO_HIGH,         0x02\r
+       .equ GPIO_REDGE,        0x80\r
+       .equ GPIO_FEDGE,        0x40\r
+       .equ GPIO_NOEDGE,       0x00\r
 \r
        .balign 4\r
-__hal_gpio_init_table_0:                                                               \r
-/*GPIO  0 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO0             -> GPIO Input (user key)                                 \r
-/*GPIO  1 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO1     -> unused                                   \r
-/*GPIO  2 */           .byte   GPIO_DIR_OUTPUT |       GPIO_NOEDGE | GPIO_LOW      @ GPIO2     -> GPIO Output (USBHPEN1 USB Host Power Enable)                             \r
-/*GPIO  3 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO3     -> GPIO Input (USBHPWR1 USB Host Power Fault)                               \r
-/*GPIO  4 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE     | GPIO_LOW          @ GPIO4     -> unused                                   \r
-/*GPIO  5 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO5     -> unused                                               \r
-/*GPIO  6 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO6     -> unused                                               \r
-/*GPIO  7 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO7     -> unused                                               \r
-/*GPIO  8 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO8     -> unused                                               \r
-/*GPIO  9 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO9     -> GPIO Input (USB Power Detect)                         \r
-/*GPIO 10 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO10    -> GPIO Input (USB Cable Detect)                         \r
-/*GPIO 11 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO11    -> input                                  \r
-/*GPIO 12 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO12    -> input                                  \r
-/*GPIO 13 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO13    -> input                                  \r
-/*GPIO 14 */           .byte   GPIO_DIR_OUTPUT |       GPIO_NOEDGE | GPIO_LOW      @ GPIO14    -> GPIO Output (Backlight Enable)                        \r
-/*GPIO 15 */           .byte   GPIO_DIR_OUTPUT |       GPIO_NOEDGE | GPIO_HIGH     @ GPIO15    -> GPIO Output (nMIC_PWR)                                \r
-/*GPIO 16 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE     | GPIO_LOW          @ GPIO16    -> GPIO Input (CF-Card BVD1)                             \r
-/*GPIO 17 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO17    -> GPIO Input (CF-Card BVD2)                             \r
-/*GPIO 18 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO18    -> unused                                  \r
-/*GPIO 19 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO19    -> unused                                  \r
-/*GPIO 20 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO20    -> unused                                  \r
-/*GPIO 21 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO21    -> unused                                  \r
-/*GPIO 22 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO22    -> unused                                  \r
-/*GPIO 23 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO23    -> unused                                  \r
-/*GPIO 24 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO24    -> unused                                  \r
-/*GPIO 25 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO25    -> unused                                  \r
-/*GPIO 26 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO26    -> unused                                  \r
-/*GPIO 27 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO27    -> unused                                  \r
-/*GPIO 28 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO28    -> unused                                  \r
-/*GPIO 29 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO29    -> unused                                  \r
-/*GPIO 30 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO30    -> GPIO Input (ETN Wakeup)                               \r
-/*GPIO 31 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO31    -> GPIO Input (ETN Interrupt)                            \r
-\r
-__hal_gpio_init_table_32:                                            \r
-/*GPIO 32 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO32    -> unused                                \r
-/*GPIO 33 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO33    -> unused                                \r
-/*GPIO 34 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO34    -> unused                                \r
-/*GPIO 35 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO35    -> unused                                \r
-/*GPIO 36 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE     | GPIO_LOW          @ GPIO36    -> unused                                \r
-/*GPIO 37 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO37    -> unused                                \r
-/*GPIO 38 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO38    -> unused                                \r
-/*GPIO 39 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO39    -> unused                                \r
-/*GPIO 40 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO40    -> unused                                \r
-/*GPIO 41 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO41    -> unused                                  \r
-/*GPIO 42 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO42    -> unused                                  \r
-/*GPIO 43 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO43    -> unused                                  \r
-/*GPIO 44 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO44    -> unused                                  \r
-/*GPIO 45 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO45    -> unused                                  \r
-/*GPIO 46 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO46    -> unused                                  \r
-/*GPIO 47 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO47    -> unused                                  \r
-/*GPIO 48 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE     | GPIO_LOW          @ GPIO48    -> unused                                  \r
-/*GPIO 49 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO49    -> unused                                  \r
-/*GPIO 50 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO50    -> unused                                  \r
-/*GPIO 51 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO51    -> unused                                  \r
-/*GPIO 52 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO52    -> unused                                  \r
-/*GPIO 53 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO53    -> unused                                  \r
-/*GPIO 54 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO54    -> unused                                  \r
-/*GPIO 55 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO55    -> unused                                  \r
-/*GPIO 56 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO56    -> unused                                  \r
-/*GPIO 57 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO57    -> unused                                  \r
-/*GPIO 58 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO58    -> unused                                  \r
-/*GPIO 59 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO59    -> unused                                  \r
-/*GPIO 60 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO60    -> unused                                  \r
-/*GPIO 61 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO61    -> unused                                  \r
-/*GPIO 62 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO62    -> unused                                  \r
-/*GPIO 63 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO63    -> unused                                  \r
-\r
-__hal_gpio_init_table_64:                                            \r
-/*GPIO 64 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO64    -> unused                                               \r
-/*GPIO 65 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO65    -> unused                                               \r
-/*GPIO 66 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO66    -> unused                                               \r
-/*GPIO 67 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO67    -> unused                                               \r
-/*GPIO 68 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE     | GPIO_LOW          @ GPIO68    -> unused                                               \r
-/*GPIO 69 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO69    -> unused                                               \r
-/*GPIO 70 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO70    -> unused                                               \r
-/*GPIO 71 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO71    -> unused                                               \r
-/*GPIO 72 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO72    -> unused                                               \r
-/*GPIO 73 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO73    -> GPIO Input (LCD Header)                               \r
-/*GPIO 74 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO74    -> GPIO Input (LCD Header)                               \r
-/*GPIO 75 */           .byte   GPIO_DIR_OUTPUT |       GPIO_NOEDGE | GPIO_HIGH     @ GPIO75    -> GPIO Output (userLED red)                             \r
-/*GPIO 76 */           .byte   GPIO_DIR_OUTPUT |       GPIO_NOEDGE | GPIO_HIGH     @ GPIO76    -> GPIO Output (userLED green)                           \r
-/*GPIO 77 */           .byte   GPIO_DIR_OUTPUT |       GPIO_NOEDGE | GPIO_HIGH     @ GPIO77    -> GPIO Output (userLED red)                             \r
-/*GPIO 78 */           .byte   GPIO_DIR_OUTPUT |       GPIO_NOEDGE | GPIO_HIGH         @ GPIO78        -> GPIO Output (userLED green)                           \r
-/*GPIO 79 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO79    -> unused                                   \r
-/*GPIO 80 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE     | GPIO_LOW          @ GPIO80    -> unused                                   \r
-/*GPIO 81 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO81    -> unused                                   \r
-/*GPIO 82 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO82    -> unused                                   \r
-/*GPIO 83 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO83    -> unused                                   \r
-/*GPIO 84 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO84    -> unused                                   \r
-/*GPIO 85 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO85    -> unused                                   \r
-/*GPIO 86 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO86    -> unused                                   \r
-/*GPIO 87 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO87    -> unused                                   \r
-/*GPIO 88 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO88    -> unused                                   \r
-/*GPIO 89 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO89    -> unused                                   \r
-/*GPIO 90 */           .byte   GPIO_DIR_OUTPUT |       GPIO_NOEDGE | GPIO_HIGH     @ GPIO90    -> unused                       Test Test Test Test Test Test Test Test Test                                 \r
-/*GPIO 91 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO91    -> unused                                   \r
-/*GPIO 92 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO92    -> unused                                   \r
-/*GPIO 93 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO93    -> unused                                   \r
-/*GPIO 94 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO94    -> unused                                   \r
-/*GPIO 95 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO95    -> unused                                   \r
-\r
-__hal_gpio_init_table_96:                                            \r
-/*GPIO 96 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO96    -> unused                                      \r
-/*GPIO 97 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO97    -> GPIO Input (CF_IREQ_RDY)                                             \r
-/*GPIO 98 */           .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO98    -> GPIO Input (CF_CD)                                                   \r
-/*GPIO 99 */           .byte   GPIO_DIR_OUTPUT |       GPIO_NOEDGE | GPIO_HIGH         @ GPIO99        -> GPIO Output (CF_RESET)                                                \r
-/*GPIO 100 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE     | GPIO_LOW          @ GPIO100   -> GPIO Input (Boot option)                                \r
-/*GPIO 101 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO101   -> GPIO Input (Boot option)                                \r
-/*GPIO 102 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO102   -> GPIO Input (Boot option)                                \r
-/*GPIO 103 */          .byte   GPIO_DIR_OUTPUT |       GPIO_NOEDGE | GPIO_HIGH     @ GPIO103   -> GPIO Output (ETN_RST)                                   \r
-/*GPIO 104 */          .byte   GPIO_DIR_OUTPUT |       GPIO_NOEDGE | GPIO_HIGH     @ GPIO104   -> GPIO Output (nSD_PWR)                                   \r
-/*GPIO 105 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO105   -> GPIO Input (nSD_CD)                                     \r
-/*GPIO 106 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO106   -> GPIO Input (nSD_WP)                                     \r
-/*GPIO 107 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO107   -> unused                                                  \r
-/*GPIO 108 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO108   -> unused                                                  \r
-/*GPIO 109 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO109   -> unused                                                  \r
-/*GPIO 110 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO110   -> unused                                                  \r
-/*GPIO 111 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO111   -> unused                                                  \r
-/*GPIO 112 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE     | GPIO_LOW          @ GPIO112   -> unused                                                  \r
-/*GPIO 113 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO113   -> unused                                      \r
-/*GPIO 114 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO114   -> unused                                      \r
-/*GPIO 115 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO115   -> unused                                      \r
-/*GPIO 116 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO116   -> unused                                      \r
-/*GPIO 117 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO117   -> unused                                      \r
-/*GPIO 118 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO118   -> unused                                      \r
-/*GPIO 119 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO119   -> unused                                      \r
-/*GPIO 120 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO120   -> unused                                      \r
-/*GPIO 121 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO121   -> unused                                   \r
-/*GPIO 122 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO122   -> unused                                      \r
-/*GPIO 123 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO123   -> unused                                      \r
-/*GPIO 124 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO124   -> unused                                      \r
-/*GPIO 125 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO125   -> unused                                      \r
-/*GPIO 126 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO126   -> unused                                      \r
-/*GPIO 127 */          .byte   GPIO_DIR_INPUT  |       GPIO_NOEDGE | GPIO_LOW      @ GPIO127   -> GPIO Input (User Key)                                    \r
-                                                                                                                                                           \r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
+__hal_gpio_init_table_0:\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO0   -> GPIO Input (user key)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO1   -> unused\r
+       .byte GPIO_DIR_OUTPUT | GPIO_NOEDGE | GPIO_LOW  @ GPIO2   -> GPIO Output (USBHPEN1 USB Host Power Enable)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO3   -> GPIO Input (USBHPWR1 USB Host Power Fault)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO4   -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO5   -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO6   -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO7   -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO8   -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO9   -> GPIO Input (USB Power Detect)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO10  -> GPIO Input (USB Cable Detect)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO11  -> input\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO12  -> input\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO13  -> input\r
+       .byte GPIO_DIR_OUTPUT | GPIO_NOEDGE | GPIO_LOW  @ GPIO14  -> GPIO Output (Backlight Enable)\r
+       .byte GPIO_DIR_OUTPUT | GPIO_NOEDGE | GPIO_HIGH @ GPIO15  -> GPIO Output (nMIC_PWR)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO16  -> GPIO Input (CF-Card BVD1)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO17  -> GPIO Input (CF-Card BVD2)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO18  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO19  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO20  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO21  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO22  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO23  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO24  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO25  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO26  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO27  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO28  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO29  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO30  -> GPIO Input (ETN Wakeup)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO31  -> GPIO Input (ETN Interrupt)\r
+\r
+__hal_gpio_init_table_32:\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO32  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO33  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO34  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO35  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO36  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO37  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO38  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO39  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO40  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO41  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO42  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO43  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO44  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO45  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO46  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO47  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO48  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO49  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO50  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO51  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO52  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO53  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO54  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO55  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO56  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO57  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO58  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO59  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO60  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO61  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO62  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO63  -> unused\r
+\r
+__hal_gpio_init_table_64:\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO64  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO65  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO66  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO67  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO68  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO69  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO70  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO71  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO72  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO73  -> GPIO Input (LCD Header)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO74  -> GPIO Input (LCD Header)\r
+       .byte GPIO_DIR_OUTPUT | GPIO_NOEDGE | GPIO_HIGH @ GPIO75  -> GPIO Output (userLED red)\r
+       .byte GPIO_DIR_OUTPUT | GPIO_NOEDGE | GPIO_HIGH @ GPIO76  -> GPIO Output (userLED green)\r
+       .byte GPIO_DIR_OUTPUT | GPIO_NOEDGE | GPIO_HIGH @ GPIO77  -> GPIO Output (userLED red)\r
+       .byte GPIO_DIR_OUTPUT | GPIO_NOEDGE | GPIO_HIGH @ GPIO78  -> GPIO Output (userLED green)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO79  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO80  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO81  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO82  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO83  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO84  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO85  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO86  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO87  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO88  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO89  -> unused\r
+       .byte GPIO_DIR_OUTPUT | GPIO_NOEDGE | GPIO_HIGH @ GPIO90  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO91  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO92  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO93  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO94  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO95  -> unused\r
+\r
+__hal_gpio_init_table_96:\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO96  -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO97  -> GPIO Input (CF_IREQ_RDY)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO98  -> GPIO Input (CF_CD)\r
+       .byte GPIO_DIR_OUTPUT | GPIO_NOEDGE | GPIO_HIGH @ GPIO99  -> GPIO Output (CF_RESET)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO100 -> GPIO Input (Boot option)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO101 -> GPIO Input (Boot option)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO102 -> GPIO Input (Boot option)\r
+       .byte GPIO_DIR_OUTPUT | GPIO_NOEDGE | GPIO_HIGH @ GPIO103 -> GPIO Output (ETN_RST)\r
+       .byte GPIO_DIR_OUTPUT | GPIO_NOEDGE | GPIO_HIGH @ GPIO104 -> GPIO Output (nSD_PWR)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO105 -> GPIO Input (nSD_CD)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO106 -> GPIO Input (nSD_WP)\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO107 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO108 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO109 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO110 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO111 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO112 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO113 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO114 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO115 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO116 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO117 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO118 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO119 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO120 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO121 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO122 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO123 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO124 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO125 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO126 -> unused\r
+       .byte GPIO_DIR_INPUT | GPIO_NOEDGE | GPIO_LOW   @ GPIO127 -> GPIO Input (User Key)\r
index 17e1175de1523ead19c8207f9d1d5392f35c8bfa..819d5ce5afe650307c6b2b369391866d8a829e04 100755 (executable)
@@ -1,5 +1,8 @@
 /*
- * (C) Copyright 2006 DENX Software Engineering
+ * (C) Copyright 2007 KA-Ro electronics GmbH
+ *
+ * based on:
+ * board/zylonite/nand.c (C) Copyright 2006 DENX Software Engineering
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -24,7 +27,7 @@
 #define NAND_RESET_COMMAND 0x80000000
 
 #if (CONFIG_COMMANDS & CFG_CMD_NAND)
-#ifdef CONFIG_NEW_NAND_CODE
+#ifndef CONFIG_NAND_LEGACY
 
 #include <nand.h>
 #include <asm/arch/pxa-regs.h>
@@ -56,17 +59,14 @@ uint8_t             partial_buffer[2048+64];        /* used to handle partial writes in case of na
 int                    partial_page;
 int                    partial_pointer;                
 
-
-
-
-static struct nand_bbt_descr delta_bbt_descr = {
+static struct nand_bbt_descr triton320_bbt_descr = {
        .options = 0,
        .offs = 0,
        .len = 2,
        .pattern = scan_ff_pattern
 };
 
-static struct nand_oobinfo delta_oob = {
+static struct nand_oobinfo triton320_oob = {
        .useecc = MTD_NANDECC_AUTOPL_USR, /* MTD_NANDECC_PLACEONLY, */
        .eccbytes = 24,
        .eccpos = {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37},
@@ -82,9 +82,6 @@ static void dfc_hwcontrol(struct mtd_info *mtdinfo, int cmd)
        return;
 }
 
-
-
-
 #if 0
 /* read device ready pin */
 static int dfc_device_ready(struct mtd_info *mtdinfo)
@@ -97,10 +94,6 @@ static int dfc_device_ready(struct mtd_info *mtdinfo)
 }
 #endif
 
-
-
-
-
 /*
  * Write buf to the DFC Controller Data Buffer
  */
@@ -111,23 +104,25 @@ static void dfc_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
        unsigned long *long_buf;
        int i;
 
-       if(!partial_page) {
-               DFC_DEBUG2("dfc_write_buf: writing %d bytes starting with 0x%x .\n", len, *((unsigned long*) buf));
-               if(bytes_multi) {
-                       for(i=0; i<bytes_multi; i+=4) {
-                               long_buf = (unsigned long*) &buf[i];
+       if (!partial_page) {
+               DFC_DEBUG2("dfc_write_buf: writing %d bytes starting with 0x%x .\n",
+                          len, *((unsigned long*)buf));
+               if (bytes_multi) {
+                       for (i = 0; i < bytes_multi; i += 4) {
+                               long_buf = (unsigned long*)&buf[i];
                                NDDB = *long_buf;
                        }
                }
        
-               if(rest) {
+               if (rest) {
                        printf("dfc_write_buf: ERROR, writing non 4-byte aligned data.\n");
                }
                return;
        } else {
-               DFC_DEBUG2("dfc_write_buf: writing %d bytes starting with 0x%x to local buffer.\n", len, *((unsigned long*) buf));
-               for(i=0; i<len; i++) {
-                       partial_buffer[partial_pointer+i]=buf[i];
+               DFC_DEBUG2("dfc_write_buf: writing %d bytes starting with 0x%x to local buffer.\n",
+                          len, *((unsigned long*)buf));
+               for (i = 0; i < len; i++) {
+                       partial_buffer[partial_pointer + i] = buf[i];
                }
        }
 }
@@ -169,17 +164,17 @@ static void dfc_read_buf(struct mtd_info *mtd, u_char* const buf, int len)
 
        DFC_DEBUG3("dfc_read_buf: reading %d bytes.\n", len);
        /* if there are any, first copy multiple of 4 bytes */
-       if(bytes_multi) {
-               for(i=0; i<bytes_multi; i+=4) {
+       if (bytes_multi) {
+               for (i=0; i<bytes_multi; i+=4) {
                        long_buf = (unsigned long*) &buf[i];
                        *long_buf = NDDB;
                }
        }
 
        /* ...then the rest */
-       if(rest) {
+       if (rest) {
                unsigned long rest_data = NDDB;
-               for(j=0;j<rest; j++)
+               for (j=0;j<rest; j++)
                        buf[i+j] = (u_char) ((rest_data>>j) & 0xff);
        }
 
@@ -231,24 +226,13 @@ static u_char dfc_read_byte(struct mtd_info *mtd)
        return byte;
 }
 
-/* calculate delta between OSCR values start and now  */
-static unsigned long get_delta(unsigned long start)
-{
-       unsigned long cur = OSCR;
-
-       if(cur < start) /* OSCR overflowed */
-               return (cur + (start^0xffffffff));
-       else
-               return (cur - start);
-}
-
 /* delay function, this doesn't belong here */
 static void wait_us(unsigned long us)
 {
        unsigned long start = OSCR;
        us *= OSCR_CLK_FREQ;
 
-       while (get_delta(start) < us) {
+       while ((OSCR - start) < us) {
                /* do nothing */
        }
 }
@@ -264,20 +248,20 @@ static unsigned long dfc_wait_event(unsigned long event)
 {
        unsigned long ndsr, timeout, start = OSCR;
 
-       if(!event)
+       if (!event)
                return 0xff000000;
-       else if(event & (NDSR_CS0_CMDD | NDSR_CS0_BBD))
+       else if (event & (NDSR_CS0_CMDD | NDSR_CS0_BBD))
                timeout = CFG_NAND_PROG_ERASE_TO * OSCR_CLK_FREQ;
        else
                timeout = CFG_NAND_OTHER_TO * OSCR_CLK_FREQ;
 
        while(1) {
                ndsr = NDSR;
-               if(ndsr & event) {
+               if (ndsr & event) {
                        NDSR |= event;
                        break;
                }
-               if(get_delta(start) > timeout) {
+               if ((OSCR - start) > timeout) {
                        DFC_DEBUG1("dfc_wait_event: TIMEOUT waiting for event: 0x%x      timeout: %d ticks   status register: 0x%08X  control register: 0x%08X.\n", event, timeout, ndsr, NDCR);
                        return 0xff000000;
                }
@@ -330,7 +314,6 @@ static int dfc_wait(struct mtd_info *mtd, struct nand_chip *this, int state)
        return 0;
 }
 
-
 /* cmdfunc send commands to the DFC */
 static void dfc_cmdfunc(struct mtd_info *mtd, unsigned command,
                        int column, int page_addr)
@@ -369,8 +352,8 @@ static void dfc_cmdfunc(struct mtd_info *mtd, unsigned command,
                /* sent as a multicommand in NAND_CMD_SEQIN */
                DFC_DEBUG2("dfc_cmdfunc: NAND_CMD_PAGEPROG empty due to multicmd.\n");
                if(partial_page) {
-                       partial_page=0;
-                       dfc_write_buf(mtd, partial_buffer, 2048+64);    /* write back the partial buffer */
+                       partial_page = 0;
+                       dfc_write_buf(mtd, partial_buffer, 2048 + 64);  /* write back the partial buffer */
                }
                goto end;
        case NAND_CMD_ERASE1:
@@ -389,19 +372,20 @@ static void dfc_cmdfunc(struct mtd_info *mtd, unsigned command,
                        DFC_DEBUG3("dfc_cmdfunc: NAND_CMD_READ0, page_addr: 0x%x, column: 0x%x.\n", page_addr, column);
                        dfc_new_cmd();
                        NDCB0 = (NAND_CMD_READ0  | (NAND_CMD_READSTART<<8) | (4<<16) | (1<<19));
-                       NDCB0 = (column & 0xfff) |  ((page_addr & 0xffff)<<16);
+                       NDCB0 = (page_addr & 0xffff) << 16;
                        NDCB0 = 0;
                        event = NDSR_RDDREQ;
                        dfc_wait_event(event);
-                       dfc_read_buf(mtd, partial_buffer, 2048+64); /* this works in that way only for large page */
+                       dfc_read_buf(mtd, partial_buffer, 2048 + 64); /* this works in that way only for large page */
                } else {
                        partial_page = 0;
                }
-                       
+
                dfc_new_cmd();
                DFC_DEBUG2("dfc_cmdfunc: NAND_CMD_SEQIN/PAGE_PROG,  page_addr: 0x%x, column: 0x%x.\n", page_addr, column);
                ndcb0 = (0x1080 | (1<<25) | (1<<21) | (1<<19) | (4<<16));
-               ndcb1 = (column & 0xfff) |  ((page_addr & 0xffff)<<16);
+               /* column address must be 0 since we cannot write partial pages */
+               ndcb1 = (page_addr & 0xffff)<<16;
                ndcb2 = 0;
                event = NDSR_WRDREQ;
                goto write_cmd;
@@ -441,50 +425,13 @@ static void dfc_cmdfunc(struct mtd_info *mtd, unsigned command,
        return;
 }
 
-static void dfc_gpio_init(void)
-{
-       DFC_DEBUG2("Setting up DFC GPIO's.\n");
-
-       /* no idea what is done here, see triton320.c */
-       GPIO4 = 0x1;
-
-       DF_ALE_WE1 = 0x00000001;
-       DF_ALE_WE2 = 0x00000001;
-       DF_nCS0 = 0x00000001;
-       DF_nCS1 = 0x00000001;
-       DF_nWE = 0x00000001;
-       DF_nRE = 0x00000001;
-       DF_IO0 = 0x00000001;
-       DF_IO8 = 0x00000001;
-       DF_IO1 = 0x00000001;
-       DF_IO9 = 0x00000001;
-       DF_IO2 = 0x00000001;
-       DF_IO10 = 0x00000001;
-       DF_IO3 = 0x00000001;
-       DF_IO11 = 0x00000001;
-       DF_IO4 = 0x00000001;
-       DF_IO12 = 0x00000001;
-       DF_IO5 = 0x00000001;
-       DF_IO13 = 0x00000001;
-       DF_IO6 = 0x00000001;
-       DF_IO14 = 0x00000001;
-       DF_IO7 = 0x00000001;
-       DF_IO15 = 0x00000001;
-
-       DF_nWE = 0x1901;
-       DF_nRE = 0x1901;
-       DF_CLE_NOE = 0x1900;
-       DF_ALE_WE1 = 0x1901;
-       DF_INT_RnB = 0x1900;
-}
-
 /*
  * Board-specific NAND initialization. The following members of the
  * argument are board-specific (per include/linux/mtd/nand_new.h):
  * - IO_ADDR_R?: address to read the 8 I/O lines of the flash device
  * - IO_ADDR_W?: address to write the 8 I/O lines of the flash device
- * - hwcontrol: hardwarespecific function for accesing control-lines
- * - dev_ready: hardwarespecific function for  accesing device ready/busy line
+ * - hwcontrol: hardwarespecific function for accessing control-lines
+ * - dev_ready: hardwarespecific function for  accessing device ready/busy line
  * - enable_hwecc?: function to enable (reset)  hardware ecc generator. Must
  *   only be provided if a hardware ECC is available
  * - eccmode: mode of ecc, see defines
@@ -499,119 +446,6 @@ static void dfc_gpio_init(void)
 void board_nand_init(struct nand_chip *nand)
 {
        unsigned long value;
-#if 0          /* this is already done by low level board initialisation */
-       unsigned long tCH, tCS, tWH, tWP, tRH, tRP, tRP_high, tR, tWHR, tAR;
-
-       /* set up GPIO Control Registers */
-       /*dfc_gpio_init(); */  /* should be done by the low level board initialisation */
-
-       /* turn on the NAND Controller Clock (104 MHz @ D0) */
-       CKENA |= (CKENA_4_NAND | CKENA_9_SMC);
-
-#undef CFG_TIMING_TIGHT
-#ifndef CFG_TIMING_TIGHT
-       tCH = MIN(((unsigned long) (NAND_TIMING_tCH * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tCH);
-       tCS = MIN(((unsigned long) (NAND_TIMING_tCS * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tCS);
-       tWH = MIN(((unsigned long) (NAND_TIMING_tWH * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tWH);
-       tWP = MIN(((unsigned long) (NAND_TIMING_tWP * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tWP);
-       tRH = MIN(((unsigned long) (NAND_TIMING_tRH * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tRH);
-       tRP = MIN(((unsigned long) (NAND_TIMING_tRP * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tRP);
-       tR = MIN(((unsigned long) (NAND_TIMING_tR * DFC_CLK_PER_US) + 1),
-                DFC_MAX_tR);
-       tWHR = MIN(((unsigned long) (NAND_TIMING_tWHR * DFC_CLK_PER_US) + 1),
-                  DFC_MAX_tWHR);
-       tAR = MIN(((unsigned long) (NAND_TIMING_tAR * DFC_CLK_PER_US) + 1),
-                 DFC_MAX_tAR);
-#else /* this is the tight timing */
-
-       tCH = MIN(((unsigned long) (NAND_TIMING_tCH * DFC_CLK_PER_US)),
-                 DFC_MAX_tCH);
-       tCS = MIN(((unsigned long) (NAND_TIMING_tCS * DFC_CLK_PER_US)),
-                 DFC_MAX_tCS);
-       tWH = MIN(((unsigned long) (NAND_TIMING_tWH * DFC_CLK_PER_US)),
-                 DFC_MAX_tWH);
-       tWP = MIN(((unsigned long) (NAND_TIMING_tWP * DFC_CLK_PER_US)),
-                 DFC_MAX_tWP);
-       tRH = MIN(((unsigned long) (NAND_TIMING_tRH * DFC_CLK_PER_US)),
-                 DFC_MAX_tRH);
-       tRP = MIN(((unsigned long) (NAND_TIMING_tRP * DFC_CLK_PER_US)),
-                 DFC_MAX_tRP);
-       tR = MIN(((unsigned long) (NAND_TIMING_tR * DFC_CLK_PER_US) - tCH - 2),
-                DFC_MAX_tR);
-       tWHR = MIN(((unsigned long) (NAND_TIMING_tWHR * DFC_CLK_PER_US) - tCH - 2),
-                  DFC_MAX_tWHR);
-       tAR = MIN(((unsigned long) (NAND_TIMING_tAR * DFC_CLK_PER_US) - 2),
-                 DFC_MAX_tAR);
-#endif /* CFG_TIMING_TIGHT */
-
-
-       DFC_DEBUG2("tCH=%u, tCS=%u, tWH=%u, tWP=%u, tRH=%u, tRP=%u, tR=%u, tWHR=%u, tAR=%u.\n", tCH, tCS, tWH, tWP, tRH, tRP, tR, tWHR, tAR);
-
-       /* tRP value is split in the register */
-       if(tRP & (1 << 4)) {
-               tRP_high = 1;
-               tRP &= ~(1 << 4);
-       } else {
-               tRP_high = 0;
-       }
-
-       NDTR0CS0 = (tCH << 19) |
-               (tCS << 16) |
-               (tWH << 11) |
-               (tWP << 8) |
-               (tRP_high << 6) |
-               (tRH << 3) |
-               (tRP << 0);
-
-       NDTR1CS0 = (tR << 16) |
-               (tWHR << 4) |
-               (tAR << 0);
-
-       /* If it doesn't work (unlikely) think about:
-        *  - ecc enable
-        *  - chip select don't care
-        *  - read id byte count
-        *
-        * Intentionally enabled by not setting bits:
-        *  - dma (DMA_EN)
-        *  - page size = 512
-        *  - cs don't care, see if we can enable later!
-        *  - row address start position (after second cycle)
-        *  - pages per block = 32
-        *  - ND_RDY : clears command buffer
-        */
-       /* NDCR_NCSX |          /\* Chip select busy don't care *\/ */
-
-       NDCR = (NDCR_SPARE_EN |         /* use the spare area */
-               NDCR_DWIDTH_C |         /* 16bit DFC data bus width  */
-               NDCR_DWIDTH_M |         /* 16 bit Flash device data bus width */
-               (2 << 16) |             /* read id count = 7 ???? mk@tbd */
-               NDCR_ND_ARB_EN |        /* enable bus arbiter */
-               NDCR_RDYM |             /* flash device ready ir masked */
-               NDCR_CS0_PAGEDM |       /* ND_nCSx page done ir masked */
-               NDCR_CS1_PAGEDM |
-               NDCR_CS0_CMDDM |        /* ND_CSx command done ir masked */
-               NDCR_CS1_CMDDM |
-               NDCR_CS0_BBDM |         /* ND_CSx bad block detect ir masked */
-               NDCR_CS1_BBDM |
-               NDCR_DBERRM |           /* double bit error ir masked */
-               NDCR_SBERRM |           /* single bit error ir masked */
-               NDCR_WRDREQM |          /* write data request ir masked */
-               NDCR_RDDREQM |          /* read data request ir masked */
-               NDCR_WRCMDREQM);        /* write command request ir masked */
-
-
-       /* wait 10 us due to cmd buffer clear reset */
-       /*      wait(10); */
-
-#endif
-
 
        value = NDCR & ~(NDCR_ECC_EN); /* clear hardware ECC */
        NDCR = value;
@@ -629,8 +463,8 @@ void board_nand_init(struct nand_chip *nand)
        nand->write_buf = dfc_write_buf;
 
        nand->cmdfunc = dfc_cmdfunc;
-       nand->autooob = &delta_oob;
-       nand->badblock_pattern = &delta_bbt_descr;
+       nand->autooob = &triton320_oob;
+       nand->badblock_pattern = &triton320_bbt_descr;
 }
 
 #else
index ebca54fb84f687ad5c710111cb301f176d598e6f..bb5d4b5f048286d70d5ae60946f624ee4cf0b67c 100755 (executable)
@@ -1,10 +1,8 @@
 /*
- * (C) Copyright 2002
- * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
+ * (C) Copyright 2007
+ * Ka-Ro electronics GmbH <http://www.karo-electronics.de>
  *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
+ * based on: board/zylonite/zylonite.c
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -26,6 +24,7 @@
  */
 
 #include <common.h>
+#include <asm/hardware.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -33,37 +32,54 @@ DECLARE_GLOBAL_DATA_PTR;
  * Miscelaneous platform dependent initialisations
  */
 
-int board_init (void)
+int board_init(void)
 {
        /* memory and cpu-speed are setup before relocation */
        /* so we do _nothing_ here */
 
-       /* arch number of Lubbock-Board */
+       /* arch number of KARO-Board */
        gd->bd->bi_arch_number = MACH_TYPE_KARO;
 
        /* adress of boot parameters */
        
        gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
-
        return 0;
 }
 
 int board_late_init(void)
 {
+       unsigned long arsr = ARSR;
+       char *dlm = " ";
+
        setenv("stdout", "serial");
        setenv("stderr", "serial");
+
+       printf("Last Reset caused by:");
+       if (arsr & ARSR_GPR) {
+               printf("%sgpio reset", dlm);
+               dlm=" | ";
+       }
+       if (arsr & ARSR_LPMR) {
+               printf("%slow power mode wakeup", dlm);
+               dlm=" | ";
+       }
+       if (arsr & ARSR_WDR) {
+               printf("%swatchdog reset", dlm);
+               dlm=" | ";
+       }
+       if (arsr & ARSR_HWR) {
+               printf("%shardware reset", dlm);
+               dlm=" | ";
+       }
+       printf("\n");
        return 0;
 }
 
-
-int dram_init (void)
+int dram_init(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
 
        return 0;
 }
-
-
-
index c18de0f33087c797ea7fc578a407388d316cc86f..055680e8a34741eb0182b38fed610e16a6f23aff 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -1,14 +1,26 @@
 #!/bin/sh
 set -e
+UBOOT_VERSION=1.1.6
 
-export BUILD_DIR=../.build-uboot-1.1.6
-export MAKEALL_LOGDIR=../.uboot-1.1.6.log
-export CROSS_COMPILE=arm-softfloat-linux-gnu-
+export BUILD_DIR=../.build-uboot-${UBOOT_VERSION}
+export MAKEALL_LOGDIR=../.uboot-${UBOOT_VERSION}.log
+
+export CROSS_COMPILE=arm-xscale-linux-gnu-
+# make sure ${CROSS_COMPILE}gcc can be found via $PATH e.g.:
+#PATH=/usr/local/arm/cross-gcc-4.2.0-soft/i686-pc-linux-gnu/bin:$PATH
 
 [ -d "${BUILD_DIR}" ] || mkdir -p "${BUILD_DIR}"
 [ -d "${MAKEALL_LOGDIR}" ] || mkdir -p "${MAKEALL_LOGDIR}"
 
+# canonicalize path names
 BUILD_DIR=$(cd "${BUILD_DIR}" && pwd)
 MAKEALL_LOGDIR=$(cd "${MAKEALL_LOGDIR}" && pwd)
 
-sh MAKEALL triton320
+if [ $# = 0 -a ! -f ${BUILD_DIR}/include/config.h ];then
+    sh MAKEALL triton320
+else
+    make "$@"
+fi
+if [ -s ${BUILD_DIR}/u-boot ];then
+    ${CROSS_COMPILE}size ${BUILD_DIR}/u-boot
+fi
index eaef8d20899e8e45ed9ebbd2203bc9d569f68fff..b9920c9ea91df1953017ecf1d92e7ba878eb3603 100755 (executable)
@@ -170,11 +170,6 @@ struct list_head devices;
 static struct mtd_device *current_dev = NULL;
 static u8 current_partnum = 0;
 
-extern int cramfs_check (struct part_info *info);
-extern int cramfs_load (char *loadoffset, struct part_info *info, char *filename);
-extern int cramfs_ls (struct part_info *info, char *filename);
-extern int cramfs_info (struct part_info *info);
-
 static struct part_info* jffs2_part_info(struct mtd_device *dev, unsigned int part_num);
 
 /* command line only routines */
@@ -1875,20 +1870,15 @@ int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        if ((part = jffs2_part_info(current_dev, current_partnum))){
 
                /* check partition type for cramfs */
-#ifdef CFG_FS_CRAMFS
                fsname = (cramfs_check(part) ? "CRAMFS" : "JFFS2");
                printf("### %s loading '%s' to 0x%lx\n", fsname, filename, offset);
+
                if (cramfs_check(part)) {
                        size = cramfs_load ((char *) offset, part, filename);
                } else {
                        /* if this is not cramfs assume jffs2 */
                        size = jffs2_1pass_load((char *)offset, part, filename);
                }
-#else
-               fsname = "JFFS2";
-               printf("### %s loading '%s' to 0x%lx\n", fsname, filename, offset);
-               size = jffs2_1pass_load((char *)offset, part, filename);                
-#endif
 
                if (size > 0) {
                        char buf[10];
@@ -1931,16 +1921,12 @@ int do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        if ((part = jffs2_part_info(current_dev, current_partnum))){
 
                /* check partition type for cramfs */
-#ifdef CFG_FS_CRAMFS 
                if (cramfs_check(part)) {
                        ret = cramfs_ls (part, filename);
                } else {
                        /* if this is not cramfs assume jffs2 */
                        ret = jffs2_1pass_ls(part, filename);
                }
-#else
-               ret = jffs2_1pass_ls(part, filename);   
-#endif 
 
                return ret ? 0 : 1;
        }
@@ -1970,7 +1956,6 @@ int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        if ((part = jffs2_part_info(current_dev, current_partnum))){
 
                /* check partition type for cramfs */
-#ifdef CFG_FS_CRAMFS
                fsname = (cramfs_check(part) ? "CRAMFS" : "JFFS2");
                printf("### filesystem type is %s\n", fsname);
 
@@ -1980,11 +1965,7 @@ int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        /* if this is not cramfs assume jffs2 */
                        ret = jffs2_1pass_info(part);
                }
-#else
-               fsname = "JFFS2";
-               printf("### filesystem type is %s\n", fsname);
-               ret = jffs2_1pass_info(part);
-#endif
+
                return ret ? 0 : 1;
        }
        return 1;
index cc4b50f615ab070c806773cfa57661f1dd889bbe..650ced7b9adebb64094b69e2cf02adc06ef150b6 100755 (executable)
@@ -160,7 +160,19 @@ static __inline__ int abortboot(int bootdelay)
        /* In order to keep up with incoming data, check timeout only
         * when catch up.
         */
-       while (!abort && get_ticks() <= etime) {
+       while (!abort && ((get_ticks() <= etime) || tstc())) {
+               if (tstc()) {
+                       if (presskey_len < presskey_max) {
+                               presskey [presskey_len ++] = getc();
+                       }
+                       else {
+                               for (i = 0; i < presskey_max - 1; i ++)
+                                       presskey [i] = presskey [i + 1];
+
+                               presskey [i] = getc();
+                       }
+               }
+
                for (i = 0; i < sizeof(delaykey) / sizeof(delaykey[0]); i ++) {
                        if (delaykey[i].len > 0 &&
                            presskey_len >= delaykey[i].len &&
@@ -180,18 +192,6 @@ static __inline__ int abortboot(int bootdelay)
                                abort = 1;
                        }
                }
-
-               if (tstc()) {
-                       if (presskey_len < presskey_max) {
-                               presskey [presskey_len ++] = getc();
-                       }
-                       else {
-                               for (i = 0; i < presskey_max - 1; i ++)
-                                       presskey [i] = presskey [i + 1];
-
-                               presskey [i] = getc();
-                       }
-               }
        }
 #  if DEBUG_BOOTKEYS
        if (!abort)
index fb810ca7c26fb88d95034e9545c25bde9b077e00..726bf9df1238d2b80209fd98c5bfa9026a182cad 100755 (executable)
@@ -26,11 +26,12 @@ PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno-common -ffixed-r8 \
        -msoft-float
 
 #PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 -mtune=strongarm1100
-PLATFORM_CPPFLAGS += -march=armv5 -mtune=xscale
+#PLATFORM_CPPFLAGS += -march=armv5 -mtune=xscale
+#PLATFORM_CPPFLAGS += -march=armv5 -mtune=iwmmxt
 # =========================================================================
 #
 # Supply options according to compiler version
 #
 # ========================================================================
-PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
+#PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
 PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
index 674a8b92d9a39e873829e4356c47d62664550b3c..76d5a9490572bf0e16728560590d454d9f29bbad 100755 (executable)
@@ -225,7 +225,7 @@ cpu_init_crit:
        /* Step 1 - Enable CP6 permission */
        mrc     p15, 0, r1, c15, c1, 0  @ read CPAR
        orr     r1, r1, #0x40
-               mcr     p15, 0, r1, c15, c1, 0
+       mcr     p15, 0, r1, c15, c1, 0
        CPWAIT  r1
 
        /* Step 2 - Mask ICMR & ICMR2 */
@@ -244,26 +244,29 @@ cpu_init_crit:
 
        /* set clock speed */
 #ifdef CONFIG_CPU_MONAHANS
+       /* Enable voltage change with frequency/power change */
+       ldr     r0, =PVCR
+       ldr     r1, [r0]
+       orr     r1, #(PVCR_FVE|PVCR_PVE)
+       str     r1, [r0]
+
        ldr     r0, =ACCR
        /* KaRo: do not clear other clock fields, otherwise boards still running in SDRAM will crash here */
        ldr     r2, =~(ACCR_XN_MASK | ACCR_XL_MASK)
        ldr     r1, [r0]
        and     r2, r2, r1
-       ldr     r1, =(((CFG_MONAHANS_TURBO_RUN_MODE_RATIO<<8) & ACCR_XN_MASK) | (CFG_MONAHANS_RUN_MODE_OSC_RATIO & ACCR_XL_MASK))
+       ldr     r1, =(((CFG_MONAHANS_TURBO_RUN_MODE_RATIO<<8) & ACCR_XN_MASK) | \
+                     (CFG_MONAHANS_RUN_MODE_OSC_RATIO & ACCR_XL_MASK))
        orr     r2, r2, r1
        str     r2, [r0]
+       mov     r0, #3
 #else /* ! CONFIG_CPU_MONAHANS */
-#ifdef CFG_CPUSPEED
        ldr     r0, CC_BASE
        ldr     r1, cpuspeed
        str     r1, [r0, #CCCR]
        mov     r0, #2
-       mcr     p14, 0, r0, c6, c0, 0
-
-setspeed_done:
-
-#endif /* CFG_CPUSPEED */
 #endif /* CONFIG_CPU_MONAHANS */
+       mcr     p14, 0, r0, c6, c0, 0
 
        /*
         * before relocating, we have to setup RAM timing
index b314a1cded159b0d49517d7433b3ed48bc6dc614..132da8eb9f34050fa886e11b47468a1ed69afbb4 100755 (executable)
@@ -954,7 +954,7 @@ static int nand_write_page (struct mtd_info *mtd, struct nand_chip *this, int pa
                status = this->waitfunc (mtd, this, FL_WRITING);
                /* See if device thinks it succeeded */
                if (status & 0x01) {
-                       DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write, page 0x%08x, ", __FUNCTION__, page);
+                       MTD_DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write, page 0x%08x, ", __FUNCTION__, page);
                        return -EIO;
                }
        } else {
@@ -1002,7 +1002,7 @@ static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int
                for (j = 0; j < eccsteps; j++) {
                        /* Loop through and verify the data */
                        if (this->verify_buf(mtd, &this->data_poi[datidx], mtd->eccsize)) {
-                               DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page);
+                               MTD_DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page);
                                goto out;
                        }
                        datidx += mtd->eccsize;
@@ -1010,7 +1010,7 @@ static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int
                        if (!hweccbytes)
                                continue;
                        if (this->verify_buf(mtd, &this->oob_buf[oobofs], hweccbytes)) {
-                               DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page);
+                               MTD_DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page);
                                goto out;
                        }
                        oobofs += hweccbytes;
@@ -1021,7 +1021,7 @@ static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int
                 */
                if (oobmode) {
                        if (this->verify_buf(mtd, &oob_buf[oobofs], mtd->oobsize - hweccbytes * eccsteps)) {
-                               DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page);
+                               MTD_DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page);
                                goto out;
                        }
                } else {
@@ -1034,7 +1034,7 @@ static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int
                                for (i = 0; i < ecccnt; i++) {
                                        int idx = oobsel->eccpos[i];
                                        if (oobdata[idx] != oob_buf[oobofs + idx] ) {
-                                               DEBUG (MTD_DEBUG_LEVEL0,
+                                               MTD_DEBUG (MTD_DEBUG_LEVEL0,
                                                "%s: Failed ECC write "
                                                "verify, page 0x%08x, " "%6i bytes were succesful\n", __FUNCTION__, page, i);
                                                goto out;
@@ -1123,11 +1123,11 @@ static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
        int     oobreadlen;
 
 
-       DEBUG (MTD_DEBUG_LEVEL3, "nand_read_ecc: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len);
+       MTD_DEBUG (MTD_DEBUG_LEVEL3, "nand_read_ecc: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len);
 
        /* Do not allow reads past end of device */
        if ((from + len) > mtd->size) {
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: Attempt read beyond end of device\n");
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: Attempt read beyond end of device\n");
                *retlen = 0;
                return -EINVAL;
        }
@@ -1244,7 +1244,7 @@ static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
                                         * generator for an error, reads back the syndrome and
                                         * does the error correction on the fly */
                                        if (this->correct_data(mtd, &data_poi[datidx], &oob_data[i], &ecc_code[i]) == -1) {
-                                               DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: "
+                                               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: "
                                                        "Failed ECC read, page 0x%08x on chip %d\n", page, chipnr);
                                                ecc_failed++;
                                        }
@@ -1283,7 +1283,7 @@ static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
                        }
 
                        if (ecc_status == -1) {
-                               DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: " "Failed ECC read, page 0x%08x\n", page);
+                               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: " "Failed ECC read, page 0x%08x\n", page);
                                ecc_failed++;
                        }
                }
@@ -1380,7 +1380,7 @@ static int nand_read_oob (struct mtd_info *mtd, loff_t from, size_t len, size_t
        struct nand_chip *this = mtd->priv;
        int     blockcheck = (1 << (this->phys_erase_shift - this->page_shift)) - 1;
 
-       DEBUG (MTD_DEBUG_LEVEL3, "nand_read_oob: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len);
+       MTD_DEBUG (MTD_DEBUG_LEVEL3, "nand_read_oob: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len);
 
        /* Shift to get page */
        page = (int)(from >> this->page_shift);
@@ -1394,7 +1394,7 @@ static int nand_read_oob (struct mtd_info *mtd, loff_t from, size_t len, size_t
 
        /* Do not allow reads past end of device */
        if ((from + len) > mtd->size) {
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_read_oob: Attempt read beyond end of device\n");
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_read_oob: Attempt read beyond end of device\n");
                *retlen = 0;
                return -EINVAL;
        }
@@ -1480,7 +1480,7 @@ int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_t len,
 
        /* Do not allow reads past end of device */
        if ((from + len) > mtd->size) {
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_read_raw: Attempt read beyond end of device\n");
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_read_raw: Attempt read beyond end of device\n");
                return -EINVAL;
        }
 
@@ -1618,14 +1618,14 @@ static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len,
        u_char *oobbuf, *bufstart;
        int     ppblock = (1 << (this->phys_erase_shift - this->page_shift));
 
-       DEBUG (MTD_DEBUG_LEVEL3, "nand_write_ecc: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len);
+       MTD_DEBUG (MTD_DEBUG_LEVEL3, "nand_write_ecc: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len);
 
        /* Initialize retlen, in case of early exit */
        *retlen = 0;
 
        /* Do not allow write past end of device */
        if ((to + len) > mtd->size) {
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: Attempt to write past end of page\n");
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: Attempt to write past end of page\n");
                return -EINVAL;
        }
 
@@ -1685,7 +1685,7 @@ static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len,
                 */
                ret = nand_write_page (mtd, this, page, &oobbuf[oob], oobsel, (--numpages > 0));
                if (ret) {
-                       DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: write_page failed %d\n", ret);
+                       MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: write_page failed %d\n", ret);
                        goto out;
                }
                /* Next oob page */
@@ -1709,7 +1709,7 @@ static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len,
                                page - startpage,
                                oobbuf, oobsel, chipnr, (eccbuf != NULL));
                        if (ret) {
-                               DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: verify_pages failed %d\n", ret);
+                               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: verify_pages failed %d\n", ret);
                                goto out;
                        }
                        *retlen = written;
@@ -1741,7 +1741,7 @@ cmp:
        if (!ret)
                *retlen = written;
        else
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: verify_pages failed %d\n", ret);
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: verify_pages failed %d\n", ret);
 
 out:
        /* Deselect and wake up anyone waiting on the device */
@@ -1766,7 +1766,7 @@ static int nand_write_oob (struct mtd_info *mtd, loff_t to, size_t len, size_t *
        int column, page, status, ret = -EIO, chipnr;
        struct nand_chip *this = mtd->priv;
 
-       DEBUG (MTD_DEBUG_LEVEL3, "nand_write_oob: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len);
+       MTD_DEBUG (MTD_DEBUG_LEVEL3, "nand_write_oob: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len);
 
        /* Shift to get page */
        page = (int) (to >> this->page_shift);
@@ -1780,7 +1780,7 @@ static int nand_write_oob (struct mtd_info *mtd, loff_t to, size_t len, size_t *
 
        /* Do not allow write past end of page */
        if ((column + len) > mtd->oobsize) {
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: Attempt to write past end of page\n");
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: Attempt to write past end of page\n");
                return -EINVAL;
        }
 
@@ -1827,7 +1827,7 @@ static int nand_write_oob (struct mtd_info *mtd, loff_t to, size_t len, size_t *
 
        /* See if device thinks it succeeded */
        if (status & 0x01) {
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " "Failed write, page 0x%08x\n", page);
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " "Failed write, page 0x%08x\n", page);
                ret = -EIO;
                goto out;
        }
@@ -1839,7 +1839,7 @@ static int nand_write_oob (struct mtd_info *mtd, loff_t to, size_t len, size_t *
        this->cmdfunc (mtd, NAND_CMD_READOOB, column, page & this->pagemask);
 
        if (this->verify_buf(mtd, buf, len)) {
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " "Failed write verify, page 0x%08x\n", page);
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " "Failed write verify, page 0x%08x\n", page);
                ret = -EIO;
                goto out;
        }
@@ -1899,12 +1899,12 @@ static int nand_writev_ecc (struct mtd_info *mtd, const struct kvec *vecs, unsig
        for (i = 0; i < count; i++)
                total_len += (int) vecs[i].iov_len;
 
-       DEBUG (MTD_DEBUG_LEVEL3,
+       MTD_DEBUG (MTD_DEBUG_LEVEL3,
               "nand_writev: to = 0x%08x, len = %i, count = %ld\n", (unsigned int) to, (unsigned int) total_len, count);
 
        /* Do not allow write past end of page */
        if ((to + total_len) > mtd->size) {
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_writev: Attempted write past end of device\n");
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_writev: Attempted write past end of device\n");
                return -EINVAL;
        }
 
@@ -2097,24 +2097,24 @@ int nand_erase_nand (struct mtd_info *mtd, struct erase_info *instr, int allowbb
        int page, len, status, pages_per_block, ret, chipnr;
        struct nand_chip *this = mtd->priv;
 
-       DEBUG (MTD_DEBUG_LEVEL3,
+       MTD_DEBUG (MTD_DEBUG_LEVEL3,
               "nand_erase: start = 0x%08x, len = %i\n", (unsigned int) instr->addr, (unsigned int) instr->len);
 
        /* Start address must align on block boundary */
        if (instr->addr & ((1 << this->phys_erase_shift) - 1)) {
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Unaligned address\n");
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Unaligned address\n");
                return -EINVAL;
        }
 
        /* Length must align on block boundary */
        if (instr->len & ((1 << this->phys_erase_shift) - 1)) {
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Length not block aligned\n");
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Length not block aligned\n");
                return -EINVAL;
        }
 
        /* Do not allow erase past end of device */
        if ((instr->len + instr->addr) > mtd->size) {
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Erase past end of device\n");
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Erase past end of device\n");
                return -EINVAL;
        }
 
@@ -2136,7 +2136,7 @@ int nand_erase_nand (struct mtd_info *mtd, struct erase_info *instr, int allowbb
        /* Check the WP bit */
        /* Check, if it is write protected */
        if (nand_check_wp(mtd)) {
-               DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Device is write protected!!!\n");
+               MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Device is write protected!!!\n");
                instr->state = MTD_ERASE_FAILED;
                goto erase_exit;
        }
@@ -2166,7 +2166,7 @@ int nand_erase_nand (struct mtd_info *mtd, struct erase_info *instr, int allowbb
 
                /* See if block erase succeeded */
                if (status & 0x01) {
-                       DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: " "Failed erase, page 0x%08x\n", page);
+                       MTD_DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: " "Failed erase, page 0x%08x\n", page);
                        instr->state = MTD_ERASE_FAILED;
                        instr->fail_addr = (page << this->page_shift);
                        goto erase_exit;
@@ -2209,7 +2209,7 @@ static void nand_sync (struct mtd_info *mtd)
 {
        struct nand_chip *this = mtd->priv;
 
-       DEBUG (MTD_DEBUG_LEVEL3, "nand_sync: called\n");
+       MTD_DEBUG (MTD_DEBUG_LEVEL3, "nand_sync: called\n");
 
        /* Grab the lock and see if the device is available */
        nand_get_device (this, mtd, FL_SYNCING);
index e25fe8376e1e6a3302b3fea38f4528b9de904b5c..78c7dfd76c53eb5560757d54c784d93a8f2e3623 100755 (executable)
@@ -1038,7 +1038,7 @@ int nand_isbad_bbt (struct mtd_info *mtd, loff_t offs, int allowbbt)
        block = (int) (offs >> (this->bbt_erase_shift - 1));
        res = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03;
 
-       DEBUG (MTD_DEBUG_LEVEL2, "nand_isbad_bbt(): bbt info for offs 0x%08x: (block %d) 0x%02x\n",
+       MTD_DEBUG (MTD_DEBUG_LEVEL2, "nand_isbad_bbt(): bbt info for offs 0x%08x: (block %d) 0x%02x\n",
                (unsigned int)offs, res, block >> 1);
 
        switch ((int)res) {
index 28b3eeee5a76f9c22429ea3cfb4d3fc3a236cfe9..b246d1f769c3bfddeb3758dbb2f6b8bd5907a381 100755 (executable)
@@ -1520,6 +1520,11 @@ typedef void             (*ExcpHndlr) (void) ;
 #define PWSR           __REG(0x40F50014)  /* Power Manager Wake-up Status Register */
 #define PECR           __REG(0x40F50018)  /* Power Manager EXT_WAKEUP[1:0] Control Register */
 #define DCDCSR         __REG(0x40F50080)  /* DC-DC Controller Status Register */
+
+/* see Specification Update Rev. 0.73 page 86f */
+#define AVCR           __REG(0x40F50094)  /* VCC_APPS Voltage Control Register */
+#define SVCR           __REG(0x40F50098)  /* VCC_SRAM Voltage Control Register */
+
 #define PVCR           __REG(0x40F50100)  /* Power Manager Voltage Change Control Register */
 #define    PCMD(x) __REG(0x40F50110 + x*4)
 #define    PCMD0   __REG(0x40F50110 + 0 * 4)
@@ -1560,12 +1565,17 @@ typedef void            (*ExcpHndlr) (void) ;
 #define    PCMD_LC     (1<<10)
 #define    PCMD_SQC    (3<<8)  /* only 00 and 01 are valid */
 
-#define PVCR_FVC                   (0x1 << 28)
+#define PVCR_FVE       (1 << 31)
+#define PVCR_PVE       (1 << 30)
+#define PVCR_TVE       (1 << 29)
 #define PVCR_VCSA                  (0x1<<14)
-#define PVCR_CommandDelay          (0xf80)
-#define PVCR_ReadPointer           (0x01f00000)
 #define PVCR_SlaveAddress          (0x7f)
 
+#define ARSR_GPR       (1 << 3)        /* GPIO Reset */
+#define ARSR_LPMR      (1 << 2)        /* Low Power Mode Exit */
+#define ARSR_WDR       (1 << 1)        /* Watchdog Reset */
+#define ARSR_HWR       (1 << 0)        /* Hardware Reset */
+
 #else /* ifdef CONFIG_CPU_MONAHANS */
 
 #define PMCR           __REG(0x40F00000)  /* Power Manager Control Register */
@@ -1738,6 +1748,7 @@ typedef void              (*ExcpHndlr) (void) ;
 #define CKENA_3_CAMERA (1 << 3)        /* Camera Interface Clock Enable */
 #define CKENA_2_USBHOST        (1 << 2)        /* USB Host Unit Clock Enable */
 #define CKENA_1_LCD    (1 << 1)        /* LCD Unit Clock Enable */
+#define CKENA_RSRVD    0x84010021      /* These bits must always be set! */
 
 #define CKENB_8_1WIRE  ((1 << 8) + 32) /* One Wire Interface Unit Clock Enable */
 #define CKENB_7_GPIO   ((1 << 7) + 32) /* GPIO Clock Enable */
@@ -1745,6 +1756,7 @@ typedef void              (*ExcpHndlr) (void) ;
 #define CKENB_4_I2C    ((1 << 4) + 32) /* I2C Unit Clock Enable */
 #define CKENB_1_PWM1   ((1 << 1) + 32) /* PWM2 & PWM3 Clock Enable */
 #define CKENB_0_PWM0   ((1 << 0) + 32) /* PWM0 & PWM1 Clock Enable */
+#define CKENB_RSRVD    0xfffcfc2c      /* These bits must always be set! */
 
 #else /* if defined CONFIG_CPU_MONAHANS */
 
index b11ba13eb7ca2dbc15cd0263fb842687535cd70d..de2b50197c5aa20edb93344f65dbb2aa974818bb 100755 (executable)
@@ -1,10 +1,8 @@
 /*
- * (C) Copyright 2002
- * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
+ * (C) Copyright 2007
+ * Ka-Ro electronics GmbH <http://www.karo-electronics.de>
  *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
+ * based on: board/zylonite/zylonite.c
  *
  * Configuation settings for the TRITON320 board.
  *
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_CPU_MONAHANS    1       /* Intel Monahan CPU    */
-#define CONFIG_TRITON320       1       /* Zylonite board       */
+#define CONFIG_CPU_MONAHANS            1       /* Intel/Marvell Monahans CPU    */
+#define CONFIG_TRITON320               1       /* KARO Triton-320 board */
 
-/* #define CONFIG_LCD          1 */
+/* #define CONFIG_LCD                  1 */
 #ifdef CONFIG_LCD
 #define CONFIG_SHARP_LM8V31
 #endif
-/* #define CONFIG_MMC          1 */
-#define BOARD_LATE_INIT                1
+/* #define CONFIG_MMC                  1 */
+#define BOARD_LATE_INIT                        1
 
 #define CONFIG_SKIP_RELOCATE_UBOOT     1
 #undef CONFIG_SKIP_LOWLEVEL_INIT  
 /*
  * Size of malloc() pool
  */
-#define CFG_MALLOC_LEN     (CFG_ENV_SIZE + 256*1024)
-#define CFG_GBL_DATA_SIZE      512     /* size in bytes reserved for initial data */
+#define CFG_MALLOC_LEN                 (CFG_ENV_SIZE + 256*1024)
+#define CFG_GBL_DATA_SIZE              512     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
  */
-
-
 #define CONFIG_DRIVER_DM9000           1
 #define CONFIG_DM9000_BASE             0x10000300
 #define DM9000_IO                      CONFIG_DM9000_BASE
 #define DM9000_DATA                    (CONFIG_DM9000_BASE+0x8000)
 #define CONFIG_DM9000_USE_16BIT
 
-
-
 /*
  * select serial console configuration
  */
 
 #define CONFIG_BAUDRATE                38400
 
-#if 0
-# define CONFIG_COMMANDS       CFG_CMD_AUTOSCRIPT      \
-               |       CFG_CMD_BDI             \
-               |       CFG_CMD_BOOTD           \
-               |       CFG_CMD_CONSOLE         \
-               |       CFG_CMD_ECHO            \
-               |       CFG_CMD_ENV             \
-               |       CFG_CMD_IMI             \
-               |       CFG_CMD_ITEST           \
-               |       CFG_CMD_LOADB           \
-               |       CFG_CMD_LOADS           \
-               |       CFG_CMD_MEMORY          \
-               |       CFG_CMD_NAND            \
-               |       CFG_CMD_REGINFO         \
-               |       CFG_CMD_RUN     \
-               &       ~(CFG_CMD_JFFS2 | CFG_CMD_FLASH | CFG_CMD_IMLS)
-#endif
-
 #define CONFIG_COMMANDS        ((CONFIG_CMD_DFL|       \
                         CFG_CMD_NAND   |       \
                         CFG_CMD_JFFS2  |       \
 /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
 #include <cmd_confdefs.h>
 
-#define CONFIG_BOOTDELAY                       3
-#define CONFIG_BOOTCOMMAND                     "bootm 80000"
-#define CONFIG_BOOTARGS                                "root=/dev/mtdblock1 rootfstype=jffs2 console=ttyS0,38400"
+/* console output can be disabled by setting the 'silent' environment variable */
+#define CONFIG_SILENT_CONSOLE
+
+#define CONFIG_ZERO_BOOTDELAY_CHECK
+
+#define CONFIG_BOOTDELAY               3
+#define CONFIG_BOOTCOMMAND             "run bootce"
+#define CONFIG_BOOTARGS                        "init=/linuxrc root=/dev/mtdblock1 rootfstype=jffs2 console=ttyS0,38400 ro panic=5"
 #define CONFIG_BOOT_RETRY_TIME         -1
 #define CONFIG_BOOT_RETRY_MIN          60
 #define CONFIG_RESET_TO_RETRY
 #define CONFIG_AUTOBOOT_PROMPT         "autoboot in %d seconds\n"
-#define CONFIG_AUTOBOOT_DELAY_STR      " "
-#define CONFIG_AUTOBOOT_STOP_STR       "system"
+
+#define DEBUG_BOOTKEYS 0
 
 #define CONFIG_ETHADDR                 ff:ff:ff:ff:ff:ff
 #define CONFIG_NETMASK                 255.255.255.255
 #define CFG_HZ                 3250000         /* incrementer freq: 3.25 MHz */
 
 /* Monahans Core Frequency */
+#if 1
+/* max. speed values */
 #define CFG_MONAHANS_RUN_MODE_OSC_RATIO                31 /* valid values: 8, 16, 24, 31 */
 #define CFG_MONAHANS_TURBO_RUN_MODE_RATIO      2  /* valid values: 1, 2 */
-
+#else
+/* default power up values */
+#define CFG_MONAHANS_RUN_MODE_OSC_RATIO                8
+#define CFG_MONAHANS_TURBO_RUN_MODE_RATIO      1
+#endif
                                                /* valid baudrates */
 #define CFG_BAUDRATE_TABLE     { 9600, 19200, 38400, 57600, 115200 }
 
  * Physical Memory Map
  */
 #define CONFIG_NR_DRAM_BANKS   1          /* we have 1 banks of DRAM */
-#define PHYS_SDRAM_1           0x80000000 /* SDRAM Bank #1 */
+#define PHYS_SDRAM_1           0xa0000000 /* SDRAM Bank #1 */
 #define PHYS_SDRAM_1_SIZE      0x04000000 /* 64 MB */
 
 #define CFG_DRAM_BASE          PHYS_SDRAM_1
 #define CFG_DRAM_SIZE          PHYS_SDRAM_1_SIZE
 
-
 #define CFG_LOAD_ADDR          (PHYS_SDRAM_1 + 0x100000) /* default load address */
 
 #define CFG_SKIP_DRAM_SCRUB
  * NAND Flash
  */
 /* Use the new NAND code. (BOARDLIBS = drivers/nand/libnand.a required) */
-#define CONFIG_NEW_NAND_CODE
 #define CFG_NAND0_BASE         0x0
 #undef CFG_NAND1_BASE
 
 #define CFG_NAND_SENDCMD_RETRY 3
 #undef NAND_ALLOW_ERASE_ALL    /* Allow erasing bad blocks - don't use */
 
+#if 0
+// NOT USED! timing is set up by system boot loader
 /* NAND Timing Parameters (in ns) */
 #define NAND_TIMING_tCH                10
-#define NAND_TIMING_tCS                0
-#define NAND_TIMING_tWH                20
-#define NAND_TIMING_tWP                40
+#define NAND_TIMING_tCS                10
+#define NAND_TIMING_tWH                15
+#define NAND_TIMING_tWP                25
 
-#define NAND_TIMING_tRH                20
-#define NAND_TIMING_tRP                40
+#define NAND_TIMING_tRH                15
+#define NAND_TIMING_tRP                25
 
-#define NAND_TIMING_tR         11123
-#define NAND_TIMING_tWHR       100
+#define NAND_TIMING_tR         25000
+#define NAND_TIMING_tWHR       60
 #define NAND_TIMING_tAR                10
+#endif
 
 /* NAND debugging */
 #if 0
-#define        CFG_DFC_DEBUG1          /* useful */
-#define                CFG_DFC_DEBUG2          /* noisy */
-#define        CFG_DFC_DEBUG3          /* extremly noisy  */
+#define        CFG_DFC_DEBUG1          /* useful */
+#define        CFG_DFC_DEBUG2          /* noisy */
+#define        CFG_DFC_DEBUG3          /* extremly noisy  */
 #else
-#undef         CFG_DFC_DEBUG1          /* useful */
-#undef         CFG_DFC_DEBUG2          /* noisy */
-#undef         CFG_DFC_DEBUG3          /* extremly noisy  */
+#undef  CFG_DFC_DEBUG1         /* useful */
+#undef CFG_DFC_DEBUG2          /* noisy */
+#undef CFG_DFC_DEBUG3          /* extremly noisy  */
 #endif
 
 #define CONFIG_MTD_DEBUG       0
 #define CONFIG_JFFS2_NAND_OFF 0x80000                  /* start of jffs2 partition */
 #define CONFIG_JFFS2_NAND_SIZE 64*1024*1024            /* size of jffs2 partition */
 
-
 /* mtdparts command line support */
 #define CONFIG_JFFS2_CMDLINE
 #define MTDIDS_DEFAULT         "nand0=triton320-nand"
index 9f1b1d529c917eafc8cb6aa01e4c2eff07736351..5e6d133d57755ca9160fffcf21d425e1998e569a 100755 (executable)
@@ -119,4 +119,16 @@ int cramfs_uncompress_block(void *dst, void *src, int srclen);
 int cramfs_uncompress_init(void);
 int cramfs_uncompress_exit(void);
 
+#if (CFG_FS_CRAMFS)
+extern int cramfs_check (struct part_info *info);
+extern int cramfs_load (char *loadoffset, struct part_info *info, char *filename);
+extern int cramfs_ls (struct part_info *info, char *filename);
+extern int cramfs_info (struct part_info *info);
+#else
+#define cramfs_check(i)                (0)
+#define cramfs_load(l,i,f)     (0)
+#define cramfs_ls(i,f)         (0)
+#define cramfs_info(i)         (0)
+#endif
+
 #endif /* __CRAMFS_H */
index cba46c23fbfb8da6bfd3c710f126e25d64839464..72af9f4398a3765fe805a3a3a1d0face08363041 100755 (executable)
@@ -201,13 +201,13 @@ static inline void mtd_erase_callback(struct erase_info *instr)
 #define MTD_DEBUG_LEVEL3       (3)     /* Noisy   */
 
 #ifdef CONFIG_MTD_DEBUG
-#define DEBUG(n, args...)                              \
+#define MTD_DEBUG(n, args...)                          \
        do {                                            \
                if (n <= CONFIG_MTD_DEBUG_VERBOSE)      \
                        printk(KERN_INFO args);         \
        } while(0)
 #else /* CONFIG_MTD_DEBUG */
-#define DEBUG(n, args...) do { } while(0)
+#define MTD_DEBUG(n, args...) do { } while(0)
 
 #endif /* CONFIG_MTD_DEBUG */