.kick = da8xx_rproc_kick,
};
-static int reset_assert(struct device *dev)
-{
- struct clk *dsp_clk;
-
- dsp_clk = clk_get(dev, NULL);
- if (IS_ERR(dsp_clk)) {
- dev_err(dev, "clk_get error: %ld\n", PTR_ERR(dsp_clk));
- return PTR_ERR(dsp_clk);
- }
-
- davinci_clk_reset_assert(dsp_clk);
- clk_put(dsp_clk);
-
- return 0;
-}
-
static int da8xx_rproc_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
drproc = rproc->priv;
drproc->rproc = rproc;
+ drproc->dsp_clk = dsp_clk;
rproc->has_iommu = false;
platform_set_drvdata(pdev, rproc);
* *not* in reset, but da8xx_rproc_start() needs the DSP to be
* held in reset at the time it is called.
*/
- ret = reset_assert(dev);
+ ret = davinci_clk_reset_assert(drproc->dsp_clk);
if (ret)
goto free_rproc;
drproc->ack_fxn = irq_data->chip->irq_ack;
drproc->irq_data = irq_data;
drproc->irq = irq;
- drproc->dsp_clk = dsp_clk;
ret = rproc_add(rproc);
if (ret) {
static int da8xx_rproc_remove(struct platform_device *pdev)
{
- struct device *dev = &pdev->dev;
struct rproc *rproc = platform_get_drvdata(pdev);
struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv;
* Without the reset, the DSP can lockup permanently when it
* begins executing garbage.
*/
- reset_assert(dev);
+ davinci_clk_reset_assert(drproc->dsp_clk);
/*
* The devm subsystem might end up releasing things before