<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm63xx/u-boot/include/linux/compat.h, 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>2018-10-09T19:18:17Z</updated>
<entry>
<title>linux/compat.h: Add netdev_### log macros</title>
<updated>2018-10-09T19:18:17Z</updated>
<author>
<name>Bin Meng</name>
</author>
<published>2018-07-26T10:15:58Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=b06d76f9ae2eae389ddaa74abeee7987bdf1b9d4'/>
<id>urn:sha1:b06d76f9ae2eae389ddaa74abeee7987bdf1b9d4</id>
<content type='text'>
Currently there are two ethernet drivers (mvneta.c and mvpp2.c) that
has netdev_### (eg: netdev_dbg) log macros defined in its own driver
file. This adds these log macros in a common place linux/compat.h.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
</entry>
<entry>
<title>lib: Add hexdump</title>
<updated>2018-06-13T11:49:12Z</updated>
<author>
<name>Alexey Brodkin</name>
</author>
<published>2018-06-05T14:17:57Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=f8c987f8f127f867d96ca74bcd1fcb11d8265b67'/>
<id>urn:sha1:f8c987f8f127f867d96ca74bcd1fcb11d8265b67</id>
<content type='text'>
Often during debugging session it's very interesting to see
what data we were dealing with. For example what we write or read
to/from memory or peripherals.

This change introduces functions that allow to dump binary
data with one simple function invocation like:
-------------------&gt;8----------------
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len);
-------------------&gt;8----------------

which gives us the following:
-------------------&gt;8----------------
00000000: f2 b7 c9 88 62 61 75 64 72 61 74 65 3d 31 31 35  ....baudrate=115
00000010: 32 30 30 00 62 6f 6f 74 61 72 67 73 3d 63 6f 6e  200.bootargs=con
00000020: 73 6f 6c 65 3d 74 74 79 53 33 2c 31 31 35 32 30  sole=ttyS3,11520
00000030: 30 6e 38 00 62 6f 6f 74 64 65 6c 61 79 3d 33 00  0n8.bootdelay=3.
00000040: 62 6f 6f 74 66 69 6c 65 3d 75 49 6d 61 67 65 00  bootfile=uImage.
00000050: 66 64 74 63 6f 6e 74 72 6f 6c 61 64 64 72 3d 39  fdtcontroladdr=9
00000060: 66 66 62 31 62 61 30 00 6c 6f 61 64 61 64 64 72  ffb1ba0.loadaddr
00000070: 3d 30 78 38 32 30 30 30 30 30 30 00 73 74 64 65  =0x82000000.stde
00000080: 72 72 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32  rr=serial0@e0022
00000090: 30 30 30 00 73 74 64 69 6e 3d 73 65 72 69 61 6c  000.stdin=serial
000000a0: 30 40 65 30 30 32 32 30 30 30 00 73 74 64 6f 75  0@e0022000.stdou
000000b0: 74 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 30  t=serial0@e00220
000000c0: 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00..............
...
-------------------&gt;8----------------

Source of hexdump.c was copied from Linux kernel v4.7-rc2.

Signed-off-by: Alexey Brodkin &lt;abrodkin@synopsys.com&gt;
Cc: Anatolij Gustschin &lt;agust@denx.de&gt;
Cc: Mario Six &lt;mario.six@gdsys.cc&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>dm: define dev_*() log functions in DM header</title>
<updated>2017-10-04T16:00:20Z</updated>
<author>
<name>Masahiro Yamada</name>
</author>
<published>2017-09-26T02:58:29Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=c898cba41e94fa87c57d71911fb812cd34c7a91e'/>
<id>urn:sha1:c898cba41e94fa87c57d71911fb812cd34c7a91e</id>
<content type='text'>
Many drivers had started to use dev_err, dev_info, etc. for log
functions.  Currently, we are relying on &lt;linux/compat.h&gt;, but I
guess the best home is &lt;dm/device.h&gt;, taking into account that
Linux defines them in &lt;linux/device.h&gt;.

For now, I am leaving the ones in &lt;linux/compat.h&gt; because lots of
Linux-originated code uses dev_*(), but the first argument is not
struct udevice, so we need to ignore the bogus argument.  More
efforts are needed to iron out the issues.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>bug.h: move runtime BUG/WARN macros into &lt;linux/bug.h&gt;</title>
<updated>2017-10-04T16:00:20Z</updated>
<author>
<name>Masahiro Yamada</name>
</author>
<published>2017-09-16T05:10:45Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=0a70fb4c1c180d6ad6cd4c1dcd3fae8c5d4dd62e'/>
<id>urn:sha1:0a70fb4c1c180d6ad6cd4c1dcd3fae8c5d4dd62e</id>
<content type='text'>
Collect runtime BUG/WARN into a self-contained header &lt;linux/bug.h&gt;
to make these macros easier to use.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>printk: collect printk stuff into &lt;linux/printk.h&gt; with loglevel support</title>
<updated>2017-10-04T14:31:17Z</updated>
<author>
<name>Masahiro Yamada</name>
</author>
<published>2017-09-16T05:10:40Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=b44b30260ffa3dc82f4bb98b022483bb09e95353'/>
<id>urn:sha1:b44b30260ffa3dc82f4bb98b022483bb09e95353</id>
<content type='text'>
When we import code from Linux, with regular re-sync planned, we want
to use printk() and pr_*().  U-Boot does not support them in a clean
way.  So, people end up with local macros, or compat headers here and
there, then we occasionally see build errors of definition conflicts.

