Skip to content

Instantly share code, notes, and snippets.

HW: M3-ES11-Salvator-XS, M3-ES11-Salvator-X
Kernel, defconfig, DTB: v5.1-rc7-131-gea9866793d1e
DEBUG defined in drivers/tty/serial/sh-sci.c
### The issue (frozen console during cold boot) has been reproduced
### Access to the target is still possible via ssh
root@rcar-gen3:~# dmesg | egrep -i "serial|rcar-dmac"
[ 0.446291] sh-sci e6550000.serial: clk fck is hscif1 rate 266240000
[ 0.446299] sh-sci e6550000.serial: failed to get hsck (-2)
@erosca
erosca / gist:2820be9d554f76b982edd48474d0e7ca
Last active April 30, 2019 02:10
Running 'gpt write' in a loop (two consecutive cold boots). Result: All UUIDs (8844 in total) are unique.
# H3-ULCB-KF-M06
=> while true; do env default -a; gpt write mmc 1 $partitions; print; done
## Resetting to default environment
Writing GPT: success!
baudrate=115200
bootargs=root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20
bootcmd=tftp 0x48080000 Image; tftp 0x48000000 Image-r8a7795-h3ulcb.dtb; booti 0x48080000 - 0x48000000
bootdelay=0
bootm_size=0x10000000
loadaddr=0x58000000
# v5.1-rc5-10-g618d919cae2f
# .config and compiler version detailed below
root@rcar-gen3:~# while true; do rmmod rcar_gen3_thermal; modprobe rcar_gen3_thermal; done
[ 43.439043] rcar_gen3_thermal e6198000.thermal: TSC0: Loaded 0 trip points
[ 43.451670] rcar_gen3_thermal e6198000.thermal: TSC1: Loaded 0 trip points
[ 43.463974] rcar_gen3_thermal e6198000.thermal: TSC2: Loaded 0 trip points
[ 43.657744] rcar_gen3_thermal e6198000.thermal: TSC0: Loaded 0 trip points
[ 43.670527] rcar_gen3_thermal e6198000.thermal: TSC1: Loaded 0 trip points
@erosca
erosca / gist:67a46451b3cb342fa59b558022278fff
Last active April 5, 2019 13:47
rcar-vin lockdep splat
############## Linux commit ea2cec24c8d429ee6f99040e4eb6c7ad627fe777
root@rcar-gen3:~# media-ctl -l "'rcar_csi2 feaa0000.csi2':1 -> 'VIN0 output':0 [1]"
[ 583.574399]
[ 583.575934] ======================================================
[ 583.582152] WARNING: possible circular locking dependency detected
[ 583.588375] 5.1.0-rc3+ #27 Tainted: G W
[ 583.593545] ------------------------------------------------------
[ 583.599764] media-ctl/2407 is trying to acquire lock:
[ 583.604850] 00000000be992082 (&group->lock){+.+.}, at: rvin_group_link_notify+0xc4/0x4f4
@erosca
erosca / gist:9d2dd0ea16fb9f208effc89226e2b27f
Last active March 7, 2019 18:52
make ARCH=arm CROSS_COMPILE=... r8a77965_ulcb_defconfig all -j12
➜ u-boot (7769c8aafc11) make ARCH=arm \
CROSS_COMPILE=/opt/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- \
r8a77965_ulcb_defconfig all -j12
Error: arch/arm/dts/r8a77965-u-boot.dtsi:14.1-5 Label or path soc not found
Error: arch/arm/dts/.r8a77965-salvator-x-u-boot.dtb.pre.tmp:16.1-16 Label or path sdhi2_pins_uhs not found
FATAL ERROR: Syntax error parsing input tree
scripts/Makefile.lib:308: recipe for target 'arch/arm/dts/r8a77965-salvator-x-u-boot.dtb' failed
make[3]: *** [arch/arm/dts/r8a77965-salvator-x-u-boot.dtb] Error 1
make[3]: *** Waiting for unfinished jobs....
@erosca
erosca / gist:1af11aa62e16903e1b6964be6a9eea77
Created February 14, 2019 19:57
Testing: [PATCH v3] drivers: base: add support to skip power management in device/driver model
This file has been truncated, but you can view the full file.
##### Link: https://marc.info/?l=linux-pm&m=155016896214969&w=2
root@rcar-gen3:~#
root@rcar-gen3:~# cat z.sh
modprobe i2c-dev
msleep 200
i2cset -f -y 7 0x30 0x20 0x0F
msleep 200
echo deep > /sys/power/mem_sleep
msleep 200
echo mem > /sys/power/state
@erosca
erosca / gist:da9ea551033a503121de61049d77b834
Last active February 13, 2019 22:31
Testing: [PATCH v2] drivers: base: add support to skip power management in device/driver model
root@rcar-gen3:~# cat z.sh
modprobe i2c-dev
i2cset -f -y 7 0x30 0x20 0x0F
echo deep > /sys/power/mem_sleep
echo mem > /sys/power/state
root@rcar-gen3:~#
root@rcar-gen3:~# sh z.sh
[ 46.813220] i2c /dev entries driver
[ 46.874214] PM: suspend entry (deep)
[ 46.878211] PM: Syncing filesystems ... done.