Hi all,
I want to make a stream status check function in csi5_fops.c, which is the same with the function in csi4_fops.c.
In Xavier, I used csi4_stream_read function in csi4_fops.c. I copied this function in csi5_fops.c and it worked. However, in case of Orin, it is not working. Following line makes system down.
return readl(csi->iomem[index >> 1] + cilb_offset + addr);
How to read the stream status checking registers in Orin?
Thanks
Could you print the iomem_base and others addr and offset to check if it’s correct.
I used this code
#define CSI5_STREAM_OFFSET 0x800 // derived from csi4
static u32 csi5_stream_read(struct tegra_csi_channel *chan,
unsigned int index, unsigned int addr) {
struct tegra_csi_device *csi = chan->csi;
u32 cilb_offset = (index & 0x1) ? CSI5_STREAM_OFFSET : 0x0;
printk("index: %x\n", index);
printk("addr: %x\n", addr);
printk("cilb_offset: %d\n", cilb_offset);
printk("csi->iomem_base (pointer address): %p\n", csi->iomem_base);
// return readl(csi->iomem[index >> 1] + cilb_offset + addr);
return 0;
}
and the result is
[ 80.512819] index: 0
[ 80.512930] addr: 400
[ 80.512932] cilb_offset: 0
[ 80.512933] csi->iomem_base (pointer address): 0000000000000000
clib_offset and iomem_base addr is 0.
I realized that CSI5_STREAM_OFFSET is not presented in TRM of Orin. Which value should I use?
The iomem_base should be 0x15a00000,
Does CSI5_STREAM_OFFSET define in Xavier TRM? Suppose it’s the same with Xavier.
system
Closed
July 13, 2022, 1:45am
7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.