Lines Matching refs:rcmm

35 static inline int rcar_cmm_read(struct rcar_cmm *rcmm, u32 reg)  in rcar_cmm_read()  argument
37 return ioread32(rcmm->base + reg); in rcar_cmm_read()
40 static inline void rcar_cmm_write(struct rcar_cmm *rcmm, u32 reg, u32 data) in rcar_cmm_write() argument
42 iowrite32(data, rcmm->base + reg); in rcar_cmm_write()
51 static void rcar_cmm_lut_write(struct rcar_cmm *rcmm, in rcar_cmm_lut_write() argument
61 rcar_cmm_write(rcmm, CM2_LUT_TBL(i), entry); in rcar_cmm_lut_write()
84 struct rcar_cmm *rcmm = platform_get_drvdata(pdev); in rcar_cmm_setup() local
88 if (rcmm->lut.enabled) { in rcar_cmm_setup()
89 rcar_cmm_write(rcmm, CM2_LUT_CTRL, 0); in rcar_cmm_setup()
90 rcmm->lut.enabled = false; in rcar_cmm_setup()
97 if (!rcmm->lut.enabled) { in rcar_cmm_setup()
98 rcar_cmm_write(rcmm, CM2_LUT_CTRL, CM2_LUT_CTRL_LUT_EN); in rcar_cmm_setup()
99 rcmm->lut.enabled = true; in rcar_cmm_setup()
102 rcar_cmm_lut_write(rcmm, config->lut.table); in rcar_cmm_setup()
145 struct rcar_cmm *rcmm = platform_get_drvdata(pdev); in rcar_cmm_disable() local
147 rcar_cmm_write(rcmm, CM2_LUT_CTRL, 0); in rcar_cmm_disable()
148 rcmm->lut.enabled = false; in rcar_cmm_disable()
163 struct rcar_cmm *rcmm = platform_get_drvdata(pdev); in rcar_cmm_init() local
165 if (!rcmm) in rcar_cmm_init()
174 struct rcar_cmm *rcmm; in rcar_cmm_probe() local
176 rcmm = devm_kzalloc(&pdev->dev, sizeof(*rcmm), GFP_KERNEL); in rcar_cmm_probe()
177 if (!rcmm) in rcar_cmm_probe()
179 platform_set_drvdata(pdev, rcmm); in rcar_cmm_probe()
181 rcmm->base = devm_platform_ioremap_resource(pdev, 0); in rcar_cmm_probe()
182 if (IS_ERR(rcmm->base)) in rcar_cmm_probe()
183 return PTR_ERR(rcmm->base); in rcar_cmm_probe()