Lines Matching refs:drvdata
63 static void tpiu_enable_hw(struct tpiu_drvdata *drvdata) in tpiu_enable_hw() argument
65 CS_UNLOCK(drvdata->base); in tpiu_enable_hw()
69 CS_LOCK(drvdata->base); in tpiu_enable_hw()
74 struct tpiu_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in tpiu_enable() local
77 ret = clk_prepare_enable(drvdata->clk); in tpiu_enable()
81 tpiu_enable_hw(drvdata); in tpiu_enable()
83 dev_info(drvdata->dev, "TPIU enabled\n"); in tpiu_enable()
87 static void tpiu_disable_hw(struct tpiu_drvdata *drvdata) in tpiu_disable_hw() argument
89 CS_UNLOCK(drvdata->base); in tpiu_disable_hw()
92 writel_relaxed(0x0, drvdata->base + TPIU_FFCR); in tpiu_disable_hw()
94 writel_relaxed(FFCR_FON_MAN, drvdata->base + TPIU_FFCR); in tpiu_disable_hw()
96 CS_LOCK(drvdata->base); in tpiu_disable_hw()
101 struct tpiu_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in tpiu_disable() local
103 tpiu_disable_hw(drvdata); in tpiu_disable()
105 clk_disable_unprepare(drvdata->clk); in tpiu_disable()
107 dev_info(drvdata->dev, "TPIU disabled\n"); in tpiu_disable()
125 struct tpiu_drvdata *drvdata; in tpiu_probe() local
137 drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); in tpiu_probe()
138 if (!drvdata) in tpiu_probe()
141 drvdata->dev = &adev->dev; in tpiu_probe()
142 dev_set_drvdata(dev, drvdata); in tpiu_probe()
149 drvdata->base = base; in tpiu_probe()
151 drvdata->clk = adev->pclk; in tpiu_probe()
152 ret = clk_prepare_enable(drvdata->clk); in tpiu_probe()
157 tpiu_disable_hw(drvdata); in tpiu_probe()
159 clk_disable_unprepare(drvdata->clk); in tpiu_probe()
170 drvdata->csdev = coresight_register(desc); in tpiu_probe()
171 if (IS_ERR(drvdata->csdev)) in tpiu_probe()
172 return PTR_ERR(drvdata->csdev); in tpiu_probe()
180 struct tpiu_drvdata *drvdata = amba_get_drvdata(adev); in tpiu_remove() local
182 coresight_unregister(drvdata->csdev); in tpiu_remove()