Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx
authorWolfgang Denk <wd@denx.de>
Wed, 18 Feb 2009 23:50:08 +0000 (00:50 +0100)
committerWolfgang Denk <wd@denx.de>
Wed, 18 Feb 2009 23:50:08 +0000 (00:50 +0100)
27 files changed:
CHANGELOG
MAINTAINERS
MAKEALL
Makefile
README
board/davedenx/qong/Makefile [new file with mode: 0644]
board/davedenx/qong/config.mk [new file with mode: 0644]
board/davedenx/qong/lowlevel_init.S [new file with mode: 0644]
board/davedenx/qong/qong.c [new file with mode: 0644]
board/davedenx/qong/qong_fpga.h [new file with mode: 0644]
board/davedenx/qong/u-boot.lds [new file with mode: 0644]
board/emk/common/flash.c
board/evb64260/flash.c
common/cmd_mmc.c
cpu/mpc85xx/cpu.c
drivers/block/sata_sil3114.c
drivers/net/Makefile
drivers/net/dnet.c [new file with mode: 0644]
drivers/net/dnet.h [new file with mode: 0644]
drivers/serial/ns16550.c
include/asm-arm/arch-mx31/mx31-regs.h
include/configs/SIMPC8313.h
include/configs/omap3_zoom1.h
include/configs/qong.h [new file with mode: 0644]
include/netdev.h
lib_arm/board.c
mkconfig

