[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190417214041.GD14163@xps15>
Date: Wed, 17 Apr 2019 15:40:41 -0600
From: Mathieu Poirier <mathieu.poirier@...aro.org>
To: Suzuki K Poulose <suzuki.poulose@....com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
coresight@...ts.linaro.org, mike.leach@...aro.org,
rjw@...ysocki.net, robert.walker@....com
Subject: Re: [PATCH v2 09/36] coresight: catu: Cleanup device specific data
On Mon, Apr 15, 2019 at 05:03:52PM +0100, Suzuki K Poulose wrote:
> Switch to using the CoreSight device instead of the real
> amba device.
>
> Cc: Mathieu Poirier <mathieu.poirier@...aro.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
> ---
> drivers/hwtracing/coresight/coresight-catu.c | 13 +++++++------
> drivers/hwtracing/coresight/coresight-catu.h | 1 -
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c
> index ba3c005..14d1cf5 100644
> --- a/drivers/hwtracing/coresight/coresight-catu.c
> +++ b/drivers/hwtracing/coresight/coresight-catu.c
> @@ -408,13 +408,14 @@ static int catu_enable_hw(struct catu_drvdata *drvdata, void *data)
> int rc;
> u32 control, mode;
> struct etr_buf *etr_buf = data;
> + struct device *dev = &drvdata->csdev->dev;
>
> if (catu_wait_for_ready(drvdata))
> - dev_warn(drvdata->dev, "Timeout while waiting for READY\n");
> + dev_warn(dev, "Timeout while waiting for READY\n");
>
> control = catu_read_control(drvdata);
> if (control & BIT(CATU_CONTROL_ENABLE)) {
> - dev_warn(drvdata->dev, "CATU is already enabled\n");
> + dev_warn(dev, "CATU is already enabled\n");
> return -EBUSY;
> }
>
> @@ -440,7 +441,7 @@ static int catu_enable_hw(struct catu_drvdata *drvdata, void *data)
> catu_write_irqen(drvdata, 0);
> catu_write_mode(drvdata, mode);
> catu_write_control(drvdata, control);
> - dev_dbg(drvdata->dev, "Enabled in %s mode\n",
> + dev_dbg(dev, "Enabled in %s mode\n",
> (mode == CATU_MODE_PASS_THROUGH) ?
> "Pass through" :
> "Translate");
> @@ -461,15 +462,16 @@ static int catu_enable(struct coresight_device *csdev, void *data)
> static int catu_disable_hw(struct catu_drvdata *drvdata)
> {
> int rc = 0;
> + struct device *dev = &drvdata->csdev->dev;
>
> catu_write_control(drvdata, 0);
> coresight_disclaim_device_unlocked(drvdata->base);
> if (catu_wait_for_ready(drvdata)) {
> - dev_info(drvdata->dev, "Timeout while waiting for READY\n");
> + dev_info(dev, "Timeout while waiting for READY\n");
> rc = -EAGAIN;
> }
>
> - dev_dbg(drvdata->dev, "Disabled\n");
> + dev_dbg(dev, "Disabled\n");
> return rc;
> }
>
> @@ -519,7 +521,6 @@ static int catu_probe(struct amba_device *adev, const struct amba_id *id)
> goto out;
> }
>
> - drvdata->dev = dev;
> dev_set_drvdata(dev, drvdata);
> base = devm_ioremap_resource(dev, &adev->res);
> if (IS_ERR(base)) {
> diff --git a/drivers/hwtracing/coresight/coresight-catu.h b/drivers/hwtracing/coresight/coresight-catu.h
> index 1b281f0..96ea8c4 100644
> --- a/drivers/hwtracing/coresight/coresight-catu.h
> +++ b/drivers/hwtracing/coresight/coresight-catu.h
> @@ -61,7 +61,6 @@
> #define CATU_IRQEN_OFF 0x0
>
> struct catu_drvdata {
> - struct device *dev;
> void __iomem *base;
> struct coresight_device *csdev;
> int irq;
Reviewed-by: Mathieu Poirier <mathieu.poirier@...aro.org>
> --
> 2.7.4
>
Powered by blists - more mailing lists