402 Star 1.4K Fork 1.3K

GVPopenEuler / kernel

 / 详情

I2C suspension prevention.

已完成
任务
创建于  
2022-11-14 14:14

Add custom recovery method using ACPI.
Add gpio bus recovery support.

评论 (2)

shaowangming 创建了任务

Hi shaowangming, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers: @YangYingliang , @成坚 (CHENG Jian) , @jiaoff , @zhengzengkai , @刘勇强 , @wangxiongfeng , @朱科潜 , @WangShaoBo , @lujialin , @wuxu_buque , @Xu Kuohai , @冷嘲啊 , @Lingmingqiang , @yuzenghui , @juntian , @OSSIM , @陈结松 , @whoisxxx , @koulihong , @刘恺 , @hanjun-guo , @woqidaideshi , @Chiqijun , @Kefeng , @ThunderTown , @AlexGuo , @kylin-mayukun , @Zheng Zucheng , @柳歆 , @Jackie Liu , @zhujianwei001 , @郑振鹏 , @SuperSix173 , @colyli , @Zhang Yi , @htforge , @Qiuuuuu , @Yuehaibing , @xiehaocheng , @guzitao , @CTC-Xibo.Wang , @zhanghongchen , @chen wei , @Jason Zeng , @Xie XiuQi

openeuler-ci-bot 添加了
 
sig/Kernel
标签

验证通过日志:
root@fpga:/# ls

bin i2c_test lib64 ptt_test sbin tmp var

dev init linuxrc root sys usb_test

etc lib proc run sysroot usr

root@fpga:/# cd i2c
root@fpga:/# cd i2c_test/

root@fpga:/i2c_test# ls

i2c-hisi.ko i2cdetect i2ctransfer libi2c.so.0 lsgpio

root@fpga:/i2c_test# ls

i2c-hisi.ko i2cdetect i2ctransfer libi2c.so.0 lsgpio

root@fpga:/i2c_test# insmod i2c-hisi.ko

[ 97.670800] hisi-i2c HISI03D1:00: speed mode is Standard Mode (100 kHz). hw version 0x30

root@fpga:/i2c_test# lsmod

i2c_hisi 16384 0 - Live 0xffff800008e80000

root@fpga:/i2c_test# ls

i2c-hisi.ko i2cdetect i2ctransfer libi2c.so.0 lsgpio

root@fpga:/i2c_test# cp i2cdetect ?l-l

i2c-0i2c HiSilicon I2C Controller HISI03D1:00I2C adapter

root@fpga:/i2c_test# ./i2cdetect ?l-l

./i2cdetect: error while loading shared libraries: libi2c.so.0: cannot open shared object file: No such file or directory

root@fpga:/i2c_test#
root@fpga:/i2c_test# ./i2cdetect -l
root@fpga:/i2c_test# i2cdetect -l

i2c-0i2c HiSilicon I2C Controller HISI03D1:00I2C adapter

root@fpga:/i2c_test#
root@fpga:/i2c_test# i2cdetect -ly -r 0

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: -- -- -- -- -- -- -- -- -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

70: -- -- -- -- -- -- -- --

root@fpga:/i2c_test# i2ctransfer -y 0 w3@0x50 0x0 0x0 0x11

root@fpga:/i2c_test# i2ctransfer -y 0 w2@0x50 0x0 0x0 r1

0x11

root@fpga:/i2c_test# c

root@fpga:/i2c_test#

root@fpga:/i2c_test#

root@fpga:/i2c_test# ^C

root@fpga:/i2c_test# ^C

root@fpga:/i2c_test# ^C

root@fpga:/i2c_test# ^C

root@fpga:/i2c_test# QEMU 6.0.91 monitor - type 'help' for more information

(qemu) ttrtratractracetrace-trace-etrace-evtrace-evetrace-eventrace-eventtrace-event trace-event ptrace-event pltrace-event pl0trace-event pl06trace-event pl061trace-event pl061_trace-event pl061_wtrace-event pl061_wrtrace-event pl061_writrace-event pl061_writtrace-event pl061_writetrace-event pl061_write trace-event pl061_write otrace-event pl061_write on

(qemu)

(qemu)

(qemu)

(qemu)

^C

root@fpga:/i2c_test#

root@fpga:/i2c_test#

root@fpga:/i2c_test# lsmod

i2c_hisi 16384 0 - Live 0xffff800008e80000

root@fpga:/i2c_test# rm i2
root@fpga:/i2c_test# rm i2c_Z
root@fpga:/i2c_test# rm i2crmoodmod i
root@fpga:/i2c_test# rmmod i2c_hisi

root@fpga:/i2c_test# ls

i2c-hisi.ko i2cdetect i2ctransfer libi2c.so.0 lsgpio

root@fpga:/i2c_test# insmod i2
root@fpga:/i2c_test# insmod i2c-hi
root@fpga:/i2c_test# insmod i2c-hisi.ko

pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x400 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x400 value 0x80
[ 455.203183] hisi-i2c HISI03D1:00: speed mode is Standard Mode (100 kHz). hw version 0x30

root@fpga:/i2c_test# devmem 0x09021060 32 0x1

root@fpga:/i2c_test# i2ctransfer -y 0 w3@0x50 0x0 0x0 0x11

pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
[ 541.955906] hisi-i2c HISI03D1:00: bus transfer timeout

i2ctransfer: I2C_RDWR: Input/output error

root@fpga:/i2c_test# i2ctransfer -y 0 w2@0x50 0x0 0x0 r1

pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
pl061_write /machine/unattached/device[15] offset 0x200 value 0x80
pl061_write /machine/unattached/device[15] offset 0x200 value 0x0
[ 567.395891] hisi-i2c HISI03D1:00: bus transfer timeout

i2ctransfer: I2C_RDWR: Input/output error

root@fpga:/i2c_test# lsgpio

sh: lsgpio: not found

root@fpga:/i2c_test# ./lspio

sh: ./lspio: not found

root@fpga:/i2c_test#
root@fpga:/i2c_test# ./lspiogpiopio

GPIO chip: gpiochip0, "ARMH0061:00", 8 GPIO lines

line 0: unnamed unused [input]

line 1: unnamed unused [input]

line 2: unnamed unused [input]

line 3: unnamed "ACPI:Event" [used, input]

line 4: unnamed unused [input]

line 5: unnamed unused [input]

line 6: unnamed "sda" [used, input, pull-up]

line 7: unnamed "scl" [used, output, active-low, pull-up]

root@fpga:/i2c_test# QEMU: Terminated

[root@localhost vm]#

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5329419 openeuler ci bot 1632792936
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助