port camera driver from 28.2 to 32.1

Hi,

We want to port camera from 28.2 to 32.1, but when I completed this work, the error occured as follows:

[   32.987958] Unable to handle kernel paging request at virtual address 635f30393476df
[   32.995709] Mem abort info:
[   32.998510]   ESR = 0x96000044
[   33.001578]   Exception class = DABT (current EL), IL = 32 bits
[   33.007555]   SET = 0, FnV = 0
[   33.010625]   EA = 0, S1PTW = 0
[   33.013778] Data abort info:
[   33.016672]   ISV = 0, ISS = 0x00000044
[   33.020517]   CM = 0, WnR = 1
[   33.023491] [00635f30393476df] address between user and kernel address ranges
[   33.030649] Internal error: Oops: 96000044 [#1] PREEMPT SMP
[   33.036215] Modules linked in:
[   33.039284] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.9.140-tegra #47
[   33.045888] Hardware name: storm (DT)
[   33.049548] task: ffffffc1adb30000 task.stack: ffffffc1adb38000
[   33.055468] PC is at ds90ub936_probe+0x21c/0x7d8
[   33.060080] LR is at ds90ub936_probe+0x214/0x7d8
[   33.064716] pc : [<ffffff8008ada4bc>] lr : [<ffffff8008ada4b4>] pstate: 40400045
[   33.072125] sp : ffffffc1adb3bbb0
[   33.075449] x29: 00635f303934766f x28: ffffff80097c25f0 
[   33.080781] x27: ffffff80096083b0 x26: ffffffc1a6579418 
[   33.086111] x25: ffffff800945d000 x24: ffffffc1acfc7118 
[   33.091441] x23: ffffffc1acfd43d8 x22: 00635f30393476ef 
[   33.096766] x21: ffffff8009035000 x20: 0000000000000000 
[   33.102099] x19: ffffffc1ac21f820 x18: 0000000000000010 
[   33.107423] x17: 0000000000000001 x16: 0000000000000000 
[   33.112748] x15: ffffffffffffffff x14: ffffff808a0c1a62 
[   33.118076] x13: ffffff800a0c1a70 x12: 0000000000000007 
[   33.123402] x11: 0000000005f5e0ff x10: 0000000000000218 
[   33.128728] x9 : 00000000ffffffd0 x8 : ffffff80083d2fe8 
[   33.134055] x7 : ffffff8009e440d8 x6 : ffffff80083d23f8 
[   33.139379] x5 : 0000000000000015 x4 : 000000000000001f 
[   33.144705] x3 : 0000000000000000 x2 : ffffff8009e141f0 
[   33.150030] x1 : 0000000000000000 x0 : ffffffc1a6579418 
[   33.155354] 
[   33.156848] Process swapper/0 (pid: 1, stack limit = 0xffffffc1adb38000)
[   33.163540] Call trace:
[   33.165989] [<ffffff8008ada4bc>] ds90ub936_probe+0x21c/0x7d8
[   33.171648] ---[ end trace a527cc0cbef74f87 ]---
[   33.185015] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[   33.185015] 
[   33.194140] SMP: stopping secondary CPUs
[   33.198078] Kernel Offset: disabled

thanks.

hello cloundliu,

there’s kernel version difference between l4t-r28.2 (kernel-4.4) and l4t-r32.1 (kernel-4.9).
could you please compare your kernel sources with r32.1 source release.
please also check Release-32.1 Sensor Driver Programming Guide for more details, thanks