Re: [U-Boot] [PATCH v2 3/3] dm: core: Add uclass_first/next_device_check()
Hi Simon, On Fri, Jun 9, 2017 at 12:41 AM, Simon Glasswrote: > Hi, > > On 23 April 2017 at 20:10, Simon Glass wrote: >> Sometimes it is useful to iterate through all devices in a uclass and >> skip over those which do not work correctly (e.g fail to probe). Add two >> new functions to provide this feature. >> >> The caller must check the return value each time to make sure that the >> device is valid. But the device pointer is always returned. >> >> Signed-off-by: Simon Glass >> --- >> >> Changes in v2: >> - Return even device, even those with errors >> - Rename the functions >> >> drivers/core/uclass.c | 27 + >> include/dm/uclass.h | 31 >> test/dm/test-fdt.c| 80 >> +++ >> 3 files changed, 138 insertions(+) > > > This patch has been sitting around for a while. Does anyone think it is > useful? > > Regards, > Simon > ___ I actually made a patch for one of our boards with two functions that have the same semantics in our repository (just named uclass_{first,next}_device_skip). The background is that on this board we have a network interface controlled by an FPGA and another interface controlled by the SoC. The problem I faced was that when the interfaces were brought up in net/eth-uclass.c the FPGA was not yet running, hence the probe of the FPGA's network interface (which came first) failed. But since the process then stopped there, the SoC's interface was not activated either, which left the board without a network connection (which would be a problem in production). Aside from that, I think there are many use cases where the "skipping behavior" would be prudent. For example in the gpio command: if any of the GPIO controllers fail to probe for some reason, then "gpio st -a" will stop at this particular controller, and won't show the state of any other controllers. So, in conclusion, yes, I think it would be a nice addition. Best regards, Mario ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] common, image-sig: [BUG?] if no valid signature node found, do not boot signed FIT image
Hello Simon, Am 09.06.2017 um 05:05 schrieb Simon Glass: Hi Heiko, On 8 June 2017 at 03:52, Heiko Schocherwrote: fit_image_verify_required_sigs() must return != 0, on error. When fit_image_verify_required_sigs() does not find a signature node, it returns 0, which leads in booting a signed FIT image. Fix this! Signed-off-by: Heiko Schocher --- Found on an imx28 based board, with key dtb appended to u-boot.bin. Booting signed FIT image without an valid key dtb appended to u-boot.bin shows: [...] common/image-sig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/image-sig.c b/common/image-sig.c index 455f2b9..646fb08 100644 --- a/common/image-sig.c +++ b/common/image-sig.c @@ -265,7 +265,7 @@ int fit_image_verify_required_sigs(const void *fit, int image_noffset, if (sig_node < 0) { debug("%s: No signature node found: %s\n", __func__, fdt_strerror(sig_node)); - return 0; + return 1; Thanks for finding/fixing this! I suggest returning -EPERM. Ok, changed. Also note that using image-based security is somewhat insecure since people can mix and match them. Configuration signing is preferred if you can do it. I do this, here my configurations node from the its file: configurations { default = "conf@1"; conf@1 { description = "board config 1"; kernel = "kernel@1"; fdt = "fdt@1"; ramdisk = "ramdisk@1"; signature@1 { algo = "sha256,rsa4096"; key-name-hint = "dev"; }; }; }; As Tom said, can you add a test please? Hmm... tried with current U-Boot, the steps described in test/image/test-fit.py # make O=sandbox sandbox_config # make O=sandbox # ./test/image/test-fit.py -u sandbox/u-boot and get: pollux:u-boot hs [master] $ ./test/image/test-fit.py -u sandbox/u-boot FIT Tests = Warning (unit_address_vs_reg): Node /reset@0 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /images/kernel@1 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /images/kernel@2 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /images/fdt@1 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /images/fdt@1/signature@1 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /images/ramdisk@1 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /images/ramdisk@2 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /configurations/conf@1 has a unit name, but no reg property Kernel load U-Boot 2017.07-rc1-00997-gad701b1 (Jun 09 2017 - 06:18:46 +0200) DRAM: 128 MiB MMC: Using default environment In:serial Out: serial Err: serial SCSI: Net: No ethernet found. IDE: Bus 0: not available 18474 bytes read in 0 ms ## Loading kernel from FIT Image at 1000 ... Using 'conf@1' configuration Verifying Hash Integrity ... OK Trying 'kernel@1' kernel subimage Description: unavailable Created: 2017-06-09 4:19:13 UTC Type: Kernel Image Compression: uncompressed Data Start: 0x10c8 Data Size:3491 Bytes = 3.4 KiB Architecture: Sandbox OS: Linux Load Address: 0x0004 Entry Point: 0x0008 Verifying Hash Integrity ... OK ## Loading fdt from FIT Image at 1000 ... Using 'conf@1' configuration Trying 'fdt@1' fdt subimage Description: snow Created: 2017-06-09 4:19:13 UTC Type: Flat Device Tree Compression: uncompressed Data Start: 0x2d30 Data Size:193 Bytes = 193 Bytes Architecture: Sandbox Sign algo:sha1,rsa2048:dev Sign value: unavailable Timestamp:unavailable Verifying Hash Integrity ... sha1,rsa2048:dev- OK Booting using the fdt blob at 0x002d30 Loading Kernel Image ... OK 3491 bytes written in 0 ms 193 bytes written in 0 ms 4591 bytes written in 0 ms 3491 bytes written in 0 ms 4591 bytes written in 0 ms Expected '%s' but not found in output: U-Boot 2017.07-rc1-00997-gad701b1 (Jun 09 2017 - 06:18:46 +0200) DRAM: 128 MiB MMC: Using default environment In:serial Out: serial Err: serial SCSI: Net: No ethernet found. IDE: Bus 0: not available 18474 bytes read in 0 ms ## Loading kernel from FIT Image at 1000 ... Using 'conf@1' configuration Verifying Hash Integrity ... OK Trying 'kernel@1' kernel subimage Description: unavailable Created: 2017-06-09 4:19:13 UTC Type: Kernel Image Compression: uncompressed Data Start: 0x10c8 Data Size:3491 Bytes = 3.4 KiB
[U-Boot] [PATCH] tools/tbot: update README
refer in the README to tbots webpage, and delete the README in tools/tbot, as the latest documentation for tbot is on this webpage. Signed-off-by: Heiko Schocher--- test/README | 2 +- tools/tbot/README | 195 tools/tbot/README-ToDo | 62 --- tools/tbot/README.create_a_new_testcase | 117 tools/tbot/README.install | 310 5 files changed, 1 insertion(+), 685 deletions(-) delete mode 100644 tools/tbot/README delete mode 100644 tools/tbot/README-ToDo delete mode 100644 tools/tbot/README.create_a_new_testcase delete mode 100644 tools/tbot/README.install diff --git a/test/README b/test/README index 1142e9c..873a4e1 100644 --- a/test/README +++ b/test/README @@ -46,7 +46,7 @@ tbot Tbot provides a way to execute tests on target hardware. It is intended for trying out both U-Boot and Linux (and potentially other software) on a number of boards automatically. It can be used to create a continuous test -environment. See tools/tbot/README for more information. +environment. See http://www.tbot.tools for more information. Ad-hoc tests diff --git a/tools/tbot/README b/tools/tbot/README deleted file mode 100644 index 49b9e95..000 --- a/tools/tbot/README +++ /dev/null @@ -1,195 +0,0 @@ -# Copyright (c) 2016 DENX Software Engineering GmbH -# Heiko Schocher -# -# SPDX-License-Identifier: GPL-2.0+ -# - -What is tbot ? -== - -tbot is a tool for executing testcases on boards. -Source code found on [1] -Based on DUTS [2] -written in python - -Basic Ideas of tbot -=== -(see also the figure: -https://github.com/hsdenx/tbot/blob/master/doc/tbot_structure.png ) - -- Virtual laboratory (VL) - VL is the basic environment that groups: - - [a number of] boards - target devices on which tbot executes testcases. - - one Lab PC - -- Test case (TC): - A piece of python code, which uses the tbot class from [1]. - Tbot provides functions for sending shell commands and parsing the - shell commands output. - Tbot waits endless for a shell commands end (detected through reading - the consoles prompt). - A TC can also call other TC-es. - - remark: - Tbot not really waits endless, for a shell commands end, instead - tbot starts a watchdog in the background, and if it triggers, tbot - ends the TC as failed. In the tbot beginning there was a lot of - timeouts / retry cases, but it turned out, that waiting endless - is robust and easy ... - -- Host PC (where tbot runs, currently only linux host tested) - must not a powerful machine (For example [3], I use a - raspberry pi for running tbot and buildbot) - -- Lab PC: - - Host PC connects through ssh to the Lab PC --> so it is possible to test boards, which - are not at the same place as the Host PC. - (Lab PC and Host PC can be the same of course) - -> maybe we can setup a Testsystem, which does nightly - U-Boot/Linux builds and test from current mainline U-Boot - on boards wherever they are accessible. - - - necessary tasks a Lab PC must deliver: -- connect to boards console through a shell command. -- power on/off boards through a shell command -- detect the current power state of a board through - a shell command - - - optional tasks: -- tftp server (for example loading images) -- nfs server (used as rootfs for linux kernels) -- Internet access for example for downloading - U-Boot source with git. -- toolchains installed for compiling source code - - -> a linux machine is preffered. - - - currently only Lab PC with an installed linux supported/tested. - -- Boards(s): - the boards on which shell commands are executed. - -- Board state: - equals to the software, the board is currently running. - - Currently tbot supports 2 board states: -- "u-boot", if the board is running U-Boot -- "linux", if the board is running a linux kernel - - It should be easy to add other board states to tbot, see - https://github.com/hsdenx/tbot/tree/master/src/lab_api/state_[u-boot/linux].py - - A board state is detected through analysing the boards - shell prompt. In linux, tbot sets a special tbot prompt, - in U-Boot the prompt is static, and configurable in tbot through - a board config file. - - A TC can say in which board state it want to send shell commands. - Tbot tries to detect the current board state, if board is not in - the requested board state, tbot tries to switch into the correct - state. If this fails, the TC fails. - - It is possible to switch in a single TC between board states. - -- Events - tbot creates while executing testcases so called events. - After tbot ended with the testcase it can call event_backends, - which convert the events to different formats. more info: - - https://github.com/hsdenx/tbot/blob/master/doc/README.event - -
[U-Boot] arm-linux-gnueabihf-ld.bfd: not found when compile with gcc-linaro-6.3.1
I get the compiler from Linaro and uncompress the tar ball, then I build U-Boot with: CROSS_COMPILE=../toolchain/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- make evb-rk3288_defconfig all Any one met this? log message: CC spl/lib/panic.o CC spl/lib/strto.o CC spl/lib/strmhz.o CC spl/common/stdio.o CC spl/common/cli.o CC spl/common/command.o CC spl/common/s_record.o CC spl/common/xyzModem.o LD spl/common/built-in.o LD spl/lib/built-in.o LD spl/u-boot-spl /bin/sh: 1: ../toolchain/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-ld.bfd: not found make[2]: *** [spl/u-boot-spl] Error 127 make[1]: *** [spl/u-boot-spl] Error 2 make: *** [__build_one_by_one] Error 2 Thanks, - Kever ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 00/31] dm: tegra: Move nyan-big and beaver to livetree
Hi, On 8 June 2017 at 21:06, Simon Glasswrote: > Hi Tom (Warren) / Marcel, > > On 2 June 2017 at 21:03, Simon Glass wrote: >> >> This moves an entire board to use a live device tree as an example of the >> impact. >> >> Nyan-big was chosen because I can easily and boot U-Boot without any >> media swapping, etc. Beaver is enabled as well since it failed to boot >> with serial v1 due to a disabled console node. >> > > Have you been able to test this v2 series? Some problems were reported > with v1 and I have found a few more since I discovered my jetson-tk1 > board. I'm planning to send a v3 soon, but please let me know if you > see any issues. One more note - I pushed a v3 series to u-boot-dm/livet-working but have not sent the patches. Let me know if you find anything. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 4/4] arm: am33xx: Add support for mulitiple PLL input frequencies
Hello Tom, Am 09.06.2017 um 02:45 schrieb Tom Rini: On Thu, Jun 08, 2017 at 10:17:09AM +0530, Lokesh Vutla wrote: On Thursday 08 June 2017 12:20 AM, Emmanuel Vadot wrote: On Fri, 12 May 2017 13:20:50 -0400 Tom Riniwrote: On Fri, May 05, 2017 at 12:59:10PM +0530, Lokesh Vutla wrote: am335x supports various sysclk frequencies which can be determined using sysboot pins. PLLs should be configures based on this sysclk frequency. Add PLL configurations for all supported frequencies. Signed-off-by: Lokesh Vutla Reviewed-by: Tom Rini Applied to u-boot/master, thanks! -- Tom Hello, This appears to break beaglebone black support, reverting this commit make u-boot works again. hmm..I see the problem. Here we are hard coding MPU freq to 1GHz even efuse say it is not supported(I am not sure why this is being done, may be Tom can give more details). Even in kernel I see that cpufreq is reading efuse to determine mpu frequency. Now that we have jitter optimized pll configurations, looks like unsupported freq is causing an issue. Can you see if the below patch helps? Well, in the kernel, did anyone poke the Beagleboard folks about this, before pushing the change? There's BBB shipping with chips that did not have their efuses set, hence the way things were structured in U-Boot. I have runnint tbot tests on a BBB [1] ... and yes, currently test is red = bad ... :-( Not sure, if it is this patch ... Last working U-Boot test, see [2] Sorry, did not looked earlier at it ... I really need to find time again for my testsetup as at91 based boards also not running currently :-( Ok, my BBB in the lab is running, also with current U-Boot, but I see U-Boot 2017.07-rc1-00075-g156d64f (Jun 09 2017 - 05:48:18 +0200) CPU : AM335X-GP rev 2.1 Model: TI AM335x BeagleBone Black DRAM: 512 MiB NAND: 0 MiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 ** Unable to use mmc 0:1 for loading the env ** Using default environment ERROR: No USB device found at drivers/usb/gadget/ether.c:2709/usb_ether_init() not set. Validating first E-fuse MAC Net: CACHE: Misaligned operation at range [9df31580, 9df31624] eth0: ethernet@4a10 And my tbot tests breaking when using ethernet! For example: => print tbot_cmp_uboot tbot_cmp_uboot=run cmp_uboot => print cmp_uboot cmp_uboot=tftp ${cmp_addr_r} ${ubfile};cmp.b ${load_addr_r} ${cmp_addr_r} ${filesize} => => run tbot_upd_uboot link up on port 0, speed 100, full duplex Using ethernet@4a10 device TFTP from server 192.168.1.1; our IP address is 192.168.20.95 Filename 'bbb/tbot/u-boot.img'. Load address: 0x8100 Loading: # 3.2 MiB/s done Bytes transferred = 654708 (9fd74 hex) writing u-boot.img 654708 bytes written => run tbot_cmp_uboot link up on port 0, speed 100, full duplex Using ethernet@4a10 device TFTP from server 192.168.1.1; our IP address is 192.168.20.95 Filename 'bbb/tbot/u-boot.img'. Load address: 0x8200 Loading: # 3.2 MiB/s done Bytes transferred = 654708 (9fd74 hex) byte at 0x81000618 (0x33) != byte at 0x82000618 (0x74) Total of 1560 byte(s) were the same => So simply load file 'bbb/tbot/u-boot.img' twice with tftp and compare fails ... but the image boots ... bye, Heiko [1] http://xeidos.ddns.net/buildbot/tgrid bbb U-Boot Test = "bbb_ub" [2] last working U-Boot test http://xeidos.ddns.net/tests/test_db_auslesen.php#319 -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 00/11] rk3328: add support of usb host and gadget
On 2017/6/8 20:11, Marek Vasut wrote: On 06/08/2017 09:31 AM, Meng Dongyang wrote: Add support of usb host and gadget function for rk3328. Why did I receive half of the series as a series (that is, cover letter and patches IRT to that) and half as separate emails ? Because there is a limit to the number of letter one time. Changes in v4: - Splite patch [U-boot,v3,04/10] into two patches - Define set vbus as empty function if the macros aren't set - Prepare a mask and set capabilities in GUSBCFG register once Changes in v3: - Revert change of macro definition in dwc2 driver - Support host mode without HNP/SRP capability through DTS Changes in v2: - Add commit messages - Split patch [U-boot,7/8] into two patches - Use fixed regulator to control vbus instead of gpio Meng Dongyang (11): configs: rk3328: add support for usb and config ehci and ohci driver rockchip: dts: rk3328: add ehci and ohci node and enable host0 port configs: rk3328: config xhci controller usb: host: xhci-rockchip: use fixed regulator to control vbus usb: host: xhci-rockchip: add support for rk3328 rockchip: dts: rk3328: support and enable xhci configs: rk3328: enable dwc2 driver and config for fastboot usb: dwc2: force to host mode if not support HNP/SRP rk3328: board: add support of dwc2 gadget rockchip: dts: rk3328: support and enable dwc2 rockchip: dts: rk3399: control vbus of typec by fixed regulator arch/arm/dts/rk3328-evb.dts| 36 arch/arm/dts/rk3328.dtsi | 35 +++ arch/arm/dts/rk3399-evb.dts| 16 +++-- board/rockchip/evb_rk3328/evb-rk3328.c | 43 +++--- configs/evb-rk3328_defconfig | 25 drivers/usb/host/dwc2.c| 19 --- drivers/usb/host/xhci-rockchip.c | 43 +++--- include/configs/rk3328_common.h| 9 +++ 8 files changed, 209 insertions(+), 17 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v8 4/7] arm: socfpga: Enable FPGA driver on SPL
On Kha, 2017-06-08 at 14:14 +0200, Marek Vasut wrote: > On 06/08/2017 05:40 AM, Chee, Tien Fong wrote: > [...] > > > > > > > > > > > > > > > > > > > Any safety guideline? > > > > > I checked the spl.map, we still have 10K left after > > > > > calculation > > > > > including bss size. > > > > > > > > > I compiled all Intel fpga related defconfigs, and we have 9K > > > > free > > > > based > > > > on total 64K memory size. SO building PFGA driver would > > > > contribute > > > > around 1~2K only to SPL size. Do you have concern with that? > > > Yes > > > > > > > > > > > > > > > If you have concern, i would remove patch 6, keep fpga_manager > > > > intact. > > > Can't you rework things such that they don't add useless code > > > into > > > the > > > SPL instead ? > > > > > I checked the codes yesterday, mostly are bridge, and HPS-FPGA > > interface configuration in SPL. So, i think we can try to remove > > them > > as they are not required in SPL, but i need more time to test it > > out > > and ensure this change doesn't break anything. > That's fine, we're past RC1 anyway. > > > > > To avoid impact the progress of submitting the rest of patchset as > > they > > are still pending until this patchset is accepted , so i suggest we > > can > > do it in later. So, i will keep fpga_manager in there. > > > > sounds good to you? > You have about two months till the next MW opens , so if you want to > flesh this out, please do. > Sure, this changes will be in separate patchset, as this is for codes cleaning up and refactoring on gen5. So, how about the Add Arria 10 FPGA driver v10 patchset overall? Anything else i miss? Thanks. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks. > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] dm: blk: Add a way to obtain a block device from its parent
On 06/09/2017 12:06 PM, Simon Glass wrote: > Hi Jaehoon, > > On 6 June 2017 at 21:49, Jaehoon Chungwrote: >> Hi Simon, >> >> On 05/28/2017 02:37 AM, Simon Glass wrote: >>> Many devices support a child block device (e.g. MMC, USB). Add a >>> convenient way to get this device given the parent device. >>> >>> Signed-off-by: Simon Glass >>> --- >>> >>> drivers/block/blk-uclass.c | 26 ++ >>> include/blk.h | 7 +++ >>> test/dm/blk.c | 18 ++ >>> 3 files changed, 51 insertions(+) >>> >>> diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c >>> index 6145675271..23f131b7ad 100644 >>> --- a/drivers/block/blk-uclass.c >>> +++ b/drivers/block/blk-uclass.c >>> @@ -453,6 +453,32 @@ int blk_prepare_device(struct udevice *dev) >>> return 0; >>> } >>> >>> +int blk_get_from_parent(struct udevice *parent, struct udevice **devp) >>> +{ >>> + struct udevice *dev; >>> + enum uclass_id id; >>> + int ret; >>> + >>> + device_find_first_child(parent, ); >>> + if (!dev) { >>> + debug("%s: No block device found for parent '%s'\n", __func__, >>> + parent->name); >>> + return -ENODEV; >>> + } >>> + id = device_get_uclass_id(dev); >>> + if (id != UCLASS_BLK) { >>> + debug("%s: Incorrect uclass %s for block device '%s'\n", >>> + __func__, uclass_get_name(id), dev->name); >>> + return -ENOTBLK; >>> + } >>> + ret = device_probe(dev); >>> + if (ret) >>> + return ret; >>> + *devp = dev; >>> + >>> + return 0; >>> +} >>> + >>> int blk_find_max_devnum(enum if_type if_type) >>> { >>> struct udevice *dev; >>> diff --git a/include/blk.h b/include/blk.h >>> index a128ee4841..4d60987f61 100644 >>> --- a/include/blk.h >>> +++ b/include/blk.h >>> @@ -616,4 +616,11 @@ ulong blk_write_devnum(enum if_type if_type, int >>> devnum, lbaint_t start, >>> */ >>> int blk_select_hwpart_devnum(enum if_type if_type, int devnum, int hwpart); >>> >>> +/** >>> + * blk_get_from_parent() - obtain a block device by looking up its parent >>> + * >>> + * All devices with >>> + */ >>> +int blk_get_from_parent(struct udevice *parent, struct udevice **devp); >> >> Don't need to consider whether CONFIG_BLK is defined or not? >> blk_get_from_parent() is declared in blk-uclass.c > > Well in that case this function will not be called, so I think it is OK. include/blk.h:624:32: warning: 'struct udevice' declared inside parameter list will not be visible outside of this definition or declaration int blk_get_from_parent(struct udevice *parent, struct udevice **devp); Plz, check this.. :) Best Regards, Jaehoon Chung > >> >> Best Regards, >> Jaehoon Chung > > - Simon > > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] dm: blk: Add a way to obtain a block device from its parent
Hi Jaehoon, On 6 June 2017 at 21:49, Jaehoon Chungwrote: > Hi Simon, > > On 05/28/2017 02:37 AM, Simon Glass wrote: >> Many devices support a child block device (e.g. MMC, USB). Add a >> convenient way to get this device given the parent device. >> >> Signed-off-by: Simon Glass >> --- >> >> drivers/block/blk-uclass.c | 26 ++ >> include/blk.h | 7 +++ >> test/dm/blk.c | 18 ++ >> 3 files changed, 51 insertions(+) >> >> diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c >> index 6145675271..23f131b7ad 100644 >> --- a/drivers/block/blk-uclass.c >> +++ b/drivers/block/blk-uclass.c >> @@ -453,6 +453,32 @@ int blk_prepare_device(struct udevice *dev) >> return 0; >> } >> >> +int blk_get_from_parent(struct udevice *parent, struct udevice **devp) >> +{ >> + struct udevice *dev; >> + enum uclass_id id; >> + int ret; >> + >> + device_find_first_child(parent, ); >> + if (!dev) { >> + debug("%s: No block device found for parent '%s'\n", __func__, >> + parent->name); >> + return -ENODEV; >> + } >> + id = device_get_uclass_id(dev); >> + if (id != UCLASS_BLK) { >> + debug("%s: Incorrect uclass %s for block device '%s'\n", >> + __func__, uclass_get_name(id), dev->name); >> + return -ENOTBLK; >> + } >> + ret = device_probe(dev); >> + if (ret) >> + return ret; >> + *devp = dev; >> + >> + return 0; >> +} >> + >> int blk_find_max_devnum(enum if_type if_type) >> { >> struct udevice *dev; >> diff --git a/include/blk.h b/include/blk.h >> index a128ee4841..4d60987f61 100644 >> --- a/include/blk.h >> +++ b/include/blk.h >> @@ -616,4 +616,11 @@ ulong blk_write_devnum(enum if_type if_type, int >> devnum, lbaint_t start, >> */ >> int blk_select_hwpart_devnum(enum if_type if_type, int devnum, int hwpart); >> >> +/** >> + * blk_get_from_parent() - obtain a block device by looking up its parent >> + * >> + * All devices with >> + */ >> +int blk_get_from_parent(struct udevice *parent, struct udevice **devp); > > Don't need to consider whether CONFIG_BLK is defined or not? > blk_get_from_parent() is declared in blk-uclass.c Well in that case this function will not be called, so I think it is OK. > > Best Regards, > Jaehoon Chung - Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 00/31] dm: tegra: Move nyan-big and beaver to livetree
Hi Tom (Warren) / Marcel, On 2 June 2017 at 21:03, Simon Glasswrote: > > This moves an entire board to use a live device tree as an example of the > impact. > > Nyan-big was chosen because I can easily and boot U-Boot without any > media swapping, etc. Beaver is enabled as well since it failed to boot > with serial v1 due to a disabled console node. > Have you been able to test this v2 series? Some problems were reported with v1 and I have found a few more since I discovered my jetson-tk1 board. I'm planning to send a v3 soon, but please let me know if you see any issues. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] common, image-sig: [BUG?] if no valid signature node found, do not boot signed FIT image
Hi Heiko, On 8 June 2017 at 03:52, Heiko Schocherwrote: > fit_image_verify_required_sigs() must return != 0, on error. > > When fit_image_verify_required_sigs() does not find a signature > node, it returns 0, which leads in booting a signed FIT image. > > Fix this! > > Signed-off-by: Heiko Schocher > --- > > Found on an imx28 based board, with key dtb appended to u-boot.bin. > > Booting signed FIT image without an valid key dtb appended to u-boot.bin > shows: > > Using FEC1 device > TFTP from server 192.168.1.1; our IP address is 192.168.20.103 > Filename '/tftpboot/xxx/20170509/signed.fit'. > Load address: 0x4200 > Loading: # > [...] > ### > 3.3 MiB/s > done > Bytes transferred = 12560801 (bfa9a1 hex) >Using 'conf@1' configuration >Verifying Hash Integrity ... OK >Trying 'kernel@1' kernel subimage > Description: Linux kernel > Created: 2017-06-08 9:10:14 UTC > Type: Kernel Image > Compression: uncompressed > Data Start: 0x42c0 > Data Size:4078928 Bytes = 3.9 MiB > Architecture: ARM > OS: Linux > Load Address: 0x40008000 > Entry Point: 0x40008000 > Hash algo:sha256 > Hash value: > 6d1dce3e08133ac4d34c0e07ce266f5cffc6f5a2713619c9ff76ca4b04df4a5b > Sign algo:sha256,rsa4096:dev > Sign value: xxx > Timestamp:2017-06-08 9:10:15 UTC >Verifying Hash Integrity ... sha256+ sha256,rsa4096:dev- OK > ^^ > >Using 'conf@1' configuration >Trying 'ramdisk@1' ramdisk subimage > Description: miro ramdisk > Created: 2017-06-08 9:10:14 UTC > Type: RAMDisk Image > Compression: gzip compressed > Data Start: 0x423e92b0 > Data Size:8457506 Bytes = 8.1 MiB > Architecture: ARM > OS: Linux > Load Address: 0x > Entry Point: 0x > Hash algo:sha256 > Hash value: > da60884efa4373e7003940a56271c326f159ff74356ded28d8ebe108af807cda > Sign algo:sha256,rsa4096:dev > Sign value: xxx > Timestamp:2017-06-08 9:10:15 UTC >Verifying Hash Integrity ... sha256+ sha256,rsa4096:dev- OK > ^^ >Using 'conf@1' configuration >Trying 'fdt@1' fdt subimage > Description: miro device tree > Created: 2017-06-08 9:10:14 UTC > Type: Flat Device Tree > Compression: uncompressed > Data Start: 0x423e41b4 > Data Size:19852 Bytes = 19.4 KiB > Architecture: ARM > Hash algo:sha256 > Hash value: > 9b39c3ab6227bb8f0bcebc0bb64439248a6670dfe873bb1c6536764e0dc1623c > Sign algo:sha256,rsa4096:dev > Sign value: xxx > Timestamp:2017-06-08 9:10:15 UTC >Verifying Hash Integrity ... sha256+ sha256,rsa4096:dev- OK > ^^ >Booting using the fdt blob at 0x423e41b4 >Loading Kernel Image ... OK >Loading Ramdisk to 47303000, end 47b13d22 ... OK >Loading Device Tree to 472fb000, end 47302d8b ... OK > > Starting kernel ... > > [0.00] Booting Linux on physical CPU 0x0 > [0.00] Linux version 4.11.0 (h...@hercules.denx.de) (gcc version > 6.2.0 (GCC) ) #1 Tue May 16 07:31:30 CEST 2017 > [...] > > And linux boots ... which is bad, as we have no valid key appended > to u-boot.bin ... > > With this patch it shows: > >Using 'conf@1' configuration >Verifying Hash Integrity ... OK >Trying 'kernel@1' kernel subimage > Description: Linux kernel > Created: 2017-06-08 9:34:28 UTC > Type: Kernel Image > Compression: uncompressed > Data Start: 0x42c0 > Data Size:4078928 Bytes = 3.9 MiB > Architecture: ARM > OS: Linux > Load Address: 0x40008000 > Entry Point: 0x40008000 > Hash algo:sha256 > Hash value: > 6d1dce3e08133ac4d34c0e07ce266f5cffc6f5a2713619c9ff76ca4b04df4a5b > Sign algo:sha256,rsa4096:dev > Sign value: xxx > Timestamp:2017-06-08 9:34:29 UTC >Verifying Hash Integrity ... error! > Unable to verify required signature for '' hash node in 'kernel@1' image node > Bad Data Hash > ERROR: can't get kernel image! > => > > > common/image-sig.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/common/image-sig.c b/common/image-sig.c > index 455f2b9..646fb08 100644 > --- a/common/image-sig.c > +++ b/common/image-sig.c > @@ -265,7 +265,7 @@ int fit_image_verify_required_sigs(const void *fit, int > image_noffset, > if (sig_node < 0) { > debug("%s: No signature node found: %s\n", __func__, > fdt_strerror(sig_node)); > - return 0; > +
Re: [U-Boot] [PATCH 05/12] arm: Don't try to support CONFIG_ARMV7_LPAE on ARMv4T
Hi Tom. On 22 May 2017 at 19:15, Tom Riniwrote: > On Mon, May 22, 2017 at 05:17:25AM -0600, Simon Glass wrote: > >> At present if CONFIG_ARMV7_LPAE is defined then mmu_setup() will use >> instructions which are invalid on ARMv4T. This happens on Tegra since it >> has an ARMv4T boot CPU. Add a check for the architecture version to allow >> the code to be built. It will not actually be executed by the boot CPU, >> but needs to compile. >> >> Signed-off-by: Simon Glass >> --- >> >> arch/arm/lib/cache-cp15.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c >> index 0f7020a315..f293573601 100644 >> --- a/arch/arm/lib/cache-cp15.c >> +++ b/arch/arm/lib/cache-cp15.c >> @@ -129,7 +129,7 @@ static inline void mmu_setup(void) >> dram_bank_mmu_setup(i); >> } >> >> -#ifdef CONFIG_ARMV7_LPAE >> +#if defined(CONFIG_ARMV7_LPAE) && __LINUX_ARM_ARCH__ != 4 >> /* Set up 4 PTE entries pointing to our 4 1GB page tables */ >> for (i = 0; i < 4; i++) { >> u64 *page_table = (u64 *)(gd->arch.tlb_addr + (4096 * 4)); > > Wait, how do we get to this situation again, and how does it end up > being OK? SPL gets built for ARMv4T and U-Boot proper is built for v7, > and we end up doing LPAE enable in full U-Boot? Eek sorry I missed this question. The problem is that with ARMv4T this code does not currently build. On Tegra, if we enable CONFIG_ARMV7_LPAE, this code runs on ARMv7, but it still compiled by the ARMv7 boot CPU. So the change here is to make sure it is not compiled for ARMv4T. Another way of thinking about this is that ARMv4T does not support LPAE but we have no way to enable the option only for ARMv7. Both CPUs compile the same code. The __LINUX_ARM_ARCH__ option helps with this. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] rkcommon.c: Remove unused rkcommon_spi_to_offset
This function is unused, remove. Reported by clang-3.8. Fixes: a1c29d4b43dc ("rockchip: mkimage: set init_boot_size to avoid ...") Cc: Philipp TomsichSigned-off-by: Tom Rini --- tools/rkcommon.c | 5 - 1 file changed, 5 deletions(-) diff --git a/tools/rkcommon.c b/tools/rkcommon.c index fd95abc79aed..a29dc6a5453a 100644 --- a/tools/rkcommon.c +++ b/tools/rkcommon.c @@ -226,11 +226,6 @@ static inline unsigned rkcommon_offset_to_spi(unsigned offset) return ((offset & ~0x7ff) << 1) + (offset & 0x7ff); } -static inline unsigned rkcommon_spi_to_offset(unsigned offset) -{ - return ((offset & ~0x7ff) >> 1) + (offset & 0x7ff); -} - static int rkcommon_parse_header(const void *buf, struct header0_info *header0, struct spl_info **spl_info) { -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Please pull u-boot-dm
Hi Tom, This includes the utf-8 fixes for patman and buildman as well as chain-loading support for two Chromebooks. The following changes since commit 156d64fa55e9914b144c5e83f2a9e13d1223a4d3: Merge git://git.denx.de/u-boot-rockchip (2017-06-08 12:14:11 -0400) are available in the git repository at: git://git.denx.de/u-boot-dm.git for you to fetch changes up to ade56ff5d33bb1e0bc9babec3efe298165245c64: cmd/fdt: support single value replacement within an array (2017-06-08 20:22:00 -0600) Daniel Schwierzeck (2): buildman: disable localized and unicode output of all build tools buildman: properly translate strings for log and err files to ASCII Hannes Schmelzer (1): cmd/fdt: support single value replacement within an array Philipp Tomsich (1): patman: encode CC list to UTF-8 Simon Glass (37): patman: Adjust handling of unicode email address patman: Don't convert input data to unicode patman: Rename 'str' variable in EmailPatches() patman: Don't report unicode character patman: Don't return the series in FixPatches() patman: Add unicode to test patches patman: Add a maintainer test feature to MakeCcFile() patman: Rename 'list' variable in MakeCcFile() patman: Add a functional test display_options: Refactor to allow obtaining the banner Allow displaying the U-Boot banner on a video display arm: arm720t: Support CONFIG_SKIP_LOWLEVEL_INIT_ONLY arm: Rename HCTR to HTCR arm: Don't try to support CONFIG_ARMV7_LPAE on ARMv4T arm: Disable LPAE if not enabled power: regulator: Add more debugging and fix a missing newline tegra: Init clocks even when SPL did not run tegra: dts: Add cros-ec SPI settings tegra: spi: Wait a little after setting the clocks tegra: nyan-big: Enable the dhrystone benchmark tegra: video: Don't power up the SOR twice tegra: Enable CP15 init tegra: clock: Avoid a divide-by-zero error tegra: nyan-big: Add a .its file for chromium README: Add instructions for chain-loading U-Boot rockchip: Setup default PWM flags rockchip: Fix regualtor typo in veyron rockchip: rk3288: Add error debugging to veyron_init() rockchip: video: Add remove() methods rockchip: video: Take the vop device out of standby rockchip: jerry: Add a .its file for chromium rockchip: rk3288: Convert clock driver to use shifted masks rockchip: Init clocks again when chain-loading rockchip: rk3288: Allow setting up clocks in U-Boot proper rockchip: Enable the video display banner rockchip: jerry: Disable CONFIG_CONSOLE_SCROLL_LINES README: Add instructions for chain-loading U-Boot on jerry Tom Rini (2): sandbox: Fix comparison of unsigned enum expression warning buildman: Fix bloat option when 'new' only drops functions arch/arm/cpu/arm720t/start.S | 6 +- arch/arm/dts/rk3288-veyron-jerry.dts | 2 +- arch/arm/dts/tegra124-nyan-big-u-boot.dtsi | 9 + arch/arm/include/asm/arch-rockchip/cru_rk3288.h| 74 +++--- arch/arm/include/asm/arch-tegra/clock.h| 3 + arch/arm/lib/cache-cp15.c | 13 +- arch/arm/mach-rockchip/rk3288-board.c | 39 +++- arch/arm/mach-tegra/board2.c | 3 + arch/arm/mach-tegra/clock.c| 10 +- arch/arm/mach-tegra/tegra124/clock.c | 18 ++ arch/sandbox/cpu/os.c | 2 +- cmd/fdt.c | 29 ++- cmd/version.c | 4 +- common/board_r.c | 1 + common/console.c | 15 +- configs/chromebook_jerry_defconfig | 2 +- configs/nyan-big_defconfig | 2 + doc/README.chromium| 252 + doc/chromium/chromebook_jerry.its | 42 doc/chromium/devkeys/kernel.keyblock | Bin 0 -> 1208 bytes doc/chromium/devkeys/kernel_data_key.vbprivk | Bin 0 -> 1199 bytes doc/chromium/nyan-big.its | 42 drivers/clk/rockchip/clk_rk3288.c | 146 ++-- drivers/power/regulator/regulator-uclass.c | 8 +- drivers/pwm/rk_pwm.c | 1 + drivers/spi/tegra114_spi.c | 1 + drivers/video/rockchip/rk3288_vop.c| 14 ++ drivers/video/rockchip/rk_edp.c| 16 +- drivers/video/rockchip/rk_vop.c| 3 + drivers/video/tegra124/sor.c | 9 + include/configs/rockchip-common.h | 2 + include/configs/tegra-common-post.h| 2 +-
Re: [U-Boot] standalone application
On Wed, Jun 07, 2017 at 08:07:11AM +0300, Ran Shalit wrote: > Hello, > > I am trying to load standalone application. > It works fine with the hello_world example ( bin format). > Then I move to build and run another application (uc/os) in eclipse. > The problem is that the bin format is very large. > Is there a way to load other a standalone application in another format ? Generally speaking ELF binaries will be able to be run. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] u-boot-dm crashes on NVIDIA Jetson TX1 running "version"
On 06/08/2017 07:02 PM, Stephen Warren wrote: > Simon, > > With the latest code in u-boot-dm.git/master, the "version" command > crashes on p2371-2180 (NVIDIA Jetson TX1); see log below. Preliminary > results show complete failure on Beaver and Jetson TK1 (the tests are > running so I can't see the full logs yet, but every py.test test that's > completed so far results in an error, so perhaps the same issue or > perhaps something else) Beaver and Jetson never even get to the prompt: U-Boot SPL 2017.07-rc1-19807-g9fb9a18 (Jun 08 2017 - 17:17:22) Trying to boot from RAM U-Boot 2017.07-rc1-19807-g9fb9a18 (Jun 08 2017 - 17:17:22 -0700), Build: jenkins-u-boot-denx_uboot_dm-master-build-U_TEGRA30 Model: NVIDIA Beaver Board: NVIDIA Beaver DRAM: 2 GiB <> U-Boot SPL 2017.07-rc1-19807-g9fb9a18 (Jun 08 2017 - 17:18:14) Trying to boot from RAM U-Boot 2017.07-rc1-19807-g9fb9a18 (Jun 08 2017 - 17:18:14 -0700), Build: jenkins-u-boot-denx_uboot_dm-master-build-U_TEGRA124 Model: NVIDIA Jetson TK1 Board: NVIDIA Jetson TK1 DRAM: 2 GiB <> ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] common, image-sig: [BUG?] if no valid signature node found, do not boot signed FIT image
On Thu, Jun 08, 2017 at 11:52:45AM +0200, Heiko Schocher wrote: > fit_image_verify_required_sigs() must return != 0, on error. > > When fit_image_verify_required_sigs() does not find a signature > node, it returns 0, which leads in booting a signed FIT image. > > Fix this! > > Signed-off-by: Heiko SchocherGood catch. Did you confirm that the sandbox tests still work? And can you construct a new test for this case? Thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] u-boot-dm crashes on NVIDIA Jetson TX1 running "version"
Simon, With the latest code in u-boot-dm.git/master, the "version" command crashes on p2371-2180 (NVIDIA Jetson TX1); see log below. Preliminary results show complete failure on Beaver and Jetson TK1 (the tests are running so I can't see the full logs yet, but every py.test test that's completed so far results in an error, so perhaps the same issue or perhaps something else) U-Boot 2017.07-rc1-19807-g9fb9a18fd8 (Jun 08 2017 - 18:22:11 -0600), Build: jenkins-u-boot-denx_uboot_dm-master-buildTEGRA210 Model: NVIDIA P2371-2180 Board: NVIDIA P2371-2180 DRAM: 3.5 GiB MMC: sdhci@700b: 1, sdhci@700b0600: 0 *** Warning - bad CRC, using default environment In:serial Out: serial Err: serial Net: No ethernet found. Hit any key to stop autoboot: 2 %08%08%08 0 Tegra210 (P2371-2180) # [-] Stream: console Tegra210 (P2371-2180) # version U-Boot 2017.07-rc1-19807-g9fb9a18fd8 (Jun 08 2017 - 18:22:11 -0600), Build: jenkins-u-boot-denx_uboot_dm-master-build-Uaarch64-linux-gnu-gcc (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1) 4.8.4 GNU ld (GNU Binutils for Ubuntu) 2.24 "Synchronous Abort" handler, esr 0x9621 ELR: dff437b0 LR: dff43d94 x0 : 000b x1 : x2 : 0001 x3 : 0002 x4 : 70006000 x5 : ff80ffc8 x6 : x7 : dda27360 x8 : 0001 x9 : 0008 x10: 000d x11: 0006 x12: dff86000 x13: 0040 x14: 0001 x15: dff31404 x16: 0000 x17: 0001 x18: dda2cdf0 x19: 000b x20: x21: x22: x23: x24: x25: x26: 0001 x27: 000b x28: x29: dda27460 Resetting CPU ... ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/3] bootstage: Dont print reset entry separately
On Tue, May 30, 2017 at 02:22:11PM +0200, Michal Simek wrote: > From: Siva Durga Prasad Paladugu> > Printing the first entry reset separately is no longer > needed as it now prints the entries with valid name and > timestamp zero. This removes duplicate printing of the reset > record. > > Signed-off-by: Siva Durga Prasad Paladugu > Signed-off-by: Michal Simek Can you please rebase this and the rest of the series on top of master again? And please cc Simon when you repost, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] x86: extend baudrate table with 57600
On Thu, Jun 08, 2017 at 09:38:49AM +0200, Christian Gmeiner wrote: > Hi Tom > > 2017-06-06 22:04 GMT+02:00 Tom Rini: > > On Tue, Jun 06, 2017 at 01:51:38PM +0200, Christian Gmeiner wrote: > > > >> Signed-off-by: Christian Gmeiner > >> --- > >> include/configs/x86-common.h | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h > >> index b5ef8b5..9a97714 100644 > >> --- a/include/configs/x86-common.h > >> +++ b/include/configs/x86-common.h > >> @@ -56,7 +56,7 @@ > >> * Serial Configuration > >> */ > >> #define CONFIG_SYS_BAUDRATE_TABLE{300, 600, 1200, 2400, 4800, \ > >> - 9600, 19200, 38400, 115200} > >> + 9600, 19200, 38400, 57600, 115200} > >> #define CONFIG_SYS_NS16550_PORT_MAPPED > >> > >> #define CONFIG_CMDLINE_EDITING > > > > Can we just use the fall back table instead? Thanks! > > Can you point me to the "fall back table"? If one isn't defined the one in is used. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] rockchip: dts: rk3328: add aliases for mmc controller
Simon, After the long discuss, this patch can be applied without any update, right? Thanks, - Kever On 05/23/2017 04:26 AM, Simon Glass wrote: On 18 May 2017 at 02:05, Kever Yangwrote: Add aliases for mmc controller to get a fixed order with emmc at index 0 and sdmmc at index 1. Signed-off-by: Kever Yang --- arch/arm/dts/rk3328.dtsi | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 4/4] arm: am33xx: Add support for mulitiple PLL input frequencies
On Thu, Jun 08, 2017 at 10:17:09AM +0530, Lokesh Vutla wrote: > > > On Thursday 08 June 2017 12:20 AM, Emmanuel Vadot wrote: > > On Fri, 12 May 2017 13:20:50 -0400 > > Tom Riniwrote: > > > >> On Fri, May 05, 2017 at 12:59:10PM +0530, Lokesh Vutla wrote: > >> > >>> am335x supports various sysclk frequencies which can be determined > >>> using sysboot pins. PLLs should be configures based on this > >>> sysclk frequency. Add PLL configurations for all supported > >>> frequencies. > >>> > >>> Signed-off-by: Lokesh Vutla > >>> Reviewed-by: Tom Rini > >> > >> Applied to u-boot/master, thanks! > >> > >> -- > >> Tom > > > > Hello, > > > > This appears to break beaglebone black support, reverting this commit > > make u-boot works again. > > hmm..I see the problem. Here we are hard coding MPU freq to 1GHz even > efuse say it is not supported(I am not sure why this is being done, may > be Tom can give more details). Even in kernel I see that cpufreq is > reading efuse to determine mpu frequency. Now that we have jitter > optimized pll configurations, looks like unsupported freq is causing an > issue. Can you see if the below patch helps? Well, in the kernel, did anyone poke the Beagleboard folks about this, before pushing the change? There's BBB shipping with chips that did not have their efuses set, hence the way things were structured in U-Boot. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: Add Kconfig symbols used for Linux asm compatibility
Hi Tom, > -Original Message- > From: Tom Rini [mailto:tr...@konsulko.com] > Sent: Thursday, June 08, 2017 5:12 PM > To: Vikas MANOCHA> Cc: Phil Edworthy ; Albert Aribaud > ; Kamil Lulko > ; u-boot@lists.denx.de > Subject: Re: [PATCH 1/2] arm: Add Kconfig symbols used for Linux asm > compatibility > > On Fri, Jun 09, 2017 at 12:07:40AM +, Vikas MANOCHA wrote: > > > Hi Albert/Tom, > > > > > -Original Message- > > > From: Phil Edworthy [mailto:phil.edwor...@renesas.com] > > > Sent: Wednesday, May 31, 2017 11:33 PM > > > To: Albert Aribaud > > > Cc: Tom Rini ; Vikas MANOCHA > > > ; Kamil Lulko ; u- > > > b...@lists.denx.de; Phil Edworthy > > > Subject: [PATCH 1/2] arm: Add Kconfig symbols used for Linux asm > > > compatibility > > > > > > Rather than change asm files that come from Linux, add the symbols > > > to Kconfig. Since one of the symbols is for thumb2 builds, make CPU_V7M > > > always select them. > > > > > > Signed-off-by: Phil Edworthy > > > --- > > > arch/arm/Kconfig | 10 ++ > > > arch/arm/lib/Makefile | 2 -- > > > 2 files changed, 10 insertions(+), 2 deletions(-) > > > > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index > > > 2a3a36e..2793651 100644 > > > --- a/arch/arm/Kconfigl > > > +++ b/arch/arm/Kconfig > > > @@ -19,6 +19,15 @@ config HAS_VBAR > > > config HAS_THUMB2 > > > bool > > > > > > +# Used for compatibility with asm files copied from the kernel > > > +config ARM_ASM_UNIFIED > > > + bool > > > + default y > > > > Is every arm arch (arm720, arm926 etc) assembly code written for unified ? > > Otherwise we might have run-time side effects. > > I could be missing something, but this is only used by and > in turn only by arch/arm/lib/*.S, where we already had > been defining this. Yes, you are right. I was under the impression that asm/assembler.h is being used by all arm archs everywhere like startup code, cache mgt etc. Cheers, Vikas > > -- > Tom ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: Add Kconfig symbols used for Linux asm compatibility
Hi Albert/Tom, > -Original Message- > From: Phil Edworthy [mailto:phil.edwor...@renesas.com] > Sent: Wednesday, May 31, 2017 11:33 PM > To: Albert Aribaud> Cc: Tom Rini ; Vikas MANOCHA ; > Kamil Lulko ; u- > b...@lists.denx.de; Phil Edworthy > Subject: [PATCH 1/2] arm: Add Kconfig symbols used for Linux asm compatibility > > Rather than change asm files that come from Linux, add the symbols to > Kconfig. Since one of the symbols is for thumb2 builds, make > CPU_V7M always select them. > > Signed-off-by: Phil Edworthy > --- > arch/arm/Kconfig | 10 ++ > arch/arm/lib/Makefile | 2 -- > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2a3a36e..2793651 100644 > --- a/arch/arm/Kconfigl > +++ b/arch/arm/Kconfig > @@ -19,6 +19,15 @@ config HAS_VBAR > config HAS_THUMB2 > bool > > +# Used for compatibility with asm files copied from the kernel config > +ARM_ASM_UNIFIED > + bool > + default y Is every arm arch (arm720, arm926 etc) assembly code written for unified ? Otherwise we might have run-time side effects. Cheers, Vikas > + > +# Used for compatibility with asm files copied from the kernel config > +THUMB2_KERNEL > + bool > + > # If set, the workarounds for these ARM errata are applied early during > U-Boot # startup. Note that in general these options force > the workarounds to be # applied; no CPU-type/version detection exists, > unlike the similar options in @@ -128,6 +137,7 @@ config > CPU_V7 config CPU_V7M > bool > select HAS_THUMB2 > + select THUMB2_KERNEL > select SYS_CACHE_SHIFT_5 > > config CPU_PXA > diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index > f162c14..6e1c436 100644 > --- a/arch/arm/lib/Makefile > +++ b/arch/arm/lib/Makefile > @@ -72,8 +72,6 @@ ifneq (,$(findstring > -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) > extra-y += eabi_compat.o > endif > > -asflags-y += -DCONFIG_ARM_ASM_UNIFIED > - > # some files can only build in ARM or THUMB2, not THUMB1 > > ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD > -- > 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-rockchip
On Thu, Jun 08, 2017 at 06:53:32AM -0600, Simon Glass wrote: > Hi Tom, > > Here is additional rk3368 and rk3399 support, rv1108 support, > refactoring HDMI video (brought in from Anatolij's tree to resolve > conflicts), some mkimage fixes and a few other things. > > New boards supported are: > > aarch64: sheep-rk3368 evb-px5 geekbox >arm: evb-rv1108 > > > The following changes since commit 24796d27be0d0f403ed6ad7e3022b33e36ac08b5: > > Merge git://git.denx.de/u-boot-ubi (2017-06-06 07:13:39 -0400) > > are available in the git repository at: > > git://git.denx.de/u-boot-rockchip.git > > for you to fetch changes up to 6c53d680c6b57bb9617a93cd1e92c242ae0aab21: > > rockchip: board: puma_rk3399: enable BMP_16BPP, BMP_24BPP and > BMP_32BPP (2017-06-07 21:30:50 -0600) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 01/28] display_options: Refactor to allow obtaining the banner
Move the display options code into a separate function so that the U-Boot banner can be obtained from other code. Adjust the 'version' command to use it. Signed-off-by: Simon Glass--- Changes in v2: None cmd/version.c | 4 +++- include/display_options.h | 15 +++ lib/display_options.c | 21 + 3 files changed, 35 insertions(+), 5 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 05/28] arm: Don't try to support CONFIG_ARMV7_LPAE on ARMv4T
At present if CONFIG_ARMV7_LPAE is defined then mmu_setup() will use instructions which are invalid on ARMv4T. This happens on Tegra since it has an ARMv4T boot CPU. Add a check for the architecture version to allow the code to be built. It will not actually be executed by the boot CPU, but needs to compile. Signed-off-by: Simon Glass--- Changes in v2: None arch/arm/lib/cache-cp15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 09/28] tegra: dts: Add cros-ec SPI settings
At present the interrupt does not work and the SPI bus runs much less quickly than it should. Add settings to fix this. Signed-off-by: Simon Glass--- Changes in v2: None arch/arm/dts/tegra124-nyan-big-u-boot.dtsi | 9 + 1 file changed, 9 insertions(+) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] cmd/fdt: support single value replacement within an array
s...@google.com schrieb am 01.06.2017 05:11:57: >wrote: > > With this commit we can modify single values within an array of a dts > > property. > > > > This is useful if we have for example a pwm-backlight where we want to > > modifiy the pwm frequency per u-boot script. > > > > The pwm is described in dts like this: > > > > backlight { > > pwms = <0x002b 0x 0x004c4b40>; > > }; > > > > For changing the frequency, here the 3rd parameter, we simply type: > > > > fdt set /backlight pwms ; > > > > For doing all this we: > > - backup the property content into our 'SCRATCHPAD' > > - only modify the array-cell if the new content doesn't start with '?' > > > > Signed-off-by: Hannes Schmelzer > > > > --- > > > > cmd/fdt.c | 29 + > > 1 file changed, 21 insertions(+), 8 deletions(-) > > Reviewed-by: Simon Glass > > I imagine this would have to be done before setting 'stdout' to > 'vidconsole' so that the PWM is not inited before this script runs. Yes, if lcd output is used already in u-boot this is correct. For my case i don't have any output in u-boot, but later on within linux environment. But setting some pwm frequency is only one example for using this, every other array-property can also be modified with this. cheers, Hannes Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 13/28] tegra: Enable CP15 init
At present CP15 init is disabled on tegra. Use the correct option so that this init is performed on boot. This enables the instruction cache, for example, which is critical to the machine running at full speed. Signed-off-by: Simon Glass--- Changes in v2: None include/configs/tegra-common-post.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 04/28] arm: Rename HCTR to HTCR
This appears to be a typo. Fix it. Signed-off-by: Simon Glass--- Changes in v2: None arch/arm/lib/cache-cp15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 06/28] arm: Disable LPAE if not enabled
If CONFIG_ARMV7_LPAE is not defined we should make sure that the feature is disabled. This can happen if U-Boot is chain-loaded from another boot loader which does enable LPAE. Signed-off-by: Simon Glass--- Changes in v2: None arch/arm/lib/cache-cp15.c | 9 + 1 file changed, 9 insertions(+) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 25/28] rockchip: rk3288: Allow setting up clocks in U-Boot proper
If U-Boot is chain-loaded from a previous boot loader we must set up the clocks the way U-Boot wants them. Add code for this. It will do nothing if SPL has already done the job. Signed-off-by: Simon Glass--- Changes in v2: None arch/arm/mach-rockchip/rk3288-board.c | 35 +++ configs/chromebook_jerry_defconfig| 1 + 2 files changed, 36 insertions(+) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 03/28] arm: arm720t: Support CONFIG_SKIP_LOWLEVEL_INIT_ONLY
This option allows skipping the call to lowlevel() while still performing CP15 init. Support this on ARM720T so it can be used with Tegra. Signed-off-by: Simon Glass--- Changes in v2: None arch/arm/cpu/arm720t/start.S | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 02/28] Allow displaying the U-Boot banner on a video display
At present the U-Boot banner is only displayed on the serial console. If this is not visible to the user, the banner does not show. Some devices have a video display which can usefully display this information. Add a banner which is printed after relocation only on non-serial devices if CONFIG_DISPLAY_BOARDINFO_LATE is defined. Signed-off-by: Simon Glass--- Changes in v2: None common/board_r.c | 1 + common/console.c | 15 +++ include/console.h | 12 3 files changed, 24 insertions(+), 4 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 15/28] tegra: nyan-big: Add a .its file for chromium
Add a sample .its file for booting U-Boot on a nyan-big Chromebook. Signed-off-by: Simon Glass--- Changes in v2: - Add new patch containing a .its file for chromium doc/chromium/nyan-big.its | 42 ++ 1 file changed, 42 insertions(+) create mode 100644 doc/chromium/nyan-big.its Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 19/28] rockchip: rk3288: Add error debugging to veyron_init()
Add a debug() statement so we can see when something goes wrong with the regulator. Signed-off-by: Simon Glass--- Changes in v2: None arch/arm/mach-rockchip/rk3288-board.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 08/28] tegra: Init clocks even when SPL did not run
At present early clock init happens in SPL. If SPL did not run (because for example U-Boot is chain-loaded from another boot loader) then the clocks are not set as U-Boot expects. Add a function to detect this and call the early clock init in U-Boot proper. Signed-off-by: Simon Glass--- Changes in v2: None arch/arm/include/asm/arch-tegra/clock.h | 3 +++ arch/arm/mach-tegra/board2.c| 3 +++ arch/arm/mach-tegra/clock.c | 5 + arch/arm/mach-tegra/tegra124/clock.c| 18 ++ 4 files changed, 29 insertions(+) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: Add Kconfig symbols used for Linux asm compatibility
On Fri, Jun 09, 2017 at 12:07:40AM +, Vikas MANOCHA wrote: > Hi Albert/Tom, > > > -Original Message- > > From: Phil Edworthy [mailto:phil.edwor...@renesas.com] > > Sent: Wednesday, May 31, 2017 11:33 PM > > To: Albert Aribaud> > Cc: Tom Rini ; Vikas MANOCHA ; > > Kamil Lulko ; u- > > b...@lists.denx.de; Phil Edworthy > > Subject: [PATCH 1/2] arm: Add Kconfig symbols used for Linux asm > > compatibility > > > > Rather than change asm files that come from Linux, add the symbols to > > Kconfig. Since one of the symbols is for thumb2 builds, make > > CPU_V7M always select them. > > > > Signed-off-by: Phil Edworthy > > --- > > arch/arm/Kconfig | 10 ++ > > arch/arm/lib/Makefile | 2 -- > > 2 files changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2a3a36e..2793651 > > 100644 > > --- a/arch/arm/Kconfigl > > +++ b/arch/arm/Kconfig > > @@ -19,6 +19,15 @@ config HAS_VBAR > > config HAS_THUMB2 > > bool > > > > +# Used for compatibility with asm files copied from the kernel config > > +ARM_ASM_UNIFIED > > + bool > > + default y > > Is every arm arch (arm720, arm926 etc) assembly code written for unified ? > Otherwise we might have run-time side effects. I could be missing something, but this is only used by and in turn only by arch/arm/lib/*.S, where we already had been defining this. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 21/28] rockchip: video: Take the vop device out of standby
On Wed, 31 May 2017 17:57:29 -0600 Simon Glass s...@chromium.org wrote: > On reset the standby bit is clear, but if U-Boot is chain-loaded from > another boot loader it may be set. Clear it before starting up video so > that it works correctly. > > Signed-off-by: Simon Glass> --- > > Changes in v2: None > > drivers/video/rockchip/rk_vop.c | 3 +++ > 1 file changed, 3 insertions(+) Acked-by: Anatolij Gustschin Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 24/28] rockchip: Init clocks again when chain-loading
Detect with a previous boot loader has already set up the clocks and set them up again so that U-Boot gets what it expects. Signed-off-by: Simon Glass--- Changes in v2: None drivers/clk/rockchip/clk_rk3288.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 14/28] tegra: clock: Avoid a divide-by-zero error
The clock fix-up for tegra is still present in the code. It causes a divide-by-zero bug after relocation when chain-loading U-Boot from coreboot. Fix this by adding a check. Signed-off-by: Simon GlassFixes: 7468676 (ARM: tegra: fix clock_get_periph_rate() for UART clocks) --- Changes in v2: None arch/arm/mach-tegra/clock.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 12/28] tegra: video: Don't power up the SOR twice
Hi Simon, On Wed, 31 May 2017 17:57:20 -0600 Simon Glass s...@chromium.org wrote: > If U-Boot is the secondary boot loader, or has been run from itself, the > SOR may already be powered up. Powering it up again causes a hang, so > detect this situation and skip it. > > Signed-off-by: Simon Glass> --- > > Changes in v2: None > > drivers/video/tegra124/sor.c | 9 + > 1 file changed, 9 insertions(+) Acked-by: Anatolij Gustschin Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 20/28] rockchip: video: Add remove() methods
On Wed, 31 May 2017 17:57:28 -0600 Simon Glass s...@chromium.org wrote: > Add remove() methods for EDP and VOP so that U-Boot can shut down the > video on exit. This avoids leaving DMA running while booting Linux which > can cause problems if Linux uses the frame buffer for something else. > > It also makes it clear what is needed to shut down video. > > While we are here, make rkvop_enable() static. > > Signed-off-by: Simon Glass> --- > > Changes in v2: None > > drivers/video/rockchip/rk_edp.c | 16 +++- > drivers/video/rockchip/rk_vop.c | 18 -- > 2 files changed, 31 insertions(+), 3 deletions(-) Acked-by: Anatolij Gustschin Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 23/28] rockchip: rk3288: Convert clock driver to use shifted masks
Shifted masks are the standard approach with rockchip since it allows use of the mask without shifting it each time. Update the definitions and the driver to match. Signed-off-by: Simon Glass--- Changes in v2: None arch/arm/include/asm/arch-rockchip/cru_rk3288.h | 74 --- drivers/clk/rockchip/clk_rk3288.c | 121 ++-- 2 files changed, 90 insertions(+), 105 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 27/28] rockchip: jerry: Disable CONFIG_CONSOLE_SCROLL_LINES
The display on jerry is so fast that this option is not needed. Drop it so that the display scrolls more smoothly. Signed-off-by: Simon Glass--- Changes in v2: None configs/chromebook_jerry_defconfig | 1 - 1 file changed, 1 deletion(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 17/28] rockchip: Setup default PWM flags
At present if the Signed-off-by: Simon GlassFixes: 874ee59 (rockchip: pwm: implement pwm_set_invert()) --- Changes in v2: None drivers/pwm/rk_pwm.c | 1 + 1 file changed, 1 insertion(+) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 11/28] tegra: nyan-big: Enable the dhrystone benchmark
Enable this so we can roughly measure CPU performance. Also enable the cache command to allow for timing. Signed-off-by: Simon Glass--- Changes in v2: None configs/nyan-big_defconfig | 2 ++ 1 file changed, 2 insertions(+) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 07/28] power: regulator: Add more debugging and fix a missing newline
On 06/01/2017 08:57 AM, Simon Glass wrote: > This file does not report a few possible errors and one message is missing > a newline. Fix these. > > Signed-off-by: Simon GlassReviewed-by: Jaehoon Chung And CC'd correct Lukasz's mail account. > --- > > Changes in v2: None > > drivers/power/regulator/regulator-uclass.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 26/28] rockchip: Enable the video display banner
Show the U-Boot banner and board information on the video display during boot. Signed-off-by: Simon Glass--- Changes in v2: None include/configs/rockchip-common.h | 2 ++ 1 file changed, 2 insertions(+) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 10/28] tegra: spi: Wait a little after setting the clocks
For devices that need a delay between SPI transactions we seem to need an additional delay before the first one if the CPU is running at full speed. Add this, under control of the existing setting. At present it will only be enabled with the Chrome OS EC. Signed-off-by: Simon Glass--- Changes in v2: None drivers/spi/tegra114_spi.c | 1 + 1 file changed, 1 insertion(+) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 22/28] rockchip: jerry: Add a .its file for chromium
Add a sample .its file for booting U-Boot on a jerry Chromebook. Signed-off-by: Simon Glass--- Changes in v2: - Add new patch containing a .its file for chromium doc/chromium/chromebook_jerry.its | 42 +++ 1 file changed, 42 insertions(+) create mode 100644 doc/chromium/chromebook_jerry.its Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] buildman: properly translate strings for log and err files to ASCII
The build output can still produce unicode encoded output. But in the buildman's log and err files we only want plain ASCII characters. To handle all situations with unicode and non-unicode output, encode the stdout and stderr strings to UTF-8 and afterwards to ASCII with replacing all special characters. Signed-off-by: Daniel Schwierzeck--- tools/buildman/builderthread.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 28/28] README: Add instructions for chain-loading U-Boot on jerry
Add instructions for chromebook_jerry. Signed-off-by: Simon Glass--- Changes in v2: - Add instructions and patches for chain-loading into U-Boot on jerry doc/README.chromium | 70 + 1 file changed, 70 insertions(+) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] buildman: disable localized and unicode output of all build tools
Build tools like Make, gcc or binutils support localized output or unicode encoded output dependent on the default system locale. This is not useful for buildman, where we want reproducible warning or error messages or where the output of binutils is further processed. Signed-off-by: Daniel Schwierzeck--- tools/buildman/toolchain.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/7] usb: dwc2-otg: make regs_otg (in platdata) a uintptr_t
Hi, On 8 June 2017 at 08:16, Tom Riniwrote: > On Wed, Jun 07, 2017 at 03:40:30PM +0200, Marek Vasut wrote: >> On 06/07/2017 03:37 PM, Simon Glass wrote: >> > Hi Marek, >> > >> > On 7 June 2017 at 07:33, Marek Vasut wrote: >> >> On 06/07/2017 03:28 PM, Simon Glass wrote: >> >>> Hi Marek, >> >>> >> >>> On 7 June 2017 at 06:55, Marek Vasut wrote: >> On 06/07/2017 02:53 PM, Simon Glass wrote: >> > Hi Marek, >> > >> > On 7 June 2017 at 06:41, Marek Vasut wrote: >> >> On 06/07/2017 02:38 PM, Simon Glass wrote: >> >>> +Tom for comment >> >>> >> >>> Hi Marek, >> >>> >> >>> On 7 June 2017 at 00:27, Marek Vasut wrote: >> On 06/07/2017 02:16 AM, Simon Glass wrote: >> > Hi, >> > >> > On 6 June 2017 at 17:59, Dr. Philipp Tomsich >> > wrote: >> >> Simon, >> >> >> >>> On 06 Jun 2017, at 23:09, Simon Glass wrote: >> >>> >> >>> Hi Philipp, >> >>> >> >>> On 6 June 2017 at 07:42, Philipp Tomsich >> >>> wrote: >> The regs_otg field in uintptr_t of the platform data structure >> for >> dwc2-otg has thus far been an unsigned int, but will eventually >> be >> casted into a void*. >> >> This raises the following error with GCC 6.3 and buildman: >> ../drivers/usb/gadget/dwc2_udc_otg.c: In function >> 'dwc2_udc_probe': >> ../drivers/usb/gadget/dwc2_udc_otg.c:821:8: warning: cast to >> pointer from integer of different size [-Wint-to-pointer-cast] >> reg = (struct dwc2_usbotg_reg *)pdata->regs_otg; >> ^ >> >> This changes regs_otg to a uintptr_t to ensure that it is large >> enough >> to hold any valid pointer (and fix the associated warning). >> >> Signed-off-by: Philipp Tomsich >> >> >> --- >> >> Changes in v2: >> - (new patch) fix a int-to-pointer cast warning for regs_otg in >> dwc2-otg to fix a buildman failure for >> u-boot-rockchip/master@2b19b2f >> >> include/usb/dwc2_udc.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/include/usb/dwc2_udc.h b/include/usb/dwc2_udc.h >> index 7324d8a..1a370e0 100644 >> --- a/include/usb/dwc2_udc.h >> +++ b/include/usb/dwc2_udc.h >> @@ -16,7 +16,7 @@ struct dwc2_plat_otg_data { >> int phy_of_node; >> int (*phy_control)(int on); >> unsigned intregs_phy; >> - unsigned intregs_otg; >> + uintptr_t regs_otg; >> >>> >> >>> Can you use ulong instead? >> >> >> >> Sure, but can I first ask “why?”. >> >> I may reopen an old discussion with this… if so, forgive my >> >> ignorance: >> >> >> >> uintptr_t makes the most sense for this use case in the C99 (or >> >> later) type system, >> >> as we want this field to hold an integer (i.e. the address from >> >> the physical memory >> >> map for one of the register blocks) that will be casted into a >> >> pointer. >> >> The uintptr_t type will always the matching size in any and all >> >> programming models; >> >> in contrast, ulong would be wrong for LLP64 (and LLP64 probably >> >> “doesn’t matter” >> >> in the context of U-Boot anyway). >> >> >> >> What I always found odd, was that uintptr_t is optional according >> >> to ISO9899. >> >> I would thus not have been surprised if there’s a concern for >> >> portability between >> >> compilers behind this, but then again … U-Boot makes extensive >> >> use of GCC >> >> extensions (such as inline assembly). >> >> >> >> So I am apparently missing something here. >> > >> > I don't know of any deep reason except that long is defined to be >> > able >> > to hold an address, and ulong makes sense since an address is >> > generally considered unsigned. >> > >> > U-Boot by convention uses ulong for addresses. >> >> I was under the impression that u-boot by convention uses uintptr_t >> for >> addresses. >> >> > You can see this all >> > around the code base so I am
Re: [U-Boot] [PATCH v2 3/3] dm: core: Add uclass_first/next_device_check()
Hi, On 23 April 2017 at 20:10, Simon Glasswrote: > Sometimes it is useful to iterate through all devices in a uclass and > skip over those which do not work correctly (e.g fail to probe). Add two > new functions to provide this feature. > > The caller must check the return value each time to make sure that the > device is valid. But the device pointer is always returned. > > Signed-off-by: Simon Glass > --- > > Changes in v2: > - Return even device, even those with errors > - Rename the functions > > drivers/core/uclass.c | 27 + > include/dm/uclass.h | 31 > test/dm/test-fdt.c| 80 > +++ > 3 files changed, 138 insertions(+) This patch has been sitting around for a while. Does anyone think it is useful? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] powerpc: mpc8536ds: Update maintainer
Signed-off-by: York Sun--- board/freescale/mpc8536ds/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/freescale/mpc8536ds/MAINTAINERS b/board/freescale/mpc8536ds/MAINTAINERS index 953072c..af221f9 100644 --- a/board/freescale/mpc8536ds/MAINTAINERS +++ b/board/freescale/mpc8536ds/MAINTAINERS @@ -1,5 +1,5 @@ MPC8536DS BOARD -#M:- +M: York Sun S: Maintained F: board/freescale/mpc8536ds/ F: include/configs/MPC8536DS.h -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [linux-sunxi] [PATCH v2] sun50i: a64: Add initial NanoPi A64 support
On 08/06/17 18:43, Jagan Teki wrote: Hi Jagan, > From: Jagan Teki> > NanoPi A64 is a new board of high performance with low cost > designed by FriendlyElec., using the Allwinner A64 SOC. > > Nanopi A64 features > - Allwinner A64, 64-bit Quad-core Cortex-A53@648MHz to 1.152GHz, DVFS > - 1GB DDR3 RAM > - MicroSD > - Gigabit Ethernet (RTL8211E) > - Wi-Fi 802.11b/g/n > - IR receiver > - Audio In/Out > - Video In/Out > - Serial Debug Port > - microUSB 5V 2A DC power-supply > > Signed-off-by: Jagan Teki > Tested-by: Jagan Teki > --- > Changes for v2: > - Drop CONSOLE_MUX > - Tested on board > > arch/arm/dts/Makefile |1 + > arch/arm/dts/sun50i-a64-nanopi-a64.dts | 94 + > board/sunxi/MAINTAINERS|5 + > configs/nanopi_a64_defconfig | 15 + > tools/libfdt.py| 992 > tools/libfdt_wrap.c| 9628 > Please don't merge those two files ;-) > 6 files changed, 10735 insertions(+) > create mode 100644 arch/arm/dts/sun50i-a64-nanopi-a64.dts > create mode 100644 configs/nanopi_a64_defconfig > create mode 100644 tools/libfdt.py > create mode 100644 tools/libfdt_wrap.c > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > index ae55f78..427cbab 100644 > --- a/arch/arm/dts/Makefile > +++ b/arch/arm/dts/Makefile > @@ -323,6 +323,7 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \ > sun50i-h5-orangepi-prime.dtb > dtb-$(CONFIG_MACH_SUN50I) += \ > sun50i-a64-bananapi-m64.dtb \ > + sun50i-a64-nanopi-a64.dtb \ > sun50i-a64-pine64-plus.dtb \ > sun50i-a64-pine64.dtb > dtb-$(CONFIG_MACH_SUN9I) += \ > diff --git a/arch/arm/dts/sun50i-a64-nanopi-a64.dts > b/arch/arm/dts/sun50i-a64-nanopi-a64.dts > new file mode 100644 > index 000..17a571a > --- /dev/null > +++ b/arch/arm/dts/sun50i-a64-nanopi-a64.dts > @@ -0,0 +1,94 @@ > +/* > + * Copyright (C) 2017 Jagan Teki > + * > + * This file is dual-licensed: you can use it either under the terms > + * of the GPL or the X11 license, at your option. Note that this dual > + * licensing only applies to this file, and not this project as a > + * whole. > + * > + * a) This library is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation; either version 2 of the > + * License, or (at your option) any later version. > + * > + * This library is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * Or, alternatively, > + * > + * b) Permission is hereby granted, free of charge, to any person > + * obtaining a copy of this software and associated documentation > + * files (the "Software"), to deal in the Software without > + * restriction, including without limitation the rights to use, > + * copy, modify, merge, publish, distribute, sublicense, and/or > + * sell copies of the Software, and to permit persons to whom the > + * Software is furnished to do so, subject to the following > + * conditions: > + * > + * The above copyright notice and this permission notice shall be > + * included in all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES > + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT > + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, > + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > + * OTHER DEALINGS IN THE SOFTWARE. > + */ > + > +/dts-v1/; > + > +#include "sun50i-a64.dtsi" > + > +#include > + > +/ { > + model = "FriendlyARM NanoPi A64"; > + compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64"; > + > + aliases { > + serial0 = > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + reg_vcc3v3: vcc3v3 { > + compatible = "regulator-fixed"; > + regulator-name = "vcc3v3"; > + regulator-min-microvolt = <330>; > + regulator-max-microvolt = <330>; > + }; > +}; > + > + { > + pinctrl-names = "default"; > + pinctrl-0 = <_pins>; > + status = "okay"; > +}; > + > +_pins { > + bias-pull-up; > +}; > + > + { > + pinctrl-names = "default"; > + pinctrl-0 = <_pins>; > + vmmc-supply = <_vcc3v3>; > + cd-gpios = < 5 6 GPIO_ACTIVE_HIGH>; > +
Re: [U-Boot] [linux-sunxi] [PATCH v2 00/12] Big work on sunxi DW DRAM controllers and some new DDR type support
On Sat, 3 Jun 2017 17:10:13 +0800 Icenowy Zhengwrote: > This patchset contains several works on the sunxi DesignWare DRAM > controllers. > > The 1st patch made an option for H3-like DRAM controllers > (DesignWare ones), which can ease further import of alike controllers. > > The 2nd and 3rd patches are for supporting 16-bit DW DRAM controllers, > in order to add V3s DRAM support (The controller on V3s is 16-bit). > > The 4th patch adds bank detection code, in order to support some DDR2 > chips. > > The 5th patch adds a framework for select DRAM type and timing -- it's > needed for boards that use DRAM chips rather than DDR3. > > The 6th patch enables dual rank detection in the DW DRAM code on SoCs > except R40. For R40 the dual rank facility is still not so clear, so it's > temporarily disabled. > > The 7th~9th patches enables support for DRAM initialization and SPL for > the V3s SoC, which integrates a DDR2 chip. > > The 10th and 11th patches adds support for LPDDR3, with the stock boot0 > timing. (Seen in A83T boot0 source and some leaked H5/R40 libdram source) > > The 12th patches adds a defconfig for SoPine w/ official baseboard, which > utilizes LPDDR3. > > Icenowy Zheng (12): > sunxi: makes an invisible option for H3-like DRAM controllers > sunxi: Rename bus-width related macros in H3 DRAM code > sunxi: add option for 16-bit DW DRAM controller > sunxi: add bank detection code to H3 DRAM initialization code > sunxi: Add selective DRAM type and timing > sunxi: enable dual rank detection in DesignWare-like DRAM code > sunxi: add support for the DDR2 in V3s SoC > sunxi: add support for V3s DRAM controller > sunxi: enable DRAM initialization and SPL for V3s SoC > sunxi: add LPDDR3 DRAM type support for DesignWare-like DRAM > controller > sunxi: add LPDDR3 timing from stock boot0 > sunxi: add a defconfig for SoPine w/ official baseboard > > arch/arm/include/asm/arch-sunxi/dram.h | 6 +- > .../{dram_sun8i_h3.h => dram_sunxi_dw.h} | 36 +++- > arch/arm/mach-sunxi/Kconfig| 75 - > arch/arm/mach-sunxi/Makefile | 5 +- > .../{dram_sun8i_h3.c => dram_sunxi_dw.c} | 187 > +++-- > arch/arm/mach-sunxi/dram_timings/Makefile | 3 + > arch/arm/mach-sunxi/dram_timings/ddr2_v3s.c| 84 + > arch/arm/mach-sunxi/dram_timings/ddr3_1333.c | 87 ++ > arch/arm/mach-sunxi/dram_timings/lpddr3_stock.c| 83 + > configs/sopine_baseboard_defconfig | 22 +++ > 10 files changed, 453 insertions(+), 135 deletions(-) > rename arch/arm/include/asm/arch-sunxi/{dram_sun8i_h3.h => dram_sunxi_dw.h} > (86%) > rename arch/arm/mach-sunxi/{dram_sun8i_h3.c => dram_sunxi_dw.c} (84%) > create mode 100644 arch/arm/mach-sunxi/dram_timings/Makefile > create mode 100644 arch/arm/mach-sunxi/dram_timings/ddr2_v3s.c > create mode 100644 arch/arm/mach-sunxi/dram_timings/ddr3_1333.c > create mode 100644 arch/arm/mach-sunxi/dram_timings/lpddr3_stock.c > create mode 100644 configs/sopine_baseboard_defconfig > I'll have time to review your patchset on the coming weekend. Thanks! -- Best regards, Siarhei Siamashka ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCHi v2] sun50i: h5: Add initial NanoPi NEO2 support
From: Jagan TekiNanoPi M1 Plus is designed and developed by FriendlyElec using the Allwinner 64-bit H5 SOC. NanoPi Neo2 key features - Allwinner H5, Quad-core 64-bit Cortex-A53 - 512MB DDR3 RAM - microSD slot - 10/100/1000M Ethernet - Serial Debug Port - 5V 2A DC MicroUSB power-supply Signed-off-by: Jagan Teki Tested-by: Jagan Teki --- Changes for v2: - Drop CONSOLE_MUX - Basci sync of Linux nanopi-neo2, since sun50i-h3.dtsi need to sync from Linux - Tested on Neo2 arch/arm/dts/Makefile | 1 + arch/arm/dts/sun50i-h5-nanopi-neo2.dts | 92 ++ board/sunxi/MAINTAINERS| 5 ++ configs/nanopi_neo2_defconfig | 16 ++ 4 files changed, 114 insertions(+) create mode 100644 arch/arm/dts/sun50i-h5-nanopi-neo2.dts create mode 100644 configs/nanopi_neo2_defconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 427cbab..f450baf 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -319,6 +319,7 @@ dtb-$(CONFIG_MACH_SUN8I_R40) += \ dtb-$(CONFIG_MACH_SUN8I_V3S) += \ sun8i-v3s-licheepi-zero.dtb dtb-$(CONFIG_MACH_SUN50I_H5) += \ + sun50i-h5-nanopi-neo2.dtb \ sun50i-h5-orangepi-pc2.dtb \ sun50i-h5-orangepi-prime.dtb dtb-$(CONFIG_MACH_SUN50I) += \ diff --git a/arch/arm/dts/sun50i-h5-nanopi-neo2.dts b/arch/arm/dts/sun50i-h5-nanopi-neo2.dts new file mode 100644 index 000..727a3e6 --- /dev/null +++ b/arch/arm/dts/sun50i-h5-nanopi-neo2.dts @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2017 Icenowy Zheng + * Copyright (C) 2017 Jagan Teki + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; + +#include "sun50i-h5.dtsi" + +#include + +/ { + model = "FriendlyARM NanoPi NEO 2"; + compatible = "friendlyarm,nanopi-neo2", "allwinner,sun50i-h5"; + + aliases { + serial0 = + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory { + reg = <0x4000 0x2000>; + }; + + soc { + reg_vcc3v3: vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + }; + }; +}; + + { + compatible = "allwinner,sun50i-h5-mmc", +"allwinner,sun50i-a64-mmc", +"allwinner,sun5i-a13-mmc"; + pinctrl-names = "default"; + pinctrl-0 = <_pins_a>, <_cd_pin>; + vmmc-supply = <_vcc3v3>; + bus-width = <4>; + cd-gpios = < 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + status = "okay"; +}; + + { + pinctrl-names = "default"; + pinctrl-0 = <_pins_a>; + status = "okay"; +}; diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS index 1de4a87..fd980b8 100644 --- a/board/sunxi/MAINTAINERS +++
Re: [U-Boot] [PATCH v2 0/7] spl: add xip booting support
Hi Tom, > -Original Message- > From: Vikas MANOCHA > Sent: Sunday, May 28, 2017 12:55 PM > To: u-boot@lists.denx.de > Cc: Vikas MANOCHA; Patrick DELAUNAY > ; Patrice CHOTARD > ; Christophe KERELLO ; > Christophe PRIOUZEAU > ; Alexandre TORGUE > Subject: [PATCH v2 0/7] spl: add xip booting support > > This patchset adds support for XIP (execute in place) of U-Boot or kernel > image and enables it for stm32f7. Pls apply this series whenever you get a chance. Cheers, Vikas > > Changed in v2: > - added patch to move v7m thumb mode just before next image boot > - removed extra blank line. > > Vikas Manocha (7): > spl: armv7m: to keep ARM v7M in thumb mode before booting next image > stm32f7: remove duplicate configs > stm32: stm32f7: add spl build support > SPL: Add XIP booting support > serial: stm32f7: disable overrun > spl: stm32f7: add kernel boot support > spl: stm32f7: configure for xip booting > > arch/arm/include/asm/spl.h | 1 + > arch/arm/mach-stm32/Kconfig| 1 + > arch/arm/mach-stm32/stm32f7/Kconfig| 24 > board/st/stm32f746-disco/stm32f746-disco.c | 36 > +- > common/spl/Kconfig | 9 > common/spl/Makefile| 1 + > common/spl/spl.c | 6 ++--- > common/spl/spl_xip.c | 28 +++ > configs/stm32f746-disco_defconfig | 5 - > drivers/serial/serial_stm32x7.c| 3 +++ > drivers/serial/serial_stm32x7.h| 2 ++ > include/configs/stm32f746-disco.h | 31 ++--- > 12 files changed, 135 insertions(+), 12 deletions(-) create mode 100644 > common/spl/spl_xip.c > > -- > 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 4/4] arm: am33xx: Add support for mulitiple PLL input frequencies
On Thu, 8 Jun 2017 10:17:09 +0530 Lokesh Vutlawrote: > > > On Thursday 08 June 2017 12:20 AM, Emmanuel Vadot wrote: > > On Fri, 12 May 2017 13:20:50 -0400 > > Tom Rini wrote: > > > >> On Fri, May 05, 2017 at 12:59:10PM +0530, Lokesh Vutla wrote: > >> > >>> am335x supports various sysclk frequencies which can be determined > >>> using sysboot pins. PLLs should be configures based on this > >>> sysclk frequency. Add PLL configurations for all supported > >>> frequencies. > >>> > >>> Signed-off-by: Lokesh Vutla > >>> Reviewed-by: Tom Rini > >> > >> Applied to u-boot/master, thanks! > >> > >> -- > >> Tom > > > > Hello, > > > > This appears to break beaglebone black support, reverting this commit > > make u-boot works again. > > hmm..I see the problem. Here we are hard coding MPU freq to 1GHz even > efuse say it is not supported(I am not sure why this is being done, may > be Tom can give more details). Even in kernel I see that cpufreq is > reading efuse to determine mpu frequency. Now that we have jitter > optimized pll configurations, looks like unsupported freq is causing an > issue. Can you see if the below patch helps? This doesn't fix the issues, I'm seeing the same behavior. Since we are in rc release maybe it's best to revert the commit and properly implement the changes after 2017.07 is out ? Thanks, > 8<--8<-- > From 519035c54cef3f9156303b70322c02f10ec69e00 Mon Sep 17 00:00:00 2001 > From: Lokesh Vutla > Date: Thu, 8 Jun 2017 09:34:52 +0530 > Subject: [PATCH] board: am335x: Do not harcode mpu freq for beagleboneblack > > For all am335x boards the mpu frequency is determined by readin > efuse. But for beagleboneblack it is hard coded to 1GHz > irrespective of efuse settings. Due to which some boards > fails to boot with not recommended frequency. Fix it to > use efuse to determine mpu frequency. > > Signed-off-by: Lokesh Vutla > --- > board/ti/am335x/board.c | 10 -- > 1 file changed, 10 deletions(-) > > diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c > index 517965c0f0..4cf6617efb 100644 > --- a/board/ti/am335x/board.c > +++ b/board/ti/am335x/board.c > @@ -294,9 +294,6 @@ const struct dpll_params *get_dpll_mpu_params(void) > if (bone_not_connected_to_ac_power()) > freq = MPUPLL_M_600; > > - if (board_is_bone_lt()) > - freq = MPUPLL_M_1000; > - > switch (freq) { > case MPUPLL_M_1000: > return _mpu_opp[ind][5]; > @@ -336,13 +333,6 @@ static void scale_vcores_bone(int freq) > if (bone_not_connected_to_ac_power()) > freq = MPUPLL_M_600; > > - /* > - * Override what we have detected since we know if we have > - * a Beaglebone Black it supports 1GHz. > - */ > - if (board_is_bone_lt()) > - freq = MPUPLL_M_1000; > - > if (freq == MPUPLL_M_1000) { > usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA; > mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV; > -- > 2.11.0 -- Emmanuel Vadot ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] ARM: dts: keystone-k2hk-evm: Add U-boot specific dtsi file
With Davinci I2C switching to device model, K2HK requires U-boot specific device tree entries. This is only required for I2C 1 which is needed extremely early during the boot process. Fixes: 1743d040b1df ("ARM: keystone: Enable DM_I2C by default") Reported-by: Yan LiuSigned-off-by: Franklin S Cooper Jr --- arch/arm/dts/keystone-k2hk-evm-u-boot.dtsi | 15 +++ 1 file changed, 15 insertions(+) create mode 100644 arch/arm/dts/keystone-k2hk-evm-u-boot.dtsi diff --git a/arch/arm/dts/keystone-k2hk-evm-u-boot.dtsi b/arch/arm/dts/keystone-k2hk-evm-u-boot.dtsi new file mode 100644 index 000..072a758 --- /dev/null +++ b/arch/arm/dts/keystone-k2hk-evm-u-boot.dtsi @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/ + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +/{ + soc { + u-boot,dm-pre-reloc; + }; +}; + + { + u-boot,dm-pre-reloc; +}; -- 2.10.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] sun8i: h3: Add initial NanoPi M1 Plus support
On Thu, Jun 8, 2017 at 9:53 PM, Jagan Tekiwrote: > On Tue, May 30, 2017 at 11:11 PM, Jagan Teki wrote: >> From: Jagan Teki >> >> NanoPi M1 Plus is designed and developed by FriendlyElec >> for professionals, enterprise users, makers and hobbyists >> using the Allwinner H3 SOC. >> >> NanoPi M1 Plus key features >> - Allwinner H3, Quad-core Cortex-A7@1.2GHz >> - 1GB DDR3 RAM >> - 8GB eMMC >> - microSD slot >> - 10/100/1000M Ethernet >> - Serial Debug Port >> - 5V 2A DC power-supply >> >> Signed-off-by: Jagan Teki > > Tested-by: Jagan Teki Applied to u-boot-sunxi/master thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] sun8i: h3: Add initial NanoPi M1 Plus support
On Tue, May 30, 2017 at 11:11 PM, Jagan Tekiwrote: > From: Jagan Teki > > NanoPi M1 Plus is designed and developed by FriendlyElec > for professionals, enterprise users, makers and hobbyists > using the Allwinner H3 SOC. > > NanoPi M1 Plus key features > - Allwinner H3, Quad-core Cortex-A7@1.2GHz > - 1GB DDR3 RAM > - 8GB eMMC > - microSD slot > - 10/100/1000M Ethernet > - Serial Debug Port > - 5V 2A DC power-supply > > Signed-off-by: Jagan Teki Tested-by: Jagan Teki thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] net: Add ag7xxx driver for Atheros MIPS
Hi Marek, I was looking at something else and noticed what looks like an issue with this code you submitted. On Tue, May 24, 2016 at 4:29 PM, Marek Vasutwrote: > Add ethernet driver for the AR933x and AR934x Atheros MIPS machines. > The driver could be easily extended to other WiSoCs. > > Signed-off-by: Marek Vasut > Cc: Daniel Schwierzeck > Cc: Joe Hershberger > Cc: Wills Wang > --- > V2: - Drop the printf() in case malloc fails, it's pointless to try > and print something if we cannot allocate memory, since printf > also allocates memory. > V3: - Replace magic 0x11 with MII_MIPSCR register > --- [...] SNIP > +static u16 ag7xxx_mdio_rw(struct mii_dev *bus, int addr, int reg, u32 val) Returns a u16 > +{ > + u32 data; > + > + /* Dummy read followed by PHY read/write command. */ > + ag7xxx_switch_reg_read(bus, 0x98, ); > + data = val | (reg << 16) | (addr << 21) | BIT(30) | BIT(31); > + ag7xxx_switch_reg_write(bus, 0x98, data); > + > + /* Wait for operation to finish */ > + do { > + ag7xxx_switch_reg_read(bus, 0x98, ); > + } while (data & BIT(31)); > + > + return data & 0x; > +} > + > +static int ag7xxx_mdio_read(struct mii_dev *bus, int addr, int devad, int > reg) > +{ > + return ag7xxx_mdio_rw(bus, addr, reg, BIT(27)); Directly returns said u16 as an int. > +} > + > +static int ag7xxx_mdio_write(struct mii_dev *bus, int addr, int devad, int > reg, > +u16 val) > +{ > + ag7xxx_mdio_rw(bus, addr, reg, val); > + return 0; > +} [...] SNIP > +static int ag933x_phy_setup_common(struct udevice *dev) > +{ > + struct ar7xxx_eth_priv *priv = dev_get_priv(dev); > + int i, ret, phymax; > + > + if (priv->model == AG7XXX_MODEL_AG933X) > + phymax = 4; > + else if (priv->model == AG7XXX_MODEL_AG934X) > + phymax = 5; > + else > + return -EINVAL; > + > + if (priv->interface == PHY_INTERFACE_MODE_RMII) { > + ret = ag933x_phy_setup_reset_set(dev, phymax); > + if (ret) > + return ret; > + > + ret = ag933x_phy_setup_reset_fin(dev, phymax); > + if (ret) > + return ret; > + > + /* Read out link status */ > + ret = ag7xxx_mdio_read(priv->bus, phymax, 0, MII_MIPSCR); Read the link status, which can never be negative. Another issue: Is MII_MIPSCR really the register name? It's not better than "17" - constants should mean something, just just be a random name with the right value. > + if (ret < 0) > + return ret; > + > + return 0; Return 0 unconditionally. Presumably you want to actually check the link status to be something specific if you bother to read it out. > + } > + > + /* Switch ports */ > + for (i = 0; i < phymax; i++) { > + ret = ag933x_phy_setup_reset_set(dev, i); > + if (ret) > + return ret; > + } > + > + for (i = 0; i < phymax; i++) { > + ret = ag933x_phy_setup_reset_fin(dev, i); > + if (ret) > + return ret; > + } > + > + for (i = 0; i < phymax; i++) { > + /* Read out link status */ > + ret = ag7xxx_mdio_read(priv->bus, i, 0, MII_MIPSCR); Same thing here. > + if (ret < 0) > + return ret; > + } > + > + return 0; > +} ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/7] usb: dwc2-otg: make regs_otg (in platdata) a uintptr_t
On Thu, Jun 08, 2017 at 07:59:30AM -0600, Simon Glass wrote: > Hi Marek, > > On 8 June 2017 at 07:48, Marek Vasutwrote: > > On 06/08/2017 03:45 PM, Simon Glass wrote: > >> Hi Marek, > >> > >> On 8 June 2017 at 06:33, Marek Vasut wrote: > >>> On 06/08/2017 05:34 AM, s...@google.com wrote: > On 06/07/2017 03:37 PM, Simon Glass wrote: > > Hi Marek, > > > > On 7 June 2017 at 07:33, Marek Vasut wrote: > >> On 06/07/2017 03:28 PM, Simon Glass wrote: > >>> Hi Marek, > >>> > >>> On 7 June 2017 at 06:55, Marek Vasut wrote: > On 06/07/2017 02:53 PM, Simon Glass wrote: > > Hi Marek, > > > > On 7 June 2017 at 06:41, Marek Vasut wrote: > >> On 06/07/2017 02:38 PM, Simon Glass wrote: > >>> +Tom for comment > >>> > >>> Hi Marek, > >>> > >>> On 7 June 2017 at 00:27, Marek Vasut wrote: > On 06/07/2017 02:16 AM, Simon Glass wrote: > > Hi, > > > > On 6 June 2017 at 17:59, Dr. Philipp Tomsich > > wrote: > >> Simon, > >> > >>> On 06 Jun 2017, at 23:09, Simon Glass > >>> wrote: > >>> > >>> Hi Philipp, > >>> > >>> On 6 June 2017 at 07:42, Philipp Tomsich > >>> wrote: > The regs_otg field in uintptr_t of the platform data > structure for > dwc2-otg has thus far been an unsigned int, but will > eventually be > casted into a void*. > > This raises the following error with GCC 6.3 and buildman: > ../drivers/usb/gadget/dwc2_udc_otg.c: In function > 'dwc2_udc_probe': > ../drivers/usb/gadget/dwc2_udc_otg.c:821:8: warning: cast > to pointer from integer of different size > [-Wint-to-pointer-cast] > reg = (struct dwc2_usbotg_reg *)pdata->regs_otg; > ^ > > This changes regs_otg to a uintptr_t to ensure that it is > large enough > to hold any valid pointer (and fix the associated warning). > > Signed-off-by: Philipp Tomsich > > > --- > > Changes in v2: > - (new patch) fix a int-to-pointer cast warning for regs_otg > in > dwc2-otg to fix a buildman failure for > u-boot-rockchip/master@2b19b2f > > include/usb/dwc2_udc.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Applied to u-boot-rockchip, thanks! > > >>> > >>> This is clearly a USB patch ... why would it go through u-boot-rockchip? > >>> But OK, yes, I see we have no structure in place and patches go through > >>> whatever random tree these days. > >> > >> It is assigned to me in patchwork > > > > I see, USB patch assigned not to USB maintainer ... h ... > > That is pretty typical if it is part of a series. It's just too hard > to coordinate multiple maintainers picking up bits of a series. > > patch 1 add board feature > patch 2 add usb feature > patch 3 enable usb on board > > Patch 3 cannot be applied until both 1 and 2 are in mainline, meaning > that we end up with this sequence: > > patch 1 applied by board maintainer, send pull request > patch 2 applied by USB, send pull request > patch 3 applied by board maintainer > > which is very slow and the feature cannot be tested until the end. I > guess you know that already, but acking a patch is helpful as it > allows them to stay together. Generally speaking, and with the AB/RB of other relevant maintainers, I endorse the idea that a logical series of reasonable size should not be broken up into N smaller series to go in via N subtrees. That said... > >> and is needed to fix a build > >> warning. It is tricky to deal with individual patches within a larger > >> series since there are often dependencies. I had the same issue with > >> video patches. > >> > >> Don't we normally try to keep series together? > > > > Don't we normally at least try to get AB/RB from the maintainer before > > applying patches this way ? > > Yes that is best. I took your 'applied to' as an ack ;-) If someone wants to grab patches via their own subtree, as Marek does, and in this case already had, it should go via that tree. Do I fail to get this right every time? Yes. Should I be better about this? Yes. -- Tom signature.asc
Re: [U-Boot] [PATCH v2 4/7] usb: dwc2-otg: make regs_otg (in platdata) a uintptr_t
Hi Marek, On 8 June 2017 at 07:48, Marek Vasutwrote: > On 06/08/2017 03:45 PM, Simon Glass wrote: >> Hi Marek, >> >> On 8 June 2017 at 06:33, Marek Vasut wrote: >>> On 06/08/2017 05:34 AM, s...@google.com wrote: On 06/07/2017 03:37 PM, Simon Glass wrote: > Hi Marek, > > On 7 June 2017 at 07:33, Marek Vasut wrote: >> On 06/07/2017 03:28 PM, Simon Glass wrote: >>> Hi Marek, >>> >>> On 7 June 2017 at 06:55, Marek Vasut wrote: On 06/07/2017 02:53 PM, Simon Glass wrote: > Hi Marek, > > On 7 June 2017 at 06:41, Marek Vasut wrote: >> On 06/07/2017 02:38 PM, Simon Glass wrote: >>> +Tom for comment >>> >>> Hi Marek, >>> >>> On 7 June 2017 at 00:27, Marek Vasut wrote: On 06/07/2017 02:16 AM, Simon Glass wrote: > Hi, > > On 6 June 2017 at 17:59, Dr. Philipp Tomsich > wrote: >> Simon, >> >>> On 06 Jun 2017, at 23:09, Simon Glass wrote: >>> >>> Hi Philipp, >>> >>> On 6 June 2017 at 07:42, Philipp Tomsich >>> wrote: The regs_otg field in uintptr_t of the platform data structure for dwc2-otg has thus far been an unsigned int, but will eventually be casted into a void*. This raises the following error with GCC 6.3 and buildman: ../drivers/usb/gadget/dwc2_udc_otg.c: In function 'dwc2_udc_probe': ../drivers/usb/gadget/dwc2_udc_otg.c:821:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] reg = (struct dwc2_usbotg_reg *)pdata->regs_otg; ^ This changes regs_otg to a uintptr_t to ensure that it is large enough to hold any valid pointer (and fix the associated warning). Signed-off-by: Philipp Tomsich --- Changes in v2: - (new patch) fix a int-to-pointer cast warning for regs_otg in dwc2-otg to fix a buildman failure for u-boot-rockchip/master@2b19b2f include/usb/dwc2_udc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-rockchip, thanks! >>> >>> This is clearly a USB patch ... why would it go through u-boot-rockchip? >>> But OK, yes, I see we have no structure in place and patches go through >>> whatever random tree these days. >> >> It is assigned to me in patchwork > > I see, USB patch assigned not to USB maintainer ... h ... That is pretty typical if it is part of a series. It's just too hard to coordinate multiple maintainers picking up bits of a series. patch 1 add board feature patch 2 add usb feature patch 3 enable usb on board Patch 3 cannot be applied until both 1 and 2 are in mainline, meaning that we end up with this sequence: patch 1 applied by board maintainer, send pull request patch 2 applied by USB, send pull request patch 3 applied by board maintainer which is very slow and the feature cannot be tested until the end. I guess you know that already, but acking a patch is helpful as it allows them to stay together. > >> and is needed to fix a build >> warning. It is tricky to deal with individual patches within a larger >> series since there are often dependencies. I had the same issue with >> video patches. >> >> Don't we normally try to keep series together? > > Don't we normally at least try to get AB/RB from the maintainer before > applying patches this way ? Yes that is best. I took your 'applied to' as an ack ;-) Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/7] usb: dwc2-otg: make regs_otg (in platdata) a uintptr_t
On 06/08/2017 03:45 PM, Simon Glass wrote: > Hi Marek, > > On 8 June 2017 at 06:33, Marek Vasutwrote: >> On 06/08/2017 05:34 AM, s...@google.com wrote: >>> On 06/07/2017 03:37 PM, Simon Glass wrote: Hi Marek, On 7 June 2017 at 07:33, Marek Vasut wrote: > On 06/07/2017 03:28 PM, Simon Glass wrote: >> Hi Marek, >> >> On 7 June 2017 at 06:55, Marek Vasut wrote: >>> On 06/07/2017 02:53 PM, Simon Glass wrote: Hi Marek, On 7 June 2017 at 06:41, Marek Vasut wrote: > On 06/07/2017 02:38 PM, Simon Glass wrote: >> +Tom for comment >> >> Hi Marek, >> >> On 7 June 2017 at 00:27, Marek Vasut wrote: >>> On 06/07/2017 02:16 AM, Simon Glass wrote: Hi, On 6 June 2017 at 17:59, Dr. Philipp Tomsich wrote: > Simon, > >> On 06 Jun 2017, at 23:09, Simon Glass wrote: >> >> Hi Philipp, >> >> On 6 June 2017 at 07:42, Philipp Tomsich >> wrote: >>> The regs_otg field in uintptr_t of the platform data structure >>> for >>> dwc2-otg has thus far been an unsigned int, but will eventually >>> be >>> casted into a void*. >>> >>> This raises the following error with GCC 6.3 and buildman: >>> ../drivers/usb/gadget/dwc2_udc_otg.c: In function >>> 'dwc2_udc_probe': >>> ../drivers/usb/gadget/dwc2_udc_otg.c:821:8: warning: cast to >>> pointer from integer of different size [-Wint-to-pointer-cast] >>>reg = (struct dwc2_usbotg_reg *)pdata->regs_otg; >>> ^ >>> >>> This changes regs_otg to a uintptr_t to ensure that it is large >>> enough >>> to hold any valid pointer (and fix the associated warning). >>> >>> Signed-off-by: Philipp Tomsich >>> >>> >>> --- >>> >>> Changes in v2: >>> - (new patch) fix a int-to-pointer cast warning for regs_otg in >>> dwc2-otg to fix a buildman failure for >>> u-boot-rockchip/master@2b19b2f >>> >>> include/usb/dwc2_udc.h | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> Applied to u-boot-rockchip, thanks! >>> >> >> This is clearly a USB patch ... why would it go through u-boot-rockchip? >> But OK, yes, I see we have no structure in place and patches go through >> whatever random tree these days. > > It is assigned to me in patchwork I see, USB patch assigned not to USB maintainer ... h ... > and is needed to fix a build > warning. It is tricky to deal with individual patches within a larger > series since there are often dependencies. I had the same issue with > video patches. > > Don't we normally try to keep series together? Don't we normally at least try to get AB/RB from the maintainer before applying patches this way ? > Regards, > Simon > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/7] usb: dwc2-otg: make regs_otg (in platdata) a uintptr_t
Hi Marek, On 8 June 2017 at 06:33, Marek Vasutwrote: > On 06/08/2017 05:34 AM, s...@google.com wrote: >> On 06/07/2017 03:37 PM, Simon Glass wrote: >>> Hi Marek, >>> >>> On 7 June 2017 at 07:33, Marek Vasut wrote: On 06/07/2017 03:28 PM, Simon Glass wrote: > Hi Marek, > > On 7 June 2017 at 06:55, Marek Vasut wrote: >> On 06/07/2017 02:53 PM, Simon Glass wrote: >>> Hi Marek, >>> >>> On 7 June 2017 at 06:41, Marek Vasut wrote: On 06/07/2017 02:38 PM, Simon Glass wrote: > +Tom for comment > > Hi Marek, > > On 7 June 2017 at 00:27, Marek Vasut wrote: >> On 06/07/2017 02:16 AM, Simon Glass wrote: >>> Hi, >>> >>> On 6 June 2017 at 17:59, Dr. Philipp Tomsich >>> wrote: Simon, > On 06 Jun 2017, at 23:09, Simon Glass wrote: > > Hi Philipp, > > On 6 June 2017 at 07:42, Philipp Tomsich > wrote: >> The regs_otg field in uintptr_t of the platform data structure >> for >> dwc2-otg has thus far been an unsigned int, but will eventually >> be >> casted into a void*. >> >> This raises the following error with GCC 6.3 and buildman: >> ../drivers/usb/gadget/dwc2_udc_otg.c: In function >> 'dwc2_udc_probe': >> ../drivers/usb/gadget/dwc2_udc_otg.c:821:8: warning: cast to >> pointer from integer of different size [-Wint-to-pointer-cast] >>reg = (struct dwc2_usbotg_reg *)pdata->regs_otg; >> ^ >> >> This changes regs_otg to a uintptr_t to ensure that it is large >> enough >> to hold any valid pointer (and fix the associated warning). >> >> Signed-off-by: Philipp Tomsich >> >> >> --- >> >> Changes in v2: >> - (new patch) fix a int-to-pointer cast warning for regs_otg in >> dwc2-otg to fix a buildman failure for >> u-boot-rockchip/master@2b19b2f >> >> include/usb/dwc2_udc.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> Applied to u-boot-rockchip, thanks! >> > > This is clearly a USB patch ... why would it go through u-boot-rockchip? > But OK, yes, I see we have no structure in place and patches go through > whatever random tree these days. It is assigned to me in patchwork and is needed to fix a build warning. It is tricky to deal with individual patches within a larger series since there are often dependencies. I had the same issue with video patches. Don't we normally try to keep series together? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 08/11] usb: dwc2: force to host mode if not support HNP/SRP
On 06/08/2017 09:34 AM, Meng Dongyang wrote: > In current code, after running the command of "usb start", the controller > will keep in otg mode and can't switch to host mode if not support > SNP/SRP capability. So add the property of "hnp-srp-disable" in the DTS > to config the contrller work in force mode of host. > > Signed-off-by: Meng DongyangApplied, thanks > --- > > Changes in v4: > - Prepare a mask and set capabilities in GUSBCFG register once > > Changes in v3: > - revert change of macro definition in dwc2 driver > - support host mode without HNP/SRP capability through DTS > > Changes in v2: > - Splited from patch [07/08] of v1 > > drivers/usb/host/dwc2.c | 19 --- > 1 file changed, 16 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c > index 0e5df15..e25f885 100644 > --- a/drivers/usb/host/dwc2.c > +++ b/drivers/usb/host/dwc2.c > @@ -43,6 +43,7 @@ struct dwc2_priv { > struct dwc2_core_regs *regs; > int root_hub_devnum; > bool ext_vbus; > + bool hnp_srp_disable; > bool oc_disable; > }; > > @@ -394,6 +395,9 @@ static void dwc_otg_core_init(struct dwc2_priv *priv) > usbcfg |= DWC2_GUSBCFG_ULPI_CLK_SUS_M; > } > #endif > + if (priv->hnp_srp_disable) > + usbcfg |= DWC2_GUSBCFG_FORCEHOSTMODE; > + > writel(usbcfg, >gusbcfg); > > /* Program the GAHBCFG Register. */ > @@ -422,12 +426,16 @@ static void dwc_otg_core_init(struct dwc2_priv *priv) > > writel(ahbcfg, >gahbcfg); > > - /* Program the GUSBCFG register for HNP/SRP. */ > - setbits_le32(>gusbcfg, DWC2_GUSBCFG_HNPCAP | DWC2_GUSBCFG_SRPCAP); > + /* Program the capabilities in GUSBCFG Register */ > + usbcfg = 0; > > + if (!priv->hnp_srp_disable) > + usbcfg |= DWC2_GUSBCFG_HNPCAP | DWC2_GUSBCFG_SRPCAP; > #ifdef CONFIG_DWC2_IC_USB_CAP > - setbits_le32(>gusbcfg, DWC2_GUSBCFG_IC_USB_CAP); > + usbcfg |= DWC2_GUSBCFG_IC_USB_CAP; > #endif > + > + setbits_le32(>gusbcfg, usbcfg); > } > > /* > @@ -1244,6 +1252,11 @@ static int dwc2_usb_ofdata_to_platdata(struct udevice > *dev) > if (prop) > priv->oc_disable = true; > > + prop = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), > +"hnp-srp-disable", NULL); > + if (prop) > + priv->hnp_srp_disable = true; > + > return 0; > } > > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 04/11] usb: host: xhci-rockchip: use fixed regulator to control vbus
On 06/08/2017 09:31 AM, Meng Dongyang wrote: > Use fixed regulator to control the voltage of vbus and turn off > vbus when usb stop. > > Signed-off-by: Meng Dongyang> --- > > Changes in v4: > - Splited from patch [Uboot,v3,04/10] > - Define set vbus as empty function if the macros aren't set > > Changes in v3: None > Changes in v2: > - Use fixed regulator to control vbus instead of gpio > > drivers/usb/host/xhci-rockchip.c | 41 > +++- > 1 file changed, 32 insertions(+), 9 deletions(-) > > diff --git a/drivers/usb/host/xhci-rockchip.c > b/drivers/usb/host/xhci-rockchip.c > index f559830..dc9cd56 100644 > --- a/drivers/usb/host/xhci-rockchip.c > +++ b/drivers/usb/host/xhci-rockchip.c > @@ -11,10 +11,10 @@ > #include > #include > #include > -#include > #include > #include > #include > +#include > > #include "xhci.h" > > @@ -23,7 +23,7 @@ DECLARE_GLOBAL_DATA_PTR; > struct rockchip_xhci_platdata { > fdt_addr_t hcd_base; > fdt_addr_t phy_base; > - struct gpio_desc vbus_gpio; > + struct udevice *vbus_supply; > }; > > /* > @@ -66,15 +66,37 @@ static int xhci_usb_ofdata_to_platdata(struct udevice > *dev) > return -ENXIO; > } > > - /* Vbus gpio */ > - ret = gpio_request_by_name(dev, "rockchip,vbus-gpio", 0, > ->vbus_gpio, GPIOD_IS_OUT); > +#if defined(CONFIG_DM_USB) && defined(CONFIG_DM_REGULATOR) > + /* Vbus regulator */ > + ret = device_get_supply_regulator(dev, "vbus-supply", > + >vbus_supply); > if (ret) > - debug("rockchip,vbus-gpio node missing!"); > + debug("Can't get vbus supply\n"); VBUS in caps > +#endif > > return 0; > } > > +#if defined(CONFIG_DM_USB) && defined(CONFIG_DM_REGULATOR) > +static int rockchip_xhci_set_vbus(struct rockchip_xhci_platdata *plat, > + bool value) > +{ > + int ret = 0; You don't need to init ret, it's always set right below. > + > + ret = regulator_set_enable(plat->vbus_supply, value); > + if (ret) > + debug("XHCI: Failed to set vbus supply\n"); That shouldn't be debug, that's a printf() because it's actually a failure. Or error() I guess ... > + return ret; > +} > +#else > +static int rockchip_xhci_set_vbus(struct rockchip_xhci_platdata *plat, > + bool value) > +{ > + return 0; > +} > +#endif > + > /* > * rockchip_dwc3_phy_setup() - Configure USB PHY Interface of DWC3 Core > * @dwc: Pointer to our controller context structure > @@ -153,9 +175,7 @@ static int xhci_usb_probe(struct udevice *dev) > hcor = (struct xhci_hcor *)((uint64_t)ctx->hcd + > HC_LENGTH(xhci_readl(>hcd->cr_capbase))); > > - /* setup the Vbus gpio here */ > - if (dm_gpio_is_valid(>vbus_gpio)) > - dm_gpio_set_value(>vbus_gpio, 1); > + rockchip_xhci_set_vbus(plat, true); What about handling the return value ? > ret = rockchip_xhci_core_init(ctx, dev); > if (ret) { > @@ -168,6 +188,7 @@ static int xhci_usb_probe(struct udevice *dev) > > static int xhci_usb_remove(struct udevice *dev) > { > + struct rockchip_xhci_platdata *plat = dev_get_platdata(dev); > struct rockchip_xhci *ctx = dev_get_priv(dev); > int ret; > > @@ -178,6 +199,8 @@ static int xhci_usb_remove(struct udevice *dev) > if (ret) > return ret; > > + rockchip_xhci_set_vbus(plat, false); Handle return value > return 0; > } > > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 05/11] usb: host: xhci-rockchip: add support for rk3328
On 06/08/2017 09:33 AM, Meng Dongyang wrote: > Add the compatible "rockchip,rk3328-xhci" in match table > for rk3328 to probe xhci controller. > > Signed-off-by: Meng DongyangApplied, thanks > --- > > Changes in v4: > - New patch, splited from patch [Uboot,v3,04/10] > > drivers/usb/host/xhci-rockchip.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/host/xhci-rockchip.c > b/drivers/usb/host/xhci-rockchip.c > index dc9cd56..fbb700c 100644 > --- a/drivers/usb/host/xhci-rockchip.c > +++ b/drivers/usb/host/xhci-rockchip.c > @@ -206,6 +206,7 @@ static int xhci_usb_remove(struct udevice *dev) > > static const struct udevice_id xhci_usb_ids[] = { > { .compatible = "rockchip,rk3399-xhci" }, > + { .compatible = "rockchip,rk3328-xhci" }, > { } > }; > > @@ -225,6 +226,7 @@ U_BOOT_DRIVER(usb_xhci) = { > > static const struct udevice_id usb_phy_ids[] = { > { .compatible = "rockchip,rk3399-usb3-phy" }, > + { .compatible = "rockchip,rk3328-usb3-phy" }, > { } > }; > > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/7] usb: dwc2-otg: make regs_otg (in platdata) a uintptr_t
On 06/08/2017 05:34 AM, s...@google.com wrote: > On 06/07/2017 03:37 PM, Simon Glass wrote: >> Hi Marek, >> >> On 7 June 2017 at 07:33, Marek Vasutwrote: >>> On 06/07/2017 03:28 PM, Simon Glass wrote: Hi Marek, On 7 June 2017 at 06:55, Marek Vasut wrote: > On 06/07/2017 02:53 PM, Simon Glass wrote: >> Hi Marek, >> >> On 7 June 2017 at 06:41, Marek Vasut wrote: >>> On 06/07/2017 02:38 PM, Simon Glass wrote: +Tom for comment Hi Marek, On 7 June 2017 at 00:27, Marek Vasut wrote: > On 06/07/2017 02:16 AM, Simon Glass wrote: >> Hi, >> >> On 6 June 2017 at 17:59, Dr. Philipp Tomsich >> wrote: >>> Simon, >>> On 06 Jun 2017, at 23:09, Simon Glass wrote: Hi Philipp, On 6 June 2017 at 07:42, Philipp Tomsich wrote: > The regs_otg field in uintptr_t of the platform data structure for > dwc2-otg has thus far been an unsigned int, but will eventually be > casted into a void*. > > This raises the following error with GCC 6.3 and buildman: > ../drivers/usb/gadget/dwc2_udc_otg.c: In function > 'dwc2_udc_probe': > ../drivers/usb/gadget/dwc2_udc_otg.c:821:8: warning: cast to > pointer from integer of different size [-Wint-to-pointer-cast] >reg = (struct dwc2_usbotg_reg *)pdata->regs_otg; > ^ > > This changes regs_otg to a uintptr_t to ensure that it is large > enough > to hold any valid pointer (and fix the associated warning). > > Signed-off-by: Philipp Tomsich > > > --- > > Changes in v2: > - (new patch) fix a int-to-pointer cast warning for regs_otg in > dwc2-otg to fix a buildman failure for > u-boot-rockchip/master@2b19b2f > > include/usb/dwc2_udc.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Applied to u-boot-rockchip, thanks! > This is clearly a USB patch ... why would it go through u-boot-rockchip? But OK, yes, I see we have no structure in place and patches go through whatever random tree these days. -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v8 4/7] arm: socfpga: Enable FPGA driver on SPL
On 06/08/2017 05:40 AM, Chee, Tien Fong wrote: [...] Any safety guideline? I checked the spl.map, we still have 10K left after calculation including bss size. >>> I compiled all Intel fpga related defconfigs, and we have 9K free >>> based >>> on total 64K memory size. SO building PFGA driver would contribute >>> around 1~2K only to SPL size. Do you have concern with that? >> Yes >> >>> >>> If you have concern, i would remove patch 6, keep fpga_manager >>> intact. >> Can't you rework things such that they don't add useless code into >> the >> SPL instead ? >> > I checked the codes yesterday, mostly are bridge, and HPS-FPGA > interface configuration in SPL. So, i think we can try to remove them > as they are not required in SPL, but i need more time to test it out > and ensure this change doesn't break anything. That's fine, we're past RC1 anyway. > To avoid impact the progress of submitting the rest of patchset as they > are still pending until this patchset is accepted , so i suggest we can > do it in later. So, i will keep fpga_manager in there. > > sounds good to you? You have about two months till the next MW opens , so if you want to flesh this out, please do. >>> Thanks. -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 00/11] rk3328: add support of usb host and gadget
On 06/08/2017 09:31 AM, Meng Dongyang wrote: > Add support of usb host and gadget function for rk3328. Why did I receive half of the series as a series (that is, cover letter and patches IRT to that) and half as separate emails ? > Changes in v4: > - Splite patch [U-boot,v3,04/10] into two patches > - Define set vbus as empty function if the macros aren't set > - Prepare a mask and set capabilities in GUSBCFG register once > > Changes in v3: > - Revert change of macro definition in dwc2 driver > - Support host mode without HNP/SRP capability through DTS > > Changes in v2: > - Add commit messages > - Split patch [U-boot,7/8] into two patches > - Use fixed regulator to control vbus instead of gpio > > Meng Dongyang (11): > configs: rk3328: add support for usb and config ehci and ohci driver > rockchip: dts: rk3328: add ehci and ohci node and enable host0 port > configs: rk3328: config xhci controller > usb: host: xhci-rockchip: use fixed regulator to control vbus > usb: host: xhci-rockchip: add support for rk3328 > rockchip: dts: rk3328: support and enable xhci > configs: rk3328: enable dwc2 driver and config for fastboot > usb: dwc2: force to host mode if not support HNP/SRP > rk3328: board: add support of dwc2 gadget > rockchip: dts: rk3328: support and enable dwc2 > rockchip: dts: rk3399: control vbus of typec by fixed regulator > > arch/arm/dts/rk3328-evb.dts| 36 > arch/arm/dts/rk3328.dtsi | 35 +++ > arch/arm/dts/rk3399-evb.dts| 16 +++-- > board/rockchip/evb_rk3328/evb-rk3328.c | 43 > +++--- > configs/evb-rk3328_defconfig | 25 > drivers/usb/host/dwc2.c| 19 --- > drivers/usb/host/xhci-rockchip.c | 43 > +++--- > include/configs/rk3328_common.h| 9 +++ > 8 files changed, 209 insertions(+), 17 deletions(-) > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Please pull u-boot-rockchip
Hi Tom, Here is additional rk3368 and rk3399 support, rv1108 support, refactoring HDMI video (brought in from Anatolij's tree to resolve conflicts), some mkimage fixes and a few other things. New boards supported are: aarch64: sheep-rk3368 evb-px5 geekbox arm: evb-rv1108 The following changes since commit 24796d27be0d0f403ed6ad7e3022b33e36ac08b5: Merge git://git.denx.de/u-boot-ubi (2017-06-06 07:13:39 -0400) are available in the git repository at: git://git.denx.de/u-boot-rockchip.git for you to fetch changes up to 6c53d680c6b57bb9617a93cd1e92c242ae0aab21: rockchip: board: puma_rk3399: enable BMP_16BPP, BMP_24BPP and BMP_32BPP (2017-06-07 21:30:50 -0600) Andreas Färber (2): rockchip: rk3368: Add core start-up code for RK3368 rockchip: rk3368: Add initial support for RK3368 based GeekBox Andy Yan (10): rockchip: rk3368: Add clock driver rockchip: rk3368: Add pinctrl driver rockchip: rk3368: Add sysreset driver rockchip: rk3368: add Sheep board rockchip: rk3368: Add PX5 Evaluation board rockchip: mkimage: Add support for RV1108 rockchip: pinctrl: Add rv1108 pinctrl driver rockchip: clk: Add rv1108 clock driver rockchip: Add core Soc start-up code for rv1108 rockchip: Add basic support for evb-rv1108 board Heiko Stübner (2): defconfig: firefly-rk3399: fix pinctrl config option power: rk808: fix ldo register offset Kever Yang (10): rockchip; rk3399: disable SRAM security region rockchip: rk8xx: allocate priv structure for driver rockchip: rk3036: clean mask definition for cru reg rockchip: clock: rk3036: some fix according TRM rockchip: rk3036: clean mask definition for grf reg rockchip: pinctrl: move rk3328 grf reg definition in header file rockchip: pinctrl: rk3328: do not set io routing MAINTAINERS: git-mailrc: update maintainer for Rockchip MAINTAINERS: rockchip: add board/rockchip as maintained entry rockchip: evb-rk3328: update board maintainer Klaus Goger (2): rockchip: board: puma_rk3399: derive ethaddr from cpuid rockchip: dts: rk3399-puma: set spl-payload-offset Mark Kettenis (1): regulator: pwm: Fix handling of missing init voltage Meng Dongyang (5): configs: rk3328: add support for usb and config ehci and ohci driver rockchip: dts: rk3328: add ehci and ohci node and enable host0 port configs: rk3328: config xhci controller rockchip: dts: rk3328: support and enable xhci rockchip: usb: host: xhci-rockchip: add support for rk3328 Philipp Tomsich (35): rockchip: efuse: add (misc) driver for RK3399 non-secure efuse block rockchip: board: puma_rk3399: add support for serial# and cpuid# via efuses rockchip: defconfig: puma-rk3399: enable RK3399 efuse driver rockchip: board: puma_rk3399: build FIT image via u-boot.itb rockchip: mkimage: add support for verify_header/print_header rockchip: mkimage: force 2KB alignment for init_size rockchip: mkimage: set init_boot_size to avoid confusing the boot ROM rockchip: arm64: rk3399: revise timeout-handling for DRAM PHY lock rockchip: arm64: rk3399: support DDR3-1866 (i.e. 933MHz clock) rockchip: dts: rk3399-puma: Add DDR3-1866 timings rockchip: dts: rk3399-puma: make the debug serial dm-pre-reloc rockchip: dts: rk3399-puma: release reset of on-module USB3 hub via vbus-gpio rockchip: defconfig: puma-rk3399: enable RK808 support rockchip: defconfig: puma-rk3399: enable CONFIG_PHY_MICREL_KSZ9031 rockchip: defconfig: puma-rk3399: enable I2C rockchip: defconfig: puma-rk3399: do not filter clock-names for SPL rockchip: rk3328: don't implement usb_gadget_handle_interrupts twice rockchip: video: rk_hdmi: fix implicit definition warnings rockchip: defconfig: puma-rk3399: update defconfig with video-support usb: dwc2-otg: make regs_otg (in platdata) a uintptr_t rockchip: dts: rk3399: enable HDMI output in the DTS rockchip: dts: rk3399-puma: sync DTS with Linux tree rockchip: dts: rk3399-puma: refactor and rename (default) DDR3-1600 DTS rockchip: dts: rk3399-puma: add DTS for the DDR3-1333 timing rockchip: dts: rk3399-puma: add DTS for the DDR3-1866 timing rockchip: defconfig: puma-rk3399: enable SPL_BOARD_INIT rockchip: video: Kconfig: reformat help for VIDEO_ROCKCHIP rockchip: video: Kconfig: set MAX_XRES and MAX_YRES via Kconfig rockchip: video: refactor rk_vop and split RK3288-specific code off rockchip: video: rk3399: enable HDMI output (from the rk_vop) for the RK3399 rockchip: video: add mpixelclock settings from Linux driver rockchip: video: split RK3288-specific part off from rk_hdmi rockchip: video: rk3399: add HDMI TX support on the RK3399 rockchip: video: rk_vop: add
Re: [U-Boot] [PATCH v2 00/12] Big work on sunxi DW DRAM controllers and some new DDR type support
On Sat, Jun 3, 2017 at 2:40 PM, Icenowy Zhengwrote: > This patchset contains several works on the sunxi DesignWare DRAM > controllers. > > The 1st patch made an option for H3-like DRAM controllers > (DesignWare ones), which can ease further import of alike controllers. > > The 2nd and 3rd patches are for supporting 16-bit DW DRAM controllers, > in order to add V3s DRAM support (The controller on V3s is 16-bit). > > The 4th patch adds bank detection code, in order to support some DDR2 > chips. > > The 5th patch adds a framework for select DRAM type and timing -- it's > needed for boards that use DRAM chips rather than DDR3. > > The 6th patch enables dual rank detection in the DW DRAM code on SoCs > except R40. For R40 the dual rank facility is still not so clear, so it's > temporarily disabled. > > The 7th~9th patches enables support for DRAM initialization and SPL for > the V3s SoC, which integrates a DDR2 chip. > > The 10th and 11th patches adds support for LPDDR3, with the stock boot0 > timing. (Seen in A83T boot0 source and some leaked H5/R40 libdram source) > > The 12th patches adds a defconfig for SoPine w/ official baseboard, which > utilizes LPDDR3. > > Icenowy Zheng (12): > sunxi: makes an invisible option for H3-like DRAM controllers > sunxi: Rename bus-width related macros in H3 DRAM code > sunxi: add option for 16-bit DW DRAM controller > sunxi: add bank detection code to H3 DRAM initialization code > sunxi: Add selective DRAM type and timing > sunxi: enable dual rank detection in DesignWare-like DRAM code > sunxi: add support for the DDR2 in V3s SoC > sunxi: add support for V3s DRAM controller > sunxi: enable DRAM initialization and SPL for V3s SoC > sunxi: add LPDDR3 DRAM type support for DesignWare-like DRAM > controller > sunxi: add LPDDR3 timing from stock boot0 > sunxi: add a defconfig for SoPine w/ official baseboard I think you forgot to add MAINTAINERS update which I commented previous, anyway if you're OK I will add and apply the series? thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 05/13] rockchip: rk3066: add rk3066 platform devicetree file
Am Mittwoch, 7. Juni 2017, 17:12:24 CEST schrieb Paweł Jarosz: > Hi Simon, > > W dniu 06.06.2017 o 23:10, Simon Glass pisze: > > Hi Pawel, > > > > On 6 June 2017 at 12:50, Paweł Jaroszwrote: > >> rk3066 peripherials include usb, i2c, pwm, gpio, sdio, sdmmc, emmc, spi, > >> watchdog and uart > >> > >> Signed-off-by: Paweł Jarosz > >> --- > >> > >> arch/arm/dts/rk3066a.dtsi | 699 > >> ++ 1 file changed, 699 > >> insertions(+) > >> create mode 100644 arch/arm/dts/rk3066a.dtsi > > > > How come this file has 'a' on the end? > > > > Reviewed-by: Simon Glass > > Not sure why ... as there is no rk3066a named chip (acording to > datasheet) but there is rk3066b. > I have copied linux source without renaming it. actually there are "only" rk3066a and rk3066b ... only the rk3066a often just gets called rk3066. If you look in device schematics you always find the rk3066a naming. Also, so far I haven't seen any rk3066b yet, therefore we have no support for it at all. Heiko ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] cmd: nvedit: bring error message in sync with condition under which it appears
The list of symbols listed in the error message for missing Kconfig symbols is out of sync with the symbols actually tested. Add the missing symbols and reorder their appearance to be in sync with the #if statement for easier checking. Signed-off-by: Lothar Waßmann--- cmd/nvedit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 9ca5cb5..41578d4 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -54,8 +54,8 @@ DECLARE_GLOBAL_DATA_PTR; !defined(CONFIG_ENV_IS_IN_REMOTE) && \ !defined(CONFIG_ENV_IS_IN_UBI) && \ !defined(CONFIG_ENV_IS_NOWHERE) -# error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|DATAFLASH|ONENAND|\ -SATA|SPI_FLASH|NVRAM|MMC|FAT|EXT4|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE +# error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|DATAFLASH|MMC|FAT|EXT4|\ +NAND|NVRAM|ONENAND|SATA|SPI_FLASH|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE #endif /* -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] cmd: mtdparts: fix uninitialized variable warning
commit 06a040a31bcf ("cmd: mtdparts: fix null pointer dereference in parse_mtdparts") removed the initialization of a pointer variable, which is subsequently used in a debug() call. This produces an uninitialized variable warning, when compiling with DEBUG defined. Signed-off-by: Lothar Waßmann--- cmd/mtdparts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c index 112bf1f..683c48b 100644 --- a/cmd/mtdparts.c +++ b/cmd/mtdparts.c @@ -1556,7 +1556,7 @@ static int parse_mtdparts(const char *const mtdparts) int err = 1; char tmp_parts[MTDPARTS_MAXLEN]; - debug("\n---parse_mtdparts---\nmtdparts = %s\n\n", p); + debug("\n---parse_mtdparts---\nmtdparts = %s\n\n", mtdparts); /* delete all devices and partitions */ if (mtd_devices_init() != 0) { -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] common, image-sig: [BUG?] if no valid signature node found, do not boot signed FIT image
fit_image_verify_required_sigs() must return != 0, on error. When fit_image_verify_required_sigs() does not find a signature node, it returns 0, which leads in booting a signed FIT image. Fix this! Signed-off-by: Heiko Schocher--- Found on an imx28 based board, with key dtb appended to u-boot.bin. Booting signed FIT image without an valid key dtb appended to u-boot.bin shows: Using FEC1 device TFTP from server 192.168.1.1; our IP address is 192.168.20.103 Filename '/tftpboot/xxx/20170509/signed.fit'. Load address: 0x4200 Loading: # [...] ### 3.3 MiB/s done Bytes transferred = 12560801 (bfa9a1 hex) Using 'conf@1' configuration Verifying Hash Integrity ... OK Trying 'kernel@1' kernel subimage Description: Linux kernel Created: 2017-06-08 9:10:14 UTC Type: Kernel Image Compression: uncompressed Data Start: 0x42c0 Data Size:4078928 Bytes = 3.9 MiB Architecture: ARM OS: Linux Load Address: 0x40008000 Entry Point: 0x40008000 Hash algo:sha256 Hash value: 6d1dce3e08133ac4d34c0e07ce266f5cffc6f5a2713619c9ff76ca4b04df4a5b Sign algo:sha256,rsa4096:dev Sign value: xxx Timestamp:2017-06-08 9:10:15 UTC Verifying Hash Integrity ... sha256+ sha256,rsa4096:dev- OK ^^ Using 'conf@1' configuration Trying 'ramdisk@1' ramdisk subimage Description: miro ramdisk Created: 2017-06-08 9:10:14 UTC Type: RAMDisk Image Compression: gzip compressed Data Start: 0x423e92b0 Data Size:8457506 Bytes = 8.1 MiB Architecture: ARM OS: Linux Load Address: 0x Entry Point: 0x Hash algo:sha256 Hash value: da60884efa4373e7003940a56271c326f159ff74356ded28d8ebe108af807cda Sign algo:sha256,rsa4096:dev Sign value: xxx Timestamp:2017-06-08 9:10:15 UTC Verifying Hash Integrity ... sha256+ sha256,rsa4096:dev- OK ^^ Using 'conf@1' configuration Trying 'fdt@1' fdt subimage Description: miro device tree Created: 2017-06-08 9:10:14 UTC Type: Flat Device Tree Compression: uncompressed Data Start: 0x423e41b4 Data Size:19852 Bytes = 19.4 KiB Architecture: ARM Hash algo:sha256 Hash value: 9b39c3ab6227bb8f0bcebc0bb64439248a6670dfe873bb1c6536764e0dc1623c Sign algo:sha256,rsa4096:dev Sign value: xxx Timestamp:2017-06-08 9:10:15 UTC Verifying Hash Integrity ... sha256+ sha256,rsa4096:dev- OK ^^ Booting using the fdt blob at 0x423e41b4 Loading Kernel Image ... OK Loading Ramdisk to 47303000, end 47b13d22 ... OK Loading Device Tree to 472fb000, end 47302d8b ... OK Starting kernel ... [0.00] Booting Linux on physical CPU 0x0 [0.00] Linux version 4.11.0 (h...@hercules.denx.de) (gcc version 6.2.0 (GCC) ) #1 Tue May 16 07:31:30 CEST 2017 [...] And linux boots ... which is bad, as we have no valid key appended to u-boot.bin ... With this patch it shows: Using 'conf@1' configuration Verifying Hash Integrity ... OK Trying 'kernel@1' kernel subimage Description: Linux kernel Created: 2017-06-08 9:34:28 UTC Type: Kernel Image Compression: uncompressed Data Start: 0x42c0 Data Size:4078928 Bytes = 3.9 MiB Architecture: ARM OS: Linux Load Address: 0x40008000 Entry Point: 0x40008000 Hash algo:sha256 Hash value: 6d1dce3e08133ac4d34c0e07ce266f5cffc6f5a2713619c9ff76ca4b04df4a5b Sign algo:sha256,rsa4096:dev Sign value: xxx Timestamp:2017-06-08 9:34:29 UTC Verifying Hash Integrity ... error! Unable to verify required signature for '' hash node in 'kernel@1' image node Bad Data Hash ERROR: can't get kernel image! => common/image-sig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/image-sig.c b/common/image-sig.c index 455f2b9..646fb08 100644 --- a/common/image-sig.c +++ b/common/image-sig.c @@ -265,7 +265,7 @@ int fit_image_verify_required_sigs(const void *fit, int image_noffset, if (sig_node < 0) { debug("%s: No signature node found: %s\n", __func__, fdt_strerror(sig_node)); - return 0; + return 1; } fdt_for_each_subnode(noffset, sig_blob, sig_node) { -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] armv8: Remove duplicate definition for IH_ARCH_ARM and IH_ARCH_ARM64
The duplicate definitions for IH_ARCH_ARM and IH_ARCH_ARM64 are removed. The definitions in are used. According to this modification, the comparison between os arch and cpu arch is done in C programming instead of ASM programming. Signed-off-by: Alison Wang--- arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S | 8 ++-- arch/arm/cpu/armv8/fsl-layerscape/mp.c| 11 --- arch/arm/include/asm/arch-fsl-layerscape/mp.h | 13 - 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S b/arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S index 619d9b7..3136e3f 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S +++ b/arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S @@ -497,9 +497,7 @@ slave_cpu: rev x0, x0 /* BE to LE conversion */ cpu_is_le: ldr x5, [x11, #24] - ldr x6, =IH_ARCH_DEFAULT - cmp x6, x5 - b.eq1f + cbz x5, 1f #ifdef CONFIG_ARMV8_SWITCH_TO_EL1 adr x4, secondary_switch_to_el1 @@ -541,9 +539,7 @@ ENTRY(secondary_switch_to_el1) ldr x4, [x11] ldr x5, [x11, #24] - ldr x6, =IH_ARCH_DEFAULT - cmp x6, x5 - b.eq2f + cbz x5, 2f ldr x5, =ES_TO_AARCH32 bl switch_to_el1 diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c index 80fe1ad..ab61ac3 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c @@ -29,9 +29,14 @@ void update_os_arch_secondary_cores(uint8_t os_arch) u64 *table = get_spin_tbl_addr(); int i; - for (i = 1; i < CONFIG_MAX_CPUS; i++) - table[i * WORDS_PER_SPIN_TABLE_ENTRY + - SPIN_TABLE_ELEM_OS_ARCH_IDX] = os_arch; + for (i = 1; i < CONFIG_MAX_CPUS; i++) { + if (os_arch == IH_ARCH_DEFAULT) + table[i * WORDS_PER_SPIN_TABLE_ENTRY + + SPIN_TABLE_ELEM_ARCH_COMP_IDX] = OS_ARCH_SAME; + else + table[i * WORDS_PER_SPIN_TABLE_ENTRY + + SPIN_TABLE_ELEM_ARCH_COMP_IDX] = OS_ARCH_DIFF; + } } #ifdef CONFIG_FSL_LSCH3 diff --git a/arch/arm/include/asm/arch-fsl-layerscape/mp.h b/arch/arm/include/asm/arch-fsl-layerscape/mp.h index fd3f851..88f40c0 100644 --- a/arch/arm/include/asm/arch-fsl-layerscape/mp.h +++ b/arch/arm/include/asm/arch-fsl-layerscape/mp.h @@ -13,7 +13,7 @@ * uint64_t entry_addr; * uint64_t status; * uint64_t lpid; -* uint64_t os_arch; +* uint64_t arch_comp; * }; * we pad this struct to 64 bytes so each entry is in its own cacheline * the actual spin table is an array of these structures @@ -21,10 +21,16 @@ #define SPIN_TABLE_ELEM_ENTRY_ADDR_IDX 0 #define SPIN_TABLE_ELEM_STATUS_IDX 1 #define SPIN_TABLE_ELEM_LPID_IDX 2 -#define SPIN_TABLE_ELEM_OS_ARCH_IDX3 +/* compare os arch and cpu arch */ +#define SPIN_TABLE_ELEM_ARCH_COMP_IDX 3 #define WORDS_PER_SPIN_TABLE_ENTRY 8 /* pad to 64 bytes */ #define SPIN_TABLE_ELEM_SIZE 64 +/* os arch is same as cpu arch */ +#define OS_ARCH_SAME 0 +/* os arch is different from cpu arch */ +#define OS_ARCH_DIFF 1 + #define id_to_core(x) ((x & 3) | (x >> 6)) #ifndef __ASSEMBLY__ extern u64 __spin_table[]; @@ -43,7 +49,4 @@ int is_core_online(u64 cpu_id); u32 cpu_pos_mask(void); #endif -#define IH_ARCH_ARM2 /* ARM */ -#define IH_ARCH_ARM64 22 /* ARM64 */ - #endif /* _FSL_LAYERSCAPE_MP_H */ -- 2.1.0.27.g96db324 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] armv8: Support loading 32-bit OS which is not in the form of FIT
Hi, Tom, > On Tue, Jun 06, 2017 at 03:32:40PM +0800, Alison Wang wrote: > > > As only FIT image is supported now, this patch is to support loading > > 32-bit uImage, dtb and rootfs separately. > > > > Signed-off-by: Alison Wang> > Reviewed-by: Tom Rini > > However, entirely unrelated, I found this while reviewing the patch: > $ grep IH_ARCH_ arch/arm/include/asm/arch-fsl-layerscape/mp.h > #define IH_ARCH_ARM 2 /* ARM */ > #define IH_ARCH_ARM64 22 /* ARM64 */ > > And that's dangerous and whatever needs those defines needs to be using > instead where we have the canonical enum of those values. > Please correct this, thanks! > [Alison Wang] Thanks for your suggestion. Yes, it's dangerous and should be used. In , IH_ARCH_ARM and IH_ARCH_ARM64 are defined in an enumeration type. In the assembly file arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S, IH_ARCH_DEFAULT is used. #ifndef CONFIG_ARM64 #define IH_ARCH_DEFAULT IH_ARCH_ARM #else #define IH_ARCH_DEFAULT IH_ARCH_ARM64 #endif So IH_ARCH_ARM or IH_ARCH_ARM64 need to be used in the assembly code. The way to include in the assembly file will cause more problems. I will send a patch to use IH_ARCH_ARM and IH_ARCH_ARM64 in the C programming, and remove the duplicate definition in mp.h. Best Regards, Alison Wang ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] board_f: fix calculation of reloc_off
relocate_code() calculates the relocation offset wrt. the symbol __image_copy_start which happens to have the same value as CONFIG_TEXT_BASE on most systems. When creating an i.MX boot image with an integrated IVT it is convenient to have CONFIG_TEXT_BASE point to the start of the IVT that is prepended to the actual code. Thus CONFIG_TEXT_BASE will differ from __image_copy_start, while the calculation 'gd->relocaddr - __image_copy_start' still gives the right relocation offset. Signed-off-by: Lothar Waßmann--- common/board_f.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index d9431ee..e71a38e 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -610,13 +610,16 @@ static int setup_reloc(void) } #ifdef CONFIG_SYS_TEXT_BASE - gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE; -#ifdef CONFIG_M68K +#ifdef ARM + gd->reloc_off = gd->relocaddr - (unsigned long)__image_copy_start; +#elif defined(CONFIG_M68K) /* * On all ColdFire arch cpu, monitor code starts always * just after the default vector table location, so at 0x400 */ gd->reloc_off = gd->relocaddr - (CONFIG_SYS_TEXT_BASE + 0x400); +#else + gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE; #endif #endif memcpy(gd->new_gd, (char *)gd, sizeof(gd_t)); -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] ARM: provide a valid exception stack address for startup code
Create exception stack in IRAM if available to facilitate debugging of pre-relocation code by catching exceptions rather than stopping dead. Signed-off-by: Lothar Waßmann--- arch/arm/lib/vectors.S | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S index f53b1e9..1019091 100644 --- a/arch/arm/lib/vectors.S +++ b/arch/arm/lib/vectors.S @@ -117,7 +117,6 @@ data_abort: not_used: irq: fiq: - 1: bl 1b /* hang and never return */ @@ -126,7 +125,11 @@ fiq: /* IRQ stack memory (calculated at run-time) + 8 bytes */ .globl IRQ_STACK_START_IN IRQ_STACK_START_IN: +#ifdef IRAM_BASE_ADDR + .word IRAM_BASE_ADDR + 0x20 +#else .word 0x0badc0de +#endif @ @ IRQ stack frame. -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4] arm64: ls1043ardb: Add distro boot support
Include common config_distro_defaults.h and config_distro_bootcmd.h for u-boot enviroments to support automatical distro boot which scan boot.scr from external storage devices(e.g. SD/USB/SATA/SCSI disk) and execute autoboot script. Tested on ls1043ardb with automatically boot Ubuntu from SD card or USB disk, if it fails to detect external storage disk, fall back to nor/qspi boot. Signed-off-by: Shengzhou Liu--- v3: updated to load_addr for installer v4: fix a typo in initrd_high configs/ls1043ardb_defconfig| 1 + configs/ls1043ardb_sdcard_defconfig | 1 + include/configs/ls1043a_common.h| 67 - 3 files changed, 54 insertions(+), 15 deletions(-) diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig index 894110b..84eadf5 100644 --- a/configs/ls1043ardb_defconfig +++ b/configs/ls1043ardb_defconfig @@ -36,3 +36,4 @@ CONFIG_DM_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_STORAGE=y +CONFIG_DISTRO_DEFAULTS=y diff --git a/configs/ls1043ardb_sdcard_defconfig b/configs/ls1043ardb_sdcard_defconfig index d34a253..211399f 100644 --- a/configs/ls1043ardb_sdcard_defconfig +++ b/configs/ls1043ardb_sdcard_defconfig @@ -51,3 +51,4 @@ CONFIG_DM_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_STORAGE=y +CONFIG_DISTRO_DEFAULTS=y diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index 2c471fd..e8a756f 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -263,38 +263,75 @@ "5m(kernel),1m(dtb),9m(file_system)" #endif + + +#include +#ifndef CONFIG_SPL_BUILD +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) +#include +#endif + + /* Initial environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ "hwconfig=fsl_ddr:bank_intlv=auto\0"\ - "loadaddr=0x8010\0" \ "fdt_high=0x\0" \ - "initrd_high=0x\0" \ - "kernel_start=0x6110\0" \ - "kernel_load=0xa000\0" \ + "initrd_high=0x\0" \ + "fdt_addr=0x64f0\0" \ + "kernel_addr=0x6500\0" \ + "scriptaddr=0x8000\0" \ + "fdtheader_addr_r=0x8010\0" \ + "kernelheader_addr_r=0x8020\0" \ + "kernel_addr_r=0x8100\0"\ + "fdt_addr_r=0x9000\0" \ + "load_addr=0xa000\0" \ "kernel_size=0x280\0" \ - "console=ttyS0,115200\0"\ - "mtdparts=" MTDPARTS_DEFAULT "\0" + "console=ttyS0,115200\0"\ + "mtdparts=" MTDPARTS_DEFAULT "\0" \ + BOOTENV \ + "boot_scripts=ls1043ardb_boot.scr\0"\ + "scan_dev_for_boot_part=" \ +"part list ${devtype} ${devnum} devplist; " \ +"env exists devplist || setenv devplist 1; " \ +"for distro_bootpart in ${devplist}; do " \ + "if fstype ${devtype} " \ + "${devnum}:${distro_bootpart} " \ + "bootfstype; then " \ + "run scan_dev_for_boot; " \ + "fi; " \ + "done\0"\ + "installer=load mmc 0:2 $load_addr " \ + "/flex_installer_arm64.itb; " \ + "bootm $load_addr#ls1043ardb\0"\ + "qspi_bootcmd=echo Trying load from qspi..;" \ + "sf probe && sf read $load_addr " \ + "$kernel_addr $kernel_size && bootm $load_addr#$board\0" \ + "nor_bootcmd=echo Trying load from nor..;"\ + "cp.b $kernel_addr $load_addr " \ + "$kernel_size && bootm $load_addr#$board\0" + + +#undef CONFIG_BOOTCOMMAND +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) +#define CONFIG_BOOTCOMMAND "run distro_bootcmd;run qspi_bootcmd" +#else +#define CONFIG_BOOTCOMMAND "run distro_bootcmd;run nor_bootcmd" +#endif #define CONFIG_BOOTARGS"console=ttyS0,115200 root=/dev/ram0 " \ "earlycon=uart8250,mmio,0x21c0500 "\ MTDPARTS_DEFAULT - -#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) -#define CONFIG_BOOTCOMMAND "sf probe && sf read $kernel_load "\ - "e f0 && bootm $kernel_load" -#else -#define CONFIG_BOOTCOMMAND "cp.b $kernel_start $kernel_load " \ - "$kernel_size && bootm $kernel_load" -#endif #endif + /* Monitor Command Prompt
Re: [U-Boot] [PATCH v4 8/9] rockchip: dts: rk3399: enable HDMI output in the DTS
Hi Simon, On Wed, 7 Jun 2017 21:30:15 -0600 Simon Glass s...@chromium.org wrote: ... > > But patch 9 depends on changes in u-boot-rockchip.git. I can rebase when > > u-boot-rockchip.git is merged in u-boot.git/master and then also can add > > patch 9. Or you can merge this series into u-boot-rockchip if it is easier. > > > > OK I will go ahead and merge them again to rockchip since I have other > patches that rely on these. This is getting tricky! OK, thanks! -- Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] arm: adjust PC displayed in exception handlers to point to the failing instruction
Adjust the program counter register to point to the failing instruction depending on the exeption type. This makes it easier to localize the offending instruction leading to a fatal exception. Signed-off-by: Lothar Waßmann--- arch/arm/lib/interrupts.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index 066c172..5d06196 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -93,10 +93,18 @@ void show_regs (struct pt_regs *regs) thumb_mode (regs) ? " (T)" : ""); } +/* fixup PC to point to the instruction leading to the exception */ +static inline void fixup_pc(struct pt_regs *regs, int offset) +{ + uint32_t pc = instruction_pointer(regs) + offset; + regs->ARM_pc = pc | (regs->ARM_pc & PCMASK); +} + void do_undefined_instruction (struct pt_regs *pt_regs) { efi_restore_gd(); printf ("undefined instruction\n"); + fixup_pc(pt_regs, -4); show_regs (pt_regs); bad_mode (); } @@ -105,6 +113,7 @@ void do_software_interrupt (struct pt_regs *pt_regs) { efi_restore_gd(); printf ("software interrupt\n"); + fixup_pc(pt_regs, -4); show_regs (pt_regs); bad_mode (); } @@ -113,6 +122,7 @@ void do_prefetch_abort (struct pt_regs *pt_regs) { efi_restore_gd(); printf ("prefetch abort\n"); + fixup_pc(pt_regs, -8); show_regs (pt_regs); bad_mode (); } @@ -121,6 +131,7 @@ void do_data_abort (struct pt_regs *pt_regs) { efi_restore_gd(); printf ("data abort\n"); + fixup_pc(pt_regs, -8); show_regs (pt_regs); bad_mode (); } @@ -129,6 +140,7 @@ void do_not_used (struct pt_regs *pt_regs) { efi_restore_gd(); printf ("not used\n"); + fixup_pc(pt_regs, -8); show_regs (pt_regs); bad_mode (); } @@ -137,6 +149,7 @@ void do_fiq (struct pt_regs *pt_regs) { efi_restore_gd(); printf ("fast interrupt request\n"); + fixup_pc(pt_regs, -8); show_regs (pt_regs); bad_mode (); } @@ -145,6 +158,7 @@ void do_irq (struct pt_regs *pt_regs) { efi_restore_gd(); printf ("interrupt request\n"); + fixup_pc(pt_regs, -8); show_regs (pt_regs); bad_mode (); } -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] ARM: remove bogus cp_delay() function
The cp_delay() function was introduced because of a missing 'volatile' attribute to the 'asm' statement in get_cr() which led to the 'mrc' instruction in get_cr() being optimised out eventually. This has been fixed in commit 53fd4b8c22bb ("arm: mmu: Add missing volatile for reading SCTLR register") but the bogus cp_delay() function which was introduced as a workaround for the malfunctioning get_cr() was never removed. Signed-off-by: Lothar Waßmann--- arch/arm/lib/cache-cp15.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index e9bbcf5..2334edb 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -22,16 +22,6 @@ __weak void arm_init_domains(void) { } -static void cp_delay (void) -{ - volatile int i; - - /* copro seems to need some delay between reading and writing */ - for (i = 0; i < 100; i++) - nop(); - asm volatile("" : : : "memory"); -} - void set_section_dcache(int section, enum dcache_option option) { #ifdef CONFIG_ARMV7_LPAE @@ -196,7 +186,6 @@ static inline void mmu_setup(void) /* and enable the mmu */ reg = get_cr(); /* get control reg. */ - cp_delay(); set_cr(reg | CR_M); } @@ -214,7 +203,6 @@ static void cache_enable(uint32_t cache_bit) if ((cache_bit == CR_C) && !mmu_enabled()) mmu_setup(); reg = get_cr(); /* get control reg. */ - cp_delay(); set_cr(reg | cache_bit); } @@ -224,7 +212,6 @@ static void cache_disable(uint32_t cache_bit) uint32_t reg; reg = get_cr(); - cp_delay(); if (cache_bit == CR_C) { /* if cache isn;t enabled no need to disable */ @@ -234,7 +221,7 @@ static void cache_disable(uint32_t cache_bit) cache_bit |= CR_M; } reg = get_cr(); - cp_delay(); + if (cache_bit == (CR_C | CR_M)) flush_dcache_all(); set_cr(reg & ~cache_bit); -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] x86: extend baudrate table with 57600
Hi Tom 2017-06-06 22:04 GMT+02:00 Tom Rini: > On Tue, Jun 06, 2017 at 01:51:38PM +0200, Christian Gmeiner wrote: > >> Signed-off-by: Christian Gmeiner >> --- >> include/configs/x86-common.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h >> index b5ef8b5..9a97714 100644 >> --- a/include/configs/x86-common.h >> +++ b/include/configs/x86-common.h >> @@ -56,7 +56,7 @@ >> * Serial Configuration >> */ >> #define CONFIG_SYS_BAUDRATE_TABLE{300, 600, 1200, 2400, 4800, \ >> - 9600, 19200, 38400, 115200} >> + 9600, 19200, 38400, 57600, 115200} >> #define CONFIG_SYS_NS16550_PORT_MAPPED >> >> #define CONFIG_CMDLINE_EDITING > > Can we just use the fall back table instead? Thanks! > Can you point me to the "fall back table"? thanks -- Christian Gmeiner, MSc https://www.youtube.com/user/AloryOFFICIAL https://soundcloud.com/christian-gmeiner ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] ot1200: enable CONFIG_IMX_THERMAL for detailed thermal information
Signed-off-by: Christian Gmeiner--- configs/ot1200_defconfig | 2 ++ configs/ot1200_spl_defconfig | 2 ++ include/configs/ot1200.h | 3 +++ 3 files changed, 7 insertions(+) diff --git a/configs/ot1200_defconfig b/configs/ot1200_defconfig index d6271b8..7f1d7a8 100644 --- a/configs/ot1200_defconfig +++ b/configs/ot1200_defconfig @@ -28,6 +28,8 @@ CONFIG_SPI_FLASH_MACRONIX=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_SPI_FLASH_WINBOND=y +CONFIG_DM=y +CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT=y diff --git a/configs/ot1200_spl_defconfig b/configs/ot1200_spl_defconfig index b64ded2..1e3b0f7 100644 --- a/configs/ot1200_spl_defconfig +++ b/configs/ot1200_spl_defconfig @@ -36,6 +36,8 @@ CONFIG_SPI_FLASH_MACRONIX=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_SPI_FLASH_WINBOND=y +CONFIG_DM=y +CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT=y diff --git a/include/configs/ot1200.h b/include/configs/ot1200.h index 0582fa3..97d98fa 100644 --- a/include/configs/ot1200.h +++ b/include/configs/ot1200.h @@ -99,6 +99,9 @@ #define CONFIG_PREBOOT "" +/* Thermal support */ +#define CONFIG_IMX_THERMAL + /* Print Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) -- 2.9.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 11/11] rockchip: dts: rk3399: control vbus of typec by fixed regulator
Add fixed regulator for the port of typec0 and typec1 to control vbus instead of gpio. Signed-off-by: Meng DongyangReviewed-by: Simon Glass --- Changes in v4: None Changes in v3: None Changes in v2: - New change, add fixed regulator for rk3399 arch/arm/dts/rk3399-evb.dts | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/rk3399-evb.dts b/arch/arm/dts/rk3399-evb.dts index f5af75b..bff00c3 100644 --- a/arch/arm/dts/rk3399-evb.dts +++ b/arch/arm/dts/rk3399-evb.dts @@ -60,6 +60,18 @@ gpio = < 25 GPIO_ACTIVE_HIGH>; }; + vcc5v0_typec0: vcc5v0-typec0-en { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_typec0"; + gpio = < 3 GPIO_ACTIVE_HIGH>; + }; + + vcc5v0_typec1: vcc5v0-typec1-en { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_typec1"; + gpio = < 4 GPIO_ACTIVE_HIGH>; + }; + clkin_gmac: external-gmac-clock { compatible = "fixed-clock"; clock-frequency = <12500>; @@ -163,7 +175,7 @@ }; _typec0 { - rockchip,vbus-gpio = < 3 GPIO_ACTIVE_HIGH>; + vbus-supply = <_typec0>; status = "okay"; }; @@ -176,7 +188,7 @@ }; _typec1 { - rockchip,vbus-gpio = < 4 GPIO_ACTIVE_HIGH>; + vbus-supply = <_typec1>; status = "okay"; }; -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/4] rockchip: evb-rk3328: set uart2 io routing to M1
In rk3328, some function pin may have more than one choice, and muxed with more than one IO, for example, the UART2 controller IO, TX and RX, have 3 choice(setting in com_iomux): - M0 which mux with GPIO1A0/GPIO1A1 - M1 which mux with GPIO2A0/GPIO2A1 - usb2phy which mux with USB2.0 DP/DM pin. This suppose to be set in SPL, but the U-Boot is also design to co-work with Rockchip SPL(miniloader) which may not setting this config, let's set this config to make sure the UART2 TX/RX working in U-Boot. Signed-off-by: Kever Yang--- Changes in v2: - remove SDMMC io routing board/rockchip/evb_rk3328/evb-rk3328.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/board/rockchip/evb_rk3328/evb-rk3328.c b/board/rockchip/evb_rk3328/evb-rk3328.c index 0a26ed5..823c5da 100644 --- a/board/rockchip/evb_rk3328/evb-rk3328.c +++ b/board/rockchip/evb_rk3328/evb-rk3328.c @@ -5,7 +5,10 @@ */ #include +#include +#include #include +#include #include #include @@ -13,6 +16,13 @@ DECLARE_GLOBAL_DATA_PTR; int board_init(void) { +#define GRF_BASE 0xff10 + struct rk3328_grf_regs * const grf = (void *)GRF_BASE; + + /* uart2 select m1, sdcard select m1*/ + rk_clrsetreg(>com_iomux, IOMUX_SEL_UART2_MASK, +IOMUX_SEL_UART2_M1 << IOMUX_SEL_UART2_SHIFT); + return 0; } -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 3/4] rockchip: evb-rk3328: enable boot on regulator
Enable all the boot-on regulator in default. Signed-off-by: Kever YangAcked-by: Simon Glass --- Changes in v2: None board/rockchip/evb_rk3328/evb-rk3328.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/board/rockchip/evb_rk3328/evb-rk3328.c b/board/rockchip/evb_rk3328/evb-rk3328.c index 823c5da..cabc959 100644 --- a/board/rockchip/evb_rk3328/evb-rk3328.c +++ b/board/rockchip/evb_rk3328/evb-rk3328.c @@ -10,12 +10,14 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; int board_init(void) { + int ret; #define GRF_BASE 0xff10 struct rk3328_grf_regs * const grf = (void *)GRF_BASE; @@ -23,7 +25,11 @@ int board_init(void) rk_clrsetreg(>com_iomux, IOMUX_SEL_UART2_MASK, IOMUX_SEL_UART2_M1 << IOMUX_SEL_UART2_SHIFT); - return 0; + ret = regulators_enable_boot_on(false); + if (ret) + debug("%s: Cannot enable boot on regulator\n", __func__); + + return ret; } int dram_init(void) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 09/11] rk3328: board: add support of dwc2 gadget
Probe dwc2 udc in the function of board_usb_start to enable usb gadget function. Signed-off-by: Meng DongyangReviewed-by: Simon Glass --- Changes in v4: None Changes in v3: None Changes in v2: - Splited from patch [07/08] of v1 board/rockchip/evb_rk3328/evb-rk3328.c | 43 +++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/board/rockchip/evb_rk3328/evb-rk3328.c b/board/rockchip/evb_rk3328/evb-rk3328.c index a7895cb..7fc25bb 100644 --- a/board/rockchip/evb_rk3328/evb-rk3328.c +++ b/board/rockchip/evb_rk3328/evb-rk3328.c @@ -31,12 +31,49 @@ int dram_init_banksize(void) return 0; } -int usb_gadget_handle_interrupts(void) +#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG) +#include +#include + +static struct dwc2_plat_otg_data rk3328_otg_data = { + .rx_fifo_sz = 512, + .np_tx_fifo_sz = 16, + .tx_fifo_sz = 128, +}; + +int board_usb_init(int index, enum usb_init_type init) { - return 0; + int node; + const char *mode; + bool matched = false; + const void *blob = gd->fdt_blob; + + /* find the usb_otg node */ + node = fdt_node_offset_by_compatible(blob, -1, + "rockchip,rk3328-usb"); + + while (node > 0) { + mode = fdt_getprop(blob, node, "dr_mode", NULL); + if (mode && strcmp(mode, "otg") == 0) { + matched = true; + break; + } + + node = fdt_node_offset_by_compatible(blob, node, + "rockchip,rk3328-usb"); + } + if (!matched) { + debug("Not found usb_otg device\n"); + return -ENODEV; + } + + rk3328_otg_data.regs_otg = fdtdec_get_addr(blob, node, "reg"); + + return dwc2_udc_probe(_otg_data); } -int board_usb_init(int index, enum usb_init_type init) +int board_usb_cleanup(int index, enum usb_init_type init) { return 0; } +#endif -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] sf: Fix s25fs512s erase size and remove SECT_4K flag
> > > > So best way is to disable hybrid mode and configure flash in Uniform > > Sector Architecture > > OK, then send patches to Linux and U-Boot will review and take other > suggestions too. > Thanks Jagan, I will send U-boot patches (after testing) by early next week. My next point :) to discuss is "32-bit address options". This particular flash do not support below commands /* Bank addr access commands */ #ifdef CONFIG_SPI_FLASH_BAR # define CMD_BANKADDR_BRWR 0x17 # define CMD_BANKADDR_BRRD 0x16 # define CMD_EXTNADDR_WREAR 0xC5 # define CMD_EXTNADDR_RDEAR 0xC8 #endif Instead of above S25FS512S flash support 32-bit address commands like 4READ, 4P4E and many more which require 32 bit address directly pass on wires. Jagan, So, Do we have any plan to fix this? Yao Yuan already send one patch [1] for same. I think this is a decent approach [1]. If required I will resend this patch with little changes. [1] https://patchwork.ozlabs.org/patch/676152/ Thanks SuresH > thanks! > -- > Jagan Teki > Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream > Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 2/4] rockchip: pinctrl: rk3328: use gpio instead of sdmmc-pwren
SDMMC-PWREN is a pin to control voltage for SDMMC IO, it may be high active or low active, the dwmmc driver always assume the sdmmc-pwren as high active. Kernel treat this pin as fixed regulator instead of a pin from controller, and then it can set in dts file upon board schematic, that's a good solution, we can also do this in u-boot. Signed-off-by: Kever YangAcked-by: Simon Glass --- Changes in v2: None drivers/pinctrl/rockchip/pinctrl_rk3328.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3328.c b/drivers/pinctrl/rockchip/pinctrl_rk3328.c index d0ffeb1..f3e7eec 100644 --- a/drivers/pinctrl/rockchip/pinctrl_rk3328.c +++ b/drivers/pinctrl/rockchip/pinctrl_rk3328.c @@ -184,13 +184,11 @@ static void pinctrl_rk3328_sdmmc_config(struct rk3328_grf_regs *grf, if (com_iomux & IOMUX_SEL_SDMMC_MASK) rk_clrsetreg(>gpio0d_iomux, GPIO0D6_SEL_MASK, -GPIO0D6_SDMMC0_PWRENM1 -<< GPIO0D6_SEL_SHIFT); +GPIO0D6_GPIO << GPIO0D6_SEL_SHIFT); else rk_clrsetreg(>gpio2a_iomux, GPIO2A7_SEL_MASK, -GPIO2A7_SDMMC0_PWRENM0 -<< GPIO2A7_SEL_SHIFT); +GPIO2A7_GPIO << GPIO2A7_SEL_SHIFT); rk_clrsetreg(>gpio1a_iomux, GPIO1A0_SEL_MASK, GPIO1A0_CARD_DATA_CLK_CMD_DETN -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot