Skip to content

Instantly share code, notes, and snippets.

@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.
@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: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: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
# 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: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
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)
=> part list mmc 0
Partition Map for MMC device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 2048 524288 c3d57e39-01 83
2 526336 8388608 c3d57e39-02 83
3 8914944 22201344 c3d57e39-03 05 Extd
5 8916992 524288 c3d57e39-05 83
6 9443328 2097152 c3d57e39-06 83
@erosca
erosca / gist:ac779c348dd272c448e162c406c48f4a
Last active April 21, 2020 23:32
[5.7.0-rc2-00069-g18bf34080c4c] NFS4: Couldn't follow remote path
[ 5.425913] Starting kernel ...
[ 5.429179]
[ 5.430721] [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd073]
[ 0.000000] Linux version 5.7.0-rc2-00069-g18bf34080c4c (erosca@lxhi-065) (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)), GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209) #133 SM0
[ 0.000000] Machine model: Renesas H3ULCB Kingfisher board based on r8a77951
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 32 MiB at 0x000000007e000000
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000048000000-0x000000073fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x73f7e0100-0x73f7e1fff]
[ 5.452796] Starting kernel ...
[ 5.456062]
[ 5.457604] [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd073]
[ 0.000000] Linux version 5.7.0-rc2-00073-g8829cae72218 (erosca@lxhi-065) (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)), GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209) #134 SM0
[ 0.000000] Machine model: Renesas H3ULCB Kingfisher board based on r8a77951
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 32 MiB at 0x000000007e000000
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000048000000-0x000000073fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x73f7e0100-0x73f7e1fff]