| #
c9c9fba9 |
| 12-Sep-2019 |
Joseph Chen <chenjh@rock-chips.com> |
include: compat: remove dump_stack(...)
- We have implement dump_stack() for both ARM and ARM64; - It was brought back by careless on commit: (28386b6 UPSTREAM: lib: Add hexdump)
Change-Id: I8ebbd4
include: compat: remove dump_stack(...)
- We have implement dump_stack() for both ARM and ARM64; - It was brought back by careless on commit: (28386b6 UPSTREAM: lib: Add hexdump)
Change-Id: I8ebbd46862475485963d2ac835ea4031207d2153 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
show more ...
|
| #
28386b6d |
| 05-Jun-2018 |
Alexey Brodkin <Alexey.Brodkin@synopsys.com> |
UPSTREAM: lib: Add hexdump
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 i
UPSTREAM: lib: Add hexdump
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: ------------------->8---------------- print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len); ------------------->8----------------
which gives us the following: ------------------->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.............. ... ------------------->8----------------
Source of hexdump.c was copied from Linux kernel v4.7-rc2.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Mario Six <mario.six@gdsys.cc> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Stefan Roese <sr@denx.de>
Change-Id: I038b41f51d45d1b853da499578bf8ef384a63730 Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit f8c987f8f127f867d96ca74bcd1fcb11d8265b67)
show more ...
|
| #
d0df954b |
| 01-Feb-2019 |
Joseph Chen <chenjh@rock-chips.com> |
arm: lib: add arm32/64 stacktrace support
This patch supports dump arm32/64 stacktrace as the format of raw address info. The U-Boot symbol table is not available now, please use ./scripts/stacktrac
arm: lib: add arm32/64 stacktrace support
This patch supports dump arm32/64 stacktrace as the format of raw address info. The U-Boot symbol table is not available now, please use ./scripts/stacktrace.sh script to parse stacktrace info with command:
./scripts/stacktrace.sh <file> // stacktrace info file
Example on RK3399: Call trace: PC: [< 00258a7c >] dwc3_gadget_uboot_handle_interrupt+0xa0/0x5bc LR: [< 002052f8 >] usb_gadget_handle_interrupts+0x10/0x1c
Stack: [< 00258a7c >] dwc3_gadget_uboot_handle_interrupt+0xa0/0x5bc [< 0025bd6c >] sleep_thread.isra.20+0xb0/0x114 [< 0025cf58 >] fsg_main_thread+0x2c8/0x1814 [< 0020db58 >] do_rkusb+0x250/0x338 [< 00226a00 >] cmd_process+0xac/0xe0 [< 00212df4 >] run_list_real+0x6fc/0x72c [< 00212f94 >] parse_stream_outer+0x170/0x67c [< 002126e0 >] parse_string_outer+0xdc/0xf4 [< 00212bb0 >] run_list_real+0x4b8/0x72c [< 00212f94 >] parse_stream_outer+0x170/0x67c [< 00212698 >] parse_string_outer+0x94/0xf4 [< 00225f30 >] run_command_list+0x38/0x90 [< 00202d08 >] rockchip_dnl_mode_check+0x4c/0xd4 [< 00202db0 >] setup_boot_mode+0x20/0xf0 [< 00203010 >] board_late_init+0x10/0x40 [< 0027071c >] initcall_run_list+0x44/0x80 [< 00213d68 >] board_init_r+0x20/0x24
The "dump_stack()" is available to trigger stacktrace.
Change-Id: Ib1423269dd255fa4a34231489cd3b7e6ddd22540 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
show more ...
|
| #
8f1ef3f5 |
| 26-Sep-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
UPSTREAM: dm: define dev_*() log functions in DM header
Many drivers had started to use dev_err, dev_info, etc. for log functions. Currently, we are relying on <linux/compat.h>, but I guess the bes
UPSTREAM: dm: define dev_*() log functions in DM header
Many drivers had started to use dev_err, dev_info, etc. for log functions. Currently, we are relying on <linux/compat.h>, but I guess the best home is <dm/device.h>, taking into account that Linux defines them in <linux/device.h>.
For now, I am leaving the ones in <linux/compat.h> 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.
Change-Id: I18f67bd63ac22d8b69bdf8e0558600c58e8703d2 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit c898cba41e94fa87c57d71911fb812cd34c7a91e)
show more ...
|
| #
046a6e2a |
| 16-Sep-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
bug.h: move runtime BUG/WARN macros into <linux/bug.h>
Collect runtime BUG/WARN into a self-contained header <linux/bug.h> to make these macros easier to use.
Change-Id: If924684bdab99d2c8fe0b4b375
bug.h: move runtime BUG/WARN macros into <linux/bug.h>
Collect runtime BUG/WARN into a self-contained header <linux/bug.h> to make these macros easier to use.
Change-Id: If924684bdab99d2c8fe0b4b3755d0ee5291d11be Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 0a70fb4c1c180d6ad6cd4c1dcd3fae8c5d4dd62e)
show more ...
|
| #
a9a4552a |
| 16-Sep-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
UPSTREAM: printk: collect printk stuff into <linux/printk.h> with loglevel support
When we import code from Linux, with regular re-sync planned, we want to use printk() and pr_*(). U-Boot does not
UPSTREAM: printk: collect printk stuff into <linux/printk.h> with loglevel support
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 <linux/printk.h>. 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.
Change-Id: I997d8bbeedd48777be87472df8ed126181fc4b8e Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> [trini: Add in SPL_LOGLEVEL that is the same as LOGLEVEL] Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit b44b30260ffa3dc82f4bb98b022483bb09e95353)
show more ...
|
| #
51855e89 |
| 13-Jun-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
treewide: remove unneeded semicolons
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
|
| #
fd702902 |
| 19-May-2017 |
Simon Glass <sjg@chromium.org> |
Update WARN_ON() to return a value
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
Update WARN_ON() to return a value
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 <sjg@chromium.org>
show more ...
|
| #
5bc516ed |
| 27-Dec-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
delay: collect {m, n, u}delay declarations to include/linux/delay.h
Currently, mdelay() and udelay() are declared in include/common.h, while ndelay() in include/linux/compat.h. It would be nice to
delay: collect {m, n, u}delay declarations to include/linux/delay.h
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 <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
2d221489 |
| 29-Nov-2016 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
|
| #
ca388143 |
| 18-Nov-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
linux/compat.h: Properly implement ndelay fallback
Commit c68c62 ("i2c: mvtwsi: Make delay times frequency-dependent") extensively used the ndelay function with a calculated parameter which is depen
linux/compat.h: Properly implement ndelay fallback
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 <Jason.brown@apcon.com> To: Tom Rini <trini@konsulko.com> To: Heiko Schocher <hs@denx.de> Signed-off-by: Mario Six <mario.six@gdsys.cc>
show more ...
|
| #
4982f464 |
| 21-Sep-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
Move ENOTSUPP defines to include/linux/errno.h
Collect a couple of duplicated defines into a single place.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
|
| #
fd9102da |
| 13-Jun-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-atmel
|
| #
88a7fffe |
| 04-Jun-2016 |
Andreas Bießmann <andreas@biessmann.org> |
linux/compat.h: add dev_warn()
In order to prevent build errors for copied code from linux introduce dev_warn().
Suggested-by: Scott Wood <oss@buserror.net> Signed-off-by: Andreas Bießmann <andreas
linux/compat.h: add dev_warn()
In order to prevent build errors for copied code from linux introduce dev_warn().
Suggested-by: Scott Wood <oss@buserror.net> Signed-off-by: Andreas Bießmann <andreas@biessmann.org> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
5f5620ab |
| 12-Nov-2015 |
Stefano Babic <sbabic@denx.de> |
Merge git://git.denx.de/u-boot
|
| #
f8fdb81f |
| 05-Nov-2015 |
Fabio Estevam <fabio.estevam@freescale.com> |
compat: Remove is_power_of_2() definition
Use the is_power_of_2() definition from log2.h to align with the kernel implementation.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed
compat: Remove is_power_of_2() definition
Use the is_power_of_2() definition from log2.h to align with the kernel implementation.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Jagan Teki <jteki@openedev.com>
show more ...
|
| #
e573bdb3 |
| 30-Oct-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
5219db8a |
| 22-Oct-2015 |
Heiko Schocher <hs@denx.de> |
linux, compat: add missing definitions for ubi
add missing definitions for the ubi/ubifs sync with linux 4.2, also change "#define kfree ..." into a static inline, so prevent ubi compile error:
linux, compat: add missing definitions for ubi
add missing definitions for the ubi/ubifs sync with linux 4.2, also change "#define kfree ..." into a static inline, so prevent ubi compile error:
CC drivers/mtd/ubi/fastmap.o drivers/mtd/ubi/fastmap.c: In function 'scan_pool': drivers/mtd/ubi/fastmap.c:475:3: error: called object 'free' is not a function
Signed-off-by: Heiko Schocher <hs@denx.de>
show more ...
|
| #
6b9f9ead |
| 13-Jul-2015 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
linux_compat: handle __GFP_ZERO in kmalloc()
Currently, kzalloc() returns zero-filled memory, while kmalloc() simply ignores the second argument and never fills the memory area with zeros.
I want k
linux_compat: handle __GFP_ZERO in kmalloc()
Currently, kzalloc() returns zero-filled memory, while kmalloc() simply ignores the second argument and never fills the memory area with zeros.
I want kmalloc(size, __GFP_ZERO) to behave as kzalloc() does, which will make it easier to add more memory allocator variants.
With the introduction of __GFP_ZERO flag, going forward, kzmalloc() variants can fall back to kmalloc() enabling the __GFP_ZERO flag.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| #
ebc3328c |
| 13-Jul-2015 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
linux_compat: move vzalloc() to header file as an inline function
The vzalloc(size) is equivalent to kzalloc(size, 0). Move it to include/linux/compat.h as an inline function in order to avoid the
linux_compat: move vzalloc() to header file as an inline function
The vzalloc(size) is equivalent to kzalloc(size, 0). Move it to include/linux/compat.h as an inline function in order to avoid the function call overhead.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
3721eaf2 |
| 13-Jul-2015 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
linux_compat: remove cpu_relax() define
The macro cpu_relax() is defined by several headers in different ways.
arch/{arm,avr32,mips}/include/asm/processor.h defines it as follows: #define cpu_rel
linux_compat: remove cpu_relax() define
The macro cpu_relax() is defined by several headers in different ways.
arch/{arm,avr32,mips}/include/asm/processor.h defines it as follows: #define cpu_relax() barrier()
On the other hand, include/linux/compat.h defines it as follows: #define cpu_relax() do {} while (0)
If both headers are included from the same source file, the warning warning: "cpu_relax" redefined [enabled by default] is displayed.
It effectively makes it impossible to include <linux/compat.h> from some sources. Drop the latter.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| #
747a0a5b |
| 23-Feb-2015 |
Kishon Vijay Abraham I <kishon@ti.com> |
usb: dwc3: gadget: make dwc3 gadget build in uboot
Did a bunch of things to get dwc3/gadget.c compile in u-boot without build errors and warnings *) Changed the included header files to that used in
usb: dwc3: gadget: make dwc3 gadget build in uboot
Did a bunch of things to get dwc3/gadget.c compile in u-boot without build errors and warnings *) Changed the included header files to that used in u-boot. *) Used dma_alloc_coherent and dma_free_coherent APIs of u-boot *) removed sg support *) remove jiffies and used a simple while loop *) removed irq support and added a function to call these interrupt handler.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| #
e1cc4d31 |
| 24-Feb-2015 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge remote-tracking branch 'u-boot/master' into 'u-boot-arm/master'
|
| #
e72d3443 |
| 13-Feb-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
7f641d53 |
| 04-Feb-2015 |
Tom Rini <trini@ti.com> |
Merge branch 'master' of git://git.denx.de/u-boot-ubi
|