From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> To: Mark Brown <broonie@kernel.org>, linux-spi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Masahiro Yamada <yamada.masahiro@socionext.com>, Keiji Hayashibara <hayashibara.keiji@socionext.com>, Masami Hiramatsu <masami.hiramatsu@linaro.org>, Jassi Brar <jaswinder.singh@linaro.org>, Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Subject: [PATCH 2/5] spi: uniphier: Change argument of irq functions to private structure Date: Tue, 24 Dec 2019 09:58:24 +0900 [thread overview] Message-ID: <1577149107-30670-3-git-send-email-hayashi.kunihiko@socionext.com> (raw) In-Reply-To: <1577149107-30670-1-git-send-email-hayashi.kunihiko@socionext.com> This changes each argument of functions uniphier_irq_{enable,disable}() to uniphier_spi_priv because these functions are used not only for spi_device but also for the entire controller. Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> --- drivers/spi/spi-uniphier.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-uniphier.c b/drivers/spi/spi-uniphier.c index ce9b301..3859649 100644 --- a/drivers/spi/spi-uniphier.c +++ b/drivers/spi/spi-uniphier.c @@ -93,9 +93,9 @@ static inline unsigned int bytes_per_word(unsigned int bits) return bits <= 8 ? 1 : (bits <= 16 ? 2 : 4); } -static inline void uniphier_spi_irq_enable(struct spi_device *spi, u32 mask) +static inline void uniphier_spi_irq_enable(struct uniphier_spi_priv *priv, + u32 mask) { - struct uniphier_spi_priv *priv = spi_master_get_devdata(spi->master); u32 val; val = readl(priv->base + SSI_IE); @@ -103,9 +103,9 @@ static inline void uniphier_spi_irq_enable(struct spi_device *spi, u32 mask) writel(val, priv->base + SSI_IE); } -static inline void uniphier_spi_irq_disable(struct spi_device *spi, u32 mask) +static inline void uniphier_spi_irq_disable(struct uniphier_spi_priv *priv, + u32 mask) { - struct uniphier_spi_priv *priv = spi_master_get_devdata(spi->master); u32 val; val = readl(priv->base + SSI_IE); @@ -346,12 +346,12 @@ static int uniphier_spi_transfer_one_irq(struct spi_master *master, uniphier_spi_fill_tx_fifo(priv); - uniphier_spi_irq_enable(spi, SSI_IE_RCIE | SSI_IE_RORIE); + uniphier_spi_irq_enable(priv, SSI_IE_RCIE | SSI_IE_RORIE); time_left = wait_for_completion_timeout(&priv->xfer_done, msecs_to_jiffies(SSI_TIMEOUT_MS)); - uniphier_spi_irq_disable(spi, SSI_IE_RCIE | SSI_IE_RORIE); + uniphier_spi_irq_disable(priv, SSI_IE_RCIE | SSI_IE_RORIE); if (!time_left) { dev_err(dev, "transfer timeout.\n"); -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> To: Mark Brown <broonie@kernel.org>, linux-spi@vger.kernel.org Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>, Masami Hiramatsu <masami.hiramatsu@linaro.org>, Jassi Brar <jaswinder.singh@linaro.org>, Keiji Hayashibara <hayashibara.keiji@socionext.com>, linux-kernel@vger.kernel.org, Masahiro Yamada <yamada.masahiro@socionext.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/5] spi: uniphier: Change argument of irq functions to private structure Date: Tue, 24 Dec 2019 09:58:24 +0900 [thread overview] Message-ID: <1577149107-30670-3-git-send-email-hayashi.kunihiko@socionext.com> (raw) In-Reply-To: <1577149107-30670-1-git-send-email-hayashi.kunihiko@socionext.com> This changes each argument of functions uniphier_irq_{enable,disable}() to uniphier_spi_priv because these functions are used not only for spi_device but also for the entire controller. Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> --- drivers/spi/spi-uniphier.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-uniphier.c b/drivers/spi/spi-uniphier.c index ce9b301..3859649 100644 --- a/drivers/spi/spi-uniphier.c +++ b/drivers/spi/spi-uniphier.c @@ -93,9 +93,9 @@ static inline unsigned int bytes_per_word(unsigned int bits) return bits <= 8 ? 1 : (bits <= 16 ? 2 : 4); } -static inline void uniphier_spi_irq_enable(struct spi_device *spi, u32 mask) +static inline void uniphier_spi_irq_enable(struct uniphier_spi_priv *priv, + u32 mask) { - struct uniphier_spi_priv *priv = spi_master_get_devdata(spi->master); u32 val; val = readl(priv->base + SSI_IE); @@ -103,9 +103,9 @@ static inline void uniphier_spi_irq_enable(struct spi_device *spi, u32 mask) writel(val, priv->base + SSI_IE); } -static inline void uniphier_spi_irq_disable(struct spi_device *spi, u32 mask) +static inline void uniphier_spi_irq_disable(struct uniphier_spi_priv *priv, + u32 mask) { - struct uniphier_spi_priv *priv = spi_master_get_devdata(spi->master); u32 val; val = readl(priv->base + SSI_IE); @@ -346,12 +346,12 @@ static int uniphier_spi_transfer_one_irq(struct spi_master *master, uniphier_spi_fill_tx_fifo(priv); - uniphier_spi_irq_enable(spi, SSI_IE_RCIE | SSI_IE_RORIE); + uniphier_spi_irq_enable(priv, SSI_IE_RCIE | SSI_IE_RORIE); time_left = wait_for_completion_timeout(&priv->xfer_done, msecs_to_jiffies(SSI_TIMEOUT_MS)); - uniphier_spi_irq_disable(spi, SSI_IE_RCIE | SSI_IE_RORIE); + uniphier_spi_irq_disable(priv, SSI_IE_RCIE | SSI_IE_RORIE); if (!time_left) { dev_err(dev, "transfer timeout.\n"); -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-12-24 0:58 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-12-24 0:58 [PATCH 0/5] spi: uniphier: Introduce DMA transfer mode Kunihiko Hayashi 2019-12-24 0:58 ` Kunihiko Hayashi 2019-12-24 0:58 ` [PATCH 1/5] spi: uniphier: Fix FIFO threshold Kunihiko Hayashi 2019-12-24 0:58 ` Kunihiko Hayashi 2019-12-25 0:09 ` Applied "spi: uniphier: Fix FIFO threshold" to the spi tree Mark Brown 2019-12-25 0:09 ` Mark Brown 2019-12-25 0:09 ` Mark Brown 2019-12-24 0:58 ` Kunihiko Hayashi [this message] 2019-12-24 0:58 ` [PATCH 2/5] spi: uniphier: Change argument of irq functions to private structure Kunihiko Hayashi 2019-12-25 0:09 ` Applied "spi: uniphier: Change argument of irq functions to private structure" to the spi tree Mark Brown 2019-12-25 0:09 ` Mark Brown 2019-12-25 0:09 ` Mark Brown 2019-12-24 0:58 ` [PATCH 3/5] spi: uniphier: Add handle_err callback function Kunihiko Hayashi 2019-12-24 0:58 ` Kunihiko Hayashi 2019-12-25 0:09 ` Applied "spi: uniphier: Add handle_err callback function" to the spi tree Mark Brown 2019-12-25 0:09 ` Mark Brown 2019-12-25 0:09 ` Mark Brown 2019-12-24 0:58 ` [PATCH 4/5] spi: uniphier: Add SPI_LOOP to the capabilities Kunihiko Hayashi 2019-12-24 0:58 ` Kunihiko Hayashi 2019-12-25 18:01 ` Mark Brown 2019-12-25 18:01 ` Mark Brown 2019-12-26 1:55 ` Kunihiko Hayashi 2019-12-26 1:55 ` Kunihiko Hayashi 2019-12-24 0:58 ` [PATCH 5/5] spi: uniphier: Add DMA transfer mode support Kunihiko Hayashi 2019-12-24 0:58 ` Kunihiko Hayashi 2019-12-25 18:22 ` Applied "spi: uniphier: Add DMA transfer mode support" to the spi tree Mark Brown 2019-12-25 18:22 ` Mark Brown 2019-12-25 18:22 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1577149107-30670-3-git-send-email-hayashi.kunihiko@socionext.com \ --to=hayashi.kunihiko@socionext.com \ --cc=broonie@kernel.org \ --cc=hayashibara.keiji@socionext.com \ --cc=jaswinder.singh@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-spi@vger.kernel.org \ --cc=masami.hiramatsu@linaro.org \ --cc=yamada.masahiro@socionext.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.