3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- u-boot-1.1.2/CREDITS~mnci
7 +++ u-boot-1.1.2/CREDITS
9 E: r.schwebel@pengutronix.de
10 D: Support for csb226, logodl and innokom boards (PXA2xx)
13 +D: Support for MNCI-RX "Ramses"
16 E: yashi@atmark-techno.com
17 D: Support for Xilinx MicroBlaze, for Atmark Techno SUZAKU FPGA board
18 --- u-boot-1.1.2/MAINTAINERS~mnci
19 +++ u-boot-1.1.2/MAINTAINERS
28 Andrea Scian <andrea.scian@dave-tech.it>
30 B2 ARM7TDMI (S3C44B0X)
31 --- u-boot-1.1.2/Makefile~mnci
32 +++ u-boot-1.1.2/Makefile
34 wepep250_config : unconfig
35 @./mkconfig $(@:_config=) arm pxa wepep250
37 +mnci_config : unconfig
38 + @./mkconfig $(@:_config=) arm pxa mnci
40 xaeniax_config : unconfig
41 @./mkconfig $(@:_config=) arm pxa xaeniax
44 +++ u-boot-1.1.2/board/mnci/Makefile
48 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
50 +# M&N Solutions GmbH, Rosbach, Germany, Holger Schurig
52 +# See file CREDITS for list of people who contributed to this
55 +# This program is free software; you can redistribute it and/or
56 +# modify it under the terms of the GNU General Public License as
57 +# published by the Free Software Foundation; either version 2 of
60 +# This program is distributed in the hope that it will be useful,
61 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
62 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63 +# GNU General Public License for more details.
65 +# You should have received a copy of the GNU General Public License
66 +# along with this program; if not, write to the Free Software
67 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
71 +include $(TOPDIR)/config.mk
78 +$(LIB): $(OBJS) $(SOBJS)
79 + $(AR) crv $@ $(OBJS) $(SOBJS)
82 + rm -f $(SOBJS) $(OBJS
85 + rm -f $(LIB) core *.bak .depend
87 +#########################################################################
89 +.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
90 + $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
94 +#########################################################################
96 +++ u-boot-1.1.2/board/mnci/config.mk
98 +TEXT_BASE = 0xa1fe0000
100 +++ u-boot-1.1.2/board/mnci/u-boot.lds
103 + * (C) Copyright 2000
104 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
106 + * See file CREDITS for list of people who contributed to this
109 + * This program is free software; you can redistribute it and/or
110 + * modify it under the terms of the GNU General Public License as
111 + * published by the Free Software Foundation; either version 2 of
114 + * This program is distributed in the hope that it will be useful,
115 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
116 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
117 + * GNU General Public License for more details.
119 + * You should have received a copy of the GNU General Public License
120 + * along with this program; if not, write to the Free Software
121 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
122 + * MA 02111-1307 USA
125 +OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
135 + cpu/pxa/start.o (.text)
140 + .rodata : { *(.rodata) }
143 + .data : { *(.data) }
148 + __u_boot_cmd_start = .;
149 + .u_boot_cmd : { *(.u_boot_cmd) }
150 + __u_boot_cmd_end = .;
158 +++ u-boot-1.1.2/board/mnci/mnci.c
161 + * See file CREDITS for list of people who contributed to this
164 + * This program is free software; you can redistribute it and/or
165 + * modify it under the terms of the GNU General Public License as
166 + * published by the Free Software Foundation; either version 2 of
169 + * This program is distributed in the hope that it will be useful,
170 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
171 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
172 + * GNU General Public License for more details.
174 + * You should have received a copy of the GNU General Public License
175 + * along with this program; if not, write to the Free Software
176 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
177 + * MA 02111-1307 USA
181 +#include <asm/arch/pxa-regs.h>
182 +#include <asm/mach-types.h>
185 + * board_init: - setup some data structures
187 + * @return: 0 in case of success
190 +int board_init (void)
192 + DECLARE_GLOBAL_DATA_PTR;
194 + /* memory and cpu-speed are setup before relocation */
195 + /* so we do _nothing_ here */
197 + gd->bd->bi_arch_number = MACH_TYPE_RAMSES;
198 + gd->bd->bi_boot_params = 0xa0000100;
200 + gd->bd->bi_baudrate = 115200;
204 + CKEN |= CKEN2_AC97;
205 + GCR = GCR_COLD_RST;
212 +int board_late_init(void)
214 + setenv("stdout", "serial");
215 + setenv("stderr", "serial");
221 + * dram_init: - setup dynamic RAM
223 + * @return: 0 in case of success
226 +int dram_init (void)
228 + DECLARE_GLOBAL_DATA_PTR;
230 + gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
231 + gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
238 +#ifdef CFG_JFFS_CUSTOM_PART
240 +#include <jffs2/jffs2.h>
242 +#define FLASH_DEBUG 1
244 +/* Some debug macros */
245 +#if (FLASH_DEBUG > 2 )
246 +#define PRINTK3(args...) printf(args)
248 +#define PRINTK3(args...)
252 +#define PRINTK2(args...) printf(args)
254 +#define PRINTK2(args...)
258 +#define PRINTK(args...) printf(args)
260 +#define PRINTK(args...)
264 +#define FLASH_BANK_SIZE 0x02000000 /* 32 MB (during development) */
265 +#define MAIN_SECT_SIZE 0x00040000 /* 256k per sector */
267 +#ifndef CFG_FLASH_CFI
268 +flash_info_t flash_info[CFG_MAX_FLASH_BANKS];
271 +static struct part_info part;
272 +static int current_part = -1;
274 +struct part_info* jffs2_part_info(int part_num) {
275 + void *jffs2_priv_saved = part.jffs2_priv;
277 + PRINTK2("jffs2_part_info: part_num=%i\n",part_num);
279 + if (current_part == part_num)
282 + /* u-boot partition */
284 + memset(&part, 0, sizeof(part));
286 + part.offset=(char*)0x00000000;
287 + part.size=0x00040000;
289 + /* Mark the struct as ready */
290 + current_part = part_num;
292 + PRINTK("part.offset = 0x%08x\n",(unsigned int)part.offset);
293 + PRINTK("part.size = 0x%08x\n",(unsigned int)part.size);
296 + /* primary Kernel partition */
298 + memset(&part, 0, sizeof(part));
300 + part.offset=(char*)0x00040000;
301 + part.size=0x00040000*4;
303 + /* Mark the struct as ready */
304 + current_part = part_num;
306 + PRINTK("part.offset = 0x%08x\n",(unsigned int)part.offset);
307 + PRINTK("part.size = 0x%08x\n",(unsigned int)part.size);
310 + /* data partition */
312 + memset(&part, 0, sizeof(part));
314 + part.offset=(char*)0x00140000;
315 + part.size=FLASH_BANK_SIZE-0x00140000;
317 + /* Mark the struct as ready */
318 + current_part = part_num;
320 + PRINTK("part.offset = 0x%08x\n",(unsigned int)part.offset);
321 + PRINTK("part.size = 0x%08x\n",(unsigned int)part.size);
324 + if (current_part == part_num) {
325 + part.usr_priv = ¤t_part;
326 + part.jffs2_priv = jffs2_priv_saved;
330 + PRINTK("jffs2_part_info: end of partition table\n");
335 +++ u-boot-1.1.2/include/configs/mnci.h
338 + * (C) Copyright 2005
339 + * Holger Schurig, M&N Solutions GmbH, Rosbach, Germany
341 + * Configuration for the Auerswald Innokom CPU board.
343 + * See file CREDITS for list of people who contributed to this
346 + * This program is free software; you can redistribute it and/or
347 + * modify it under the terms of the GNU General Public License as
348 + * published by the Free Software Foundation; either version 2 of
349 + * the License, or (at your option) any later version.
351 + * This program is distributed in the hope that it will be useful,
352 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
353 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
354 + * GNU General Public License for more details.
356 + * You should have received a copy of the GNU General Public License
357 + * along with this program; if not, write to the Free Software
358 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
359 + * MA 02111-1307 USA
365 +#include <asm/arch/pxa-regs.h>
368 + * If we are developing, we might want to start armboot from ram
369 + * so we MUST NOT initialize critical regs like mem-timing ...
371 +#define CONFIG_INIT_CRITICAL /* undef for developing */
374 + * define the following to enable debug blinks. A debug blink function
375 + * must be defined in memsetup.S
377 +#undef DEBUG_BLINK_ENABLE
378 +#undef DEBUG_BLINKC_ENABLE
381 + * High Level Configuration Options
384 +#define CONFIG_PXA250 1 /* This is an PXA250 CPU */
388 +#define CONFIG_SHARP_LM8V31
391 +#define CONFIG_MMC 1
392 +#define BOARD_LATE_INIT 1
394 +#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
397 + * Size of malloc() pool
399 +#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
400 +#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
403 + * MNCI memory map information
406 +#define MNCI_CS5_ETH_OFFSET 0x03400000
413 +#define CONFIG_DRIVER_SMC91111
414 +#define CONFIG_SMC91111_BASE (PXA_CS5_PHYS + MNCI_CS5_ETH_OFFSET + 0x300)
415 +#define CONFIG_SMC_USE_32_BIT 1
416 +//#define CONFIG_SMC_USE_IOFUNCS
419 +/* the following has to be set high -- suspect something is wrong with
420 + * with the tftp timeout routines. FIXME!!!
422 +#define CONFIG_NET_RETRY_COUNT 100
425 + * select serial console configuration
427 +#define CONFIG_FFUART 1 /* we use FFUART on MNCI */
429 +/* allow to overwrite serial and ethaddr */
430 +//#define CONFIG_ENV_OVERWRITE
432 +#define CONFIG_BAUDRATE 115200
434 +#define CONFIG_COMMANDS ( 0 \
445 +/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
446 +#include <cmd_confdefs.h>
448 +#define CONFIG_BOOTDELAY 0
449 +#define CONFIG_BOOTCOMMAND "linux"
450 +#define CONFIG_BOOTARGS "console=ttyS0,115200 rootfstype=jffs2 root=/dev/mtdblock2"
451 +//#define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/nfsroot ip=192.168.233.14:192.168.233.1:192.168.233.1:255.255.255.0:ramses2:eth0:off"
452 +#define CONFIG_CMDLINE_TAG 1
453 +#define CONFIG_SETUP_MEMORY_TAGS 1
454 +#define CFG_CONSOLE_INFO_QUIET 1
455 +#define CFG_JFFS_SINGLE_PART 1
458 + * Current memory map for MNCI supplied Linux images:
461 + * 0x00000 - 0x003ffff: bootloader
462 + * 0x040000 - 0x013ffff: kernel
463 + * 0x140000 - 0x1ffffff: file system
466 + * 0xa0008000 - kernel is loaded
467 + * 0xa1fe0000 - Uboot runs (48MB into RAM)
471 +#define MY_CONFIG_EXTRA_ENV_SETTINGS \
473 + "mw.b 0xa0000000 0xff 0x40000; " \
475 + "fatload mmc 0 0xa0000000 u-boot.bin; " \
477 + "protect off 0x0 0x3ffff; " \
478 + "erase 0x0 0x3ffff; " \
479 + "cp.b 0xa0000000 0x0 0x40000; " \
482 + "prog_uImage_mmc=" \
483 + "mw.b 0xa0000000 0xff 0x1C0000; " \
485 + "fatload mmc 0 0xa0000000 uImage; " \
487 + "protect off 0x40000 0x13ffff; " \
488 + "erase 0x40000 0x13ffff; " \
489 + "cp.b 0xa0000000 0x40000 0x1C0000; " \
492 + "mw.b 0xa0000000 0xff 0x1e00000; " \
494 + "fatload mmc 0 0xa0000000 root.jffs; " \
496 + "protect off 0x200000 0x13fffff; " \
497 + "erase 0x200000 0x13fffff; " \
498 + "cp.b 0xa0000000 0x200000 0x1e00000; " \
502 + "fatload mmc 0 0xa1000000 uImage && " \
504 + "bootm 0xa1000000; " \
507 + "mw.b 0xa0000000 0xff 0x100000; " \
508 + "if bootp 0xa0000000 u-boot.bin; " \
510 + "protect off 0x0 0x3ffff; " \
511 + "erase 0x0 0x3ffff; " \
512 + "cp.b 0xa0000000 0x0 0x40000; " \
515 + "prog_uImage_net=" \
516 + "mw.b 0xa0000000 0xff 0x1C0000; " \
517 + "if bootp 0xa0000000 uImage; " \
519 + "protect off 0x40000 0x13ffff; " \
520 + "erase 0x40000 0x13ffff; " \
521 + "cp.b 0xa0000000 0x40000 0x1C0000; " \
523 + "boot_uImage_net=" \
524 + "mw.b 0xa0000000 0xff 0x1C0000; " \
525 + "if bootp 0xa0000000 uImage; " \
527 + "bootm 0xa0000000; " \
530 + "mw.b 0xa0000000 0xff 0x1e00000; " \
531 + "if bootp 0xa0000000 root.jffs; " \
533 + "protect off 0x200000 0x13fffff; " \
534 + "erase 0x200000 0x13fffff; " \
535 + "cp.b 0xa0000000 0x200000 0x1e00000; " \
538 +#define CONFIG_EXTRA_ENV_SETTINGS \
539 + "bootargsnfs=console=ttyS0,115200 root=/dev/nfsroot ip=192.168.233.14:192.168.233.1:192.168.233.1:255.255.255.0:ramses2:eth0:off;\0" \
541 + "set bootargs $bootargsnfs; " \
545 +#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
546 +#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */
547 +#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
551 + * Miscellaneous configurable options
553 +//#define CFG_HUSH_PARSER 1
554 +//#define CFG_PROMPT_HUSH_PS2 "> "
556 +#define CFG_LONGHELP /* undef to save memory */
557 +#define CFG_PROMPT "mnci> " /* Monitor Command Prompt */
558 +#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
559 +#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
560 +#define CFG_MAXARGS 16 /* max number of command args */
561 +#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
562 +#define CFG_DEVICE_NULLDEV 1
564 +#define CFG_MEMTEST_START 0xa0400000 /* memtest works on */
565 +#define CFG_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */
567 +#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */
569 +#define CFG_LOAD_ADDR 0x40000 /* default load address */
571 +#define CFG_HZ 3686400 /* incrementer freq: 3.6864 MHz */
572 +#define CFG_CPUSPEED 0x141 /* set core clock to 400/200/100 MHz */
574 +//#define RTC 1 /* enable 32KHz osc */
576 + /* valid baudrates */
577 +#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
579 +#define CFG_MMC_BASE 0xF0000000
584 + * The stack sizes are set up in start.S using the settings below
586 +#define CONFIG_STACKSIZE (256*1024) /* regular stack */
587 +#ifdef CONFIG_USE_IRQ
588 +#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
589 +#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
596 +#define CFG_MONITOR_BASE 0
597 +#define CFG_MONITOR_LEN 0x40000
599 +#define CFG_ENV_IS_IN_FLASH 1
600 +#define CFG_ENV_ADDR 0x20000
601 +#define CFG_ENV_SIZE 0x4000
602 +#define CFG_ENV_SECT_SIZE 0x40000
605 + * Physical Memory Map
607 +#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 banks of DRAM */
608 +#define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */
609 +#define PHYS_SDRAM_1_SIZE 0x08000000 /* 64 MB */
611 +#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */
612 +#define PHYS_FLASH_2 0x02000000 /* Flash Bank #2 */
613 +#define PHYS_FLASH_SIZE 0x02000000 /* 32 MB */
614 +//#define PHYS_FLASH_BANK_SIZE 0x02000000 /* 32 MB Banks */
615 +//#define PHYS_FLASH_SECT_SIZE 0x00040000 /* 256 KB sectors (x2) */
617 +#define CFG_DRAM_BASE PHYS_SDRAM_1
618 +#define CFG_DRAM_SIZE PHYS_SDRAM_1_SIZE
620 +#define CFG_FLASH_BASE PHYS_FLASH_1
626 +#define CFG_JFFS_CUSTOM_PART 1 /* see board/innokom/flash.c */
630 + * FLASH organization
632 +#define CFG_FLASH_CFI
633 +#define CFG_FLASH_CFI_DRIVER 1
635 +#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
636 +#define CFG_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
638 +#define CFG_FLASH_USE_BUFFER_WRITE 1
640 +/* timeout values are in ticks */
641 +#define CFG_FLASH_ERASE_TOUT (25*CFG_HZ) /* Timeout for Flash Erase */
642 +#define CFG_FLASH_WRITE_TOUT (25*CFG_HZ) /* Timeout for Flash Write */
645 +#endif /* __CONFIG_H */
647 +++ u-boot-1.1.2/board/mnci/memsetup.S
650 + * Memory & peripheral setup of the XScale PXA250
652 + * Written October 2002 by H.Schurig for M&N Logistik-Lösungen Online GmbH
653 + * http://www.mn-logistik.de/unsupported/pxa250/
655 + * Number in Parentheses like (3-29) refer to pages in the
657 + * Intel PXA250 and PXA210
658 + * Application Processor
659 + * Developer's Manual
663 + * See file CREDITS for list of people who contributed to this
666 + * This program is free software; you can redistribute it and/or
667 + * modify it under the terms of the GNU General Public License as
668 + * published by the Free Software Foundation; either version 2 of
669 + * the License, or (at your option) any later version.
671 + * This program is distributed in the hope that it will be useful,
672 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
673 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
674 + * GNU General Public License for more details.
676 + * You should have received a copy of the GNU General Public License
677 + * along with this program; if not, write to the Free Software
678 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
679 + * MA 02111-1307 USA
683 +#include <version.h>
684 +#include <asm/arch/pxa-regs.h>
687 +/**********************************************************************
691 + * PURPOSE: initialize stuff using a addr/data pair table
692 + * PARAMS: r0 - address the the table
693 + * REGISTERS: r0, r1, r2, r3
696 + **********************************************************************/
698 +1: ldmia r0!, {r1,r2} @ load reg/value from regtable
699 + cmp r1, #0 @ at end?
700 + strne r2, [r1] @ if not, store value into reg
701 + ldrne r3, [r1] @ if not, read it back (see PXA errata)
702 + bne 1b @ if not, branch back
706 +/**********************************************************************
715 + **********************************************************************/
721 + adr r0, SystemUnitTable
728 + @ Step 4e wait 200 usec
731 + add r1,r1,#0x300 @ Current OSCR+0x300
737 + @ TODO: data cache must be off, see Developers Manual, Section 6.12,
738 + @ page 6-77, point 6.
740 + @ Step 4f attempt read access to trigger a number of refresh cycles
741 + ldr r2, =CFG_DRAM_BASE
746 + @ TODO: re-enable data cache
751 + @ Done with memory setup
754 + @ Check if we return from Sleep Mode via RCSR (3-33)
757 + and r1,r1,#0xf @ mask RCSR_HWR|RCSR_WDR|RCSR_SMR|RCSR_GPR
758 + str r1, [r0] @ clear Reset Controll State Register
759 + teq r1, #4 @ RCSR_SMR (Sleep Mode)
762 + @ Issue Frequency Change Sequence
765 + mcr p14, 0, r0, c6, c0, 0
769 + @ retrieve the scratchpad value and jump to that address
774 +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
775 +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
776 +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
780 + @ (4-22) Mask all interrupts
781 + .long ICMR, 0x00000000 @ PM
782 + @ (4-22) Interrupts are IRQs, not FIQs
783 + .long ICLR, 0x00000000
784 + @ (4-23) Only enabled and unmasked interrupts bring the CPU out of idle mode
785 + .long ICCR, 0x00000001
786 + @ (4-41) Clear OS Timer Match bits
787 + .long OSSR, 0x0000000f @ NO PM
788 + @ (3-34) Set clock register (we change CP14,6 at the end of this function)
789 + .long CCCR, 0x00000161 @ NO PM, 121 is slow, 241 is medium, 161 is fast
790 + @ (3-38) Enable 32 kHz Oszillator
791 + .long OSCC, 0x00000002
793 + @ (3-36) Enable needed clocks
794 + .long CKEN, 0x00000043 @ PM: FFUART, PWM0, PWM1
796 + .long 0x17c00004,8 @ CPLD: PER_PWR_EN
798 +// Bit GPIO Level Function Direct Altern Function
799 +// --------------------------------------------------
800 +// 00000001 0 1 nc Input 0 normal GPIO
801 +// 00000002 1 1 nPFI Input 0 normal GPIO
802 +// 00000004 2 1 BAT_DATA Input 0 normal GPIO
803 +// 00000008 3 1 IRQ_KEY Input 0 normal GPIO
804 +// 00000010 4 0 IRQ_ETH Input 0 normal GPIO
805 +// 00000020 5 1 nc Input 0 normal GPIO
806 +// 00000040 6 0 MMC_CLK Output 1 MMC_CLK
807 +// 00000080 7 1 IRQ_GSM Input 0 normal GPIO
808 +// 00000100 8 1 nPCC_S1_CD Input 0 normal GPIO
809 +// 00000200 9 1 nMMC_CD Input 0 normal GPIO
810 +// 00000400 10 1 IRQ_RTC Input 0 normal GPIO
811 +// 00000800 11 0 nc 3M6 Output 1 3.6 MHz
812 +// 00001000 12 1 nc Input 0 normal GPIO
813 +// 00002000 13 1 IRQ_DOCK Input 0 normal GPIO
814 +// 00004000 14 1 nc Input 0 normal GPIO
815 +// 00008000 15 1 nc nCS1 Output 2 nCS1
817 +// 00010000 16 1 PWM0 Output 2 PWM0
818 +// 00020000 17 1 PWM1 Output 2 PWM1
819 +// 00040000 18 1 RDY Input 1 RDY
820 +// 00080000 19 1 nPCC_S0_IRQ Input 0 normal GPIO
821 +// 00100000 20 1 nc Input 0 normal GPIO
822 +// 00200000 21 1 AC97_IRQ Input 0 normal GPIO
823 +// 00400000 22 1 nPCC_S1_IRQ Input 0 normal GPIO
824 +// 00800000 23 1 nc IRQ_GSM Input 0 normal GPIO
825 +// 01000000 24 0 UART_INTB Input 0 normal GPIO
826 +// 02000000 25 0 UART_INTC Input 0 normal GPIO
827 +// 04000000 26 1 UART_INTD Input 0 normal GPIO
828 +// 08000000 27 0 nc cpldfree Input 0 normal GPIO
829 +// 10000000 28 1 AUD_BITCLK Input 1 97_BITCLK
830 +// 20000000 29 0 AUD_SDIN0 Input 1 97_SDATAIN0
831 +// 40000000 30 0 AUD_SDOUT Output 2 97_SDATAOUT
832 +// 80000000 31 0 AUD_SYNC Output 2 97_SYNC
834 + .long GPSR0, 0x00008000 @ set nCS1
835 + .long GPDR0, 0xd0038840 @ out MMC_CLK, 3M6, nCS1, PWM0, PWM1
836 + .long GAFR0_L,0x80401000 @ MMC_CLK:1, 3M6:1, nCS1:2
837 + .long GAFR0_U,0xA500001a @ PWM0:2, PWM1:2, RDY:1
838 + @ 97_BITCLK:1, 97_SDATAIN0:1, 97_SDATAOUT:2, 97_SYNC:2
839 + .long PGSR0, 0x00028000 @ sleep set: nCS1, PWM1
840 + .long GRER0, 0x00000000 @ rising edge detect: none
841 + .long GFER0, 0x00000000 @ falling edge detect: none
844 +// 00000001 32 0 USB_INT Input 0 normal GPIO
845 +// 00000002 33 1 nCS5 Output 2 nCS5
846 +// 00000004 34 1 FF_RXD Input 1 FF_RXD
847 +// 00000008 35 1 FF_CTS Input 1 FF_CTS
848 +// 00000010 36 1 FF_DCD Input 1 FF_DCD
849 +// 00000020 37 1 FF_DSR Input 1 FF_DSR
850 +// 00000040 38 1 FF_RI Input 1 FF_RI
851 +// 00000080 39 0 FF_TXD Output 2 FF_TXD
852 +// 00000100 40 0 FF_DTR Output 2 FF_DTR
853 +// 00000200 41 0 FF_RTS Output 2 FF_RTS
854 +// 00000400 42 1 BT_RXD Input 1 BT_RXD
855 +// 00000800 43 1 BT_TXD Output 2 BT_TXD
856 +// 00001000 44 0 BT_CTS Input 1 BT_CTS
857 +// 00002000 45 1 BT_RTS Output 2 BT_RTS
858 +// 00004000 46 1 IR_RXD Input 1 ICP_RXD
859 +// 00008000 47 0 IR_TXD Output 2 ICP_TXD
860 +// 00010000 48 1 nPOE Output 2 nPOE
861 +// 00020000 49 1 nPWE Output 2 nPWE
862 +// 00040000 50 1 nPIOR Output 2 nPIOR
863 +// 00080000 51 1 nPIOW Output 2 nPIOW
864 +// 00100000 52 1 nPCE1 Output 2 nPCE1
865 +// 00200000 53 1 nPCE2 Output 2 nPCE2
866 +// 00400000 54 0 nPKTSEL Output 2 nPKTSEL
867 +// 00800000 55 1 nPREG Output 2 nPREG
868 +// 01000000 56 1 nPWAIT Input 1 nPWAIT
869 +// 02000000 57 1 nIOIS16 Input 1 nIOI16
870 +// 04000000 58 0 LDD0 Output 2 LDD0
871 +// 08000000 59 1 LDD1 Output 2 LDD1
872 +// 10000000 60 0 LDD2 Output 2 LDD2
873 +// 20000000 61 1 LDD3 Output 2 LDD3
874 +// 40000000 62 0 LDD4 Output 2 LDD4
875 +// 80000000 63 0 LDD5 Output 2 LDD5
877 + .long GPSR1, 0x00020302 @ set nCS5, FF_RTS, FF_DTR, nPWE
878 + .long GPCR1, 0x00000080 @ clear FF_TXD
879 + .long GPDR1, 0xfcffab82 @ out: nCS5, FF_TXD, FF_DTR, FF_RTS, BT_TXD,
880 + @ BT_RTS, IR_TXD, nPOE...nPREG, LDD0..LDD5
881 + .long GAFR1_L,0x999a9558 @
882 + .long GAFR1_U,0xaaa5aaaa @
883 + .long PGSR1, 0x00020002 @ sleep set: nCS5, nPWE
884 + .long GRER1, 0x00000000 @
885 + .long GFER1, 0x00000000 @
889 +// 00000001 64 0 LDD6 Output 2 LDD6
890 +// 00000002 65 1 LDD7 Output 2 LDD7
891 +// 00000004 66 1 LDD8 Output 2 LDD8
892 +// 00000008 67 0 LDD9 Output 2 LDD9
893 +// 00000010 68 1 LDD10 Output 2 LDD10
894 +// 00000020 69 0 LDD11 Output 2 LDD11
895 +// 00000040 70 0 LDD12 Output 2 LDD12
896 +// 00000080 71 1 LDD13 Output 2 LDD13
897 +// 00000100 72 0 LDD14 Output 2 LDD14
898 +// 00000200 73 0 LDD15 Output 2 LDD15
899 +// 00000400 74 1 FCLK Output 2 FCLK
900 +// 00000800 75 1 LCLK Output 2 LCLK
901 +// 00001000 76 1 PCLK Output 2 PCLK
902 +// 00002000 77 0 BIAS Output 2 ACBIAS
903 +// 00004000 78 1 nCS2 Output 2 nCS2
904 +// 00008000 79 1 nCS3 Output 2 nCS3
905 +// 00010000 80 1 nCS4 Output 2 nCS4
906 +// 00020000 81 1 nc Input 0 normal GPIO
907 +// 00040000 82 1 nc Input 0 normal GPIO
908 +// 00080000 83 1 nc Input 0 normal GPIO
909 +// 00100000 84 1 nc Input 0 normal GPIO
911 + .long GPSR2, 0x0001c000 @ set nCS2..4
912 + .long GPDR2, 0x0001FFFF @ out: LDD6..nCS4
913 + .long GAFR2_L,0xaaaaaaaa @
914 + .long GAFR2_U,0x00000002 @
915 + .long PGSR2, 0x0001c000 @ sleep set: nCS2..4
916 + .long GRER2, 0x00000000 @
917 + .long GFER2, 0x00000000 @
919 + @ (3-25) Power Wakeup Registers
920 + .long PWER, 0x00000008 @ wake up on IRQ_KEY
921 + .long PRER, 0x00000008 @ detect rising edge on IRQ_KEY
922 + .long PFER, 0x00000000 @ dont detect falling edges
924 + @ (3-28) Power Manager Edge Detect Status Register
925 + .long PEDR, 0x00000008 @ clear edge detect status for IRQ_KEY
927 + @ (3-29) Sleep State Register
928 + .long PSSR, 0x00000030 @ clear PH and RDH
932 + .long PWM_PERVAL0, 512
933 + .long PWM_PERVAL1, 512
934 + .long PWM_PWDUTY0, 440
935 + .long PWM_PWDUTY1, 450
944 + @ Info on this sequence is in the OS Developers Guide, Section 10.0 on page 13
945 + @ also see Developers Manual, Section 6.12 on page 6-76
947 + @ write MSC0, MSC1, MSC2 (6-44)
948 + .long MSC0, 0x7ff0fdc3 @ f4c0
949 + .long MSC1, 0x29842981
950 + .long MSC2, 0x29842984
952 + @ no synchronous static stuff here
953 + .long SXCNFG, 0x00000000 @ (6-31)
955 + @ write MECR (6-60), MCMEMx (6-57), MCATTx (6-58), MCIOx (6-58)
956 + .long MECR, 0x00000003
957 + .long MCMEM0, 0x00020418
958 + .long MCMEM1, 0x00020418
959 + .long MCATT0, 0x0002449D
960 + .long MCATT1, 0x0002449D
961 + .long MCIO0, 0x00014290
962 + .long MCIO1, 0x00014290
964 + @ write FLYCNFG (that register is now undocumented)
966 + @ OS Developers Manual: write MDREFR (6-15), K0RUN and K0PIN are
967 + @ set for synchronous static memory. The desired value of
968 + @ K0DB2 can be programmed. KxFREE can be deasserted. APD must
969 + @ remain deasserted and SLFRSH must remain asserted.
970 + @ Developers Manual: write K0RUN and E0PIN. Configure K0DB2. Retain
971 + @ the current values of APD and SLFRSH. DRI must contain a
972 + @ valid value. Deassert KxFREE.
973 + .long MDREFR, 0x00400016 @ 2d KxFREE & APD deasserted, SLFRSH asserted
975 + @ Developers Manual: in systems containing Synchronous Static Memory, write
976 + @ to SXCNFG, including the enable bits.
977 + @.long SXCNFG, 0x00000000 @ no Synchronous Static Memory
979 + @ Assert K1RUN and K2RUN and configure K1DB2 and K2DB2
980 + .long MDREFR, 0x00450016 @ 4a
981 + .long MDREFR, 0x00050016 @ 4b deassert SLFRFH
982 + .long MDREFR, 0x00058016 @ 4c assert E1PIN
983 + .long MDCNFG, 0x0A000AC8 @ 4d without DE0/DE1 (6-10)
994 +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
998 + .long MDCNFG, 0x0A000ACB @ 4d with DE0/DE1
999 + .long MDMRS, 0x00000000 @ 4h
1000 + .long MDREFR, 0x00118016 @ 5 (optional) turn APD on
1001 + .long 0x17C0002C, 0x00000011 @ MNCI: enable FFUART driver
1002 + .long 0x17c00034, 0x00000000 @ MNCI: enable flash write
1003 + .long 0x17c00028, 0x00000000 @ MNCI: turn off CF-Card enable
1004 + .long 0x17c00014, 0x00000000 @ MNCI: turn off CF-Card power
1005 + .long 0x10000000, 0x0000d803 @ MNCI: disable all LEDs, SCANNER_WAKE & SCANNER_TRIG on
1006 +@ .long 0x10000000, 0x0000d80b @ MNCI: disable all LEDs, SCANNER_WAKE, SCANNER_TRIG & UARTB on