index e9c2c82..e821ec5 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,789 @@
+commit 369d0aa9674b65c83f8553b9bcf9d207dc369223
+Author: Kim Phillips <kim.phillips@freescale.com>
+Date:  Wed Feb 18 17:43:59 2009 -0600
+
+    sata_sil3114: fix compiler warning
+
+    judging from other printfs in the same file, it seems ata should be
+    postpended with the interface number, not the address of the global
+    port variable.  Fixes this for current u-boot-mpc83xx tree:
+
+    Configuring for MPC8349ITX board...
+    sata_sil3114.c: In function 'sata_bus_softreset':
+    sata_sil3114.c:99: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'struct sata_port *'
+    sata_sil3114.c:108: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'struct sata_port *'
+
+    Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
+
+commit f5675aa5ceeef30740970ab8ca0c8cbc324945cd
+Author: Ron Madrid <ron_madrid@sbcglobal.net>
+Date:  Wed Feb 18 14:30:44 2009 -0800
+
+    Create configuration option for restricted ns16550 functions
+
+    This patch will create a configuration option for a minimum configuration for
+    the ns16550 serial driver at drivers/serial/ns16550.c and will apply this new
+    configuration option to the SIMPC8313.h config file in order to fix the NAND
+    bootstrap build error.  This option will exclude all functions with exception of
+    NS16550_putc and NS16550_init.  This will be used primarily to save space and
+    remove unused code from builds in which space is limited.
+
+    Signed-off-by: Ron Madrid <ron_madrid@sbcglobal.net>
+
+commit 7b0bc0219db8981613259473cf19699ac259b4fb
+Author: Kim Phillips <kim.phillips@freescale.com>
+Date:  Wed Feb 18 16:14:29 2009 -0600
+
+    mkconfig: include board config.h before asm/config.h
+
+    swapping the include order suppresses warnings for board configs
+    that define their own CONFIG_MAX_MEM_MAPPED:
+
+    In file included from /home/r1aaha/git/u-boot/include/config.h:5,
+                   from /home/r1aaha/git/u-boot/include/common.h:35,
+                   from simpc8313.c:26:
+    /home/r1aaha/git/u-boot/include/configs/SIMPC8313.h:81:1: warning:
+    "CONFIG_MAX_MEM_MAPPED" redefined
+    In file included from /home/r1aaha/git/u-boot/include/config.h:4,
+                   from /home/r1aaha/git/u-boot/include/common.h:35,
+                   from simpc8313.c:26:
+    /home/r1aaha/git/u-boot/include/asm/config.h:28:1: warning: this is
+    the location of the previous definition
+
+    Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
+
+commit b8845abdc0dcf20d0944e965153f5ae7a9c3077c
+Author: Wolfgang Denk <wd@denx.de>
+Date:  Wed Feb 18 21:35:38 2009 +0100
+
+    Fix build errors after making flash_get_info() non-static
+
+    Fix for these build problems:
+    error: static declaration of 'flash_get_info' follows non-static declaration
+
+    Signed-off-by: Wolfgang Denk <wd@denx.de>
+
+commit 5f0320108870e5d62983d1d5c13a2a087dddf686
+Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+Date:  Sun Feb 1 17:07:52 2009 +0100
+
+    common/console: avoid ifdef CONFIG_CONSOLE_MUX when it's possible
+
+    Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+
+commit ec6f14994602276660f7264c6ab3b91ef1f7614d
+Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+Date:  Sun Feb 1 17:07:51 2009 +0100
+
+    common/console: coding style cleanup
+
+    Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+
+commit daaf74f176b548dfd34a9990231f4189201d57ba
+Author: Mike Frysinger <vapier@gentoo.org>
+Date:  Thu Jan 29 20:02:23 2009 -0500
+
+    mpc8xx_pcmcia: move CONFIG_8xx out of .c file and into Makefile
+
+    Move the CONFIG_8xx mpc8xx_pcmcia.c protection out of the C file and
+    into the Makefile so we avoid pointless compiling of the file.
+
+    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+
+commit 7bd2722e890bc877a3c057d7ccddc80451c99939
+Author: Mike Frysinger <vapier@gentoo.org>
+Date:  Thu Jan 29 20:02:07 2009 -0500
+
+    disk: convert part_* files to COBJ-$(CONFIG_XXX) style
+
+    Move the CONFIG_XXX out of the part_XXX.c file and into Makefile to
+    avoid pointless compiles.
+
+    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+
+commit f05fa9205e04986176dc7ab8b710bcb5fbe9f338
+Author: Petri Lehtinen <petri.lehtinen@inoi.fi>
+Date:  Thu Jan 29 10:35:40 2009 +0200
+
+    include/image.h: Ease grepping of image_* functions
+
+    Because the functions have been defined using macros, grepping for
+    their definitions is not possible. This patch adds the real function
+    names in comments.
+
+    Signed-off-by: Petri Lehtinen <petri.lehtinen@inoi.fi>
+    Acked-by: Mike Frysinger <vapier@gentoo.org>
+
+commit bdab39d358e63aa47f400a8a76b8d5f283842df3
+Author: Mike Frysinger <vapier@gentoo.org>
+Date:  Wed Jan 28 19:08:14 2009 -0500
+
+    rename CONFIG_CMD_ENV to CONFIG_CMD_SAVEENV
+
+    The CONFIG_CMD_ENV option controls enablement of the `saveenv` command
+    rather than a generic "env" command, or anything else related to the
+    environment.  So, let's make sure the define is named accordingly.
+
+    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+
+commit 8b0592b89e0f9f81c9e150c81d96f8a43e4d6101
+Author: Valeriy Glushkov <gvv@lstec.com>
+Date:  Fri Jan 23 20:02:17 2009 +0200
+
+    disable imls command if no flash is defined
+
+    Default CONFIG_CMD_IMLS must be disabled when CONFIG_SYS_NO_FLASH is defined
+
+    Signed-off-by: Valeriy Glushkov <gvv@lstec.com>
+
+commit 923aa48126259c13de95131203f1d28bfa5cb889
+Author: Rafal Jaworowski <raj@semihalf.com>
+Date:  Fri Jan 23 13:27:18 2009 +0100
+
+    API: Improve glue mid-layer of the API demo application.
+
+    - Extend ub_dev_read() and ub_dev_recv() so they return the length actually
+    read, which allows for better control and error handling (this introduces
+    additional error code API_ESYSC returned by the glue mid-layer).
+
+    - Clean up definitions naming and usage.
+
+    - Other minor cosmetics.
+
+    Note these changes do not touch the API proper, so the interface between
+    U-Boot and standalone applications remains unchanged.
+
+    Signed-off-by: Rafal Jaworowski <raj@semihalf.com>
+
+commit 44a94e596ba0f6d0951b165403c520bf55b1c56f
+Author: Rafal Jaworowski <raj@semihalf.com>
+Date:  Fri Jan 23 13:27:17 2009 +0100
+
+    API: Only output test data when reading was successful.
+
+    Signed-off-by: Rafal Czubak <rcz@semihalf.com>
+
+commit 7fb6c4f9b06c5539043c8bfc6565710b8090841d
+Author: Rafal Jaworowski <raj@semihalf.com>
+Date:  Fri Jan 23 13:27:16 2009 +0100
+
+    API: Provide syscall entry point for the ARM architecture.
+
+    Signed-off-by: Rafal Czubak <rcz@semihalf.com>
+    Acked-by: Rafal Jaworowski <raj@semihalf.com>
+
+commit b84d7d8f1e1066f810866304a16a3583f88e7c98
+Author: Rafal Jaworowski <raj@semihalf.com>
+Date:  Fri Jan 23 13:27:15 2009 +0100
+
+    API: Use stack pointer as API signature search hint in the glue layer.
+
+    De-hardcode range in RAM we search for the API signature. Instead use the stack
+    pointer as a hint to narrow down the range in which the signature could reside
+    (it is malloc'ed on the U-Boot heap, and is hoped to remain in some proximity
+    from stack area). Adjust PowerPC code in API demo to the new scheme.
+
+    Signed-off-by: Rafal Czubak <rcz@semihalf.com>
+    Signed-off-by: Rafal Jaworowski <raj@semihalf.com>
+
+commit 86b4bafdfaf669ede8fd99044abc7e27ea29b4f5
+Author: Wolfgang Denk <wd@denx.de>
+Date:  Tue Feb 17 10:26:38 2009 +0100
+
+    TQM8260: fix locations of kernel and ramdisk images in flash
+
+    After introducing redundant environment the kernel images was
+    overlapping with environment.
+
+    Signed-off-by: Wolfgang Denk <wd@denx.de>
+
+commit e1ac387f4645499746856adc1aeaa9787da2eca6
+Author: Andy Fleming <afleming@freescale.com>
+Date:  Thu Oct 30 16:50:14 2008 -0500
+
+    83xx: Add eSDHC support on 8379 EMDS board
+
+    Signed-off-by: Andy Fleming <afleming@freescale.com>
+
+commit 80522dc8369a89938369fbcee572e662373bc9a3
+Author: Andy Fleming <afleming@freescale.com>
+Date:  Thu Oct 30 16:51:33 2008 -0500
+
+    85xx: Add eSDHC support for 8536 DS
+
+    Signed-off-by: Andy Fleming <afleming@freescale.com>
+
+commit 50586ef24ed5caf6ce5591df76f355009da2cd79
+Author: Andy Fleming <afleming@freescale.com>
+Date:  Thu Oct 30 16:47:16 2008 -0500
+
+    Add support for the Freescale eSDHC found on 8379 and 8536 SoCs
+
+    This uses the new MMC framework
+
+    Some contributions by Dave Liu <daveliu@freescale.com>
+
+    Signed-off-by: Andy Fleming <afleming@freescale.com>
+
+commit 272cc70b211e945e4413122aa73868f6ada732a5
+Author: Andy Fleming <afleming@freescale.com>
+Date:  Thu Oct 30 16:41:01 2008 -0500
+
+    Add MMC Framework
+
+    Here's a new framework (based roughly off the linux one) for managing
+    MMC controllers.  It handles all of the standard SD/MMC transactions,
+    leaving the host drivers to implement only what is necessary to
+    deal with their specific hardware.
+
+    This also hooks the infrastructure into the PowerPC board code
+    (similar to how the ethernet infrastructure now hooks in)
+
+    Some of this code was contributed by Dave Liu <daveliu@freescale.com>
+
+    Signed-off-by: Andy Fleming <afleming@freescale.com>
+
+commit 1de97f9856f697380cc504126ab92561ed238803
+Author: Andy Fleming <afleming@freescale.com>
+Date:  Thu Oct 30 16:31:39 2008 -0500
+
+    Eliminated arch-specific mmc header requirement
+
+    The current MMC infrastructure relies on the existence of an
+    arch-specific header file. This isn't necessary, and a couple
+    drivers were forced to implement dummy files to meet this requirement.
+    Instead, we move the stuff in those header files into a more appropriate
+    place, and eliminate the stubs and the #include of asm/arch/mmc.h
+
+    Signed-off-by: Andy Fleming <afleming@freescale.com>
+
+commit abb5466ccf4ce50f412d459586f4f4b81cb73ac3
+Author: Andy Fleming <afleming@freescale.com>
+Date:  Thu Oct 30 16:21:00 2008 -0500
+
+    Convert mmc_init to mmc_legacy_init
+
+    This is to get it out of the way of incoming MMC framework
+
+    Signed-off-by: Andy Fleming <afleming@freescale.com>
+
+commit b2e2ed0233a5ef299361abec4fbdaefb63456eff
+Author: Andy Fleming <afleming@freescale.com>
+Date:  Thu Oct 30 16:19:25 2008 -0500
+
+    Eliminate support for using MMC as memory
+
+    MMC cards are not memory, so we stop treating them that way.
+
+    Signed-off-by: Andy Fleming <afleming@freescale.com>
+
+commit e1be0d25ecf494ae81245ca438738ba839d6329b
+Author: Poonam_Aggrwal-b10812 <b10812@freescale.com>
+Date:  Sun Jan 4 08:46:38 2009 +0530
+
+    32bit BUg fix for DDR2 on 8572
+
+    This errata fix is required for 32 bit DDR2 controller on 8572.
+    May  also be required for P10XX20XX platforms
+
+    Signed-off-by: Poonam_Agarwal-b10812 <b10812@lc1106.zin33.ap.freescale.net>
+
+commit e0c4fac79d4d74572ddd43f75e7189cecca8d0ad
+Author: Andy Fleming <afleming@freescale.com>
+Date:  Mon Feb 16 09:40:20 2009 -0600
+
+    TQM85xx: Fix a couple warnings in TQM8548 build
+
+    The ecm variable in sdram.c was being declared for all 8548, but only
+    used by specific 8548 boards, so we make that variable require those
+    specific boards, too
+
+    The nand code was using an index "i" into a table, and then re-using "i"
+    to set addresses for each upm.  However, then it relied on the old value
+    of i still being there to enable things.  Changed the second "i" to "j"
+
+    Signed-off-by: Andy Fleming <afleming@freescale.com>
+
+commit cf07a5baece0ecfc5284cfda8a4e68eaf92782f8
+Author: Wolfgang Grandegger <wg@grandegger.com>
+Date:  Wed Feb 11 18:38:26 2009 +0100
+
+    MPC85xx: TQM8548: workaround for erratum DDR 19 and 20
+
+    This patch adds the workaround for erratum DDR20 according to MPC8548
+    Device Errata document, Rev. 1: "CKE signal may not function correctly
+    after assertion of HRESET". Furthermore, the bug DDR19 is fixed in
+    processor version 2.1 and the work-around must be removed.
+
+    Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
+
+commit 080408fdc71706adcb883d22125637c54f6010b1
+Author: Wolfgang Grandegger <wg@grandegger.com>
+Date:  Wed Feb 11 18:38:25 2009 +0100
+
+    MPC85xx: TQM8548: use cache for AG and BE variants
+
+    This patch makes accesses to the system memory cachable by removing the
+    caching-inhibited and guarded flags from the relevant TLB entries for
+    the TQM8548_BE and TQM8548_AG modules. FYI, the Freescale MPC85* boards
+    are configured similarly.
+
+    This results in a big averall performace improvement. TFTP downloads,
+    NAND Flash accesses, kernel boots, etc. are much faster.
+
+    Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
+
+commit dc5f55d636d7bf21ba17758fac4b929ec4c059f2
+Author: Wolfgang Grandegger <wg@grandegger.com>
+Date:  Wed Feb 11 18:38:24 2009 +0100
+
+    MPC85xx: TQM8548_AG: add 1 GiB DDR2-SDRAM configuration
+
+    This patch add support for the 1 GiB DDR2-SDRAM on the TQM8548_AG
+    module.
+
+    Signed-off-by: Jens Gehrlein <sew_s@tqs.de>
+    Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
+
+commit 88b0e88d186479349e5a2b771e82775109e10fb4
+Author: Wolfgang Grandegger <wg@grandegger.com>
+Date:  Wed Feb 11 18:38:23 2009 +0100
+
+    MPC85xx: TQM8548: fix SDRAM timing for 533 MHz
+
+    According to new TQM8548 timing specification:
+    Refresh Recovery: 34 -> 53 clocks
+    CKE pulse width:  1 -> 3 cycles
+    Window for four activities: 13 -> 14 cycles
+
+    Signed-off-by: Jens Gehrlein <sew_s@tqs.de>
+    Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
+
+commit a865bcdac89278cac4dfc07dec8299403110499d
+Author: Wolfgang Grandegger <wg@grandegger.com>
+Date:  Wed Feb 11 18:38:22 2009 +0100
+
+    MPC85xx: TQM8548: add support for the TQM8548_AG module
+
+    The TQM8548_AG is a variant of the TQM8548 module with 1 GiB memory,
+    CAN and without PCI/PCI-X and RTC. U-Boot can be built for this module
+    with "$ make TQM8548_AG_config".
+
+    Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
+
+commit ad7ee5d43b0db94079d56521dabca25674f28747
+Author: Wolfgang Grandegger <wg@grandegger.com>
+Date:  Wed Feb 11 18:38:21 2009 +0100
+
+    MPC85xx: TQM8548: add support for the TQM8548_BE module
+
+    The TQM8548_BE is a variant of the TQM8548 module with NAND and CAN
+    interface. With NAND support, the image is significantly larger and
+    TEXT_BASE is adjusted accordingly. U-Boot can be built for this
+    module with "$ make TQM8548_BE_config".
+
+    Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
+
+commit a318234878c346e673b2ef8dc4b14b338fe7fc2b
+Author: Wolfgang Grandegger <wg@grandegger.com>
+Date:  Wed Feb 11 18:38:20 2009 +0100
+
+    MPC85xx: TQM85xx: make standard PCI/PCI-X configurable
+
+    The TQM8548_AG module does not have the standard PCI/PCI-X interface
+    connected but just the PCI Express interface . So far it was not
+    possible to disable it without disabling the complete PCI interface
+    (CONFIG_PCI) including PCI Express.
+
+    Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
+
+commit 31ca9119c3186cec579b54d2a7a2b361b4d2b7bf
+Author: Wolfgang Grandegger <wg@grandegger.com>
+Date:  Wed Feb 11 18:38:19 2009 +0100
+
+    MPC85xx: TQM85xx: fix flash protection for boot loader
+
+    As the reset vector is located at 0xfffffffc, all flash sectors from the
+    beginning of the U-Boot binary to 0xffffffff must be protected. On the
+    TQM8548-AG having small sectors at the end of the flash it happened that
+    the last two sector were not protected and an "erase all" left an
+    un-bootable system behind:
+
+    Bank # 2: CFI conformant FLASH (32 x 16)  Size: 32 MB in 270 Sectors
+      AMD Standard command set, Manufacturer ID: 0xEC, Device ID: 0x257E
+      Erase timeout: 8192 ms, write timeout: 1 ms
+
+      FFFA0000 E RO   FFFC0000  RO   FFFE0000   RO   FFFE4000   RO   FFFE8000   RO
+      FFFEC000  RO   FFFF0000   RO   FFFF4000   RO   FFFF8000 E      FFFFC000
+
+    The same bug seems to be in drivers/mtd/cfi_flash.c:flash_init() and many
+    board BSPs as well.
+
+    Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
+
+commit a1c8a719262151f97119e76166043ee3da3f97b2
+Author: Peter Tyser <ptyser@xes-inc.com>
+Date:  Fri Feb 6 14:30:40 2009 -0600
+
+    86xx: Update CPU info output on bootup
+
+    - Update style of 86xx CPU information on boot to more closely
+      match 85xx boards
+    - Fix detection of 8641/8641D
+    - Use strmhz() to display frequencies
+    - Display L1 information
+    - Display L2 cache size
+    - Fixed CPU/SVR version output
+
+    == Before ==
+    Freescale PowerPC
+    CPU:
+       Core: E600 Core 0, Version: 0.2, (0x80040202)
+       System: Unknown, Version: 2.1, (0x80900121)
+       Clocks: CPU:1066 MHz, MPX: 533 MHz, DDR: 266 MHz, LBC: 133 MHz
+       L2: Enabled
+    Board: X-ES XPedite5170 3U VPX SBC
+
+    == After ==
+    CPU:   8641D, Version: 2.1, (0x80900121)
+    Core:  E600 Core 0, Version: 2.2, (0x80040202)
+    Clock Configuration:
+          CPU:1066.667 MHz, MPX:533.333 MHz
+          DDR:266.667 MHz (533.333 MT/s data rate), LBC:133.333 MHz
+    L1:    D-cache 32 KB enabled
+          I-cache 32 KB enabled
+    L2:    512 KB enabled
+    Board: X-ES XPedite5170 3U VPX SBC
+
+    Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
+
+commit 22c00f8d7d454d77e759df58415d2d3f3d7e154c
+Author: Peter Tyser <ptyser@xes-inc.com>
+Date:  Thu Feb 5 11:25:24 2009 -0600
+
+    86xx: Update Global Utilities structure
+
+    Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
+
+commit 4ef630df773e45806d701bf5d25c328778bb4cde
+Author: Peter Tyser <ptyser@xes-inc.com>
+Date:  Thu Feb 5 11:25:25 2009 -0600
+
+    86xx: Reset update
+
+    Update the 86xx reset sequence to try executing a board-specific reset
+    function.  If the board-specific reset is not implemented or does not
+    succeed, then assert #HRESET_REQ.  Using #HRESET_REQ is a more standard
+    reset procedure than the previous method and allows all board
+    peripherals to be reset if needed.
+
+    Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
+
+commit edf0e2524a8c6a3e91c009c496a0aa0ae89cd8ab
+Author: Kumar Gala <galak@kernel.crashing.org>
+Date:  Tue Feb 10 23:53:40 2009 -0600
+
+    fsl-ddr: Allow system to boot if we have more than 4G of memory
+
+    Previously if we >=4G of memory and !CONFIG_PHYS_64BIT we'd report
+    an error and hang. Instead of doing that since DDR is mapped in the
+    lowest priority LAWs we setup the DDR controller and the max amount
+    of memory we report back is what we can map (CONFIG_MAX_MEM_MAPPED)
+
+    Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
+    Acked-by: Becky Bruce <beckyb@kernel.crashing.org>
+
+commit 8d949aff38cfb4388cbd73876e77bcd06d601f20
+Author: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
+Date:  Wed Jan 21 17:17:33 2009 -0600
+
+    mpc85xx: Add support for the P2020
+
+    Added various p2020 processor specific details:
+    * SVR for p2020, p2020E
+    * immap updates for LAWs and DDR on p2020
+    * LAW defines related to p2020
+
+    Signed-off-by: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
+    Signed-off-by: Travis Wheatley <Travis.Wheatley@freescale.com>
+    Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
+
+commit cb69e4de8702e108324e1c40363f30ef6f2e2918
+Author: Kumar Gala <galak@kernel.crashing.org>
+Date:  Tue Feb 10 17:36:15 2009 -0600
+
+    85xx: print boot header info to distinquish 36-bit addr map on MPC8572 DS
+
+    Added some info that is printed out when we boot to distiquish if we
+    built MPC8572DS_config vs MPC8572DS_36BIT_config since they have
+    different address maps.
+
+    Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
+
+commit feede8b07013b33fca8dd2a916b3ac86bf4d4c0a
+Author: Andy Fleming <afleming@freescale.com>
+Date:  Fri Dec 5 20:10:22 2008 -0600
+
+    Fixup SGMII PHY ids in the device tree
+
+    The device tree's PHY addresses need to be fixed up if we're using the
+    SGMII Riser Card.
+
+    The 8572, 8536, and 8544 DS boards were modified to call this function.
+
+    Code idea taken from Liu Yu <yu.liu@freescale.com>
+
+    Signed-off-by: Andy Fleming <afleming@freescale.com>
+
+commit 5dc0cf68f8f101042997d75188081d8526d705ea
+Author: Andy Fleming <afleming@freescale.com>
+Date:  Wed Feb 11 15:10:31 2009 -0600
+
+    Make some minor whitespace changes to eliminate line-wrapping
+
+    Signed-off-by: Andy Fleming <afleming@freescale.com>
+
+commit 9e56986a2b74d197f51eca70fad7b836b1900c4d
+Author: Andy Fleming <afleming@freescale.com>
+Date:  Wed Feb 11 15:07:24 2009 -0600
+
+    Add eth_get_dev_by_index
+
+    This allows code to iterate through the ethernet devices
+
+    Signed-off-by: Andy Fleming <afleming@freescale.com>
+
+commit b67305120aaf268a6140125346678166d14f1f47
+Author: Kumar Gala <galak@kernel.crashing.org>
+Date:  Mon Feb 9 22:03:04 2009 -0600
+
+    85xx: Fix bug in device tree setup in 36-bit physical confg
+
+    In the 36-bit physical config for MPC8572DS when need the start address
+    of memory and it size to be kept in phys_*_t instead of a ulong since
+    we support >4G of memory in the config and ulong cant represent that.
+    Otherwise we end up seeing the memory node in the device tree reporting
+    back we have memory starting @ 0 and of size 0.
+
+    Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
+
+commit ad97dce18445ff05bf326094e691a01aa95aa8dc
+Author: Kumar Gala <galak@kernel.crashing.org>
+Date:  Mon Feb 9 22:03:05 2009 -0600
+
+    85xx: Fix address map for 36-bit config of MPC8572DS
+
+    When we introduced the 36-bit config of the MPC8572DS board we had the
+    wrong PCI MEM bus address map.  Additionally, the change to the address
+    map exposes a small issue in our dummy read on the ULI bus.  We need
+    to use the new mapping functions to handle that read properly in the
+    36-bit config.
+
+    Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
+
+commit f8523cb0815b2d3d2d780b7d49ca614105555f58
+Author: Kumar Gala <galak@kernel.crashing.org>
+Date:  Fri Feb 6 09:56:35 2009 -0600
+
+    85xx: Fix how we map DDR memory
+
+    Previously we only allowed power-of-two memory sizes and didnt
+    handle >2G of memory.  Now we will map up to CONFIG_MAX_MEM_MAPPED
+    and should properly handle any size that we can make in the TLBs
+    we have available to us
+
+    Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
+
+commit 1542fbdeec0d1e2a6df13189df8dcb1ce8802be3
+Author: Kumar Gala <galak@kernel.crashing.org>
+Date:  Fri Feb 6 09:56:34 2009 -0600
+
+    fsl-ddr: ignore memctl_intlv_ctl setting if only one DDR controller
+
+    If we only have one controller we can completely ignore how
+    memctl_intlv_ctl is set.  Otherwise other levels of code get confused
+    and think we have twice as much memory.
+
+    Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
+
+commit b29dee3c906e9daaf6baf7772d2e15e26b8636b8
+Author: Kumar Gala <galak@kernel.crashing.org>
+Date:  Wed Feb 4 09:35:57 2009 -0600
+
+    85xx: Format cpu freq printing to handle 8 cores
+
+    Only print 4 cpu freq per line.  This way when we have 8 cores its a
+    bit more readable.
+
+    Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
+
+commit 9704f9caf53f5cae547d8c5e1ae94aa4e57b160f
+Author: Abraham, Thomas <t-abraham@ti.com>
+Date:  Tue Oct 28 16:51:31 2008 +0530
+
+    USB: Remove LUN number from CDB
+
+    The LUN number is not part of the Command Descriptor Block (CDB) for scsi inquiry, request sense, test unit ready, read capacity and read10 commands. This patch removes the LUN number information from the CDB.
+
+    Signed-off-by: Thomas Abraham <t-abraham@ti.com>
+    Signed-off-by: Remy Bohmer <linux@bohmer.net>
+
+commit f3c0de636252f3a18654c8f9c6370a9574a7e755
+Author: Atin Malaviya <atin.malaviya@gmail.com>
+Date:  Tue Feb 3 15:17:10 2009 -0500
+
+    Added usbtty_configured() check. Fixed attribute(packed) warnings.
+
+    V3: Fixed line-wrap problem due to user error in mail!
+
+    Added usb_configured() checks in usbtty_puts() and usbtty_putc() to get around a hang
+    when usb is not connected and the user has set up multi-io (setenv stdout serial,usbtty etc).
+    Got rid of redundant __attribute__((packed)) directives that were causing warnings from gcc.
+
+    Signed-off-by: Atin Malaviya <atin.malaviya@gmail.com>
+    Signed-off-by: Remy Bohmer <linux@bohmer.net>
+
+commit e7de18afe8ecf96a51ef981d06066eeb6b1254e7
+Author: Guennadi Liakhovetski <lg@denx.de>
+Date:  Fri Feb 13 09:23:36 2009 +0100
+
+    i.MX31: Start the I2C clock on driver initialisation
+
+    i.MX31 powers on with most clocks running, so, after a power on this explicit
+    clock start up is not required. However, as Linux boots it disables most clocks
+    to save power. This includes the I2C clock. If we then soft reboot from Linux
+    the I2C clock stays off. This breaks the phycore, which has its environment in
+    I2C EEPROM. Fix the problem by explicitly starting the clock in I2C driver
+    initialisation routine.
+
+    Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
+    Ack-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+
+commit 15208ac9eae1c340c4bc11f70cbf5c9da78a57ba
+Author: Mike Frysinger <vapier@gentoo.org>
+Date:  Wed Feb 11 20:36:14 2009 -0500
+
+    i2c.h: drop i2c_reg_{read, write} hack for Blackfin parts
+
+    The Blackfin i2c driver has been rewritten thus the special ifdefs in the
+    common code are no longer needed.
+
+    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+
+commit c2d9befa0b4695b89476fb5d259742c09afe243f
+Author: Heiko Schocher <hs@denx.de>
+Date:  Thu Feb 12 08:08:54 2009 +0100
+
+    82xx, mgcoge: fix compile error
+
+    With actual u-boot compiling the mgcoge port fails, because
+    since commit ba705b5b1a97b47388ed48858bef6bf7b6bfcd56 it is
+    necessary to define CONFIG_NET_MULTI.
+
+    Seems to me the mgcoge port is the only actual existing 8260
+    port who uses CONFIG_ETHER_ON_SCC, so no other 8260 port needed
+    to be fixed.
+
+    Signed-off-by: Heiko Schocher <hs@denx.de>
+
+commit 9cacf4fc4035eabe9d9ae2a9a188c51a8027c91e
+Author: Dirk Eibach <eibach@gdsys.de>
+Date:  Mon Feb 9 08:18:34 2009 +0100
+
+    ppc4xx: Add README entry for CONFIG_PCI_DISABLE_PCIE
+
+    Signed-off-by: Dirk Eibach <eibach@gdsys.de>
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 7369f0e384e2a831be13a7773a58242c9173fa9c
+Author: Carolyn Smith <carolyn.smith@tektronix.com>
+Date:  Thu Feb 12 06:13:44 2009 +0100
+
+    ppc4xx: Fix initialization of the SDRAM_CODT register
+
+    This fixes the initialization of the SDRAM_CODT register in the ppc4xx DDR2
+    initialization code. It also removes use of the SDRAM_CODT_FEEDBACK_RCV_SINGLE_END
+    and SDRAM_CODT_FEEDBACK_DRV_SINGLE_END #define's since they are reserved bits.
+
+    Signed-off-by: Carolyn Smith <carolyn.smith@tektronix.com>
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit cef0efaf2fa55d1f25066cfb02bd984c27f9ca31
+Author: Stefan Roese <sr@denx.de>
+Date:  Wed Feb 11 09:29:33 2009 +0100
+
+    ppc4xx: Fix problem with board_eth_init() vs cpu_eth_init() on AMCC boards
+
+    Some AMCC eval boards do have a board_eth_init() function calling
+    pci_eth_init(). These boards need to call cpu_eth_init() explicitly now
+    with the new eth_init rework.
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit c645012aefebb301e6907d148c6c8efacac049d4
+Author: Adam Graham <agraham@amcc.com>
+Date:  Mon Feb 9 13:18:12 2009 -0800
+
+    ppc4xx: Autocalibration can set RDCC to over aggressive value.
+
+    The criteria of the AMCC SDRAM Controller DDR autocalibration
+    U-Boot code is to pick the largest passing write/read/compare
+    window that also has the smallest SDRAM_RDCC.[RDSS] Read Sample
+    Cycle Select value.
+
+    On some Kilauea boards the DDR autocalibration algorithm can
+    find a large passing write/read/compare window with a small
+    SDRAM_RDCC.[RDSS] aggressive value of Read Sample Cycle Select
+    value "T1 Sample".
+
+    This SDRAM_RDCC.[RDSS] Read Sample Cycle Select value of
+    "T1 Sample" proves to be to aggressive when later on U-Boot
+    relocates into DDR memory and executes.
+
+    The memory traces on the Kilauea board are short so on some
+    Kilauea boards the SDRAM_RDCC.[RDSS] Read Sample Cycle Select
+    value of "T1 Sample" shows up as a potentially valid value for
+    the DDR autocalibratiion algorithm.
+
+    The fix is to define a weak default function which provides
+    the minimum SDRAM_RDCC.[RDSS] Read Sample Cycle Select value
+    to accept for DDR autocalibration. The default will be the
+    "T2 Sample" value. A board developer who has a well defined
+    board and chooses to be more aggressive can always provide
+    their own board specific string function with the more
+    aggressive "T1 Sample" value or stick with the default
+    minimum SDRAM_RDCC.[RDSS] value of "T2".
+
+    Also put in a autocalibration loop fix for case where current
+    write/read/compare passing window size is the same as a prior
+    window size, then in this case choose the write/read/compare
+    result that has the associated smallest RDCC T-Sample value.
+
+    Signed-off-by: Adam Graham <agraham@amcc.com>
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 2ede879fcb67470524847bb4fc8972651bb46184
+Author: Stefan Roese <sr@denx.de>
+Date:  Wed Feb 11 09:37:12 2009 +0100
+
+    ppc4xx: Fix problem with CONFIG_MAX_MEM_MAPPED in include/asm-ppc/config.h
+
+    CONFIG_SDRAM_PPC4xx_IBM_DDR2 is not set when include/asm-ppc/config.h is
+    included. So for katmai, CONFIG_MAX_MEM_MAPPED will get set to 256MB.
+
+    It makes perfect sense to set CONFIG_MAX_MEM_MAPPED to 2GB for all PPC4xx
+    boards right now.
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit f15c6515fc23f83c51f3de272ca23d86b80e81b1
+Author: Wolfgang Denk <wd@denx.de>
+Date:  Thu Feb 12 00:08:39 2009 +0100
+
+    Coding style cleanup; update CHANGELOG
+
+    Signed-off-by: Wolfgang Denk <wd@denx.de>
+
 commit 5fc56b907d993260b9ebdb137af66fe69635ae9e
 Author: Peter Tyser <ptyser@xes-inc.com>
 Date:  Fri Jan 30 16:36:40 2009 -0600
