[U-Boot] [PATCH v11 6/6] arm: faraday: add virtual machine support
From: Kuo-Jung Su dant...@faraday-tech.com Faraday Virtual Machine (FVM) is a QEMU based emulator which is designed for early stage software development (i.e., IPL, SPL development). Please check the link bellow for details: https://github.com/dantesu1218/qemu/blob/qemu-1.5.1/hw/arm/faraday_fvm.c Signed-off-by: Kuo-Jung Su dant...@faraday-tech.com CC: Albert Aribaud albert.u.b...@aribaud.net --- Changes for v11: - Fix boards.cfg (due to commit 3fa67050) - Rename asm/sizes.h to linux/sizes.h (due to commit 1ace4022) - Directly specify the timer object in 'arch/arm/cpu/faraday/fvm/Makefile' instead of using CONFIG_FTTMR010 in 'arch/arm/cpu/faraday/Makefile' Changes for v10: - Nothing updates Changes for v9: - Initial commit arch/arm/cpu/faraday/fvm/Makefile|8 arch/arm/include/asm/arch-fvm/hardware.h | 76 ++ 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 |1 + include/configs/fvm.h| 58 +++ 8 files changed, 276 insertions(+) create mode 100644 arch/arm/cpu/faraday/fvm/Makefile create mode 100644 arch/arm/include/asm/arch-fvm/hardware.h 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/fvm.h diff --git a/arch/arm/cpu/faraday/fvm/Makefile b/arch/arm/cpu/faraday/fvm/Makefile new file mode 100644 index 000..9c1eaa8 --- /dev/null +++ b/arch/arm/cpu/faraday/fvm/Makefile @@ -0,0 +1,8 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := ../fttmr010.o diff --git a/arch/arm/include/asm/arch-fvm/hardware.h b/arch/arm/include/asm/arch-fvm/hardware.h new file mode 100644 index 000..dd04ced --- /dev/null +++ b/arch/arm/include/asm/arch-fvm/hardware.h @@ -0,0 +1,76 @@ +/* + * arch/arm/include/asm/arch-fvm/hardware.h + * + * (C) Copyright 2013 + * Faraday Technology Corporation. http://www.faraday-tech.com/ + * Kuo-Jung Su dant...@gmail.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +#include linux/sizes.h + +#define CONFIG_DRAM_BASE0x1000 + +#define CONFIG_SRAM_BASE0xA000 +#define CONFIG_SRAM_SIZE0x0002 + +#define CONFIG_SYSC_BASE0x90f0 +#define CONFIG_SYSC_IRQ 15 + +#define CONFIG_FTINTC030_BASE 0x9100 + +#define CONFIG_FTTMR010_BASE0x9020 +#define CONFIG_FTTMR010_IRQ 1 + +#define CONFIG_FTUART010_BASE0 0x9000 +#define CONFIG_FTUART010_IRQ0 2 +#define CONFIG_FTUART010_BASE1 0x9010 +#define CONFIG_FTUART010_IRQ1 3 +#define CONFIG_FTUART010_BASE CONFIG_FTUART010_BASE0 + +#define CONFIG_DDRC_BASE0x9030 + +#define CONFIG_FTI2C010_BASE0x9040 +#define CONFIG_FTI2C010_IRQ 4 + +#define CONFIG_FTSSP010_BASE0x9050 +#define CONFIG_FTSSP010_IRQ 5 + +#define CONFIG_FTWDT010_BASE0x9060 +#define CONFIG_FTWDT010_IRQ 6 + +#define CONFIG_FTRTC011_BASE0x9070 +#define CONFIG_FTRTC011_IRQ 7 + +#define CONFIG_FTTSC010_BASE0x9080 +#define CONFIG_FTTSC010_IRQ 8 + +#define CONFIG_FTAPBBRG020_BASE 0x9110 +#define CONFIG_FTAPBBRG020_IRQ 16 + +#define CONFIG_FTDMAC020_BASE 0x9120 +#define CONFIG_FTDMAC020_IRQ17 + +#define CONFIG_FTMAC110_BASE0x9130 +#define CONFIG_FTMAC110_IRQ 18 + +#define CONFIG_FTSPI020_BASE0x9140 +#define CONFIG_FTSPI020_IRQ 19 + +#define CONFIG_FTNANDC021_BASE 0x9150 +#define CONFIG_FTNANDC021_IRQ 20 + +#define CONFIG_FTSDC021_BASE0x9160 +#define CONFIG_FTSDC021_IRQ 21 + +#define CONFIG_FOTG210_BASE 0x9170 +#define CONFIG_FOTG210_IRQ 22 + +#define CONFIG_FTLCDC200_BASE 0x9180 +#define CONFIG_FTLCDC200_IRQ23 + +#endif /* EOF */ diff --git a/board/faraday/fvm/Makefile b/board/faraday/fvm/Makefile new file mode 100644 index 000..42fef70 --- /dev/null +++ b/board/faraday/fvm/Makefile @@ -0,0 +1,9 @@ +# +# (C) Copyright 2000-2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := board.o clock.o +obj-y += lowlevel_init.o diff --git a/board/faraday/fvm/board.c b/board/faraday/fvm/board.c new file mode 100644 index 000..6c2b03a --- /dev/null +++ b/board/faraday/fvm/board.c @@ -0,0 +1,60 @@ +/* + * (C) Copyright 2013
Re: [U-Boot] [PATCH v11 6/6] arm: faraday: add virtual machine support
Dear Kuo-Jung Su, In message 1395813799-3672-7-git-send-email-dant...@gmail.com you wrote: From: Kuo-Jung Su dant...@faraday-tech.com Faraday Virtual Machine (FVM) is a QEMU based emulator which is designed for early stage software development (i.e., IPL, SPL development). ... +ulong clk_get_rate(const char *id) +{ + ulong ret = 0; + + if (!strcmp(id, AHB)) + ret = clk_get_rate_ahb(); + else if (!strcmp(id, APB)) + ret = clk_get_rate_apb(); + else if (!strcmp(id, CPU)) + ret = clk_get_rate_cpu(); + else if (!strcmp(id, I2C)) + ret = clk_get_rate_apb(); + else if (!strcmp(id, SSP)) + ret = clk_get_rate_apb(); + else if (!strcmp(id, SPI)) + ret = clk_get_rate_ahb(); + else if (!strcmp(id, MMC) || !strcmp(id, SDC)) + ret = clk_get_rate_ahb(); + + return ret; +} I have seen basically identical code in [PATCH v11 4/6] arm: faraday: add A369 evaluation board; please move this (and other common code) into a common location so we have only one implementation of common code. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de You don't stop doing things because you get old. You get old because you stop doing things.- Rosamunde Pilcher ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v11 6/6] arm: faraday: add virtual machine support
2014-03-26 14:52 GMT+08:00 Wolfgang Denk w...@denx.de: Dear Kuo-Jung Su, In message 1395813799-3672-7-git-send-email-dant...@gmail.com you wrote: From: Kuo-Jung Su dant...@faraday-tech.com Faraday Virtual Machine (FVM) is a QEMU based emulator which is designed for early stage software development (i.e., IPL, SPL development). ... +ulong clk_get_rate(const char *id) +{ + ulong ret = 0; + + if (!strcmp(id, AHB)) + ret = clk_get_rate_ahb(); + else if (!strcmp(id, APB)) + ret = clk_get_rate_apb(); + else if (!strcmp(id, CPU)) + ret = clk_get_rate_cpu(); + else if (!strcmp(id, I2C)) + ret = clk_get_rate_apb(); + else if (!strcmp(id, SSP)) + ret = clk_get_rate_apb(); + else if (!strcmp(id, SPI)) + ret = clk_get_rate_ahb(); + else if (!strcmp(id, MMC) || !strcmp(id, SDC)) + ret = clk_get_rate_ahb(); + + return ret; +} I have seen basically identical code in [PATCH v11 4/6] arm: faraday: add A369 evaluation board; please move this (and other common code) into a common location so we have only one implementation of common code. Got it, thanks -- Best wishes, Kuo-Jung Su ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot