<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm63xx/u-boot/drivers/core, branch master</title>
<subtitle>Broadcom-s U-Boot</subtitle>
<id>https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/'/>
<updated>2019-07-05T12:19:41Z</updated>
<entry>
<title>dm: Add a No-op uclass</title>
<updated>2019-07-05T12:19:41Z</updated>
<author>
<name>Jean-Jacques Hiblot</name>
</author>
<published>2019-07-05T07:33:57Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=07e33711fec4f1106f36805b5dc830da07c783c5'/>
<id>urn:sha1:07e33711fec4f1106f36805b5dc830da07c783c5</id>
<content type='text'>
This uclass is intended for devices that do not need any features from the
uclass, including binding children.
This will typically be used by devices that are used to bind child devices
but do not use dm_scan_fdt_dev() to do it. That is for example the case of
several USB wrappers that have 2 child devices (1 for device and 1 for
host) but bind only one at a any given time.

Signed-off-by: Jean-Jacques Hiblot &lt;jjhiblot@ti.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>dm: core: Fix dm_extended_scan_fdt()</title>
<updated>2019-05-21T23:33:23Z</updated>
<author>
<name>Patrice Chotard</name>
</author>
<published>2019-05-15T08:07:01Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=ee730a7cd2afe445e53e92b5c37396a5b118f7af'/>
<id>urn:sha1:ee730a7cd2afe445e53e92b5c37396a5b118f7af</id>
<content type='text'>
This function  takes an argument, blob,
but never uses it, instead uses gd-&gt;fdt_blob directly.

Fixes: e81c98649b7a ("dm: core: add clocks node scan")

Reported-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Signed-off-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>core: ofnode: Have ofnode_read_u32_default return a u32</title>
<updated>2019-05-21T23:33:23Z</updated>
<author>
<name>Trent Piepho</name>
</author>
<published>2019-05-10T17:48:20Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=b061ef39c350c288542536b09dc01d9e984a12ac'/>
<id>urn:sha1:b061ef39c350c288542536b09dc01d9e984a12ac</id>
<content type='text'>
It was returning an int, which doesn't work if the u32 it is reading,
or the default value, will overflow a signed int.

While it could be made to work, when using a C standard/compiler where
casting negative signed values to unsigned has a defined behavior,
combined with careful casting, it seems obvious one is meant to use
ofnode_read_s32_default() with signed values.

Cc: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Trent Piepho &lt;tpiepho@impinj.com&gt;
</content>
</entry>
<entry>
<title>core: ofnode: Add ofnode_get_addr_size_index</title>
<updated>2019-05-21T23:33:23Z</updated>
<author>
<name>Keerthy</name>
</author>
<published>2019-04-24T11:49:53Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=e679d03b08fbde6145fdef150f4b240e6d14448e'/>
<id>urn:sha1:e679d03b08fbde6145fdef150f4b240e6d14448e</id>
<content type='text'>
Add ofnode_get_addr_size_index function to fetch the address
and size of the reg space based on index.

Signed-off-by: Keerthy &lt;j-keerthy@ti.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>dm: core: Fix translate condition in ofnode_get_addr_size()</title>
<updated>2019-05-08T04:44:07Z</updated>
<author>
<name>Simon Glass</name>
</author>
<published>2019-04-26T03:58:36Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=003331827a1c7c97ea5b2e29961858e004a485e1'/>
<id>urn:sha1:003331827a1c7c97ea5b2e29961858e004a485e1</id>
<content type='text'>
Update the condition to translate only if this is enabled for SPL.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>dm: core: Change platform specific translation-offset handling</title>
<updated>2019-04-24T02:26:43Z</updated>
<author>
<name>Stefan Roese</name>
</author>
<published>2019-04-12T14:42:28Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=f2100f6f77212e2a5b3db165e84eed911be5c3f6'/>
<id>urn:sha1:f2100f6f77212e2a5b3db165e84eed911be5c3f6</id>
<content type='text'>
Testing has shown that the current DM implementation of a platform /
board specific translation offset, as its needed for the SPL on MVEBU
platforms is buggy. The translation offset is confingured too late,
after the driver bind functions are run. This may result in incorrect
address translations. With the current implementation its not possible
to configure the offset earlier, as the DM code has not run at all.

This patch now removed the set_/get_translation_offset() calls and
moves the translation offset into the GD variable translation_offset.
This variable will get used when CONFIG_TRANSLATION_OFFSET is enabled.
This option is enabled only for MVEBU on ARM32 platforms, where its
currenty needed and configured in the SPL.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Pierre Bourdon &lt;delroth@gmail.com&gt;
Cc: Baruch Siach &lt;baruch@tkos.co.il&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Tested-by: Pierre Bourdon &lt;delroth@gmail.com&gt;
Tested-by: Baruch Siach &lt;baruch@tkos.co.il&gt;
</content>
</entry>
<entry>
<title>simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver</title>
<updated>2019-04-24T02:26:43Z</updated>
<author>
<name>Lukas Auer</name>
</author>
<published>2019-04-10T12:46:07Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=3a7c45f6a7725808e2e82908be4bc90d4d78e737'/>
<id>urn:sha1:3a7c45f6a7725808e2e82908be4bc90d4d78e737</id>
<content type='text'>
Boards such as qemu-riscv, which receive their device tree at runtime,
for example from QEMU or firmware, are unable to add the appropriate
device tree properties to make devices available pre relocation.
Instead, they must rely on the DM_FLAG_PRE_RELOC flag to be set for the
required drivers.

Add the DM_FLAG_PRE_RELOC flag to the simple-bus driver to make devices
under it with drivers that have set the flag as well available pre
relocation for these boards.

Signed-off-by: Lukas Auer &lt;lukas.auer@aisec.fraunhofer.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>dm: remove unused function dm_fdt_pre_reloc</title>
<updated>2019-04-12T02:10:48Z</updated>
<author>
<name>Patrick Delaunay</name>
</author>
<published>2019-03-20T17:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=c7fbee540e006b4cf6cda9272d0d5c9847b3db11'/>
<id>urn:sha1:c7fbee540e006b4cf6cda9272d0d5c9847b3db11</id>
<content type='text'>
The function dm_ofnode_pre_reloc should be used instead
of the function dm_fdt_pre_reloc and avoid duplicated code.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>core: ofnode: Fix ASAN-reported stack-buffer-overflow in of_get_address</title>
<updated>2019-04-12T02:10:05Z</updated>
<author>
<name>Eugeniu Rosca</name>
</author>
<published>2019-03-09T16:27:07Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=9bfacf249b100d72b2633ac3a43f2c3888e0a41f'/>
<id>urn:sha1:9bfacf249b100d72b2633ac3a43f2c3888e0a41f</id>
<content type='text'>
v2019.04-rc3 sandbox U-Boot fails to boot when compiled with
 -fsanitize=address and linked against -lasan, reporting [1].

Git bisecting shows that the issue is contributed by v2019.01 commit
1678754f5e2c ("core: ofnode: Fix ofnode_get_addr_index function").

The root cause seems to be the mismatch between sizeof(u64) and
sizeof(fdt_size_t) on sandbox. Luckily, thanks to the fact that the
size argument of both of_get_address() and fdtdec_get_addr_size_fixed()
is optional, we can pass NULL in its place, avoiding the problem.

[1] Backtrace reported by ASAN (gcc 8.1.0):

$&gt; ./u-boot -d arch/sandbox/dts/sandbox.dtb
[..]
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;