index 38feac8..c3157d9 100644 (file)
@@ -655,6 +655,9 @@ Sergey Lapin <slapin@ossfans.org>
 
        afeb9260        ARM926EJS (AT91SAM9260 SoC)
 
+Wolfgang Denk <wd@denx.de>
+       qong            i.MX31
+
 -------------------------------------------------------------------------
 
 Unknown / orphaned boards:
diff --git a/MAKEALL b/MAKEALL
index d58b15c..f8c912b 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -544,6 +544,7 @@ LIST_ARM11="                \
        imx31_litekit   \
        imx31_phycore   \
        mx31ads         \
+       qong            \
        smdk6400        \
 "
 
index ee82c5d..5ac2980 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3038,6 +3038,10 @@ mx31ads_config           : unconfig
 omap2420h4_config      : unconfig
        @$(MKCONFIG) $(@:_config=) arm arm1136 omap2420h4 NULL omap24xx
 
+qong_config            : unconfig
+       @$(MKCONFIG) $(@:_config=) arm arm1136 qong davedenx mx31
+
+
 #########################################################################
 ## ARM1176 Systems
 #########################################################################
diff --git a/README b/README
index b64c159..48d3f6d 100644 (file)
--- a/README
+++ b/README
@@ -2458,6 +2458,13 @@ use the "saveenv" command to store a valid environment.
 - CONFIG_SYS_64BIT_STRTOUL:
                Adds simple_strtoull that returns a 64bit value
 
