Commit 85cbc027 authored by Jens Kuske's avatar Jens Kuske
Browse files

Add A80 support

parent c1fb5e8f
...@@ -80,7 +80,7 @@ EXPORT struct cedrus *cedrus_open(void) ...@@ -80,7 +80,7 @@ EXPORT struct cedrus *cedrus_open(void)
ve.version = readl(ve.regs + VE_VERSION) >> 16; ve.version = readl(ve.regs + VE_VERSION) >> 16;
if (ve.version >= 0x1667) if (ve.version >= 0x1639)
ve.ioctl_offset = 1; ve.ioctl_offset = 1;
ioctl(ve.fd, IOCTL_ENABLE_VE + ve.ioctl_offset, 0); ioctl(ve.fd, IOCTL_ENABLE_VE + ve.ioctl_offset, 0);
...@@ -193,11 +193,17 @@ EXPORT uint32_t cedrus_mem_get_phys_addr(const struct cedrus_mem *mem) ...@@ -193,11 +193,17 @@ EXPORT uint32_t cedrus_mem_get_phys_addr(const struct cedrus_mem *mem)
uint32_t phys2bus(uint32_t phys) uint32_t phys2bus(uint32_t phys)
{ {
if (ve.version == 0x1639)
return phys - 0x20000000;
else
return phys - 0x40000000; return phys - 0x40000000;
} }
uint32_t bus2phys(uint32_t bus) uint32_t bus2phys(uint32_t bus)
{ {
if (ve.version == 0x1639)
return bus + 0x20000000;
else
return bus + 0x40000000; return bus + 0x40000000;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment