From: <Tudor.Ambarus@microchip.com>
To: <robh+dt@kernel.org>, <mark.rutland@arm.com>,
<Nicolas.Ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
<Ludovic.Desroches@microchip.com>, <dwmw2@infradead.org>,
<computersforpeace@gmail.com>, <bbrezillon@kernel.org>,
<marek.vasut@gmail.com>, <richard@nod.at>,
<miquel.raynal@bootlin.com>, <lee.jones@linaro.org>
Cc: <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-mtd@lists.infradead.org>,
<Tudor.Ambarus@microchip.com>
Subject: [PATCH 08/11] memory: atmel-ebi: move NUM_CS definition inside atmel-ebi
Date: Wed, 13 Feb 2019 09:00:08 +0000 [thread overview]
Message-ID: <20190213085930.31578-9-tudor.ambarus@microchip.com> (raw)
In-Reply-To: <20190213085930.31578-1-tudor.ambarus@microchip.com>
From: Tudor Ambarus <tudor.ambarus@microchip.com>
The total number of cs lines is described by the EBI controller
and not by the matrix. Move the definition for the number of cs
inside ebi driver. Drop "matrix" from its name.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
drivers/memory/atmel-ebi.c | 6 ++++--
include/linux/mfd/syscon/atmel-matrix.h | 1 -
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index 0322df9dc249..8515196c2b03 100644
--- a/drivers/memory/atmel-ebi.c
+++ b/drivers/memory/atmel-ebi.c
@@ -19,6 +19,8 @@
#include <linux/regmap.h>
#include <soc/at91/atmel-sfr.h>
+#define AT91_EBI_NUM_CS 8
+
struct atmel_ebi_dev_config {
int cs;
struct atmel_smc_cs_conf smcconf;
@@ -314,7 +316,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np,
if (ret)
return ret;
- if (cs >= AT91_MATRIX_EBI_NUM_CS ||
+ if (cs >= AT91_EBI_NUM_CS ||
!(ebi->caps->available_cs & BIT(cs))) {
dev_err(dev, "invalid reg property in %pOF\n", np);
return -EINVAL;
@@ -344,7 +346,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np,
apply = true;
i = 0;
- for_each_set_bit(cs, &cslines, AT91_MATRIX_EBI_NUM_CS) {
+ for_each_set_bit(cs, &cslines, AT91_EBI_NUM_CS) {
ebid->configs[i].cs = cs;
if (apply) {
diff --git a/include/linux/mfd/syscon/atmel-matrix.h b/include/linux/mfd/syscon/atmel-matrix.h
index 8293c3e2a82a..1e2cd118e4e3 100644
--- a/include/linux/mfd/syscon/atmel-matrix.h
+++ b/include/linux/mfd/syscon/atmel-matrix.h
@@ -110,7 +110,6 @@
#define AT91_MATRIX_DDR_IOSR BIT(18)
#define AT91_MATRIX_NFD0_SELECT BIT(24)
#define AT91_MATRIX_DDR_MP_EN BIT(25)
-#define AT91_MATRIX_EBI_NUM_CS 8
#define AT91_MATRIX_USBPUCR_PUON BIT(30)
--
2.9.5
next prev parent reply other threads:[~2019-02-13 9:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-13 8:59 [PATCH 00/11] add support for sam9x60 nand controller Tudor.Ambarus
2019-02-13 8:59 ` [PATCH 01/11] ARM: at91: add sam9x60 SFR definitions Tudor.Ambarus
2019-02-13 10:52 ` Alexandre Belloni
2019-02-13 8:59 ` [PATCH 02/11] memory: atmel-ebi: add generic name for ebi regmap Tudor.Ambarus
2019-02-13 10:53 ` Alexandre Belloni
2019-02-13 8:59 ` [PATCH 03/11] dt-bindings: memory: atmel-ebi: add sam9x60 compatible Tudor.Ambarus
2019-02-13 10:53 ` Alexandre Belloni
2019-02-28 18:24 ` Rob Herring
2019-02-13 8:59 ` [PATCH 04/11] memory: atmel-ebi: add sam9x60 EBI support Tudor.Ambarus
2019-02-13 10:54 ` Alexandre Belloni
2019-02-13 8:59 ` [PATCH 05/11] mtd: rawnand: atmel: add generic name for EBICSA regmap Tudor.Ambarus
2019-02-13 9:00 ` [PATCH 06/11] dt-bindings: mtd: atmel-nand: add sam9x60 compatible Tudor.Ambarus
2019-02-28 18:24 ` Rob Herring
2019-02-13 9:00 ` [PATCH 07/11] mtd: rawnand: atmel: add sam9x60 nand controller support Tudor.Ambarus
2019-02-13 10:39 ` Alexandre Belloni
2019-02-13 10:54 ` Tudor.Ambarus
2019-02-13 9:00 ` Tudor.Ambarus [this message]
2019-02-13 9:00 ` [PATCH 09/11] mfd: syscon: atmel: switch to SPDX license identifiers Tudor.Ambarus
2019-04-03 10:08 ` Lee Jones
2019-02-13 9:00 ` [PATCH 10/11] memory: atmel-ebi: " Tudor.Ambarus
2019-02-13 9:00 ` [PATCH 11/11] mtd: rawnand: atmel: " Tudor.Ambarus
2019-04-01 15:24 ` [PATCH 00/11] add support for sam9x60 nand controller Miquel Raynal
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=20190213085930.31578-9-tudor.ambarus@microchip.com \
--to=tudor.ambarus@microchip.com \
--cc=Ludovic.Desroches@microchip.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=bbrezillon@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=mark.rutland@arm.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®