+- CONFIG_NS16550_MIN_FUNCTIONS:
+               Define this if you desire to only have use of the NS16550_init
+               and NS16550_putc functions for the serial driver located at
+               drivers/serial/ns16550.c.  This option is useful for saving
+               space for already greatly restricted images, including but not
+               limited to NAND_SPL configurations.
+
 Low Level (hardware related) configuration options:
 ---------------------------------------------------
 
diff --git a/board/davedenx/qong/Makefile b/board/davedenx/qong/Makefile
new file mode 100644 (file)
index 0000000..93e1985
--- /dev/null
@@ -0,0 +1,53 @@
+#
+# (C) Copyright 2009
+# Ilya Yanok, Emcraft Systems Ltd, <yanok@emcraft.com>
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS  := qong.o
+SOBJS  := lowlevel_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+       rm -f $(SOBJS) $(OBJS)
+
+distclean:     clean
+       rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/davedenx/qong/config.mk b/board/davedenx/qong/config.mk
new file mode 100644 (file)
index 0000000..d8d0a57
--- /dev/null
@@ -0,0 +1 @@
+TEXT_BASE = 0x8ff00000
diff --git a/board/davedenx/qong/lowlevel_init.S b/board/davedenx/qong/lowlevel_init.S
new file mode 100644 (file)
index 0000000..198dd76
--- /dev/null
@@ -0,0 +1,172 @@
+/*
+ * Copyright (C) 2009, Emcraft Systems, Ilya Yanok <yanok@emcraft.com>
+ *
+ * Based on board/freescale/mx31ads/lowlevel_init.S
+ * by Guennadi Liakhovetski.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <asm/arch/mx31-regs.h>
+
+.macro REG reg, val
+       ldr r2, =\reg
+       ldr r3, =\val
+       str r3, [r2]
+.endm
+
+.macro REG8 reg, val
+       ldr r2, =\reg
+       ldr r3, =\val
+       strb r3, [r2]
+.endm
+
+.macro DELAY loops
+       ldr r2, =\loops
+1:
+       subs    r2, r2, #1
+       nop
+       bcs 1b
+.endm
+
+/* RedBoot: To support 133MHz DDR */
+.macro init_drive_strength
+       /*
+        * Disable maximum drive strength SDRAM/DDR lines by clearing DSE1 bits
+        * in SW_PAD_CTL registers
+        */
+
+       /* SDCLK */
+       ldr r1, =IOMUXC_SW_PAD_CTL(0x2b)
+       ldr r0, [r1, #0x6C]
+       bic r0, r0, #(1 << 12)
+       str r0, [r1, #0x6C]
+
+       /* CAS */
+       ldr r0, [r1, #0x70]
+       bic r0, r0, #(1 << 22)
+       str r0, [r1, #0x70]
+
+       /* RAS */
+       ldr r0, [r1, #0x74]
+       bic r0, r0, #(1 << 2)
+       str r0, [r1, #0x74]
+
+       /* CS2 (CSD0) */
+       ldr r0, [r1, #0x7C]
+       bic r0, r0, #(1 << 22)
+       str r0, [r1, #0x7C]
+
+       /* DQM3 */
+       ldr r0, [r1, #0x84]
+       bic r0, r0, #(1 << 22)
+       str r0, [r1, #0x84]
+
+       /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 (0x288..0x2DC) */
+       ldr r2, =22     /* (0x2E0 - 0x288) / 4 = 22 */
+pad_loop:
+       ldr r0, [r1, #0x88]
+       bic r0, r0, #(1 << 22)
+       bic r0, r0, #(1 << 12)
+       bic r0, r0, #(1 << 2)
+       str r0, [r1, #0x88]
+       add r1, r1, #4
+       subs r2, r2, #0x1
+       bne pad_loop
+.endm /* init_drive_strength */
+
+.globl lowlevel_init
+lowlevel_init:
+
+       init_drive_strength
+
+       /* Image Processing Unit: */
+       /* Too early to switch display on? */
+       /* Switch on Display Interface */
+       REG     IPU_CONF, IPU_CONF_DI_EN
+       /* Clock Control Module: */
+       REG     CCM_CCMR, 0x074B0BF5            /* Use CKIH, MCU PLL off */
+
+       DELAY 0x40000
+
+       REG     CCM_CCMR, 0x074B0BF5 | CCMR_MPE                 /* MCU PLL on */
+       /* Switch to MCU PLL */
+       REG     CCM_CCMR, (0x074B0BF5 | CCMR_MPE) & ~CCMR_MDS
+
+       /* 399-133-66.5 */
+       ldr     r0, =CCM_BASE
+       ldr     r1, =0xFF871650
+       /* PDR0 */
+       str     r1, [r0, #0x4]
+       ldr     r1, MPCTL_PARAM_399
+       /* MPCTL */
+       str     r1, [r0, #0x10]
+
+       /* Set UPLL=240MHz, USB=60MHz */
+       ldr     r1, =0x49FCFE7F
+       /* PDR1 */
+       str     r1, [r0, #0x8]
+       ldr     r1, UPCTL_PARAM_240
+       /* UPCTL */
+       str     r1, [r0, #0x14]
+       /* default CLKO to 1/8 of the ARM core */
+       mov     r1, #0x00000208
+       /* COSR */
+       str     r1, [r0, #0x1c]
+
+       /* Default: 1, 4, 12, 1 */
+       REG     CCM_SPCTL, PLL_PD(1) | PLL_MFD(4) | PLL_MFI(12) | PLL_MFN(1)
+
+       /* B8xxxxxx - NAND, 8xxxxxxx - CSD0 RAM */
+       REG     0xB8001010, 0x00000004
+       REG     0xB8001004, ((3 << 21) | /* tXP */      \
+                            (0 << 20) | /* tWTR */     \
+                            (2 << 18) | /* tRP */      \
+                            (1 << 16) | /* tMRD */     \
+                            (0 << 15) | /* tWR */      \
+                            (5 << 12) | /* tRAS */     \
+                            (1 << 10) | /* tRRD */     \
+                            (3 << 8)  | /* tCAS */     \
+                            (2 << 4)  | /* tRCD */     \
+                            (7 << 0)    /* tRC */ )
+       REG     0xB8001000, 0x92100000
+       REG     0x80000f00, 0x12344321
+       REG     0xB8001000, 0xa2100000
+       REG     0x80000000, 0x12344321
+       REG     0x80000000, 0x12344321
+       REG     0xB8001000, 0xb2100000
+       REG8    0x80000033, 0xda
+       REG8    0x81000000, 0xff
+       REG     0xB8001000, ((1 << 31) |                                \
+                            (0 << 28) |                                \
+                            (0 << 27) |                                \
+                            (3 << 24) | /* 14 rows */                  \
+                            (2 << 20) | /* 10 cols */                  \
+                            (2 << 16) |                                \
+                            (4 << 13) | /* 3.91us (64ms/16384) */      \
+                            (0 << 10) |                                \
+                            (0 << 8)  |                                \
+                            (1 << 7)  |                                \
+                            (0 << 0))
+       REG     0x80000000, 0xDEADBEEF
+       REG     0xB8001010, 0x0000000c
+
+       mov     pc, lr
+
+MPCTL_PARAM_399:
+       .word (((1 - 1) << 26) + ((52 - 1) << 16) + (7 << 10) + (35 << 0))
+UPCTL_PARAM_240:
+       .word (((2 - 1) << 26) + ((13 - 1) << 16) + (9 << 10) + (3  << 0))
diff --git a/board/davedenx/qong/qong.c b/board/davedenx/qong/qong.c
new file mode 100644 (file)
index 0000000..13b3699
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ *
+ * (c) 2009 Emcraft Systems, Ilya Yanok <yanok@emcraft.com>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
+#include <common.h>
+#include <netdev.h>
+#include <asm/arch/mx31.h>
+#include <asm/arch/mx31-regs.h>
+#include "qong_fpga.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int dram_init (void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       gd->bd->bi_dram[0].size = get_ram_size((volatile void *)PHYS_SDRAM_1,
+                       PHYS_SDRAM_1_SIZE);
+
+       return 0;
+}
+
+int board_init (void)
+{
+       /* Chip selects */
+       /* CS0: Nor Flash #0 - it must be init'ed when executing from DDR */
+       /* Assumptions: HCLK = 133 MHz, tACC = 130ns */
+       __REG(CSCR_U(0)) = ((0 << 31)   | /* SP */
+                                               (0 << 30)       | /* WP */
+                                               (0 << 28)       | /* BCD */
+                                               (0 << 24)       | /* BCS */
+                                               (0 << 22)       | /* PSZ */
+                                               (0 << 21)       | /* PME */
+                                               (0 << 20)       | /* SYNC */
+                                               (0 << 16)       | /* DOL */
+                                               (3 << 14)       | /* CNC */
+                                               (21 << 8)       | /* WSC */
+                                               (0 << 7)        | /* EW */
+                                               (0 << 4)        | /* WWS */
+                                               (6 << 0)          /* EDC */
+                                          );
+
+       __REG(CSCR_L(0)) = ((2 << 28)   | /* OEA */
+                                               (1 << 24)       | /* OEN */
+                                               (3 << 20)       | /* EBWA */
+                                               (3 << 16)       | /* EBWN */
+                                               (1 << 12)       | /* CSA */
+                                               (1 << 11)       | /* EBC */
+                                               (5 << 8)        | /* DSZ */
+                                               (1 << 4)        | /* CSN */
+                                               (0 << 3)        | /* PSR */
+                                               (0 << 2)        | /* CRE */
+                                               (0 << 1)        | /* WRAP */
+                                               (1 << 0)          /* CSEN */
+                                          );
+
+       __REG(CSCR_A(0)) = ((2 << 28)   | /* EBRA */
+                                               (1 << 24)       | /* EBRN */
+                                               (2 << 20)       | /* RWA */
+                                               (2 << 16)       | /* RWN */
+                                               (0 << 15)       | /* MUM */
+                                               (0 << 13)       | /* LAH */
+                                               (2 << 10)       | /* LBN */
+                                               (0 << 8)        | /* LBA */
+                                               (0 << 6)        | /* DWW */
+                                               (0 << 4)        | /* DCT */
+                                               (0 << 3)        | /* WWU */
+                                               (0 << 2)        | /* AGE */
+                                               (0 << 1)        | /* CNC2 */
+                                               (0 << 0)          /* FCE */
+                                          );
+
+#ifdef CONFIG_QONG_FPGA
+       /* CS1: FPGA/Network Controller/GPIO */
+       /* 16-bit, no DTACK */
+       __REG(CSCR_U(1)) = 0x00000A01;
+       __REG(CSCR_L(1)) = 0x20040501;
+       __REG(CSCR_A(1)) = 0x04020C00;
+
+       /* setup pins for FPGA */
+       mx31_gpio_mux(IOMUX_MODE(0x76, MUX_CTL_GPIO));
+       mx31_gpio_mux(IOMUX_MODE(0x7e, MUX_CTL_GPIO));
+       mx31_gpio_mux(IOMUX_MODE(0x91, MUX_CTL_OUT_FUNC | MUX_CTL_IN_GPIO));
+       mx31_gpio_mux(IOMUX_MODE(0x92, MUX_CTL_GPIO));
+       mx31_gpio_mux(IOMUX_MODE(0x93, MUX_CTL_GPIO));
+#endif
+
+       /* setup pins for UART1 */
+       mx31_gpio_mux(MUX_RXD1__UART1_RXD_MUX);
+       mx31_gpio_mux(MUX_TXD1__UART1_TXD_MUX);
+       mx31_gpio_mux(MUX_RTS1__UART1_RTS_B);
+       mx31_gpio_mux(MUX_CTS1__UART1_CTS_B);
+
+       /* board id for linux */
+       gd->bd->bi_arch_number = MACH_TYPE_QONG;
+       gd->bd->bi_boot_params = (0x80000100);  /* adress of boot parameters */
+
+       return 0;
+}
+
+int checkboard (void)
+{
+       printf("Board: DAVE/DENX QongEVB-LITE\n");
+       return 0;
+}
+
+int misc_init_r (void)
+{
+#ifdef CONFIG_QONG_FPGA
+       u32 tmp;
+
+       /* FPGA reset */
+       /* rstn = 0 */
+       tmp = __REG(GPIO2_BASE + GPIO_DR);
+       tmp &= (~(1 << QONG_FPGA_RST_PIN));
+       __REG(GPIO2_BASE + GPIO_DR) = tmp;
+       /* set the GPIO as output */
+       tmp = __REG(GPIO2_BASE + GPIO_GDIR);
+       tmp |= (1 << QONG_FPGA_RST_PIN);
+       __REG(GPIO2_BASE + GPIO_GDIR) = tmp;
+       /* wait */
+       udelay(30);
+       /* rstn = 1 */
+       tmp = __REG(GPIO2_BASE + GPIO_DR);
+       tmp |= (1 << QONG_FPGA_RST_PIN);
+       __REG(GPIO2_BASE + GPIO_DR) = tmp;
+       /* set interrupt pin as input */
+       __REG(GPIO2_BASE + GPIO_GDIR) = tmp | (1 << QONG_FPGA_IRQ_PIN);
+       /* wait while the FPGA starts */
+       udelay(300);
+
+       tmp = *(volatile u32*)QONG_FPGA_CTRL_VERSION;
+       printf("FPGA:  ");
+       printf("version register = %u.%u.%u\n",
+               (tmp & 0xF000) >> 12, (tmp & 0x0F00) >> 8, tmp & 0x00FF);
+#endif
+
+       return 0;
+}
+
+int board_eth_init(bd_t *bis)
+{
+#if defined(CONFIG_QONG_FPGA) && defined(CONFIG_DNET)
+       return dnet_eth_initialize(0, (void *)CONFIG_DNET_BASE, -1);
+#else
+       return 0;
+#endif
+}
+
diff --git a/board/davedenx/qong/qong_fpga.h b/board/davedenx/qong/qong_fpga.h
new file mode 100644 (file)
index 0000000..b1cb08a
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ *
+ * (c) 2009 Emcraft Systems, Ilya Yanok <yanok@emcraft.com>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef QONG_FPGA_H
+#define QONG_FPGA_H
+
+#ifdef CONFIG_QONG_FPGA
+#define QONG_FPGA_CTRL_BASE            CONFIG_FPGA_BASE
+#define QONG_FPGA_CTRL_VERSION         (QONG_FPGA_CTRL_BASE + 0x00000000)
+#define QONG_FPGA_PERIPH_SIZE          (1 << 24)
+
+#define        QONG_FPGA_TCK_PIN               26
+#define        QONG_FPGA_TMS_PIN               25
+#define        QONG_FPGA_TDI_PIN               8
+#define        QONG_FPGA_TDO_PIN               7
+#define        QONG_FPGA_RST_PIN               16
+#define        QONG_FPGA_IRQ_PIN               8
+#endif
+
+#endif /* QONG_FPGA_H */
+
diff --git a/board/davedenx/qong/u-boot.lds b/board/davedenx/qong/u-boot.lds
new file mode 100644 (file)
index 0000000..04e0642
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * (C) Copyright 2009
+ * Ilya Yanok, Emcraft Systems Ltd, <yanok@emcraft.com>
+ * (C) Copyright 2002
+ * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+       . = 0x00000000;
+
+       . = ALIGN(4);
+       .text :
+       {
+               cpu/arm1136/start.o     (.text)
+               *(.text)
+       }
+
+       . = ALIGN(4);
+       .rodata : { *(.rodata) }
+
+       . = ALIGN(4);
+       .data : { *(.data) }
+
+       . = ALIGN(4);
+       .got : { *(.got) }
+
+       . = .;
+       __u_boot_cmd_start = .;
+       .u_boot_cmd : { *(.u_boot_cmd) }
+       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       __bss_start = .;
+       .bss : { *(.bss) }
+       _end = .;
+}
index 330978b..8579cfa 100644 (file)
@@ -82,7 +82,7 @@ flash_info_t  flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
 static ulong flash_get_size(FPWV *addr, flash_info_t *info);
 static void flash_reset(flash_info_t *info);
 static int write_word_amd(flash_info_t *info, FPWV *dest, FPW data);
-static flash_info_t *flash_get_info(ulong base);
+flash_info_t *flash_get_info(ulong base);
 
 /*-----------------------------------------------------------------------
  * flash_init()
@@ -142,7 +142,7 @@ static void flash_reset(flash_info_t *info)
 /*-----------------------------------------------------------------------
  */
 
-static flash_info_t *flash_get_info(ulong base)
+flash_info_t *flash_get_info(ulong base)
 {
        int i;
        flash_info_t * info;
index 115e8cd..825bbaf 100644 (file)
@@ -54,7 +54,6 @@ flash_info_t  flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
 static ulong flash_get_size (int portwidth, vu_long *addr, flash_info_t *info);
 static int write_word (flash_info_t *info, ulong dest, ulong data);
 static void flash_get_offsets (ulong base, flash_info_t *info);
-static flash_info_t *flash_get_info(ulong base);
 
 /*-----------------------------------------------------------------------
  */
@@ -178,7 +177,7 @@ flash_get_offsets (ulong base, flash_info_t *info)
 /*-----------------------------------------------------------------------
  */
 
-static flash_info_t *flash_get_info(ulong base)
+flash_info_t *flash_get_info(ulong base)
 {
        int i;
        flash_info_t * info;
index 71f4971..73ec7bf 100644 (file)
@@ -131,7 +131,7 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        n = mmc->block_dev.block_read(dev, blk, cnt, addr);
 
                        /* flush cache after read */
-                       flush_cache((ulong)addr, cnt * 512); //FIXME
+                       flush_cache((ulong)addr, cnt * 512); /* FIXME */
 
                        printf("%d blocks read: %s\n",
                                n, (n==cnt) ? "OK" : "ERROR");
index 7c50c2f..5b72fe5 100644 (file)
@@ -147,7 +147,8 @@ int checkcpu (void)
 
        puts("Clock Configuration:");
        for (i = 0; i < CONFIG_NUM_CPUS; i++) {
-                if (!(i & 3)) printf ("\n       ");
+               if (!(i & 3))
+                       printf ("\n       ");
                printf("CPU%d:%-4s MHz, ",
                                i,strmhz(buf1, sysinfo.freqProcessor[i]));
        }
index 351cf99..62cc99d 100644 (file)
@@ -96,7 +96,7 @@ static int sata_bus_softreset (int num)
        }
 
        if (status & ATA_BUSY) {
-               printf ("ata%u is slow to respond,plz be patient\n", port);
+               printf ("ata%u is slow to respond,plz be patient\n", num);
        }
 
        while ((status & ATA_BUSY)) {
@@ -105,7 +105,7 @@ static int sata_bus_softreset (int num)
        }
 
        if (status & ATA_BUSY) {
-               printf ("ata%u failed to respond : ", port);
+               printf ("ata%u failed to respond : ", num);
                printf ("bus reset failed\n");
                port[num].dev_mask = 0;
                return 1;
index 128dc11..a360a50 100644 (file)
@@ -33,6 +33,7 @@ COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o
 COBJS-$(CONFIG_DRIVER_CS8900) += cs8900.o
 COBJS-$(CONFIG_TULIP) += dc2114x.o
 COBJS-$(CONFIG_DRIVER_DM9000) += dm9000x.o
+COBJS-$(CONFIG_DNET) += dnet.o
 COBJS-$(CONFIG_E1000) += e1000.o
 COBJS-$(CONFIG_EEPRO100) += eepro100.o
 COBJS-$(CONFIG_ENC28J60) += enc28j60.o
diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c
new file mode 100644 (file)
index 0000000..efac746
--- /dev/null
@@ -0,0 +1,396 @@
+/*
+ * Dave Ethernet Controller driver
+ *
+ * Copyright (C) 2008 Dave S.r.l. <www.dave.eu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <common.h>
+
+#ifndef CONFIG_DNET_AUTONEG_TIMEOUT
+#define CONFIG_DNET_AUTONEG_TIMEOUT    5000000 /* default value */
+#endif
+
+#include <net.h>
+#include <malloc.h>
+#include <linux/mii.h>
+
+#include <miiphy.h>
+#include <asm/io.h>
+
+#include "dnet.h"
+
+struct dnet_device {
+       struct dnet_registers   *regs;
+       const struct device     *dev;
+       struct eth_device       netdev;
+       unsigned short          phy_addr;
+};
+
+/* get struct dnet_device from given struct netdev */
+#define to_dnet(_nd) container_of(_nd, struct dnet_device, netdev)
+
+/* function for reading internal MAC register */
+u16 dnet_readw_mac(struct dnet_device *dnet, u16 reg)
+{
+       u16 data_read;
+
+       /* issue a read */
+       writel(reg, &dnet->regs->MACREG_ADDR);
+
+       /* since a read/write op to the MAC is very slow,
+        * we must wait before reading the data */
+       udelay(1);
+
+       /* read data read from the MAC register */
+       data_read = readl(&dnet->regs->MACREG_DATA);
+
+       /* all done */
+       return data_read;
+}
+
+/* function for writing internal MAC register */
+void dnet_writew_mac(struct dnet_device *dnet, u16 reg, u16 val)
+{
+       /* load data to write */
+       writel(val, &dnet->regs->MACREG_DATA);
+
+       /* issue a write */
+       writel(reg | DNET_INTERNAL_WRITE, &dnet->regs->MACREG_ADDR);
+
+       /* since a read/write op to the MAC is very slow,
+        * we must wait before exiting */
+       udelay(1);
+}
+
+static void dnet_mdio_write(struct dnet_device *dnet, u8 reg, u16 value)
+{
+       u16 tmp;
+
+       debug(DRIVERNAME "dnet_mdio_write %02x:%02x <- %04x\n",
+                       dnet->phy_addr, reg, value);
+
+       while (!(dnet_readw_mac(dnet, DNET_INTERNAL_GMII_MNG_CTL_REG) &
+                               DNET_INTERNAL_GMII_MNG_CMD_FIN))
+               ;
+
+       /* prepare for a write operation */
+       tmp = (1 << 13);
+
+       /* only 5 bits allowed for register offset */
+       reg &= 0x1f;
+
+       /* prepare reg_value for a write */
+       tmp |= (dnet->phy_addr << 8);
+       tmp |= reg;
+
+       /* write data to write first */
+       dnet_writew_mac(dnet, DNET_INTERNAL_GMII_MNG_DAT_REG, value);
+
+       /* write control word */
+       dnet_writew_mac(dnet, DNET_INTERNAL_GMII_MNG_CTL_REG, tmp);
+
+       while (!(dnet_readw_mac(dnet, DNET_INTERNAL_GMII_MNG_CTL_REG) &
+                               DNET_INTERNAL_GMII_MNG_CMD_FIN))
+               ;
+}
+
+static u16 dnet_mdio_read(struct dnet_device *dnet, u8 reg)
+{
+       u16 value;
+
+       while (!(dnet_readw_mac(dnet, DNET_INTERNAL_GMII_MNG_CTL_REG) &
+                               DNET_INTERNAL_GMII_MNG_CMD_FIN))
+               ;
+
+       /* only 5 bits allowed for register offset*/
+       reg &= 0x1f;
+
+       /* prepare reg_value for a read */
+       value = (dnet->phy_addr << 8);
+       value |= reg;
+
+       /* write control word */
+       dnet_writew_mac(dnet, DNET_INTERNAL_GMII_MNG_CTL_REG, value);
+
+       /* wait for end of transfer */
+       while (!(dnet_readw_mac(dnet, DNET_INTERNAL_GMII_MNG_CTL_REG) &
+                               DNET_INTERNAL_GMII_MNG_CMD_FIN))
+               ;
+
+       value = dnet_readw_mac(dnet, DNET_INTERNAL_GMII_MNG_DAT_REG);
+
+       debug(DRIVERNAME "dnet_mdio_read %02x:%02x <- %04x\n",
+               dnet->phy_addr, reg, value);
+
+       return value;
+}
+
+static int dnet_send(struct eth_device *netdev, volatile void *packet,
+                    int length)
+{
+       struct dnet_device *dnet = to_dnet(netdev);
+       int i, len, wrsz;
+       unsigned int *bufp;
+       unsigned int tx_cmd;
+
+       debug(DRIVERNAME "[%s] Sending %u bytes\n", __func__, length);
+
+       /* frame size (words) */
+       len = (length + 3) >> 2;
+
+       bufp = (unsigned int *) (((u32)packet) & 0xFFFFFFFC);
+       wrsz = (u32)length + 3;
+       wrsz += ((u32)packet) & 0x3;
+       wrsz >>= 2;
+       tx_cmd = ((((unsigned int)(packet)) & 0x03) << 16) | (u32)length;
+
+       /* check if there is enough room for the current frame */
+       if (wrsz < (DNET_FIFO_SIZE - readl(&dnet->regs->TX_FIFO_WCNT))) {
+               for (i = 0; i < wrsz; i++)
+                       writel(*bufp++, &dnet->regs->TX_DATA_FIFO);
+               /*
+                * inform MAC that a packet's written and ready
+                * to be shipped out
+                */
+               writel(tx_cmd, &dnet->regs->TX_LEN_FIFO);
+       } else {
+               printf(DRIVERNAME "No free space (actual %d, required %d "
+                               "(words))\n", DNET_FIFO_SIZE -
+                               readl(&dnet->regs->TX_FIFO_WCNT), wrsz);
+       }
+
+       /* No one cares anyway */
+       return 0;
+}
+
+
+static int dnet_recv(struct eth_device *netdev)
+{
+       struct dnet_device *dnet = to_dnet(netdev);
+       unsigned int *data_ptr;
+       int pkt_len, poll, i;
+       u32 cmd_word;
+
+       debug("Waiting for pkt (polling)\n");
+       poll = 50;
+       while ((readl(&dnet->regs->RX_FIFO_WCNT) >> 16) == 0) {
+               udelay(10);  /* wait 10 usec */
+               if (--poll == 0)
+                       return 0;       /* no pkt available */
+       }
+
+       cmd_word = readl(&dnet->regs->RX_LEN_FIFO);
+       pkt_len = cmd_word & 0xFFFF;
+
+       debug("Got pkt with size %d bytes\n", pkt_len);
+
+       if (cmd_word & 0xDF180000)
+               printf("%s packet receive error %x\n", __func__, cmd_word);
+
+       data_ptr = (unsigned int *) NetRxPackets[0];
+
+       for (i = 0; i < (pkt_len + 3) >> 2; i++)
+               *data_ptr++ = readl(&dnet->regs->RX_DATA_FIFO);
+
+       NetReceive(NetRxPackets[0], pkt_len + 5); /* ok + 5 ?? */
+
+       return 0;
+}
+
+static void dnet_set_hwaddr(struct eth_device *netdev)
+{
+       struct dnet_device *dnet = to_dnet(netdev);
+       u16 tmp;
+
+       tmp = cpu_to_be16(*((u16 *)netdev->enetaddr));
+       dnet_writew_mac(dnet, DNET_INTERNAL_MAC_ADDR_0_REG, tmp);
+       tmp = cpu_to_be16(*((u16 *)(netdev->enetaddr + 2)));
+       dnet_writew_mac(dnet, DNET_INTERNAL_MAC_ADDR_1_REG, tmp);
+       tmp = cpu_to_be16(*((u16 *)(netdev->enetaddr + 4)));
+       dnet_writew_mac(dnet, DNET_INTERNAL_MAC_ADDR_2_REG, tmp);
+}
+
+static void dnet_phy_reset(struct dnet_device *dnet)
+{
+       struct eth_device *netdev = &dnet->netdev;
+       int i;
+       u16 status, adv;
+
+       adv = ADVERTISE_CSMA | ADVERTISE_ALL;
+       dnet_mdio_write(dnet, MII_ADVERTISE, adv);
+       printf("%s: Starting autonegotiation...\n", netdev->name);
+       dnet_mdio_write(dnet, MII_BMCR, (BMCR_ANENABLE
+                                        | BMCR_ANRESTART));
+
+       for (i = 0; i < CONFIG_DNET_AUTONEG_TIMEOUT / 100; i++) {
+               status = dnet_mdio_read(dnet, MII_BMSR);
+               if (status & BMSR_ANEGCOMPLETE)
+                       break;
+               udelay(100);
+       }
+
+       if (status & BMSR_ANEGCOMPLETE)
+               printf("%s: Autonegotiation complete\n", netdev->name);
+       else
+               printf("%s: Autonegotiation timed out (status=0x%04x)\n",
+                      netdev->name, status);
+}
+
+static int dnet_phy_init(struct dnet_device *dnet)
+{
+       struct eth_device *netdev = &dnet->netdev;
+       u16 phy_id, status, adv, lpa;
+       int media, speed, duplex;
+       int i;
+       u32 ctl_reg;
+
+       /* Find a PHY */
+       for (i = 0; i < 32; i++) {
+               dnet->phy_addr = i;
+               phy_id = dnet_mdio_read(dnet, MII_PHYSID1);
+               if (phy_id != 0xffff) {
+                       /* ok we found it */
+                       printf("Found PHY at address %d PHYID (%04x:%04x)\n",
+                                       i, phy_id,
+                                       dnet_mdio_read(dnet, MII_PHYSID2));
+                       break;
+               }
+       }
+
+       /* Check if the PHY is up to snuff... */
+       phy_id = dnet_mdio_read(dnet, MII_PHYSID1);
+       if (phy_id == 0xffff) {
+               printf("%s: No PHY present\n", netdev->name);
+               return -1;
+       }
+
+       status = dnet_mdio_read(dnet, MII_BMSR);
+       if (!(status & BMSR_LSTATUS)) {
+               /* Try to re-negotiate if we don't have link already. */
+               dnet_phy_reset(dnet);
+
+               for (i = 0; i < CONFIG_DNET_AUTONEG_TIMEOUT / 100; i++) {
+                       status = dnet_mdio_read(dnet, MII_BMSR);
+                       if (status & BMSR_LSTATUS)
+                               break;
+                       udelay(100);
+               }
+       }
+
+       if (!(status & BMSR_LSTATUS)) {
+               printf("%s: link down (status: 0x%04x)\n",
+                      netdev->name, status);
+               return -1;
+       } else {
+               adv = dnet_mdio_read(dnet, MII_ADVERTISE);
+               lpa = dnet_mdio_read(dnet, MII_LPA);
+               media = mii_nway_result(lpa & adv);
+               speed = (media & (ADVERTISE_100FULL | ADVERTISE_100HALF)
+                        ? 1 : 0);
+               duplex = (media & ADVERTISE_FULL) ? 1 : 0;
+               /* 1000BaseT ethernet is not supported */
+               printf("%s: link up, %sMbps %s-duplex (lpa: 0x%04x)\n",
+                      netdev->name,
+                      speed ? "100" : "10",
+                      duplex ? "full" : "half",
+                      lpa);
+
+               ctl_reg = dnet_readw_mac(dnet, DNET_INTERNAL_RXTX_CONTROL_REG);
+
+               if (duplex)
+                       ctl_reg &= ~(DNET_INTERNAL_RXTX_CONTROL_ENABLEHALFDUP);
+               else
+                       ctl_reg |= DNET_INTERNAL_RXTX_CONTROL_ENABLEHALFDUP;
+
+               dnet_writew_mac(dnet, DNET_INTERNAL_RXTX_CONTROL_REG, ctl_reg);
+
+               return 0;
+       }
+}
+
+static int dnet_init(struct eth_device *netdev, bd_t *bd)
+{
+       struct dnet_device *dnet = to_dnet(netdev);
+       u32 config;
+
+       /*
+        * dnet_halt should have been called at some point before now,
+        * so we'll assume the controller is idle.
+        */
+
+       /* set hardware address */
+       dnet_set_hwaddr(netdev);
+
+       if (dnet_phy_init(dnet) < 0)
+               return -1;
+
+       /* flush rx/tx fifos */
+       writel(DNET_SYS_CTL_RXFIFOFLUSH | DNET_SYS_CTL_TXFIFOFLUSH,
+                       &dnet->regs->SYS_CTL);
+       udelay(1000);
+       writel(0, &dnet->regs->SYS_CTL);
+
+       config = dnet_readw_mac(dnet, DNET_INTERNAL_RXTX_CONTROL_REG);
+
+       config |= DNET_INTERNAL_RXTX_CONTROL_RXPAUSE |
+                       DNET_INTERNAL_RXTX_CONTROL_RXBROADCAST |
+                       DNET_INTERNAL_RXTX_CONTROL_DROPCONTROL |
+                       DNET_INTERNAL_RXTX_CONTROL_DISCFXFCS;
+
+       dnet_writew_mac(dnet, DNET_INTERNAL_RXTX_CONTROL_REG, config);
+
+       /* Enable TX and RX */
+       dnet_writew_mac(dnet, DNET_INTERNAL_MODE_REG,
+                       DNET_INTERNAL_MODE_RXEN | DNET_INTERNAL_MODE_TXEN);
+
+       return 0;
+}
+
+static void dnet_halt(struct eth_device *netdev)
+{
+       struct dnet_device *dnet = to_dnet(netdev);
+
+       /* Disable TX and RX */
+       dnet_writew_mac(dnet, DNET_INTERNAL_MODE_REG, 0);
+}
+
+int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr)
+{
+       struct dnet_device *dnet;
+       struct eth_device *netdev;
+       unsigned int dev_capa;
+
+       dnet = malloc(sizeof(struct dnet_device));
+       if (!dnet) {
+               printf("Error: Failed to allocate memory for DNET%d\n", id);
+               return -1;
+       }
+       memset(dnet, 0, sizeof(struct dnet_device));
+
+       netdev = &dnet->netdev;
+
+       dnet->regs = (struct dnet_registers *)regs;
+       dnet->phy_addr = phy_addr;
+
+       sprintf(netdev->name, "dnet%d", id);
+       netdev->init = dnet_init;
+       netdev->halt = dnet_halt;
+       netdev->send = dnet_send;
+       netdev->recv = dnet_recv;
+
+       dev_capa = readl(&dnet->regs->VERCAPS) & 0xFFFF;
+       debug("%s: has %smdio, %sirq, %sgigabit, %sdma \n", netdev->name,
+               (dev_capa & DNET_HAS_MDIO) ? "" : "no ",
+               (dev_capa & DNET_HAS_IRQ) ? "" : "no ",
+               (dev_capa & DNET_HAS_GIGABIT) ? "" : "no ",
+               (dev_capa & DNET_HAS_DMA) ? "" : "no ");
+
+       eth_register(netdev);
+
+       return 0;
+}
+
diff --git a/drivers/net/dnet.h b/drivers/net/dnet.h
new file mode 100644 (file)
index 0000000..fdb4fd2
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+ * Dave Ethernet Controller driver
+ *
+ * Copyright (C) 2008 Dave S.r.l. <www.dave.eu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __DRIVERS_DNET_H__
+#define __DRIVERS_DNET_H__
+
+#define DRIVERNAME "dnet"
+
+struct dnet_registers {
+       /* ALL DNET FIFO REGISTERS */
+       u32 RX_LEN_FIFO;
+       u32 RX_DATA_FIFO;
+       u32 TX_LEN_FIFO;
+       u32 TX_DATA_FIFO;
+       u32 pad1[0x3c];
+       /* ALL DNET CONTROL/STATUS REGISTERS */
+       u32 VERCAPS;
+       u32 INTR_SRC;
+       u32 INTR_ENB;
+       u32 RX_STATUS;
+       u32 TX_STATUS;
+       u32 RX_FRAMES_CNT;
+       u32 TX_FRAMES_CNT;
+       u32 RX_FIFO_TH;
+       u32 TX_FIFO_TH;
+       u32 SYS_CTL;
+       u32 PAUSE_TMR;
+       u32 RX_FIFO_WCNT;
+       u32 TX_FIFO_WCNT;
+       u32 pad2[0x33];
+       /* ALL DNET MAC REGISTERS */
+       u32 MACREG_DATA;        /* Mac-Reg Data */
+       u32 MACREG_ADDR;        /* Mac-Reg Addr */
+       u32 pad3[0x3e];
+       /* ALL DNET RX STATISTICS COUNTERS  */
+       u32 RX_PKT_IGNR_CNT;
+       u32 RX_LEN_CHK_ERR_CNT;
+       u32 RX_LNG_FRM_CNT;
+       u32 RX_SHRT_FRM_CNT;
+       u32 RX_IPG_VIOL_CNT;
+       u32 RX_CRC_ERR_CNT;
+       u32 RX_OK_PKT_CNT;
+       u32 RX_CTL_FRM_CNT;
+       u32 RX_PAUSE_FRM_CNT;
+       u32 RX_MULTICAST_CNT;
+       u32 RX_BROADCAST_CNT;
+       u32 RX_VLAN_TAG_CNT;
+       u32 RX_PRE_SHRINK_CNT;
+       u32 RX_DRIB_NIB_CNT;
+       u32 RX_UNSUP_OPCD_CNT;
+       u32 RX_BYTE_CNT;
+       u32 pad4[0x30];
+       /* DNET TX STATISTICS COUNTERS */
+       u32 TX_UNICAST_CNT;
+       u32 TX_PAUSE_FRM_CNT;
+       u32 TX_MULTICAST_CNT;
+       u32 TX_BRDCAST_CNT;
+       u32 TX_VLAN_TAG_CNT;
+       u32 TX_BAD_FCS_CNT;
+       u32 TX_JUMBO_CNT;
+       u32 TX_BYTE_CNT;
+};
+
+/* SOME INTERNAL MAC-CORE REGISTER */
+#define DNET_INTERNAL_MODE_REG                 0x0
+#define DNET_INTERNAL_RXTX_CONTROL_REG         0x2
+#define DNET_INTERNAL_MAX_PKT_SIZE_REG         0x4
+#define DNET_INTERNAL_IGP_REG                  0x8
+#define DNET_INTERNAL_MAC_ADDR_0_REG           0xa
+#define DNET_INTERNAL_MAC_ADDR_1_REG           0xc
+#define DNET_INTERNAL_MAC_ADDR_2_REG           0xe
+#define DNET_INTERNAL_TX_RX_STS_REG            0x12
+#define DNET_INTERNAL_GMII_MNG_CTL_REG         0x14
+#define DNET_INTERNAL_GMII_MNG_DAT_REG         0x16
+
+#define DNET_INTERNAL_GMII_MNG_CMD_FIN         (1 << 14)
+
+#define DNET_INTERNAL_WRITE                    (1 << 31)
+
+/* MAC-CORE REGISTER FIELDS */
+
+/* MAC-CORE MODE REGISTER FIELDS */
+#define DNET_INTERNAL_MODE_GBITEN                      (1 << 0)
+#define DNET_INTERNAL_MODE_FCEN                                (1 << 1)
+#define DNET_INTERNAL_MODE_RXEN                                (1 << 2)
+#define DNET_INTERNAL_MODE_TXEN                                (1 << 3)
+
+/* MAC-CORE RXTX CONTROL REGISTER FIELDS */
+#define DNET_INTERNAL_RXTX_CONTROL_RXSHORTFRAME                (1 << 8)
+#define DNET_INTERNAL_RXTX_CONTROL_RXBROADCAST         (1 << 7)
+#define DNET_INTERNAL_RXTX_CONTROL_RXMULTICAST         (1 << 4)
+#define DNET_INTERNAL_RXTX_CONTROL_RXPAUSE             (1 << 3)
+#define DNET_INTERNAL_RXTX_CONTROL_DISTXFCS            (1 << 2)
+#define DNET_INTERNAL_RXTX_CONTROL_DISCFXFCS           (1 << 1)
+#define DNET_INTERNAL_RXTX_CONTROL_ENPROMISC           (1 << 0)
+#define DNET_INTERNAL_RXTX_CONTROL_DROPCONTROL         (1 << 6)
+#define DNET_INTERNAL_RXTX_CONTROL_ENABLEHALFDUP       (1 << 5)
+
+/* SYSTEM CONTROL REGISTER FIELDS */
+#define DNET_SYS_CTL_IGNORENEXTPKT                     (1 << 0)
+#define DNET_SYS_CTL_SENDPAUSE                         (1 << 2)
+#define DNET_SYS_CTL_RXFIFOFLUSH                       (1 << 3)
+#define DNET_SYS_CTL_TXFIFOFLUSH                       (1 << 4)
+
+/* TX STATUS REGISTER FIELDS */
+#define DNET_TX_STATUS_FIFO_ALMOST_EMPTY               (1 << 2)
+#define DNET_TX_STATUS_FIFO_ALMOST_FULL                        (1 << 1)
+
+/* INTERRUPT SOURCE REGISTER FIELDS */
+#define DNET_INTR_SRC_TX_PKTSENT                       (1 << 0)
+#define DNET_INTR_SRC_TX_FIFOAF                                (1 << 1)
+#define DNET_INTR_SRC_TX_FIFOAE                                (1 << 2)
+#define DNET_INTR_SRC_TX_DISCFRM                       (1 << 3)
+#define DNET_INTR_SRC_TX_FIFOFULL                      (1 << 4)
+#define DNET_INTR_SRC_RX_CMDFIFOAF                     (1 << 8)
+#define DNET_INTR_SRC_RX_CMDFIFOFF                     (1 << 9)
+#define DNET_INTR_SRC_RX_DATAFIFOFF                    (1 << 10)
+#define DNET_INTR_SRC_TX_SUMMARY                       (1 << 16)
+#define DNET_INTR_SRC_RX_SUMMARY                       (1 << 17)
+#define DNET_INTR_SRC_PHY                              (1 << 19)
+
+/* INTERRUPT ENABLE REGISTER FIELDS */
+#define DNET_INTR_ENB_TX_PKTSENT                       (1 << 0)
+#define DNET_INTR_ENB_TX_FIFOAF                                (1 << 1)
+#define DNET_INTR_ENB_TX_FIFOAE                                (1 << 2)
+#define DNET_INTR_ENB_TX_DISCFRM                       (1 << 3)
+#define DNET_INTR_ENB_TX_FIFOFULL                      (1 << 4)
+#define DNET_INTR_ENB_RX_PKTRDY                                (1 << 8)
+#define DNET_INTR_ENB_RX_FIFOAF                                (1 << 9)
+#define DNET_INTR_ENB_RX_FIFOERR                       (1 << 10)
+#define DNET_INTR_ENB_RX_ERROR                         (1 << 11)
+#define DNET_INTR_ENB_RX_FIFOFULL                      (1 << 12)
+#define DNET_INTR_ENB_RX_FIFOAE                                (1 << 13)
+#define DNET_INTR_ENB_TX_SUMMARY                       (1 << 16)
+#define DNET_INTR_ENB_RX_SUMMARY                       (1 << 17)
+#define DNET_INTR_ENB_GLOBAL_ENABLE                    (1 << 18)
+
+/*
+ * Capabilities. Used by the driver to know the capabilities that
+ * the ethernet controller inside the FPGA have.
+ */
+
+#define DNET_HAS_MDIO          (1 << 0)
+#define DNET_HAS_IRQ           (1 << 1)
+#define DNET_HAS_GIGABIT       (1 << 2)
+#define DNET_HAS_DMA           (1 << 3)
+
+#define DNET_HAS_MII           (1 << 4) /* or GMII */
+#define DNET_HAS_RMII          (1 << 5) /* or RGMII */
+
+#define DNET_CAPS_MASK         0xFFFF
+
+#define DNET_FIFO_SIZE         2048 /* 2K x 32 bit */
+#define DNET_FIFO_TX_DATA_AF_TH        (DNET_FIFO_SIZE - 384) /* 384 = 1536 / 4 */
+#define DNET_FIFO_TX_DATA_AE_TH        (384)
+
+#define DNET_FIFO_RX_CMD_AF_TH (1 << 16) /* just one frame inside the FIFO */
+
+#endif
index 93c2243..1b347e9 100644 (file)
@@ -39,6 +39,7 @@ void NS16550_init (NS16550_t com_port, int baud_divisor)
 #endif
 }
 
+#ifndef CONFIG_NS16550_MIN_FUNCTIONS
 void NS16550_reinit (NS16550_t com_port, int baud_divisor)
 {
        com_port->ier = 0x00;
@@ -53,6 +54,7 @@ void NS16550_reinit (NS16550_t com_port, int baud_divisor)
        com_port->dlm = (baud_divisor >> 8) & 0xff;
        com_port->lcr = LCRVAL;
 }
+#endif /* CONFIG_NS16550_MIN_FUNCTIONS */
 
 void NS16550_putc (NS16550_t com_port, char c)
 {
@@ -60,6 +62,7 @@ void NS16550_putc (NS16550_t com_port, char c)
        com_port->thr = c;
 }
 
+#ifndef CONFIG_NS16550_MIN_FUNCTIONS
 char NS16550_getc (NS16550_t com_port)
 {
        while ((com_port->lsr & LSR_DR) == 0) {
@@ -76,4 +79,5 @@ int NS16550_tstc (NS16550_t com_port)
        return ((com_port->lsr & LSR_DR) != 0);
 }
 
+#endif /* CONFIG_NS16550_MIN_FUNCTIONS */
 #endif
index e736052..3cdaa02 100644 (file)
 #define WDOG_BASE              0x53FDC000
 
 /*
+ * GPIO
+ */
+#define GPIO1_BASE     0x53FCC000
+#define GPIO2_BASE     0x53FD0000
+#define GPIO3_BASE     0x53FA4000
+#define GPIO_DR                0x00000000      /* data register */
+#define GPIO_GDIR      0x00000004      /* direction register */
+#define GPIO_PSR       0x00000008      /* pad status register */
+
+/*
  * Signal Multiplexing (IOMUX)
  */
 
index f62a705..b939cfa 100644 (file)
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    1
+#ifdef CONFIG_NAND_SPL
+#define CONFIG_NS16550_MIN_FUNCTIONS
+#endif
 
 #define CONFIG_SYS_BAUDRATE_TABLE      \
        {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
index 54d2416..f8ae163 100644 (file)
 #define CONFIG_CMD_I2C         /* I2C serial bus support       */
 #define CONFIG_CMD_MMC         /* MMC support                  */
 #define CONFIG_CMD_NAND                /* NAND support                 */
+#define CONFIG_CMD_NAND_LOCK_UNLOCK /* Enable lock/unlock support */
 
 #undef CONFIG_CMD_FLASH                /* flinfo, erase, protect       */
 #undef CONFIG_CMD_FPGA         /* FPGA configuration Support   */
diff --git a/include/configs/qong.h b/include/configs/qong.h
new file mode 100644 (file)
index 0000000..ccc2625
--- /dev/null
@@ -0,0 +1,221 @@
+/*
+ * Copyright (C) 2009, Ilya Yanok, Emcraft Systems, <yanok@emcraft.com>
+ *
+ * Configuration settings for the Dave/DENX QongEVB-LITE board.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#include <asm/arch/mx31-regs.h>
+
+ /* High Level Configuration Options */
+#define CONFIG_ARM1136         1       /* This is an arm1136 CPU core */
+#define CONFIG_MX31            1       /* in a mx31 */
+#define CONFIG_QONG            1
+#define CONFIG_MX31_HCLK_FREQ  26000000        /* 26MHz */
+#define CONFIG_MX31_CLK32      32768
+
+#define CONFIG_DISPLAY_CPUINFO
+#define CONFIG_DISPLAY_BOARDINFO
+
+#define CONFIG_CMDLINE_TAG             1       /* enable passing of ATAGs */
+#define CONFIG_SETUP_MEMORY_TAGS       1
+#define CONFIG_INITRD_TAG              1
+
+/*
+ * Size of malloc() pool
+ */
+#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128 * 1024)
+/* size in bytes reserved for initial data */
+#define CONFIG_SYS_GBL_DATA_SIZE       128
+
+/*
+ * Hardware drivers
+ */
+
+#define CONFIG_MX31_UART       1
+#define CONFIG_SYS_MX31_UART1  1
+
+/* FPGA */
+#define CONFIG_QONG_FPGA       1
+#define CONFIG_FPGA_BASE       (CS1_BASE)
+
+#ifdef CONFIG_QONG_FPGA
+/* Ethernet */
+#define CONFIG_DNET            1
+#define CONFIG_DNET_BASE       (CS1_BASE + QONG_FPGA_PERIPH_SIZE)
+#define CONFIG_NET_MULTI       1
+
+/*
+ * Reducing the ARP timeout from default 5 seconds to 200ms we speed up the
+ * initial TFTP transfer, should the user wish one, significantly.
+ */
+#define CONFIG_ARP_TIMEOUT     200UL
+
+#endif /* CONFIG_QONG_FPGA */
+
+#define CONFIG_CONS_INDEX      1
+#define CONFIG_BAUDRATE                115200
+#define CONFIG_SYS_BAUDRATE_TABLE      {9600, 19200, 38400, 57600, 115200}
+
+/***********************************************************
+ * Command definition
+ ***********************************************************/
+
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_JFFS2
+
+/*
+ * You can compile in a MAC address and your custom net settings by using
+ * the following syntax.
+ *
+ * #define CONFIG_ETHADDR              xx:xx:xx:xx:xx:xx
+ * #define CONFIG_SERVERIP             <server ip>
+ * #define CONFIG_IPADDR               <board ip>
+ * #define CONFIG_GATEWAYIP            <gateway ip>
+ * #define CONFIG_NETMASK              <your netmask>
+ */
+
+#define CONFIG_BOOTDELAY       5
+
+#define CONFIG_LOADADDR                0x80800000      /* loadaddr env var */
+
+#define xstr(s)        str(s)
+#define str(s) #s
+
+#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
+       "netdev=eth0\0"                                                 \
+       "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
+               "nfsroot=${serverip}:${rootpath}\0"                     \
+       "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
+       "addip=setenv bootargs ${bootargs} "                            \
+               "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"      \
+               ":${hostname}:${netdev}:off panic=1\0"                  \
+       "addtty=setenv bootargs ${bootargs}"                            \
+               " console=ttymxc0,${baudrate}\0"                        \
+       "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"              \
+       "addmisc=setenv bootargs ${bootargs}\0"                         \
+       "uboot_addr=a0000000\0"                                         \
+       "kernel_addr=a0080000\0"                                        \
+       "ramdisk_addr=a0300000\0"                                       \
+       "u-boot=qong/u-boot.bin\0"                                      \
+       "kernel_addr_r=80800000\0"                                      \
+       "hostname=qong\0"                                               \
+       "bootfile=qong/uImage\0"                                        \
+       "rootpath=/opt/eldk-4.2-arm/armVFP\0"                           \
+       "flash_self=run ramargs addip addtty addmtd addmisc;"           \
+               "bootm ${kernel_addr} ${ramdisk_addr}\0"                \
+       "flash_nfs=run nfsargs addip addtty addmtd addmisc;"            \
+               "bootm ${kernel_addr}\0"                                \
+       "net_nfs=tftp ${kernel_addr_r} ${bootfile};"                    \
+               "run nfsargs addip addtty addmtd addmisc;"              \
+               "bootm\0"                                               \
+       "bootcmd=run flash_self\0"                                      \
+       "load=tftp ${loadaddr} ${u-boot}\0"                             \
+       "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE)             \
+               " +${filesize};era " xstr(CONFIG_SYS_MONITOR_BASE)      \
+               " +${filesize};cp.b ${fileaddr} "                       \
+               xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"          \
+       "upd=run load update\0"                                         \
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP            /* undef to save memory */
+#define CONFIG_SYS_PROMPT              "=> "
+#define CONFIG_SYS_CBSIZE              512     /* Console I/O Buffer Size */
+/* Print Buffer Size */
+#define CONFIG_SYS_PBSIZE              (CONFIG_SYS_CBSIZE + \
+               sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_MAXARGS             32      /* max number of command args */
+/* Boot Argument Buffer Size */
+#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
+
+/* memtest works on first 255MB of RAM */
+#define CONFIG_SYS_MEMTEST_START       PHYS_SDRAM_1
+#define CONFIG_SYS_MEMTEST_END         (PHYS_SDRAM_1 + 0xff000000)
+
+#define CONFIG_SYS_LOAD_ADDR           CONFIG_LOADADDR
+
+#define CONFIG_SYS_HZ                  1000
+
+#define CONFIG_CMDLINE_EDITING 1
+
+#define CONFIG_MISC_INIT_R     1
+/*-----------------------------------------------------------------------
+ * Stack sizes
+ *
+ * The stack sizes are set up in start.S using the settings below
+ */
+#define CONFIG_STACKSIZE       (128 * 1024)    /* regular stack */
+
+/*-----------------------------------------------------------------------
+ * Physical Memory Map
+ */
+#define CONFIG_NR_DRAM_BANKS   1
+#define PHYS_SDRAM_1           CSD0_BASE
+#define PHYS_SDRAM_1_SIZE      0x10000000      /* 256 MB */
+
+/*-----------------------------------------------------------------------
+ * FLASH and environment organization
+ */
+#define CONFIG_SYS_FLASH_BASE          CS0_BASE
+#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max number of memory banks */
+/* max number of sectors on one chip */
+#define CONFIG_SYS_MAX_FLASH_SECT      1024
+/* Monitor at beginning of flash */
+#define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_FLASH_BASE
+#define CONFIG_SYS_MONITOR_LEN         0x40000         /* Reserve 256KiB */
+
+#define        CONFIG_ENV_IS_IN_FLASH  1
+#define CONFIG_ENV_SECT_SIZE   0x20000
+#define CONFIG_ENV_SIZE                CONFIG_ENV_SECT_SIZE
+#define CONFIG_ENV_ADDR                (CONFIG_SYS_FLASH_BASE + 0x40000)
+
+/* Address and size of Redundant Environment Sector    */
+#define CONFIG_ENV_OFFSET_REDUND       (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+
+/*-----------------------------------------------------------------------
+ * CFI FLASH driver setup
+ */
+/* Flash memory is CFI compliant */
+#define CONFIG_SYS_FLASH_CFI                   1
+/* Use drivers/cfi_flash.c */
+#define CONFIG_FLASH_CFI_DRIVER                        1
+/* Use buffered writes (~10x faster) */
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE      1
+/* Use hardware sector protection */
+#define CONFIG_SYS_FLASH_PROTECTION            1
+
+/*
+ * JFFS2 partitions
+ */
+#define CONFIG_JFFS2_CMDLINE
+#define MTDIDS_DEFAULT         "nor0=physmap-flash.0"
+#define MTDPARTS_DEFAULT       \
+       "mtdparts=physmap-flash.0:256k(U-Boot),128k(env1),"     \
+       "128k(env2),2560k(kernel),13m(ramdisk),-(user)"
+
+#endif /* __CONFIG_H */
index ba5f8d2..2794ddd 100644 (file)
@@ -44,6 +44,7 @@ int cpu_eth_init(bd_t *bis);
 int au1x00_enet_initialize(bd_t*);
 int bfin_EMAC_initialize(bd_t *bis);
 int dc21x4x_initialize(bd_t *bis);
+int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr);
 int e1000_initialize(bd_t *bis);
 int eepro100_initialize(bd_t *bis);
 int eth_3com_initialize (bd_t * bis);
index fe68df0..f125d38 100644 (file)
@@ -287,9 +287,6 @@ void start_armboot (void)
 {
        init_fnc_t **init_fnc_ptr;
        char *s;
-#if !defined(CONFIG_SYS_NO_FLASH) || defined (CONFIG_VFD) || defined(CONFIG_LCD)
-       ulong size;
-#endif
 #if defined(CONFIG_VFD) || defined(CONFIG_LCD)
        unsigned long addr;
 #endif
@@ -315,8 +312,7 @@ void start_armboot (void)
 
 #ifndef CONFIG_SYS_NO_FLASH
        /* configure available FLASH banks */
-       size = flash_init ();
-       display_flash_config (size);
+       display_flash_config (flash_init ());
 #endif /* CONFIG_SYS_NO_FLASH */
 
 #ifdef CONFIG_VFD
@@ -328,7 +324,7 @@ void start_armboot (void)
         */
        /* bss_end is defined in the board-specific linker script */
        addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
-       size = vfd_setmem (addr);
+       vfd_setmem (addr);
        gd->fb_base = addr;
 #endif /* CONFIG_VFD */
 
@@ -343,7 +339,7 @@ void start_armboot (void)
                 */
                /* bss_end is defined in the board-specific linker script */
                addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
-               size = lcd_setmem (addr);
+               lcd_setmem (addr);
                gd->fb_base = addr;
        }
 #endif /* CONFIG_LCD */
index b6b0a80..b0bbbd1 100755 (executable)
--- a/mkconfig
+++ b/mkconfig
@@ -82,7 +82,7 @@ else
        > config.h              # Create new config file
 fi
 echo "/* Automatically generated - do not edit */" >>config.h
-echo "#include <asm/config.h>" >>config.h
 echo "#include <configs/$1.h>" >>config.h
+echo "#include <asm/config.h>" >>config.h
 
 exit 0