We have include/linux/compat.h, but putting all sorts of unrelated
things into a single header is just a temporal workaround.  Hence this
patch, to find the best home for all printk variants.  If you want to
use printk() and friends, please include &lt;linux/printk.h&gt;.  This header
is self-contained, and pulls in only a few headers.

When I was testing this clean-up, I noticed the image size exceeded
its platform limit on some boards.  This is because all pr_*() that
were previously defined as no-op in include/linux/mtd/mtd.h (unless
CONFIG_MTD_DEBUG is set), are now enabled.

To make such boards happy, this commit also implements CONFIG_LOGLEVEL.
The concept is similar to the kernel parameter "loglevel".  (Actually,
the Kconfig help message was taken from kernel-paremeter.txt of Linux)
Messages with a loglevel smaller than console loglevel will be printed.

The difference is the loglevel is build-time determined.  To save the
image size, lower priority pr_*() are compiled out.  I set the default
of CONFIG_LOGLEVEL to 6, i.e. pr_notice and higher priority messages
are compiled in.

I adjusted CONFIG_LOGLEVEL to avoid build error for some boards.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
[trini: Add in SPL_LOGLEVEL that is the same as LOGLEVEL]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>treewide: remove unneeded semicolons</title>
<updated>2017-06-16T14:11:38Z</updated>
<author>
<name>Masahiro Yamada</name>
</author>
<published>2017-06-13T06:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=51855e8981e1b5e0a7b919662c32d0e4a374f575'/>
<id>urn:sha1:51855e8981e1b5e0a7b919662c32d0e4a374f575</id>
<content type='text'>
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>Update WARN_ON() to return a value</title>
<updated>2017-06-01T13:03:06Z</updated>
<author>
<name>Simon Glass</name>
</author>
<published>2017-05-19T02:08:52Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=fd7029029f5fd23990fb18c1049167fdcf95104d'/>
<id>urn:sha1:fd7029029f5fd23990fb18c1049167fdcf95104d</id>
<content type='text'>
In linux v4.9 this returns a value. This saves checking the warning
condition twice in some code.

Update the U-Boot version to do this also.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>delay: collect {m, n, u}delay declarations to include/linux/delay.h</title>
<updated>2017-01-14T21:46:28Z</updated>
<author>
<name>Masahiro Yamada</name>
</author>
<published>2016-12-27T15:35:59Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=5bc516ed661af363611d4eb555cae35c0adc6fe7'/>
<id>urn:sha1:5bc516ed661af363611d4eb555cae35c0adc6fe7</id>
<content type='text'>
Currently, mdelay() and udelay() are declared in include/common.h,
while ndelay() in include/linux/compat.h.  It would be nice to
collect them into include/linux/delay.h like Linux.

While we are here, fix the ndelay() implementation; I used the
DIV_ROUND_UP() instead of (x)/1000 because it must wait *longer*
than the given period of time.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>linux/compat.h: Properly implement ndelay fallback</title>
<updated>2016-11-28T20:10:34Z</updated>
<author>
<name>mario.six@gdsys.cc</name>
</author>
<published>2016-11-18T13:40:37Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=ca388143ce87e5b1ae6c3b5eb41fcf8bcecdc0dd'/>
<id>urn:sha1:ca388143ce87e5b1ae6c3b5eb41fcf8bcecdc0dd</id>
<content type='text'>
Commit c68c62 ("i2c: mvtwsi: Make delay times frequency-dependent")
extensively used the ndelay function with a calculated parameter
which is dependant on the configured frequency of the I2C bus. If
standard speed is employed, the parameter is usually 10000 (10000ns
period length for 100kHz frequency).

But, since the arm architecture does not implement a proper version of
ndelay, the fallback default from include/linux/compat.h is used,
which defines every ndelay as udelay(1). This causes problems for
slower speeds on arm, since the delay time is now 9us too short for
the desired frequency, which leads to random failures of the I2C
interface.

To remedy this, we implement a proper, parameter-aware ndelay fallback
for architectures that don't implement a real ndelay function.

Reported-By: Jason Brown &lt;Jason.brown@apcon.com&gt;
To: Tom Rini &lt;trini@konsulko.com&gt;
To: Heiko Schocher &lt;hs@denx.de&gt;
Signed-off-by: Mario Six &lt;mario.six@gdsys.cc&gt;
</content>
</entry>
<entry>
<title>Move ENOTSUPP defines to include/linux/errno.h</title>
<updated>2016-09-24T02:25:43Z</updated>
<author>
<name>Masahiro Yamada</name>
</author>
<published>2016-09-21T02:28:59Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=4982f464203ea51665f6f4133535b7e8bfe98994'/>
<id>urn:sha1:4982f464203ea51665f6f4133535b7e8bfe98994</id>
<content type='text'>
Collect a couple of duplicated defines into a single place.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
</feed>
