需求:开发个LEDC的驱动,netlink方式传输数据,控制至少80个灯,要能过72小时压力测试
可以用全志的ledc驱动重新开发
或者是把我写好的拿去DEBUG
出现的问题就是ledc驱动会崩溃,超过6小时DMA也奔溃了
有兴趣的大佬联系我呀 flyingbearno1
需求:开发个LEDC的驱动,netlink方式传输数据,控制至少80个灯,要能过72小时压力测试
可以用全志的ledc驱动重新开发
或者是把我写好的拿去DEBUG
出现的问题就是ledc驱动会崩溃,超过6小时DMA也奔溃了
有兴趣的大佬联系我呀 flyingbearno1
make -j
以后
pack指令这个之前如何把自己的应用app编译好的可执行文件塞到img的镜像里面去啊
我之前尝试过往下面这个文件夹里面塞,但是直接在编译的时候就报错啦
/home/tina_whycanpii/tina_d1_open_v2_for_whycanpi/target/allwinner/t113-whycanpii/busybox-init-base-files/etc/init.d
那么各位大佬如何把自己的app塞到镜像里面去呢?
反正前6个小时能稳定运行,但是6小时以后就不行了
那个驱动程序我改了个数据传输的部分,用了netlink
之前也有个bug能带崩溃整个系统,但是我后来修复了那个问题
现在这个报错会是什么问题呢,看起来像是DMA挂了
这个只有长时间运行才发生
那么有木有办法给这个DMA重置一下啊,就像内存整理那样,我每6小时给它整理一下应该也能用
这个错误一旦发生了,这个ledc驱动基本上就彻底罢工了,停止程序重新发包也木有用,只能重启系统
我那个程序操作ledc 驱动会一直不停发数据,一直用,就是RGB背光那种幻彩运动的效果
sunxi_ledc_trans_data()1189 - dmaengine_prep_slave_single failed!
[26886.219276] sunxi_ledc_trans_data()1189 - dmaengine_prep_slave_single failed!
[26886.252494] sunxi_ledc_trans_data()1189 - dmaengine_prep_slave_single failed!
运行3小时,网卡就蹦了
还带着系统一起蹦了,这怎么玩啊
[10963.415133] 8<--- cut here ---
[10963.418572] Unable to handle kernel NULL pointer dereference at virtual address 00000150
[10963.427581] pgd = c9704b51
[10963.430586] [00000150] *pgd=00000000
[10963.434565] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[10963.440567] Modules linked in: 8821cs
[10963.444647] CPU: 1 PID: 1241 Comm: RTW_RECV_THREAD Not tainted 5.4.61 #317
[10963.452291] Hardware name: Generic DT based system
[10963.457624] PC is at __kmalloc_track_caller+0x130/0x194
[10963.463435] LR is at slab_pre_alloc_hook+0x18/0x2c
[10963.468755] pc : [<c01d3214>] lr : [<c01d1600>] psr: 20000013
[10963.475720] sp : c3d61e40 ip : a0000013 fp : 00000000
[10963.481528] r10: 0011edd1 r9 : c3d61e40 r8 : c0572fd4
[10963.487333] r7 : 00082cc0 r6 : c3d60000 r5 : c5801900 r4 : 00000150
[10963.494594] r3 : 00000000 r2 : 05483000 r1 : 0011edd1 r0 : c5801900
[10963.501851] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[10963.509786] Control: 10c5387d Table: 44ed406a DAC: 00000051
[10963.516169] Process RTW_RECV_THREAD (pid: 1241, stack limit = 0x70278199)
[10963.523715] Stack: (0xc3d61e40 to 0xc3d62000)
[10963.528564] 1e40: c4d74180 00000cc0 c3d61e7b c0572fd4 00000400 00000cc0 c940972c c0572f20
[10963.537672] 1e60: c4d74180 000002c0 c5812f00 c0b04e08 00000000 c0572fd4 000002c0 13ed6e21
[10963.546772] 1e80: 00000000 c4d74540 000002c0 00000048 c439d000 c439d160 00000000 c0575194
[10963.555870] 1ea0: c945bd04 00000002 c9408000 bf0692e0 c945bd04 c948d000 c9408000 bf079344
[10963.564973] 1ec0: c948d000 00000001 c9408000 bf034968 00000132 c945c324 c3da8060 c945bd04
[10963.574084] 1ee0: c4d74540 c945c324 00000001 c4e9f048 c3da8060 c9408000 c4e9f04c c3d2fa70
[10963.583184] 1f00: c9408000 bf048cac 00000160 c945c324 00000038 00000160 c3da8048 00000160
[10963.592284] 1f20: c3d2fa70 bf0bb494 c940972c c9409718 c940986c c940986c 00000018 13ed6e21
[10963.601382] 1f40: 00000001 c9408000 00000001 c940971c c3d60030 bf048ce8 c4f0fc5c c4ecc81c
[10963.610483] 1f60: 00000000 bf095258 c9408000 bf048da4 00000001 13ed6e21 c4ecc800 c4ecc800
[10963.619575] 1f80: c3d60000 c53a3100 c9408000 c0134360 c53a3100 c0134220 00000000 00000000
[10963.628674] 1fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[10963.637774] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10963.646869] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[10963.655979] [<c01d3214>] (__kmalloc_track_caller) from [<c0572f20>] (__kmalloc_reserve.constprop.48+0x20/0x68)
[10963.667112] [<c0572f20>] (__kmalloc_reserve.constprop.48) from [<c0572fd4>] (__alloc_skb+0x6c/0x150)
[10963.677276] [<c0572fd4>] (__alloc_skb) from [<c0575194>] (skb_copy+0x38/0x98)
[10963.685792] [<c0575194>] (skb_copy) from [<bf0692e0>] (dbg_rtw_skb_copy+0x34/0x58 [8821cs])
[10963.695815] [<bf0692e0>] (dbg_rtw_skb_copy [8821cs]) from [<bf079344>] (rtw_os_recvframe_duplicate_skb+0x28/0x84 [8821cs])
[10963.708778] [<bf079344>] (rtw_os_recvframe_duplicate_skb [8821cs]) from [<bf034968>] (rtw_mi_buddy_clone_bcmc_packet+0xf0/0x154 [8821cs])
[10963.723218] [<bf034968>] (rtw_mi_buddy_clone_bcmc_packet [8821cs]) from [<bf048cac>] (pre_recv_entry+0xb8/0xf4 [8821cs])
[10963.736017] [<bf048cac>] (pre_recv_entry [8821cs]) from [<bf0bb494>] (rtl8821cs_recv_hdl+0x27c/0x36c [8821cs])
[10963.747729] [<bf0bb494>] (rtl8821cs_recv_hdl [8821cs]) from [<bf095258>] (rtw_hal_recv_hdl+0x10/0x14 [8821cs])
[10963.759532] [<bf095258>] (rtw_hal_recv_hdl [8821cs]) from [<bf048da4>] (rtw_recv_thread+0xbc/0x170 [8821cs])
[10963.770821] [<bf048da4>] (rtw_recv_thread [8821cs]) from [<c0134360>] (kthread+0x140/0x14c)
[10963.780119] [<c0134360>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[10963.788153] Exception stack(0xc3d61fb0 to 0xc3d61ff8)
[10963.793774] 1fa0: 00000000 00000000 00000000 00000000
[10963.802875] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10963.811967] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[10963.819333] Code: eb149195 e1a00004 e8bd87f0 e5953014 (e7940003)
[10963.826177] ---[ end trace cb39a3ed387912af ]---
[10964.463445] 8<--- cut here ---
[10964.466887] Unable to handle kernel NULL pointer dereference at virtual address 00000150
[10964.475912] pgd = 656192c3
[10964.478918] [00000150] *pgd=44087835, *pte=00000000, *ppte=00000000
[10964.485907] Internal error: Oops: 17 [#2] PREEMPT SMP ARM
[10964.491908] Modules linked in: 8821cs
[10964.495985] CPU: 1 PID: 1369 Comm: main Tainted: G D 5.4.61 #317
[10964.504112] Hardware name: Generic DT based system
[10964.509446] PC is at __kmalloc_track_caller+0x130/0x194
[10964.515255] LR is at slab_pre_alloc_hook+0x18/0x2c
[10964.520578] pc : [<c01d3214>] lr : [<c01d1600>] psr: 20000013
[10964.527546] sp : c5867e00 ip : a0000013 fp : c548d400
[10964.533350] r10: 0011edd1 r9 : c5867e00 r8 : c0572fd4
[10964.539161] r7 : 00082cc0 r6 : c5866000 r5 : c5801900 r4 : 00000150
[10964.546418] r3 : 00000000 r2 : 05483000 r1 : 0011edd1 r0 : c5801900
[10964.553683] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[10964.561615] Control: 10c5387d Table: 44ed406a DAC: 00000051
[10964.568006] Process main (pid: 1369, stack limit = 0x0667a97e)
[10964.574500] Stack: (0xc5867e00 to 0xc5868000)
[10964.579343] 7e00: c4d749c0 00000cc0 c5867e3b c0572fd4 000002c0 00000cc0 c0b04e08 c0572f20
[10964.588442] 7e20: c4d749c0 00000150 c5812f00 c0b04e08 00000000 c0572fd4 00000150 13ed6e21
[10964.597544] 7e40: 00000000 00000000 00000150 00000000 c4c73800 c5867ed4 00000008 c05c8144
[10964.606648] 7e60: c0801030 c013557c c5867e94 c50fedc0 c50fedc0 00000000 00000554 00000000
[10964.615746] 7e80: 00000000 13ed6e21 0000000c c5867f04 c548d400 b69c6c84 00000000 0000000c
[10964.624847] 7ea0: c0b04e08 00000008 b69c6d04 c056b804 c5867f04 c056ce5c c5867edc 13ed6e21
[10964.633946] 7ec0: c5867f20 00000000 00000001 b6ee6510 00000150 c5867f04 0000000c 00000005
[10964.643043] 7ee0: 00000000 00000150 c5867ecc 00000001 c5867f20 00000000 00000000 00000000
[10964.652148] 7f00: c0b04e08 00000010 00000000 00000000 00000001 c5867f80 c5866000 c016e08c
[10964.661251] 7f20: c5867f20 00000000 00000000 00000000 cbea05c6 000009f8 cbe94276 000009f8
[10964.670350] 7f40: c016d310 c5eaa680 01000000 00000000 00000000 00000000 00000000 c016adf0
[10964.679451] 7f60: ee073a90 13ed6e21 b69c6718 c0b04e08 00000000 000000a2 c0101228 c016e1a0
[10964.688546] 7f80: 00000000 13ed6e21 b69c6c84 0000000c 00000000 00000122 c0101228 c5866000
[10964.697643] 7fa0: 00000122 c0101000 b69c6c84 0000000c 00000008 b6ee6510 00000150 00000000
[10964.706745] 7fc0: b69c6c84 0000000c 00000000 00000122 b69c6d24 00000000 b6f5e540 b69c6d04
[10964.715840] 7fe0: b69c66f0 b69c66dc b6f3545c b6f34968 60000010 00000008 00000000 00000000
[10964.724945] [<c01d3214>] (__kmalloc_track_caller) from [<c0572f20>] (__kmalloc_reserve.constprop.48+0x20/0x68)
[10964.736078] [<c0572f20>] (__kmalloc_reserve.constprop.48) from [<c0572fd4>] (__alloc_skb+0x6c/0x150)
[10964.746244] [<c0572fd4>] (__alloc_skb) from [<c05c8144>] (netlink_sendmsg+0x118/0x304)
[10964.755057] [<c05c8144>] (netlink_sendmsg) from [<c056b804>] (sock_sendmsg_nosec+0x14/0x24)
[10964.764350] [<c056b804>] (sock_sendmsg_nosec) from [<c056ce5c>] (__sys_sendto+0xc0/0xf8)
[10964.773353] [<c056ce5c>] (__sys_sendto) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[10964.782059] Exception stack(0xc5867fa8 to 0xc5867ff0)
[10964.787677] 7fa0: b69c6c84 0000000c 00000008 b6ee6510 00000150 00000000
[10964.796778] 7fc0: b69c6c84 0000000c 00000000 00000122 b69c6d24 00000000 b6f5e540 b69c6d04
[10964.805868] 7fe0: b69c66f0 b69c66dc b6f3545c b6f34968
[10964.811489] Code: eb149195 e1a00004 e8bd87f0 e5953014 (e7940003)
[10964.818300] ---[ end trace cb39a3ed387912b0 ]---
[10982.763500] 8<--- cut here ---
[10982.766926] Unable to handle kernel NULL pointer dereference at virtual address 00000150
[10982.775938] pgd = c9704b51
[10982.778944] [00000150] *pgd=00000000
[10982.782923] Internal error: Oops: 17 [#3] PREEMPT SMP ARM
[10982.788922] Modules linked in: 8821cs
[10982.793001] CPU: 1 PID: 1242 Comm: RTW_CMD_THREAD Tainted: G D 5.4.61 #317
[10982.802096] Hardware name: Generic DT based system
[10982.807430] PC is at __kmalloc+0x130/0x194
[10982.811984] LR is at slab_pre_alloc_hook+0x18/0x2c
[10982.817314] pc : [<c01d33a8>] lr : [<c01d1600>] psr: 20000013
[10982.824287] sp : c3c35ba0 ip : 000ee2e0 fp : bf03102c
[10982.830093] r10: 0011edd1 r9 : c3c35ba0 r8 : bf068bf4
[10982.835906] r7 : 00000a20 r6 : c3c34000 r5 : c5801900 r4 : 00000150
[10982.843167] r3 : 00000000 r2 : 05483000 r1 : 0011edd1 r0 : c5801900
[10982.850426] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[10982.858354] Control: 10c5387d Table: 44ed406a DAC: 00000051
[10982.864744] Process RTW_CMD_THREAD (pid: 1242, stack limit = 0xd56f1c7d)
[10982.872195] Stack: (0xc3c35ba0 to 0xc3c36000)
[10982.877042] 5ba0: c9408000 000002f0 000002f0 00000001 c940806c c9408080 bf141fdc bf068bf4
[10982.886143] 5bc0: c9408000 bf068c04 c9408000 00000001 000002f0 bf0691e0 c9408000 c4c54400
[10982.895241] 5be0: c3c35c0c bf0034ec c9408080 bf141fdc bf03102c c9408000 c9408018 c9408074
[10982.904342] 5c00: 00000001 bf013b6c 2401036c 00000001 00000001 00000005 5f6f656c 00000035
[10982.913438] 5c20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10982.922527] 5c40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10982.931626] 5c60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10982.940726] 5c80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10982.949826] 5ca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10982.958931] 5cc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10982.968027] 5ce0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10982.977126] 5d00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10982.986230] 5d20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10982.995330] 5d40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.004432] 5d60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.013529] 5d80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.022624] 5da0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.031727] 5dc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.040828] 5de0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.049923] 5e00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.059022] 5e20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.068124] 5e40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.077224] 5e60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.086325] 5e80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.095423] 5ea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.104527] 5ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.113622] 5ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 13ed6e21
[10983.122724] 5f00: c9408018 c9408000 c5b27204 c9469f20 c9408018 00000000 c9409440 bf01df48
[10983.131825] 5f20: c9408000 bf01e0a8 c5b27200 c9408000 c5b27204 00104cd8 bf164000 bf0310ac
[10983.140929] 5f40: c4c54840 c9408000 c9409460 bf000f3c c3c34000 c53a3100 c5b27200 c940948c
[10983.150024] 5f60: c4f0fc5c 13ed6e21 60000113 c4eccd80 c3c34000 c53a3100 c9408000 bf000ddc
[10983.159125] 5f80: c4f0fc5c c4eccd9c 00000000 c0134360 c53a3100 c0134220 00000000 00000000
[10983.168225] 5fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[10983.177325] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.186425] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[10983.196109] [<c01d33a8>] (__kmalloc) from [<bf068bf4>] (_rtw_malloc+0x30/0x34 [8821cs])
[10983.205697] [<bf068bf4>] (_rtw_malloc [8821cs]) from [<bf068c04>] (_rtw_zmalloc+0xc/0x2c [8821cs])
[10983.216272] [<bf068c04>] (_rtw_zmalloc [8821cs]) from [<bf0691e0>] (dbg_rtw_zmalloc+0x10/0x30 [8821cs])
[10983.227271] [<bf0691e0>] (dbg_rtw_zmalloc [8821cs]) from [<bf0034ec>] (rtw_sitesurvey_cmd+0x50/0x1a0 [8821cs])
[10983.239228] [<bf0034ec>] (rtw_sitesurvey_cmd [8821cs]) from [<bf013b6c>] (rtw_do_join+0x2bc/0x2d0 [8821cs])
[10983.250703] [<bf013b6c>] (rtw_do_join [8821cs]) from [<bf01df48>] (_rtw_roaming+0x3c/0x70 [8821cs])
[10983.261325] [<bf01df48>] (_rtw_roaming [8821cs]) from [<bf01e0a8>] (rtw_stadel_event_callback+0xfc/0x298 [8821cs])
[10983.273407] [<bf01e0a8>] (rtw_stadel_event_callback [8821cs]) from [<bf0310ac>] (mlme_evt_hdl+0x80/0x94 [8821cs])
[10983.285387] [<bf0310ac>] (mlme_evt_hdl [8821cs]) from [<bf000f3c>] (rtw_cmd_thread+0x160/0x494 [8821cs])
[10983.296221] [<bf000f3c>] (rtw_cmd_thread [8821cs]) from [<c0134360>] (kthread+0x140/0x14c)
[10983.305422] [<c0134360>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[10983.313455] Exception stack(0xc3c35fb0 to 0xc3c35ff8)
[10983.319073] 5fa0: 00000000 00000000 00000000 00000000
[10983.328165] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[10983.337262] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[10983.344624] Code: eb149130 e1a00004 e8bd87f0 e5953014 (e7940003)
[10983.351425] ---[ end trace cb39a3ed387912b1 ]---
[10983.356575] Kernel panic - not syncing: Fatal exception in interrupt
[10983.363652] CPU0: stopping
[10983.366669] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 5.4.61 #317
[10983.374997] Hardware name: Generic DT based system
[10983.380340] [<c010de60>] (unwind_backtrace) from [<c010a5f8>] (show_stack+0x10/0x14)
[10983.388955] [<c010a5f8>] (show_stack) from [<c06f8c28>] (dump_stack+0x88/0xa4)
[10983.396993] [<c06f8c28>] (dump_stack) from [<c010c234>] (handle_IPI+0xe4/0x180)
[10983.405131] [<c010c234>] (handle_IPI) from [<c035f23c>] (gic_handle_irq+0x70/0x78)
[10983.413554] [<c035f23c>] (gic_handle_irq) from [<c01021cc>] (__irq_svc+0x6c/0xa8)
[10983.421878] Exception stack(0xc0b01f40 to 0xc0b01f88)
[10983.427497] 1f40: 068fd1d0 c5eac374 00000000 c0114760 00000001 c0b00000 c0b04e28 c0b04e64
[10983.436595] 1f60: c0b4d000 c5fff540 c0a270c0 00000000 00000000 c0b01f90 c0107f48 c0107f38
[10983.445690] 1f80: 60000013 ffffffff
[10983.449571] [<c01021cc>] (__irq_svc) from [<c0107f38>] (arch_cpu_idle+0x1c/0x38)
[10983.457803] [<c0107f38>] (arch_cpu_idle) from [<c013df64>] (do_idle+0xd4/0x128)
[10983.465947] [<c013df64>] (do_idle) from [<c013e250>] (cpu_startup_entry+0x18/0x20)
[10983.474373] [<c013e250>] (cpu_startup_entry) from [<c0a00c80>] (start_kernel+0x364/0x3f4)
[10983.483478] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
wifi模组是 rtl8821cs
wpa自动联网没问题,但是用tina的api重新联网后系统崩溃,驱动也挂了
这会是什么原因呢?
用那个api联网的话需要先disconnect之前的网络吗?
root@TinaLinux:/# swu_param: ####
swu_software: ####
swu_mode: ####
no swupdate_cmd to run, wait for next swupdate
[ 40.449098] usb1-vbus: disabling
[ 51.807292] 8<--- cut here ---
[ 51.810729] Unable to handle kernel paging request at virtual address 0311f3f8
[ 51.818767] pgd = 81c8e1c3
[ 51.821785] [0311f3f8] *pgd=00000000
[ 51.825766] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 51.831673] Modules linked in: 8821cs
[ 51.835748] CPU: 1 PID: 1242 Comm: RTW_CMD_THREAD Not tainted 5.4.61 #317
[ 51.843299] Hardware name: Generic DT based system
[ 51.848634] PC is at __kmalloc+0x130/0x194
[ 51.853183] LR is at slab_pre_alloc_hook+0x18/0x2c
[ 51.858507] pc : [<c01d33a8>] lr : [<c01d1600>] psr: 20000013
[ 51.865476] sp : c4c479b0 ip : 00000024 fp : c4ebd824
[ 51.871284] r10: 000003fd r9 : c4c479b0 r8 : c06d5e94
[ 51.877088] r7 : 00000b20 r6 : c4c46000 r5 : c5801c00 r4 : 0311f3f8
[ 51.884346] r3 : 00000000 r2 : 05483000 r1 : 000003fd r0 : c5801c00
[ 51.891607] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 51.899542] Control: 10c5387d Table: 45b5806a DAC: 00000051
[ 51.905931] Process RTW_CMD_THREAD (pid: 1242, stack limit = 0x297004dd)
[ 51.913382] Stack: (0xc4c479b0 to 0xc4c48000)
[ 51.918230] 79a0: 00000001 00000000 c4ebd800 c4d77800
[ 51.927328] 79c0: c4c47a18 c4ea427c c4d778b0 c06d5e94 00000154 c0b04e08 00000000 00000154
[ 51.936428] 79e0: c4ea427c c4d77aa0 c06d6b44 c4d77aa0 c4c47b58 c4ebd800 c4f05000 c0b04e08
[ 51.945530] 7a00: c4ea427c 00000154 c4ebd824 c06d6ab0 00000000 00000000 00000000 00000000
[ 51.954623] 7a20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 51.963729] 7a40: ffff9eef 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 51.972826] 7a60: c4ea427c 00000000 c4f05000 c4f05000 00000000 00000000 00000000 00000000
[ 51.981928] 7a80: 00000000 ffffde68 14110064 a871f944 0000c50c 00000000 00000000 00000000
[ 51.991038] 7aa0: 00000000 13ed6e21 c0b04e08 00000a20 00000178 c4ebd800 c4c47b58 0311f408
[ 52.000128] 7ac0: 00000000 c94270f5 ffffde68 c06d6ba8 00000a20 c4d77aa0 0311f401 00000001
[ 52.009224] 7ae0: c9426cf5 c01d277c c5ebac00 c5a44b80 c4d77aa0 c01d32bc 0000000b 000003e8
[ 52.018324] 7b00: 000003e8 c4d77aa0 c9408000 01721400 e61556b1 13ed6e21 c9427000 c4ebd800
[ 52.027415] 7b20: 00000178 c942706d c4d77aa0 0311f408 00000000 c94270f5 ffffde68 bf07f738
[ 52.036512] 7b40: 00000a20 13ed6e21 c94270f5 c4ea427c 00000000 0000d685 c4ea427c 00000000
[ 52.045618] 7b60: ffffde68 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 52.054717] 7b80: 00000000 00000000 00000002 ffff53dc ffffffff 13ed6e21 c5858000 0000000b
[ 52.063819] 7ba0: c9427000 c428b70c c940806c c9408000 c9408074 00000000 00000000 bf08013c
[ 52.072922] 7bc0: 40000013 c07112b0 c4c47bec c4c47bec c0a35540 c9409890 ffff9fb7 00000001
[ 52.082021] 7be0: 00000001 bf033370 00000001 bf032ef0 c9408938 13ed6e21 40000013 c9408000
[ 52.091119] 7c00: c9408018 c5276204 ffff9eef bf164000 c9409440 bf141fdc bf03102c bf080238
[ 52.100219] 7c20: c9408000 bf01c86c c4c47cbc c4c47ccc c084297c c04f5594 00000004 00000001
[ 52.109316] 7c40: c5b5c380 00001000 00000004 13ed6e21 c582e800 7fffffff c4c47cf0 c4c46000
[ 52.118414] 7c60: 7fffffff c070e680 00000001 c5a44b00 c013a764 00000100 00000122 13ed6e21
[ 52.127516] 7c80: 00000004 c4c47cf4 c4c47cf0 7fffffff 00000002 c084297c c094dc40 00000000
[ 52.136616] 7ca0: c4c47cf4 c070e780 c582e800 c0b04e08 c4c47ce0 c4c47cf0 c084297c c04f5594
[ 52.145713] 7cc0: c4c47d40 c0b04e08 c582e800 00000000 00000042 00000034 00000000 c04f58c8
[ 52.154814] 7ce0: 00000000 c4c47d40 00000000 00000000 00000000 00030003 c4c47cf8 c4c47cf8
[ 52.163916] 7d00: 00000000 00000000 c4c47d08 c4c47d08 c04f5010 00000000 00000000 00000000
[ 52.173011] 7d20: c582eb48 00000000 00000001 c0b04e08 c582eb48 00000001 00000003 00000000
[ 52.182106] 7d40: 00000000 c4c47d58 c0b04e08 c0148d78 00000000 c4c47d58 00000000 c0b04e08
[ 52.191205] 7d60: 00000000 c4c47d64 c4c47d64 13ed6e21 e61556b1 13ed6e21 4e1e6fdc 00000001
[ 52.200309] 7d80: c59d4410 0000000d c59d44e4 20000013 00000001 00000001 fffffff3 c03fee74
[ 52.209403] 7da0: c50fe400 c4c47e54 00000042 00000043 00000000 bf06eea8 c5b5c380 00000001
[ 52.218500] 7dc0: c9408000 00000040 c5b5c380 c4c47e53 00020000 00000000 00000000 13ed6e21
[ 52.227592] 7de0: 00000000 bf06ec08 00000000 c428b000 00000000 00000000 00000000 00020042
[ 52.236696] 7e00: 00000000 bf064344 00000000 13ed6e21 c4c47e53 00000001 00000004 c428b000
[ 52.245787] 7e20: 00000042 00000000 001604d4 00000000 c9409440 c9408000 c5276200 bf064384
[ 52.254890] 7e40: 00000000 00000001 0000011c bf0bc690 12000044 13ed6e21 00000002 00000032
[ 52.263992] 7e60: c52cf000 bf0d3ce0 00000000 bf04a0f4 c5a44b00 fffff834 ffffffff 13ed6e21
[ 52.273098] 7e80: c5801e00 c01d32bc c5b5c380 0000000c 60000013 c07112b0 c9409440 c014d140
[ 52.282195] 7ea0: c5b5c380 c9409440 c5b5c380 bf06979c c5b5c380 00000000 00000000 00000000
[ 52.291294] 7ec0: c5f9fb80 c5b5cc80 c5801e00 ffff9eef bf164000 00000001 bf141fdc c01d277c
[ 52.300395] 7ee0: c9409440 c9408000 c5276200 c0b04e08 c9409440 c5b5cc80 00000000 13ed6e21
[ 52.309501] 7f00: c940ce94 00000001 00000028 c9409460 80000013 c07112b0 c428bc28 c014d140
[ 52.318597] 7f20: c428b000 13ed6e21 c428b000 c5276200 c9408000 c5276204 ffff9eef bf0310ac
[ 52.327693] 7f40: c5b5c380 c9408000 c9409460 bf000f3c c4c46000 c5a1f140 c5276200 c940948c
[ 52.336794] 7f60: c4eb1c5c 13ed6e21 60000113 c4edf400 c4c46000 c5a1f140 c9408000 bf000ddc
[ 52.345891] 7f80: c4eb1c5c c4edf41c 00000000 c0134360 c5a1f140 c0134220 00000000 00000000
[ 52.354976] 7fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[ 52.364076] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 52.373171] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 52.382285] [<c01d33a8>] (__kmalloc) from [<c06d5e94>] (cfg80211_bss_update+0x400/0x4f0)
[ 52.391295] [<c06d5e94>] (cfg80211_bss_update) from [<c06d6ab0>] (cfg80211_inform_single_bss_frame_data+0x198/0x260)
[ 52.403002] [<c06d6ab0>] (cfg80211_inform_single_bss_frame_data) from [<c06d6ba8>] (cfg80211_inform_bss_frame_data+0x30/0x304)
[ 52.416260] [<c06d6ba8>] (cfg80211_inform_bss_frame_data) from [<bf07f738>] (rtw_cfg80211_inform_bss+0x264/0x2f8 [8821cs])
[ 52.429431] [<bf07f738>] (rtw_cfg80211_inform_bss [8821cs]) from [<bf08013c>] (rtw_cfg80211_is_target_wps_scan+0x118/0x208 [8821cs])
[ 52.443554] [<bf08013c>] (rtw_cfg80211_is_target_wps_scan [8821cs]) from [<bf080238>] (rtw_cfg80211_surveydone_event_callback+0xc/0x10 [8821cs])
[ 52.458827] [<bf080238>] (rtw_cfg80211_surveydone_event_callback [8821cs]) from [<bf01c86c>] (rtw_surveydone_event_callback+0x130/0x4a4 [8821cs])
[ 52.474196] [<bf01c86c>] (rtw_surveydone_event_callback [8821cs]) from [<bf0310ac>] (mlme_evt_hdl+0x80/0x94 [8821cs])
[ 52.486873] [<bf0310ac>] (mlme_evt_hdl [8821cs]) from [<bf000f3c>] (rtw_cmd_thread+0x160/0x494 [8821cs])
[ 52.497850] [<bf000f3c>] (rtw_cmd_thread [8821cs]) from [<c0134360>] (kthread+0x140/0x14c)
[ 52.507058] [<c0134360>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[ 52.515088] Exception stack(0xc4c47fb0 to 0xc4c47ff8)
[ 52.520708] 7fa0: 00000000 00000000 00000000 00000000
[ 52.529818] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 52.538921] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 52.546286] Code: eb149130 e1a00004 e8bd87f0 e5953014 (e7940003)
[ 52.553083] ---[ end trace b9f93dabdfd7ea30 ]---
[ 52.558217] Kernel panic - not syncing: Fatal exception in interrupt
[ 52.565292] CPU0: stopping
[ 52.568311] CPU: 0 PID: 1296 Comm: main Tainted: G D 5.4.61 #317
[ 52.576432] Hardware name: Generic DT based system
[ 52.581774] [<c010de60>] (unwind_backtrace) from [<c010a5f8>] (show_stack+0x10/0x14)
[ 52.590391] [<c010a5f8>] (show_stack) from [<c06f8c28>] (dump_stack+0x88/0xa4)
[ 52.598432] [<c06f8c28>] (dump_stack) from [<c010c234>] (handle_IPI+0xe4/0x180)
[ 52.606576] [<c010c234>] (handle_IPI) from [<c035f23c>] (gic_handle_irq+0x70/0x78)
[ 52.614999] [<c035f23c>] (gic_handle_irq) from [<c01025b0>] (__irq_usr+0x50/0x80)
[ 52.623322] Exception stack(0xc4eb1fb0 to 0xc4eb1ff8)
[ 52.628941] 1fa0: 00000000 beebd36c 000000ff 00000002
[ 52.638038] 1fc0: 00000090 beebdd54 00000001 00014ec8 00000001 00451c04 beebdd54 beebd45c
[ 52.647134] 1fe0: 000000aa beebd318 000b1640 000b187c 20000010 ffffffff
[ 52.654492] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
我按照usb开发手册倒腾了一圈,那个ttyGS0 也出了,但是连上pc,没有任何反应
确认线是好的,setusbconfig adb,adb有效
修改成 rndis,win10系统无法使用,驱动都是感叹号,貌似是win10就不爱支持这个,要么就是驱动太老啦?反正死活没法联通
现在寄希望于acm cdc ,但是貌似也没用。。。
而且我发现这东西编译进内核以后连那个 soc/usb0
去找usb的role都没有显示的。。。
下面这个是完整的log,我是在系统加载好以后去用那个acm.sh加载usb0 的 acm cdc,但是不成功
哪位大佬能够提供一份完整的usb acm cdc,这个功能的教程啊,谢谢啦
root@TinaLinux:/# [725]fes begin commit:88480af-dirty
[728]set pll start
[734]periph0 has been enabled
[737]set pll end
[738][pmu]: bus read error
[741]board init ok
[743]beign to init dram
[745]ZQ value = 0x2e
[747]get_pmu_exist() = -1
[749]ddr_efuse_type: 0xa
[752]trefi:7.8ms
[754][AUTO DEBUG] single rank and full DQ!
[758]ddr_efuse_type: 0xa
[760]trefi:7.8ms
[762][AUTO DEBUG] rank 0 row = 13
[766][AUTO DEBUG] rank 0 bank = 8
[769][AUTO DEBUG] rank 0 page size = 2 KB
[772]DRAM BOOT DRIVE INFO: V0.33
[775]DRAM CLK = 936 MHz
[778]DRAM Type = 3 (2:DDR2,3:DDR3)
[781]DRAMC read ODT off.
[783]DRAM ODT value: 0x42.
[786]ddr_efuse_type: 0xa
[789]DRAM SIZE =128 M
[791]dram_tpr4:0x0
[792]PLL_DDR_CTRL_REG:0xf8004d00
[795]DRAM_CLK_REG:0xc0000000
[798][TIMING DEBUG] MR2= 0x20
[802]DRAM simple test OK.
[804]rtc standby flag is 0x0, super standby flag is 0x0
[809]init dram ok
[29]HELLO! BOOT0 is starting!
[32]BOOT0 commit : 88480af-dirty
[35]set pll start
[41]periph0 has been enabled
[44]set pll end
[45][pmu]: bus read error
[48]board init ok
[50]ZQ value = 0x2d
[51]get_pmu_exist() = -1
[54]DRAM BOOT DRIVE INFO: V0.33
[57]DRAM CLK = 936 MHz
[59]DRAM Type = 3 (2:DDR2,3:DDR3)
[62]DRAMC read ODT off.
[64]DRAM ODT value: 0x42.
[67]ddr_efuse_type: 0xa
[70]DRAM SIZE =128 M
[72]dram_tpr4:0x0
[74]PLL_DDR_CTRL_REG:0xf8004d00
[77]DRAM_CLK_REG:0xc0000000
[79][TIMING DEBUG] MR2= 0x20
[87]DRAM simple test OK.
[89]rtc standby flag is 0x0, super standby flag is 0x0
[94]dram size =128
[97]spinand UBOOT_START_BLK_NUM 8 UBOOT_LAST_BLK_NUM 32
[102]block from 8 to 32
[204]Check is correct.
[206]dma 0x29c0c int is not used yet
[209]dma 0x29c0c int is free, you do not need to free it again
[215]Entry_name = u-boot
[222]Entry_name = optee
[226]Entry_name = dtb
[229]Jump to second Boot.
M/TC: OP-TEE version: 6aef7bb2-dirty (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)) #1 Fri Jul 23 09: 25:11 UTC 2021 arm
[ 3.968116] printk: console [ttyS0] enabled
[ 3.976979] printk: bootconsole [earlycon0] disabled
[ 3.987894] probe of uart0 returned 1 after 61699 usecs
[ 3.994061] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regula tor
[ 4.005353] uart uart1: get regulator failed
[ 4.010158] uart uart1: uart1 supply uart not found, using dummy regulator
[ 4.018114] uart1: ttyS1 at MMIO 0x2500400 (irq = 35, base_baud = 1500000) is a SUNXI
[ 4.027225] probe of uart1 returned 1 after 33470 usecs
[ 4.033260] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regula tor
[ 4.044574] uart uart4: get regulator failed
[ 4.049356] uart uart4: uart4 supply uart not found, using dummy regulator
[ 4.057297] uart4: ttyS4 at MMIO 0x2501000 (irq = 36, base_baud = 1500000) is a SUNXI
[ 4.066399] probe of uart4 returned 1 after 33338 usecs
[ 4.072447] initcall sunxi_uart_init+0x0/0x4c returned 0 after 142960 usecs
[ 4.080239] calling sunxi_dump_reg_driver_init+0x0/0x10 @ 1
[ 4.086794] probe of 20000.dump_reg returned 1 after 215 usecs
[ 4.093572] initcall sunxi_dump_reg_driver_init+0x0/0x10 returned 0 after 6860 usecs
[ 4.102214] calling misc_dump_reg_init+0x0/0x58 @ 1
[ 4.107746] misc dump reg init
[ 4.111394] initcall misc_dump_reg_init+0x0/0x58 returned 0 after 3550 usecs
[ 4.119267] calling iommu_debug_init+0x0/0x80 @ 1
[ 4.125106] initcall iommu_debug_init+0x0/0x80 returned 0 after 491 usecs
[ 4.132716] calling topology_sysfs_init+0x0/0x3c @ 1
[ 4.138447] initcall topology_sysfs_init+0x0/0x3c returned 0 after 93 usecs
[ 4.146219] calling cacheinfo_sysfs_init+0x0/0x3c @ 1
[ 4.151968] initcall cacheinfo_sysfs_init+0x0/0x3c returned -2 after 21 usecs
[ 4.159928] calling rfkill_driver_init+0x0/0x18 @ 1
[ 4.165795] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9
[ 4.172990] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed
[ 4.180268] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed
[ 4.187653] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1)
[ 4.194140] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power.
[ 4.201041] sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1)
[ 4.208707] sunxi-rfkill soc@3000000:rfkill@0: get gpio wlan_regon failed
[ 4.216292] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1
[ 4.224361] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled
[ 4.231993] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power.
[ 4.238733] sunxi-rfkill soc@3000000:rfkill@0: bt clock[0] (32k-fanout1)
[ 4.246210] sunxi-rfkill soc@3000000:rfkill@0: bt_rst gpio=136 assert=0
[ 4.253799] probe of soc@3000000:rfkill@0 returned 1 after 88123 usecs
[ 4.261150] initcall rfkill_driver_init+0x0/0x18 returned 0 after 93431 usecs
[ 4.269164] calling addr_mgt_driver_init+0x0/0x18 @ 1
[ 4.275153] [ADDR_MGT] addr_mgt_probe: module version: v1.0.10
[ 4.282342] [ADDR_MGT] addr_mgt_probe: success.
[ 4.287552] probe of soc@3000000:addr_mgt@0 returned 1 after 12447 usecs
[ 4.295077] initcall addr_mgt_driver_init+0x0/0x18 returned 0 after 19712 usecs
[ 4.303308] calling udmabuf_dev_init+0x0/0xc @ 1
[ 4.308783] initcall udmabuf_dev_init+0x0/0xc returned 0 after 210 usecs
[ 4.316241] calling st_init+0x0/0xe8 @ 1
[ 4.320754] dma-buf: Running sanitycheck
[ 4.325114] dma-buf: Running dma_fence
[ 4.329299] sizeof(dma_fence)=48
[ 4.333003] dma-buf: Running dma_fence/sanitycheck
[ 4.338384] dma-buf: Running dma_fence/test_signaling
[ 4.344000] dma-buf: Running dma_fence/test_add_callback
[ 4.349925] dma-buf: Running dma_fence/test_late_add_callback
[ 4.356330] dma-buf: Running dma_fence/test_rm_callback
[ 4.362149] dma-buf: Running dma_fence/test_late_rm_callback
[ 4.368448] dma-buf: Running dma_fence/test_status
[ 4.373780] dma-buf: Running dma_fence/test_error
[ 4.379019] dma-buf: Running dma_fence/test_wait
[ 4.384155] dma-buf: Running dma_fence/test_wait_timeout
[ 4.426729] dma-buf: Running dma_fence/test_stub
[ 4.431880] dma-buf: Running dma_fence/race_signal_callback
[ 4.506747] thread_signal_callback[0] completed 38180 passes, 14242 misses
[ 4.514424] thread_signal_callback[1] completed 38161 passes, 14223 misses
[ 4.586722] thread_signal_callback[0] completed 39907 passes, 39904 misses
[ 4.594404] thread_signal_callback[1] completed 39921 passes, 39921 misses
[ 4.602182] initcall st_init+0x0/0xe8 returned 0 after 274823 usecs
[ 4.609196] calling init_sd+0x0/0x1a8 @ 1
[ 4.613913] initcall init_sd+0x0/0x1a8 returned 0 after 150 usecs
[ 4.620734] calling init_mtd+0x0/0x104 @ 1
[ 4.625638] initcall init_mtd+0x0/0x104 returned 0 after 236 usecs
[ 4.632550] calling ofpart_parser_init+0x0/0x2c @ 1
[ 4.638103] initcall ofpart_parser_init+0x0/0x2c returned 0 after 1 usecs
[ 4.645654] calling init_mtdblock+0x0/0xc @ 1
[ 4.650613] initcall init_mtdblock+0x0/0xc returned 0 after 6 usecs
[ 4.657601] calling aw_spinand_drv_init+0x0/0x10 @ 1
[ 4.663296] sunxi-spinand: AW SPINand MTD Layer Version: 2.0 20201228
[ 4.670507] sunxi-spinand-phy: AW SPINand Phy Layer Version: 1.10 20200306
[ 4.678356] sunxi-spinand-phy: not detect any munufacture from id table
[ 4.685712] sunxi-spinand-phy: get spi-nand Model from fdt fail
[ 4.692319] sunxi-spinand-phy: get phy info from fdt fail
[ 4.698390] sunxi-spinand-phy: not detect munufacture from fdt
[ 4.705046] sunxi-spinand-phy: detect munufacture from id table: Winbond
[ 4.712536] sunxi-spinand-phy: detect spinand id: ff21aaef ffffffff
[ 4.719517] sunxi-spinand-phy: ========== arch info ==========
[ 4.726017] sunxi-spinand-phy: Model: W25N01GVZEIG
[ 4.732702] sunxi-spinand-phy: Munufacture: Winbond
[ 4.738908] sunxi-spinand-phy: DieCntPerChip: 1
[ 4.744529] sunxi-spinand-phy: BlkCntPerDie: 1024
[ 4.750441] sunxi-spinand-phy: PageCntPerBlk: 64
[ 4.756153] sunxi-spinand-phy: SectCntPerPage: 4
[ 4.761789] sunxi-spinand-phy: OobSizePerPage: 64
[ 4.767514] sunxi-spinand-phy: BadBlockFlag: 0x0
[ 4.773326] sunxi-spinand-phy: OperationOpt: 0x7
[ 4.779154] sunxi-spinand-phy: MaxEraseTimes: 65000
[ 4.785158] sunxi-spinand-phy: EccFlag: 0x0
[ 4.790970] sunxi-spinand-phy: EccType: 2
[ 4.796586] sunxi-spinand-phy: EccProtectedType: 3
[ 4.802207] sunxi-spinand-phy: ========================================
[ 4.809567] sunxi-spinand-phy:
[ 4.813060] sunxi-spinand-phy: ========== physical info ==========
[ 4.819945] sunxi-spinand-phy: TotalSize: 128 M
[ 4.825270] sunxi-spinand-phy: SectorSize: 512 B
[ 4.830619] sunxi-spinand-phy: PageSize: 2 K
[ 4.835756] sunxi-spinand-phy: BlockSize: 128 K
[ 4.841097] sunxi-spinand-phy: OOBSize: 64 B
[ 4.846333] sunxi-spinand-phy: ========================================
[ 4.853699] sunxi-spinand-phy:
[ 4.857194] sunxi-spinand-phy: ========== logical info ==========
[ 4.863975] sunxi-spinand-phy: TotalSize: 128 M
[ 4.869315] sunxi-spinand-phy: SectorSize: 512 B
[ 4.874639] sunxi-spinand-phy: PageSize: 4 K
[ 4.879773] sunxi-spinand-phy: BlockSize: 256 K
[ 4.885101] sunxi-spinand-phy: OOBSize: 128 B
[ 4.890430] sunxi-spinand-phy: ========================================
[ 4.897910] sunxi-spinand-phy: block lock register: 0x00
[ 4.903935] sunxi-spinand-phy: feature register: 0x19
[ 4.909576] sunxi-spinand-phy: sunxi physic nand init end
[ 4.915984] Creating 4 MTD partitions on "sunxi_mtd_nand":
[ 4.922117] 0x000000000000-0x000000100000 : "boot0"
[ 4.937693] 0x000000100000-0x000000400000 : "uboot"
[ 4.946285] random: fast init done
[ 4.957665] 0x000000400000-0x000000500000 : "secure_storage"
[ 4.977701] 0x000000500000-0x000008000000 : "sys"
[ 5.197719] probe of spi0.0 returned 1 after 534467 usecs
[ 5.203793] initcall aw_spinand_drv_init+0x0/0x10 returned 0 after 527894 usecs
[ 5.211961] calling aw_spinand_debug_init+0x0/0x50 @ 1
[ 5.217821] initcall aw_spinand_debug_init+0x0/0x50 returned 0 after 24 usecs
[ 5.225762] calling spidev_init+0x0/0xb8 @ 1
[ 5.230749] initcall spidev_init+0x0/0xb8 returned 0 after 117 usecs
[ 5.237845] calling net_olddevs_init+0x0/0x74 @ 1
[ 5.243192] initcall net_olddevs_init+0x0/0x74 returned 0 after 11 usecs
[ 5.250656] calling blackhole_netdev_init+0x0/0x84 @ 1
[ 5.256504] initcall blackhole_netdev_init+0x0/0x84 returned 0 after 30 usecs
[ 5.264480] calling fixed_mdio_bus_init+0x0/0x104 @ 1
[ 5.270507] libphy: Fixed MDIO Bus: probed
[ 5.275076] initcall fixed_mdio_bus_init+0x0/0x104 returned 0 after 4742 usecs
[ 5.283130] calling phy_module_init+0x0/0x14 @ 1
[ 5.289474] initcall phy_module_init+0x0/0x14 returned 0 after 1057 usecs
[ 5.297065] calling geth_driver_init+0x0/0x10 @ 1
[ 5.302703] initcall geth_driver_init+0x0/0x10 returned 0 after 287 usecs
[ 5.310280] calling dwc2_platform_driver_init+0x0/0x10 @ 1
[ 5.317134] initcall dwc2_platform_driver_init+0x0/0x10 returned 0 after 631 usecs
[ 5.325566] calling ehci_hcd_init+0x0/0x70 @ 1
[ 5.330611] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 5.337888] initcall ehci_hcd_init+0x0/0x70 returned 0 after 7101 usecs
[ 5.345248] calling ehci_platform_init+0x0/0x54 @ 1
[ 5.350782] ehci-platform: EHCI generic platform driver
[ 5.356922] initcall ehci_platform_init+0x0/0x54 returned 0 after 5984 usecs
[ 5.364768] calling sunxi_ehci_hcd_init+0x0/0x5c @ 1
[ 5.370403] sunxi-ehci: EHCI SUNXI driver
[ 5.375300] get ehci0-controller wakeup-source is fail.
[ 5.381231] sunxi ehci0-controller don't init wakeup source
[ 5.387462] [sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xc0c68db0, 0x:c88390 00, irq_no:3a
[ 5.399370] [sunxi-ehci0]: Not init ehci0
[ 5.403930] probe of 4101000.ehci0-controller returned 1 after 28808 usecs
[ 5.411782] get ehci1-controller wakeup-source is fail.
[ 5.417700] sunxi ehci1-controller don't init wakeup source
[ 5.423909] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xc0c692d0, 0x:c883d0 00, irq_no:3c
[ 5.435847] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply drvvbus not found, using dummy regulator
[ 5.448280] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dum my regulator
[ 5.460405] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller
[ 5.467627] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1
[ 5.477502] sunxi-ehci 4200000.ehci1-controller: irq 60, io mem 0x04200000
[ 5.506743] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00
[ 5.515353] hub 1-0:1.0: USB hub found
[ 5.519593] hub 1-0:1.0: 1 port detected
[ 5.524218] probe of 1-0:1.0 returned 1 after 8889 usecs
[ 5.530309] probe of usb1 returned 1 after 15185 usecs
[ 5.536183] probe of 4200000.ehci1-controller returned 1 after 124570 usecs
[ 5.544063] initcall sunxi_ehci_hcd_init+0x0/0x5c returned 0 after 169577 usecs
[ 5.552213] calling ohci_hcd_mod_init+0x0/0x64 @ 1
[ 5.557641] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 5.564545] initcall ohci_hcd_mod_init+0x0/0x64 returned 0 after 6737 usecs
[ 5.572304] calling ohci_platform_init+0x0/0x54 @ 1
[ 5.577832] ohci-platform: OHCI generic platform driver
[ 5.583963] initcall ohci_platform_init+0x0/0x54 returned 0 after 5977 usecs
[ 5.591822] calling sunxi_ohci_hcd_init+0x0/0x5c @ 1
[ 5.597450] sunxi-ohci: OHCI SUNXI driver
[ 5.602346] get ohci0-controller wakeup-source is fail.
[ 5.608294] sunxi ohci0-controller don't init wakeup source
[ 5.614497] [sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xc0c69040
[ 5.624094] [sunxi-ohci0]: Not init ohci0
[ 5.628672] probe of 4101400.ohci0-controller returned 1 after 26501 usecs
[ 5.636512] get ohci1-controller wakeup-source is fail.
[ 5.642447] sunxi ohci1-controller don't init wakeup source
[ 5.648678] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xc0c69560
[ 5.658292] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply drvvbus not found, using dummy regulator
[ 5.670703] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dum my regulator
[ 5.682817] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller
[ 5.690031] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2
[ 5.699794] sunxi-ohci 4200400.ohci1-controller: irq 61, io mem 0x04200400
[ 5.781632] hub 2-0:1.0: USB hub found
[ 5.785845] hub 2-0:1.0: 1 port detected
[ 5.790492] probe of 2-0:1.0 returned 1 after 8897 usecs
[ 5.796552] probe of usb2 returned 1 after 15164 usecs
[ 5.802459] probe of 4200400.ohci1-controller returned 1 after 166114 usecs
[ 5.810338] initcall sunxi_ohci_hcd_init+0x0/0x5c returned 0 after 207883 usecs
[ 5.818486] calling acm_init+0x0/0x114 @ 1
[ 5.823245] usbcore: registered new interface driver cdc_acm
[ 5.829557] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 5.838475] initcall acm_init+0x0/0x114 returned 0 after 14964 usecs
[ 5.845547] calling ci_hdrc_platform_register+0x0/0x1c @ 1
[ 5.851907] initcall ci_hdrc_platform_register+0x0/0x1c returned 0 after 141 usecs
[ 5.860350] calling ci_hdrc_usb2_driver_init+0x0/0x10 @ 1
[ 5.866739] initcall ci_hdrc_usb2_driver_init+0x0/0x10 returned 0 after 267 usecs
[ 5.875073] calling ci_hdrc_msm_driver_init+0x0/0x10 @ 1
[ 5.881314] initcall ci_hdrc_msm_driver_init+0x0/0x10 returned 0 after 199 usecs
[ 5.889565] calling ci_hdrc_zevio_driver_init+0x0/0x10 @ 1
[ 5.895957] initcall ci_hdrc_zevio_driver_init+0x0/0x10 returned 0 after 182 usecs
[ 5.904402] calling usbmisc_imx_driver_init+0x0/0x10 @ 1
[ 5.910936] initcall usbmisc_imx_driver_init+0x0/0x10 returned 0 after 499 usecs
[ 5.919187] calling ci_hdrc_imx_driver_init+0x0/0x10 @ 1
[ 5.925636] initcall ci_hdrc_imx_driver_init+0x0/0x10 returned 0 after 426 usecs
[ 5.933883] calling tegra_udc_driver_init+0x0/0x10 @ 1
[ 5.939991] initcall tegra_udc_driver_init+0x0/0x10 returned 0 after 277 usecs
[ 5.948047] calling gadget_cfs_init+0x0/0x48 @ 1
[ 5.953528] initcall gadget_cfs_init+0x0/0x48 returned 0 after 237 usecs
[ 5.961019] calling acmmod_init+0x0/0xc @ 1
[ 5.965772] initcall acmmod_init+0x0/0xc returned 0 after 1 usecs
[ 5.972567] calling userial_init+0x0/0x124 @ 1
[ 5.977634] initcall userial_init+0x0/0x124 returned 0 after 10 usecs
[ 5.984801] calling gsermod_init+0x0/0xc @ 1
[ 5.989658] initcall gsermod_init+0x0/0xc returned 0 after 1 usecs
[ 5.996535] calling rndismod_init+0x0/0xc @ 1
[ 6.001489] initcall rndismod_init+0x0/0xc returned 0 after 0 usecs
[ 6.008472] calling ffsmod_init+0x0/0xc @ 1
[ 6.013220] initcall ffsmod_init+0x0/0xc returned 0 after 0 usecs
[ 6.020005] calling hidmod_init+0x0/0xc @ 1
[ 6.024755] initcall hidmod_init+0x0/0xc returned 0 after 1 usecs
[ 6.031540] calling evdev_init+0x0/0xc @ 1
[ 6.036196] initcall evdev_init+0x0/0xc returned 0 after 2 usecs
[ 6.042883] calling i2c_dev_init+0x0/0xb8 @ 1
[ 6.047825] i2c /dev entries driver
[ 6.051756] initcall i2c_dev_init+0x0/0xb8 returned 0 after 3830 usecs
[ 6.059037] calling init_rc_map_adstech_dvb_t_pci+0x0/0xc @ 1
[ 6.065522] initcall init_rc_map_adstech_dvb_t_pci+0x0/0xc returned 0 after 1 usecs
[ 6.074052] calling init_rc_map_alink_dtu_m+0x0/0xc @ 1
[ 6.079977] initcall init_rc_map_alink_dtu_m+0x0/0xc returned 0 after 0 usecs
[ 6.087931] calling init_rc_map_anysee+0x0/0xc @ 1
[ 6.093360] initcall init_rc_map_anysee+0x0/0xc returned 0 after 0 usecs
[ 6.100826] calling init_rc_map_apac_viewcomp+0x0/0xc @ 1
[ 6.106942] initcall init_rc_map_apac_viewcomp+0x0/0xc returned 0 after 0 usecs
[ 6.115074] calling init_rc_map_t2hybrid+0x0/0xc @ 1
[ 6.120703] initcall init_rc_map_t2hybrid+0x0/0xc returned 0 after 0 usecs
[ 6.128363] calling init_rc_map_asus_pc39+0x0/0xc @ 1
[ 6.134078] initcall init_rc_map_asus_pc39+0x0/0xc returned 0 after 0 usecs
[ 6.141829] calling init_rc_map_asus_ps3_100+0x0/0xc @ 1
[ 6.147845] initcall init_rc_map_asus_ps3_100+0x0/0xc returned 0 after 0 usecs
[ 6.155877] calling init_rc_map_ati_tv_wonder_hd_600+0x0/0xc @ 1
[ 6.162662] initcall init_rc_map_ati_tv_wonder_hd_600+0x0/0xc returned 0 after 0 usecs
[ 6.171478] calling init_rc_map_ati_x10+0x0/0xc @ 1
[ 6.177015] initcall init_rc_map_ati_x10+0x0/0xc returned 0 after 0 usecs
[ 6.184568] calling init_rc_map_avermedia_a16d+0x0/0xc @ 1
[ 6.190777] initcall init_rc_map_avermedia_a16d+0x0/0xc returned 0 after 0 usecs
[ 6.199013] calling init_rc_map_avermedia+0x0/0xc @ 1
[ 6.204728] initcall init_rc_map_avermedia+0x0/0xc returned 0 after 0 usecs
[ 6.212482] calling init_rc_map_avermedia_cardbus+0x0/0xc @ 1
[ 6.218986] initcall init_rc_map_avermedia_cardbus+0x0/0xc returned 0 after 0 usecs
[ 6.227514] calling init_rc_map_avermedia_dvbt+0x0/0xc @ 1
[ 6.233708] initcall init_rc_map_avermedia_dvbt+0x0/0xc returned 0 after 0 usecs
[ 6.241947] calling init_rc_map_avermedia_m135a+0x0/0xc @ 1
[ 6.248252] initcall init_rc_map_avermedia_m135a+0x0/0xc returned 0 after 0 usecs
[ 6.256572] calling init_rc_map_avermedia_m733a_rm_k6+0x0/0xc @ 1
[ 6.263454] initcall init_rc_map_avermedia_m733a_rm_k6+0x0/0xc returned 0 after 0 usecs
[ 6.272369] calling init_rc_map_avermedia_rm_ks+0x0/0xc @ 1
[ 6.278678] initcall init_rc_map_avermedia_rm_ks+0x0/0xc returned 0 after 0 usecs
[ 6.287012] calling init_rc_map_avertv_303+0x0/0xc @ 1
[ 6.292826] initcall init_rc_map_avertv_303+0x0/0xc returned 0 after 0 usecs
[ 6.300692] calling init_rc_map_azurewave_ad_tu700+0x0/0xc @ 1
[ 6.307296] initcall init_rc_map_azurewave_ad_tu700+0x0/0xc returned 0 after 0 usecs
[ 6.315909] calling init_rc_map_behold+0x0/0xc @ 1
[ 6.321347] initcall init_rc_map_behold+0x0/0xc returned 0 after 0 usecs
[ 6.328810] calling init_rc_map_behold_columbus+0x0/0xc @ 1
[ 6.335105] initcall init_rc_map_behold_columbus+0x0/0xc returned 0 after 0 usecs
[ 6.343437] calling init_rc_map_budget_ci_old+0x0/0xc @ 1
[ 6.349546] initcall init_rc_map_budget_ci_old+0x0/0xc returned 0 after 0 usecs
[ 6.357685] calling init_rc_map_cec+0x0/0xc @ 1
[ 6.362821] initcall init_rc_map_cec+0x0/0xc returned 0 after 0 usecs
[ 6.369992] calling init_rc_map_cinergy_1400+0x0/0xc @ 1
[ 6.375997] initcall init_rc_map_cinergy_1400+0x0/0xc returned 0 after 0 usecs
[ 6.384046] calling init_rc_map_cinergy+0x0/0xc @ 1
[ 6.389579] initcall init_rc_map_cinergy+0x0/0xc returned 0 after 0 usecs
[ 6.397145] calling init_rc_map_d680_dmb+0x0/0xc @ 1
[ 6.402762] initcall init_rc_map_d680_dmb+0x0/0xc returned 0 after 0 usecs
[ 6.410418] calling init_rc_map_delock_61959+0x0/0xc @ 1
[ 6.416432] initcall init_rc_map_delock_61959+0x0/0xc returned 0 after 0 usecs
[ 6.424474] calling init_rc_map+0x0/0xc @ 1
[ 6.429235] initcall init_rc_map+0x0/0xc returned 0 after 0 usecs
[ 6.436012] calling init_rc_map+0x0/0xc @ 1
[ 6.440776] initcall init_rc_map+0x0/0xc returned 0 after 0 usecs
[ 6.447564] calling init_rc_map_digitalnow_tinytwin+0x0/0xc @ 1
[ 6.454246] initcall init_rc_map_digitalnow_tinytwin+0x0/0xc returned 0 after 0 usecs
[ 6.462969] calling init_rc_map_digittrade+0x0/0xc @ 1
[ 6.468794] initcall init_rc_map_digittrade+0x0/0xc returned 0 after 0 usecs
[ 6.476634] calling init_rc_map_dm1105_nec+0x0/0xc @ 1
[ 6.482464] initcall init_rc_map_dm1105_nec+0x0/0xc returned 0 after 0 usecs
[ 6.490316] calling init_rc_map_dntv_live_dvb_t+0x0/0xc @ 1
[ 6.496610] initcall init_rc_map_dntv_live_dvb_t+0x0/0xc returned 0 after 0 usecs
[ 6.504940] calling init_rc_map_dntv_live_dvbt_pro+0x0/0xc @ 1
[ 6.511531] initcall init_rc_map_dntv_live_dvbt_pro+0x0/0xc returned 0 after 0 usecs
[ 6.520154] calling init_rc_map_dtt200u+0x0/0xc @ 1
[ 6.525676] initcall init_rc_map_dtt200u+0x0/0xc returned 0 after 0 usecs
[ 6.533237] calling init_rc_map_rc5_dvbsky+0x0/0xc @ 1
[ 6.539058] initcall init_rc_map_rc5_dvbsky+0x0/0xc returned 0 after 0 usecs
[ 6.546905] calling init_rc_map_dvico_mce+0x0/0xc @ 1
[ 6.552619] initcall init_rc_map_dvico_mce+0x0/0xc returned 0 after 0 usecs
[ 6.560372] calling init_rc_map_dvico_portable+0x0/0xc @ 1
[ 6.566571] initcall init_rc_map_dvico_portable+0x0/0xc returned 0 after 0 usecs
[ 6.574813] calling init_rc_map_em_terratec+0x0/0xc @ 1
[ 6.580736] initcall init_rc_map_em_terratec+0x0/0xc returned 0 after 0 usecs
[ 6.588686] calling init_rc_map_encore_enltv2+0x0/0xc @ 1
[ 6.594785] initcall init_rc_map_encore_enltv2+0x0/0xc returned 0 after 0 usecs
[ 6.602922] calling init_rc_map_encore_enltv+0x0/0xc @ 1
[ 6.608936] initcall init_rc_map_encore_enltv+0x0/0xc returned 0 after 0 usecs
[ 6.616984] calling init_rc_map_encore_enltv_fm53+0x0/0xc @ 1
[ 6.623474] initcall init_rc_map_encore_enltv_fm53+0x0/0xc returned 0 after 0 usecs
[ 6.632001] calling init_rc_map_evga_indtube+0x0/0xc @ 1
[ 6.638018] initcall init_rc_map_evga_indtube+0x0/0xc returned 0 after 0 usecs
[ 6.646053] calling init_rc_map_eztv+0x0/0xc @ 1
[ 6.651293] initcall init_rc_map_eztv+0x0/0xc returned 0 after 0 usecs
[ 6.658567] calling init_rc_map_flydvb+0x0/0xc @ 1
[ 6.663995] initcall init_rc_map_flydvb+0x0/0xc returned 0 after 0 usecs
[ 6.671454] calling init_rc_map_flyvideo+0x0/0xc @ 1
[ 6.677100] initcall init_rc_map_flyvideo+0x0/0xc returned 0 after 0 usecs
[ 6.684748] calling init_rc_map_fusionhdtv_mce+0x0/0xc @ 1
[ 6.690959] initcall init_rc_map_fusionhdtv_mce+0x0/0xc returned 0 after 0 usecs
[ 6.699205] calling init_rc_map_gadmei_rm008z+0x0/0xc @ 1
[ 6.705309] initcall init_rc_map_gadmei_rm008z+0x0/0xc returned 0 after 0 usecs
[ 6.713451] calling init_rc_map_geekbox+0x0/0xc @ 1
[ 6.718980] initcall init_rc_map_geekbox+0x0/0xc returned 0 after 0 usecs
[ 6.726530] calling init_rc_map_genius_tvgo_a11mce+0x0/0xc @ 1
[ 6.733128] initcall init_rc_map_genius_tvgo_a11mce+0x0/0xc returned 0 after 0 usecs
[ 6.741751] calling init_rc_map_gotview7135+0x0/0xc @ 1
[ 6.747670] initcall init_rc_map_gotview7135+0x0/0xc returned 0 after 0 usecs
[ 6.755606] calling init_rc_map_hisi_poplar+0x0/0xc @ 1
[ 6.761527] initcall init_rc_map_hisi_poplar+0x0/0xc returned 0 after 0 usecs
[ 6.769475] calling init_rc_map_hisi_tv_demo+0x0/0xc @ 1
[ 6.775483] initcall init_rc_map_hisi_tv_demo+0x0/0xc returned 0 after 0 usecs
[ 6.783531] calling init_rc_map_imon_mce+0x0/0xc @ 1
[ 6.789160] initcall init_rc_map_imon_mce+0x0/0xc returned 0 after 0 usecs
[ 6.796815] calling init_rc_map_imon_pad+0x0/0xc @ 1
[ 6.802435] initcall init_rc_map_imon_pad+0x0/0xc returned 0 after 0 usecs
[ 6.810098] calling init_rc_map_imon_rsc+0x0/0xc @ 1
[ 6.815716] initcall init_rc_map_imon_rsc+0x0/0xc returned 0 after 0 usecs
[ 6.823371] calling init_rc_map_iodata_bctv7e+0x0/0xc @ 1
[ 6.829484] initcall init_rc_map_iodata_bctv7e+0x0/0xc returned 0 after 0 usecs
[ 6.837624] calling init_rc_it913x_v1_map+0x0/0xc @ 1
[ 6.843339] initcall init_rc_it913x_v1_map+0x0/0xc returned 0 after 0 usecs
[ 6.851097] calling init_rc_it913x_v2_map+0x0/0xc @ 1
[ 6.856824] initcall init_rc_it913x_v2_map+0x0/0xc returned 0 after 0 usecs
[ 6.864568] calling init_rc_map_kaiomy+0x0/0xc @ 1
[ 6.870010] initcall init_rc_map_kaiomy+0x0/0xc returned 0 after 0 usecs
[ 6.877481] calling init_rc_map_khadas+0x0/0xc @ 1
[ 6.882910] initcall init_rc_map_khadas+0x0/0xc returned 0 after 0 usecs
[ 6.890372] calling init_rc_map_kworld_315u+0x0/0xc @ 1
[ 6.896284] initcall init_rc_map_kworld_315u+0x0/0xc returned 0 after 0 usecs
[ 6.904231] calling init_rc_map_kworld_pc150u+0x0/0xc @ 1
[ 6.910340] initcall init_rc_map_kworld_pc150u+0x0/0xc returned 0 after 0 usecs
[ 6.918490] calling init_rc_map_kworld_plus_tv_analog+0x0/0xc @ 1
[ 6.925369] initcall init_rc_map_kworld_plus_tv_analog+0x0/0xc returned 0 after 0 usecs
[ 6.934281] calling init_rc_map_leadtek_y04g0051+0x0/0xc @ 1
[ 6.940689] initcall init_rc_map_leadtek_y04g0051+0x0/0xc returned 0 after 0 usecs
[ 6.949122] calling init_rc_lme2510_map+0x0/0xc @ 1
[ 6.954643] initcall init_rc_lme2510_map+0x0/0xc returned 0 after 0 usecs
[ 6.962199] calling init_rc_map_manli+0x0/0xc @ 1
[ 6.967542] initcall init_rc_map_manli+0x0/0xc returned 0 after 0 usecs
[ 6.974898] calling init_rc_map_medion_x10+0x0/0xc @ 1
[ 6.980729] initcall init_rc_map_medion_x10+0x0/0xc returned 0 after 0 usecs
[ 6.988580] calling init_rc_map_medion_x10_digitainer+0x0/0xc @ 1
[ 6.995454] initcall init_rc_map_medion_x10_digitainer+0x0/0xc returned 0 after 0 usecs
[ 7.004377] calling init_rc_map_medion_x10_or2x+0x0/0xc @ 1
[ 7.010682] initcall init_rc_map_medion_x10_or2x+0x0/0xc returned 0 after 0 usecs
[ 7.019016] calling init_rc_map_msi_digivox_ii+0x0/0xc @ 1
[ 7.025215] initcall init_rc_map_msi_digivox_ii+0x0/0xc returned 0 after 0 usecs
[ 7.033447] calling init_rc_map_msi_digivox_iii+0x0/0xc @ 1
[ 7.039754] initcall init_rc_map_msi_digivox_iii+0x0/0xc returned 0 after 0 usecs
[ 7.048088] calling init_rc_map_msi_tvanywhere+0x0/0xc @ 1
[ 7.054286] initcall init_rc_map_msi_tvanywhere+0x0/0xc returned 0 after 0 usecs
[ 7.062520] calling init_rc_map_msi_tvanywhere_plus+0x0/0xc @ 1
[ 7.069209] initcall init_rc_map_msi_tvanywhere_plus+0x0/0xc returned 0 after 0 usecs
[ 7.077937] calling init_rc_map_nebula+0x0/0xc @ 1
[ 7.083360] initcall init_rc_map_nebula+0x0/0xc returned 0 after 0 usecs
[ 7.090827] calling init_rc_map_nec_terratec_cinergy_xs+0x0/0xc @ 1
[ 7.097909] initcall init_rc_map_nec_terratec_cinergy_xs+0x0/0xc returned 0 after 0 usecs
[ 7.107023] calling init_rc_map_norwood+0x0/0xc @ 1
[ 7.112545] initcall init_rc_map_norwood+0x0/0xc returned 0 after 0 usecs
[ 7.120106] calling init_rc_map_npgtech+0x0/0xc @ 1
[ 7.125629] initcall init_rc_map_npgtech+0x0/0xc returned 0 after 0 usecs
[ 7.133191] calling init_rc_map_odroid+0x0/0xc @ 1
[ 7.138624] initcall init_rc_map_odroid+0x0/0xc returned 0 after 0 usecs
[ 7.146082] calling init_rc_map_pctv_sedna+0x0/0xc @ 1
[ 7.151914] initcall init_rc_map_pctv_sedna+0x0/0xc returned 0 after 0 usecs
[ 7.159766] calling init_rc_map_pinnacle_color+0x0/0xc @ 1
[ 7.165965] initcall init_rc_map_pinnacle_color+0x0/0xc returned 0 after 0 usecs
[ 7.174205] calling init_rc_map_pinnacle_grey+0x0/0xc @ 1
[ 7.180323] initcall init_rc_map_pinnacle_grey+0x0/0xc returned 0 after 0 usecs
[ 7.188472] calling init_rc_map_pinnacle_pctv_hd+0x0/0xc @ 1
[ 7.194863] initcall init_rc_map_pinnacle_pctv_hd+0x0/0xc returned 0 after 0 usecs
[ 7.203296] calling init_rc_map_pixelview+0x0/0xc @ 1
[ 7.209023] initcall init_rc_map_pixelview+0x0/0xc returned 0 after 0 usecs
[ 7.216782] calling init_rc_map_pixelview+0x0/0xc @ 1
[ 7.222502] initcall init_rc_map_pixelview+0x0/0xc returned 0 after 0 usecs
[ 7.230256] calling init_rc_map_pixelview+0x0/0xc @ 1
[ 7.235971] initcall init_rc_map_pixelview+0x0/0xc returned 0 after 0 usecs
[ 7.243723] calling init_rc_map_pixelview_new+0x0/0xc @ 1
[ 7.249836] initcall init_rc_map_pixelview_new+0x0/0xc returned 0 after 0 usecs
[ 7.257997] calling init_rc_map_powercolor_real_angel+0x0/0xc @ 1
[ 7.264873] initcall init_rc_map_powercolor_real_angel+0x0/0xc returned 0 after 0 usecs
[ 7.273789] calling init_rc_map_proteus_2309+0x0/0xc @ 1
[ 7.279807] initcall init_rc_map_proteus_2309+0x0/0xc returned 0 after 0 usecs
[ 7.287854] calling init_rc_map_purpletv+0x0/0xc @ 1
[ 7.293476] initcall init_rc_map_purpletv+0x0/0xc returned 0 after 0 usecs
[ 7.301133] calling init_rc_map_pv951+0x0/0xc @ 1
[ 7.306462] initcall init_rc_map_pv951+0x0/0xc returned 0 after 0 usecs
[ 7.313829] calling init_rc_map_rc5_hauppauge_new+0x0/0xc @ 1
[ 7.320329] initcall init_rc_map_rc5_hauppauge_new+0x0/0xc returned 0 after 0 usecs
[ 7.328857] calling init_rc_map_rc6_mce+0x0/0xc @ 1
[ 7.334375] initcall init_rc_map_rc6_mce+0x0/0xc returned 0 after 0 usecs
[ 7.341936] calling init_rc_map_real_audio_220_32_keys+0x0/0xc @ 1
[ 7.348920] initcall init_rc_map_real_audio_220_32_keys+0x0/0xc returned 0 after 0 usecs
[ 7.357931] calling init_rc_map_reddo+0x0/0xc @ 1
[ 7.363266] initcall init_rc_map_reddo+0x0/0xc returned 0 after 0 usecs
[ 7.370634] calling init_rc_map_snapstream_firefly+0x0/0xc @ 1
[ 7.377235] initcall init_rc_map_snapstream_firefly+0x0/0xc returned 0 after 0 usecs
[ 7.385846] calling init_rc_map_streamzap+0x0/0xc @ 1
[ 7.391574] initcall init_rc_map_streamzap+0x0/0xc returned 0 after 0 usecs
[ 7.399330] calling init_rc_map_tango+0x0/0xc @ 1
[ 7.404658] initcall init_rc_map_tango+0x0/0xc returned 0 after 0 usecs
[ 7.412033] calling init_rc_map_tanix_tx3mini+0x0/0xc @ 1
[ 7.418145] initcall init_rc_map_tanix_tx3mini+0x0/0xc returned 0 after 0 usecs
[ 7.426276] calling init_rc_map_tanix_tx5max+0x0/0xc @ 1
[ 7.432291] initcall init_rc_map_tanix_tx5max+0x0/0xc returned 0 after 0 usecs
[ 7.440338] calling init_rc_map_tbs_nec+0x0/0xc @ 1
[ 7.445860] initcall init_rc_map_tbs_nec+0x0/0xc returned 0 after 0 usecs
[ 7.453421] calling init_rc_map+0x0/0xc @ 1
[ 7.458181] initcall init_rc_map+0x0/0xc returned 0 after 0 usecs
[ 7.464959] calling init_rc_map+0x0/0xc @ 1
[ 7.469722] initcall init_rc_map+0x0/0xc returned 0 after 0 usecs
[ 7.476500] calling init_rc_map_terratec_cinergy_c_pci+0x0/0xc @ 1
[ 7.483487] initcall init_rc_map_terratec_cinergy_c_pci+0x0/0xc returned 0 after 0 usecs
[ 7.492495] calling init_rc_map_terratec_cinergy_s2_hd+0x0/0xc @ 1
[ 7.499482] initcall init_rc_map_terratec_cinergy_s2_hd+0x0/0xc returned 0 after 0 usecs
[ 7.508496] calling init_rc_map_terratec_cinergy_xs+0x0/0xc @ 1
[ 7.515179] initcall init_rc_map_terratec_cinergy_xs+0x0/0xc returned 0 after 0 usecs
[ 7.523893] calling init_rc_map_terratec_slim+0x0/0xc @ 1
[ 7.530005] initcall init_rc_map_terratec_slim+0x0/0xc returned 0 after 0 usecs
[ 7.538145] calling init_rc_map_terratec_slim_2+0x0/0xc @ 1
[ 7.544443] initcall init_rc_map_terratec_slim_2+0x0/0xc returned 0 after 0 usecs
[ 7.552780] calling init_rc_map_tevii_nec+0x0/0xc @ 1
[ 7.558505] initcall init_rc_map_tevii_nec+0x0/0xc returned 0 after 0 usecs
[ 7.566249] calling init_rc_map_tivo+0x0/0xc @ 1
[ 7.571492] initcall init_rc_map_tivo+0x0/0xc returned 0 after 0 usecs
[ 7.578768] calling init_rc_map_total_media_in_hand+0x0/0xc @ 1
[ 7.585452] initcall init_rc_map_total_media_in_hand+0x0/0xc returned 0 after 0 usecs
[ 7.594170] calling init_rc_map_total_media_in_hand_02+0x0/0xc @ 1
[ 7.601150] initcall init_rc_map_total_media_in_hand_02+0x0/0xc returned 0 after 0 usecs
[ 7.610160] calling init_rc_map_trekstor+0x0/0xc @ 1
[ 7.615777] initcall init_rc_map_trekstor+0x0/0xc returned 0 after 0 usecs
[ 7.623440] calling init_rc_map_tt_1500+0x0/0xc @ 1
[ 7.628972] initcall init_rc_map_tt_1500+0x0/0xc returned 0 after 0 usecs
[ 7.636523] calling init_rc_map_twinhan_dtv_cab_ci+0x0/0xc @ 1
[ 7.643127] initcall init_rc_map_twinhan_dtv_cab_ci+0x0/0xc returned 0 after 0 usecs
[ 7.651749] calling init_rc_map_twinhan_vp1027+0x0/0xc @ 1
[ 7.657962] initcall init_rc_map_twinhan_vp1027+0x0/0xc returned 0 after 0 usecs
[ 7.666187] calling init_rc_map_videomate_k100+0x0/0xc @ 1
[ 7.672401] initcall init_rc_map_videomate_k100+0x0/0xc returned 0 after 0 usecs
[ 7.680641] calling init_rc_map_videomate_s350+0x0/0xc @ 1
[ 7.686852] initcall init_rc_map_videomate_s350+0x0/0xc returned 0 after 0 usecs
[ 7.695096] calling init_rc_map_videomate_tv_pvr+0x0/0xc @ 1
[ 7.701500] initcall init_rc_map_videomate_tv_pvr+0x0/0xc returned 0 after 0 usecs
[ 7.709933] calling init_rc_map_kii_pro+0x0/0xc @ 1
[ 7.715458] initcall init_rc_map_kii_pro+0x0/0xc returned 0 after 0 usecs
[ 7.723021] calling init_rc_map_wetek_hub+0x0/0xc @ 1
[ 7.728754] initcall init_rc_map_wetek_hub+0x0/0xc returned 0 after 0 usecs
[ 7.736496] calling init_rc_map_wetek_play2+0x0/0xc @ 1
[ 7.742415] initcall init_rc_map_wetek_play2+0x0/0xc returned 0 after 0 usecs
[ 7.750361] calling init_rc_map_winfast+0x0/0xc @ 1
[ 7.755881] initcall init_rc_map_winfast+0x0/0xc returned 0 after 0 usecs
[ 7.763437] calling init_rc_map_winfast_usbii_deluxe+0x0/0xc @ 1
[ 7.770222] initcall init_rc_map_winfast_usbii_deluxe+0x0/0xc returned 0 after 0 usecs
[ 7.779044] calling init_rc_map_su3000+0x0/0xc @ 1
[ 7.784464] initcall init_rc_map_su3000+0x0/0xc returned 0 after 0 usecs
[ 7.791923] calling init_rc_map+0x0/0xc @ 1
[ 7.796672] initcall init_rc_map+0x0/0xc returned 0 after 0 usecs
[ 7.803456] calling init_rc_map_x96max+0x0/0xc @ 1
[ 7.808892] initcall init_rc_map_x96max+0x0/0xc returned 0 after 0 usecs
[ 7.816343] calling init_rc_map_zx_irdec+0x0/0xc @ 1
[ 7.821971] initcall init_rc_map_zx_irdec+0x0/0xc returned 0 after 0 usecs
[ 7.829622] calling sunxi_cedar_init+0x0/0x24 @ 1
[ 7.834945] sunxi cedar version 1.1
[ 7.839033] sunxi-cedar 1c0e000.ve: Adding to iommu group 0
[ 7.845263] VE: sunxi_cedar_probe power-domain init!!!
[ 7.851007] VE: install start!!!
[ 7.851007]
[ 7.856591] VE: cedar-ve the get irq is 42
[ 7.856591]
[ 7.863035] VE: ve_debug_proc_info:(ptrval), data:(ptrval), lock:(ptrval)
[ 7.863035]
[ 7.872258] VE: install end!!!
[ 7.872258]
[ 7.877317] VE: sunxi_cedar_probe
[ 7.881113] probe of 1c0e000.ve returned 1 after 42159 usecs
[ 7.887632] initcall sunxi_cedar_init+0x0/0x24 returned 0 after 51436 usecs
[ 7.895385] calling hci_uart_init+0x0/0xe0 @ 1
[ 7.900444] Bluetooth: HCI UART driver ver 2.3
[ 7.905390] Bluetooth: HCI UART protocol H4 registered
[ 7.911119] Bluetooth: HCI UART protocol BCSP registered
[ 7.917039] initcall hci_uart_init+0x0/0xe0 returned 0 after 16202 usecs
[ 7.924491] calling mmc_pwrseq_simple_driver_init+0x0/0x10 @ 1
[ 7.931325] initcall mmc_pwrseq_simple_driver_init+0x0/0x10 returned 0 after 229 usecs
[ 7.940170] calling mmc_pwrseq_emmc_driver_init+0x0/0x10 @ 1
[ 7.946782] initcall mmc_pwrseq_emmc_driver_init+0x0/0x10 returned 0 after 210 usecs
[ 7.955402] calling mmc_blk_init+0x0/0xec @ 1
[ 7.960472] initcall mmc_blk_init+0x0/0xec returned 0 after 102 usecs
[ 7.967664] calling sunxi_mmc_driver_init+0x0/0x10 @ 1
[ 7.974889] sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.21 2021-11-18 10:02)
[ 7.984804] sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8
[ 7.990978] sunxi-mmc 4020000.sdmmc: No vmmc regulator found
[ 7.997284] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found
[ 8.003672] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found
[ 8.010070] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found
[ 8.016559] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found
[ 8.023060] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found
[ 8.029575] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found
[ 8.036490] sunxi-mmc 4020000.sdmmc: Got CD GPIO
[ 8.041831] sunxi-mmc 4020000.sdmmc: set cd-gpios as 24M fail
[ 8.048448] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 8.059528] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator
[ 8.079617] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SD R12) dt B
[ 8.103949] sunxi-mmc 4020000.sdmmc: detmode:gpio irq
[ 8.109621] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 8.116966] probe of 4020000.sdmmc returned 1 after 143162 usecs
[ 8.127714] sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.21 2021-11-18 10:02)
[ 8.137633] sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8
[ 8.143787] sunxi-mmc 4021000.sdmmc: No vmmc regulator found
[ 8.150106] sunxi-mmc 4021000.sdmmc: No vqmmc regulator found
[ 8.156504] sunxi-mmc 4021000.sdmmc: No vdmmc regulator found
[ 8.162909] sunxi-mmc 4021000.sdmmc: No vd33sw regulator found
[ 8.169409] sunxi-mmc 4021000.sdmmc: No vd18sw regulator found
[ 8.175900] sunxi-mmc 4021000.sdmmc: No vq33sw regulator found
[ 8.182401] sunxi-mmc 4021000.sdmmc: No vq18sw regulator found
[ 8.188935] sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed
[ 8.198255] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 8.209364] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[ 8.229458] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SD R12) dt B
[ 8.253619] sunxi-mmc 4021000.sdmmc: detmode:manually by software
[ 8.260599] probe of 4021000.sdmmc returned 1 after 133201 usecs
[ 8.267678] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SD R12) dt B
[ 8.277161] initcall sunxi_mmc_driver_init+0x0/0x10 returned 0 after 296558 usecs
[ 8.282230] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SD R12) dt B
[ 8.287558] calling led_pwm_driver_init+0x0/0x10 @ 1
[ 8.300752] sunxi-mmc 4021000.sdmmc: card claims to support voltages below defined range
[ 8.305028] initcall led_pwm_driver_init+0x0/0x10 returned 0 after 320 usecs
[ 8.321585] calling netlink_init+0x0/0xa0 @ 1
[ 8.323551] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR 25) dt B
[ 8.326546] Netlink socket created.
[ 8.338088] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(S DR25) dt B
[ 8.341846] initcall netlink_init+0x0/0xa0 returned 0 after 14956 usecs
[ 8.353618] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(S DR25) dt B
[ 8.360833] calling sunxi_led_driver_init+0x0/0x10 @ 1
[ 8.361109] sunxi_led_probe()1881 - start
[ 8.373293] mmc1: new high speed SDIO card at address 0001
[ 8.378315] sunxi_get_str_of_property()1693 - failed to get the string of propname led_regulator!
[ 8.383059] probe of mmc1:0001 returned 0 after 51 usecs
[ 8.388982] sunxi_register_led_classdev()1581 - led_classdev start
[ 8.454401] sunxi_led_probe()1977 - finish
[ 8.459079] probe of 2008000.ledc returned 1 after 98123 usecs
[ 8.465759] initcall sunxi_led_driver_init+0x0/0x10 returned 0 after 102446 usecs
[ 8.474117] calling timer_led_trigger_init+0x0/0xc @ 1
[ 8.480051] initcall timer_led_trigger_init+0x0/0xc returned 0 after 101 usecs
[ 8.488097] calling defon_led_trigger_init+0x0/0xc @ 1
[ 8.493957] initcall defon_led_trigger_init+0x0/0xc returned 0 after 44 usecs
[ 8.501908] calling netdev_trig_init+0x0/0xc @ 1
[ 8.507195] initcall netdev_trig_init+0x0/0xc returned 0 after 40 usecs
[ 8.514559] calling hid_init+0x0/0x6c @ 1
[ 8.519236] hidraw: raw HID events driver (C) Jiri Kosina
[ 8.525275] initcall hid_init+0x0/0x6c returned 0 after 5999 usecs
[ 8.532176] calling usb_kbd_driver_init+0x0/0x18 @ 1
[ 8.537896] usbcore: registered new interface driver usbkbd
[ 8.544101] initcall usb_kbd_driver_init+0x0/0x18 returned 0 after 6142 usecs
[ 8.552065] calling usb_mouse_driver_init+0x0/0x18 @ 1
[ 8.557952] usbcore: registered new interface driver usbmouse
[ 8.564349] initcall usb_mouse_driver_init+0x0/0x18 returned 0 after 6309 usecs
[ 8.572502] calling init_exfat+0x0/0x70 @ 1
[ 8.577274] exFAT: Version 1.3.0
[ 8.581002] initcall init_exfat+0x0/0x70 returned 0 after 3631 usecs
[ 8.588188] calling extcon_class_init+0x0/0x20 @ 1
[ 8.593683] initcall extcon_class_init+0x0/0x20 returned 0 after 60 usecs
[ 8.601257] calling alsa_timer_init+0x0/0x16c @ 1
[ 8.606881] initcall alsa_timer_init+0x0/0x16c returned 0 after 279 usecs
[ 8.614433] calling alsa_pcm_init+0x0/0x18 @ 1
[ 8.619530] initcall alsa_pcm_init+0x0/0x18 returned 0 after 4 usecs
[ 8.626603] calling snd_soc_init+0x0/0x84 @ 1
[ 8.632063] probe of snd-soc-dummy returned 1 after 122 usecs
[ 8.638754] initcall snd_soc_init+0x0/0x84 returned 0 after 7001 usecs
[ 8.646019] calling dmic_driver_init+0x0/0x10 @ 1
[ 8.651620] initcall dmic_driver_init+0x0/0x10 returned 0 after 227 usecs
[ 8.659210] calling asoc_simple_card_init+0x0/0x10 @ 1
[ 8.665244] initcall asoc_simple_card_init+0x0/0x10 returned 0 after 208 usecs
[ 8.673307] calling sunxi_asoc_cpudai_driver_init+0x0/0x10 @ 1
[ 8.680244] probe of 203034c.dummy_cpudai returned 1 after 154 usecs
[ 8.687427] initcall sunxi_asoc_cpudai_driver_init+0x0/0x10 returned 0 after 7322 usecs
[ 8.696344] calling sunxi_spdif_driver_init+0x0/0x10 @ 1
[ 8.702617] initcall sunxi_spdif_driver_init+0x0/0x10 returned 0 after 232 usecs
[ 8.710875] calling sunxi_dmic_driver_init+0x0/0x10 @ 1
[ 8.717029] initcall sunxi_dmic_driver_init+0x0/0x10 returned 0 after 220 usecs
[ 8.725166] calling sunxi_daudio_driver_init+0x0/0x10 @ 1
[ 8.731533] initcall sunxi_daudio_driver_init+0x0/0x10 returned 0 after 231 usecs
[ 8.739888] calling sunxi_internal_codec_driver_init+0x0/0x10 @ 1
[ 8.747009] [AUDIOCODEC][sunxi_codec_parse_params][2412]:digital_vol:0, lineout_vol:26, mic1gain:31, mic2 gain:31 pa_msleep:120, pa_level:1, pa_pwr_level:1
[ 8.747009]
[ 8.764060] [AUDIOCODEC][sunxi_codec_parse_params][2448]:adcdrc_cfg:0, adchpf_cfg:1, dacdrc_cfg:0, dachpf :0
[ 8.775369] [AUDIOCODEC][sunxi_internal_codec_probe][2609]:codec probe finished
[ 8.783612] probe of 2030000.codec returned 1 after 36674 usecs
[ 8.790311] initcall sunxi_internal_codec_driver_init+0x0/0x10 returned 0 after 42505 usecs
[ 8.799624] calling sunxi_machine_driver_init+0x0/0x10 @ 1
[ 8.806624] debugfs: Directory '203034c.dummy_cpudai' with parent 'audiocodec' already present!
[ 8.816373] [SNDCODEC][sunxi_card_init][583]:card init finished
[ 8.823425] sunxi-codec-machine 2030340.sound: 2030000.codec <-> 203034c.dummy_cpudai mapping ok
[ 8.834359] input: audiocodec sunxi Audio Jack as /devices/platform/soc@3000000/2030340.sound/sound/card0 /input0
[ 8.846358] [SNDCODEC][sunxi_card_dev_probe][836]:register card finished
[ 8.853967] probe of 2030340.sound returned 1 after 47937 usecs
[ 8.860583] [SNDCODEC][sunxi_hs_init_work][259]:resume-->report switch
[ 8.866932] initcall sunxi_machine_driver_init+0x0/0x10 returned 0 after 59664 usecs
[ 8.876481] calling sock_diag_init+0x0/0x40 @ 1
[ 8.881773] initcall sock_diag_init+0x0/0x40 returned 0 after 70 usecs
[ 8.889077] calling llc_init+0x0/0x24 @ 1
[ 8.893635] initcall llc_init+0x0/0x24 returned 0 after 1 usecs
[ 8.900245] calling snap_init+0x0/0x44 @ 1
[ 8.904903] initcall snap_init+0x0/0x44 returned 0 after 3 usecs
[ 8.911610] calling blackhole_init+0x0/0xc @ 1
[ 8.916651] initcall blackhole_init+0x0/0xc returned 0 after 2 usecs
[ 8.923753] calling fq_codel_module_init+0x0/0xc @ 1
[ 8.929390] initcall fq_codel_module_init+0x0/0xc returned 0 after 1 usecs
[ 8.937053] calling init_cgroup_cls+0x0/0xc @ 1
[ 8.942199] initcall init_cgroup_cls+0x0/0xc returned 0 after 0 usecs
[ 8.949379] calling nfnetlink_init+0x0/0x70 @ 1
[ 8.954531] initcall nfnetlink_init+0x0/0x70 returned 0 after 16 usecs
[ 8.961812] calling nfnl_osf_init+0x0/0x50 @ 1
[ 8.966867] initcall nfnl_osf_init+0x0/0x50 returned 0 after 2 usecs
[ 8.973934] calling nf_conntrack_standalone_init+0x0/0xa0 @ 1
[ 8.980932] initcall nf_conntrack_standalone_init+0x0/0xa0 returned 0 after 464 usecs
[ 8.989690] calling ctnetlink_init+0x0/0x88 @ 1
[ 8.994850] initcall ctnetlink_init+0x0/0x88 returned 0 after 5 usecs
[ 9.002042] calling cttimeout_init+0x0/0x78 @ 1
[ 9.007193] initcall cttimeout_init+0x0/0x78 returned 0 after 2 usecs
[ 9.014370] calling nf_log_common_init+0x0/0x8 @ 1
[ 9.019810] initcall nf_log_common_init+0x0/0x8 returned 0 after 0 usecs
[ 9.027277] calling nf_log_netdev_init+0x0/0x54 @ 1
[ 9.033336] initcall nf_log_netdev_init+0x0/0x54 returned 0 after 506 usecs
[ 9.041145] calling nf_nat_init+0x0/0x104 @ 1
[ 9.046103] initcall nf_nat_init+0x0/0x104 returned 0 after 17 usecs
[ 9.053209] calling xt_init+0x0/0xe4 @ 1
[ 9.057692] initcall xt_init+0x0/0xe4 returned 0 after 4 usecs
[ 9.064178] calling tcpudp_mt_init+0x0/0x10 @ 1
[ 9.069328] initcall tcpudp_mt_init+0x0/0x10 returned 0 after 3 usecs
[ 9.076491] calling connmark_mt_init+0x0/0x48 @ 1
[ 9.081837] initcall connmark_mt_init+0x0/0x48 returned 0 after 1 usecs
[ 9.089208] calling netmap_tg_init+0x0/0x10 @ 1
[ 9.094349] initcall netmap_tg_init+0x0/0x10 returned 0 after 1 usecs
[ 9.101522] calling redirect_tg_init+0x0/0x10 @ 1
[ 9.106863] initcall redirect_tg_init+0x0/0x10 returned 0 after 1 usecs
[ 9.114216] calling masquerade_tg_init+0x0/0x3c @ 1
[ 9.119761] initcall masquerade_tg_init+0x0/0x3c returned 0 after 9 usecs
[ 9.127323] calling conntrack_mt_init+0x0/0x10 @ 1
[ 9.132750] initcall conntrack_mt_init+0x0/0x10 returned 0 after 1 usecs
[ 9.140215] calling state_mt_init+0x0/0xc @ 1
[ 9.145159] initcall state_mt_init+0x0/0xc returned 0 after 0 usecs
[ 9.152135] calling gre_offload_init+0x0/0x44 @ 1
[ 9.157478] initcall gre_offload_init+0x0/0x44 returned 0 after 1 usecs
[ 9.164838] calling sysctl_ipv4_init+0x0/0x4c @ 1
[ 9.170367] initcall sysctl_ipv4_init+0x0/0x4c returned 0 after 186 usecs
[ 9.177933] calling nf_defrag_init+0x0/0xc @ 1
[ 9.182971] initcall nf_defrag_init+0x0/0xc returned 0 after 1 usecs
[ 9.190057] calling ip_tables_init+0x0/0x88 @ 1
[ 9.195227] initcall ip_tables_init+0x0/0x88 returned 0 after 31 usecs
[ 9.202534] calling iptable_mangle_init+0x0/0x74 @ 1
[ 9.208333] initcall iptable_mangle_init+0x0/0x74 returned 0 after 159 usecs
[ 9.216174] calling cubictcp_register+0x0/0x64 @ 1
[ 9.221632] initcall cubictcp_register+0x0/0x64 returned 0 after 3 usecs
[ 9.229106] calling inet6_init+0x0/0x320 @ 1
[ 9.234534] NET: Registered protocol family 10
[ 9.240471] Segment Routing with IPv6
[ 9.244638] initcall inet6_init+0x0/0x320 returned 0 after 10423 usecs
[ 9.251942] calling nf_defrag_init+0x0/0x4c @ 1
[ 9.257193] initcall nf_defrag_init+0x0/0x4c returned 0 after 58 usecs
[ 9.264456] calling packet_init+0x0/0x78 @ 1
[ 9.269324] NET: Registered protocol family 17
[ 9.274281] initcall packet_init+0x0/0x78 returned 0 after 4839 usecs
[ 9.281467] calling br_init+0x0/0x9c @ 1
[ 9.285955] initcall br_init+0x0/0x9c returned 0 after 26 usecs
[ 9.292559] calling nf_conntrack_l3proto_bridge_init+0x0/0x18 @ 1
[ 9.299448] initcall nf_conntrack_l3proto_bridge_init+0x0/0x18 returned 0 after 1 usecs
[ 9.308795] calling init_machine_late+0x0/0x8c @ 1
[ 9.314231] initcall init_machine_late+0x0/0x8c returned 0 after 7 usecs
[ 9.321704] calling swp_emulation_init+0x0/0x64 @ 1
[ 9.327241] Registering SWP/SWPB emulation handler
[ 9.332575] initcall swp_emulation_init+0x0/0x64 returned 0 after 5213 usecs
[ 9.340429] calling init_oops_id+0x0/0x40 @ 1
[ 9.345382] initcall init_oops_id+0x0/0x40 returned 0 after 6 usecs
[ 9.352373] calling pm_qos_power_init+0x0/0x84 @ 1
[ 9.358075] initcall pm_qos_power_init+0x0/0x84 returned 0 after 252 usecs
[ 9.365733] calling pm_debugfs_init+0x0/0x34 @ 1
[ 9.371006] initcall pm_debugfs_init+0x0/0x34 returned 0 after 18 usecs
[ 9.378376] calling wakeup_reason_init+0x0/0xec @ 1
[ 9.383957] initcall wakeup_reason_init+0x0/0xec returned 0 after 54 usecs
[ 9.391612] calling printk_late_init+0x0/0x1cc @ 1
[ 9.397053] initcall printk_late_init+0x0/0x1cc returned 0 after 4 usecs
[ 9.404508] calling init_srcu_module_notifier+0x0/0x2c @ 1
[ 9.410721] initcall init_srcu_module_notifier+0x0/0x2c returned 0 after 1 usecs
[ 9.418967] calling tk_debug_sleep_time_init+0x0/0x34 @ 1
[ 9.425083] initcall tk_debug_sleep_time_init+0x0/0x34 returned 0 after 14 usecs
[ 9.433327] calling fault_around_debugfs+0x0/0x34 @ 1
[ 9.439061] initcall fault_around_debugfs+0x0/0x34 returned 0 after 9 usecs
[ 9.446818] calling check_early_ioremap_leak+0x0/0x60 @ 1
[ 9.452927] initcall check_early_ioremap_leak+0x0/0x60 returned 0 after 0 usecs
[ 9.461071] calling ubifs_init+0x0/0xc4 @ 1
[ 9.466014] initcall ubifs_init+0x0/0xc4 returned 0 after 185 usecs
[ 9.473005] calling init_root_keyring+0x0/0xc @ 1
[ 9.478414] initcall init_root_keyring+0x0/0xc returned 0 after 63 usecs
[ 9.485878] calling prandom_reseed+0x0/0x34 @ 1
[ 9.491041] initcall prandom_reseed+0x0/0x34 returned 0 after 10 usecs
[ 9.498322] calling clk_debug_init+0x0/0x100 @ 1
[ 9.517098] initcall clk_debug_init+0x0/0x100 returned 0 after 13203 usecs
[ 9.524761] calling sync_state_resume_initcall+0x0/0x10 @ 1
[ 9.531091] initcall sync_state_resume_initcall+0x0/0x10 returned 0 after 2 usecs
[ 9.539432] calling deferred_probe_initcall+0x0/0x98 @ 1
[ 9.548174] initcall deferred_probe_initcall+0x0/0x98 returned 0 after 2656 usecs
[ 9.556521] calling genpd_debug_init+0x0/0x178 @ 1
[ 9.562067] initcall genpd_debug_init+0x0/0x178 returned 0 after 90 usecs
[ 9.569649] calling genpd_power_off_unused+0x0/0x70 @ 1
[ 9.575597] initcall genpd_power_off_unused+0x0/0x70 returned 0 after 9 usecs
[ 9.583551] calling sync_debugfs_init+0x0/0x74 @ 1
[ 9.589027] initcall sync_debugfs_init+0x0/0x74 returned 0 after 25 usecs
[ 9.596585] calling ubi_init+0x0/0x230 @ 1
[ 9.601595] ubi0: attaching mtd3
[ 9.824014] random: crng init done
[ 9.870008] ubi0: scanning is finished
[ 9.883802] ubi0: attached mtd3 (name "sys", size 123 MiB)
[ 9.889971] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes
[ 9.897633] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 2048
[ 9.905188] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 9.912946] ubi0: good PEBs: 492, bad PEBs: 0, corrupted PEBs: 0
[ 9.919632] ubi0: user volume: 9, internal volumes: 1, max. volumes count: 128
[ 9.927685] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
[ 9.936979] ubi0: available PEBs: 0, total reserved PEBs: 492, PEBs reserved for bad PEB handling: 20
[ 9.947260] ubi0: background thread "ubi_bgt0d" started, PID 1141
[ 9.955224] block ubiblock0_5: created from ubi0:5(rootfs)
[ 9.961414] initcall ubi_init+0x0/0x230 returned 0 after 351708 usecs
[ 9.968601] calling init_sunxi_hci_class+0x0/0x40 @ 1
[ 9.974403] initcall init_sunxi_hci_class+0x0/0x40 returned 0 after 67 usecs
[ 9.982263] calling usb_manager_init+0x0/0x10 @ 1
[ 9.988482] probe of soc@3000000:usbc0@0 returned 1 after 666 usecs
[ 9.995593] initcall usb_manager_init+0x0/0x10 returned 0 after 7795 usecs
[ 10.003298] calling of_fdt_raw_init+0x0/0x80 @ 1
[ 10.010187] OF: fdt: not creating '/sys/firmware/fdt': CRC check failed
[ 10.017571] initcall of_fdt_raw_init+0x0/0x80 returned 0 after 8777 usecs
[ 10.025127] calling tcp_congestion_default+0x0/0x14 @ 1
[ 10.031061] initcall tcp_congestion_default+0x0/0x14 returned 0 after 3 usecs
[ 10.039013] calling regulatory_init_db+0x0/0x90 @ 1
[ 10.044671] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 10.046738] initcall regulatory_init_db+0x0/0x90 returned 0 after 14 usecs
[ 10.054310] cfg80211: failed to load regulatory.db
[ 10.061963] calling clk_disable_unused+0x0/0xd8 @ 1
[ 10.072792] clk: Not disabling unused clocks
[ 10.077557] initcall clk_disable_unused+0x0/0xd8 returned 0 after 4647 usecs
[ 10.085402] calling regulator_init_complete+0x0/0x4c @ 1
[ 10.091428] initcall regulator_init_complete+0x0/0x4c returned 0 after 3 usecs
[ 10.099469] calling of_platform_sync_state_init+0x0/0x10 @ 1
[ 10.105864] initcall of_platform_sync_state_init+0x0/0x10 returned 0 after 2 usecs
[ 10.114298] calling alsa_sound_last_init+0x0/0x78 @ 1
[ 10.120028] ALSA device list:
[ 10.123324] #0: audiocodec
[ 10.126530] initcall alsa_sound_last_init+0x0/0x78 returned 0 after 6344 usecs
[ 10.134577] alloc_fd: slot 0 not NULL!
[ 10.142136] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[ 10.152332] devtmpfs: mounted
[ 10.157590] Freeing unused kernel memory: 1024K
[ 10.186890] Run /pseudo_init as init process
mount: mounting none on /dev failed: Resource busy
[ 10.423312] UBIFS (ubi0:7): default file-system created
[ 10.429875] UBIFS (ubi0:7): Mounting in unauthenticated mode
[ 10.436309] UBIFS (ubi0:7): background thread "ubifs_bgt0_7" started, PID 1177
[ 10.545064] UBIFS (ubi0:7): UBIFS: mounted UBI device 0, volume 7, name "rootfs_data"
[ 10.553850] UBIFS (ubi0:7): LEB size: 258048 bytes (252 KiB), min./max. I/O unit sizes: 4096 bytes/4096 b ytes
[ 10.564904] UBIFS (ubi0:7): FS size: 43352064 bytes (41 MiB, 168 LEBs), journal size 2064385 bytes (1 MiB , 8 LEBs)
[ 10.576437] UBIFS (ubi0:7): reserved for root: 2047624 bytes (1999 KiB)
[ 10.583811] UBIFS (ubi0:7): media format: w5/r0 (latest is w5/r0), UUID A990054B-7A51-40E3-88D5-D2ADE4302 641, small LPT model
can't run '/etc/preinit': No such file or directory
mount: mounting proc on /proc failed: Resource busy
mount: mounting tmpfs on /run failed: No such file or directory
hostname: can't open '/etc/hostname': No such file or directory
------run rc.preboot file-----
[ 10.726898] UBIFS (ubi0:8): default file-system created
[ 10.733373] UBIFS (ubi0:8): Mounting in unauthenticated mode
[ 10.739836] UBIFS (ubi0:8): background thread "ubifs_bgt0_8" started, PID 1207
[ 10.847452] UBIFS (ubi0:8): UBIFS: mounted UBI device 0, volume 8, name "UDISK"
[ 10.855619] UBIFS (ubi0:8): LEB size: 258048 bytes (252 KiB), min./max. I/O unit sizes: 4096 bytes/4096 b ytes
[ 10.866690] UBIFS (ubi0:8): FS size: 6451200 bytes (6 MiB, 25 LEBs), journal size 2064385 bytes (1 MiB, 6 LEBs)
[ 10.877943] UBIFS (ubi0:8): reserved for root: 304706 bytes (297 KiB)
[ 10.885118] UBIFS (ubi0:8): media format: w5/r0 (latest is w5/r0), UUID 7F2A6990-A27D-4A9F-A55D-0BFEB024E E5F, small LPT model
------run rc.modules file-----
[ 11.026483] calling init_module+0x0/0x1000 [usb_storage] @ 1210
[ 11.033383] usbcore: registered new interface driver usb-storage
[ 11.040173] initcall init_module+0x0/0x1000 [usb_storage] returned 0 after 6739 usecs
[ 11.277307] calling init_module+0x0/0x1000 [8821cs] @ 1213
[ 11.418801] probe of mmc1:0001:1 returned 1 after 135086 usecs
[ 11.433472] initcall init_module+0x0/0x1000 [8821cs] returned 0 after 145536 usecs
Successfully initialized wpa_supplicant
[ 12.442525] start_addr=(0x8000), end_addr=(0x10000), buffer_size=(0x8000), smp_number_max=(4096)
------run rc.final file-----
numid=30,iface=MIXER,name='Headphone Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
[ 12.703215] file system registered
Load mpp modules
mkdir: can't create directory '/dev/pts': File exists
[ 12.723016] configfs-gadget 4100000.udc-controller: failed to start g1: -19
mkdir: can't create directory '/dev/shm': File exists
sh: write error: No such device
[ 12.758806] read descriptors
[ 12.762055] read strings
cat: can't open '/sys/class/sunxi_info/sys_info': No such file or directory
Starting network: Failed to connect to ubus
/sbin/ifup: line 51: /sbin/wifi: not found
FAIL
ifconfig: invalid hw-addr 00:
udhcpc: SIOCGIFINDEX: No such device
[leo start] chage file
File does not exist.
/etc/init.d/S60sshd: line 55: touch: not found
==================================
Connecting to the network(leo)......
[ 13.536735]
[ 13.536735] insmod_device_driver
[ 13.536735]
[ 13.543901] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dumm y regulator
[ 13.739511] sunxi_set_cur_vol_work()397 WARN: get power supply failed
[ 13.785946] android_work: sent uevent USB_STATE=CONNECTED
[ 13.812985] configfs-gadget gadget: high-speed config #1: c
[ 13.819318] android_work: sent uevent USB_STATE=CONFIGURED
[ 18.468861] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Connected to the AP(leo)
Getting ip address(leo)......
udhcpc: started, v1.27.2
udhcpc: sending discover
udhcpc: sending select for 192.168.199.177
udhcpc: lease of 192.168.199.177 obtained, lease time 86400
Wifi connect ap : Success!
==================================
[leo start]Start SSH-----------
sh: odhcp6c: not found
BusyBox v1.27.2 () built-in shell (ash)
------run profile file-----
_____ _ __ _
|_ _||_| ___ _ _ | | |_| ___ _ _ _ _
| | _ | || | | |__ | || || | ||_'_|
| | | || | || _ | |_____||_||_|_||___||_,_|
|_| |_||_|_||_|_| Tina is Based on OpenWrt!
----------------------------------------------
Tina Linux (Neptune, 61CC0487)
----------------------------------------------
Trying to connect to SWUpdate...
Wed Jun 1 00:00:00 GMT 2022
nodev debugfs
root@TinaLinux:/# swu_param: ####
swu_software: ####
swu_mode: ####
no swupdate_cmd to run, wait for next swupdate
/etc/rc.common: line 128: procd_add_mdns: not found
[ 40.376750] usb1-vbus: disabling
root@TinaLinux:/#
root@TinaLinux:/# /etc/init.d/acm.sh
mount: mounting none on /sys/kernel/config failed: Resource busy
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1': File exists
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/strings/0x409': File exists
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/configs/c.1': File exists
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/configs/c.1/strings/0x409': File exists
echo: write error: Resource busy
root@TinaLinux:/# cd dev/
root@TinaLinux:/dev# ls
bus mtd0ro random ubi0_2
by-name mtd1 shm ubi0_3
cedar_dev mtd1ro snd ubi0_4
console mtd2 sunxi-reg ubi0_5
cpu_dma_latency mtd2ro sunxi-wlan ubi0_6
disp mtd3 sunxi_pwm0 ubi0_7
fb0 mtd3ro tty ubi0_8
full mtdblock0 ttyGS0 ubi_ctrl
g2d mtdblock1 ttyS0 ubiblock0_5
gpiochip0 mtdblock2 ttyS1 udmabuf
input mtdblock3 ttyS4 urandom
ion null ubi0 usb-ffs
kmsg ptmx ubi0_0 zero
mtd0 pts ubi0_1
root@TinaLinux:/dev# echo "asdasd" > ttyGS0
^C
root@TinaLinux:/dev# cat /etc/init.d/acm.sh
mount -t configfs none /sys/kernel/config
mkdir /sys/kernel/config/usb_gadget/g1
echo "0x1f3a" > /sys/kernel/config/usb_gadget/g1/idVendor
echo "0x0007" > /sys/kernel/config/usb_gadget/g1/idProduct
mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409
mkdir /sys/kernel/config/usb_gadget/g1/functions/acm.usb0
mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1
echo 0xc0 > /sys/kernel/config/usb_gadget/g1/configs/c.1/bmAttributes
echo 500 > /sys/kernel/config/usb_gadget/g1/configs/c.1/MaxPower
mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1/strings/0x409
ln -s /sys/kernel/config/usb_gadget/g1/functions/acm.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/acm.usb0
ls /sys/class/udc/ | xargs echo > /sys/kernel/config/usb_gadget/g1/UDCroot@TinaLinux:/dev#
我之前玩那个ledc驱动器嘛,tina系统里面的那个其实不太好用,每次要echo 数据去那个device是不行的,一个指令只能设置一个灯的1/3,那么100fps 设置80个灯就要炸啦,系统直接宕机
后来我找啦个办法直接往内核发数据,爽歪歪啦
操作那个灯的方法现在变成了
1 准备好80个灯的数据
2 发送给内核驱动
3 驱动读取数据 交给DMA 一次写80个灯的数据
那么800k的 ws2812的数据波,算下来80个灯一次传送数据大概在 2ms,抛开数据准备的时间也就3ms 80个灯的数据,加个sleep,一帧10ms都是绰绰有余的,那么100fps,完全没问题,使用方法也很简单,啥额外的驱动读取都不需要,直接往内核发数据包,内核驱动接就好啦
亲测效果很好
B站演示视频
【RGB只要开始玩就停不下来,这个全志的ledc用起来终于顺心了,DMA传输数据,反正跑个100fps没有一点压力哪位大佬有玩过lua代码在线编译执行的呀我…】 https://www.bilibili.com/video/BV1TJ4m1h7Gk/?share_source=copy_web
我是直接通过netlink去实现往内核驱动写数据的
所以得先打开 tina linux里面 lib中相关的库
make menuconfig
Libraries 里面涉及到netlink的库给它打开以后就可以用啦
Symbol: PACKAGE_libnftnl [=y] │
│ Type : tristate │
│ Prompt: libnftnl........... Low-level netlink library for the nf_tables subsystem │
│ Location: │
│ -> Libraries │
│ Defined at tmp/.config-package.in:20672 │
│ Selects: PACKAGE_libmnl [=y] && PACKAGE_libpthread [=y] && PACKAGE_librt [=y] && PACKAGE_libc [=y] && PACKAGE_libssp [=n] │
│ Selected by: PACKAGE_nftables [=n] && IPV6 [=y] │
│
然后就是在ledc驱动里面加上自己的代码
/lichee/linux-5.4/drivers/leds/leds-sunxi.c
//leo 添加个模块
#define NETLINK_TEST 25
#define MSG_SIZE 320
static struct sock *nl_sk = NULL;
u32 leo_led_data[80];
//用于触发数据写入
static int leo_show_led(void)
{
struct sunxi_led *led = sunxi_led_global;
unsigned long flags;
int i,err;
led->reset_ns = 84;
//开始用DMA方式传输数据
spin_lock_irqsave(&led->lock, flags);
memcpy(led->data,leo_led_data, sizeof(leo_led_data));
led->length = 80;
spin_unlock_irqrestore(&led->lock, flags);
/* prepare for dma xfer, dynamic apply dma channel */
if (led->length > SUNXI_LEDC_FIFO_DEPTH) {
err = sunxi_ledc_dma_get(led);
if (err)
return err;
}
sunxi_ledc_trans_data(led);
if (debug_mask & DEBUG_INFO2) {
dprintk(DEBUG_INFO2, "dump reg:\n");
led_dump_reg(led, 0, 0x30);
}
sunxi_ledc_complete(led);
/* dynamic release dma chan, release at the end of a transmission */
if (led->length > SUNXI_LEDC_FIFO_DEPTH)
sunxi_ledc_dma_put(led);
kfree(led);
//printk(KERN_INFO,"leo_show_led------end\n");
return 0;
}
int send_nl_message(struct sock *sock, int pid, char *message, int message_len)
{
struct sk_buff *skb_out;
struct nlmsghdr *nlh_out;
// Allocate a new skb
// 创建一个 sk_buff 缓冲区
skb_out = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
if (!skb_out) {
return -ENOMEM;
}
// Initialize the netlink message header
nlh_out = nlmsg_put(skb_out, 0, 0, NLMSG_DONE, message_len, 0);
if (!nlh_out) {
nlmsg_free(skb_out);
return -ENOMEM;
}
// Set the destination PID and copy the message data
NETLINK_CB(skb_out).dst_group = 0; /* unicast */
memcpy(NLMSG_DATA(nlh_out), message, message_len);
// Send the message to the specified PID
// 向指定的 Netlink Socket 发送消息
if (nlmsg_unicast(sock, skb_out, pid) < 0) {
nlmsg_free(skb_out);
return -EFAULT;
}
return 0;
}
static void nl_recv_msg(struct sk_buff *__skb)
{
struct sk_buff *skb;
char str[MSG_SIZE] = {0};
struct nlmsghdr *nlh;
int i;
if (__skb == NULL) {
return;
}
skb = skb_get(__skb);
if (skb->len < NLMSG_SPACE(0)) {
return;
}
nlh = nlmsg_hdr(skb);
/* 时间一长就崩掉啦,奇怪??????*/
leo_show_led();
kfree(nlh);
kfree(skb);
}
static int __init netlink_init(void)
{
struct netlink_kernel_cfg cfg = {
.input = nl_recv_msg,
};
nl_sk = netlink_kernel_create(&init_net, NETLINK_TEST, &cfg);
if (!nl_sk) {
printk(KERN_ALERT "Failed to create netlink socket.\n");
return -ENOMEM;
}
printk(KERN_INFO "Netlink socket created.\n");
return 0;
}
static void __exit netlink_exit(void)
{
netlink_kernel_release(nl_sk);
printk(KERN_INFO "Netlink socket released.\n");
}
module_init(netlink_init);
module_exit(netlink_exit);
MODULE_LICENSE("GPL");
/*debug
sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
*/
上面那个相当于内核里面的服务端,功能也很简单,就是接收数据,收到后直接丢给dma,发送出去
下面这个是客户端,也就是你的app
大概写个发送数据的代码就行啦,超级简单,哈哈哈
大概的代码如下
大家可以参考下
#include <string.h>
#include <sys/socket.h>
#include <linux/netlink.h>
// net 方式往内核发送信息
int sock_fd, len;
struct sockaddr_nl src_addr, dst_addr;
struct nlmsghdr * nlh;
char msg[MSG_SIZE] = {0};
sock_fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_TEST);
if(sock_fd < 0) {
perror("socket");
exit(EXIT_FAILURE);
}
/**/
memset(&src_addr, 0, sizeof(struct sockaddr_nl));
src_addr.nl_family = AF_NETLINK;
src_addr.nl_pid = getpid();
bind(sock_fd, (struct sockaddr *)&src_addr, sizeof(struct sockaddr_nl));
memset(&dst_addr, 0, sizeof(struct sockaddr_nl));
dst_addr.nl_family = AF_NETLINK;
dst_addr.nl_pid = 0; // send to kernel
dst_addr.nl_groups = 0; // unicast
nlh = (struct nlmsghdr *)malloc(NLMSG_SPACE(MSG_SIZE));
memset(nlh, 0, NLMSG_SPACE(MSG_SIZE));
nlh->nlmsg_len = NLMSG_SPACE(MSG_SIZE);
nlh->nlmsg_pid = getpid();
nlh->nlmsg_flags = 0;
char buf[MAX_PAYLOAD] = {0};
// sprintf(cmd, "echo 10 > /sys/class/leds/sunxi_led79r/brightness");
// system(cmd);
// usleep(100000);
// net 方式往内核发送信息
// 测试颜色
struct color_rgb led_color_test;
// led_color_test.r= 1;
// led_color_test.g= 1;
// led_color_test.b= 1;
struct color_hsv color_hsv_test;
u_int16_t test_h = 0;
color_hsv_test = color_hsv(100, 250, 0);
//启动全led检查
check_all_led(sock_fd,nlh,dst_addr);
//按键全功能检查
void check_all_led(int sock_fd,struct nlmsghdr * nlh,struct sockaddr_nl dst_addr){
struct color_hsv color_hsv_test;
u_int16_t test_h = 0;
color_hsv_test = color_hsv(33, 235, 0);
//用于提示灯颜色 color_hsv(33, 235, 200);
int is_stop=0;
int len = sizeof(led_data);
int bright2=0;
u_int16_t t_flag= 0;
printf("start check led!\n");
while(!is_stop){
if(t_flag == 0) {
bright2 = bright2 + 4;
} else {
bright2 = bright2 - 4;
test_h++;
}
if(bright2 > 225) {
bright2 = 220;
t_flag = 1;
usleep(40000);
}
if(bright2 < 0) {
bright2 = 0;
//t_flag = 0;
is_stop=1;//放完停掉
//usleep(50000);
printf("stop led\n");
}
color_hsv_test.v = bright2;
for(int i = 0; i < 80; i++) {
led_data[i] = trans_hsv_u32(color_hsv_test);
}
memcpy(NLMSG_DATA(nlh), (const uint8_t *)led_data, len);
if(sendto(sock_fd, nlh, nlh->nlmsg_len, 0, (struct sockaddr *)&dst_addr, sizeof(struct sockaddr_nl)) < 0) {
perror("sendto");
exit(EXIT_FAILURE);
} else {
//printf("send ok\n");
}
usleep(12000);
if(is_stop==1){
break;
return;
}
}
}
这里面有用的就是个 sendto函数
其他都是用来准备好数据包的,我这直接把数据整个发过去了
其实这么整效率不够高,最好是就发个数据包的地址过去
然后接收的位置,直接读那个地址里面的数据就行了
反正即便是这么写,跑起来也很快,基本不耗什么cpu
主要是简单啊,不用去理解linux底层驱动了,反正我也没搞明白怎么驱动的
反正就是用了netlink直接往内核驱动发包,内核驱动收到包以后直接执行。。。
直接执行,达到结果也是一样快。
@damiaa dts里面设置一下打开相应的uart,没有就加上就行啦,那个pin不能被其他的占用了,编译好后启动tina
系统里面就会有/dev/ttyS4 /dev/ttyS5
如果没有就dmesg看看启动的时候pin有没有报错
@awwwwa. 这个又随机出现了一次,这次好了,刚启动就卡了
[ 9.846865] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 9.854673] ubi0: good PEBs: 492, bad PEBs: 0, corrupted PEBs: 0
[ 9.861417] ubi0: user volume: 9, internal volumes: 1, max. volumes count: 128
[ 9.869527] ubi0: max/mean erase counter: 6/2, WL threshold: 4096, image sequence number: 0
[ 9.878910] ubi0: available PEBs: 0, total reserved PEBs: 492, PEBs reserved for bad PEB handling: 20
[ 9.889275] ubi0: background thread "ubi_bgt0d" started, PID 1123
[ 9.897344] block ubiblock0_5: created from ubi0:5(rootfs)
[ 9.903517] initcall ubi_init+0x0/0x230 returned 0 after 404120 usecs
[ 9.910787] calling init_sunxi_hci_class+0x0/0x40 @ 1
[ 9.916628] initcall init_sunxi_hci_class+0x0/0x40 returned 0 after 60 usecs
[ 9.924540] calling usb_manager_init+0x0/0x10 @ 1
[ 9.930782] probe of soc@3000000:usbc0@0 returned 1 after 650 usecs
[ 9.937986] initcall usb_manager_init+0x0/0x10 returned 0 after 7861 usecs
[ 9.945705] calling of_fdt_raw_init+0x0/0x80 @ 1
[ 9.952628] initcall of_fdt_raw_init+0x0/0x80 returned 0 after 1586 usecs
[ 9.960266] calling tcp_congestion_default+0x0/0x14 @ 1
[ 9.966229] initcall tcp_congestion_default+0x0/0x14 returned 0 after 3 usecs
[ 9.974245] calling regulatory_init_db+0x0/0x90 @ 1
[ 9.979947] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 9.986496] initcall regulatory_init_db+0x0/0x90 returned 0 after 11 usecs
[ 9.989659] cfg80211: failed to load regulatory.db
[ 9.997336] calling clk_disable_unused+0x0/0xd8 @ 1
[ 10.008337] clk: Not disabling unused clocks
[ 10.013131] initcall clk_disable_unused+0x0/0xd8 returned 0 after 4676 usecs
[ 10.021067] calling regulator_init_complete+0x0/0x4c @ 1
[ 10.027140] initcall regulator_init_complete+0x0/0x4c returned 0 after 2 usecs
[ 10.035242] calling of_platform_sync_state_init+0x0/0x10 @ 1
[ 10.041720] initcall of_platform_sync_state_init+0x0/0x10 returned 0 after 2 usecs
[ 10.050226] calling alsa_sound_last_init+0x0/0x78 @ 1
[ 10.055991] ALSA device list:
[ 10.059333] #0: audiocodec
[ 10.062566] initcall alsa_sound_last_init+0x0/0x78 returned 0 after 6415 usecs
[ 10.070682] alloc_fd: slot 0 not NULL!
[ 10.077875] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[ 10.087696] devtmpfs: mounted
[ 10.092960] Freeing unused kernel memory: 1024K
[ 10.106639] Run /pseudo_init as init process
[ 10.338332] UBIFS (ubi0:7): Mounting in unauthenticated mode
[ 10.344830] UBIFS (ubi0:7): background thread "ubifs_bgt0_7" started, PID 1160
[ 10.416213] UBIFS (ubi0:7): recovery needed
[ 10.595230] UBIFS (ubi0:7): recovery completed
[ 10.600446] UBIFS (ubi0:7): UBIFS: mounted UBI device 0, volume 7, name "rootfs_data"
[ 10.609269] UBIFS (ubi0:7): LEB size: 258048 bytes (252 KiB), min./max. I/O unit sizes: 4096 bytes/4096 bytes
[ 10.620423] UBIFS (ubi0:7): FS size: 43352064 bytes (41 MiB, 168 LEBs), journal size 2064385 bytes (1 MiB, 8 LEBs)
[ 10.632059] UBIFS (ubi0:7): reserved for root: 2047624 bytes (1999 KiB)
[ 10.639502] UBIFS (ubi0:7): media format: w5/r0 (latest is w5/r0), UUID DE81D6D0-9195-433E-8407-0A0643D8B249, small LPT model
[ 10.776081] UBIFS (ubi0:8): Mounting in unauthenticated mode
[ 10.782660] UBIFS (ubi0:8): background thread "ubifs_bgt0_8" started, PID 1189
[ 10.853232] UBIFS (ubi0:8): recovery needed
[ 10.905789] UBIFS (ubi0:8): recovery completed
[ 10.910922] UBIFS (ubi0:8): UBIFS: mounted UBI device 0, volume 8, name "UDISK"
[ 10.919146] UBIFS (ubi0:8): LEB size: 258048 bytes (252 KiB), min./max. I/O unit sizes: 4096 bytes/4096 bytes
[ 10.930293] UBIFS (ubi0:8): FS size: 6451200 bytes (6 MiB, 25 LEBs), journal size 2064385 bytes (1 MiB, 6 LEBs)
[ 10.941623] UBIFS (ubi0:8): reserved for root: 304706 bytes (297 KiB)
[ 10.948859] UBIFS (ubi0:8): media format: w5/r0 (latest is w5/r0), UUID 8DD93196-4954-4BBB-BAAA-6A26D5F11D42, small LPT model
[ 11.090716] calling init_module+0x0/0x1000 [usb_storage] @ 1192
[ 11.097644] usbcore: registered new interface driver usb-storage
[ 11.104418] initcall init_module+0x0/0x1000 [usb_storage] returned 0 after 6720 usecs
[ 11.133041] calling init_module+0x0/0x1000 [sunxi_gpadc] @ 1195
[ 11.140948] sunxi_gpadc_init,2151, success
[ 11.145919] initcall init_module+0x0/0x1000 [sunxi_gpadc] returned 0 after 4897 usecs
[ 11.384656] calling init_module+0x0/0x1000 [8821cs] @ 1199
[ 11.520716] probe of mmc1:0001:1 returned 1 after 129665 usecs
[ 11.531869] initcall init_module+0x0/0x1000 [8821cs] returned 0 after 136826 usecs
[ 12.671358] start_addr=(0x8000), end_addr=(0x10000), buffer_size=(0x8000), smp_number_max=(4096)
[ 12.934865] file system registered
[ 12.959776] configfs-gadget 4100000.udc-controller: failed to start g1: -19
[ 12.993136] read descriptors
[ 12.996396] read strings
[ 13.143867] Mass Storage Function, version: 2009/09/11
[ 13.151051] LUN: removable file: (no medium)
[ 13.171584] ffs_data_put(): freeing
[ 13.466759] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator
[ 17.316670] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 40.386516] usb1-vbus: disabling
[ 73.449941] sunxi-ohci 4200400.ohci1-controller: ohci_irq: fullspeed or lowspeed device disconnect
[ 73.460075] sunxi-ehci 4200000.ehci1-controller: ehci_irq: highspeed device connect
[ 73.468701] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.496491] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.526478] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.556476] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.586476] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.616476] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.646478] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.676481] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.689137] sunxi-ehci 4200000.ehci1-controller: ehci_irq: highspeed device disconnect
[ 73.698074] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.710304] sunxi-ohci 4200400.ohci1-controller: ohci_irq: fullspeed or lowspeed device connect
[ 73.720095] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.746480] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.776481] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.806482] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.836477] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.866474] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.896477] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.926474] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.956476] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 73.986474] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.016476] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.046475] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.076473] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.106477] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.136475] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.166475] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.196474] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.226475] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.238724] usb 2-1: new low-speed USB device number 6 using sunxi-ohci
[ 74.256473] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.268714] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.280944] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.293195] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.305446] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.317710] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.329974] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.342204] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.354501] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.366733] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.416499] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.446494] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.476487] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.506479] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.536475] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.566484] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.596480] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.626477] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.638736] usb 2-1: device descriptor read/64, error -62
[ 74.656474] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.668724] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.680952] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.696464] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.708702] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.720947] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.733180] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.745403] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.757631] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.769866] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.782084] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.794292] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.806515] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.818737] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.830943] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.843160] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.855376] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.867595] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.879839] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.892065] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.904287] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.916516] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.928765] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.940996] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.953220] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.965472] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.977710] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 74.989919] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.002136] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.014349] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.026586] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.038795] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.051020] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.063238] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.075444] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.096466] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.108682] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.120910] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.133142] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.145366] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.157627] sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
[ 75.496515] usb 2-1: device descriptor read/64, error -62
[ 75.836505] usb 2-1: new low-speed USB device number 7 using sunxi-ohci
[ 76.056508] usb 2-1: device descriptor read/64, error -62
[ 76.406499] usb 2-1: device descriptor read/64, error -62
[ 76.526556] usb usb2-port1: attempt power cycle
[ 77.076511] usb 2-1: new low-speed USB device number 8 using sunxi-ohci
[ 77.526498] usb 2-1: device not accepting address 8, error -62
[ 77.746515] usb 2-1: new low-speed USB device number 9 using sunxi-ohci
[ 78.186522] usb 2-1: device not accepting address 9, error -62
[ 78.193154] usb usb2-port1: unable to enumerate USB device
@awwwwa log 被我关掉啦,啥也没
我那个报错是出现错误了以后通过dmesg看到的
这个故障等我回去有机会再长时间测试的时候接上个串口debug弄出来再看吧
暂时只有那一段出错的输出
之前也停过
但是那会能确定是ssh的锅
这个程序如果是后台运行的就没问题
然后这个之前开了输出的情况下,ssh时间久了以后也会爆掉,然后网络服务就全部都停掉了
只要是后台运行,或者是换到开机自动运行就没啥问题,干个几个小时也没事
@awwwwa 这个中断的优先级可以调高嘛?调高了以后会有影响吗?如何查看系统中的中断情况啊,也就是看看这个中断被谁给抢了
@leomini5 而且再补充一点是,我在这个驱动器上挂了80个灯
然后一直不停的往里面写数据,大概60fps的速度往里面写数据控制灯的颜色才出现上面这个错误的
而且我把驱动里面那个fifo深度改成0了,也就是默认DMA方式发送数据,一次发送80个
数据的来源是直接往led->data 里面写了80个灯的数据
而且这个情况很诡异,超时以后只能重启才能正常
所以想请教下各位大佬那个ledc的驱动为啥会超时呢?
写那段超时处理的代码的意义是什么啊?
那个ledc驱动在长时间跑大量数据之后出错啦
报错是这个超时的故障
sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!
为啥会超时呢,一开始运行的都好好的
但是时间一长比如说,让这个ledc驱动器工作个1-2小时以后
这玩意就概率性的挂掉
报错看上去是超时
现象是有一半左右的灯组就不亮了,而且重启程序那部分不亮的灯也再也不会亮了
会不会是芯片过热或者被其他什么东西干扰了,我开机几个小时后那个芯片还是有点点热的
而且这个出错是概率性的,关机一段时间再启动又不会出错啦
下面是那个驱动报错那部分的代码
static irqreturn_t sunxi_ledc_irq_handler(int irq, void *dev_id)
{
unsigned long flags;
long delta_time_ns;
u32 irq_status, max_ns;
struct sunxi_led *led = sunxi_led_global;
struct timespec64 current_time;
spin_lock_irqsave(&led->lock, flags);
irq_status = sunxi_get_reg(LEDC_INT_STS_REG_OFFSET);
sunxi_ledc_clear_all_irq();
if (irq_status & LEDC_TRANS_FINISH_INT) {
sunxi_ledc_reset(led);
led->length = 0;
led->result = RESULT_COMPLETE;
wake_up(&led->wait);
goto out;
}
if (irq_status & LEDC_WAITDATA_TIMEOUT_INT) {
ktime_get_coarse_real_ts64(¤t_time);
delta_time_ns = current_time.tv_sec - led->start_time.tv_sec;
delta_time_ns *= 1000 * 1000 * 1000;
delta_time_ns += current_time.tv_nsec - led->start_time.tv_nsec;
max_ns = led->wait_data_time_ns;
if (delta_time_ns <= max_ns) {
spin_unlock_irqrestore(&led->lock, flags);
return IRQ_HANDLED;
}
sunxi_ledc_reset(led);
if (delta_time_ns <= max_ns * 2) {
sunxi_ledc_dma_terminate(led);
sunxi_ledc_trans_data(led);
} else {
LED_ERR("wait time is more than %d ns,"
"going to reset ledc and drop this operation!\n",
max_ns);
led->result = RESULT_ERR;
wake_up(&led->wait);
led->length = 0;
}
goto out;
}
if (irq_status & LEDC_FIFO_OVERFLOW_INT) {
LED_ERR("there exists fifo overflow issue, irq_status=0x%x!\n",
irq_status);
sunxi_ledc_reset(led);
led->result = RESULT_ERR;
wake_up(&led->wait);
led->length = 0;
goto out;
}
out:
spin_unlock_irqrestore(&led->lock, flags);
return IRQ_HANDLED;
}
这个驱动里面带了个貌似用来测试led灯的代码
这个怎么在tina里面调用呀
static ssize_t led_show(struct class *class,
struct class_attribute *attr,
char *buf)
{
struct sunxi_led *led = sunxi_led_global;
sunxi_led_set_all(led, 0, 0);
sunxi_led_set_all(led, 1, 0);
sunxi_led_set_all(led, 2, 0);
sunxi_led_set_all(led, 0, 20);
msleep(500);
sunxi_led_set_all(led, 1, 20);
msleep(500);
sunxi_led_set_all(led, 2, 20);
msleep(500);
sunxi_led_set_all(led, 0, 0);
sunxi_led_set_all(led, 1, 0);
sunxi_led_set_all(led, 2, 0);
return 0;
}
static struct class_attribute led_class_attrs[] = {
__ATTR(light, 0644, led_show, NULL),
//__ATTR_NULL,
};
我在改那个tina的ledc驱动的时候想换中方式去发送数据
现在这个系统里面的ledc是一个个单独的brightness设置
就是用那个echo 去写单独的一个灯的 r g b ,这么搞一个灯就要写3次,每次写完以后都要单独发送,那么一个灯要发三次,80个灯要发240次,这么玩肯定不行
所以我是想改成先把数据准备好,然后再发送,那么80个灯只需要发送一次就行了
我测试了往最后那个灯发送数据去激活发送所有的灯,fps跑个100贞都是没什么问题的,那么现在就一个问题,如何把全部数据一次性高效的传输给驱动程序呢?
我想用那个linux的内存共享,用户端很简单啊,直接写内存里面
驱动去读也很快
但是这个tina里面的驱动程序貌似不能直接用
ftok()
shmget()
包括那个头文件也不太对
#include <linux/mman.h>
#include <linux/ipc.h>
#include <linux/shm.h>
这些文件都有,但是吧看起来内容不太对
drivers/leds/leds-sunxi.c: In function 'sunxi_set_led_brightness':
drivers/leds/leds-sunxi.c:1513:8: error: implicit declaration of function 'ftok' [-Werror=implicit-function-declaration]
key = ftok("/dev/shm/ledc_shm", 0);
^~~~
drivers/leds/leds-sunxi.c:1514:14: error: implicit declaration of function 'shmget' [-Werror=implicit-function-declaration]
shm_id = shmget(key, sizeof(share_data), IPC_CREAT | 0666);
^~~~~~
drivers/leds/leds-sunxi.c:1515:37: error: implicit declaration of function 'shmat' [-Werror=implicit-function-declaration]
share_data *shm = (share_data *)shmat(shm_id, NULL, 0);
^~~~~
drivers/leds/leds-sunxi.c:1515:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
share_data *shm = (share_data *)shmat(shm_id, NULL, 0);
^~~~~~~~~~
drivers/leds/leds-sunxi.c:1442:19: warning: unused variable 'SIZE' [-Wunused-variable]
反正一编译就出错啦
各位大佬还,这tina的驱动程序里面怎么去使用共享内存呀
如果没法用的话,有木有其他什么高效简单的方式,让用户app给驱动倒腾数据呀,谢谢啦
@awwwwa 终于破案了,那个dts里面ledc的配置有个数据被我改过 wait_data_time_ns 这玩意被我改得很小,我那会测试melis的时候32个灯数据,需要刷很快,所以这个数值就不能大,一旦了,数据就错,灯乱闪,我本以为这个数值不影响DMA,但是有影响
我改回到原来那个600000 就一切正常了,DMA能用了,如果这个数值设置太小就完蛋了,只要开启了DMA,系统就直接卡死!那个ledc的手册里面肯定没写全功能!
手册里面写了这么句
wait_data_time_ns:通过该节点可设置和读取 LEDC 内部 FIFO 等待数据的时间容忍度,
范围为 80ns-655us。
我改坏掉的
&ledc {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&ledc_pins_a>;
pinctrl-1 = <&ledc_pins_b>;
led_count = <58>;
output_mode = "GRB";
//trans_mode = "DMA";
dmas = <&dma 42>, <&dma 42>;
dma-names = "tx", "rx";
reset_ns = <84>;
t1h_ns = <800>;
t1l_ns = <320>;
t0h_ns = <300>;
t0l_ns = <800>;
wait_time0_ns = <84>;
wait_time1_ns = <84>;
wait_data_time_ns = <3000>;
status = "okay";
};
就是那个 wait_data_time_ns 这个数值在我测试melis的时候被我改过,我以为仅仅是fifo会影响到,但是DMA模式下应该这个参数也有影响
改回来
&ledc {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&ledc_pins_a>;
pinctrl-1 = <&ledc_pins_b>;
led_count = <58>;
output_mode = "GRB";
//trans_mode = "DMA";
dmas = <&dma 42>, <&dma 42>;
dma-names = "tx", "rx";
reset_ns = <84>;
t1h_ns = <800>;
t1l_ns = <320>;
t0h_ns = <300>;
t0l_ns = <800>;
wait_time0_ns = <84>;
wait_time1_ns = <84>;
wait_data_time_ns = <600000>;
status = "okay";
};
大佬还有个问题想请教下
就是在tina里面能不能一口气把所有的灯的数据都设置好
然后再发送啊?
如果是
echo 1 > /sys/class/leds/sunxi_led0b/brightness
这样每改一次就要发送一次,效率太低
要同时驱动很多灯的时候 FPS就上不去啦
这要怎么处理呀
@fanhuacloud 我这里rtl8821cs也是这样
那个wl_reg_on 强制给他上个高电平貌似会快一些,我这加载模块要10s,连网要20s。。。
问了别人也是这个样子,全志的d1s,t113加载rtl的模块都很慢
弄不好真是RV的bug我这是D1s上出现这种情况,我翻了一圈论坛里面貌似都是d1s 会出现这种情况,超过32个灯就出错了,那么这会是芯片的问题,还是代码的问题呢,如果是代码的问题还能搞搞好,如果是芯片的问题我就直接贴一片t113起来得了……
大佬我这三份文件都和你发的是一样的
我测试了半天那个echo只要改变超过32个灯就直接挂掉了
如果把判断条件直接改成DMA模式,一个灯都亮不了呀
之前在melis里面测试的时候DMA模式就一直没能成功运行
现在换tina了问题依旧
只有cpu模式下能跑不超过32个灯
[ 34.124663] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[ 34.134597] Oops [#1]
[ 34.137125] Modules linked in: xr829 sunxi_gpadc
[ 34.142277] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.4.61 #152
[ 34.149274] Workqueue: events set_brightness_delayed
[ 34.154805] sepc: ffffffe000321d74 ra : ffffffe000321f0c sp : ffffffe00386fcc0
[ 34.162844] gp : ffffffe00067eef8 tp : ffffffe00384ab00 t0 : 0000000000000080
[ 34.170884] t1 : 0000000043265443 t2 : 000000000000000a s0 : ffffffe00386fd50
[ 34.178923] s1 : ffffffe003265240 a0 : 0000000000000000 a1 : 0000000043265444
[ 34.186961] a2 : 0000000000000004 a3 : 0000000000000001 a4 : 0000000000000001
[ 34.195000] a5 : 0000000400000004 a6 : 00000000ffffffff a7 : 0000000000000004
[ 34.203039] s2 : ffffffe003a07410 s3 : 0000000000000004 s4 : 0000000000000001
[ 34.211079] s5 : ffffffe003ed9300 s6 : 0000000000000000 s7 : ffffffe00062ac70
[ 34.219118] s8 : 0000000000000001 s9 : 0000000000000402 s10: ffffffe00062ae28
[ 34.227157] s11: 0000000000000000 t3 : 0000000000000000 t4 : 0000000000000005
[ 34.235196] t5 : ffffffff80000000 t6 : 0000000000040000
[ 34.241106] sstatus: 0000000200000120 sbadaddr: 0000000000000000 scause: 000000000000000d
[ 34.250748] ---[ end trace b914e592328ab01f ]---
在leds-sunxi.c里面这块是选择发射方式的
如果小于32个灯那么就用fifo
超过32个的就用DMA
但是我在控制超过58个灯的过程中发现,这个驱动超过32个,系统就死机了
我一开始认为是我代码的问题
后来我改了这个驱动的条件直接全部用DMA模式发送
发现直接就死机了
如果修改了那个条件,把SUNXI_LEDC_FIFO_DEPTH加大到64也是不行的
if (led->length <= SUNXI_LEDC_FIFO_DEPTH) {
在超过32个灯的时候会报错
sunxi_ledc_irq_handler()1279 - there exists fifo overflow issue, irq_status=0x818010!
现在看来问题应该还是出在了这段DMA模式下控制ledc驱动器发送数据的代码上了,为啥会死机呢?
if (0) {
dprintk(DEBUG_INFO, "cpu xfer\n");
ktime_get_coarse_real_ts64(&(led->start_time));
sunxi_ledc_set_time(led);
sunxi_ledc_set_output_mode(led, led->output_mode.str);
sunxi_ledc_set_cpu_mode(led);
sunxi_ledc_set_length(led);
sunxi_ledc_enable_irq(LEDC_TRANS_FINISH_INT_EN | LEDC_WAITDATA_TIMEOUT_INT_EN
| LEDC_FIFO_OVERFLOW_INT_EN | LEDC_GLOBAL_INT_EN);
sunxi_ledc_enable(led);
for (i = 0; i < led->length; i++)
sunxi_set_reg(LEDC_DATA_REG_OFFSET, led->data[i]);
} else {
dprintk(DEBUG_INFO, "dma xfer\n");
size = led->length * 4;
led->src_dma = dma_map_single(dev, led->data,
size, DMA_TO_DEVICE);
dst_addr = led->res->start + LEDC_DATA_REG_OFFSET;
flags = DMA_PREP_INTERRUPT | DMA_CTRL_ACK;
slave_config.direction = DMA_MEM_TO_DEV;
slave_config.src_addr = led->src_dma;
slave_config.dst_addr = dst_addr;
slave_config.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
slave_config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
slave_config.src_maxburst = 4;
slave_config.dst_maxburst = 4;
err = dmaengine_slave_config(led->dma_chan, &slave_config);
if (err < 0) {
LED_ERR("dmaengine_slave_config failed!\n");
return;
}
dma_desc = dmaengine_prep_slave_single(led->dma_chan,
led->src_dma,
size,
DMA_MEM_TO_DEV,
flags);
if (!dma_desc) {
LED_ERR("dmaengine_prep_slave_single failed!\n");
return;
}
dma_desc->callback = sunxi_ledc_dma_callback;
dmaengine_submit(dma_desc);
dma_async_issue_pending(led->dma_chan);
ktime_get_coarse_real_ts64(&(led->start_time));
sunxi_ledc_set_time(led);
sunxi_ledc_set_output_mode(led, led->output_mode.str);
sunxi_ledc_set_dma_mode(led);
sunxi_ledc_set_length(led);
sunxi_ledc_enable_irq(LEDC_TRANS_FINISH_INT_EN | LEDC_WAITDATA_TIMEOUT_INT_EN
| LEDC_FIFO_OVERFLOW_INT_EN | LEDC_GLOBAL_INT_EN);
sunxi_ledc_enable(led);
}
哈咯各位大佬
那个ledc的驱动我换了之前论坛里面提供的更新了,刷上去了以后那个调试节点 没有trans_mode 选项
root@TinaLinux:/sys/kernel/debug# cd sunxi_leds/
root@TinaLinux:/sys/kernel/debug/sunxi_leds# ls
data output_mode t0h_ns t1h_ns wait_data_time_ns wait_time1_ns
hwversion reset_ns t0l_ns t1l_ns wait_time0_ns
root@TinaLinux:/sys/kernel/debug/sunxi_leds# cat wait_time
wait_time0_ns wait_time1_ns
root@TinaLinux:/sys/kernel/debug/sunxi_leds# cat wait_time0_ns
84
然后嘛我一共58个灯,这段程序只能点亮32个灯
void ledc_test(int brt)
{
char cmd[64] = {0};
int brit = 1;
brit = brt;
for(int i = 0; i < 58; i++) {
ledcolor_r[i] = brit;
ledcolor_g[i] = brit;
ledcolor_b[i] = brit;
}
for(int led_i = 0; led_i < 58; led_i++) {
sprintf(cmd, "echo %d > /sys/class/leds/sunxi_led%dr/brightness", ledcolor_r[led_i], led_i);
system(cmd);
usleep(100);
}
}
然后程序和系统就一起死掉了,只能用reset按钮重启
看上去和论坛里面大伙提到的超过32个灯会出问题一样
那么
现在两个问题
1 是在tina里面怎么同时驱动超过32个灯
2 是那个echo是改变了单个灯的数据,那么能不能一口气把58个数据都准备好,然后给DMA下指令发送呢,因为如果不这么做,效率低到可怕呀
开屏以后就放个图片有点low啊
能放个GIF之类的动画不,这样加载的时候也不寂寞
各位大佬,有啥解决方案不
最好能像苹果那样放个进度条,那样比较高级
我原先的那个项目编译好了不想去破坏它了,新项目换了个Wi-Fi模块,如何新建个项目啊编译个新的
有木有相关的教程啊
就是在source build/even.sh
然后lunch的时候搞个新板子出来,然后编译个新的工程出来,谢啦
哈咯各位大佬新年好呀
我想问一下谁有移植过LVGL9 的tina里面的那个display的驱动啊
那个lvgl9的FB驱动启动以后640X480的分辨率 D1S居然平均只有15贞,这咋用呢?
Name, Avg. CPU, Avg. FPS, Avg. time, render time, flush time
Empty screen, 67%, 21, 21, 11, 10
Moving wallpaper, 86%, 21, 38, 27, 11
Single rectangle, 19%, 29, 3, 2, 1
Multiple rectangles, 56%, 28, 19, 13, 6
Multiple RGB images, 85%, 18, 40, 33, 7
Multiple ARGB images, 90%, 17, 45, 38, 7
Rotated ARGB images, 95%, 5, 154, 142, 12
Multiple labels, 89%, 20, 38, 36, 2
Screen sized text, 92%, 13, 64, 53, 11
Multiple arcs, 89%, 19, 40, 29, 11
Containers, 91%, 14, 54, 48, 6
Containers with overlay, 95%, 7, 107, 99, 8
Containers with opa, 95%, 8, 105, 97, 8
Containers with opa_layer, 96%, 5, 163, 155, 8
Widgets demo, 97%, 4, 109, 100, 9
All scenes avg.,82%, 15, 65, 58, 7
同样melis的lvgl9平均能跑45贞以上,tina不至于这么点性能吧
我猜是那个FB驱动的问题,应该没能发挥出d1s的性能,于是就想去官方的lvgl里面去移植个试试,但是官方那个是lvgl8的,我弄进去看试了下,应该还是有些地方要改,不然没法用
哪位大佬有移植过这个display的驱动呀,给lvgl9用的,谢啦
原本为了布线方便把R0-R5和B0-B5位置交换了一下
原本以为在软件里面重新映射下位置就能搞定了
没想到软件根本没法改这些线的位置
无论是meils还是tina都没法交换这两组线的定义 config.dex
和uboot 那个dts我全改了一遍,只能关闭某个线的输出,并不能改变那个输出pin的定义,比如Red 0和Blue 0 交换一下,甚至改clk和hs交换一下那个屏幕也能输出,其实就是没改变
哈哈哈哈
这个D1S的pin,居然是没法修改输出定义的,哈哈哈哈
lcd_gpio_5 = port:PD00<2><0><default><default>
lcd_gpio_4 = port:PD01<2><0><default><default>
lcd_gpio_3 = port:PD02<2><0><default><default>
lcd_gpio_2 = port:PD03<2><0><default><default>
lcd_gpio_1 = port:PD04<2><0><default><default>
lcd_gpio_0 = port:PD05<2><0><default><default>
lcd_gpio_6 = port:PD06<2><0><default><default>
lcd_gpio_7 = port:PD07<2><0><default><default>
lcd_gpio_8 = port:PD08<2><0><default><default>
lcd_gpio_9 = port:PD09<2><0><default><default>
lcd_gpio_10 = port:PD10<2><0><default><default>
lcd_gpio_11 = port:PD11<2><0><default><default>
lcd_gpio_12 = port:PD12<2><0><default><default>
lcd_gpio_13 = port:PD13<2><0><default><default>
lcd_gpio_14 = port:PD14<2><0><default><default>
lcd_gpio_15 = port:PD15<2><0><default><default>
lcd_gpio_16 = port:PD16<2><0><default><default>
lcd_gpio_17 = port:PD17<2><0><default><default>
lcd_gpio_18 = port:PD18<2><0><default><default>
lcd_gpio_19 = port:PD19<2><0><default><default>
lcd_gpio_20 = port:PD20<2><0><default><default>
lcd_gpio_21 = port:PD21<2><0><default><default>
; PD22用于PWM,单独程序控制 PWM7
;lcd_gpio_22 = port:PD22<2><0><default><default>
lcd_gpio_23 = port:PD23<2><0><default><default>
lcdclk = port:PD20<2><0><3><default>
fsync = port:PD19<2><0><default><default>
lcdhs = port:PD18<2><0><default><default>
lcdvs = port:PD21<2><0><default><default>
我在tina的网卡驱动中看到了rtl8822cs这个芯片的驱动
这玩意性能足够好了,支持2.4G 5.8G的Wi-Fi
但是melis里面没有这个驱动
那么可以手动把tina里面那个8822的驱动移植过去吗?
看起来和xr829差不太多,都是SDIO接口的
tina能用的话melis应该也可以用吧?
@awwwwa 你这个版本是正确的
我这个是Melis4呀
github上面,还有gitee上面都有
具体位置在这
https://github.com/Tina-Linux/d1s-melis/blob/master/ekernel/drivers/hal/source/pwm/hal_pwm.c
这个是官方的吗?
有没有Melis3的官方稳定测试过的版本呀,在哪里可以下?
我要遇到同样BuG了好去找个对比的……
还有这个PWM的测试代码并不全,甚至驱动也是不全的,那个功能就写了一个生成PWM波的,没有中断的,也没有PWM对的,也没有PWM捕获,开发文档也没写清楚这些PWM输出引脚也是受限的,容易被其他功能干扰导致不输出
直接看用户手册直接操作寄存器,比较靠谱……
还有我顺带测试了一下那个Ledc驱动的输出,这玩意基本也是个废柴,输出不稳定,800K的周期,部分是800,部分是833,850,如果只驱动一两个应该没事,驱动数量上去了,就会有各种问题……什么头尾绿,颜色不对……那个参数不能乱改,应该调好的,调别的乱跳的时候就不能保证1和0的周期正确了
这段代码是PWM驱动里面的,这个disable没有用处,也就是PWM并不会停止
所以,这代码我猜应该是没测试过的
感觉这个Meils 4 开发的太快了都来不及测试就上线了
void hal_pwm_enable_controller(uint32_t channel_in)
{
unsigned long reg_addr = PWM_BASE + PWM_PER;
uint32_t reg_val;
reg_val = readl(reg_addr);
reg_val |= 1 << channel_in;
writel(reg_val, reg_addr);
}
/************ disable **************/
void hal_pwm_disable_controller(uint32_t channel_in)
{
unsigned long reg_val;
unsigned long reg_addr = PWM_BASE + PWM_PER;
reg_val = readl(reg_addr);
reg_val |= 1 << channel_in;
//reg_val = Ox00;
writel(reg_val, reg_addr);
}
PER那个使能寄存器是这么描述的
Offset:0x0080 Register Name: PER
Bit Read/Write Default/Hex Description
31:8 / / /
7 R/W 0x0
PWM7_EN
When PWM is enabled, the 16-bit up-counter starts working and
PWM channel7 is permitted to output PWM waveform.
0: PWM disable
1: PWM enable
看了一下文档,这个里面的这些功能,那个Test并没有全部展示
我想问一下这个里面的第6个功能
支持 PWM 输出和捕捉输入产生中断
这个PWM输出,怎么顺便产生中断呀?
2)支持脉冲(脉冲个数可配)、周期和互补对输出;
(
3)支持捕捉输入;
(
4)带可编程死区发生器,死区时间可控;
(
5)0-24M/100M 输出频率范围、0%-100% 占空比可调、最小分辨率 1/65536;
(
6)支持 PWM 输出和捕捉输入产生中断;
(
7)支持 PWM 组模式,分为 4 组,同组内各个通道起始相位可配置。
各位全志的大佬
就像那个stm的hal定时器一样
在PWM波的上升沿,或者下降沿触发
melis里面定时器我就找到个按时间触发的
那么怎么搞个定时器能按PWM的信号触发呀
我最近想要给D1s扩展出多条WS2812的总线,想用PWM
的方式去输出数据,ledc 貌似只有一条总线,那么是不够用的呀
我想用PWM+DMA去控制ws2812的灯
先讲为什么,这个芯片貌似只有一个LEDC的输出总线,也就是只有一条ws2812的灯串,但是我需要3条,那么PWM输出脚就很多,所以想拿来用一下顺便学一下那个DMA怎么用
感觉加个定时器应该不难
PWM控制用的是下面这个库
hal_pwm.c
我看了一圈有个hal_pwm_control
这个是可以去控制PWM的,也测试成功了
但是想要控制WS2812,这种灯需要直接把PWM的占空比当作01010101这种数据去输出
我的想法是弄个定时器,周期就是800K的时钟周期(按ws2812需要的设置),每一个callback去设置一次占空比,直接用DMA从内存往占空比的那个寄存器写数据,这么搞应该可以吧
无奈这个库里面貌似没有直接改占空比的操作的函数,然后我就想从那个hal_pwm_control,里面扒出来,无奈的是没怎么看明白是怎么操作那个PWM寄存器的
所以想请教一下各位大佬怎么直接改寄存器,配置PWM占空比啊?
我用的是Meils,谢谢啦
/* Copyright (c) 2019-2025 Allwinner Technology Co., Ltd. ALL rights reserved.
* Allwinner is a trademark of Allwinner Technology Co.,Ltd., registered in
* the the People's Republic of China and other countries.
* All Allwinner Technology Co.,Ltd. trademarks are used with permission.
* DISCLAIMER
* THIRD PARTY LICENCES MAY BE REQUIRED TO IMPLEMENT THE SOLUTION/PRODUCT.
* IF YOU NEED TO INTEGRATE THIRD PARTY’S TECHNOLOGY (SONY, DTS, DOLBY, AVS OR MPEGLA, ETC.)
* IN ALLWINNERS’SDK OR PRODUCTS, YOU SHALL BE SOLELY RESPONSIBLE TO OBTAIN
* ALL APPROPRIATELY REQUIRED THIRD PARTY LICENCES.
* ALLWINNER SHALL HAVE NO WARRANTY, INDEMNITY OR OTHER OBLIGATIONS WITH RESPECT TO MATTERS
* COVERED UNDER ANY REQUIRED THIRD PARTY LICENSE.
* YOU ARE SOLELY RESPONSIBLE FOR YOUR USAGE OF THIRD PARTY’S TECHNOLOGY.
* THIS SOFTWARE IS PROVIDED BY ALLWINNER"AS IS" AND TO THE MAXIMUM EXTENT
* PERMITTED BY LAW, ALLWINNER EXPRESSLY DISCLAIMS ALL WARRANTIES OF ANY KIND,
* WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION REGARDING
* THE TITLE, NON-INFRINGEMENT, ACCURACY, CONDITION, COMPLETENESS, PERFORMANCE
* OR MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* IN NO EVENT SHALL ALLWINNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS, OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* ===========================================================================================
*
* Filename: hal_pwm.c
*
* Description: pwm driver core hal,be used by drv_pwm.c
*
* Version: Melis3.0
* Create: 2019-12-23
* Revision: none
* Compiler: GCC:version 9.2.1 20170904 (release),ARM/embedded-7-branch revision 255204
*
* Author: liuyus@allwinnertech.com
* Organization: SWC-BPD
* Last Modified: 2019-12-31 17:55
*
* ===========================================================================================
*/
#include <hal_log.h>
#include <stdio.h>
#include <stdint.h>
#include <hal_clk.h>
#include <hal_reset.h>
#include <sunxi_hal_common.h>
#include <sunxi_hal_pwm.h>
#ifdef CONFIG_DRIVER_SYSCONFIG
#include <hal_cfg.h>
#include <script.h>
#endif
#ifdef CONFIG_STANDBY
#include <standby/standby.h>
#endif
#ifdef CONFIG_COMPONENTS_PM
#include <pm_devops.h>
#endif
hal_pwm_t sunxi_pwm;
static int pwm_init = 0;
#define SET_REG_VAL(reg_val, shift, width, set_val) ((reg_val & ~((-1UL) >> (32 - width) << shift)) | (set_val << shift))
#define pwm_do_div(n,base) ({ \
u32 __base = (base); \
u32 __rem; \
__rem = ((u64)(n)) % __base; \
(n) = ((u64)(n)) / __base; \
if (__rem > __base / 2) \
++(n); \
__rem; \
})
/************** config *************************/
/*
* pwm_set_clk_src(): pwm clock source selection
*
* @channel_in: pwm channel number
* pwm01 pwm23 pwm45 pwm67 pwm89
*
* @clk_src: The clock you want to set
* 0:OSC24M 1:APB1
*/
void hal_pwm_clk_src_set(uint32_t channel_in, hal_pwm_clk_src clk_src)
{
unsigned long reg_addr = PWM_BASE + PWM_PCCR_BASE;
uint32_t reg_val;
uint32_t channel = channel_in / 2;
reg_addr += 4 * channel;
/*set clock source OSC24M or apb1*/
reg_val = hal_readl(reg_addr);
reg_val = SET_REG_VAL(reg_val, PWM_CLK_SRC_SHIFT, PWM_CLK_SRC_WIDTH, clk_src);
hal_writel(reg_val, reg_addr);
}
/*
* pwm_clk_div_m(): pwm clock divide
*
* @div_m: 1 2 4 8 16 32 64 128 256
*/
void hal_pwm_clk_div_m(uint32_t channel_in, uint32_t div_m)
{
unsigned long reg_addr = PWM_BASE + PWM_PCCR_BASE;
uint32_t reg_val;
uint32_t channel = channel_in / 2;
reg_addr += 4 * channel;
/*set clock div_m*/
reg_val = hal_readl(reg_addr);
reg_val = SET_REG_VAL(reg_val, PWM_DIV_M_SHIFT, PWM_DIV_M_WIDTH, div_m);
hal_writel(reg_val, reg_addr);
}
void hal_pwm_prescal_set(uint32_t channel_in, uint32_t prescal)
{
unsigned long reg_addr = PWM_BASE + PWM_PCR;
uint32_t reg_val;
uint32_t channel = channel_in;
reg_addr += 0x20 * channel;
/*set prescal*/
reg_val = hal_readl(reg_addr);
reg_val = SET_REG_VAL(reg_val, PWM_PRESCAL_SHIFT, PWM_PRESCAL_WIDTH, prescal);
hal_writel(reg_val, reg_addr);
}
/* active cycles */
void hal_pwm_set_active_cycles(uint32_t channel_in, uint32_t active_cycles) //64
{
unsigned long reg_addr = PWM_BASE + PWM_PPR ;
uint32_t reg_val;
uint32_t channel = channel_in;
reg_addr += 0x20 * channel;
/*set active*/
reg_val = hal_readl(reg_addr);
reg_val = SET_REG_VAL(reg_val, PWM_ACTIVE_CYCLES_SHIFT, PWM_ACTIVE_CYCLES_WIDTH, active_cycles);
hal_writel(reg_val, reg_addr);
}
/* entire cycles */
void hal_pwm_set_period_cycles(uint32_t channel_in, uint32_t period_cycles)
{
unsigned long reg_addr = PWM_BASE + PWM_PPR ;
uint32_t reg_val;
uint32_t channel = channel_in;
reg_addr += 0x20 * channel;
/*set clock BYPASS*/
reg_val = hal_readl(reg_addr);
reg_val = SET_REG_VAL(reg_val, PWM_PERIOD_SHIFT, PWM_PERIOD_WIDTH, period_cycles);
hal_writel(reg_val, reg_addr);
}
static uint32_t get_pccr_reg_offset(uint32_t channel)
{
uint32_t val;
switch (channel)
{
case 0:
case 1:
return PWM_PCCR01;
break;
case 2:
case 3:
return PWM_PCCR23;
break;
case 4:
case 5:
return PWM_PCCR45;
break;
case 6:
case 7:
return PWM_PCCR67;
break;
#ifndef CONFIG_ARCH_SUN20IW2
case 8:
case 9:
return PWM_PCCR8;
break;
#endif
default :
PWM_ERR("channel is error \n");
return PWM_PCCR01;
break;
}
}
/************ enable **************/
void hal_pwm_enable_clk_gating(uint32_t channel_in)
{
unsigned long reg_addr = PWM_BASE + PWM_PCGR;
uint32_t reg_val;
uint32_t channel = channel_in / 2;
/*enable clk_gating*/
reg_addr += 4 * channel;
reg_val = hal_readl(reg_addr);
reg_val = SET_REG_VAL(reg_val, PWM_CLK_GATING_SHIFT, PWM_CLK_GATING_WIDTH, 1);
hal_writel(reg_val, reg_addr);
}
void hal_pwm_enable_controller(uint32_t channel_in)
{
unsigned long reg_addr = PWM_BASE + PWM_PER;
uint32_t reg_val;
reg_val = readl(reg_addr);
reg_val |= 1 << channel_in;
writel(reg_val, reg_addr);
}
/************ disable **************/
void hal_pwm_disable_controller(uint32_t channel_in)
{
unsigned long reg_val;
unsigned long reg_addr = PWM_BASE + PWM_PER;
reg_val = readl(reg_addr);
reg_val |= 1 << channel_in;
writel(reg_val, reg_addr);
}
/*************** polarity *****************/
void hal_pwm_porality(uint32_t channel_in, hal_pwm_polarity polarity)
{
uint32_t reg_val;
unsigned long reg_addr = PWM_BASE + PWM_PCR;
uint32_t channel = channel_in;
reg_addr += 0x20 * channel;
/*set polarity*/
reg_val = hal_readl(reg_addr);
reg_val = SET_REG_VAL(reg_val, PWM_ACT_STA_SHIFT, PWM_ACT_STA_WIDTH, polarity);
hal_writel(reg_val, reg_addr);
}
static int hal_pwm_pinctrl_init(hal_pwm_t sunxi_pwm, int channel)
{
#ifdef CONFIG_DRIVER_SYSCONFIG
user_gpio_set_t gpio_cfg = {0};
char pwm_name[16];
int count, ret;
sprintf(pwm_name, "pwm%d", channel);
count = Hal_Cfg_GetGPIOSecKeyCount(pwm_name);
if (!count)
{
PWM_ERR("[pwm%d] not support in sys_config\n", channel);
return -1;
}
Hal_Cfg_GetGPIOSecData(pwm_name, &gpio_cfg, count);
sunxi_pwm.pin[channel] = (gpio_cfg.port - 1) * 32 + gpio_cfg.port_num;
sunxi_pwm.enable_muxsel[channel] = gpio_cfg.mul_sel;
ret = hal_gpio_pinmux_set_function(sunxi_pwm.pin[channel], sunxi_pwm.enable_muxsel[channel]);
if (ret)
{
PWM_ERR("[pwm%d] PIN%u set function failed! return %d\n", channel, sunxi_pwm.pin[channel], ret);
return -1;
}
ret = hal_gpio_set_driving_level(sunxi_pwm.pin[channel], gpio_cfg.drv_level);
if (ret)
{
PWM_ERR("[pwm%d] PIN%u set driving level failed! return %d\n", channel, gpio_cfg.drv_level, ret);
return -1;
}
if (gpio_cfg.pull)
{
return hal_gpio_set_pull(sunxi_pwm.pin[channel], gpio_cfg.pull);
}
sunxi_pwm.pin_state[channel] = true;
return 0;
#else
PWM_ERR("[pwm%d] not support in sys_config\n", channel);
return -1;
#endif
}
static int hal_pwm_pinctrl_exit(hal_pwm_t sunxi_pwm, uint32_t channel)
{
if (sunxi_pwm.pin[channel]) //sys_config
{
return hal_gpio_pinmux_set_function(sunxi_pwm.pin[channel], 0); //gpio_in
}
else
{
return hal_gpio_pinmux_set_function(pwm_gpio[channel].pwm_pin, 0);
}
}
#ifdef CONFIG_STANDBY
int hal_pwm_resume(void *dev)
{
if (hal_reset_control_assert(sunxi_pwm.pwm_reset))
{
return -1;
}
if (hal_reset_control_deassert(sunxi_pwm.pwm_reset))
{
return -1;
}
if (hal_clock_enable(sunxi_pwm.pwm_bus_clk))
{
return -1;
}
PWM_INFO("hal pwm resume");
return 0;
}
int hal_pwm_suspend(void *dev)
{
if (hal_reset_control_assert(sunxi_pwm.pwm_reset))
{
return -1;
}
if (hal_clock_disable(sunxi_pwm.pwm_bus_clk))
{
return -1;
}
PWM_INFO("hal pwm suspend");
return 0;
}
#endif
#ifdef CONFIG_COMPONENTS_PM
static inline void sunxi_pwm_save_regs(hal_pwm_t *pwm)
{
int i;
for (i = 0; i < ARRAY_SIZE(hal_pwm_regs_offset); i++)
pwm->regs_backup[i] = readl(PWM_BASE + hal_pwm_regs_offset[i]);
}
static inline void sunxi_pwm_restore_regs(hal_pwm_t *pwm)
{
int i;
for (i = 0; i < ARRAY_SIZE(hal_pwm_regs_offset); i++)
writel(pwm->regs_backup[i], PWM_BASE + hal_pwm_regs_offset[i]);
}
static int sunxi_pwm_resume(struct pm_device *dev, suspend_mode_t mode)
{
hal_pwm_t *pwm = &sunxi_pwm;
int i, err;
hal_reset_control_reset(sunxi_pwm.pwm_reset);
hal_clock_enable(sunxi_pwm.pwm_bus_clk);
for (i = 0; i < PWM_NUM; i++)
{
if (sunxi_pwm.pin_state[i])
{
PWM_INFO("the pwm%d is resume\n", i);
sunxi_pwm.pin_state[i] = false;
err = hal_pwm_pinctrl_init(sunxi_pwm, i);
if (err)
{
err = hal_gpio_pinmux_set_function(pwm_gpio[i].pwm_pin, pwm_gpio[i].pwm_function);
if (err)
{
PWM_ERR("pinmux set failed\n");
return -1;
}
sunxi_pwm.pin_state[i] = true;
}
}
}
sunxi_pwm_restore_regs(pwm);
PWM_INFO("hal pwm resume\n");
return 0;
}
static int sunxi_pwm_suspend(struct pm_device *dev, suspend_mode_t mode)
{
hal_pwm_t *pwm = &sunxi_pwm;
int i;
sunxi_pwm_save_regs(pwm);
for (i = 0; i < PWM_NUM; i++)
hal_pwm_pinctrl_exit(sunxi_pwm, i);
hal_clock_disable(sunxi_pwm.pwm_bus_clk);
hal_reset_control_assert(sunxi_pwm.pwm_reset);
PWM_INFO("hal pwm suspend\n");
return 0;
}
struct pm_devops pm_pwm_ops = {
.suspend = sunxi_pwm_suspend,
.resume = sunxi_pwm_resume,
};
struct pm_device pm_pwm = {
.name = "sunxi_pwm",
.ops = &pm_pwm_ops,
};
#endif
pwm_status_t hal_pwm_init(void)
{
int i;
PWM_INFO("pwm init start");
if (pwm_init)
{
pwm_init++;
return 0;
}
sunxi_pwm.pwm_clk_type = SUNXI_PWM_CLK_TYPE;
sunxi_pwm.pwm_bus_clk_id = SUNXI_PWM_CLK_ID;
sunxi_pwm.pwm_reset_type = SUNXI_PWM_RESET_TYPE;
sunxi_pwm.pwm_reset_id = SUNXI_PWM_RESET_ID;
for (i = 0; i < PWM_NUM; i++)
sunxi_pwm.pin_state[i] = false;
if (!sunxi_pwm.pwm_reset)
sunxi_pwm.pwm_reset = hal_reset_control_get(sunxi_pwm.pwm_reset_type, sunxi_pwm.pwm_reset_id);
hal_reset_control_reset(sunxi_pwm.pwm_reset);
if (!sunxi_pwm.pwm_bus_clk)
sunxi_pwm.pwm_bus_clk = hal_clock_get(sunxi_pwm.pwm_clk_type, sunxi_pwm.pwm_bus_clk_id);
if (hal_clock_enable(sunxi_pwm.pwm_bus_clk))
{
return -1;
}
#ifdef CONFIG_STANDBY
register_pm_dev_notify(hal_pwm_suspend, hal_pwm_resume, NULL);
#endif
#ifdef CONFIG_COMPONENTS_PM
pm_devops_register(&pm_pwm);
#endif
PWM_INFO("pwm init end ");
pwm_init++;
return 0;
}
pwm_status_t hal_pwm_deinit(void)
{
int i;
if (pwm_init)
{
pwm_init--;
if (!pwm_init)
{
#ifdef CONFIG_COMPONENTS_PM
pm_devops_unregister(&pm_pwm);
#endif
for (i = 0; i < PWM_NUM; i++)
{
hal_pwm_pinctrl_exit(sunxi_pwm, i);
sunxi_pwm.pin_state[i] = false;
}
hal_reset_control_assert(sunxi_pwm.pwm_reset);
hal_reset_control_put(sunxi_pwm.pwm_reset);
hal_clock_disable(sunxi_pwm.pwm_bus_clk);
hal_clock_put(sunxi_pwm.pwm_bus_clk);
}
}
PWM_INFO("pwm deinit end");
return 0;
}
pwm_status_t hal_pwm_control(int channel, struct pwm_config *config_pwm)
{
PWM_INFO("pwm control start");
unsigned int temp;
unsigned long long c = 0;
unsigned long entire_cycles = 256, active_cycles = 192;
unsigned int reg_offset, reg_shift, reg_width;
unsigned int reg_bypass_shift;
unsigned int reg_clk_src_shift, reg_clk_src_width;
unsigned int reg_div_m_shift, reg_div_m_width, value;
int32_t clk_osc24m;
char pwm_name[16];
int err;
PWM_INFO("period_ns = %ld", config_pwm->period_ns);
PWM_INFO("duty_ns = %ld", config_pwm->duty_ns);
PWM_INFO("polarity = %d", config_pwm->polarity);
PWM_INFO("channel = %d", channel);
if ((config_pwm->period_ns < config_pwm->duty_ns) || (!config_pwm->period_ns))
{
PWM_ERR("paremeter error : period_ns can't greater than duty_ns and period_ns can't be 0");
return -1;
}
/* pwm set port */
err = hal_pwm_pinctrl_init(sunxi_pwm, channel);
if (err)
{
err = hal_gpio_pinmux_set_function(pwm_gpio[channel].pwm_pin, pwm_gpio[channel].pwm_function);
if (err)
{
PWM_ERR("pinmux set failed\n");
return -1;
}
sunxi_pwm.pin_state[channel] = true;
}
/* pwm enable controller */
hal_pwm_enable_controller(channel);
/* pwm set polarity */
hal_pwm_porality(channel, config_pwm->polarity);
/* pwm config function */
uint32_t pre_scal_id = 0, div_m = 0, prescale = 0;
uint32_t pre_scal[][2] =
{
/* reg_val clk_pre_div */
{0, 1},
{1, 2},
{2, 4},
{3, 8},
{4, 16},
{5, 32},
{6, 64},
{7, 128},
{8, 256},
};
reg_clk_src_shift = PWM_CLK_SRC_SHIFT;
reg_clk_src_width = PWM_CLK_SRC_WIDTH;
reg_offset = get_pccr_reg_offset(channel);
sprintf(pwm_name, "pwm%d", channel);
#ifdef CONFIG_DRIVER_SYSCONFIG
err = Hal_Cfg_GetKeyValue(pwm_name, "clk_osc24m", &clk_osc24m, 1);
if (err) {
clk_osc24m = 0;
//PWM_ERR("[pwm%d] clk_osc24m not support in sys_config\n", channel); //leo关掉,这个没啥用
}
#else
clk_osc24m = 0;
#endif
if (clk_osc24m) {
/* if need freq 24M, then direct output 24M clock,set clk_bypass. */
reg_bypass_shift = channel;
reg_offset = get_pccr_reg_offset(channel);
temp = hal_readl(PWM_BASE + PWM_PCGR);
temp = SET_BITS(reg_bypass_shift, 1, temp, 1); /* clk_gating set */
temp = SET_BITS(reg_bypass_shift + 16, 1, temp, 1); /* clk_bypass set */
hal_writel(temp, PWM_BASE + PWM_PCGR);
/* clk_src_reg */
temp = hal_readl(PWM_BASE + reg_offset);
temp = SET_BITS(reg_clk_src_shift, reg_clk_src_width, temp, 0); /* select clock source */
hal_writel(temp, PWM_BASE + reg_offset);
return 0;
}
if (config_pwm->period_ns > 0 && config_pwm->period_ns <= 10)
{
#if defined(CONFIG_ARCH_SUN20IW2)
/* if freq lt 96M, then direct output 96M clock,set by pass. */
c = 96000000;
#else
/* if freq lt 100M, then direct output 100M clock,set by pass. */
c = 100000000;
#endif /* CONFIG_ARCH_SUN20IW2 */
reg_bypass_shift = channel;
reg_offset = get_pccr_reg_offset(channel);
temp = hal_readl(PWM_BASE + PWM_PCGR);
temp = SET_BITS(reg_bypass_shift, 1, temp, 1); /* clk_gating set */
temp = SET_BITS(reg_bypass_shift + 16, 1, temp, 1); /* clk_bypass set */
hal_writel(temp, PWM_BASE + PWM_PCGR);
/* clk_src_reg */
temp = hal_readl(PWM_BASE + reg_offset);
temp = SET_BITS(reg_clk_src_shift, reg_clk_src_width, temp, 1); /* select clock source */
hal_writel(temp, PWM_BASE + reg_offset);
return 0;
}
else if (config_pwm->period_ns > 10 && config_pwm->period_ns <= 334)
{
#if defined(CONFIG_ARCH_SUN20IW2)
/* if freq between 3M~100M, then select 96M as clock */
c = 96000000;
#else
/* if freq between 3M~100M, then select 100M as clock */
c = 100000000;
#endif /* CONFIG_ARCH_SUN20IW2 */
/* clk_src_reg : use APB1 clock */
temp = hal_readl(PWM_BASE + reg_offset);
temp = SET_BITS(reg_clk_src_shift, reg_clk_src_width, temp, 1);
hal_writel(temp, PWM_BASE + reg_offset);
}
else if (config_pwm->period_ns > 334)
{
#if defined(CONFIG_ARCH_SUN20IW2)
/* if freq < 3M, then select 40M clock */
c = 40000000;
#else
/* if freq < 3M, then select 24M clock */
c = 24000000;
#endif /* CONFIG_ARCH_SUN20IW2 */
/* clk_src_reg : use OSC24M clock */
temp = hal_readl(PWM_BASE + reg_offset);
temp = SET_BITS(reg_clk_src_shift, reg_clk_src_width, temp, 0);
hal_writel(temp, PWM_BASE + reg_offset);
}
c = c * config_pwm->period_ns;
pwm_do_div(c, 1000000000);
entire_cycles = (unsigned long)c;
for (pre_scal_id = 0; pre_scal_id < 9; pre_scal_id++)
{
if (entire_cycles <= 65536)
{
break;
}
for (prescale = 0; prescale < PRESCALE_MAX + 1; prescale++)
{
entire_cycles = ((unsigned long)c / pre_scal[pre_scal_id][1]) / (prescale + 1);
if (entire_cycles <= 65536)
{
div_m = pre_scal[pre_scal_id][0];
break;
}
}
}
c = (unsigned long long)entire_cycles * config_pwm->duty_ns;
pwm_do_div(c, config_pwm->period_ns);
active_cycles = c;
if (entire_cycles == 0)
{
entire_cycles++;
}
/* config clk div_m */
reg_div_m_shift = PWM_DIV_M_SHIFT;
reg_div_m_width = PWM_DIV_M_WIDTH;
temp = hal_readl(PWM_BASE + reg_offset);
temp = SET_BITS(reg_div_m_shift, reg_div_m_width, temp, div_m);
hal_writel(temp, PWM_BASE + reg_offset);
/* config gating */
#ifdef CONFIG_ARCH_SUN8IW18P1
reg_shift = PWM_CLK_GATING_SHIFT;
value = hal_readl(PWM_BASE + reg_offset);
value = SET_BITS(reg_shift, 1, value, 1); /* set gating */
hal_writel(value, PWM_BASE + reg_offset);
#else
reg_shift = channel;
value = hal_readl(PWM_BASE + PWM_PCGR);
value = SET_BITS(reg_shift, 1, value, 1); /* set gating */
hal_writel(value, PWM_BASE + PWM_PCGR);
#endif
/* config prescal */
reg_offset = PWM_PCR + 0x20 * channel;
reg_shift = PWM_PRESCAL_SHIFT;
reg_width = PWM_PRESCAL_WIDTH;
temp = hal_readl(PWM_BASE + reg_offset);
temp = SET_BITS(reg_shift, reg_width, temp, prescale);
hal_writel(temp, PWM_BASE + reg_offset);
/* config active cycles */
reg_offset = PWM_PPR + 0x20 * channel;
reg_shift = PWM_ACT_CYCLES_SHIFT;
reg_width = PWM_ACT_CYCLES_WIDTH;
temp = hal_readl(PWM_BASE + reg_offset);
temp = SET_BITS(reg_shift, reg_width, temp, active_cycles);
hal_writel(temp, PWM_BASE + reg_offset);
/* config period cycles */
reg_offset = PWM_PPR + 0x20 * channel;
reg_shift = PWM_PERIOD_CYCLES_SHIFT;
reg_width = PWM_PERIOD_CYCLES_WIDTH;
temp = hal_readl(PWM_BASE + reg_offset);
temp = SET_BITS(reg_shift, reg_width, temp, (entire_cycles - 1));
hal_writel(temp, PWM_BASE + reg_offset);
PWM_INFO("pwm control end ");
return 0;
}
//leo add
//直接改变占空比
void set_pwm_duty(uint32_t duty_ns)
{
// c = (unsigned long long)entire_cycles * config_pwm->duty_ns;
// pwm_do_div(c, config_pwm->period_ns);
// active_cycles = c;
}
上次那个Wi-Fi其实也没调完整,在每次启动的时候都会加载个config文件,如果没有就创建一个,但是我看了一下,每一次都没能创建成功
然后我自己写了一段写文件的代码也一样不成功
fopen 返回值是-1
然后也是一样没法写入,用df查看磁盘空间显示0
那么这个
这个UDISK不是用户自定义分区嘛,怎么让他变得可读写啊
还是文件系统的格式不太对,得改这个分区的格式啊?
[partition]
name = UDISK
;size = flash size - (boot0 + mbr) size - env - env-redund - ROOTFS
;8(or 16) * 1024 * 2 - 64 * 2 - 5632 - 8 - 8 - 10240
size = 10032
;downloadfile = "data_udisk.fex"
user_type = 0x8000
系统的这三个选项具体都有啥区别啊
Rootfs Filesystem Type (Allwinner Minfs Filesystem) --->
ARM Littlefs Filesystem
Allwinner Minfs Filesystem
Fat Filesystem
我选中间那个Minfs Filesystem pack才能打包成功,但是系统没法写入了nor Flash还有很大空间,但是df出来,磁盘空间是0,这怎么往nor flash里面读写文件啊
选上面那个ARM的,直接打包不了,提示太大了,16M的打包不了
选FAT那个也是,打包不了报错。。。
如果想要使用nor flash 做可读写磁盘的话怎么配置啊?
[mbr] size = 16 [partition_start] [partition] name = bootA size = 4096 downloadfile = "melis_pkg_nor.fex" user_type = 0x8000 [partition] name = ROOTFS size = 12032 downloadfile = "data_udisk.fex" user_type = 0x8000 [partition] name = UDISK size = 10032 user_type = 0x8000
*******
=bootA:2048:"melis_pkg_nor.fex"=
*******
*******
=ROOTFS:6016:"data_udisk.fex"=
*******
data_udisk.fex
try to create image: ROOTFS to data_udisk.fex with size 6160384
*******
=UDISK:8256:"None"=
*******
melis_d1s-nezha_uart0_16Mnor.img
INFO: running the function do_finish "sys_partition_nor.bin"
partitation file Path=/home/leo/miles-d1s/miles/d1s-melis-master/out/d1s-nezha/image/sys_partition_nor.bin
mbr_name file Path=/home/leo/miles-d1s/miles/d1s-melis-master/out/d1s-nezha/image/sunxi_mbr_nor.fex
download_name file Path=/home/leo/miles-d1s/miles/d1s-melis-master/out/d1s-nezha/image/dlinfo.fex
ERROR: unable to open file data_udisk.fex
ERROR: update mbr file fail
ERROR: update_mbr failed
这里面不同的指令输出的RSSI都不太一样是为啥啊?
msh />wifi -s
wifi -s
0 bssid: 78:D2:94:B6:8E:16 ssid:leo ch: 4 rssi: -29 key_mgmt: 3
1 bssid: 74:D0:2B:7F:1C:BD ssid:leo ch: 4 rssi: -43 key_mgmt: 3
2 bssid: 7C:94:2A:4E:E1:80 ssid:Yaru ch: 1 rssi: -62 key_mgmt: 3
3 bssid: 62:EA:8D:F5:23:28 ssid:Taobao ch: 11 rssi: -59 key_mgmt: 3
4 bssid: 2A:E5:B0:1B:AC:C0 ssid:ChinaNet-EpXw ch: 1 rssi: -62 key_mgmt: 3
5 bssid: F4:6A:92:C1:19:38 ssid:zhang789 ch: 1 rssi: -62 key_mgmt: 3
6 bssid: C8:BF:4C:ED:70:D3 ssid:SJC24_2.4G ch: 1 rssi: -72 key_mgmt: 3
msh />xradio wlan get_cur_signal
xradio wlan get_cur_signal
[cmd] net cmd: wlan get_cur_signal
current rssi:120, noise:-89
msh />
@nideyida 主要是用的人太少了,现在虽然价格便宜性能好,但是要想全用起来要掉层皮的……好难啊,这芯片有ledc控制器,但是没有一个好用的上层驱动库,不像esp32 的Arduino框架下那个fastled那么好用,要是能移植一个进来就好了
如题
D1S上面有3个LEDC控制器的输出针 PE5 PF2 PG13
但是我看了一圈ledc那个hal库hal_ledc.c
看起来只能输出一条LED灯的控制总线
这个是那个配置文件里面的内容
LEDC_PIN 就是输出脚
LEDC_PINMUXSEL 就是功能选择
然后这个 LEDC_BASE 只有一个
是不是只能就输出一条WS2812总线的灯啊?
#ifndef __LEDC_SUN8IW20_H__
#define __LEDC_SUN8IW20_H__
#define LEDC_BASE 0x02008000
#define SUNXI_GIC_START 16
#define SUNXI_IRQ_LEDC (52 - SUNXI_GIC_START)
//#define LEDC_PIN GPIOG(16)
#define LEDC_PIN GPIOF(2)
//#define LEDC_PINMUXSEL 7
#define LEDC_PINMUXSEL 5
#endif /*__LEDC_SUN8IW20_H__ */
那么如果想要控制多条LED灯总线,应该怎么办呀?
有木有大佬有PWM的输出实例呀,我看了一下PWM的出口很多啊,如果用PWM+定时器+DMA输出的话,就可以做到更多条的LED灯总线了,但是这里面有个关键函数,不知道该怎么写呀
这个里面的 HAL_TIM_PWM_Start_DMA
这个怎么在Melis系统里面实现啊 谢啦各位大佬
我在PACK的时候发现那个img默认是8M的nor,但是吧我板子上面是16M的
因为之前搞wifi要直接塞点文件进去,大包的时候就出错了,说是超过img的大小
然后我才发现一直是8M的,那么怎么修改配置文件,让这个8M变成16M呀
@spr2023 那个melis4 里面有很多个SDIO,SD卡默认是0号,然后wifi是1号,所以不冲突都可以用,只不过想要用这玩意的难度和重新移植一遍没有区别。。。。
我发现在那个sys_nor_config.fex 文件里面的Wi-Fi就没配置SDIO,但是也没看到xr829的配置参数,那么这要怎么配置呀大佬,求助呀
[wifi_para]
wifi_used = 1
wifi_sdc_id = 1
wifi_usbc_id = 1
wifi_usbc_type = 1
wifi_mod_sel = 3
wifi_power = "axp22_aldo1"
; 1 - bcm40181 sdio wifi gpio config
;bcm40181_vdd_en = port:PG18<1><default><default><0>
;bcm40181_vcc_en = port:PG18<1><default><default><0>
;bcm40181_shdn = port:PG10<1><default><default><0>
;bcm40181_host_wake = port:PG12<0><default><default><0>
; 2 - bcm40183 sdio wifi gpio config
;bcm40183_vdd_en = port:PG18<1><default><default><0>
;bcm40183_vcc_en = port:PG18<1><default><default><0>
;bcm40183_wl_regon = port:PG10<1><default><default><0>
;bcm40183_wl_host_wake = port:PG12<0><default><default><0>
;bcm40183_bt_rst = port:PG11<1><default><default><0>
;bcm40183_bt_regon = port:PG11<1><default><default><0>
;bcm40183_bt_wake = port:XXX<1><default><default><0>
;bcm40183_bt_host_wake = port:XXX<0><default><default><0>
; 3 - rtl8723as sdio wifi + bt gpio config
;rtk_rtl8723as_wl_dis = port:PG10<1><default><default><0>
;rtk_rtl8723as_bt_dis = port:PG11<1><default><default><0>
;rtk_rtl8723as_wl_host_wake = port:PG12<0><default><default><0>
;rtk_rtl8723as_bt_host_wake = port:PG17<0><default><default><0>
; 4 - rtl8189es sdio wifi gpio config
;rtl8189es_vdd_en = port:PG18<1><default><default><0>
;rtl8189es_vcc_en = port:PG18<1><default><default><0>
;rtl8189es_shdn = port:PG10<1><default><default><0>
;rtl8189es_wakeup = port:PG12<1><default><default><1>
; 5 - rtl8192cu usb wifi gpio config
;rtl8192cu_power = port:PH27<1><0><default><0>
; 6 - rtl8188eu usb wifi gpio conifg
;rtl8188eu_power = port:PH27<1><0><default><0>
@awwwwa 我回去试了,这个ledc还是有问题,fifo模式下就两个灯亮,问题出在那个写入了,数据写的不对,然后DMA模式下还是不亮,我先凑合用吧,现在问题最大的是那个Wi-Fi Xr829 在Melis上没法正常工作……
@leomini5 在 大佬我又来了,Wi-Fi问题求助 中说:
xradio_save_mac_addr
root@leomini:/home/leo/miles-d1s/miles/d1s-melis-master# grep -r "xradio_save_mac_addr" ./*
grep: ./drivers/drv/source/net/xradio/libxr829_40M.a: 匹配到二进制文件
grep: ./ekernel/melis30.bin: 匹配到二进制文件
./ekernel/melis30.dis:0000000040021750 <xradio_save_mac_addr>:
./ekernel/melis30.dis: 40021788: eb85 bnez a5,400217b8 <xradio_save_mac_addr+0x68>
./ekernel/melis30.dis: 40021792: 16f05263 blez a5,400218f6 <xradio_save_mac_addr+0x1a6>
./ekernel/melis30.dis: 400217b6: a289 j 400218f8 <xradio_save_mac_addr+0x1a8>
./ekernel/melis30.dis: 40021838: 02e7d263 bge a5,a4,4002185c <xradio_save_mac_addr+0x10c>
./ekernel/melis30.dis: 4002187e: 02f71d63 bne a4,a5,400218b8 <xradio_save_mac_addr+0x168>
./ekernel/melis30.dis: 4002188e: 04e7dd63 bge a5,a4,400218e8 <xradio_save_mac_addr+0x198>
./ekernel/melis30.dis: 400218b6: a80d j 400218e8 <xradio_save_mac_addr+0x198>
./ekernel/melis30.dis: 400218c0: 02f05463 blez a5,400218e8 <xradio_save_mac_addr+0x198>
./ekernel/melis30.dis: 400218f4: a011 j 400218f8 <xradio_save_mac_addr+0x1a8>
./ekernel/melis30.dis: 40021b6e: be3ff0ef jal ra,40021750 <xradio_save_mac_addr>
./ekernel/melis30.dis: 40022d36: a1bfe0ef jal ra,40021750 <xradio_save_mac_addr>
grep: ./ekernel/arch/boot/Image: 匹配到二进制文件
grep: ./ekernel/arch/boot/zImage.bin: 匹配到二进制文件
grep: ./ekernel/arch/boot/zImage: 匹配到二进制文件
./ekernel/System.map:0000000040021750 t xradio_save_mac_addr
grep: ./ekernel/melis30.elf: 匹配到二进制文件
grep: ./ekernel/drivers/drv/source/net/xradio/libxr829_40M.a: 匹配到二进制文件
grep: ./out/d1s-nezha/image/epos.img: 匹配到二进制文件
grep: ./projects/d1s-nezha/epos.img: 匹配到二进制文件
root@leomini:/home/leo/miles-d1s/miles/d1s-melis-master#
xradio_load_mac_addr
这个好像是封装在那个40M.a的库里面的
补充一个-s的错误代码
msh />wifi -s
[sysinfo] mac addr source: 2
[sysinfo] random mac addr
[sysinfo] set default value
[wifi_event_init,93]:wlan init, register network observer
[wifi_event_init,102]:wifi init success!!
[wifi_on,841]:starting Station mode.
[net DBG] net_switch_mode(), mode 3 --> 0
[net DBG] net_open(), mode 0
[wlan D] wlan_attach()
[wlan D] wlan_attach()
[ERR:1535]xradio_load_mac_addr, 1535, '/data/xr_wifi.conf' doesn't exist, just create it!
[ERR:1483]xradio_save_mac_addr, 1483, open '/data/xr_wifi.conf' fail!
[xr_taskqueue_start_thread , 131]+-+0x40807fe0 :umac,8192
card id is 1
SD:mmc_card_create card:0x413bf518 id:1
host debug mask 18[ERR] SDC:name ???,port 7,port_num 0,mul_sel 2, pull 1, drv_level 1
[ERR] SDC:name ???,port 7,port_num 1,mul_sel 2, pull 1, drv_level 1
[ERR] SDC:name ???,port 7,port_num 2,mul_sel 2, pull 1, drv_level 1
[ERR] SDC:name ???,port 7,port_num 3,mul_sel 2, pull 1, drv_level 1
[ERR] SDC:name ???,port 7,port_num 4,mul_sel 2, pull 1, drv_level 1
[ERR] SDC:name ???,port 7,port_num 5,mul_sel 2, pull 1, drv_level 1
HAL_GetHFClock,53 Warning Use fix value 24000000
HAL_GetHFClock,53 Warning Use fix value 24000000
HAL_GetHFClock,53 Warning Use fix value 24000000
HAL_GetHFClock,53 Warning Use fix value 24000000
[ERR] SDC:__mci_irq_handler,903 raw_int:100 err!
[ERR] SDC:SDC err, cmd 52, RTO
[ERR] SDC:sdc 688 abnormal status: RespErr
[ERR] SDC:__mci_irq_handler,903 raw_int:100 err!
[ERR] SDC:SDC err, cmd 52, RTO
[ERR] SDC:sdc 688 abnormal status: RespErr
[ERR] SDC:__mci_irq_handler,903 raw_int:100 err!
[ERR] SDC:SDC err, cmd 8, RTO
[ERR] SDC:sdc 688 abnormal status: RespErr
SD:sd1.0 or mmc
SD:***** Try sdio *****
[ERR] SDC:__mci_irq_handler,903 raw_int:100 err!
[ERR] SDC:SDC err, cmd 5, RTO
[ERR] SDC:sdc 688 abnormal status: RespErr
=====================================================================================================
EXC_LOAD_PAGE_FAULT
=================================================================
上次我编译好了那个ctrl,但是不出我所料,Wi-Fi还是用不了
在melis里面用那个wifi -s扫描网络,报了一堆错误,最后所有程序都结束。。。。
这个Wi-Fi为啥会用到SD卡的东西啊
xradio_load_mac_addr
这个需要往SD卡里面写配置信息?能不能直接往 norflash里面写啊,我准备不用SD卡
求助求助,谢谢啦
错误报告如下
msh />wifi -c leo 88888888
[sysinfo] mac addr source: 2
[sysinfo] random mac addr
[sysinfo] set default value
[wifi_event_init,93]:wlan init, register network observer
[wifi_event_init,102]:wifi init success!!
[wifi_on,841]:starting Station mode.
[net DBG] net_switch_mode(), mode 3 --> 0
[net DBG] net_open(), mode 0
[wlan D] wlan_attach()
[wlan D] wlan_attach()
[ERR:1535]xradio_load_mac_addr, 1535, '/data/xr_wifi.conf' doesn't exist, just create it!
[ERR:1483]xradio_save_mac_addr, 1483, open '/data/xr_wifi.conf' fail!
[xr_taskqueue_start_thread , 131]+-+0x40807fe0 :umac,8192
card id is 1
SD:mmc_card_create card:0x413bf378 id:1
host debug mask 18[ERR] SDC:name ???,port 7,port_num 0,mul_sel 2, pull 1, drv_level 1
[ERR] SDC:name ???,port 7,port_num 1,mul_sel 2, pull 1, drv_level 1
[ERR] SDC:name ???,port 7,port_num 2,mul_sel 2, pull 1, drv_level 1
[ERR] SDC:name ???,port 7,port_num 3,mul_sel 2, pull 1, drv_level 1
[ERR] SDC:name ???,port 7,port_num 4,mul_sel 2, pull 1, drv_level 1
[ERR] SDC:name ???,port 7,port_num 5,mul_sel 2, pull 1, drv_level 1
HAL_GetHFClock,53 Warning Use fix value 24000000
HAL_GetHFClock,53 Warning Use fix value 24000000
HAL_GetHFClock,53 Warning Use fix value 24000000
HAL_GetHFClock,53 Warning Use fix value 24000000
[ERR] SDC:__mci_irq_handler,903 raw_int:100 err!
[ERR] SDC:SDC err, cmd 52, RTO
[ERR] SDC:sdc 688 abnormal status: RespErr
[ERR] SDC:__mci_irq_handler,903 raw_int:100 err!
[ERR] SDC:SDC err, cmd 52, RTO
[ERR] SDC:sdc 688 abnormal status: RespErr
[ERR] SDC:__mci_irq_handler,903 raw_int:100 err!
[ERR] SDC:SDC err, cmd 8, RTO
[ERR] SDC:sdc 688 abnormal status: RespErr
SD:sd1.0 or mmc
SD:***** Try sdio *****
[ERR] SDC:__mci_irq_handler,903 raw_int:100 err!
[ERR] SDC:SDC err, cmd 5, RTO
[ERR] SDC:sdc 688 abnormal status: RespErr
我一直想找个2.4G 5G双频的Wi-Fi 模块
这个859A刚好满足要求而且还是支持Wi-Fi 6的
太强大了,那么问题来了,这玩意看起来和xr829差不多,D1s应该也能用这个模块吧,问题是驱动能移植到Melis上或者tina上面嘛
@awwwwa 感谢大佬的关注,我自己解决了
Melis4 Wi-Fi
位置和技术文档里面那个不一样,只能自己想办法
make menuconfig
首先下面这个地方得编译那个Wi-Fi网络的协议栈,没这个没法用的
→ Kernel Setup → Components Support → Thirdparty Components Support → Enable Network Support → Network → Network protocol
-*- lwip
然后嘛就是那个驱动层
按照板子上面的Wi-Fi芯片选,还有那个晶振什么的别选错了,不然也没法用
位置在这里
Kernel Setup → Drivers Setup → net drivers → xradio driver ──
但是,我还没有烧到板子上测试那个Wi-Fi到底行不行,所以嘛。。。。。我也不知道到底行不行,反正那个ctrl里面有连Wi-Fi用的东西,但愿能用吧
@xiaowenge 太需要工程师训场啦,这个D1s不像esp32那么简单了,要是能像它那么简单就好啦,其实我也不想去调那些硬件,有个稳定的平台,开发上层应用才好玩啊,底层硬件还有Linux平台,基本上就劝退了一大半人了
哈咯各位大佬
我用的是哪吒那个D1s的开发版,用的Xr829
谁知道这里面那个Wi-Fi 具体怎么用的呀?
Tina里面的Wi-Fi 测试我试过了,没问题
现在是在melis 系统里面,那个Wi-Fi 我编译了那个第三方的库,里面有ping之类的测试应用,那些应用看起来都编译成功了,除了部分有问题的
然后去处理驱动部分的时候遇到个大问题
--- xradio driver │ │
这个里面第一个选项是xradio 里面用于控制Wi-Fi 设备的功能,但是吧不能Enable ,不然编译不过去,报的错,没法看懂,那个Wi-Fi manager 也在这个ctrl 里面,如果不编译这个,感觉Wi-Fi 没法启动了
第二个选项就是那个xr829的驱动
能编译成功,但是这个库里面,没看到源码,也没看到测试代码在哪里。
所以问题来了,这个40M库的Wi-Fi 如何初始化,如何启动呢……
谢谢啦
@awwwwa 大佬这个驱动文件是tina里面用的还是Meils啊
我这边用的是meils4里面的
hal_ledc
那个驱动
./ekernel/drivers/hal/source/ledc/hal_ledc.c
测试的是这段代码被我改了强行用cpu模式或者是DMA模式测试
CPU部分没问题可以驱动
但是DMA部分不行
具体是哪里的BUG呀大佬,可以指点一下不,谢啦谢啦
void hal_ledc_trans_data(struct ledc_config *ledc)
{
int i;
unsigned long int size;
unsigned int mask = 0;
struct dma_slave_config slave_config;
mask = LEDC_TRANS_FINISH_INT_EN | LEDC_WAITDATA_TIMEOUT_INT_EN
| LEDC_FIFO_OVERFLOW_INT_EN | LEDC_GLOBAL_INT_EN;
int leoset=1;
//SUNXI_LEDC_FIFO_DEPTH
//if (ledc->length <= SUNXI_LEDC_FIFO_DEPTH) {
//if (LEO_led_count <= SUNXI_LEDC_FIFO_DEPTH) {
if (1) {
//printf("------------------------------CPU mode %d ------------------------\n",ledc->length);
ledc_info("trans data by CPU mode\n");
mask |= LEDC_FIFO_CPUREQ_INT_EN;
ledc_reset_en();
hal_ledc_set_time(ledc);
ledc_set_output_mode(ledc->output_mode);
ledc_set_cpu_mode();
ledc_set_length(ledc->length);
//ledc_set_length(LEO_led_count);
ledc_enable_irq(mask);
//for(i = 0; i < ledc->length; i++){
//for(i = 0; i < LEO_led_count; i++){
for(i = 0; i < ledc->led_count; i++){
ledc_set_data(ledc->data[i]);
//printf("-----ledc->data[%d]->%d-----\n",i,ledc->data[i]);
}
ledc_enable();
} else {
ledc_info("trans data by DMA mode\n");
//printf("------------------------------DMA mode %d------------------------\n",ledc->length);
mask &= ~LEDC_FIFO_CPUREQ_INT_EN;
ledc_reset_en();
size = ledc->led_count * 4;
//size = ledc->length * 4;
//size = LEO_led_count * 4;
hal_dcache_clean((unsigned long)ledc->data, sizeof(ledc->data));
slave_config.direction = DMA_MEM_TO_DEV;
slave_config.src_addr = (unsigned long)(ledc->data);
slave_config.dst_addr = (uint32_t)(base_addr + LEDC_DATA_REG);
slave_config.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
slave_config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
slave_config.src_maxburst = DMA_SLAVE_BURST_16;
slave_config.dst_maxburst = DMA_SLAVE_BURST_16;
slave_config.slave_id = sunxi_slave_id(DRQDST_LEDC, DRQSRC_SDRAM);
hal_dma_slave_config(dma_chan, &slave_config);
hal_dma_prep_device(dma_chan, slave_config.dst_addr, slave_config.src_addr, size, DMA_MEM_TO_DEV);
//dma_chan->callback = ledc_dma_callback;
hal_dma_start(dma_chan);
hal_ledc_set_time(ledc);
ledc_set_output_mode(ledc->output_mode);
//ledc_set_length(ledc->length);
ledc_set_length(ledc->led_count);
//ledc_set_length(LEO_led_count);
ledc_set_dma_mode();
ledc_enable_irq(mask);
ledc_enable();
}
}
各位大佬有谁用过D1S的Ledc驱动器啊,我用的是Meils4
,在测试Ledc驱动器的时候,这个ledc有两种模式,一个是CPU,一个是DMA
灯用的是ws2812
CPU驱动模式一下,Led可以亮但是,那个刷新LED数据比较快的情况下LED头尾的灯颜色就不正常了,最短间隔150ms,这个速度想要做点多灯的驱动肯定不行
于是修改了led的配置参数,我把那个wait data那个时间修改后,就可以刷更快了,但是具体那个时许参数是什么作用呢?
然后还有个问题那个Ledc换了DMA模式以后就直接全黑了,没输出了,这又是为啥啊,没有DMA,全靠cpu的话没法用啊……
哈咯各位大佬,那个Melis4里面的subsys 在哪里呀,没有协议栈可以用wifi 嘛?
还有那些测试应用也没有,怎么办
我用的是哪吒的板子,D1S 上面有个xr829的wifi 芯片,用tina测试连接成功没有问题
但是Melis 4的Wi-Fi 怎么用呀?