From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuo-Jung Su Date: Thu, 16 Jan 2014 16:31:49 +0800 Subject: [U-Boot] [PATCH v9 0/7] arm: add Faraday SoC platform support In-Reply-To: <1364540788-13943-1-git-send-email-dantesu@gmail.com> References: <1364540788-13943-1-git-send-email-dantesu@gmail.com> Message-ID: <1389861116-3728-1-git-send-email-dantesu@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Kuo-Jung Su These patches introduce Faraday A369 & Virtual SoC platform support. Here are some public documents for your reference. http://www.faraday-tech.com/html/Product/SoCPlatform/SoCreativeIII.htm http://www.faraday-tech.com/html/documentation/index.html There is also a QEMU based A369 emulator available at my github account: https://github.com/dantesu1218/qemu.git Here is quick start for QEMU + U-Boot: 1. Download the QEMU source tree $ git clone -b qemu-1.5.1 https://github.com/dantesu1218/qemu.git 2. Build & Install the QEMU: $ ./configure --target-list=arm-softmmu $ make $ make install 3. Launch u-boot with QEMU: $ qemu-system-arm -M a369 -m 512M -nographic -kernel ~/u-boot-2014.01/u-boot Changes for v9: - Shrink the patch by dropping MMU/D-cache support, and see if we could get this patch accepted ASAP. - Replace the out-of-date A360 EVB with Faraday Virtual Machine (FVM). - Build 'arch_preboot_os()' only when CONFIG_CMD_BOOTM is defined. - Add do_go_exec() to override the default behavior of 'go' command. - Make Faraday SoC helper files & ftsmc020 standalone changesets. - Coding style cleanup. Changes for v8: - Revise MMU/D-cache support - Revise Faraday SoC common configurations. - Drop FTINTC020 interrupt controller support. - Drop FTLCDC200 LCD controller support. - Drop FTNANDC021 NAND flash controller support, it would be latter submitted as a standalone patch set. - Drop proprietary Faraday SPL support, the u-boot-spl would be adapted instead. However because it depends on the FTNANDC021 patch set, so it would be submitted after the FTNANDC021 patch set get committed. Changes for v7: - Update license to use SPDX identifiers. - cfi_flash: drop the patch to unmap_physmem(), because it's already applied. - ftnandc021: put_unaligned() -> memcpy() - ftnandc021: update ecc relatived function prototypes to fix compile warnnings. Changes for v6: - Drop ethernet driver updates for ftmac110&ftgmac100, because they are already commited. - arch/arm/cpu/faraday/cpu.c: struct ftwdt010_wdt __iomem *regs -> struct ftwdt010_wdt *regs - arch/arm/cpu/faraday/cmd_bootfa.c: fix compiler warnning - arch/arm/cpu/faraday/cmd_bootfa.c: use shorter paragraph in commit message, and move the original statement into the top of source file. - ftnandc021: update README for CONFIG_SYS_FTNANDC021_TIMING - ftnandc021: remove illegal type-punning Changes for v5: - Coding Style cleanup: 1. struct chip_regs __iomem *regs -> struct chip_regs *regs 2. Move Faraday specific APIs into asm/arch-faraday/*.h - Fix Copyright notices (dates) throughout the patch - Make 'arm: dma_alloc_coherent: malloc() -> memalign()' as a separate patch - Make 'cfi_flash: use buffer length in unmap_physmem()' as a separate patch - Define Faraday machine type in board's config header file - Add the rationale to the command 'bootfa' - Add myself as the maintainer for Faraday A360/A369 in MAINTAINERS. - Chain the video:FTLCDC200 back to this patch series. - Chain the nand:FTNANDC021 back to this patch series. - Chain the net:FTGMAC100 & FTMAC110 back to this patch series. - Update Faraday Firmware Image Format: 1. Drop u-boot image support to simplify the design. Since it's not possible for the hard-wired ROM code of A360/A369 to support U-boot images. And the real bootloader for A360/A369 is actually Faraday bootcode2, rather than U-Boot. 2. Add image creation timestamp - Update 'arch/arm/cpu/faraday/start.S' with the new design, which move relocation into 'arch/arm/lib/relocate.S' - Drop i2c:FTI2C010 & spi:FTSSP010_SPI support. The corresponding patch would restart after this patch series have been accepted. - Revise IRQ & MMU design: Now the exception table would be mapped to 0x00000000 as a small page(4KB), rather than runtime adjust after relocation finished. - Revise irq:FTINTC020 design, now the irq is always enabled inside irq_install_handler(). - Revise clock management system - Revise FTPWMTMR010 & FTTMR010 timer design: 1. Drop IRQ dependant implementation 2. Use gd->arch.timer_rate_hz for timer clock source 3. Use gd->arch.tbl for timestamp Changes for v4: - Coding Style cleanup. - Break down the patch series: - Patches without hard dependency to this series are now seperate patches. - Split up the patch into more logical changesets (i.e. interrupt & timers are now split up) - Drop the faraday/nand.h to remove dependency to ftnandc021 - Drop the faraday/mmc.h to remove dependency to ftsdc010 - Add change logs to each part of the patch series to make patchwork be able to grab comments. Changes for v3: - Coding Style cleanup. There is still one warnning reported by checkpatch.pl, however it's too deep for me to fix it. Here is the shapshot for it: ----------------------------------------------------- WARNING: do not add new typedefs #9735: FILE: include/lcd.h:258: +typedef struct vidinfo { ----------------------------------------------------- - Drop bit fields from c struct. - Drop macros for wirtel()/readl(), call them directly. - Always insert a blank line between declarations and code. - Replace all the infinite wait loop with a timeout. - Add '__iomem' to all the declaration of HW register pointers. - cmd_boot.c: Make it a separate stand-alone patch. - ftspi020: Make it a separate stand-alone patch. - dma-mapping.h: Have the global data ptr declared outside functions. - dma-mapping.h: Add #if...#else...#endif to dma_free_coherent(). - MMU/D-Cache: Drop static non-cached region, now we use map_physmem()/unmap_physmem() for dynamic mappings. - ftmac110: Make a correction to multi-line comment style - ftmac110: Use random MAC address while having trouble to get one from environment variables. - ftmac110: Add comments to timing control registers. - ftnandc021: Re-write this driver with ECC enabled and correct column address handling for OOB read/write, and fixing issused addressed by Scott. - a36x_config: No more static global network configurations. - a36x_config: Add a common file for the redundant configurations. Changes for v2: - Coding Style cleanup. - Use readl(), writel(), clrsetbits_le32() to replace REG() macros. - Use structure based hardware registers to replace the macro constants. - Replace BIT() with BIT_MASK(). - echi-faraday: Remove debug codes. - ftmac110: Remove debug codes. - cache-cp15: Enable write buffer in write-through mode. Kuo-Jung Su (7): arm: add Faraday ARMv5TE cores support arm: add Faraday SoC helper files arm: faraday: add FTTMR010 timer support arm: faraday: add FTPWMTMR010 timer support arm: faraday: ftsmc020: add a fail-safe macro constant arm: faraday: add A369 evaluation board support arm: faraday: add Faraday Virtual Machine support arch/arm/cpu/faraday/Makefile | 13 + arch/arm/cpu/faraday/a369/Makefile | 8 + arch/arm/cpu/faraday/cache.c | 164 ++++++++++++ arch/arm/cpu/faraday/config.mk | 15 ++ arch/arm/cpu/faraday/cpu.c | 115 ++++++++ arch/arm/cpu/faraday/ftpwmtmr010.c | 112 ++++++++ arch/arm/cpu/faraday/fttmr010.c | 123 +++++++++ arch/arm/cpu/faraday/fvm/Makefile | 8 + arch/arm/cpu/faraday/start.S | 407 +++++++++++++++++++++++++++++ arch/arm/include/asm/arch-a369/hardware.h | 88 +++++++ arch/arm/include/asm/arch-a369/sysc.h | 211 +++++++++++++++ arch/arm/include/asm/arch-fvm/hardware.h | 76 ++++++ arch/arm/include/asm/faraday.h | 13 + board/faraday/a369evb/Makefile | 9 + board/faraday/a369evb/board.c | 122 +++++++++ board/faraday/a369evb/clock.c | 68 +++++ board/faraday/a369evb/lowlevel_init.S | 15 ++ board/faraday/fvm/Makefile | 9 + board/faraday/fvm/board.c | 60 +++++ board/faraday/fvm/clock.c | 49 ++++ board/faraday/fvm/lowlevel_init.S | 15 ++ boards.cfg | 2 + include/common.h | 3 + include/configs/a369.h | 111 ++++++++ include/configs/faraday-common.h | 314 ++++++++++++++++++++++ include/configs/fvm.h | 61 +++++ include/faraday/ftpwmtmr010.h | 41 +++ include/faraday/ftsmc020.h | 1 + include/faraday/fttmr010.h | 17 ++ 29 files changed, 2250 insertions(+) create mode 100644 arch/arm/cpu/faraday/Makefile create mode 100644 arch/arm/cpu/faraday/a369/Makefile create mode 100644 arch/arm/cpu/faraday/cache.c create mode 100644 arch/arm/cpu/faraday/config.mk create mode 100644 arch/arm/cpu/faraday/cpu.c create mode 100644 arch/arm/cpu/faraday/ftpwmtmr010.c create mode 100644 arch/arm/cpu/faraday/fttmr010.c create mode 100644 arch/arm/cpu/faraday/fvm/Makefile create mode 100644 arch/arm/cpu/faraday/start.S create mode 100644 arch/arm/include/asm/arch-a369/hardware.h create mode 100644 arch/arm/include/asm/arch-a369/sysc.h create mode 100644 arch/arm/include/asm/arch-fvm/hardware.h create mode 100644 arch/arm/include/asm/faraday.h create mode 100644 board/faraday/a369evb/Makefile create mode 100644 board/faraday/a369evb/board.c create mode 100644 board/faraday/a369evb/clock.c create mode 100644 board/faraday/a369evb/lowlevel_init.S create mode 100644 board/faraday/fvm/Makefile create mode 100644 board/faraday/fvm/board.c create mode 100644 board/faraday/fvm/clock.c create mode 100644 board/faraday/fvm/lowlevel_init.S create mode 100644 include/configs/a369.h create mode 100644 include/configs/faraday-common.h create mode 100644 include/configs/fvm.h create mode 100644 include/faraday/ftpwmtmr010.h -- 1.7.9.5