diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/glamo/glamo-cmdq.c | 6 | ||||
-rw-r--r-- | drivers/mfd/glamo/glamo-core.c | 25 |
2 files changed, 30 insertions, 1 deletions
diff --git a/drivers/mfd/glamo/glamo-cmdq.c b/drivers/mfd/glamo/glamo-cmdq.c index 28c52680398..706685dc6d6 100644 --- a/drivers/mfd/glamo/glamo-cmdq.c +++ b/drivers/mfd/glamo/glamo-cmdq.c @@ -465,10 +465,14 @@ int glamo_cmdq_setup(struct glamodrm_handle *gdrm) init_MUTEX(&gdrm->add_to_ring); - /* Enable 2D and 3D */ + /* Enable 2D */ glamo_engine_enable(gdrm->glamo_core, GLAMO_ENGINE_2D); glamo_engine_reset(gdrm->glamo_core, GLAMO_ENGINE_2D); + /* Enable 3D */ + glamo_engine_enable(gdrm->glamo_core, GLAMO_ENGINE_3D); + glamo_engine_reset(gdrm->glamo_core, GLAMO_ENGINE_3D); + /* Start by zeroing the command queue memory */ for ( i=0; i<GLAMO_CMDQ_SIZE; i+=2 ) { iowrite16(0x0000, gdrm->cmdq_base+i); diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c index a54106b1913..c4a4ad29b94 100644 --- a/drivers/mfd/glamo/glamo-core.c +++ b/drivers/mfd/glamo/glamo-core.c @@ -472,6 +472,23 @@ static const struct glamo_engine_reg_set glamo_2d_regs[] = { } }; +static const struct glamo_engine_reg_set glamo_3d_regs[] = { + { GLAMO_REG_CLOCK_3D, + GLAMO_CLOCK_3D_EN_M8CLK | + GLAMO_CLOCK_3D_DG_M8CLK, + + GLAMO_CLOCK_3D_EN_ECLK | + GLAMO_CLOCK_3D_DG_ECLK, + + GLAMO_CLOCK_3D_EN_RCLK | + GLAMO_CLOCK_3D_DG_RCLK + }, + { GLAMO_REG_CLOCK_GEN5_1, + 0, + GLAMO_CLOCK_GEN51_EN_DIV_GCLK, + } +}; + static const struct glamo_engine_reg_set glamo_cmdq_regs[] = { { GLAMO_REG_CLOCK_2D, GLAMO_CLOCK_2D_EN_M6CLK, @@ -493,6 +510,8 @@ static const struct glamo_engine_desc glamo_engines[] = { glamo_mmc_regs), [GLAMO_ENGINE_2D] = GLAMO_ENGINE("2D", GLAMO_HOSTBUS2_MMIO_EN_2D, glamo_2d_regs), + [GLAMO_ENGINE_3D] = GLAMO_ENGINE("3D", GLAMO_HOSTBUS2_MMIO_EN_3D, + glamo_3d_regs), [GLAMO_ENGINE_CMDQ] = GLAMO_ENGINE("CMDQ", GLAMO_HOSTBUS2_MMIO_EN_CQ, glamo_cmdq_regs), }; @@ -516,6 +535,7 @@ int __glamo_engine_enable(struct glamo_core *glamo, enum glamo_engine engine) case GLAMO_ENGINE_LCD: case GLAMO_ENGINE_MMC: case GLAMO_ENGINE_2D: + case GLAMO_ENGINE_3D: case GLAMO_ENGINE_CMDQ: break; default: @@ -562,6 +582,7 @@ int __glamo_engine_disable(struct glamo_core *glamo, enum glamo_engine engine) case GLAMO_ENGINE_MMC: case GLAMO_ENGINE_2D: case GLAMO_ENGINE_CMDQ: + case GLAMO_ENGINE_3D: break; default: return -EINVAL; @@ -654,6 +675,10 @@ static const struct glamo_script reset_regs[] = { [GLAMO_ENGINE_2D] = { GLAMO_REG_CLOCK_2D, GLAMO_CLOCK_2D_RESET }, + [GLAMO_ENGINE_3D] = { + GLAMO_REG_CLOCK_3D, GLAMO_CLOCK_3D_BACK_RESET | + GLAMO_CLOCK_3D_FRONT_RESET + }, [GLAMO_ENGINE_JPEG] = { GLAMO_REG_CLOCK_JPEG, GLAMO_CLOCK_JPEG_RESET }, |