Re: [U-Boot] [PATCH] net/designware: add error message on DMA reset timeout
On Fri, Jan 30, 2015 at 4:04 AM, Marek Vasut ma...@denx.de wrote: On Friday, January 30, 2015 at 08:10:34 AM, Alexey Brodkin wrote: Hi Marek, Tom, On Fri, 2015-01-16 at 22:16 +0100, Pavel Machek wrote: On Tue 2015-01-13 17:10:24, Alexey Brodkin wrote: If for some reason DMA module fails to reset user oserves only this: -- # dhcp Trying dwmac.e0018000 FAIL -- This message makes not much sense. With proposed change error message will be more helpful: -- # dhcp Trying dwmac.e0018000 DMA reset timeout FAIL -- For example user may do power toggle to recover board functionality. Signed-off-by: Alexey Brodkin abrod...@synopsys.com Cc: Chin Liang See cl...@altera.com Cc: Dinh Nguyen dingu...@altera.com Cc: Albert Aribaud albert.u.b...@aribaud.net Cc: Tom Rini tr...@ti.com Cc: Wolfgang Denk w...@denx.de Acked-by: Pavel Machek pa...@denx.de Any chance for this trivial change to be applied? Joe, can you please pick this ? Sure. -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] common: Move dram_init() declaration to common location
On 30 January 2015 at 02:58, Michal Simek michal.si...@xilinx.com wrote: Signed-off-by: Michal Simek michal.si...@xilinx.com --- Build tested for Microblaze and x86. Created based on my discussion with Simon. --- arch/arm/include/asm/u-boot-arm.h | 1 - arch/nds32/include/asm/u-boot-nds32.h | 1 - arch/sandbox/include/asm/u-boot-sandbox.h | 1 - arch/x86/include/asm/u-boot-x86.h | 6 -- include/common.h | 1 + 5 files changed, 1 insertion(+), 9 deletions(-) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] pci: tegra: Fix port information parsing
Hi Thierry, On 30 January 2015 at 05:24, Thierry Reding tred...@nvidia.com wrote: On Sat, Jan 24, 2015 at 12:19:56PM +0800, Bin Meng wrote: Hi Thierry, On Fri, Jan 23, 2015 at 6:19 PM, Thierry Reding tred...@nvidia.com wrote: On Thu, Jan 22, 2015 at 12:04:06AM +0800, Bin Meng wrote: Hi Thierry, On Wed, Jan 21, 2015 at 5:40 PM, Thierry Reding tred...@nvidia.com wrote: On Wed, Jan 21, 2015 at 05:15:42PM +0800, Bin Meng wrote: Hi Thierry, On Wed, Jan 21, 2015 at 4:24 PM, Thierry Reding tred...@nvidia.com wrote: On Wed, Jan 21, 2015 at 10:37:07AM +0800, Bin Meng wrote: Hi, On Wed, Jan 21, 2015 at 3:05 AM, Simon Glass s...@chromium.org wrote: Hi Sjoerd, On 20 January 2015 at 10:06, Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: commit a62e84d7b1824a202dd incorrectly changed the tegra pci code to the new fdtdec pci helpers. To get the device index of the root port, the reg property should be parsed from the dtb (as was previously the case). With this patch i can successfully network boot my jetson tk1 Signed-off-by: Sjoerd Simons sjoerd.sim...@collabora.co.uk --- drivers/pci/pci_tegra.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Can you also please take a look at this patch? http://patchwork.ozlabs.org/patch/430815/ It tries to support both options. Although I still don't see how the Tegra's dts is written, I feel this patch is doing correctly. It's in the U-Boot tree, look at arch/arm/dts/tegra124.dtsi for an example. Got it. I see: pci@1,0 { device_type = pci; assigned-addresses = 0x82000800 0 0x0100 0 0x1000; reg = 0x000800 0 0 0 0; status = disabled; #address-cells = 3; #size-cells = 2; ranges; nvidia,num-lanes = 2; }; So I would read this 'reg = 0x000800 0 0 0 0' as this is a downstream port with device number 1 of the root complex. Correct. Note that these root ports don't appear on the bus using the regular configuration space accesses, so the definition here is arbitrary, though in a way to mirror what PCI would typically look like (host bridge 00:00.0, root ports 00:01.0..00:0N.0). The Linux kernel driver (and the U-Boot driver for that matter) rely on this numbering, though, for some aspects of configuration of the root ports. diff --git a/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c index f9e05ad..67b5fdf 100644 --- a/drivers/pci/pci_tegra.c +++ b/drivers/pci/pci_tegra.c @@ -459,7 +459,6 @@ static int tegra_pcie_parse_port_info(const void *fdt, int node, unsigned int *lanes) { struct fdt_pci_addr addr; - pci_dev_t bdf; int err; err = fdtdec_get_int(fdt, node, nvidia,num-lanes, 0); @@ -470,13 +469,13 @@ static int tegra_pcie_parse_port_info(const void *fdt, int node, *lanes = err; - err = fdtdec_get_pci_bdf(fdt, node, addr, bdf); + err = fdtdec_get_pci_addr(fdt, node, 0, reg, addr); I suggest replace 0 to FDT_PCI_SPACE_CONFIG. I do like how 0 actually transports the meaning of don't care here. The reg property encodes only the BDF, whereas the configuration space region for the root ports is encoded in the assigned-addresses property. Looking at the fdtdec_get_pci_addr() implementation I notice that it uses the type parameter to match on the type of region. Devices can have more than one region of the same type. How is that supposed to work with this function. Perhaps it's nothing we care about for the fdtdec API since we don't access those regions anyway from FDT code? Ah, yes, some devices may have multiple regions of the same type. Perhaps we need another parameter bar_index for this api? So far this API is not used by FDT codes. It is used by the ns16550 driver where pci ns16550 normally has two bars, one memory and one i/o. Why not use the BARs directly in the ns16550 driver rather than looking it up from the device tree? I assume the device will have to be enumerated anyway to make it work properly, at which point addresses should've been assigned to the memory and I/O BARs. It is because we cannot predict which bar to look up if we hardcod that in the generic ns16550 driver. Normally PCI ns16550 registers can be memory-mapped or I/O mapped and it could use any of the 6 BARs. What's more, on x86 for memory-mapped and I/O mapped they use different instructions
Re: [U-Boot] Nokia RX-51: Use generic board
On Fri, Jan 30, 2015 at 03:49:08PM +0100, Pali Rohár wrote: On Friday 30 January 2015 15:19:53 Tom Rini wrote: On Thu, Jan 15, 2015 at 10:26:36AM +0100, Pali Rohár wrote: Generic board with #define CONFIG_SYS_GENERIC_BOARD is working fine. There is no visible difference between legacy and generic board code. Signed-off-by: Pali Rohár pali.ro...@gmail.com Acked-by: Pavel Machek pa...@ucw.cz Applied to u-boot-ti/master, thanks! Tom, or anybody else, in future when you are going to change some parts in u-boot and remove boards which do not convert in time... please can you contact me about it (via email, I see that contact info in file board/nokia/rx51/MAINTAINERS is correct)? I'm not following u-boot ML and I really did not know that conversion to generic board code is required before end of last year... Basically Maemo users developers use uboot v2013.04 version and for Nokia N900 there is no new functionality in new uboot versions. So there is nothing like new features fixed bugs motivation. But I do not want to see n900 board code removed from uboot as uboot bootloader is for n900 really useful (most for end-users who does not even know about existence of git, uboot ML, etc). Before we do the (very soon now, -rc1 comes Monday) nuking, any board with a MAINTAINERS will get a CC, yes. But I expect MAINTAINERS to do some sort of sanity test at least once every few releases, especially since we have a regular release cycle. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net/designware: add error message on DMA reset timeout
On Tue, Jan 13, 2015 at 8:10 AM, Alexey Brodkin alexey.brod...@synopsys.com wrote: If for some reason DMA module fails to reset user oserves only this: -- # dhcp Trying dwmac.e0018000 FAIL -- This message makes not much sense. With proposed change error message will be more helpful: -- # dhcp Trying dwmac.e0018000 DMA reset timeout FAIL -- For example user may do power toggle to recover board functionality. Signed-off-by: Alexey Brodkin abrod...@synopsys.com Cc: Chin Liang See cl...@altera.com Cc: Dinh Nguyen dingu...@altera.com Cc: Albert Aribaud albert.u.b...@aribaud.net Cc: Tom Rini tr...@ti.com Cc: Wolfgang Denk w...@denx.de Cc: Pavel Machek pa...@denx.de Cc: Joe Hershberger joe.hershber...@gmail.com Cc: Ian Campbell i...@hellion.org.uk Cc: Marek Vasut ma...@denx.de --- Acked-by: Joe Hershberger joe.hershber...@ni.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/6] Add MS7206SE ethernet support
On Thu, Feb 13, 2014 at 8:13 AM, Yoshinori Sato ys...@users.sourceforge.jp wrote: Signed-off-by: Yoshinori Sato ys...@users.sourceforge.jp --- Huge apologies for the delay. Applied, Thanks! -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net/designware: add error message on DMA reset timeout
On Tue, Jan 13, 2015 at 8:10 AM, Alexey Brodkin alexey.brod...@synopsys.com wrote: If for some reason DMA module fails to reset user oserves only this: -- # dhcp Trying dwmac.e0018000 FAIL -- This message makes not much sense. With proposed change error message will be more helpful: -- # dhcp Trying dwmac.e0018000 DMA reset timeout FAIL -- For example user may do power toggle to recover board functionality. Signed-off-by: Alexey Brodkin abrod...@synopsys.com Cc: Chin Liang See cl...@altera.com Cc: Dinh Nguyen dingu...@altera.com Cc: Albert Aribaud albert.u.b...@aribaud.net Cc: Tom Rini tr...@ti.com Cc: Wolfgang Denk w...@denx.de Cc: Pavel Machek pa...@denx.de Cc: Joe Hershberger joe.hershber...@gmail.com Cc: Ian Campbell i...@hellion.org.uk Cc: Marek Vasut ma...@denx.de --- Applied, Thanks! -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 10/10] dt: socfpga: Import and enable Arria V DK DTS
Import DTS for Arria V development kit and enable support for DT. The DT is imported from Linux 3.19-rc1 as of commit 97bf6af1f928216fd6c5a66e8a57bfa95a659672 . Signed-off-by: Marek Vasut ma...@denx.de Cc: Chin Liang See cl...@opensource.altera.com Cc: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Pavel Machek pa...@denx.de Reviewed-by: Stefan Roese s...@denx.de Cc: Vince Bridgers vbrid...@opensource.altera.com --- arch/arm/dts/Makefile | 1 + arch/arm/dts/socfpga_arria5.dtsi | 34 arch/arm/dts/socfpga_arria5_socdk.dts | 74 +++ configs/socfpga_arria5_defconfig | 2 + 4 files changed, 111 insertions(+) create mode 100644 arch/arm/dts/socfpga_arria5.dtsi create mode 100644 arch/arm/dts/socfpga_arria5_socdk.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 22f122f..cbe5b86 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -50,6 +50,7 @@ dtb-$(CONFIG_ZYNQ) += zynq-zc702.dtb \ dtb-$(CONFIG_AM33XX) += am335x-boneblack.dtb dtb-$(CONFIG_SOCFPGA) += \ + socfpga_arria5_socdk.dtb\ socfpga_cyclone5_socdk.dtb \ socfpga_cyclone5_socrates.dtb diff --git a/arch/arm/dts/socfpga_arria5.dtsi b/arch/arm/dts/socfpga_arria5.dtsi new file mode 100644 index 000..5175f03 --- /dev/null +++ b/arch/arm/dts/socfpga_arria5.dtsi @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2013 Altera Corporation www.altera.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +/dts-v1/; +/* First 4KB has trampoline code for secondary cores. */ +/memreserve/ 0x 0x0001000; +#include socfpga.dtsi + +/ { + soc { + clkmgr@ffd04000 { + clocks { + osc1 { + clock-frequency = 2500; + }; + }; + }; + + mmc0: dwmmc0@ff704000 { + num-slots = 1; + broken-cd; + bus-width = 4; + cap-mmc-highspeed; + cap-sd-highspeed; + }; + + sysmgr@ffd08000 { + cpu1-start-addr = 0xffd080c4; + }; + }; +}; diff --git a/arch/arm/dts/socfpga_arria5_socdk.dts b/arch/arm/dts/socfpga_arria5_socdk.dts new file mode 100644 index 000..4e529a1 --- /dev/null +++ b/arch/arm/dts/socfpga_arria5_socdk.dts @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2013 Altera Corporation www.altera.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include socfpga_arria5.dtsi + +/ { + model = Altera SOCFPGA Arria V SoC Development Kit; + compatible = altr,socfpga-arria5, altr,socfpga; + + chosen { + bootargs = console=ttyS0,115200; + }; + + memory { + name = memory; + device_type = memory; + reg = 0x0 0x4000; /* 1GB */ + }; + + aliases { + /* this allow the ethaddr uboot environmnet variable contents + * to be added to the gmac1 device tree blob. + */ + ethernet0 = gmac1; + }; + + regulator_3_3v: 3-3-v-regulator { + compatible = regulator-fixed; + regulator-name = 3.3V; + regulator-min-microvolt = 330; + regulator-max-microvolt = 330; + }; +}; + +gmac1 { + status = okay; + phy-mode = rgmii; + + rxd0-skew-ps = 0; + rxd1-skew-ps = 0; + rxd2-skew-ps = 0; + rxd3-skew-ps = 0; + txen-skew-ps = 0; + txc-skew-ps = 2600; + rxdv-skew-ps = 0; + rxc-skew-ps = 2000; +}; + +i2c0 { + status = okay; + + eeprom@51 { + compatible = atmel,24c32; + reg = 0x51; + pagesize = 32; + }; + + rtc@68 { + compatible = dallas,ds1339; + reg = 0x68; + }; +}; + +mmc0 { + vmmc-supply = regulator_3_3v; + vqmmc-supply = regulator_3_3v; +}; + +usb1 { + status = okay; +}; diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig index f290042..f152e9d 100644 --- a/configs/socfpga_arria5_defconfig +++ b/configs/socfpga_arria5_defconfig @@ -1,3 +1,5 @@ CONFIG_SPL=y +S:CONFIG_ARM=y +S:CONFIG_TARGET_SOCFPGA_ARRIA5=y +CONFIG_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE=socfpga_arria5_socdk -- 2.1.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2 08/10] arm: socfpga: Add Altera Arria V DK support
Add support for the Altera Arria V development kit. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chin Liang See cl...@opensource.altera.com Cc: Dinh Nguyen dingu...@opensource.altera.com Cc: Pavel Machek pa...@denx.de Cc: Stefan Roese s...@denx.de Cc: Vince Bridgers vbrid...@opensource.altera.com --- arch/arm/Kconfig | 5 + board/altera/socfpga/Kconfig | 16 + board/altera/socfpga/iocsr_config.c | 688 +++ board/altera/socfpga/iocsr_config.h | 9 + board/altera/socfpga/pinmux_config.c | 215 +++ configs/socfpga_arria5_defconfig | 3 + include/configs/socfpga_arria5.h | 107 ++ 7 files changed, 1043 insertions(+) create mode 100644 configs/socfpga_arria5_defconfig create mode 100644 include/configs/socfpga_arria5.h V2: Don't tweak checkboard(), since this function is now missing. diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5eb1d03..0a04cca 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -687,6 +687,11 @@ config TARGET_CM_FX6 select CPU_V7 select SUPPORT_SPL +config TARGET_SOCFPGA_ARRIA5 + bool Support socfpga_arria5 + select CPU_V7 + select SUPPORT_SPL + config TARGET_SOCFPGA_CYCLONE5 bool Support socfpga_cyclone5 select CPU_V7 diff --git a/board/altera/socfpga/Kconfig b/board/altera/socfpga/Kconfig index fc42185..cbed8d6 100644 --- a/board/altera/socfpga/Kconfig +++ b/board/altera/socfpga/Kconfig @@ -13,3 +13,19 @@ config SYS_CONFIG_NAME default socfpga_cyclone5 endif + +if TARGET_SOCFPGA_ARRIA5 + +config SYS_BOARD + default socfpga + +config SYS_VENDOR + default altera + +config SYS_SOC + default socfpga + +config SYS_CONFIG_NAME + default socfpga_arria5 + +endif diff --git a/board/altera/socfpga/iocsr_config.c b/board/altera/socfpga/iocsr_config.c index b4b5ff8..c79aa6d 100644 --- a/board/altera/socfpga/iocsr_config.c +++ b/board/altera/socfpga/iocsr_config.c @@ -8,6 +8,7 @@ #include iocsr_config.h +#ifdef CONFIG_TARGET_SOCFPGA_CYCLONE5 const unsigned long iocsr_scan_chain0_table[(( CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH / 32) + 1)] = { 0x, @@ -655,3 +656,690 @@ const unsigned long iocsr_scan_chain3_table[(( 0x001F, 0x4100, }; +#endif /* CONFIG_TARGET_SOCFPGA_CYCLONE5 */ + +#ifdef CONFIG_TARGET_SOCFPGA_ARRIA5 +const unsigned long iocsr_scan_chain0_table[(( + CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH / 32) + 1)] = { + 0x, + 0x, + 0x, + 0x, + 0x, + 0x8000, + 0x00060180, + 0x1806, + 0x1860, + 0x00018060, + 0x06018060, + 0x4000, + 0x0C0300C0, + 0x0C03, + 0x0030, + 0x, + 0x, + 0x2000, + 0x, + 0x, + 0x0600, + 0x6018, + 0x01806018, + 0x1000, + 0xC030, + 0x0400, + 0x0300, + 0x300C, + 0x, + 0x0800, + 0x6018, + 0x01806000, + 0x0180, + 0x0006, + 0x1806, + 0x0400, + 0x300C, + 0x00C03000, + 0x00C0, + 0x0003, + 0x0C03, + 0x0200, +}; + +const unsigned long iocsr_scan_chain1_table[(( + CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH / 32) + 1)] = { + 0x0010, + 0x300C, + 0x30C0, + 0x00C0, + 0x000300C0, + 0x8000, + 0x00060180, + 0x1806, + 0x1800, + 0x0060, + 0x00018060, + 0x4000, + 0x000300C0, + 0x1000, + 0x0C00, + 0x0030, + 0xC030, + 0x2000, + 0x06018060, + 0x06018000, + 0x01FE, + 0xF800, + 0x0007, + 0x1000, + 0xC030, + 0x0300C000, + 0x0300, + 0x300C, + 0x300C, + 0x0800, + 0x6018, + 0x01806000, + 0x0180, + 0x0006, + 0x2000, + 0x0400, + 0x300C, + 0x0100, + 0x, + 0x0004, + 0x0C03, + 0x0200, + 0x1806, + 0x0080, + 0x, + 0x0002, + 0x0800, + 0x0100, + 0x1000, + 0x0040, + 0xC030, + 0x, + 0x0400, + 0x0080, +}; + +const unsigned long iocsr_scan_chain2_table[(( + CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH / 32) + 1)] = { + 0x0010, + 0x4000, + 0x, + 0x0100, + 0x0004, + 0x8000, + 0x18060180, + 0x2000, + 0x, + 0x0080, + 0x0002, + 0x4000, + 0x0004, + 0x1000, + 0x, + 0x, + 0x0001, +
[U-Boot] [PATCH 07/10] arm: socfpga: Zap board_early_init_f()
Zap this unused empty function, no point in having it. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chin Liang See cl...@opensource.altera.com Acked-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Pavel Machek pa...@denx.de Reviewed-by: Stefan Roese s...@denx.de Cc: Vince Bridgers vbrid...@opensource.altera.com --- board/altera/socfpga/socfpga.c | 8 include/configs/socfpga_common.h | 1 - 2 files changed, 9 deletions(-) diff --git a/board/altera/socfpga/socfpga.c b/board/altera/socfpga/socfpga.c index 2b2b63d..20d2216 100644 --- a/board/altera/socfpga/socfpga.c +++ b/board/altera/socfpga/socfpga.c @@ -19,14 +19,6 @@ DECLARE_GLOBAL_DATA_PTR; /* - * Initialization function which happen at early stage of c code - */ -int board_early_init_f(void) -{ - return 0; -} - -/* * Miscellaneous platform dependent initialisations */ int board_init(void) diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index c2a4c72..5254e9b 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -20,7 +20,6 @@ */ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE -#define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_ARCH_EARLY_INIT_R #define CONFIG_SYS_NO_FLASH #define CONFIG_CLOCKS -- 2.1.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 05/10] arm: socfpga: Drop cyclone5 suffix from board file name
Drop the _cyclone5 suffix from socfpga_cyclone5.c since this file will contain Arria 5 support as well. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chin Liang See cl...@opensource.altera.com Acked-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Pavel Machek pa...@denx.de Reviewed-by: Stefan Roese s...@denx.de Cc: Vince Bridgers vbrid...@opensource.altera.com --- board/altera/socfpga/Makefile | 2 +- board/altera/socfpga/socfpga.c | 100 board/altera/socfpga/socfpga_cyclone5.c | 100 3 files changed, 101 insertions(+), 101 deletions(-) create mode 100644 board/altera/socfpga/socfpga.c delete mode 100644 board/altera/socfpga/socfpga_cyclone5.c diff --git a/board/altera/socfpga/Makefile b/board/altera/socfpga/Makefile index 44baa00..c867f73 100644 --- a/board/altera/socfpga/Makefile +++ b/board/altera/socfpga/Makefile @@ -6,5 +6,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y := socfpga_cyclone5.o +obj-y := socfpga.o obj-$(CONFIG_SPL_BUILD) += pinmux_config.o iocsr_config.o diff --git a/board/altera/socfpga/socfpga.c b/board/altera/socfpga/socfpga.c new file mode 100644 index 000..459d82f --- /dev/null +++ b/board/altera/socfpga/socfpga.c @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2012 Altera Corporation www.altera.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include common.h +#include asm/arch/reset_manager.h +#include asm/io.h + +#include usb.h +#include usb/s3c_udc.h +#include usb_mass_storage.h + +#include micrel.h +#include netdev.h +#include phy.h + +DECLARE_GLOBAL_DATA_PTR; + +/* + * Print Board information + */ +int checkboard(void) +{ + puts(BOARD: Altera SoCFPGA Cyclone5 Board\n); + return 0; +} + +/* + * Initialization function which happen at early stage of c code + */ +int board_early_init_f(void) +{ + return 0; +} + +/* + * Miscellaneous platform dependent initialisations + */ +int board_init(void) +{ + /* Address of boot parameters for ATAG (if ATAG is used) */ + gd-bd-bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + + return 0; +} + +/* + * PHY configuration + */ +#ifdef CONFIG_PHY_MICREL_KSZ9021 +int board_phy_config(struct phy_device *phydev) +{ + int ret; + /* +* These skew settings for the KSZ9021 ethernet phy is required for ethernet +* to work reliably on most flavors of cyclone5 boards. +*/ + ret = ksz9021_phy_extended_write(phydev, +MII_KSZ9021_EXT_RGMII_RX_DATA_SKEW, +0x0); + if (ret) + return ret; + + ret = ksz9021_phy_extended_write(phydev, +MII_KSZ9021_EXT_RGMII_TX_DATA_SKEW, +0x0); + if (ret) + return ret; + + ret = ksz9021_phy_extended_write(phydev, +MII_KSZ9021_EXT_RGMII_CLOCK_SKEW, +0xf0f0); + if (ret) + return ret; + + if (phydev-drv-config) + return phydev-drv-config(phydev); + + return 0; +} +#endif + +#ifdef CONFIG_USB_GADGET +struct s3c_plat_otg_data socfpga_otg_data = { + .regs_otg = CONFIG_USB_DWC2_REG_ADDR, + .usb_gusbcfg= 0x1417, +}; + +int board_usb_init(int index, enum usb_init_type init) +{ + return s3c_udc_probe(socfpga_otg_data); +} + +int g_dnl_board_usb_cable_connected(void) +{ + return 1; +} +#endif diff --git a/board/altera/socfpga/socfpga_cyclone5.c b/board/altera/socfpga/socfpga_cyclone5.c deleted file mode 100644 index 459d82f..000 --- a/board/altera/socfpga/socfpga_cyclone5.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (C) 2012 Altera Corporation www.altera.com - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#include common.h -#include asm/arch/reset_manager.h -#include asm/io.h - -#include usb.h -#include usb/s3c_udc.h -#include usb_mass_storage.h - -#include micrel.h -#include netdev.h -#include phy.h - -DECLARE_GLOBAL_DATA_PTR; - -/* - * Print Board information - */ -int checkboard(void) -{ - puts(BOARD: Altera SoCFPGA Cyclone5 Board\n); - return 0; -} - -/* - * Initialization function which happen at early stage of c code - */ -int board_early_init_f(void) -{ - return 0; -} - -/* - * Miscellaneous platform dependent initialisations - */ -int board_init(void) -{ - /* Address of boot parameters for ATAG (if ATAG is used) */ - gd-bd-bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; - - return 0; -} - -/* - * PHY configuration - */ -#ifdef CONFIG_PHY_MICREL_KSZ9021 -int board_phy_config(struct phy_device *phydev) -{ - int ret; - /* -* These skew settings for the KSZ9021 ethernet phy is required for ethernet -* to work reliably on most flavors of cyclone5 boards. -*/ - ret =
[U-Boot] [PATCH 04/10] arm: socfpga: Add USB and UDC support for Cyclone V DK
Add support for USB host mode and USB device mode for the Cyclone V development kit and enable support for UMS (to export SD card as USB mass storage). The UMS is activated via 'ums 0 mmc 0' command, the system must be connected to a host PC via HPS USB port and SD card must be installed for this to work. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chin Liang See cl...@opensource.altera.com Acked-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Pavel Machek pa...@denx.de Reviewed-by: Stefan Roese s...@denx.de Cc: Vince Bridgers vbrid...@opensource.altera.com --- include/configs/socfpga_cyclone5.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/configs/socfpga_cyclone5.h b/include/configs/socfpga_cyclone5.h index c3d958c..676144a 100644 --- a/include/configs/socfpga_cyclone5.h +++ b/include/configs/socfpga_cyclone5.h @@ -21,6 +21,7 @@ #define CONFIG_CMD_ASKENV #define CONFIG_CMD_BOOTZ #define CONFIG_CMD_CACHE +#define CONFIG_CMD_DFU #define CONFIG_CMD_DHCP #define CONFIG_CMD_EXT4 #define CONFIG_CMD_EXT4_WRITE @@ -33,6 +34,8 @@ #define CONFIG_CMD_NET #define CONFIG_CMD_PING #define CONFIG_CMD_SETEXPR +#define CONFIG_CMD_USB +#define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_REGEX /* Enable regular expression support */ @@ -66,6 +69,12 @@ #endif +/* USB */ +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_DWC2_REG_ADDR SOCFPGA_USB1_ADDRESS +#endif +#define CONFIG_G_DNL_MANUFACTURER Altera + /* Extra Environment */ #define CONFIG_HOSTNAMEsocfpga_cyclone5 -- 2.1.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 03/10] arm: socfpga: Sync Cyclone V DK PLL configuration
Sync SoCFPGA Cyclone V development kit pinmux configuration with Rocketboard U-Boot v2013.01.01-114-g9381569 (ACDS14.1_REL_GSRD_PR). NOTE: This change is useless until we get proper SPL support, at which point this will likely need further rework. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chin Liang See cl...@opensource.altera.com Acked-by: Dinh Nguyen dingu...@opensource.altera.com Cc: Pavel Machek pa...@denx.de Reviewed-by: Stefan Roese s...@denx.de Cc: Vince Bridgers vbrid...@opensource.altera.com --- board/altera/socfpga/pll_config.h | 34 +++--- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/board/altera/socfpga/pll_config.h b/board/altera/socfpga/pll_config.h index f0f59a9..8130fa4 100644 --- a/board/altera/socfpga/pll_config.h +++ b/board/altera/socfpga/pll_config.h @@ -16,9 +16,9 @@ #define CONFIG_HPS_MAINPLLGRP_MPUCLK_CNT (0) #define CONFIG_HPS_MAINPLLGRP_MAINCLK_CNT (0) #define CONFIG_HPS_MAINPLLGRP_DBGATCLK_CNT (0) -#define CONFIG_HPS_MAINPLLGRP_MAINQSPICLK_CNT (3) -#define CONFIG_HPS_MAINPLLGRP_MAINNANDSDMMCCLK_CNT (3) -#define CONFIG_HPS_MAINPLLGRP_CFGS2FUSER0CLK_CNT (12) +#define CONFIG_HPS_MAINPLLGRP_MAINQSPICLK_CNT (511) +#define CONFIG_HPS_MAINPLLGRP_MAINNANDSDMMCCLK_CNT (511) +#define CONFIG_HPS_MAINPLLGRP_CFGS2FUSER0CLK_CNT (15) #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L3MPCLK (1) #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L3SPCLK (1) #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L4MPCLK (1) @@ -36,7 +36,7 @@ /* Peripheral PLL */ #define CONFIG_HPS_PERPLLGRP_VCO_DENOM (1) -#define CONFIG_HPS_PERPLLGRP_VCO_NUMER (79) +#define CONFIG_HPS_PERPLLGRP_VCO_NUMER (39) /* * To tell where is the VCOs source: * 0 = EOSC1 @@ -45,13 +45,13 @@ */ #define CONFIG_HPS_PERPLLGRP_VCO_PSRC (0) #define CONFIG_HPS_PERPLLGRP_EMAC0CLK_CNT (3) -#define CONFIG_HPS_PERPLLGRP_EMAC1CLK_CNT (3) -#define CONFIG_HPS_PERPLLGRP_PERQSPICLK_CNT(1) +#define CONFIG_HPS_PERPLLGRP_EMAC1CLK_CNT (511) +#define CONFIG_HPS_PERPLLGRP_PERQSPICLK_CNT(511) #define CONFIG_HPS_PERPLLGRP_PERNANDSDMMCCLK_CNT (4) #define CONFIG_HPS_PERPLLGRP_PERBASECLK_CNT(4) -#define CONFIG_HPS_PERPLLGRP_S2FUSER1CLK_CNT (9) +#define CONFIG_HPS_PERPLLGRP_S2FUSER1CLK_CNT (511) #define CONFIG_HPS_PERPLLGRP_DIV_USBCLK(0) -#define CONFIG_HPS_PERPLLGRP_DIV_SPIMCLK (0) +#define CONFIG_HPS_PERPLLGRP_DIV_SPIMCLK (4) #define CONFIG_HPS_PERPLLGRP_DIV_CAN0CLK (1) #define CONFIG_HPS_PERPLLGRP_DIV_CAN1CLK (1) #define CONFIG_HPS_PERPLLGRP_GPIODIV_GPIODBCLK (6249) @@ -66,15 +66,8 @@ #define CONFIG_HPS_PERPLLGRP_SRC_QSPI (1) /* SDRAM PLL */ -#ifdef CONFIG_SOCFPGA_ARRIA5 -/* Arria V SDRAM will run at 533MHz while Cyclone V still at 400MHz - * This if..else... is not required if generated by tools */ #define CONFIG_HPS_SDRPLLGRP_VCO_DENOM (2) -#define CONFIG_HPS_SDRPLLGRP_VCO_NUMER (127) -#else -#define CONFIG_HPS_SDRPLLGRP_VCO_DENOM (0) -#define CONFIG_HPS_SDRPLLGRP_VCO_NUMER (31) -#endif /* CONFIG_SOCFPGA_ARRIA5 */ +#define CONFIG_HPS_SDRPLLGRP_VCO_NUMER (79) /* * To tell where is the VCOs source: @@ -94,17 +87,12 @@ /* Info for driver */ #define CONFIG_HPS_CLK_OSC1_HZ (2500) -#define CONFIG_HPS_CLK_OSC2_HZ 0 +#define CONFIG_HPS_CLK_OSC2_HZ (2500) #define CONFIG_HPS_CLK_F2S_SDR_REF_HZ 0 #define CONFIG_HPS_CLK_F2S_PER_REF_HZ 0 #define CONFIG_HPS_CLK_MAINVCO_HZ (16) #define CONFIG_HPS_CLK_PERVCO_HZ (10) -#ifdef CONFIG_SOCFPGA_ARRIA5 -/* The if..else... is not required if generated by tools */ -#define CONFIG_HPS_CLK_SDRVCO_HZ (106600) -#else -#define CONFIG_HPS_CLK_SDRVCO_HZ (8) -#endif +#define CONFIG_HPS_CLK_SDRVCO_HZ (6) #define CONFIG_HPS_CLK_EMAC0_HZ(25000) #define CONFIG_HPS_CLK_EMAC1_HZ(25000) #define CONFIG_HPS_CLK_USBCLK_HZ (2) -- 2.1.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 01/10] arm: socfpga: Minor coding style fix
Replace multiple spaces with a single tab. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chin Liang See cl...@opensource.altera.com Acked-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Pavel Machek pa...@denx.de Reviewed-by: Stefan Roese s...@denx.de Cc: Vince Bridgers vbrid...@opensource.altera.com --- board/altera/socfpga/iocsr_config.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/board/altera/socfpga/iocsr_config.h b/board/altera/socfpga/iocsr_config.h index 490f109..4a7ed46 100644 --- a/board/altera/socfpga/iocsr_config.h +++ b/board/altera/socfpga/iocsr_config.h @@ -9,9 +9,9 @@ #ifndef _PRELOADER_IOCSR_CONFIG_H_ #define _PRELOADER_IOCSR_CONFIG_H_ -#define CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH(764) -#define CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH(1719) -#define CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH(955) -#define CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH(16766) +#define CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH (764) +#define CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH (1719) +#define CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH (955) +#define CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH (16766) #endif /*_PRELOADER_IOCSR_CONFIG_H_*/ -- 2.1.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2 06/10] arm: socfpga: Zap checkboard()
Since all boards now have a DT, instead of hard-coding the board name into the U-Boot binary, read the board name from DT model property. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chin Liang See cl...@opensource.altera.com Cc: Dinh Nguyen dingu...@opensource.altera.com Cc: Pavel Machek pa...@denx.de Cc: Stefan Roese s...@denx.de Cc: Vince Bridgers vbrid...@opensource.altera.com --- board/altera/socfpga/socfpga.c | 9 - include/configs/socfpga_common.h | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) V2: Place this patch at this point in the series, so the subsequent patches don't have to tweak checkboard to support distinction between Arria V and Cyclone V. diff --git a/board/altera/socfpga/socfpga.c b/board/altera/socfpga/socfpga.c index 459d82f..2b2b63d 100644 --- a/board/altera/socfpga/socfpga.c +++ b/board/altera/socfpga/socfpga.c @@ -19,15 +19,6 @@ DECLARE_GLOBAL_DATA_PTR; /* - * Print Board information - */ -int checkboard(void) -{ - puts(BOARD: Altera SoCFPGA Cyclone5 Board\n); - return 0; -} - -/* * Initialization function which happen at early stage of c code */ int board_early_init_f(void) diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index 6b1f967..c2a4c72 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -19,7 +19,7 @@ * High level configuration */ #define CONFIG_DISPLAY_CPUINFO -#define CONFIG_DISPLAY_BOARDINFO +#define CONFIG_DISPLAY_BOARDINFO_LATE #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_ARCH_EARLY_INIT_R #define CONFIG_SYS_NO_FLASH -- 2.1.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 0/7] RFC: dm: Add USB support
This series adds basic driver model support to USB. The intent is to permit the various subsystems (OHCI, EHCI, XHCI) to co-exist and allow any number of USB ports of different types. So far the absolute limit on the number of USB devices is only slightly relaxed. Only USB controllers have a real driver model device. USB devices (including the hub in the controller) are not modelled as driver model devices. This is for two reasons: - it is easier since we don't need to bind a whole lot of devices when scanning - the two main USB devices (block devices and Ethernet) don't have driver mode support yet anyway, so it would be pointless. However the recent network RFC has encouraged me to send this. The basic approach is to set up the driver model structures in parallel to what already exists rather than to replace them. This allows both driver model and legacy to be used for USB, although not with the same board. So far only XHCI is supported. As an example the Exynos XHCI driver is converted to driver model. I would appreciate comments before going further. Caveats: - sandbox code is incomplete and there are no tests - 'usb stop' does not remove existing devices (I have not yet settled on the best approach) - the usb.h changes need to be split correctly into the patches once they are final This series is available at u-boot-dm/usb-working. Simon Glass (7): dm: usb: Add a uclass for USB controllers dm: usb: Support driver model in exynos XHCI dm: usb: Adjust users of the USB stack to work with driver model dm: usb: WIP sandbox USB implementation dm: core: Add a function to get the uclass data for a device arm: Show relocated PC/LR in the register dump dm: exynos: Enable driver model for snow XHCI Makefile | 1 + arch/arm/lib/interrupts.c| 13 +- arch/sandbox/dts/sandbox.dts | 20 +++ arch/sandbox/include/asm/processor.h | 0 common/cmd_usb.c | 74 --- common/usb.c | 28 +++-- common/usb_hub.c | 13 +- common/usb_storage.c | 148 +- drivers/core/device.c| 10 ++ drivers/usb/dev/Makefile | 10 ++ drivers/usb/dev/sandbox-flash.c | 95 +++ drivers/usb/dev/sandbox-hub.c| 116 ++ drivers/usb/dev/usb-emul-uclass.c| 16 +++ drivers/usb/eth/usb_ether.c | 46 +-- drivers/usb/host/Makefile| 5 + drivers/usb/host/usb-sandbox.c | 151 +++ drivers/usb/host/usb-uclass.c| 227 ++ drivers/usb/host/xhci-exynos5.c | 115 +- drivers/usb/host/xhci.c | 229 --- drivers/usb/host/xhci.h | 24 include/configs/sandbox.h| 3 + include/configs/snow.h | 1 + include/dm/device.h | 10 ++ include/dm/uclass-id.h | 2 + include/usb.h| 76 +++- include/usb_defs.h | 14 ++- 26 files changed, 1294 insertions(+), 153 deletions(-) create mode 100644 arch/sandbox/include/asm/processor.h create mode 100644 drivers/usb/dev/Makefile create mode 100644 drivers/usb/dev/sandbox-flash.c create mode 100644 drivers/usb/dev/sandbox-hub.c create mode 100644 drivers/usb/dev/usb-emul-uclass.c create mode 100644 drivers/usb/host/usb-sandbox.c create mode 100644 drivers/usb/host/usb-uclass.c -- 2.2.0.rc0.207.ga3a616c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] net: tsec: Fix NULL access in case init_phy() fails
On Tue, Dec 10, 2013 at 7:21 AM, Claudiu Manoil claudiu.man...@freescale.com wrote: If the PHY is not recognized don't access phydev (NULL) and return 0 to signal failure. Signed-off-by: Claudiu Manoil claudiu.man...@freescale.com --- Applied, Thanks! -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net: phy: micrel: add support for KSZ8895 switch in SMI mode
On Wed, Feb 19, 2014 at 10:21 AM, Philippe De Muyter p...@macqel.be wrote: This patch adds a phy driver for the Micrel KSZ8895 switch. As the SoC MAC is directly connected to the switch MAC the link to the switch is always up. But the KSZ8895 switch can be hardwired in three configuration modes : - not configurable with eventually an eeprom-stored configuration - configurable by the mdio/mdc connection (SMI protocol) - configurable by a SPI connection. In not configurable mode, the switch starts automatically, but in the other modes, it must be started programmatically, by writing 1 in configuration register 1. We only support the not configurable and mdio/mdc (aka SMI) modes here. Signed-off-by: Philippe De Muyter p...@macqel.be Cc: Christian Gmeiner christian.gmei...@gmail.com --- Huge apologies for the delay. Applied, Thanks! -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request: u-boot-net.git master
The following changes since commit 2af13d6b6265a6700c4f65597410b769895024bf: lcd: fix console address is not initialized (2015-01-28 16:58:02 -0500) are available in the git repository at: git://git.denx.de/u-boot-net.git master for you to fetch changes up to 875143f32428b8317a2b890b34a1eeb31cbf8a53: net/designware: add error message on DMA reset timeout (2015-01-30 15:55:00 -0600) Alexey Brodkin (1): net/designware: add error message on DMA reset timeout Claudiu Manoil (1): net: tsec: Fix NULL access in case init_phy() fails Philippe De Muyter (1): net: phy: micrel: add support for KSZ8895 switch in SMI mode Yoshinori Sato (1): Add MS7206SE ethernet support drivers/net/designware.c | 4 +++- drivers/net/phy/micrel.c | 58 drivers/net/smc9.h | 31 +- drivers/net/tsec.c | 2 ++ 4 files changed, 93 insertions(+), 2 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 10/12] dt: socfpga: Import and enable Arria V DK DTS
On Sunday, January 18, 2015 at 07:21:34 AM, Dinh Nguyen wrote: On 12/31/14 1:14 PM, Marek Vasut wrote: [...] diff --git a/arch/arm/dts/socfpga_arria5.dtsi b/arch/arm/dts/socfpga_arria5.dtsi new file mode 100644 index 000..5175f03 --- /dev/null +++ b/arch/arm/dts/socfpga_arria5.dtsi @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2013 Altera Corporation www.altera.com Nit: extra space before Copyright. Hi! Sorry for the late reply. This DTS comes from mainline Linux, so I wonder if it makes sense to diverge here, especially since this is just a comment. Diverging in the DTS files would make it more annoying in the long run, since checking the differences between Linux and U-Boot would spit this one false positive. What do you think please ? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 09/10] dt: socfpga: Import and enable Cyclone V DK DTS
Import DTS for Cyclone V development kit and enable support for DT. The DT is imported from Linux 3.19-rc1 as of commit 97bf6af1f928216fd6c5a66e8a57bfa95a659672 . Signed-off-by: Marek Vasut ma...@denx.de Cc: Chin Liang See cl...@opensource.altera.com Cc: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Pavel Machek pa...@denx.de Reviewed-by: Stefan Roese s...@denx.de Cc: Vince Bridgers vbrid...@opensource.altera.com --- arch/arm/dts/Makefile | 4 +- arch/arm/dts/socfpga_cyclone5_socdk.dts | 79 + configs/socfpga_cyclone5_defconfig | 2 + 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/socfpga_cyclone5_socdk.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index fac16cc..22f122f 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -49,7 +49,9 @@ dtb-$(CONFIG_ZYNQ) += zynq-zc702.dtb \ zynq-zc770-xm013.dtb dtb-$(CONFIG_AM33XX) += am335x-boneblack.dtb -dtb-$(CONFIG_SOCFPGA) += socfpga_cyclone5_socrates.dtb +dtb-$(CONFIG_SOCFPGA) += \ + socfpga_cyclone5_socdk.dtb \ + socfpga_cyclone5_socrates.dtb targets += $(dtb-y) diff --git a/arch/arm/dts/socfpga_cyclone5_socdk.dts b/arch/arm/dts/socfpga_cyclone5_socdk.dts new file mode 100644 index 000..8e1f88c --- /dev/null +++ b/arch/arm/dts/socfpga_cyclone5_socdk.dts @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2012 Altera Corporation www.altera.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include socfpga_cyclone5.dtsi + +/ { + model = Altera SOCFPGA Cyclone V SoC Development Kit; + compatible = altr,socfpga-cyclone5, altr,socfpga; + + chosen { + bootargs = console=ttyS0,115200; + }; + + memory { + name = memory; + device_type = memory; + reg = 0x0 0x4000; /* 1GB */ + }; + + aliases { + /* this allow the ethaddr uboot environmnet variable contents +* to be added to the gmac1 device tree blob. +*/ + ethernet0 = gmac1; + }; + + regulator_3_3v: 3-3-v-regulator { + compatible = regulator-fixed; + regulator-name = 3.3V; + regulator-min-microvolt = 330; + regulator-max-microvolt = 330; + }; +}; + +gmac1 { + status = okay; + phy-mode = rgmii; + + rxd0-skew-ps = 0; + rxd1-skew-ps = 0; + rxd2-skew-ps = 0; + rxd3-skew-ps = 0; + txen-skew-ps = 0; + txc-skew-ps = 2600; + rxdv-skew-ps = 0; + rxc-skew-ps = 2000; +}; + +gpio1 { + status = okay; +}; + +i2c0 { + status = okay; + + eeprom@51 { + compatible = atmel,24c32; + reg = 0x51; + pagesize = 32; + }; + + rtc@68 { + compatible = dallas,ds1339; + reg = 0x68; + }; +}; + +mmc0 { + cd-gpios = portb 18 0; + vmmc-supply = regulator_3_3v; + vqmmc-supply = regulator_3_3v; +}; + +usb1 { + status = okay; +}; diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig index 4b2ede4..2d3dd47 100644 --- a/configs/socfpga_cyclone5_defconfig +++ b/configs/socfpga_cyclone5_defconfig @@ -1,3 +1,5 @@ CONFIG_SPL=y +S:CONFIG_ARM=y +S:CONFIG_TARGET_SOCFPGA_CYCLONE5=y +CONFIG_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE=socfpga_cyclone5_socdk -- 2.1.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 06/12] arm: socfpga: Add Altera Arria V DK support
On Sunday, January 18, 2015 at 07:19:40 AM, Dinh Nguyen wrote: On 12/31/14 1:14 PM, Marek Vasut wrote: Hi! diff --git a/board/altera/socfpga/socfpga.c b/board/altera/socfpga/socfpga.c index 459d82f..a9c330d 100644 --- a/board/altera/socfpga/socfpga.c +++ b/board/altera/socfpga/socfpga.c @@ -23,7 +23,14 @@ DECLARE_GLOBAL_DATA_PTR; */ int checkboard(void) { +#ifdef CONFIG_TARGET_SOCFPGA_CYCLONE5 puts(BOARD: Altera SoCFPGA Cyclone5 Board\n); +#endif + +#ifdef CONFIG_TARGET_SOCFPGA_ARRIA5 + puts(BOARD: Altera SoCFPGA Arria5 Board\n); +#endif + return 0; } Do you need this change here only to get zapped in patch 11/12. No objections really, just an observation. You're right, I re-ordered the patches to cater for this. Thanks! Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 02/10] arm: socfpga: Sync Cyclone V DK pinmux configuration
Sync SoCFPGA Cyclone V development kit pinmux configuration with Rocketboard U-Boot v2013.01.01-114-g9381569 (ACDS14.1_REL_GSRD_PR). Signed-off-by: Marek Vasut ma...@denx.de Cc: Chin Liang See cl...@opensource.altera.com Acked-by: Dinh Nguyen dingu...@opensource.altera.com Cc: Pavel Machek pa...@denx.de Reviewed-by: Stefan Roese s...@denx.de Cc: Vince Bridgers vbrid...@opensource.altera.com --- board/altera/socfpga/pinmux_config.c | 188 +-- board/altera/socfpga/pinmux_config.h | 14 +-- 2 files changed, 101 insertions(+), 101 deletions(-) diff --git a/board/altera/socfpga/pinmux_config.c b/board/altera/socfpga/pinmux_config.c index 8b09005..b124768 100644 --- a/board/altera/socfpga/pinmux_config.c +++ b/board/altera/socfpga/pinmux_config.c @@ -4,100 +4,100 @@ /* pin mux configuration data */ unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM] = { - 0, /* EMACIO0 - Unused */ - 2, /* EMACIO1 - USB */ - 2, /* EMACIO2 - USB */ - 2, /* EMACIO3 - USB */ - 2, /* EMACIO4 - USB */ - 2, /* EMACIO5 - USB */ - 2, /* EMACIO6 - USB */ - 2, /* EMACIO7 - USB */ - 2, /* EMACIO8 - USB */ - 0, /* EMACIO9 - Unused */ - 2, /* EMACIO10 - USB */ - 2, /* EMACIO11 - USB */ - 2, /* EMACIO12 - USB */ - 2, /* EMACIO13 - USB */ - 0, /* EMACIO14 - N/A */ - 0, /* EMACIO15 - N/A */ - 0, /* EMACIO16 - N/A */ - 0, /* EMACIO17 - N/A */ - 0, /* EMACIO18 - N/A */ - 0, /* EMACIO19 - N/A */ - 3, /* FLASHIO0 - SDMMC */ - 3, /* FLASHIO1 - SDMMC */ - 3, /* FLASHIO2 - SDMMC */ - 3, /* FLASHIO3 - SDMMC */ - 0, /* FLASHIO4 - SDMMC */ - 0, /* FLASHIO5 - SDMMC */ - 0, /* FLASHIO6 - SDMMC */ - 0, /* FLASHIO7 - SDMMC */ - 0, /* FLASHIO8 - SDMMC */ - 3, /* FLASHIO9 - SDMMC */ - 3, /* FLASHIO10 - SDMMC */ - 3, /* FLASHIO11 - SDMMC */ - 3, /* GENERALIO0 - TRACE */ - 3, /* GENERALIO1 - TRACE */ - 3, /* GENERALIO2 - TRACE */ - 3, /* GENERALIO3 - TRACE */ - 3, /* GENERALIO4 - TRACE */ - 3, /* GENERALIO5 - TRACE */ - 3, /* GENERALIO6 - TRACE */ - 3, /* GENERALIO7 - TRACE */ - 3, /* GENERALIO8 - TRACE */ - 3, /* GENERALIO9 - SPIM0 */ - 3, /* GENERALIO10 - SPIM0 */ - 3, /* GENERALIO11 - SPIM0 */ - 3, /* GENERALIO12 - SPIM0 */ - 2, /* GENERALIO13 - CAN0 */ - 2, /* GENERALIO14 - CAN0 */ - 3, /* GENERALIO15 - I2C0 */ - 3, /* GENERALIO16 - I2C0 */ - 2, /* GENERALIO17 - UART0 */ - 2, /* GENERALIO18 - UART0 */ - 0, /* GENERALIO19 - N/A */ - 0, /* GENERALIO20 - N/A */ - 0, /* GENERALIO21 - N/A */ - 0, /* GENERALIO22 - N/A */ - 0, /* GENERALIO23 - N/A */ - 0, /* GENERALIO24 - N/A */ - 0, /* GENERALIO25 - N/A */ - 0, /* GENERALIO26 - N/A */ - 0, /* GENERALIO27 - N/A */ - 0, /* GENERALIO28 - N/A */ - 0, /* GENERALIO29 - N/A */ - 0, /* GENERALIO30 - N/A */ - 0, /* GENERALIO31 - N/A */ - 2, /* MIXED1IO0 - EMAC */ - 2, /* MIXED1IO1 - EMAC */ - 2, /* MIXED1IO2 - EMAC */ - 2, /* MIXED1IO3 - EMAC */ - 2, /* MIXED1IO4 - EMAC */ - 2, /* MIXED1IO5 - EMAC */ - 2, /* MIXED1IO6 - EMAC */ - 2, /* MIXED1IO7 - EMAC */ - 2, /* MIXED1IO8 - EMAC */ - 2, /* MIXED1IO9 - EMAC */ - 2, /* MIXED1IO10 - EMAC */ - 2, /* MIXED1IO11 - EMAC */ - 2, /* MIXED1IO12 - EMAC */ - 2, /* MIXED1IO13 - EMAC */ - 0, /* MIXED1IO14 - Unused */ - 3, /* MIXED1IO15 - QSPI */ - 3, /* MIXED1IO16 - QSPI */ - 3, /* MIXED1IO17 - QSPI */ - 3, /* MIXED1IO18 - QSPI */ - 3, /* MIXED1IO19 - QSPI */ - 3, /* MIXED1IO20 - QSPI */ - 0, /* MIXED1IO21 - GPIO */ - 0, /* MIXED2IO0 - N/A */ - 0, /* MIXED2IO1 - N/A */ - 0, /* MIXED2IO2 - N/A */ - 0, /* MIXED2IO3 - N/A */ - 0, /* MIXED2IO4 - N/A */ - 0, /* MIXED2IO5 - N/A */ - 0, /* MIXED2IO6 - N/A */ - 0, /* MIXED2IO7 - N/A */ + 3, /* EMACIO0 */ + 3, /* EMACIO1 */ + 3, /* EMACIO2 */ + 3, /* EMACIO3 */ + 3, /* EMACIO4 */ + 3, /* EMACIO5 */ + 3, /* EMACIO6 */ + 3, /* EMACIO7 */ + 3, /* EMACIO8 */ + 3, /* EMACIO9 */ + 3, /* EMACIO10 */ + 3, /* EMACIO11 */ + 3, /* EMACIO12 */ + 3, /* EMACIO13 */ + 0, /* EMACIO14 */ + 0, /* EMACIO15 */ + 0, /* EMACIO16 */ + 0, /* EMACIO17 */ + 0, /* EMACIO18 */ + 0, /* EMACIO19 */ + 3, /* FLASHIO0 */ + 0, /* FLASHIO1 */ + 3, /* FLASHIO2 */ + 3, /* FLASHIO3 */ + 3, /* FLASHIO4 */ + 3, /* FLASHIO5 */ + 3, /* FLASHIO6 */ + 3, /* FLASHIO7 */ + 0, /* FLASHIO8 */ + 3, /* FLASHIO9 */ + 3, /* FLASHIO10 */ + 3, /* FLASHIO11 */ + 0, /* GENERALIO0 */ + 1, /*
Re: [U-Boot] [RFC PATCH 0/7] RFC: dm: Add USB support
Hi Marek, On 30 January 2015 at 15:16, Marek Vasut ma...@denx.de wrote: On Friday, January 30, 2015 at 08:04:50 PM, Simon Glass wrote: This series adds basic driver model support to USB. The intent is to permit the various subsystems (OHCI, EHCI, XHCI) to co-exist and allow any number of USB ports of different types. So far the absolute limit on the number of USB devices is only slightly relaxed. Only USB controllers have a real driver model device. USB devices (including the hub in the controller) are not modelled as driver model devices. This is for two reasons: - it is easier since we don't need to bind a whole lot of devices when scanning - the two main USB devices (block devices and Ethernet) don't have driver mode support yet anyway, so it would be pointless. However the recent network RFC has encouraged me to send this. The basic approach is to set up the driver model structures in parallel to what already exists rather than to replace them. This allows both driver model and legacy to be used for USB, although not with the same board. So far only XHCI is supported. As an example the Exynos XHCI driver is converted to driver model. I would appreciate comments before going further. Caveats: - sandbox code is incomplete and there are no tests - 'usb stop' does not remove existing devices (I have not yet settled on the best approach) - the usb.h changes need to be split correctly into the patches once they are final This series is available at u-boot-dm/usb-working. Hi! I'll look at this by the end of next week, I will be free by then. It's not possible for me to do it earlier, sorry. Does this still work for you please? Definitely, that sounds good. I was planning to leave it a week or two anyway, although I might fiddle more with the sandbox side in the meantime. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] net: tsec: Pending patches
On Fri, Feb 14, 2014 at 3:49 AM, Claudiu Manoil claudiu.man...@freescale.com wrote: Hello, Would you please consider applying these two net tree patches? http://patchwork.ozlabs.org/patch/299620/ (net: Merge asm/fsl_enet.h into fsl_mdio.h) http://patchwork.ozlabs.org/patch/299447/ (net: tsec: Fix NULL access in case init_phy() fails) Thanks, Claudiu Huge apologies for the delay. I'm pulling the first one now. The second appears to be superseded. -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] usb: add 'bcm_udc_otg' support
On Monday, January 26, 2015 at 01:31:39 PM, Lukasz Majewski wrote: Hi Marek, On Monday, January 26, 2015 at 09:38:28 AM, Lukasz Majewski wrote: Hi Marek, Hi! [...] No, unless there's a convincing technical argument that the currently mainline DWC2 gadget driver (the s3c one) can absolutelly not be used for the broadcom SoC, I want to avoid having two drivers for the same IP core in mainline, sorry. Maybe it is a highest time to think about renaming s3c_* to dwc2_* and avoid further confusion. The time was ripe for a while now ;-) Do you want to do it or shall I send a patch ? I do know that I will test it :-), so feel free to send the patch. Hi! I'm dead busy until end of next week. Do you mind cooking such patch please? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] usb: add 'bcm_udc_otg' support
On Wednesday, January 28, 2015 at 08:04:45 PM, Steve Rae wrote: On 15-01-27 03:00 PM, Marek Vasut wrote: On Monday, January 26, 2015 at 06:44:14 PM, Steve Rae wrote: [...] No, unless there's a convincing technical argument that the currently mainline DWC2 gadget driver (the s3c one) can absolutelly not be used for the broadcom SoC, I want to avoid having two drivers for the same IP core in mainline, sorry. [...] Sorry, at this point I have to push back a little. OK -- Thanks for this information Hi! do you plan to rework the series on top of the dwc2 (s3c) driver by any chance please ? Best regards, Marek Vasut I have it on my TODO list, but I am not going to be able to work on it (for weeks; if not months...) Sorry. But if someone else would rework the code, I can probably find some time to test it Aw, that's a bit sad. Porting the Altera stuff was a matter of a couple of hours, are you sure you won't give it a spin please ? :) Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH 0/7] RFC: dm: Add USB support
On Friday, January 30, 2015 at 08:04:50 PM, Simon Glass wrote: This series adds basic driver model support to USB. The intent is to permit the various subsystems (OHCI, EHCI, XHCI) to co-exist and allow any number of USB ports of different types. So far the absolute limit on the number of USB devices is only slightly relaxed. Only USB controllers have a real driver model device. USB devices (including the hub in the controller) are not modelled as driver model devices. This is for two reasons: - it is easier since we don't need to bind a whole lot of devices when scanning - the two main USB devices (block devices and Ethernet) don't have driver mode support yet anyway, so it would be pointless. However the recent network RFC has encouraged me to send this. The basic approach is to set up the driver model structures in parallel to what already exists rather than to replace them. This allows both driver model and legacy to be used for USB, although not with the same board. So far only XHCI is supported. As an example the Exynos XHCI driver is converted to driver model. I would appreciate comments before going further. Caveats: - sandbox code is incomplete and there are no tests - 'usb stop' does not remove existing devices (I have not yet settled on the best approach) - the usb.h changes need to be split correctly into the patches once they are final This series is available at u-boot-dm/usb-working. Hi! I'll look at this by the end of next week, I will be free by then. It's not possible for me to do it earlier, sorry. Does this still work for you please? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V3] cmd_i2c: Provide option for bulk 'i2c write' in one transaction
I2C chips do exist that require a write of some multi-byte data to occur in a single bus transaction (aka atomic transfer), otherwise either the write does not come into effect at all, or normal operation of internal circuitry cannot be guaranteed. The current implementation of the 'i2c write' command (transfer of multiple bytes from a memory buffer) in fact performs a separate transaction for each byte to be written and thus cannot support such types of I2C slave devices. This patch provides an alternative by allowing 'i2c write' to execute the write transfer of the given number of bytes in a single bus transaction if the '-s' option is specified as a final command argument. Else the current re-addressing method is used. Signed-off-by: Lubomir Popov l-po...@ti.com --- Changes in V3: Rebased on current master. Changes in V2: The option to use bulk transfer vs re-addressing is implemented as a run-time command argument. V1 used conditional compilation through a board header definition. common/cmd_i2c.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 22db1bb..8d4f5f6 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -344,7 +344,7 @@ static int do_i2c_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[ struct udevice *dev; #endif - if (argc != 5) + if ((argc 5) || (argc 6)) return cmd_usage(cmdtp); /* @@ -367,7 +367,7 @@ static int do_i2c_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[ return cmd_usage(cmdtp); /* -* Length is the number of objects, not number of bytes. +* Length is the number of bytes. */ length = simple_strtoul(argv[4], NULL, 16); @@ -379,20 +379,40 @@ static int do_i2c_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[ return i2c_report_err(ret, I2C_ERR_WRITE); #endif - while (length-- 0) { + if (argc == 6 !strcmp(argv[5], -s)) { + /* +* Write all bytes in a single I2C transaction. If the target +* device is an EEPROM, it is your responsibility to not cross +* a page boundary. No write delay upon completion, take this +* into account if linking commands. +*/ #ifdef CONFIG_DM_I2C - ret = i2c_write(dev, devaddr++, memaddr++, 1); + ret = i2c_write(dev, devaddr, memaddr, length); #else - ret = i2c_write(chip, devaddr++, alen, memaddr++, 1); + ret = i2c_write(chip, devaddr, alen, memaddr, length); #endif if (ret) return i2c_report_err(ret, I2C_ERR_WRITE); + } else { + /* +* Repeated addressing - perform length separate +* write transactions of one byte each +*/ + while (length-- 0) { +#ifdef CONFIG_DM_I2C + ret = i2c_write(dev, devaddr++, memaddr++, 1); +#else + ret = i2c_write(chip, devaddr++, alen, memaddr++, 1); +#endif + if (ret) + return i2c_report_err(ret, I2C_ERR_WRITE); /* * No write delay with FRAM devices. */ #if !defined(CONFIG_SYS_I2C_FRAM) - udelay(11000); + udelay(11000); #endif + } } return 0; } @@ -1823,7 +1843,7 @@ static cmd_tbl_t cmd_i2c_sub[] = { U_BOOT_CMD_MKENT(nm, 2, 1, do_i2c_nm, , ), U_BOOT_CMD_MKENT(probe, 0, 1, do_i2c_probe, , ), U_BOOT_CMD_MKENT(read, 5, 1, do_i2c_read, , ), - U_BOOT_CMD_MKENT(write, 5, 0, do_i2c_write, , ), + U_BOOT_CMD_MKENT(write, 6, 0, do_i2c_write, , ), #ifdef CONFIG_DM_I2C U_BOOT_CMD_MKENT(flags, 2, 1, do_i2c_flags, , ), #endif @@ -1890,7 +1910,8 @@ static char i2c_help_text[] = i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n i2c probe [address] - test for and show device(s) on the I2C bus\n i2c read chip address[.0, .1, .2] length memaddress - read to memory\n - i2c write memaddress chip address[.0, .1, .2] length - write memory to i2c\n + i2c write memaddress chip address[.0, .1, .2] length [-s] - write memory\n + to I2C; the -s option selects bulk write in a single transaction\n #ifdef CONFIG_DM_I2C i2c flags chip [flags] - set or get chip flags\n #endif @@ -1902,7 +1923,7 @@ static char i2c_help_text[] = #endif U_BOOT_CMD( - i2c, 6, 1, do_i2c, + i2c, 7, 1, do_i2c, I2C sub-system, i2c_help_text ); -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/9] sunxi: Move SPL s_init() code to board_init_f()
On Mon, 29 Dec 2014 09:15:36 -0700 Simon Glass s...@chromium.org wrote: Hi Ian, On 28 December 2014 at 02:19, Ian Campbell i...@hellion.org.uk wrote: On Tue, 2014-12-23 at 12:04 -0700, Simon Glass wrote: +void board_init_f(ulong dummy) +{ [...] + /* Clear the BSS. */ + memset(__bss_start, 0, __bss_end - __bss_start); + + board_init_r(NULL, 0); The previous (__weak) version of board_init_f also sets gd, which you've also removed from s_init here and not added back anywhere (indeed, this is the point...). But where is gd initialised now? It's still in start.S, I've just removed this duplicate. The patch generally looks good, two quick questions: has it been tested in both FEL and regular mode, and has it been tested with a legacy as well as a driver model system? (I might be able to find time in a day or two to answer these myself, but for now I'll just ask). I haven't tried FEL, I only just heard of it in your email. I'll see if I can figure out how to test that. Just like Ian suspected, this patch has messed up the FEL boot mode support. In a nutshell, FEL is a special USB protocol (accessible on a USB OTG connector), which is implemented by the boot ROM and activated by holding a special hardware button pressed and rebooting the device. FEL supports commands to read/write device RAM and execute code on the device. It is designed for device unbricking and firmware recovery. In particular, the FEL boot mode support is very useful for debugging u-boot and kernel problems on tablets (the SD card slot can be used for the UART console, while the system is booted over a micro-USB cable with the help of FEL): http://linux-sunxi.org/File:MSI_Primo81_and_MicroSD_breakout.jpg In u-boot it is used in the following way: 1. The SPL code is uploaded from the linux PC to the device SRAM via a FEL command (using the 'fel' program from sunxi-tools). 2. The SPL code is executed via a FEL command and expected to initialize the DRAM controller. The code is executed as a normal C or assembly function, which needs to return control back to the BROM code when it is done. Right now this function is s_init(). 3. As the DRAM is initialized and available now, the main u-boot binary is now uploaded to DRAM via FEL. Together with boot.scr, the kernel, the dtb file and optionally initramfs as needed. 4. The main u-boot binary is executed via a FEL command, but never returns back to BROM anymore. More details are available in the linux-sunxi wiki: http://linux-sunxi.org/FEL http://linux-sunxi.org/FEL/Protocol http://linux-sunxi.org/FEL/USBBoot I have submitted a patch to fix this regression: https://patchwork.ozlabs.org/patch/434826/ If you encounter problems and/or need help when testing FEL, please let me know. -- Best regards, Siarhei Siamashka ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 2/7] dm: usb: Support driver model in exynos XHCI
(This patch will be split for submission) Add driver model support to the XHCI framework, and move exynos over to use it. Signed-off-by: Simon Glass s...@chromium.org --- drivers/usb/host/xhci-exynos5.c | 115 +++- drivers/usb/host/xhci.c | 229 drivers/usb/host/xhci.h | 24 + 3 files changed, 324 insertions(+), 44 deletions(-) diff --git a/drivers/usb/host/xhci-exynos5.c b/drivers/usb/host/xhci-exynos5.c index a77c8bc..e61f39e 100644 --- a/drivers/usb/host/xhci-exynos5.c +++ b/drivers/usb/host/xhci-exynos5.c @@ -14,6 +14,7 @@ */ #include common.h +#include dm.h #include fdtdec.h #include libfdt.h #include malloc.h @@ -32,6 +33,12 @@ /* Declare global data pointer */ DECLARE_GLOBAL_DATA_PTR; +struct exynos_xhci_platdata { + fdt_addr_t hcd_base; + fdt_addr_t phy_base; + struct gpio_desc vbus_gpio; +}; + /** * Contains pointers to register base addresses * for the usb controller. @@ -40,12 +47,56 @@ struct exynos_xhci { struct exynos_usb3_phy *usb3_phy; struct xhci_hccr *hcd; struct dwc3 *dwc3_reg; +#ifndef CONFIG_DM_USB struct gpio_desc vbus_gpio; +#endif }; +#ifndef CONFIG_DM_USB static struct exynos_xhci exynos; +#endif -#ifdef CONFIG_OF_CONTROL +#ifdef CONFIG_DM_USB +static int xhci_usb_ofdata_to_platdata(struct udevice *dev) +{ + struct exynos_xhci_platdata *plat = dev_get_platdata(dev); + const void *blob = gd-fdt_blob; + unsigned int node; + int depth; + + /* +* Get the base address for XHCI controller from the device node +*/ + plat-hcd_base = fdtdec_get_addr(blob, dev-of_offset, reg); + if (plat-hcd_base == FDT_ADDR_T_NONE) { + debug(Can't get the XHCI register base address\n); + return -ENXIO; + } + + depth = 0; + node = fdtdec_next_compatible_subnode(blob, dev-of_offset, + COMPAT_SAMSUNG_EXYNOS5_USB3_PHY, depth); + if (node = 0) { + debug(XHCI: Can't get device node for usb3-phy controller\n); + return -ENODEV; + } + + /* +* Get the base address for usbphy from the device node +*/ + plat-phy_base = fdtdec_get_addr(blob, node, reg); + if (plat-phy_base == FDT_ADDR_T_NONE) { + debug(Can't get the usbphy register address\n); + return -ENXIO; + } + + /* Vbus gpio */ + gpio_request_by_name(dev, samsung,vbus-gpio, 0, +plat-vbus_gpio, GPIOD_IS_OUT); + + return 0; +} +#else static int exynos_usb3_parse_dt(const void *blob, struct exynos_xhci *exynos) { fdt_addr_t addr; @@ -182,7 +233,7 @@ static void exynos5_usb3_phy_exit(struct exynos_usb3_phy *phy) set_usbdrd_phy_ctrl(POWER_USB_DRD_PHY_CTRL_DISABLE); } -void dwc3_set_mode(struct dwc3 *dwc3_reg, u32 mode) +static void dwc3_set_mode(struct dwc3 *dwc3_reg, u32 mode) { clrsetbits_le32(dwc3_reg-g_ctl, DWC3_GCTL_PRTCAPDIR(DWC3_GCTL_PRTCAP_OTG), @@ -283,6 +334,7 @@ static void exynos_xhci_core_exit(struct exynos_xhci *exynos) exynos5_usb3_phy_exit(exynos-usb3_phy); } +#ifndef CONFIG_DM_USB int xhci_hcd_init(int index, struct xhci_hccr **hccr, struct xhci_hcor **hcor) { struct exynos_xhci *ctx = exynos; @@ -326,3 +378,62 @@ void xhci_hcd_stop(int index) exynos_xhci_core_exit(ctx); } +#endif + +#ifdef CONFIG_DM_USB +static int xhci_usb_probe(struct udevice *dev) +{ + struct exynos_xhci_platdata *plat = dev_get_platdata(dev); + struct exynos_xhci *ctx = dev_get_priv(dev); + struct xhci_hcor *hcor; + int ret; + + ctx-hcd = (struct xhci_hccr *)plat-hcd_base; + ctx-usb3_phy = (struct exynos_usb3_phy *)plat-phy_base; + ctx-dwc3_reg = (struct dwc3 *)((char *)(ctx-hcd) + DWC3_REG_OFFSET); + hcor = (struct xhci_hcor *)((uint32_t)ctx-hcd + + HC_LENGTH(xhci_readl(ctx-hcd-cr_capbase))); + + /* setup the Vbus gpio here */ + if (dm_gpio_is_valid(plat-vbus_gpio)) + dm_gpio_set_value(plat-vbus_gpio, 1); + + ret = exynos_xhci_core_init(ctx); + if (ret) { + puts(XHCI: failed to initialize controller\n); + return -EINVAL; + } + + return xhci_register(dev, ctx-hcd, hcor); +} + +static int xhci_usb_remove(struct udevice *dev) +{ + struct exynos_xhci *ctx = dev_get_priv(dev); + int ret; + + ret = xhci_deregister(dev); + if (ret) + return ret; + exynos_xhci_core_exit(ctx); + + return 0; +} + +static const struct udevice_id xhci_usb_ids[] = { + { .compatible = samsung,exynos5250-xhci }, + { } +}; + +U_BOOT_DRIVER(usb_xhci) = { + .name = xhci_exynos, + .id = UCLASS_USB, + .of_match = xhci_usb_ids, + .ofdata_to_platdata =
[U-Boot] [RFC PATCH 4/7] dm: usb: WIP sandbox USB implementation
This shows the basic approach with a new directory containing sandbox emulations of USB devices for testing. So far hubs are not supported. Signed-off-by: Simon Glass s...@chromium.org --- Makefile | 1 + arch/sandbox/dts/sandbox.dts | 20 + arch/sandbox/include/asm/processor.h | 0 drivers/usb/dev/Makefile | 10 +++ drivers/usb/dev/sandbox-flash.c | 95 ++ drivers/usb/dev/sandbox-hub.c| 116 +++ drivers/usb/dev/usb-emul-uclass.c| 16 drivers/usb/host/Makefile| 3 + drivers/usb/host/usb-sandbox.c | 151 +++ include/configs/sandbox.h| 3 + include/dm/uclass-id.h | 1 + include/usb_defs.h | 14 ++-- 12 files changed, 424 insertions(+), 6 deletions(-) create mode 100644 arch/sandbox/include/asm/processor.h create mode 100644 drivers/usb/dev/Makefile create mode 100644 drivers/usb/dev/sandbox-flash.c create mode 100644 drivers/usb/dev/sandbox-hub.c create mode 100644 drivers/usb/dev/usb-emul-uclass.c create mode 100644 drivers/usb/host/usb-sandbox.c diff --git a/Makefile b/Makefile index 9b406c8..836d93b 100644 --- a/Makefile +++ b/Makefile @@ -632,6 +632,7 @@ libs-y += drivers/spi/ libs-$(CONFIG_FMAN_ENET) += drivers/net/fm/ libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/ libs-y += drivers/serial/ +libs-y += drivers/usb/dev/ libs-y += drivers/usb/eth/ libs-y += drivers/usb/gadget/ libs-y += drivers/usb/host/ diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index 9ce31bf..7d22920 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -181,4 +181,24 @@ }; }; + usb@0 { + compatible = sandbox,usb; + status = disabled; + flash-stick { + compatible = sandbox,usb-flash; + }; + }; + + usb@1 { + compatible = sandbox,usb; + flash-stick { + compatible = sandbox,usb-hub; + }; + }; + + usb@2 { + compatible = sandbox,usb; + status = disabled; + }; + }; diff --git a/arch/sandbox/include/asm/processor.h b/arch/sandbox/include/asm/processor.h new file mode 100644 index 000..e69de29 diff --git a/drivers/usb/dev/Makefile b/drivers/usb/dev/Makefile new file mode 100644 index 000..a741f45 --- /dev/null +++ b/drivers/usb/dev/Makefile @@ -0,0 +1,10 @@ +# +# (C) Copyright 2015 Google, Inc +# Written by Simon Glass s...@chromium.org +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-$(CONFIG_SANDBOX) += sandbox-flash.o +obj-$(CONFIG_SANDBOX) += sandbox-hub.o +obj-$(CONFIG_SANDBOX) += usb-emul-uclass.o diff --git a/drivers/usb/dev/sandbox-flash.c b/drivers/usb/dev/sandbox-flash.c new file mode 100644 index 000..51aec69 --- /dev/null +++ b/drivers/usb/dev/sandbox-flash.c @@ -0,0 +1,95 @@ +/* + * (C) Copyright 2015 Google, Inc + * Written by Simon Glass s...@chromium.org + * + * SPDX-License-Identifier:GPL-2.0+ + */ +#define DEBUG +#include common.h +#include dm.h +#include usb.h + +enum { + STRINGID_null, + STRINGID_manufacterer, + STRINGID_product, + STRINGID_serial, + + STRINGID_count, +}; + +static char *usb_strings[] = { + , + sandbox, + flash_emulator, + 1234, + NULL, +}; + +static int sandbox_flash_submit_control_msg(struct udevice *dev, + unsigned long pipe, + void *buffer, int length, + struct devrequest *setup) +{ + struct usb_device *udev = dev_get_uclass_priv(dev); + + if (pipe == usb_rcvctrlpipe(udev, 0)) { + switch (setup-request) { + case USB_REQ_GET_DESCRIPTOR: + memcpy(buffer, udev-descriptor, length); + udev-status = 0; + udev-act_len = length; + return 0; + default: + debug(request=%x\n, setup-request); + break; + } + } + debug(pipe=%lx\n, pipe); + + return -EIO; +} + +static int sandbox_flash_probe(struct udevice *dev) +{ + struct usb_device *udev = dev_get_uclass_priv(dev); + struct usb_device_descriptor *desc; + struct usb_config_descriptor *cdesc; + + udev-strings = usb_strings; + desc = udev-descriptor; + desc-iManufacturer = STRINGID_manufacterer; + desc-iProduct = STRINGID_product; + desc-iSerialNumber = STRINGID_serial; + + udev-maxpacketsize = PACKET_SIZE_64; + + cdesc = udev-config.desc; + cdesc-bLength = sizeof(*cdesc); + cdesc-bDescriptorType = USB_DT_CONFIG; + cdesc-wTotalLength = 100; +
[U-Boot] [RFC PATCH 1/7] dm: usb: Add a uclass for USB controllers
Add a uclass that can represent a USB controller. For now we do not create devices for things attached to the controller. Signed-off-by: Simon Glass s...@chromium.org --- drivers/usb/host/Makefile | 2 + drivers/usb/host/usb-uclass.c | 227 ++ include/dm/uclass-id.h| 1 + 3 files changed, 230 insertions(+) create mode 100644 drivers/usb/host/usb-uclass.c diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index c11b551..d0b890a 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -5,6 +5,8 @@ # SPDX-License-Identifier: GPL-2.0+ # +obj-$(CONFIG_DM_USB) += usb-uclass.o + # ohci obj-$(CONFIG_USB_OHCI_NEW) += ohci-hcd.o obj-$(CONFIG_USB_ATMEL) += ohci-at91.o diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c new file mode 100644 index 000..86564db --- /dev/null +++ b/drivers/usb/host/usb-uclass.c @@ -0,0 +1,227 @@ +/* + * (C) Copyright 2015 Google, Inc + * Written by Simon Glass s...@chromium.org + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include common.h +#include dm.h +#include errno.h +#include usb.h +#include dm/device-internal.h + +static bool usb_started; /* flag for the started/stopped USB status */ +static bool asynch_allowed; + +int usb_disable_asynch(int disable) +{ + int old_value = asynch_allowed; + + asynch_allowed = !disable; + return old_value; +} + +int submit_int_msg(struct usb_device *udev, unsigned long pipe, void *buffer, + int length, int interval) +{ + struct udevice *dev = udev-controller_dev; + struct dm_usb_ops *ops = usb_get_ops(dev); + + if (!ops-control) + return -ENOSYS; + + return ops-interrupt(dev, udev, pipe, buffer, length, interval); +} + +int submit_control_msg(struct usb_device *udev, unsigned long pipe, + void *buffer, int length, struct devrequest *setup) +{ + struct udevice *dev = udev-controller_dev; + struct dm_usb_ops *ops = usb_get_ops(dev); + + if (!ops-control) + return -ENOSYS; + + return ops-control(dev, udev, pipe, buffer, length, setup); +} + +int submit_bulk_msg(struct usb_device *udev, unsigned long pipe, void *buffer, + int length) +{ + struct udevice *dev = udev-controller_dev; + struct dm_usb_ops *ops = usb_get_ops(dev); + + if (!ops-control) + return -ENOSYS; + + return ops-bulk(dev, udev, pipe, buffer, length); +} + +int usb_alloc_device(struct usb_device *udev) +{ + struct udevice *dev = udev-controller_dev; + struct dm_usb_ops *ops = usb_get_ops(dev); + + if (!ops-alloc_device) + return -ENOSYS; + + return ops-alloc_device(dev, udev); +} + +int usb_stop(void) +{ + return 0; +} + +int usb_init(void) +{ + int controllers_initialized = 0; + struct usb_device *udev; + struct udevice *dev; + struct uclass *uc; + int count = 0; + int ret; + + asynch_allowed = 1; + ret = uclass_get(UCLASS_USB, uc); + if (ret) + return ret; + uclass_foreach_dev(dev, uc) { + struct dm_usb_info *usb; + + /* init low_level USB */ + count++; + printf(USB); + ret = device_probe(dev); + printf(%d: , dev-seq); + if (ret == -ENODEV) { /* No such device. */ + puts(Port not available.\n); + controllers_initialized++; + continue; + } + + if (ret) { /* Other error. */ + puts(probe failed\n); + continue; + } + /* +* lowlevel init is OK, now scan the bus for devices +* i.e. search HUBs and configure them +*/ + controllers_initialized++; + printf(scanning bus %d for devices... , dev-seq); + ret = usb_alloc_new_device(dev, udev); + /* +* device 0 is always present +* (root hub, so let it analyze) +*/ + if (!ret) + usb_new_device(udev); + + usb = dev_get_uclass_priv(dev); + if (!usb-dev_index) + printf(No USB Device found\n); + else + printf(%d USB Device(s) found\n, usb-dev_index); + + usb_started = true; + } + + debug(scan end\n); + /* if we were not able to find at least one working bus, bail out */ + if (!count) + printf(No controllers found\n); + else if (controllers_initialized == 0) + printf(USB error: all controllers failed lowlevel init\n); + + return usb_started ? 0 : -1; +} + +#ifdef CONFIG_MUSB_HOST +int
[U-Boot] [RFC PATCH 6/7] arm: Show relocated PC/LR in the register dump
If we don't know the relocation address, the raw values are not very useful. Show the pre-relocation values as well as these can be looked up in System.map, etc. Signed-off-by: Simon Glass s...@chromium.org --- arch/arm/lib/interrupts.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index 4dacfd9..06f4679 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -137,10 +137,15 @@ void show_regs (struct pt_regs *regs) flags = condition_codes (regs); - printf (pc : [%08lx]lr : [%08lx]\n - sp : %08lx ip : %08lx fp : %08lx\n, - instruction_pointer (regs), - regs-ARM_lr, regs-ARM_sp, regs-ARM_ip, regs-ARM_fp); + printf(pc : [%08lx] lr : [%08lx]\n, + instruction_pointer(regs), regs-ARM_lr); + if (gd-flags GD_FLG_RELOC) { + printf(reloc pc : [%08lx] lr : [%08lx]\n, + instruction_pointer(regs) - gd-reloc_off, + regs-ARM_lr - gd-reloc_off); + } + printf(sp : %08lx ip : %08lx fp : %08lx\n, + regs-ARM_sp, regs-ARM_ip, regs-ARM_fp); printf (r10: %08lx r9 : %08lx r8 : %08lx\n, regs-ARM_r10, regs-ARM_r9, regs-ARM_r8); printf (r7 : %08lx r6 : %08lx r5 : %08lx r4 : %08lx\n, -- 2.2.0.rc0.207.ga3a616c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 7/7] dm: exynos: Enable driver model for snow XHCI
Switch snow over to use driver model for USB. Signed-off-by: Simon Glass s...@chromium.org --- include/configs/snow.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/snow.h b/include/configs/snow.h index ce6676e..00bd646 100644 --- a/include/configs/snow.h +++ b/include/configs/snow.h @@ -27,6 +27,7 @@ #define CONFIG_BOARD_COMMON #define CONFIG_ARCH_EARLY_INIT_R +#define CONFIG_DM_USB #define CONFIG_USB_XHCI #define CONFIG_USB_XHCI_EXYNOS -- 2.2.0.rc0.207.ga3a616c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 3/7] dm: usb: Adjust users of the USB stack to work with driver model
While we currently don't have driver model support for block devices and Ethernet, we can still allow this to work when driver model is used for USB. Signed-off-by: Simon Glass s...@chromium.org --- common/cmd_usb.c| 74 -- common/usb.c| 28 + common/usb_hub.c| 13 +++- common/usb_storage.c| 148 drivers/usb/eth/usb_ether.c | 46 +++--- include/usb.h | 76 +-- 6 files changed, 286 insertions(+), 99 deletions(-) diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 27813f0..b824634 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -10,6 +10,7 @@ #include common.h #include command.h +#include dm.h #include asm/byteorder.h #include asm/unaligned.h #include part.h @@ -254,16 +255,24 @@ static void usb_display_config(struct usb_device *dev) static struct usb_device *usb_find_device(int devnum) { - struct usb_device *dev; +#ifdef CONFIG_DM_USB + struct udevice *dev; + + if (uclass_get_device_by_seq(UCLASS_USB, devnum, dev)) + return NULL; + return dev_get_uclass_priv(dev); +#else + struct usb_device *udev; int d; for (d = 0; d USB_MAX_DEVICE; d++) { - dev = usb_get_dev_index(d); - if (dev == NULL) + udev = usb_get_dev_index(d); + if (udev == NULL) return NULL; - if (dev-devnum == devnum) - return dev; + if (udev-devnum == devnum) + return udev; } +#endif return NULL; } @@ -466,9 +475,8 @@ static void do_usb_start(void) */ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - + struct usb_device *udev = NULL; int i; - struct usb_device *dev = NULL; extern char usb_started; #ifdef CONFIG_USB_STORAGE block_dev_desc_t *stor_dev; @@ -508,36 +516,64 @@ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } if (strncmp(argv[1], tree, 4) == 0) { puts(USB device tree:\n); +#ifdef CONFIG_DM_USB + struct udevice *dev; + + for (uclass_first_device(UCLASS_USB, dev); +dev; +uclass_next_device(dev)) { + struct usb_device *udev = dev_get_uclass_priv(dev); + + usb_show_tree(udev); + } +#else for (i = 0; i USB_MAX_DEVICE; i++) { + struct usb_device *dev; + dev = usb_get_dev_index(i); if (dev == NULL) break; if (dev-parent == NULL) usb_show_tree(dev); } +#endif return 0; } if (strncmp(argv[1], inf, 3) == 0) { - int d; if (argc == 2) { +#ifdef CONFIG_DM_USB + struct udevice *dev; + + for (uclass_first_device(UCLASS_USB, dev); + dev; + uclass_next_device(dev)) { + struct usb_device *udev; + + udev = dev_get_uclass_priv(dev); + usb_display_desc(udev); + usb_display_config(udev); + } +#else + int d; for (d = 0; d USB_MAX_DEVICE; d++) { - dev = usb_get_dev_index(d); - if (dev == NULL) + udev = usb_get_dev_index(d); + if (udev == NULL) break; - usb_display_desc(dev); - usb_display_config(dev); + usb_display_desc(udev); + usb_display_config(udev); } +#endif return 0; } else { i = simple_strtoul(argv[2], NULL, 10); printf(config for device %d\n, i); - dev = usb_find_device(i); - if (dev == NULL) { + udev = usb_find_device(i); + if (udev == NULL) { printf(*** No device available ***\n); return 0; } else { - usb_display_desc(dev); - usb_display_config(dev); + usb_display_desc(udev); + usb_display_config(udev); } } return 0; @@
[U-Boot] [RFC PATCH 5/7] dm: core: Add a function to get the uclass data for a device
This is a convenience function only so far. Eventually it could have some consistency checking added. Signed-off-by: Simon Glass s...@chromium.org --- drivers/core/device.c | 10 ++ include/dm/device.h | 10 ++ 2 files changed, 20 insertions(+) diff --git a/drivers/core/device.c b/drivers/core/device.c index b73d3b8..fbb377b 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -305,6 +305,16 @@ void *dev_get_priv(struct udevice *dev) return dev-priv; } +void *dev_get_uclass_priv(struct udevice *dev) +{ + if (!dev) { + dm_warn(%s: null device\n, __func__); + return NULL; + } + + return dev-uclass_priv; +} + void *dev_get_parentdata(struct udevice *dev) { if (!dev) { diff --git a/include/dm/device.h b/include/dm/device.h index 81afa8c..511dbd9 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -229,6 +229,16 @@ void *dev_get_parentdata(struct udevice *dev); void *dev_get_priv(struct udevice *dev); /** + * dev_get_uclass_priv() - Get the private data for a device's class + * + * This checks that dev is not NULL, but no other checks for now + * + * @devDevice to check + * @return uclass private data, or NULL if none + */ +void *dev_get_uclass_priv(struct udevice *dev); + +/** * struct dev_get_parent() - Get the parent of a device * * @child: Child to check -- 2.2.0.rc0.207.ga3a616c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] sunxi: Make FEL mode usable again
On Fri, 30 Jan 2015 13:58:46 +0200 Siarhei Siamashka siarhei.siamas...@gmail.com wrote: The commit f630974ccb3ce93e9607a3354e9acb266a8b7e95 'sunxi: Move SPL s_init() code to board_init_f()' broke the FEL boot mode. This patch moves the DRAM initialization back to s_init() and introduces an assembly entry point for FEL in order to provide guaranteed initialization of the gdata pointer (r9). The assembly entry point is also needed to ensure that the SPL code starts executing in ARM mode. Because the sunxi board_init_f() does not contain anything that is not already done by the default board_init_f(), it is removed too. Signed-off-by: Siarhei Siamashka siarhei.siamas...@gmail.com --- arch/arm/cpu/armv7/sunxi/Makefile | 1 + arch/arm/cpu/armv7/sunxi/board.c| 26 ++ arch/arm/cpu/armv7/sunxi/start_fel.S| 16 arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds | 3 ++- 4 files changed, 29 insertions(+), 17 deletions(-) create mode 100644 arch/arm/cpu/armv7/sunxi/start_fel.S [...] +++ b/arch/arm/cpu/armv7/sunxi/start_fel.S @@ -0,0 +1,16 @@ +/* + * Entry point of the FEL mode SPL. + * + * Copyright (c) 2015 Siarhei Siamashka siarhei.siamas...@gmail.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include asm-offsets.h +#include config.h +#include linux/linkage.h + +ENTRY(_start_fel) + ldr r9, =gdata + b s_init +ENDPROC(_start_fel) In fact, we probably need to save/restore the r9 register and do it as: push{r9, lr} ldr r9, =gdata bl s_init pop {r9, pc} And maybe save some other registers, depending on the calling conventions expected by the FEL code in BROM. As a side note, corrupting r9 mimics the old u-boot sunxi behaviour. And it used not to cause any visible problems so far, at least when working with the BROM code in the current Allwinner SoCs. Also as I see it, the .bss sections is supposed to be in DRAM, and cleared only after the DRAM is initialized. This violates the C standard a little bit and enforces some sort of u-boot specific coding tricks. Such as explicitly placing gdata in the .data section instead of .bss. This is ugly, but probably justified. I'll submit a fixed v2 version of this patch later, but will first wait for additional comments from the other people. -- Best regards, Siarhei Siamashka ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] video: sunxi: Enable cache for the framebuffer
Because the framebuffer resides in a hidden chopped off part of DRAM, caching is not enabled for this area automatically when the MMU is configured. So it needs to be set explicitly. Additionally, the cfb console has a function to check whether the framebuffer resides in DRAM or not. And the hidden sunxi framebuffer needs special treatment again. This fix resolves the sluggish scrolling problem. Signed-off-by: Siarhei Siamashka siarhei.siamas...@gmail.com --- drivers/video/cfb_console.c | 2 +- drivers/video/sunxi_display.c | 10 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index a81affa..23b50df 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -2090,7 +2090,7 @@ static void *video_logo(void) } #endif -static int cfb_fb_is_in_dram(void) +__weak int cfb_fb_is_in_dram(void) { bd_t *bd = gd-bd; #if defined(CONFIG_ARM) || defined(CONFIG_AVR32) || defined(COFNIG_NDS32) || \ diff --git a/drivers/video/sunxi_display.c b/drivers/video/sunxi_display.c index f5f24fc..22a1319 100644 --- a/drivers/video/sunxi_display.c +++ b/drivers/video/sunxi_display.c @@ -1060,6 +1060,12 @@ static const char *sunxi_get_mon_desc(enum sunxi_monitor monitor) return NULL; /* never reached */ } +/* The framebuffer is in DRAM, even though it is in the hidden part of it */ +int cfb_fb_is_in_dram(void) +{ + return 1; +} + void *video_hw_init(void) { static GraphicDevice *graphic_device = sunxi_display.graphic_device; @@ -1079,6 +1085,10 @@ void *video_hw_init(void) CONFIG_SUNXI_FB_SIZE 10); gd-fb_base = gd-ram_top; + mmu_set_region_dcache_behaviour(gd-fb_base, + CONFIG_SUNXI_FB_SIZE, + DCACHE_WRITEBACK); + video_get_ctfb_res_modes(RES_MODE_1024x768, 24, mode, sunxi_display.depth, options); #ifdef CONFIG_VIDEO_HDMI -- 2.0.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 02/13] lcd: split configuration_get_cmap
Hi Nikita, On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: configuration_get_cmap() is multiple platform specific functions stuffed into one function. Split it into multiple versions, and move each version to the appropriate driver to reduce the #ifdef complexity. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Bo Shen voice.s...@atmel.com Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c | 19 --- drivers/video/atmel_hlcdfb.c | 13 + drivers/video/atmel_lcdfb.c | 5 + drivers/video/exynos_fb.c| 9 + drivers/video/mpc8xx_lcd.c | 7 +++ drivers/video/pxa_lcd.c | 6 ++ include/lcd.h| 9 + 7 files changed, 49 insertions(+), 19 deletions(-) Reviewed-by: Simon Glass s...@chromium.org See suggestion below. [snip] diff --git a/include/lcd.h b/include/lcd.h index fbba6a2..838f645 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -42,13 +42,17 @@ void lcd_set_flush_dcache(int flush); #if defined CONFIG_MPC823 #include mpc823_lcd.h +ushort *configuration_get_cmap(void); #elif defined(CONFIG_CPU_PXA25X) || defined(CONFIG_CPU_PXA27X) || \ defined CONFIG_CPU_MONAHANS #include pxa_lcd.h +ushort *configuration_get_cmap(void); #elif defined(CONFIG_ATMEL_LCD) || defined(CONFIG_ATMEL_HLCD) #include atmel_lcd.h +ushort *configuration_get_cmap(void); #elif defined(CONFIG_EXYNOS_FB) #include exynos_lcd.h +ushort *configuration_get_cmap(void); #else typedef struct vidinfo { ushort vl_col; /* Number of columns (i.e. 160) */ @@ -60,6 +64,11 @@ typedef struct vidinfo { void*priv; /* Pointer to driver-specific data */ } vidinfo_t; + +static inline ushort *configuration_get_cmap(void) +{ + return panel_info.cmap; +} #endif I'd argue for dropping the inline version and just having the same prototype in each case. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 10/13] lcd: various cleanups
On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: This cleanup mostly focuses on removing unnecessary whitespace and comments which are superfluous and/or do not conform to the coding style. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c | 90 +-- include/lcd.h | 102 -- 2 files changed, 49 insertions(+), 143 deletions(-) Reviewed-by: Simon Glass s...@chromium.org Optional comment below. diff --git a/common/lcd.c b/common/lcd.c index 7a51923..06eec45 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -379,17 +330,14 @@ __weak void lcd_logo_set_cmap(void) void bitmap_plot(int x, int y) { ushort i, j; - uchar *bmap; - uchar *fb; - ushort *fb16; + uchar *bmap = bmp_logo_bitmap[0]; unsigned bpix = NBITS(panel_info.vl_bpix); + uchar *fb = (uchar *)(lcd_base + y * lcd_line_length + x * bpix / 8); I don't thing it's better to attach these to the declaration. Personal preference though, it's up to you. + ushort *fb16; debug(Logo: width %d height %d colors %d\n, BMP_LOGO_WIDTH, BMP_LOGO_HEIGHT, BMP_LOGO_COLORS); - bmap = bmp_logo_bitmap[0]; - fb = (uchar *)(lcd_base + y * lcd_line_length + x * bpix / 8); - if (bpix 12) { WATCHDOG_RESET(); lcd_logo_set_cmap(); Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 08/13] lcd: introduce lcd_set_cmap
On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: Reduce the lcd_display_bitmap #ifdef complexity by extracting Atmel specific code for setting cmap for bitmap images into a new function lcd_set_cmap(). A default version is implemented with the remainder of the code. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Bo Shen voice.s...@atmel.com Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c| 46 ++--- drivers/video/atmel_lcdfb.c | 11 +++ 2 files changed, 33 insertions(+), 24 deletions(-) I *think* I understand this... Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 03/13] lcd: atmel: move atmel specific fb_put_word to atmel_lcdfb
On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: Reduce the amount of platform dependant code in common/lcd.c by moving Atmel specific implementation of fb_put_word() to atmel_lcdfb.c. Since we must also have a default implementation for everybody else, make the remainder of the code into a weak function. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Bo Shen voice.s...@atmel.com Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c| 11 +-- drivers/video/atmel_lcdfb.c | 9 + 2 files changed, 10 insertions(+), 10 deletions(-) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/13] lcd: move platform specific structs to their own headers
Hi Nikita, On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: common/lcd code is full of platform specific code and definitions, which ideally should reside with the respective driver code. Take a step towards that goal by moving platform specific structs from lcd.h to their own header files. The structs for the generic case (the #else for all the platform specific cases) is retained in lcd.h as the default case. platform-specific (i.e. add a hypen) Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Bo Shen voice.s...@atmel.com Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- include/atmel_lcd.h | 38 ++ include/exynos_lcd.h | 81 + include/lcd.h| 201 ++- include/mpc823_lcd.h | 43 +++ include/pxa_lcd.h| 80 5 files changed, 247 insertions(+), 196 deletions(-) create mode 100644 include/atmel_lcd.h create mode 100644 include/exynos_lcd.h create mode 100644 include/mpc823_lcd.h create mode 100644 include/pxa_lcd.h Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 06/13] lcd: mpc823: move mpc823 specific lcd_logo_set_cmap code to mpc8xx_lcd.c
On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: Reduce the bitmap_plot #ifdef complexity by extracting MPC823 specific code for setting cmap into its own implementation of lcd_logo_set_cmap(), implemented in mpc8xx_lcd.c. In the MPC823 implementation, ARRAY_SIZE(bmp_logo_palette) is switched for BMP_LOGO_COLORS to avoid having to include bmp_logo_data.h, which would cause a compilation error because the logo data and palette arrays would be defined twice. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c | 10 +- drivers/video/mpc8xx_lcd.c | 15 +++ 2 files changed, 16 insertions(+), 9 deletions(-) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 09/13] lcd: remove unused includes
On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: Remove unused includes. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Bo Shen voice.s...@atmel.com Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c | 18 -- 1 file changed, 18 deletions(-) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 05/13] lcd: atmel: introduce lcd_logo_set_cmap
On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: Reduce the bitmap_plot #ifdef complexity by extracting Atmel specific code for setting cmap into a new function lcd_logo_set_cmap(), which is implemented in atmel_lcdfb driver and defined as part of common/lcd.c api with a weak dummy version. In the Atmel implementation, ARRAY_SIZE(bmp_logo_palette) is switched for BMP_LOGO_COLORS to avoid having to include bmp_logo_data.h, which would cause a compilation error because the logo data and palette arrays would be defined twice. This is a step towards cleaning bitmap_plot() of platform specific code. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Bo Shen voice.s...@atmel.com Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c| 29 - drivers/video/atmel_lcdfb.c | 26 ++ 2 files changed, 34 insertions(+), 21 deletions(-) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 04/13] lcd: mpc8xx: move mpc823 specific fb_put_byte to mpc8xx_lcd.c
On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: Reduce the amount of platform dependant code in common/lcd.c by moving MPC823 specific implementation of fb_put_byte() to mpc8xx_lcd.c. Since we must also have a default implementation for everybody else, make the remainder of the code into a weak function. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c | 11 +-- drivers/video/mpc8xx_lcd.c | 7 +++ 2 files changed, 12 insertions(+), 6 deletions(-) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 07/13] lcd: logo: move generic cmap setting to lcd_logo_set_cmap()
On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: Get rid of platform specific #ifdefs in bitmap_plot() by moving the generic case of setting cmap into the weak lcd_logo_set_cmap(). Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Bo Shen voice.s...@atmel.com Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 11/13] lcd: rename bitmap_plot to better represent its functionality
On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: The name bitmap_plot is misleading because it implies that this is a generic function capable of dealing with any bitmap, but its implementation only works with the logo data. Rename the function to better reflect this. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-x86 branch patman
Hi Tom, Some old patches I lost, plus a few new ones. Note this is branch 'patman'. The following changes since commit 2af13d6b6265a6700c4f65597410b769895024bf: lcd: fix console address is not initialized (2015-01-28 16:58:02 -0500) are available in the git repository at: http://git.denx.de/u-boot-x86.git for you to fetch changes up to 3d4de98696d2d906c968008219bb9a65960e7c10: patman: Explain how to make doc/git-mailrc work (2015-01-30 15:55:30 -0700) Peter Tyser (1): patman: Make dry-run output match real functionality Scott Wood (1): patman: Check commit_match before stripping leading whitespace Simon Glass (4): sandbox: Correct cros-ec keyboard definition sandbox: Add a -D option to use a default device tree sandbox: Fix README to indicate that vendor name is unset patman: Explain how to make doc/git-mailrc work arch/sandbox/cpu/start.c | 20 arch/sandbox/dts/sandbox.dts | 6 ++ board/sandbox/README.sandbox | 4 ++-- tools/patman/README | 13 - tools/patman/gitutil.py | 3 ++- tools/patman/patchstream.py | 4 +++- tools/patman/series.py | 21 - 7 files changed, 45 insertions(+), 26 deletions(-) Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 12/13] lcd: dt: extract simplefb support
On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: We now have api functions that can support compiling simplefb code as its own module. Since this code is not part of the display functionality, extract it to its own file. Raspberry Pi config file is updated to compile the new file. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de Cc: Stephen Warren swar...@wwwdotorg.org Reviewed-by: Simon Glass s...@chromium.org Could even go in fdtdec.c if you like. --- board/raspberrypi/rpi/rpi.c | 1 + common/Makefile | 1 + common/lcd.c| 50 -- common/lcd_simplefb.c | 59 + include/fdt_simplefb.h | 14 +++ include/lcd.h | 3 --- 6 files changed, 75 insertions(+), 53 deletions(-) create mode 100644 common/lcd_simplefb.c create mode 100644 include/fdt_simplefb.h ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 13/13] lcd: split splash code into its own function
Hi Nikita, On 29 January 2015 at 04:21, Nikita Kiryanov nik...@compulab.co.il wrote: lcd_logo() currently performs tasks well beyond just displaying the logo. It has code which displays splash image, it has logic which determines when the different display features are displayed, and it is coupled with the lcd console because it holds the responsibility of returning the lcd console base address. Make lcd_logo() just about the logo by: * Moving splash image display code into a dedicated function * Moving the logic regarding when various features are displayed to lcd_clear() (which is arguably not the correct name for housing such code either, but it is currently the most fitting location code wise) * Move the responsibility of setting the console base address to lcd_clear() too. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Bo Shen voice.s...@atmel.com Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c | 52 ++-- common/splash.c | 16 include/splash.h | 11 ++- 3 files changed, 48 insertions(+), 31 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index d0c0aff..f33942c 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -46,7 +46,7 @@ DECLARE_GLOBAL_DATA_PTR; static int lcd_init(void *lcdbase); -static void *lcd_logo(void); +static void lcd_logo(void); static void lcd_setfgcolor(int color); static void lcd_setbgcolor(int color); @@ -169,6 +169,9 @@ void lcd_clear(void) { short console_rows, console_cols; int bg_color; + char *s; + ulong addr; + static int do_splash = 1; #if LCD_BPP == LCD_COLOR8 /* Setting the palette */ lcd_setcolreg(CONSOLE_COLOR_BLACK, 0, 0, 0); @@ -218,7 +221,23 @@ void lcd_clear(void) #endif console_cols = panel_info.vl_col / VIDEO_FONT_WIDTH; lcd_init_console(lcd_base, console_rows, console_cols); - lcd_init_console(lcd_logo(), console_rows, console_cols); + if (do_splash) { + s = getenv(splashimage); + if (s) { + do_splash = 0; + addr = simple_strtoul(s, NULL, 16); + if (lcd_splash(addr) == 0) { + lcd_sync(); + return; + } + } + } + + lcd_logo(); +#if defined(CONFIG_LCD_LOGO) !defined(CONFIG_LCD_INFO_BELOW_LOGO) + addr = (ulong)lcd_base + BMP_LOGO_HEIGHT * lcd_line_length; + lcd_init_console((void *)addr, console_rows, console_cols); I'm just a bit unsure about this - before this function was always called. I have some idea but can you explain why it is now in an #ifidef? +#endif lcd_sync(); } @@ -701,29 +720,8 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) } #endif -static void *lcd_logo(void) +static void lcd_logo(void) { -#ifdef CONFIG_SPLASH_SCREEN - char *s; - ulong addr; - static int do_splash = 1; - - if (do_splash (s = getenv(splashimage)) != NULL) { - int x = 0, y = 0; - do_splash = 0; - - if (splash_screen_prepare()) - return (void *)lcd_base; - - addr = simple_strtoul (s, NULL, 16); - - splash_get_pos(x, y); - - if (bmp_display(addr, x, y) == 0) - return (void *)lcd_base; - } -#endif /* CONFIG_SPLASH_SCREEN */ - lcd_logo_plot(0, 0); #ifdef CONFIG_LCD_INFO @@ -731,12 +729,6 @@ static void *lcd_logo(void) lcd_set_row(LCD_INFO_Y / VIDEO_FONT_HEIGHT); lcd_show_board_info(); #endif /* CONFIG_LCD_INFO */ - -#if defined(CONFIG_LCD_LOGO) !defined(CONFIG_LCD_INFO_BELOW_LOGO) - return (void *)((ulong)lcd_base + BMP_LOGO_HEIGHT * lcd_line_length); -#else - return (void *)lcd_base; -#endif /* CONFIG_LCD_LOGO !defined(CONFIG_LCD_INFO_BELOW_LOGO) */ } #ifdef CONFIG_SPLASHIMAGE_GUARD diff --git a/common/splash.c b/common/splash.c index 144fb10..561d35b 100644 --- a/common/splash.c +++ b/common/splash.c @@ -22,6 +22,7 @@ #include common.h #include splash.h +#include lcd.h __weak int splash_screen_prepare(void) { @@ -50,3 +51,18 @@ void splash_get_pos(int *x, int *y) } } #endif /* CONFIG_SPLASH_SCREEN_ALIGN */ + +#if defined(CONFIG_SPLASH_SCREEN) defined(CONFIG_LCD) +int lcd_splash(ulong addr) +{ + int x = 0, y = 0, ret; + + ret = splash_screen_prepare(); + if (ret) + return ret; + + splash_get_pos(x, y); + + return bmp_display(addr, x, y); +} +#endif diff --git a/include/splash.h b/include/splash.h index 89ee7b2..4dbf754 100644 --- a/include/splash.h +++ b/include/splash.h @@ -21,7 +21,7 @@ #ifndef _SPLASH_H_ #define _SPLASH_H_
[U-Boot] Imx6 u-boot clock frequency and wrong lpj in the kernel
Dear colleagues, I faced a problem lately with the udelay function in the Linux kernel. udelay uses loops_per_jiffy constant for its loops. lpj is calculated during the init phase of the kernel, and then the calibrate function is removed. The boot loader uses 792MHz and when the kernel comes up dvfs framework adjusts the frequency to 1GHz, too late, and then the system keeps using lpj that was calculated at 792MHz. Ideally we need to get the uboot to clock the imx6 at 1GHz. Is there any special reason that u-boot does not pumps the clock up? Is there any patch out there that enables u-boot to start at 1GHz? Thank you Andy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 17/17] sunxi: Hookup OTG USB controller support
On Sun, 11 Jan 2015 20:34:55 +0100 Hans de Goede hdego...@redhat.com wrote: Hookup OTG USB controller support and enable the otg controller + USB-keyb on various tablets. This allows tablet owners to interact with u-boot without needing to solder a serial console onto their tablet PCB. Thanks. Works great on my Primo73 and Primo81 tablets. However I have just one naive question before happily taking it into use by default. Is the hardcoded otg host mode (without checking the id pin) always safe? For example, what happens if somebody connects a charger instead of a usb keyboard to the tablet? -- Best regards, Siarhei Siamashka ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH RFT v2] gpio: at91: Fix getting address of private data
Use dev_get_priv() rather than dev_get_platdata() to get correct address of private data. Signed-off-by: Axel Lin axel@ingics.com --- v2: Fix an obvious typo in subject line (s/addres/address). drivers/gpio/at91_gpio.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c index 6129c02..22fbd63 100644 --- a/drivers/gpio/at91_gpio.c +++ b/drivers/gpio/at91_gpio.c @@ -451,7 +451,7 @@ struct at91_port_priv { /* set GPIO pin 'gpio' as an input */ static int at91_gpio_direction_input(struct udevice *dev, unsigned offset) { - struct at91_port_priv *port = dev_get_platdata(dev); + struct at91_port_priv *port = dev_get_priv(dev); at91_set_port_input(port-regs, offset, 0); @@ -462,7 +462,7 @@ static int at91_gpio_direction_input(struct udevice *dev, unsigned offset) static int at91_gpio_direction_output(struct udevice *dev, unsigned offset, int value) { - struct at91_port_priv *port = dev_get_platdata(dev); + struct at91_port_priv *port = dev_get_priv(dev); at91_set_port_output(port-regs, offset, value); @@ -472,7 +472,7 @@ static int at91_gpio_direction_output(struct udevice *dev, unsigned offset, /* read GPIO IN value of pin 'gpio' */ static int at91_gpio_get_value(struct udevice *dev, unsigned offset) { - struct at91_port_priv *port = dev_get_platdata(dev); + struct at91_port_priv *port = dev_get_priv(dev); return at91_get_port_value(port-regs, offset); } @@ -481,7 +481,7 @@ static int at91_gpio_get_value(struct udevice *dev, unsigned offset) static int at91_gpio_set_value(struct udevice *dev, unsigned offset, int value) { - struct at91_port_priv *port = dev_get_platdata(dev); + struct at91_port_priv *port = dev_get_priv(dev); at91_set_port_value(port-regs, offset, value); @@ -490,7 +490,7 @@ static int at91_gpio_set_value(struct udevice *dev, unsigned offset, static int at91_gpio_get_function(struct udevice *dev, unsigned offset) { - struct at91_port_priv *port = dev_get_platdata(dev); + struct at91_port_priv *port = dev_get_priv(dev); /* GPIOF_FUNC is not implemented yet */ if (at91_get_port_output(port-regs, offset)) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH RFT] gpio: at91: Fix getting addres of private data
Use dev_get_priv() rather than dev_get_platdata() to get correct address of private data. Signed-off-by: Axel Lin axel@ingics.com --- Hi Simon, I don't have this h/w, so please test if you think this patch is ok. Thanks, Axel drivers/gpio/at91_gpio.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c index 6129c02..22fbd63 100644 --- a/drivers/gpio/at91_gpio.c +++ b/drivers/gpio/at91_gpio.c @@ -451,7 +451,7 @@ struct at91_port_priv { /* set GPIO pin 'gpio' as an input */ static int at91_gpio_direction_input(struct udevice *dev, unsigned offset) { - struct at91_port_priv *port = dev_get_platdata(dev); + struct at91_port_priv *port = dev_get_priv(dev); at91_set_port_input(port-regs, offset, 0); @@ -462,7 +462,7 @@ static int at91_gpio_direction_input(struct udevice *dev, unsigned offset) static int at91_gpio_direction_output(struct udevice *dev, unsigned offset, int value) { - struct at91_port_priv *port = dev_get_platdata(dev); + struct at91_port_priv *port = dev_get_priv(dev); at91_set_port_output(port-regs, offset, value); @@ -472,7 +472,7 @@ static int at91_gpio_direction_output(struct udevice *dev, unsigned offset, /* read GPIO IN value of pin 'gpio' */ static int at91_gpio_get_value(struct udevice *dev, unsigned offset) { - struct at91_port_priv *port = dev_get_platdata(dev); + struct at91_port_priv *port = dev_get_priv(dev); return at91_get_port_value(port-regs, offset); } @@ -481,7 +481,7 @@ static int at91_gpio_get_value(struct udevice *dev, unsigned offset) static int at91_gpio_set_value(struct udevice *dev, unsigned offset, int value) { - struct at91_port_priv *port = dev_get_platdata(dev); + struct at91_port_priv *port = dev_get_priv(dev); at91_set_port_value(port-regs, offset, value); @@ -490,7 +490,7 @@ static int at91_gpio_set_value(struct udevice *dev, unsigned offset, static int at91_gpio_get_function(struct udevice *dev, unsigned offset) { - struct at91_port_priv *port = dev_get_platdata(dev); + struct at91_port_priv *port = dev_get_priv(dev); /* GPIOF_FUNC is not implemented yet */ if (at91_get_port_output(port-regs, offset)) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 21/21] board/BuR/kwb: Support modify bootcmd through reset-controller
For some cases it is necessary to modify temporaly the bootcommand. This can be done by writing into the Scratchregister a specific value: * 0xCC - modify bootcmd run netboot * 0xCD - modify bootcmd run netscript * 0xCE - modify bootcmd run mmcboot the environment in flash is NOT overwritten. Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- board/BuR/kwb/board.c | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/board/BuR/kwb/board.c b/board/BuR/kwb/board.c index 455f472..892311e 100644 --- a/board/BuR/kwb/board.c +++ b/board/BuR/kwb/board.c @@ -169,10 +169,18 @@ int board_late_init(void) const unsigned int toff = 1000; unsigned int cnt = 3; unsigned short buf = 0x; + unsigned char scratchreg = 0; unsigned int oldspeed; - tps65217_reg_write(TPS65217_PROT_LEVEL_NONE, - TPS65217_WLEDCTRL2, 0x32, 0xFF); /* 50% dimlevel */ + /* try to read out some boot-instruction from resetcontroller */ + oldspeed = i2c_get_bus_speed(); + if (i2c_set_bus_speed(CONFIG_SYS_OMAP24_I2C_SPEED_PSOC) = 0) { + i2c_read(RSTCTRL_ADDR, RSTCTRL_SCRATCHREG, 1, +scratchreg, sizeof(scratchreg)); + i2c_set_bus_speed(oldspeed); + } else { + puts(ERROR: i2c_set_bus_speed failed! (scratchregister)\n); + } if (gpio_get_value(ESC_KEY)) { do { @@ -223,6 +231,24 @@ int board_late_init(void) break; } } while (cnt); + } else if (scratchreg == 0xCC) { + lcd_position_cursor(1, 8); + lcd_puts( + starting vxworks from network ... ); + setenv(bootcmd, run netboot); + cnt = 4; + } else if (scratchreg == 0xCD) { + lcd_position_cursor(1, 8); + lcd_puts( + starting script from network ... ); + setenv(bootcmd, run netscript); + cnt = 4; + } else if (scratchreg == 0xCE) { + lcd_position_cursor(1, 8); + lcd_puts( + starting AR from eMMC ... ); + setenv(bootcmd, run mmcboot); + cnt = 4; } lcd_position_cursor(1, 8); -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v1, 3/6] omap3: add SDRC settings for Samsung K4X51163PG
On Fri, Jan 16, 2015 at 09:09:49AM +0100, Albert ARIBAUD (3ADEV) wrote: Signed-off-by: Albert ARIBAUD (3ADEV) albert.arib...@3adev.fr Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 13/21] board/BuR/common: Enable CONFIG_CMD_TIME
time measurement of u-boot commands is needed very often during development. We add this feature until development is completed. Maybe forever :) Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- include/configs/bur_am335x_common.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h index d7ea1c9..cd15c6c 100644 --- a/include/configs/bur_am335x_common.h +++ b/include/configs/bur_am335x_common.h @@ -29,6 +29,7 @@ run netdisplay0; \ setenv stdout nc;setenv stdin nc;setenv stderr nc\0 +#define CONFIG_CMD_TIME #define CONFIG_SYS_GENERIC_BOARD #define CONFIG_AM33XX -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] fastboot: add fastboot oem command support
On Thu, Jan 29, 2015 at 2:30 AM, Lukasz Majewski l.majew...@samsung.com wrote: Hi Rob, From: Michael Scott michael.sc...@linaro.org Add code stub to handle fastboot oem __ command. As unlock is a common fastboot command, distinguish that it is not implemented. Signed-off-by: Michael Scott michael.sc...@linaro.org Signed-off-by: Rob Herring r...@kernel.org --- drivers/usb/gadget/f_fastboot.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 310175a..e2fda86 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -513,6 +513,17 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) } #endif +static void cb_oem(struct usb_ep *ep, struct usb_request *req) +{ + char *cmd = req-buf; + if (strncmp(unlock, cmd + 4, 8) == 0) { + fastboot_tx_write_str(FAILnot implemented); + } + else { + fastboot_tx_write_str(FAILunknown oem command); + } Just a minor comment - those braces could be removed. When the format command is added in the next patch, then they need to be added back if you want all clauses to be the same (braces or not). Rob BTW: Marek shall I take those patches to dfu tree or would you take them to -usb tree ? +} + struct cmd_dispatch_info { char *cmd; void (*cb)(struct usb_ep *ep, struct usb_request *req); @@ -541,6 +552,10 @@ static const struct cmd_dispatch_info cmd_dispatch_info[] = { .cb = cb_flash, }, #endif + { + .cmd = oem, + .cb = cb_oem, + }, }; static void rx_handler_command(struct usb_ep *ep, struct usb_request *req) -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v1, 5/6] omap3: add some MUX definitions for upcoming cairo
On Fri, Jan 16, 2015 at 09:09:51AM +0100, Albert ARIBAUD (3ADEV) wrote: Signed-off-by: Albert ARIBAUD (3ADEV) albert.arib...@3adev.fr Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v1, 2/6] omap3: make SDRC SHARING setting configurable
On Fri, Jan 16, 2015 at 09:09:48AM +0100, Albert ARIBAUD (3ADEV) wrote: Signed-off-by: Albert ARIBAUD (3ADEV) albert.arib...@3adev.fr Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-ti/master
Ahoy! The following changes since commit 2af13d6b6265a6700c4f65597410b769895024bf: lcd: fix console address is not initialized (2015-01-28 16:58:02 -0500) are available in the git repository at: git://git.denx.de/u-boot-ti master for you to fetch changes up to f3b4bc458de3285a04c5f60df6372ad5ca79fa60: OMAP3: igep00x0: Fix boot hang and add support for status LED. (2015-01-29 12:00:50 -0500) Albert ARIBAUD \(3ADEV\) (5): omap3: enable GP9 timer and UART2 omap3: make SDRC SHARING setting configurable omap3: add SDRC settings for Samsung K4X51163PG omap3: mmc: add 1.8v bias setting for MMC1 omap3: add some MUX definitions for upcoming cairo Enric Balletbo i Serra (1): OMAP3: igep00x0: Fix boot hang and add support for status LED. Lubomir Popov (1): ARM: OMAP5: DRA7xx: Add support for power rail grouping Pali Rohár (1): Nokia RX-51: Use generic board Tom Rini (2): am335x_evm: Enable CONFIG_NAND_OMAP_GPMC_PREFETCH davinci: Do not duplicate setting of gd arch/arm/cpu/arm926ejs/davinci/spl.c | 17 + arch/arm/cpu/armv7/omap-common/clocks-common.c | 83 ++-- arch/arm/cpu/armv7/omap3/clock.c |9 +++ arch/arm/cpu/armv7/omap3/sdrc.c|6 +- arch/arm/cpu/armv7/omap5/hw_data.c | 43 ++-- arch/arm/include/asm/arch-omap3/mem.h | 43 arch/arm/include/asm/arch-omap3/mmc_host_def.h |1 + arch/arm/include/asm/arch-omap3/mux.h | 51 ++- arch/arm/include/asm/arch-omap3/sys_proto.h|1 + arch/arm/include/asm/arch-omap5/clock.h| 20 +- board/isee/igep00x0/igep00x0.c | 18 ++--- board/isee/igep00x0/igep00x0.h |8 --- drivers/mmc/omap_hsmmc.c |4 ++ include/configs/am335x_evm.h |1 + include/configs/nokia_rx51.h |1 + include/configs/omap3_igep00x0.h | 18 +++-- 16 files changed, 252 insertions(+), 72 deletions(-) -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot,v1,1/6] omap3: enable GP9 timer and UART2
On Fri, Jan 16, 2015 at 09:09:47AM +0100, Albert ARIBAUD (3ADEV) wrote: These are needed for the upcoming Cairo board support. Signed-off-by: Albert ARIBAUD (3ADEV) albert.arib...@3adev.fr Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v1, 4/6] omap3: mmc: add 1.8v bias setting for MMC1
On Fri, Jan 16, 2015 at 09:09:50AM +0100, Albert ARIBAUD (3ADEV) wrote: Signed-off-by: Albert ARIBAUD (3ADEV) albert.arib...@3adev.fr Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] OMAP3: igep00x0: Fix boot hang and add support for status LED.
On Wed, Jan 28, 2015 at 03:01:32PM +0100, Enric Balletbò i Serra wrote: From: Enric Balletbo i Serra enric.balle...@collabora.com Use the STATUS_LED APIs for indicating a boot progress instead of show_boot_progress. This patch also fixes a problem introduced with commit b3f4ca1135 (dm: omap3: Move to driver model for GPIO and serial). After that commit the board doesn't boot. Looks like the problem is the gpio_request call inside the function show_boot_progress. Signed-off-by: Enric Balletbo i Serra enric.balle...@collabora.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 1/1] fastboot: oem format command implementation
Hi Dileep, This is the Modified version of http://patchwork.ozlabs.org/patch/388084/ - As flash support is already in mainline, it is removed - 'oem' command support is present - 'oem format' command is implemented - Handled review comments of the original patch Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- common/cmd_fastboot.c | 4 + common/cmd_mmc.c| 2 +- disk/Makefile | 1 + disk/part_fastboot.c| 363 doc/README.android-fastboot | 5 +- drivers/usb/gadget/f_fastboot.c | 85 ++ include/usb/fastboot.h | 108 7 files changed, 564 insertions(+), 4 deletions(-) create mode 100644 disk/part_fastboot.c create mode 100644 include/usb/fastboot.h diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index b72f4f3..efdf461 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,12 +10,16 @@ #include common.h #include command.h #include g_dnl.h +#include usb/fastboot.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; g_dnl_clear_detach(); +#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV + board_partition_init(); +#endif ret = g_dnl_register(usb_dnl_fastboot); if (ret) return ret; diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index 4e28c9d..0ce747b 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -809,7 +809,7 @@ static cmd_tbl_t cmd_mmc[] = { U_BOOT_CMD_MKENT(setdsr, 2, 0, do_mmc_setdsr, , ), }; -static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { cmd_tbl_t *cp; diff --git a/disk/Makefile b/disk/Makefile index 6970cec..4969656 100644 --- a/disk/Makefile +++ b/disk/Makefile @@ -13,3 +13,4 @@ obj-$(CONFIG_DOS_PARTITION) += part_dos.o obj-$(CONFIG_ISO_PARTITION) += part_iso.o obj-$(CONFIG_AMIGA_PARTITION) += part_amiga.o obj-$(CONFIG_EFI_PARTITION) += part_efi.o +obj-$(CONFIG_FASTBOOT_FLASH_MMC_DEV) +=part_fastboot.o diff --git a/disk/part_fastboot.c b/disk/part_fastboot.c new file mode 100644 index 000..adf37af --- /dev/null +++ b/disk/part_fastboot.c @@ -0,0 +1,363 @@ +/* + * Copyright (C) 2013 Texas Instruments + * + * Author : Pankaj Bharadiya pankaj.bharad...@ti.com + * + * Tom Rix tom@windriver.com and Sitara 2011 u-boot by + * Mohammed Afzal M A af...@ti.com + * + * Copyright (C) 2008 The Android Open Source Project + * All rights reserved. + * + * Copyright 2014 Linaro, Ltd. + * Dileep Katta dileep.ka...@linaro.org + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include common.h +#include command.h +#include usb/fastboot.h +#include linux/usb/ch9.h +#include linux/usb/gadget.h +#include environment.h +#include mmc.h +#include dfu.h +#include asm/arch/mmc_host_def.h + +#define EFI_VERSION 0x0001 +#define EFI_ENTRIES 128 +#define EFI_NAMELEN 36 + +struct partition_emmc { + const char *name; + unsigned size_kb; +}; + +/* eMMC partition layout (All sizes are in kB) + * Modify the below partition table to change the GPT configuration. + * The entry for each partition can be modified as per the requirement. + */ +static struct partition_emmc partitions[] = { Defining mmc partitions as a static struct in the code IMHO is not flexible. + { -, 128 }, /* Master Boot Record and GUID Partition Table */ + { spl, 128 }, /* First stage bootloader */ + { bootloader, 512 }, /* Second stage bootloader */ + { misc, 128 },/* Rserved for internal purpose */ + { -, 128 }, /* Reserved */ + { recovery, 8*1024 }, /* Recovery partition */ + { boot, 8*1024 }, /* Partition contains kernel + ramdisk images */ + { system, 256*1024 }, /* Android file system */ + { cache, 256*1024 }, /* Store Application Cache */ + { userdata, 256*1024 }, /* User data */ + { media, 0 }, /* Media files */ + { 0, 0 }, +}; Maybe it would be better if we could reuse $partitions ? With above code we introduce another (not compatible and flexible) way to specify eMMC partitions for the board. + + +static const u8 partition_type[16] = { + 0xa2, 0xa0, 0xd0, 0xeb, 0xe5, 0xb9, 0x33, 0x44, + 0x87, 0xc0, 0x68, 0xb6, 0xb7, 0x26, 0x99, 0xc7, +}; + Please look into ./include/part_efi.h [1] +static const u8 random_uuid[16] = { + 0xff, 0x1f, 0xf2, 0xf9, 0xd4, 0xa8, 0x0e, 0x5f, + 0x97, 0x46, 0x59, 0x48, 0x69, 0xae, 0xc3, 0x4e, +}; I'm not sure if specifying random uuids via static const table is what you wanted. For more flexible solution please refer to Trats2 automatic generation of UUIDs (either from HW or in SW). + +struct efi_entry { + u8 type_uuid[16]; +
Re: [U-Boot] [PATCH] fastboot: Add USB cable detect check
On Thu, Jan 29, 2015 at 4:49 PM, Steve Rae s...@broadcom.com wrote: On 15-01-26 01:14 PM, Rob Herring wrote: Add a check for USB cable attached and only enter fastboot when a cable is attached. Signed-off-by: Rob Herring r...@kernel.org --- common/cmd_fastboot.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index b72f4f3..346ab80 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -20,6 +20,12 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) if (ret) return ret; + if (!g_dnl_board_usb_cable_connected()) { + puts(\rUSB cable not detected.\n \ +Command exit.\n); + return CMD_RET_FAILURE; + } + while (1) { if (g_dnl_detach()) break; (question: the leading \r ?!?!) Humm, good question. It's copy and paste from USB MS implementation. Rob Reviewed-by: Steve Rae s...@broadcom.com Thanks, Steve ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 16/21] board/BuR/tseries: cosmetic changes
remove unnary '#define ETHLED_ORANGE (96+16) /* GPIO3_16 */' Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- board/BuR/tseries/board.c |2 -- 1 file changed, 2 deletions(-) diff --git a/board/BuR/tseries/board.c b/board/BuR/tseries/board.c index a1c6887..9402aa4 100644 --- a/board/BuR/tseries/board.c +++ b/board/BuR/tseries/board.c @@ -34,10 +34,8 @@ DECLARE_GLOBAL_DATA_PTR; /* --*/ /* -- defines for GPIO -- */ -#defineETHLED_ORANGE (96+16) /* GPIO3_16 */ #defineREPSWITCH (0+20) /* GPIO0_20 */ - #if defined(CONFIG_SPL_BUILD) /* TODO: check ram-timing ! */ static const struct ddr_data ddr3_data = { -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 20/21] board/BuR/kwb: Form a bootline for vxWorks
vxWorks needs several parameters which are set by the bootloader und his environment. So we form a vxWorks bootline and pass the result to vxWorks on a predefined address. Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- board/BuR/kwb/board.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/board/BuR/kwb/board.c b/board/BuR/kwb/board.c index 30900bc..455f472 100644 --- a/board/BuR/kwb/board.c +++ b/board/BuR/kwb/board.c @@ -47,6 +47,12 @@ #defineRSTCTRL_FORCE_PWR_NEN 0x0404 #defineRSTCTRL_CAN_STB 0x4040 +#define VXWORKS_BOOTLINE 0x80001100 +#define DEFAULT_BOOTLINE cpsw(0,0):pme/vxWorks +#define VXWORKS_USER u=vxWorksFTP pw=vxWorks tn=vxtarget + +DECLARE_GLOBAL_DATA_PTR; + #if defined(CONFIG_SPL_BUILD) /* TODO: check ram-timing ! */ static const struct ddr_data ddr3_data = { @@ -248,6 +254,30 @@ int board_late_init(void) } else { puts(ERROR: i2c_set_bus_speed failed! (scratchregister)\n); } + /* setup vxworks bootline */ + char *vxworksbootline = (char *)VXWORKS_BOOTLINE; + + /* setup default IP, in case if there is nothing in environment */ + if (!getenv(ipaddr)) { + setenv(ipaddr, 192.168.60.1); + setenv(netmask, 255.255.255.0); + setenv(serverip, 192.168.60.254); + setenv(gatewayip, 192.168.60.254); + puts(net: had no IP! made default setup.\n); + } + + sprintf(vxworksbootline, + %s h=%s e=%s:%s g=%s %s o=0x%08x;0x%08x;0x%08x;0x%08x, + DEFAULT_BOOTLINE, + getenv(serverip), + getenv(ipaddr), getenv(netmask), + getenv(gatewayip), + VXWORKS_USER, + (unsigned int) gd-fb_base-0x20, + (u32)getenv_ulong(vx_memtop, 16, gd-fb_base-0x20), + (u32)getenv_ulong(vx_romfsbase, 16, 0), + (u32)getenv_ulong(vx_romfssize, 16, 0)); + /* * reset VBAR registers to its reset location, VxWorks 6.9.3.2 does * expect that vectors are there, original u-boot moves them to _start -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 19/21] board/BuR/kwb: Redesign default-environment
Due to several changes in the boot-process we do a complete redesign of the default environment. Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- include/configs/kwb.h | 81 +++-- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/include/configs/kwb.h b/include/configs/kwb.h index 7989f4b..dd30df2 100644 --- a/include/configs/kwb.h +++ b/include/configs/kwb.h @@ -43,49 +43,58 @@ #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */ #define CONFIG_SPL_MMC_SUPPORT -#undef CONFIG_SPL_OS_BOOT -#ifdef CONFIG_SPL_OS_BOOT -#define CONFIG_SYS_SPL_ARGS_ADDR 0x80F8 - -/* RAW SD card / eMMC */ -#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR0x900 /* address 0x12 */ -#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x80/* address 0x1 */ -#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0x80/* 64KiB */ - -#endif /* CONFIG_SPL_OS_BOOT */ - -/* Always 128 KiB env size */ -#define CONFIG_ENV_SIZE(128 10) +/* Always 64 KiB env size */ +#define CONFIG_ENV_SIZE(64 10) #ifndef CONFIG_SPL_BUILD #define CONFIG_EXTRA_ENV_SETTINGS \ - autoload=0\0 \ - loadaddr=0x8010\0 \ - bootfile=arimg\0 \ - usbboot=echo Booting from USB-Stick ...; \ - usb start; \ - fatload usb 0 ${loadaddr} ${bootfile}; \ - usb stop; \ - go ${loadaddr};\0 \ - netboot=echo Booting from network ...; \ - setenv autoload 0; \ - dhcp; \ - tftp ${loadaddr} arimg; \ - go ${loadaddr}\0 \ - usbupdate=echo Updating UBOOT from USB-Stick ...; \ - usb start; \ - fatload usb 0 0x8000 updateubootusb.img; \ - source;\0 \ - netupdate=echo Updating UBOOT from Network (TFTP) ...; \ - setenv autoload 0; \ - dhcp; \ - tftp 0x8000 updateUBOOT.img; \ - source;\0 +BUR_COMMON_ENV \ +vx_romfsbase=0x800E\0 \ +vx_romfssize=0x2\0 \ +vx_memtop=0x8FBEF000\0 \ +loadromfs=mmc read ${vx_romfsbase} 700 100\0 \ +autoload=0\0 \ +loadaddr=0x8010\0 \ +logoaddr=0x8200\0 \ +defaultARlen=0x8000\0 \ +loaddefaultAR=mmc read ${loadaddr} 800 ${defaultARlen}\0 \ +defaultAR=run loadromfs; run loaddefaultAR; go ${loadaddr}\0 \ +logo0=fatload mmc 0:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz \ + bmp display ${logoaddr} 0 0\0 \ +logo1=fatload mmc 0:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz \ + bmp display ${logoaddr} 0 0\0 \ +mmcboot=echo booting AR from eMMC-flash ...; \ + run logo0 || run logo1; \ + run loadromfs; \ + fatload mmc 0:1 ${loadaddr} arimg go ${loadaddr}; \ + run defaultAR;\0 \ +netboot=echo booting AR from network ...; \ + run loadromfs; \ + tftp ${loadaddr} arimg go ${loadaddr}; \ + puts 'networkboot failed!';\0 \ +usbupdate=echo updating u-boot from usb ...; \ + usb start; \ + fatload usb 0 0x8000 updateubootusb.img source; \ + puts 'usbupdate failed!'\0 \ +netscript=echo running script from network (tftp) ...; \ + tftp 0x8000 netscript.img source; \ + puts 'netscript load failed!'\0 \ +netupdate=tftp ${loadddr} MLO mmc write ${loadaddr} 100 100; \ + tftp ${loadaddr} u-boot.img mmc write ${loadaddr} 300 300\0 \ +netupdatedefaultAR=echo updating defaultAR from network (tftp) ...; \ + if tftp 0x8010 arimg.bin; \ + then mmc write 0x8010 800 ${defaultARlen}; \ + else setcurs 1 8; puts 'defAR update failed (tftp)!'; fi;\0 \ +netupdateROMFS=echo updating romfs from network (tftp) ...; \ + if tftp 0x8010 romfs.bin; \ + then mmc write 0x8010 700 100; \ + else setcurs 1 8; puts 'romfs update failed (tftp)!'; fi;\0 + #endif /* !CONFIG_SPL_BUILD*/ #define CONFIG_BOOTCOMMAND \ run usbupdate; -#define CONFIG_BOOTDELAY 1 /* TODO: für release auf 0 setzen */ +#define CONFIG_BOOTDELAY 0 /* undefine command which we not need here */ #undef CONFIG_BOOTM_NETBSD -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] am335x_evm: Enable CONFIG_NAND_OMAP_GPMC_PREFETCH
On Tue, Jan 13, 2015 at 04:42:53PM -0500, Tom Rini wrote: Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Nokia RX-51: Use generic board
On Thu, Jan 15, 2015 at 10:26:36AM +0100, Pali Rohár wrote: Generic board with #define CONFIG_SYS_GENERIC_BOARD is working fine. There is no visible difference between legacy and generic board code. Signed-off-by: Pali Rohár pali.ro...@gmail.com Acked-by: Pavel Machek pa...@ucw.cz Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ARM: OMAP5: DRA7xx: Add support for power rail grouping
On Fri, Dec 19, 2014 at 05:34:31PM +0200, Lubomir Popov wrote: On the DRA72x (J6Eco) EVM one PMIC SMPS is powering three SoC core rails. This concept of using one SMPS to supply multiple core domains (in various, although limited combinations, per primary device use case) has now become common and is used by many customer J6/J6Eco designs; it is supported by a number of corresponding PMIC OTP versions. This patch implements correct operation of the core voltages scaling routine by ensuring that each SMPS that is supplying more than one domain shall be written only once, and with the highest voltage of those fused in the SoC (or of those defined in the corresponding header if fuse read is disabled or fails) for the power rails belonging to the group. The patch also replaces some PMIC-related magic numbers with the appropriate definitions. The default OPP_NOM voltages for the DRA7xx SoCs are updated as well, per the latest DMs. Signed-off-by: Lubomir Popov l-po...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot,v2] davinci: Do not duplicate setting of gd
On Thu, Jan 22, 2015 at 09:38:10AM -0500, Tom Rini wrote: In f0c3a6c we stopped setting gd in board_init_f, but later had to revert to due problems on certain platforms. As davinci does not look to have these problems, we can drop the setting here and rely upon crt0.S to do it. Cc: Peter Howard p...@northern-ridge.com.au Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] fastboot: add fastboot oem command support
Hi Rob, On Thu, Jan 29, 2015 at 2:30 AM, Lukasz Majewski l.majew...@samsung.com wrote: Hi Rob, From: Michael Scott michael.sc...@linaro.org Add code stub to handle fastboot oem __ command. As unlock is a common fastboot command, distinguish that it is not implemented. Signed-off-by: Michael Scott michael.sc...@linaro.org Signed-off-by: Rob Herring r...@kernel.org --- drivers/usb/gadget/f_fastboot.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 310175a..e2fda86 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -513,6 +513,17 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) } #endif +static void cb_oem(struct usb_ep *ep, struct usb_request *req) +{ + char *cmd = req-buf; + if (strncmp(unlock, cmd + 4, 8) == 0) { + fastboot_tx_write_str(FAILnot implemented); + } + else { + fastboot_tx_write_str(FAILunknown oem command); + } Just a minor comment - those braces could be removed. When the format command is added in the next patch, then they need to be added back if you want all clauses to be the same (braces or not). Then the patch can stay as it is. Thanks for explanation :-) Rob BTW: Marek shall I take those patches to dfu tree or would you take them to -usb tree ? +} + struct cmd_dispatch_info { char *cmd; void (*cb)(struct usb_ep *ep, struct usb_request *req); @@ -541,6 +552,10 @@ static const struct cmd_dispatch_info cmd_dispatch_info[] = { .cb = cb_flash, }, #endif + { + .cmd = oem, + .cb = cb_oem, + }, }; static void rx_handler_command(struct usb_ep *ep, struct usb_request *req) -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [GIT PULL] u-boot-mips/master
The following changes since commit ab92da9f47d51d363c7de42e2a7bd807e2c1bd54: Merge branch 'master' of git://git.denx.de/u-boot-x86 (2015-01-26 17:44:49 -0500) are available in the git repository at: git://git.denx.de/u-boot-mips.git master for you to fetch changes up to eef88dfb3e16e4631e078f42714dbcef3216e3e1: MIPS: unify CPU code in arch/mips/cpu/ (2015-01-30 14:19:58 +0100) Daniel Schwierzeck (2): MIPS: move au1x00 SoC code to arch/mips/mach-au1x00 MIPS: unify CPU code in arch/mips/cpu/ Paul Burton (15): MIPS: avoid .set ISA for cache operations MIPS: unify cache maintenance functions MIPS: unify cache initialization code MIPS: refactor L1 cache config reads to a macro MIPS: refactor cache loops to a macro MIPS: inline mips_init_[id]cache functions MIPS: allow systems to skip loads during cache init MIPS: clear TagLo select 2 during cache init malta: IDE support malta: delay after reset malta: enable HUSH parser malta: enable ELF loading MIPS: use asm.h macros in mips32 start.S MIPS: handle mips64 relocs in mips32 start.S MIPS: handle mips64 ST0_KX bit in mips32 start.S arch/mips/Kconfig | 6 +++ arch/mips/Makefile | 8 +-- arch/mips/cpu/Makefile | 9 arch/mips/cpu/cpu.c| 38 +++ arch/mips/cpu/{mips64 = }/interrupts.c| 0 arch/mips/cpu/mips32/Makefile | 12 - arch/mips/cpu/mips32/interrupts.c | 22 - arch/mips/cpu/mips32/time.c| 19 arch/mips/cpu/mips64/Makefile | 9 arch/mips/cpu/mips64/cache.S | 213 arch/mips/cpu/mips64/cpu.c | 95 arch/mips/cpu/mips64/start.S | 291 -- arch/mips/cpu/{mips32 = }/start.S | 137 ++-- arch/mips/cpu/{mips64 = }/time.c | 0 arch/mips/include/asm/cacheops.h | 13 + arch/mips/include/asm/malta.h | 5 ++ arch/mips/lib/Makefile | 2 + arch/mips/{cpu/mips32/cpu.c = lib/cache.c}| 75 ++--- arch/mips/{cpu/mips32/cache.S = lib/cache_init.S} | 222 +++- arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/Makefile | 0 arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/au1x00_eth.c | 6 +++ arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/au1x00_ide.c | 0 arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/au1x00_serial.c | 0 arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/au1x00_usb_ohci.c | 0 arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/au1x00_usb_ohci.h | 0 arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/config.mk | 0 board/imgtec/malta/malta.c | 20 include/configs/malta.h| 13 + 28 files changed, 303 insertions(+), 912 deletions(-) create mode 100644 arch/mips/cpu/Makefile create mode 100644 arch/mips/cpu/cpu.c rename arch/mips/cpu/{mips64 = }/interrupts.c (100%) delete mode 100644 arch/mips/cpu/mips32/Makefile delete mode 100644 arch/mips/cpu/mips32/interrupts.c delete mode 100644 arch/mips/cpu/mips32/time.c delete mode 100644 arch/mips/cpu/mips64/Makefile delete mode 100644 arch/mips/cpu/mips64/cache.S delete mode 100644 arch/mips/cpu/mips64/cpu.c delete mode 100644 arch/mips/cpu/mips64/start.S rename arch/mips/cpu/{mips32 = }/start.S (61%) rename arch/mips/cpu/{mips64 = }/time.c (100%) rename arch/mips/{cpu/mips32/cpu.c = lib/cache.c} (55%) rename arch/mips/{cpu/mips32/cache.S = lib/cache_init.S} (59%) rename arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/Makefile (100%) rename arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/au1x00_eth.c (98%) rename arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/au1x00_ide.c (100%) rename arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/au1x00_serial.c (100%) rename arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/au1x00_usb_ohci.c (100%) rename arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/au1x00_usb_ohci.h (100%) rename arch/mips/{cpu/mips32/au1x00 = mach-au1x00}/config.mk (100%)
Re: [U-Boot] Nokia RX-51: Use generic board
On Friday 30 January 2015 15:19:53 Tom Rini wrote: On Thu, Jan 15, 2015 at 10:26:36AM +0100, Pali Rohár wrote: Generic board with #define CONFIG_SYS_GENERIC_BOARD is working fine. There is no visible difference between legacy and generic board code. Signed-off-by: Pali Rohár pali.ro...@gmail.com Acked-by: Pavel Machek pa...@ucw.cz Applied to u-boot-ti/master, thanks! Tom, or anybody else, in future when you are going to change some parts in u-boot and remove boards which do not convert in time... please can you contact me about it (via email, I see that contact info in file board/nokia/rx51/MAINTAINERS is correct)? I'm not following u-boot ML and I really did not know that conversion to generic board code is required before end of last year... Basically Maemo users developers use uboot v2013.04 version and for Nokia N900 there is no new functionality in new uboot versions. So there is nothing like new features fixed bugs motivation. But I do not want to see n900 board code removed from uboot as uboot bootloader is for n900 really useful (most for end-users who does not even know about existence of git, uboot ML, etc). -- Pali Rohár pali.ro...@gmail.com signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] fastboot: add support for oem format command
Hi Rob, Add oem format command to write partition table. This relies on the env variable partitions to contain the list of partitions as required by the gpt command. Note that this does not erase any data other than the partition table. Signed-off-by: Rob Herring r...@kernel.org --- drivers/usb/gadget/f_fastboot.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index e2fda86..f7d84bf 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -516,6 +516,17 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) static void cb_oem(struct usb_ep *ep, struct usb_request *req) { char *cmd = req-buf; +#ifdef CONFIG_FASTBOOT_FLASH + if (strncmp(format, cmd + 4, 6) == 0) { + char cmdbuf[32]; +sprintf(cmdbuf, gpt write mmc %x $partitions, + CONFIG_FASTBOOT_FLASH_MMC_DEV); +if (run_command(cmdbuf, 0)) + fastboot_tx_write_str(FAIL); +else + fastboot_tx_write_str(OKAY); + } else +#endif if (strncmp(unlock, cmd + 4, 8) == 0) { fastboot_tx_write_str(FAILnot implemented); } Applied to u-boot-dfu. Thanks. -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] fastboot: add fastboot oem command support
Hi Rob, From: Michael Scott michael.sc...@linaro.org Add code stub to handle fastboot oem __ command. As unlock is a common fastboot command, distinguish that it is not implemented. Signed-off-by: Michael Scott michael.sc...@linaro.org Signed-off-by: Rob Herring r...@kernel.org --- drivers/usb/gadget/f_fastboot.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 310175a..e2fda86 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -513,6 +513,17 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) } #endif +static void cb_oem(struct usb_ep *ep, struct usb_request *req) +{ + char *cmd = req-buf; + if (strncmp(unlock, cmd + 4, 8) == 0) { + fastboot_tx_write_str(FAILnot implemented); + } + else { + fastboot_tx_write_str(FAILunknown oem command); + } +} + struct cmd_dispatch_info { char *cmd; void (*cb)(struct usb_ep *ep, struct usb_request *req); @@ -541,6 +552,10 @@ static const struct cmd_dispatch_info cmd_dispatch_info[] = { .cb = cb_flash, }, #endif + { + .cmd = oem, + .cb = cb_oem, + }, }; static void rx_handler_command(struct usb_ep *ep, struct usb_request *req) Applied to u-boot-dfu. Thanks. -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] mips
It is so few to support the MIPS architecture,why? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] common: Move dram_init() declaration to common location
Signed-off-by: Michal Simek michal.si...@xilinx.com --- Build tested for Microblaze and x86. Created based on my discussion with Simon. --- arch/arm/include/asm/u-boot-arm.h | 1 - arch/nds32/include/asm/u-boot-nds32.h | 1 - arch/sandbox/include/asm/u-boot-sandbox.h | 1 - arch/x86/include/asm/u-boot-x86.h | 6 -- include/common.h | 1 + 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/arm/include/asm/u-boot-arm.h b/arch/arm/include/asm/u-boot-arm.h index f97f3dd1496a..414042d4039b 100644 --- a/arch/arm/include/asm/u-boot-arm.h +++ b/arch/arm/include/asm/u-boot-arm.h @@ -36,7 +36,6 @@ int arch_early_init_r(void); /* board/.../... */ intboard_init(void); -intdram_init (void); void dram_init_banksize (void); /* cpu/.../interrupt.c */ diff --git a/arch/nds32/include/asm/u-boot-nds32.h b/arch/nds32/include/asm/u-boot-nds32.h index b07908692a92..dee5f43ae155 100644 --- a/arch/nds32/include/asm/u-boot-nds32.h +++ b/arch/nds32/include/asm/u-boot-nds32.h @@ -22,7 +22,6 @@ int cleanup_before_linux(void); /* board/.../... */ intboard_init(void); -intdram_init(void); /* cpu/.../interrupt.c */ void reset_timer_masked(void); diff --git a/arch/sandbox/include/asm/u-boot-sandbox.h b/arch/sandbox/include/asm/u-boot-sandbox.h index d2f1b6566d70..770ab5c9cc07 100644 --- a/arch/sandbox/include/asm/u-boot-sandbox.h +++ b/arch/sandbox/include/asm/u-boot-sandbox.h @@ -17,7 +17,6 @@ /* board/.../... */ int board_init(void); -int dram_init(void); /* start.c */ int sandbox_early_getopt_check(void); diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h index b98afa801d3a..c24846b3ed50 100644 --- a/arch/x86/include/asm/u-boot-x86.h +++ b/arch/x86/include/asm/u-boot-x86.h @@ -26,15 +26,9 @@ unsigned long get_tbclk_mhz(void); void timer_set_base(uint64_t base); int pcat_timer_init(void); -/* Architecture specific DRAM init */ -int dram_init(void); - /* cpu/.../interrupts.c */ int cpu_init_interrupts(void); -/* board/.../... */ -int dram_init(void); - int cleanup_before_linux(void); int x86_cleanup_before_linux(void); void x86_enable_caches(void); diff --git a/include/common.h b/include/common.h index 4b3e0d3bbd75..81edc7d2788c 100644 --- a/include/common.h +++ b/include/common.h @@ -183,6 +183,7 @@ typedef void (interrupt_handler_t)(void *); /* * Function Prototypes */ +int dram_init(void); void hang(void) __attribute__ ((noreturn)); -- 1.8.2.3 pgp_lK0K5wzoh.pgp Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net/designware: add error message on DMA reset timeout
On Friday, January 30, 2015 at 08:10:34 AM, Alexey Brodkin wrote: Hi Marek, Tom, On Fri, 2015-01-16 at 22:16 +0100, Pavel Machek wrote: On Tue 2015-01-13 17:10:24, Alexey Brodkin wrote: If for some reason DMA module fails to reset user oserves only this: -- # dhcp Trying dwmac.e0018000 FAIL -- This message makes not much sense. With proposed change error message will be more helpful: -- # dhcp Trying dwmac.e0018000 DMA reset timeout FAIL -- For example user may do power toggle to recover board functionality. Signed-off-by: Alexey Brodkin abrod...@synopsys.com Cc: Chin Liang See cl...@altera.com Cc: Dinh Nguyen dingu...@altera.com Cc: Albert Aribaud albert.u.b...@aribaud.net Cc: Tom Rini tr...@ti.com Cc: Wolfgang Denk w...@denx.de Acked-by: Pavel Machek pa...@denx.de Any chance for this trivial change to be applied? Joe, can you please pick this ? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 12/14] microblaze: Move architecture to use generic board init
Hi Simon, On 01/29/2015 04:45 PM, Simon Glass wrote: Hi Michal, On 29 January 2015 at 07:20, Michal Simek michal.si...@xilinx.com wrote: Hi Simon, On 01/29/2015 03:15 AM, Simon Glass wrote: Hi Michal, On 27 January 2015 at 08:20, Michal Simek michal.si...@xilinx.com wrote: Compile code with -fPIC to get GOT. Do not build SPL with fPIC because it increasing SPL size for nothing. Signed-off-by: Michal Simek michal.si...@xilinx.com --- ... -#if defined(CONFIG_MIPS) || defined(CONFIG_PPC) +#if defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE) static int init_func_ram(void) { Can you use dram_init() instead? No problem will do it in v2. Where dram_init(void) should be declared? I see that others have it in arch header. Maybe better to have it in any shared location. Yes a shared location makes sense. I have sent patch for it. Please review. --- a/common/board_r.c +++ b/common/board_r.c @@ -829,7 +829,7 @@ init_fnc_t init_sequence_r[] = { #if defined(CONFIG_ARM) initr_enable_interrupts, #endif -#ifdef CONFIG_X86 +#if defined(CONFIG_X86) || defined(CONFIG_MICROBLAZE) timer_init, /* initialize timer */ #endif Could you use interrupt_init() immediately before? What do you mean by that? Do you want to do timer_init in interrupt_init()? Yes, then if we remove it from x86 also we can drop both #ifdefs. Do you see any drawback with that? timer_init looks like standard function which is used by x86 (board_r), arm, mips, blackfin. (board_f) Based on board_r.c PPC is doing timer_init in cpu_init_r. For Microblaze my preference is to use this location because timer code is using interrupts which are initialized above. Adding timer_init to interrupt_init doesn't look right because then interrupt_init will hide one init step. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP - KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Possible OMAP3 regression with current mainline
Hi Simon, 2015-01-30 2:24 GMT+01:00 Simon Glass s...@chromium.org: Hi Enric, On 26 January 2015 at 10:55, Enric Balletbo Serra eballe...@gmail.com wrote: I just tried boot with my OMAP3 based board (IGEPv2) and I found that is broken in current mainline and v2015.01. The boot process stops at reading u-boot.img Did someone, with another OMAP3 board, have the same problem? I bisected the problem and looks that was introduced in following commit. commit b3f4ca1135edd66d14254089bbeb8077c6d0bb72 dm: omap3: Move to driver model for GPIO and serial Reverting the patch boots again. Any clue? It looks like someone else had this problem: http://patchwork.ozlabs.org/patch/433866/ This patch is made by me, I sent this patch :) But the patch only replaces the use of show_boot_progress for the STATUS_LED API, Which is better for that purpose. But the root problem is not solved. Looks like the problem is the gpio_request call inside the function show_boot_progress. If I'm not wrong the gpio_request implementation is different when device model is used, and for some reason doing a gpio_request inside the show_boot_progress function hangs. If I remove the gpio_request from show_boot_progress it boots as expected. What's the difference between gpio_request implementation when using DM or not? Maybe it's a malloc problem? Regards, Enric Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc: 85xx: Modify CONFIG_USB_MAX_CONTROLLER_COUNT for P1022DS
From: Ying Zhang b40...@freescale.com Modify CONFIG_USB_MAX_CONTROLLER_COUNT value to 1 on P1022DS. As ETSEC2 and USB2 are muxed; thus if ETSEC2 is enabled, the system bus hangs on USB2 if ETSEC2 is enabled but usb start command is issued. Hence making default controller count to 1 to avoid system hang. Signed-off-by: Nikhil Badola nikhil.bad...@freescale.com Reviewed-by: Yusong Sun york...@freescale.com --- arch/powerpc/include/asm/config_mpc85xx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/config_mpc85xx.h b/arch/powerpc/include/asm/config_mpc85xx.h index 01b0905..d0e0021 100644 --- a/arch/powerpc/include/asm/config_mpc85xx.h +++ b/arch/powerpc/include/asm/config_mpc85xx.h @@ -201,7 +201,7 @@ #elif defined(CONFIG_P1013) #define CONFIG_MAX_CPUS1 #define CONFIG_SYS_FSL_NUM_LAWS12 -#define CONFIG_USB_MAX_CONTROLLER_COUNT2 +#define CONFIG_USB_MAX_CONTROLLER_COUNT1 #define CONFIG_SYS_PPC_E500_DEBUG_TLB 2 #define CONFIG_TSECV2 #define CONFIG_SYS_FSL_SEC_COMPAT 2 @@ -285,7 +285,7 @@ #define CONFIG_SYS_PPC_E500_DEBUG_TLB 2 #define CONFIG_TSECV2 #define CONFIG_SYS_FSL_SEC_COMPAT 2 -#define CONFIG_USB_MAX_CONTROLLER_COUNT2 +#define CONFIG_USB_MAX_CONTROLLER_COUNT1 #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff70 #define CONFIG_SYS_FSL_ERRATUM_ELBC_A001 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111 -- 1.8.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/4] sunxi: FEL mode fixes
The recent u-boot changes broke FEL mode support on sunxi hardware. This patch series fixes the regression and also introduces some other cleanups. Siarhei Siamashka (4): sunxi: Make FEL mode usable again sunxi: Use Thumb2 for the FEL mode SPL sunxi: Get rid of u-boot-spl-fel.lds sunxi: Use more realistic size limit for FEL SPL arch/arm/cpu/armv7/sunxi/Makefile | 1 + arch/arm/cpu/armv7/sunxi/board.c| 26 - arch/arm/cpu/armv7/sunxi/start_fel.S| 16 ++ arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds | 82 - arch/arm/cpu/armv7/sunxi/u-boot-spl.lds | 4 +- include/configs/sunxi-common.h | 18 --- 6 files changed, 39 insertions(+), 108 deletions(-) create mode 100644 arch/arm/cpu/armv7/sunxi/start_fel.S delete mode 100644 arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds -- 2.0.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] sunxi: Make FEL mode usable again
The commit f630974ccb3ce93e9607a3354e9acb266a8b7e95 'sunxi: Move SPL s_init() code to board_init_f()' broke the FEL boot mode. This patch moves the DRAM initialization back to s_init() and introduces an assembly entry point for FEL in order to provide guaranteed initialization of the gdata pointer (r9). The assembly entry point is also needed to ensure that the SPL code starts executing in ARM mode. Because the sunxi board_init_f() does not contain anything that is not already done by the default board_init_f(), it is removed too. Signed-off-by: Siarhei Siamashka siarhei.siamas...@gmail.com --- arch/arm/cpu/armv7/sunxi/Makefile | 1 + arch/arm/cpu/armv7/sunxi/board.c| 26 ++ arch/arm/cpu/armv7/sunxi/start_fel.S| 16 arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds | 3 ++- 4 files changed, 29 insertions(+), 17 deletions(-) create mode 100644 arch/arm/cpu/armv7/sunxi/start_fel.S diff --git a/arch/arm/cpu/armv7/sunxi/Makefile b/arch/arm/cpu/armv7/sunxi/Makefile index 48db744..e0d413d 100644 --- a/arch/arm/cpu/armv7/sunxi/Makefile +++ b/arch/arm/cpu/armv7/sunxi/Makefile @@ -40,5 +40,6 @@ obj-$(CONFIG_MACH_SUN7I) += dram_sun4i.o obj-$(CONFIG_MACH_SUN8I) += dram_sun8i.o ifdef CONFIG_SPL_FEL obj-y += start.o +extra-y+= start_fel.o endif endif diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c index 6e28bcd..ea6cb60 100644 --- a/arch/arm/cpu/armv7/sunxi/board.c +++ b/arch/arm/cpu/armv7/sunxi/board.c @@ -85,6 +85,16 @@ void s_init(void) timer_init(); gpio_init(); i2c_init_board(); + +#ifdef CONFIG_SPL_BUILD + preloader_console_init(); + +#ifdef CONFIG_SPL_I2C_SUPPORT + /* Needed early by sunxi_board_init if PMU is enabled */ + i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); +#endif + sunxi_board_init(); +#endif } #ifdef CONFIG_SPL_BUILD @@ -103,22 +113,6 @@ u32 spl_boot_mode(void) { return MMCSD_MODE_RAW; } - -void board_init_f(ulong dummy) -{ - preloader_console_init(); - -#ifdef CONFIG_SPL_I2C_SUPPORT - /* Needed early by sunxi_board_init if PMU is enabled */ - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); -#endif - sunxi_board_init(); - - /* Clear the BSS. */ - memset(__bss_start, 0, __bss_end - __bss_start); - - board_init_r(NULL, 0); -} #endif void reset_cpu(ulong addr) diff --git a/arch/arm/cpu/armv7/sunxi/start_fel.S b/arch/arm/cpu/armv7/sunxi/start_fel.S new file mode 100644 index 000..e1c7cd4 --- /dev/null +++ b/arch/arm/cpu/armv7/sunxi/start_fel.S @@ -0,0 +1,16 @@ +/* + * Entry point of the FEL mode SPL. + * + * Copyright (c) 2015 Siarhei Siamashka siarhei.siamas...@gmail.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include asm-offsets.h +#include config.h +#include linux/linkage.h + +ENTRY(_start_fel) + ldr r9, =gdata + b s_init +ENDPROC(_start_fel) diff --git a/arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds b/arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds index 928b7c1..beb8900 100644 --- a/arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds +++ b/arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds @@ -6,7 +6,7 @@ */ OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm) OUTPUT_ARCH(arm) -ENTRY(s_init) +ENTRY(_start_fel) SECTIONS { . = 0x2000; @@ -14,6 +14,7 @@ SECTIONS . = ALIGN(4); .text : { + arch/arm/cpu/armv7/sunxi/start_fel.o(.text) *(.text.s_init) *(.text*) } -- 2.0.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4] sunxi: Get rid of u-boot-spl-fel.lds
The existing u-boot-spl-fel.lds linker script is rather messy. Instead of fixing it, just use u-boot-spl.lds for both normal SPL and FEL SPL. Signed-off-by: Siarhei Siamashka siarhei.siamas...@gmail.com --- arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds | 83 - arch/arm/cpu/armv7/sunxi/u-boot-spl.lds | 4 +- include/configs/sunxi-common.h | 14 +++-- 3 files changed, 11 insertions(+), 90 deletions(-) delete mode 100644 arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds diff --git a/arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds b/arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds deleted file mode 100644 index beb8900..000 --- a/arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds +++ /dev/null @@ -1,83 +0,0 @@ -/* - * (C) Copyright 2013 - * Henrik Nordstrom hen...@henriknordstrom.net - * - * SPDX-License-Identifier:GPL-2.0+ - */ -OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm) -OUTPUT_ARCH(arm) -ENTRY(_start_fel) -SECTIONS -{ - . = 0x2000; - - . = ALIGN(4); - .text : - { - arch/arm/cpu/armv7/sunxi/start_fel.o(.text) - *(.text.s_init) - *(.text*) - } - - . = ALIGN(4); - .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } - - . = ALIGN(4); - .data : { - *(.data*) - } - - . = ALIGN(4); - .u_boot_list : { - KEEP(*(SORT(.u_boot_list*))); - } - - . = ALIGN(4); - . = .; - - . = ALIGN(4); - .rel.dyn : { - __rel_dyn_start = .; - *(.rel*) - __rel_dyn_end = .; - } - - .dynsym : { - __dynsym_start = .; - *(.dynsym) - } - - . = ALIGN(4); - .note.gnu.build-id : - { - *(.note.gnu.build-id) - } - _end = .; - - . = ALIGN(4096); - .mmutable : { - *(.mmutable) - } - - .bss_start __rel_dyn_start (OVERLAY) : { - KEEP(*(.__bss_start)); - __bss_base = .; - } - - .bss __bss_base (OVERLAY) : { - *(.bss*) - . = ALIGN(4); - __bss_limit = .; - } - - .bss_end __bss_limit (OVERLAY) : { - KEEP(*(.__bss_end)); - } - - /DISCARD/ : { *(.dynstr*) } - /DISCARD/ : { *(.dynamic*) } - /DISCARD/ : { *(.plt*) } - /DISCARD/ : { *(.interp*) } - /DISCARD/ : { *(.gnu*) } - /DISCARD/ : { *(.note*) } -} diff --git a/arch/arm/cpu/armv7/sunxi/u-boot-spl.lds b/arch/arm/cpu/armv7/sunxi/u-boot-spl.lds index 53f0cbd..7806bcf 100644 --- a/arch/arm/cpu/armv7/sunxi/u-boot-spl.lds +++ b/arch/arm/cpu/armv7/sunxi/u-boot-spl.lds @@ -21,14 +21,14 @@ MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \ OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm) OUTPUT_ARCH(arm) -ENTRY(_start) +ENTRY(CONFIG_SPL_ENTRY_POINT_FUNCTION) SECTIONS { .text : { __start = .; *(.vectors) - arch/arm/cpu/armv7/start.o (.text) + CONFIG_SPL_ENTRY_POINT_OBJ_FILE (.text) *(.text*) } .sram diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index f570d9c..c644ad4 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -144,18 +144,21 @@ #define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_LDSCRIPT arch/arm/cpu/armv7/sunxi/u-boot-spl.lds +#define CONFIG_SPL_BSS_START_ADDR 0x4ff8 +#define CONFIG_SPL_BSS_MAX_SIZE0x8 /* 512 KiB */ + #ifdef CONFIG_SPL_FEL -#define CONFIG_SPL_LDSCRIPT arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds +#define CONFIG_SPL_ENTRY_POINT_FUNCTION _start_fel +#define CONFIG_SPL_ENTRY_POINT_OBJ_FILE arch/arm/cpu/armv7/sunxi/start_fel.o + #define CONFIG_SPL_START_S_PATH arch/arm/cpu/armv7/sunxi #define CONFIG_SPL_TEXT_BASE 0x2000 #define CONFIG_SPL_MAX_SIZE0x4000 /* 16 KiB */ #else /* CONFIG_SPL */ -#define CONFIG_SPL_BSS_START_ADDR 0x4ff8 -#define CONFIG_SPL_BSS_MAX_SIZE0x8 /* 512 KiB */ - #define CONFIG_SPL_TEXT_BASE 0x20/* sram start+header */ #define CONFIG_SPL_MAX_SIZE0x5fe0 /* 24KB on sun4i/sun7i */ @@ -165,7 +168,8 @@ #define CONFIG_SPL_MMC_SUPPORT #endif -#define CONFIG_SPL_LDSCRIPT arch/arm/cpu/armv7/sunxi/u-boot-spl.lds +#define CONFIG_SPL_ENTRY_POINT_FUNCTION _start +#define CONFIG_SPL_ENTRY_POINT_OBJ_FILE arch/arm/cpu/armv7/start.o #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR80 /* 40KiB */ #define CONFIG_SPL_PAD_TO 32768 /* decimal for 'dd' */ -- 2.0.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 05/11] avr32: convert to dram_init()
On 29 January 2015 at 16:07, Andreas Bießmann andreas.de...@googlemail.com wrote: Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v2: - new since v1 Changes in v1: None arch/avr32/include/asm/u-boot.h |1 + arch/avr32/lib/Makefile |1 + arch/avr32/lib/board.c | 20 ++-- arch/avr32/lib/dram_init.c | 17 + board/atmel/atngw100/atngw100.c | 20 ++-- board/atmel/atngw100mkii/atngw100mkii.c | 21 +++-- board/atmel/atstk1000/atstk1000.c| 21 +++-- board/earthlcd/favr-32-ezkit/favr-32-ezkit.c | 21 +++-- board/in-circuit/grasshopper/grasshopper.c | 20 ++-- board/mimc/mimc200/mimc200.c | 20 ++-- board/miromico/hammerhead/hammerhead.c | 20 ++-- 11 files changed, 46 insertions(+), 136 deletions(-) create mode 100644 arch/avr32/lib/dram_init.c Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 02/11] avr32: rename cpu_init() - arch_cpu_init()
On 29 January 2015 at 16:07, Andreas Bießmann andreas.de...@googlemail.com wrote: Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v2: None Changes in v1: None arch/avr32/cpu/cpu.c|2 +- arch/avr32/include/asm/u-boot.h |2 ++ arch/avr32/lib/board.c |2 +- 3 files changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/25] tegra: Add eDP support for nyan-big
Hi Tom / Jimmy, On 20 January 2015 at 09:35, Tom Warren twar...@nvidia.com wrote: I'm no display expert, so I'd like to have Jimmy take a look - he did the Nyan display support, and is going to be doing HDMI on another SoC, IIRC. Added him to CC. Any news on this please? - Simon -Original Message- From: s...@google.com [mailto:s...@google.com] On Behalf Of Simon Glass Sent: Tuesday, January 20, 2015 8:59 AM To: U-Boot Mailing List Cc: Tom Warren; Stephen Warren; Simon Glass; Stephen Warren; Marek Vasut; Pavel Herrmann; Lukasz Majewski; Jerry Van Baren; Anatolij Gustschin Subject: Re: [PATCH 0/25] tegra: Add eDP support for nyan-big Hi Tom, On 1 December 2014 at 17:48, Simon Glass s...@chromium.org wrote: This series adds eDP support for nyan-bg so that the display works. Nyan-big is based on tegra124. Some support is added for new clocks to make this work. The drm_dp_helper.h file is brought in from Linux since many of the DisplayPort constants are generic. A very simple uclass is added for DisplayPort, and the Tegra driver makes use of that. The U-Boot EDID support is enhanced to read some additional information (detailed timings). There is existing video support for Tegra20, but I don't think it works for Tegra30/114 (is this correct?). This series relies on detecting the display at run-time as I cannot find a good device tree binding for things like display depth. But if we could resolve that then it might be possible to move Tegra20 over to use the same driver, etc. There is clearly a lot in common with the display controllers - I have exploited this with the header file but not with the C file. HDMI is not supported at present. If this is easy and there is an existing driver to follow along with then I might be able to incorporate it later. This series is available at u-boot-dm/nyan-working Does this series look OK? Simon Glass (25): dm: tegra: config: Increase pre-reloc malloc() to 6KB fdt: Add binding decode function for display-timings tegra: Move the pww into tegra-common tegra: pwm: Allow the clock rate to be left as is tegra: Move checkboard() into the board code tegra: Add a board ID function power: Export register access functions from as3722 tegra: Provide a function to allow LCD PMIC setup tegra: Add support for setting up a as3722 PMIC tegra: nyan-big: Add LCD PMIC init and board ID tegra124: dts: Add host1x node to provide display information tegra: config: Use CONFIG_LCD to detect LCD presence tegra: clock: Add checking for invalid clock IDs tegra: clock: Split the clock source code into a separate function tegra124: clock: Add display clocks and functions tegra: Move display controller header into common video: Add drm_dp_helper.h edid: Add a function to read detailed monitor timings dm: video: Add a uclass for display port tegra: dts: nyan-big: Add definitions for eDP display tegra: video: Support serial output resource (SOR) on tegra124 tegra: video: Add Embedded DisplayPort driver tegra: video: support eDP displays on Tegra124 devices tegra: config: nyan-big: Enable LCD tegra124: video: Add full link training for eDP arch/arm/cpu/armv7/tegra-common/Makefile |1 + arch/arm/cpu/armv7/{tegra20 = tegra-common}/pwm.c |5 +- arch/arm/cpu/armv7/tegra20/Makefile|1 - arch/arm/cpu/armv7/tegra20/display.c |2 +- arch/arm/cpu/tegra-common/board.c |8 - arch/arm/cpu/tegra-common/clock.c | 83 +- arch/arm/cpu/tegra124-common/clock.c | 141 +- arch/arm/dts/tegra124-nyan-big.dts | 47 + arch/arm/dts/tegra124.dtsi | 84 ++ arch/arm/include/asm/arch-tegra/clk_rst.h | 15 +- arch/arm/include/asm/arch-tegra/clock.h| 14 + .../include/asm/{arch-tegra20 = arch-tegra}/dc.h | 63 +- arch/arm/include/asm/arch-tegra/pwm.h | 60 + arch/arm/include/asm/arch-tegra/sys_proto.h| 19 +- arch/arm/include/asm/arch-tegra124/clock-tables.h |3 +- arch/arm/include/asm/arch-tegra124/clock.h | 21 + arch/arm/include/asm/arch-tegra124/display.h | 58 + arch/arm/include/asm/arch-tegra124/pwm.h | 14 + arch/arm/include/asm/arch-tegra20/display.h|2 +- arch/arm/include/asm/arch-tegra20/pwm.h| 54 +- board/nvidia/common/board.c| 40 +- board/nvidia/nyan-big/nyan-big.c | 34 +- common/edid.c | 106 ++ configs/nyan-big_defconfig |2 + .../gpu/nvidia,tegra20-host1x.txt | 372 + doc/device-tree-bindings/video/display-timing.txt | 110 ++ drivers/power/as3722.c |
[U-Boot] [PATCH 09/21] board/BuR/tseries: Change pinmux for GPIO2_28 from GPIO to PWM-Timeroutput
From now we use this pin for the Brightness regulation from LED-Backlight. Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- board/BuR/tseries/mux.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/board/BuR/tseries/mux.c b/board/BuR/tseries/mux.c index 0ba25ee..36ee04c 100644 --- a/board/BuR/tseries/mux.c +++ b/board/BuR/tseries/mux.c @@ -131,9 +131,9 @@ static struct module_pin_mux gpIOs[] = { {OFFSET(spi0_cs1), (MODE(7) | PULLUDEN | PULLUP_EN | RXACTIVE)}, /* TIMER5 (MMC0_DAT3) - TIMER5 (Buzzer) */ {OFFSET(mmc0_dat3), (MODE(3) | PULLUDEN | RXACTIVE)}, - /* TIMER6 (MMC0_DAT2) - PWM_BACK_3V3, later used as MODE3 for PWM */ - {OFFSET(mmc0_dat2), (MODE(7) | PULLUDEN | RXACTIVE)}, - /* GPIO2_27 (MMC0_DAT1) - MII_nNAND */ + /* TIMER6 (MMC0_DAT2) - PWM_BACK_3V3 */ + {OFFSET(mmc0_dat2), (MODE(3) | PULLUDEN | RXACTIVE)}, + /* GPIO2_28 (MMC0_DAT1) - MII_nNAND */ {OFFSET(mmc0_dat1), (MODE(7) | PULLUDEN | RXACTIVE)}, /* GPIO2_29 (MMC0_DAT0) - NAND_1n0 */ {OFFSET(mmc0_dat0), (MODE(7) | PULLUDEN | RXACTIVE)}, -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 17/21] board/BuR/kwb: switch to board HW-Rev3
The board has been redesigned, therefore we need from now other I/O Pins to mux and handle. Older boards aren't supported from now anymore. Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- board/BuR/kwb/board.c | 92 ++--- board/BuR/kwb/mux.c | 51 +-- include/configs/kwb.h |9 +++-- 3 files changed, 89 insertions(+), 63 deletions(-) diff --git a/board/BuR/kwb/board.c b/board/BuR/kwb/board.c index 804765a..30900bc 100644 --- a/board/BuR/kwb/board.c +++ b/board/BuR/kwb/board.c @@ -26,14 +26,13 @@ #include i2c.h #include power/tps65217.h #include ../common/bur_common.h +#include lcd.h /* -*/ /* -- defines for used GPIO Hardware -- */ -#define KEY(0+4) -#define LCD_PWR(0+5) -#define PUSH_KEY (0+31) -#define USB2SD_NRST(32+29) -#define USB2SD_PWR (96+13) +#define ESC_KEY(0+19) +#define LCD_PWR(0+5) +#define PUSH_KEY (0+31) /* -*/ /* -- PSOC Resetcontroller Register defines -- */ @@ -46,6 +45,7 @@ /* -- defines for RSTCTRL_CTRLREG -- */ #defineRSTCTRL_FORCE_PWR_NEN 0x0404 +#defineRSTCTRL_CAN_STB 0x4040 #if defined(CONFIG_SPL_BUILD) /* TODO: check ram-timing ! */ @@ -107,10 +107,13 @@ void am33xx_spl_board_init(void) cmper-epwmss0clkctrl, cmper-epwmss1clkctrl, cmper-epwmss2clkctrl, + cmper-lcdclkctrl, + cmper-lcdcclkstctrl, 0 }; do_enable_clocks(clk_domains, clk_modules_kwbspecific, 1); - + /* setup LCD-Pixel Clock */ + writel(0x2, CM_DPLL + 0x34); /* power-OFF LCD-Display */ gpio_direction_output(LCD_PWR, 0); @@ -121,7 +124,7 @@ void am33xx_spl_board_init(void) /* power-ON 3V3 via Resetcontroller */ oldspeed = i2c_get_bus_speed(); if (i2c_set_bus_speed(CONFIG_SYS_OMAP24_I2C_SPEED_PSOC) = 0) { - buf = RSTCTRL_FORCE_PWR_NEN; + buf = RSTCTRL_FORCE_PWR_NEN | RSTCTRL_CAN_STB; i2c_write(RSTCTRL_ADDR, RSTCTRL_CTRLREG, 1, (uint8_t *)buf, sizeof(buf)); i2c_set_bus_speed(oldspeed); @@ -129,15 +132,6 @@ void am33xx_spl_board_init(void) puts(ERROR: i2c_set_bus_speed failed! (turn on PWR_nEN)\n); } -#if defined(CONFIG_AM335X_USB0) - /* power on USB2SD Controller */ - gpio_direction_output(USB2SD_PWR, 1); - mdelay(1); - /* give a reset Pulse to USB2SD Controller */ - gpio_direction_output(USB2SD_NRST, 0); - mdelay(1); - gpio_set_value(USB2SD_NRST, 1); -#endif pmicsetup(0); } @@ -166,7 +160,6 @@ int board_init(void) #ifdef CONFIG_BOARD_LATE_INIT int board_late_init(void) { - const unsigned int ton = 250; const unsigned int toff = 1000; unsigned int cnt = 3; unsigned short buf = 0x; @@ -175,50 +168,77 @@ int board_late_init(void) tps65217_reg_write(TPS65217_PROT_LEVEL_NONE, TPS65217_WLEDCTRL2, 0x32, 0xFF); /* 50% dimlevel */ - if (gpio_get_value(KEY)) { + if (gpio_get_value(ESC_KEY)) { do { - /* turn on light */ - tps65217_reg_write(TPS65217_PROT_LEVEL_NONE, - TPS65217_WLEDCTRL1, 0x09, 0xFF); - mdelay(ton); - /* turn off light */ - tps65217_reg_write(TPS65217_PROT_LEVEL_NONE, - TPS65217_WLEDCTRL1, 0x01, 0xFF); + lcd_position_cursor(1, 8); + switch (cnt) { + case 3: + lcd_puts( + release ESC-KEY to enter SERVICE-mode.); + break; + case 2: + lcd_puts( + release ESC-KEY to enter DIAGNOSE-mode.); + break; + case 1: + lcd_puts( + release ESC-KEY to enter BOOT-mode.); + break; + } mdelay(toff); cnt--; - if (!gpio_get_value(KEY) + if (!gpio_get_value(ESC_KEY) + gpio_get_value(PUSH_KEY) 2 == cnt)
[U-Boot] [PATCH 14/21] board/BuR/common: Add support for displaying BMP on LCD
Customer wants to display some logo very quickly after power on, so we support from now loading a compressed bmp.gz to the screen. Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- include/configs/bur_am335x_common.h |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h index cd15c6c..29c1567 100644 --- a/include/configs/bur_am335x_common.h +++ b/include/configs/bur_am335x_common.h @@ -30,6 +30,13 @@ setenv stdout nc;setenv stdin nc;setenv stderr nc\0 #define CONFIG_CMD_TIME +#define CONFIG_VIDEO_BMP_GZIP +#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (1366*767*4) +#define CONFIG_CMD_UNZIP +#define CONFIG_CMD_BMP +#define CONFIG_BMP_24BMP +#define CONFIG_BMP_32BPP + #define CONFIG_SYS_GENERIC_BOARD #define CONFIG_AM33XX @@ -130,7 +137,7 @@ * we are on so we do not need to rely on the command prompt. We set a * console baudrate of 115200 and use the default baud rate table. */ -#define CONFIG_SYS_MALLOC_LEN (1024 10) +#define CONFIG_SYS_MALLOC_LEN (5120 10) #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT U-Boot (BuR V2.0)# #define CONFIG_SYS_CONSOLE_INFO_QUIET -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 07/21] board/BuR/tseries: Enable U-Boot BOOTCOUNT feature
Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- include/configs/tseries.h |4 1 file changed, 4 insertions(+) diff --git a/include/configs/tseries.h b/include/configs/tseries.h index 368f588..7fd0a00 100644 --- a/include/configs/tseries.h +++ b/include/configs/tseries.h @@ -23,6 +23,10 @@ #define CONFIG_HW_WATCHDOG #define CONFIG_OMAP_WATCHDOG #define CONFIG_SPL_WATCHDOG_SUPPORT +/* Bootcount using the RTC block */ +#define CONFIG_SYS_BOOTCOUNT_ADDR 0x44E3E000 +#define CONFIG_BOOTCOUNT_LIMIT +#define CONFIG_BOOTCOUNT_AM33XX /* Clock Defines */ #define V_OSCK 2600 /* Clock output from T2 */ #define V_SCLK (V_OSCK) -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 12/21] board/BuR/common: Introduce Network Console and common environment for it
It is often necessary to break in into boards bootloader commandline if something fails or even for development purposes some parameters have to be changed. So we enable u-boot's CONFIG_NETCONSOLE feature. We also modify Networksettings to apply with this new use-case. Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- include/configs/bur_am335x_common.h | 23 +-- include/configs/tseries.h | 33 - 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h index e9d5d01..d7ea1c9 100644 --- a/include/configs/bur_am335x_common.h +++ b/include/configs/bur_am335x_common.h @@ -12,6 +12,23 @@ #ifndef __BUR_AM335X_COMMON_H__ #define __BUR_AM335X_COMMON_H__ /* - */ +#define BUR_COMMON_ENV \ +defaultip=192.168.60.253\0 \ +defaultsip=192.168.60.254\0 \ +netconsole=echo switching to network console ...; \ +if dhcp; then \ +setenv ncip ${serverip}; else \ +setenv ncip 192.168.60.254; \ +setenv serverip 192.168.60.254; \ +setenv gatewayip 192.168.60.254; \ +setenv ipaddr 192.168.60.1; \ +fi; \ +setenv netdisplay0 ' \ +setcurs 1 9; puts myip; setcurs 10 9; puts ${ipaddr}; \ +setcurs 1 10;puts serverip; setcurs 10 10; puts ${serverip}\;' \ +run netdisplay0; \ +setenv stdout nc;setenv stdin nc;setenv stderr nc\0 + #define CONFIG_SYS_GENERIC_BOARD #define CONFIG_AM33XX @@ -47,7 +64,7 @@ #define CONFIG_BOOTP_SEND_HOSTNAME #define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_SUBNETMASK -#define CONFIG_NET_RETRY_COUNT 4 +#define CONFIG_NET_RETRY_COUNT 2 #define CONFIG_CMD_PING #define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */ #define CONFIG_MII /* Required in net/eth.c */ @@ -57,7 +74,9 @@ #define CONFIG_SPL_NET_SUPPORT #define CONFIG_SPL_ENV_SUPPORT /* used for a fetching MAC-Address */ #define CONFIG_SPL_NET_VCI_STRING AM335x U-Boot SPL - +/* Network console */ +#define CONFIG_NETCONSOLE 1 +#define CONFIG_BOOTP_MAY_FAIL /* if we don't have DHCP environment */ /* * SPL related defines. The Public RAM memory map the ROM defines the * area between 0x402F0400 and 0x4030B800 as a download area and diff --git a/include/configs/tseries.h b/include/configs/tseries.h index 986db3f..8e073e0 100644 --- a/include/configs/tseries.h +++ b/include/configs/tseries.h @@ -125,35 +125,10 @@ #ifndef CONFIG_SPL_BUILD #define CONFIG_EXTRA_ENV_SETTINGS \ - autoload=0\0 \ - loadaddr=0x8020\0 \ - bootfile=zImage\0 \ - console=ttyO0,115200n8\0 \ - optargs=\0 \ - rootpath=/tftpboot/tseries/rootfs-small\0 \ - nfsopts=nolock\0 \ - netargs=setenv bootargs console=${console} \ - ${optargs} \ - root=/dev/nfs \ - nfsroot=${serverip}:${rootpath},${nfsopts} rw \ - ip=dhcp\0 \ - netboot=echo Booting from network ...; \ - setenv autoload no; \ - dhcp; \ - tftp ${loadaddr} ${bootfile}; \ - run netargs; \ - bootm ${loadaddr}\0 \ - usbupdate=echo Updating UBOOT from USB-Stick ...; \ - usb start; \ - fatload usb 0 0x8000 updateubootusb.img; \ - source;\0 \ - netupdate=echo Updating UBOOT from Network (TFTP) ...; \ - setenv autoload 0; \ - dhcp; \ - tftp 0x8000 updateUBOOT.img; \ - source;\0 \ - NANDARGS \ - MMCARGS +BUR_COMMON_ENV \ +autoload=0\0 \ +NANDARGS \ +MMCARGS #endif /* !CONFIG_SPL_BUILD*/ #define CONFIG_BOOTCOMMAND \ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 03/21] common/lcd: Add command for writing to lcd-display
We need this function if we want to make some outputs out of u-boot scripts. Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- common/lcd.c | 17 + 1 file changed, 17 insertions(+) diff --git a/common/lcd.c b/common/lcd.c index f418da9..755388f 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -279,6 +279,17 @@ static int do_lcd_clear(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } +static int do_lcd_puts(cmd_tbl_t *cmdtp, int flag, int argc, + char *const argv[]) +{ + if (argc != 2) + return CMD_RET_USAGE; + + lcd_puts(argv[1]); + + return 0; +} + static int do_lcd_setcursor(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { @@ -306,6 +317,12 @@ U_BOOT_CMD( col row in character ); +U_BOOT_CMD( + puts, 2, 1, do_lcd_puts, + print string on lcd-framebuffer, + string +); + /*--*/ static int lcd_init(void *lcdbase) -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 11/21] board/BuR/tseries: Chg Pinmux - enable UART1 pins
Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- board/BuR/tseries/mux.c |8 1 file changed, 8 insertions(+) diff --git a/board/BuR/tseries/mux.c b/board/BuR/tseries/mux.c index 330429a..2c87a63 100644 --- a/board/BuR/tseries/mux.c +++ b/board/BuR/tseries/mux.c @@ -25,6 +25,13 @@ static struct module_pin_mux uart0_pin_mux[] = { {OFFSET(uart0_txd), (MODE(0) | PULLUDEN)}, {-1}, }; +static struct module_pin_mux uart1_pin_mux[] = { + /* UART0_RXD */ + {OFFSET(uart1_rxd), (MODE(0) | PULLUDEN | PULLUP_EN | RXACTIVE)}, + /* UART0_TXD */ + {OFFSET(uart1_txd), (MODE(0) | PULLUDEN)}, + {-1}, +}; #ifdef CONFIG_MMC static struct module_pin_mux mmc1_pin_mux[] = { {OFFSET(gpmc_ad7), (MODE(1) | RXACTIVE | PULLUP_EN)}, /* MMC1_DAT7 */ @@ -236,5 +243,6 @@ void enable_board_pin_mux(void) #endif configure_module_pin_mux(spi0_pin_mux); configure_module_pin_mux(lcd_pin_mux); + configure_module_pin_mux(uart1_pin_mux); configure_module_pin_mux(gpIOs); } -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot