From: Roy Pledge <roy.pledge@nxp.com>
To: <linuxppc-dev@lists.ozlabs.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <oss@buserror.net>,
<robin.murphy@arm.com>
Cc: <madalin.bucur@nxp.com>, <roy.pledge@nxp.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>
Subject: [PATCH v3 04/11] soc/fsl/qbman: Drop set/clear_bits usage
Date: Mon, 1 May 2017 17:30:06 -0400 [thread overview]
Message-ID: <1493674213-963-5-git-send-email-roy.pledge@nxp.com> (raw)
In-Reply-To: <1493674213-963-1-git-send-email-roy.pledge@nxp.com>
From: Madalin Bucur <madalin.bucur@nxp.com>
Replace PPC specific set/clear_bits API with standard
bit twiddling so driver is portalable outside PPC.
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
drivers/soc/fsl/qbman/bman.c | 2 +-
drivers/soc/fsl/qbman/qman.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/soc/fsl/qbman/bman.c b/drivers/soc/fsl/qbman/bman.c
index a3d6d7c..3acded1 100644
--- a/drivers/soc/fsl/qbman/bman.c
+++ b/drivers/soc/fsl/qbman/bman.c
@@ -607,7 +607,7 @@ int bman_p_irqsource_add(struct bman_portal *p, u32 bits)
unsigned long irqflags;
local_irq_save(irqflags);
- set_bits(bits & BM_PIRQ_VISIBLE, &p->irq_sources);
+ p->irq_sources |= bits & BM_PIRQ_VISIBLE;
bm_out(&p->p, BM_REG_IER, p->irq_sources);
local_irq_restore(irqflags);
return 0;
diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index 3d891db..3f60289 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -909,12 +909,12 @@ static inline int qm_mc_result_timeout(struct qm_portal *portal,
static inline void fq_set(struct qman_fq *fq, u32 mask)
{
- set_bits(mask, &fq->flags);
+ fq->flags |= mask;
}
static inline void fq_clear(struct qman_fq *fq, u32 mask)
{
- clear_bits(mask, &fq->flags);
+ fq->flags &= ~mask;
}
static inline int fq_isset(struct qman_fq *fq, u32 mask)
@@ -1561,7 +1561,7 @@ void qman_p_irqsource_add(struct qman_portal *p, u32 bits)
unsigned long irqflags;
local_irq_save(irqflags);
- set_bits(bits & QM_PIRQ_VISIBLE, &p->irq_sources);
+ p->irq_sources |= bits & QM_PIRQ_VISIBLE;
qm_out(&p->p, QM_REG_IER, p->irq_sources);
local_irq_restore(irqflags);
}
@@ -1584,7 +1584,7 @@ void qman_p_irqsource_remove(struct qman_portal *p, u32 bits)
*/
local_irq_save(irqflags);
bits &= QM_PIRQ_VISIBLE;
- clear_bits(bits, &p->irq_sources);
+ p->irq_sources &= ~bits;
qm_out(&p->p, QM_REG_IER, p->irq_sources);
ier = qm_in(&p->p, QM_REG_IER);
/*
--
2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: roy.pledge@nxp.com (Roy Pledge)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 04/11] soc/fsl/qbman: Drop set/clear_bits usage
Date: Mon, 1 May 2017 17:30:06 -0400 [thread overview]
Message-ID: <1493674213-963-5-git-send-email-roy.pledge@nxp.com> (raw)
In-Reply-To: <1493674213-963-1-git-send-email-roy.pledge@nxp.com>
From: Madalin Bucur <madalin.bucur@nxp.com>
Replace PPC specific set/clear_bits API with standard
bit twiddling so driver is portalable outside PPC.
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
drivers/soc/fsl/qbman/bman.c | 2 +-
drivers/soc/fsl/qbman/qman.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/soc/fsl/qbman/bman.c b/drivers/soc/fsl/qbman/bman.c
index a3d6d7c..3acded1 100644
--- a/drivers/soc/fsl/qbman/bman.c
+++ b/drivers/soc/fsl/qbman/bman.c
@@ -607,7 +607,7 @@ int bman_p_irqsource_add(struct bman_portal *p, u32 bits)
unsigned long irqflags;
local_irq_save(irqflags);
- set_bits(bits & BM_PIRQ_VISIBLE, &p->irq_sources);
+ p->irq_sources |= bits & BM_PIRQ_VISIBLE;
bm_out(&p->p, BM_REG_IER, p->irq_sources);
local_irq_restore(irqflags);
return 0;
diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index 3d891db..3f60289 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -909,12 +909,12 @@ static inline int qm_mc_result_timeout(struct qm_portal *portal,
static inline void fq_set(struct qman_fq *fq, u32 mask)
{
- set_bits(mask, &fq->flags);
+ fq->flags |= mask;
}
static inline void fq_clear(struct qman_fq *fq, u32 mask)
{
- clear_bits(mask, &fq->flags);
+ fq->flags &= ~mask;
}
static inline int fq_isset(struct qman_fq *fq, u32 mask)
@@ -1561,7 +1561,7 @@ void qman_p_irqsource_add(struct qman_portal *p, u32 bits)
unsigned long irqflags;
local_irq_save(irqflags);
- set_bits(bits & QM_PIRQ_VISIBLE, &p->irq_sources);
+ p->irq_sources |= bits & QM_PIRQ_VISIBLE;
qm_out(&p->p, QM_REG_IER, p->irq_sources);
local_irq_restore(irqflags);
}
@@ -1584,7 +1584,7 @@ void qman_p_irqsource_remove(struct qman_portal *p, u32 bits)
*/
local_irq_save(irqflags);
bits &= QM_PIRQ_VISIBLE;
- clear_bits(bits, &p->irq_sources);
+ p->irq_sources &= ~bits;
qm_out(&p->p, QM_REG_IER, p->irq_sources);
ier = qm_in(&p->p, QM_REG_IER);
/*
--
2.7.4
next prev parent reply other threads:[~2017-05-01 21:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-01 21:30 [PATCH v3 00/11] soc/fsl/qbman: Enable QBMan on ARM Platforms Roy Pledge
2017-05-01 21:30 ` Roy Pledge
2017-05-01 21:30 ` [PATCH v3 01/11] soc/fsl/qbman: Use shared-dma-pool for BMan private memory allocations Roy Pledge
2017-05-01 21:30 ` Roy Pledge
2017-05-01 21:30 ` [PATCH v3 02/11] soc/fsl/qbman: Use shared-dma-pool for QMan " Roy Pledge
2017-05-01 21:30 ` Roy Pledge
2017-05-01 21:30 ` [PATCH v3 03/11] dt-bindings: soc/fsl: Update reserved memory binding for QBMan Roy Pledge
2017-05-01 21:30 ` Roy Pledge
2017-05-01 21:30 ` Roy Pledge [this message]
2017-05-01 21:30 ` [PATCH v3 04/11] soc/fsl/qbman: Drop set/clear_bits usage Roy Pledge
2017-05-01 21:30 ` [PATCH v3 05/11] soc/fsl/qbman: Drop L1_CACHE_BYTES compile time check Roy Pledge
2017-05-01 21:30 ` Roy Pledge
2017-05-01 21:30 ` [PATCH v3 06/11] soc/fsl/qbman: Fix ARM32 typo Roy Pledge
2017-05-01 21:30 ` Roy Pledge
2017-05-01 21:30 ` [PATCH v3 07/11] soc/fsl/qbman: Rework ioremap() calls for ARM/PPC Roy Pledge
2017-05-01 21:30 ` Roy Pledge
2017-05-01 21:30 ` [PATCH v3 08/11] soc/fsl/qbman: add QMAN_REV32 Roy Pledge
2017-05-01 21:30 ` Roy Pledge
2017-05-01 21:30 ` [PATCH v3 09/11] soc/fsl/qbman: different register offsets on ARM Roy Pledge
2017-05-01 21:30 ` Roy Pledge
2017-05-01 21:30 ` [PATCH v3 10/11] soc/fsl/qbman: Add missing headers " Roy Pledge
2017-05-01 21:30 ` Roy Pledge
2017-05-01 21:30 ` [PATCH v3 11/11] fsl/soc/qbman: Enable FSL_LAYERSCAPE config " Roy Pledge
2017-05-01 21:30 ` Roy Pledge
2017-05-16 5:41 ` [PATCH v3 00/11] soc/fsl/qbman: Enable QBMan on ARM Platforms Scott Wood
2017-05-16 5:41 ` Scott Wood
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=1493674213-963-5-git-send-email-roy.pledge@nxp.com \
--to=roy.pledge@nxp.com \
--cc=claudiu.manoil@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=madalin.bucur@nxp.com \
--cc=oss@buserror.net \
--cc=robin.murphy@arm.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: link
Be 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.