=================================================================
==10998==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffcc2331140 at pc 0x0000004eeeb0 bp 0x7ffcc2330f80 sp 0x7ffcc2330f70
WRITE of size 8 at 0x7ffcc2331140 thread T0
    #0 0x4eeeaf in of_get_address drivers/core/of_addr.c:154
    #1 0x4f7441 in ofnode_get_addr_index drivers/core/ofnode.c:263
    #2 0x5b2a78 in sb_eth_ofdata_to_platdata drivers/net/sandbox.c:422
    #3 0x4dccd8 in device_probe drivers/core/device.c:407
    #4 0x753170 in eth_initialize net/eth-uclass.c:428
    #5 0x47d9bf in initr_net common/board_r.c:557
    #6 0x6bcfa7 in initcall_run_list lib/initcall.c:30
    #7 0x47e1fe in board_init_r common/board_r.c:859
    #8 0x4060e5 in main arch/sandbox/cpu/start.c:356
    #9 0x7fb8d135482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #10 0x40a3a8 in _start (/path/to/u-boot/u-boot+0x40a3a8)

Address 0x7ffcc2331140 is located in stack of thread T0 at offset 32 in frame
    #0 0x4f72b8 in ofnode_get_addr_index drivers/core/ofnode.c:255

  This frame has 3 object(s):
    [32, 36) 'size' &lt;== Memory access at offset 32 partially overflows this variable
    [96, 100) 'flags'
    [160, 168) 'node'
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow drivers/core/of_addr.c:154 in of_get_address
Shadow bytes around the buggy address:
  0x10001845e1d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10001845e1e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10001845e1f0: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
  0x10001845e200: 04 f2 f2 f2 f2 f2 f2 f2 04 f2 f2 f2 f2 f2 f2 f2
  0x10001845e210: 04 f2 f2 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 00
=&gt;0x10001845e220: 00 00 00 00 f1 f1 f1 f1[04]f2 f2 f2 f2 f2 f2 f2
  0x10001845e230: 04 f2 f2 f2 f2 f2 f2 f2 00 f2 f2 f2 f3 f3 f3 f3
  0x10001845e240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10001845e250: 00 00 00 00 f1 f1 f1 f1 00 00 f2 f2 f3 f3 f3 f3
  0x10001845e260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
  0x10001845e270: f1 f1 00 f2 f2 f2 f3 f3 f3 f3 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==10998==ABORTING

'To' list:
 git log --since=1year drivers/core/ofnode.c | grep "\-by: .*@" | \
     sed 's/.*-by: //' | sort | uniq -c | sort -rn
     10 Simon Glass &lt;sjg@chromium.org&gt;
      3 Mario Six &lt;mario.six@gdsys.cc&gt;
      2 Martin Fuzzey &lt;mfuzzey@parkeon.com&gt;
      2 Marek Vasut &lt;marek.vasut+renesas@gmail.com&gt;
      1 Tom Rini &lt;trini@konsulko.com&gt;
      1 Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
      1 Keerthy &lt;j-keerthy@ti.com&gt;
      1 Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
      1 Bin Meng &lt;bmeng.cn@gmail.com&gt;

Fixes: 1678754f5e2c ("core: ofnode: Fix ofnode_get_addr_index function")
Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
</content>
</entry>
<entry>
<title>syscon: update syscon_regmap_lookup_by_phandle</title>
<updated>2019-04-12T02:10:05Z</updated>
<author>
<name>Patrick Delaunay</name>
</author>
<published>2019-03-07T08:57:13Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=a442e61e245824f2cf7d7cf43844ac90e5d7e7a4'/>
<id>urn:sha1:a442e61e245824f2cf7d7cf43844ac90e5d7e7a4</id>
<content type='text'>
Change the function syscon_regmap_lookup_by_phandle()
introduced by commit 6c3af1f24e4b ("syscon: dm: Add a
new method to get a regmap from DTS") to have
Linux-compatible syscon API.

Same modification than commit e151a1c288bd ("syscon: add
Linux-compatible syscon API") solves issue when the node
identified by the phandle has several compatibles and is
already bound to a dedicated driver.

See Linux commit bdb0066df96e ("mfd: syscon: Decouple syscon
interface from platform devices").

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
