mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
media: add codec_io and canvas module for g12a
PD#156734: G12A: media: add codec_id and canvas module Change-Id: Ib0e4ef05c237c313f483ebe2b029bf50f57d1c0a Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
This commit is contained in:
@@ -94,6 +94,39 @@
|
||||
vendor_id = <0x000000>;
|
||||
};
|
||||
};
|
||||
|
||||
canvas{
|
||||
compatible = "amlogic, meson, canvas";
|
||||
dev_name = "amlogic-canvas";
|
||||
status = "okay";
|
||||
reg = <0x0 0xff638000 0x0 0x2000>;
|
||||
};
|
||||
|
||||
codec_io {
|
||||
compatible = "amlogic, codec_io";
|
||||
status = "okay";
|
||||
#address-cells=<2>;
|
||||
#size-cells=<2>;
|
||||
ranges;
|
||||
io_cbus_base{
|
||||
reg = <0x0 0xffd00000 0x0 0x100000>;
|
||||
};
|
||||
io_dos_base{
|
||||
reg = <0x0 0xff620000 0x0 0x10000>;
|
||||
};
|
||||
io_hiubus_base{
|
||||
reg = <0x0 0xff63c000 0x0 0x2000>;
|
||||
};
|
||||
io_aobus_base{
|
||||
reg = <0x0 0xff800000 0x0 0x10000>;
|
||||
};
|
||||
io_vcbus_base{
|
||||
reg = <0x0 0xff900000 0x0 0x40000>;
|
||||
};
|
||||
io_dmc_base{
|
||||
reg = <0x0 0xff638000 0x0 0x2000>;
|
||||
};
|
||||
};
|
||||
}; /* end of / */
|
||||
|
||||
&aobus{
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
MESON_CPU_MAJOR_ID_GXM, \
|
||||
MESON_CPU_MAJOR_ID_TXL, \
|
||||
MESON_CPU_MAJOR_ID_TXLX, \
|
||||
MESON_CPU_MAJOR_ID_G12A, \
|
||||
0}
|
||||
#define REGISTER_FOR_GXCPU {\
|
||||
MESON_CPU_MAJOR_ID_GXBB, \
|
||||
@@ -36,6 +37,7 @@
|
||||
MESON_CPU_MAJOR_ID_GXM, \
|
||||
MESON_CPU_MAJOR_ID_TXL, \
|
||||
MESON_CPU_MAJOR_ID_TXLX, \
|
||||
MESON_CPU_MAJOR_ID_G12A, \
|
||||
0}
|
||||
int codec_apb_read(unsigned int reg)
|
||||
{
|
||||
|
||||
@@ -226,8 +226,7 @@ static void canvas_pool_init(void)
|
||||
memset(pool, 0, sizeof(struct canvas_pool));
|
||||
spin_lock_init(&pool->lock);
|
||||
pool->canvas_max = CANVAS_MAX_NUM;
|
||||
if (get_meson_cpu_version(MESON_CPU_VERSION_LVL_MAJOR) <
|
||||
MESON_CPU_MAJOR_ID_M6TV)
|
||||
if (get_cpu_type() < MESON_CPU_MAJOR_ID_M6TV)
|
||||
pool->canvas_max = 192;
|
||||
pool->next_alloced_index = pool->canvas_max / 2;
|
||||
/* /start at end part index. */
|
||||
|
||||
@@ -71,8 +71,7 @@ static uint32_t ge2d_reg_read(unsigned int reg)
|
||||
unsigned int addr = 0;
|
||||
unsigned int val = 0;
|
||||
|
||||
if (get_meson_cpu_version(MESON_CPU_VERSION_LVL_MAJOR)
|
||||
< MESON_CPU_MAJOR_ID_GXBB)
|
||||
if (get_cpu_type() < MESON_CPU_MAJOR_ID_GXBB)
|
||||
return (uint32_t)aml_read_cbus(reg);
|
||||
|
||||
addr = GE2DBUS_REG_ADDR(reg);
|
||||
@@ -88,8 +87,7 @@ static void ge2d_reg_write(unsigned int reg, unsigned int val)
|
||||
{
|
||||
unsigned int addr = 0;
|
||||
|
||||
if (get_meson_cpu_version(MESON_CPU_VERSION_LVL_MAJOR)
|
||||
< MESON_CPU_MAJOR_ID_GXBB) {
|
||||
if (get_cpu_type() < MESON_CPU_MAJOR_ID_GXBB) {
|
||||
aml_write_cbus(reg, val);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user