History

memory: atmel-ebi: move NUM_CS definition inside EBI driver

The total number of EBI CS lines is described by the EBI controller and not by the Matrix. Move the definition for the number of CS inside EBI driver.

Tudor Ambarus committed 7 years ago

Commit dbbf9831 parent 02c1c372 files · +4 −3Browse files

Unified · Split

2 files
  1. drivers/memory/atmel-ebi.c +4 −2
  2. include/linux/mfd/syscon/atmel-matrix.h +0 −1
drivers/memory/atmel-ebi.c+4−2
@@ -19,6 +19,8 @@ · 18 unmodified lines
1919 #include <linux/regmap.h>
2020 #include <soc/at91/atmel-sfr.h>
2121
22+#define AT91_EBI_NUM_CS 8
23+
2224 struct atmel_ebi_dev_config {
2325 int cs;
2426 struct atmel_smc_cs_conf smcconf;
@@ -314,7 +316,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np, · 289 unmodified lines
314316 if (ret)
315317 return ret;
316318
317− if (cs >= AT91_MATRIX_EBI_NUM_CS ||
319+ if (cs >= AT91_EBI_NUM_CS ||
318320 !(ebi->caps->available_cs & BIT(cs))) {
319321 dev_err(dev, "invalid reg property in %pOF\n", np);
320322 return -EINVAL;
@@ -344,7 +346,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np, · 23 unmodified lines
344346 apply = true;
345347
346348 i = 0;
347− for_each_set_bit(cs, &cslines, AT91_MATRIX_EBI_NUM_CS) {
349+ for_each_set_bit(cs, &cslines, AT91_EBI_NUM_CS) {
348350 ebid->configs[i].cs = cs;
349351
350352 if (apply) {
include/linux/mfd/syscon/atmel-matrix.h+0−1
@@ -106,7 +106,6 @@ · 105 unmodified lines
106106 #define AT91_MATRIX_DDR_IOSR BIT(18)
107107 #define AT91_MATRIX_NFD0_SELECT BIT(24)
108108 #define AT91_MATRIX_DDR_MP_EN BIT(25)
109−#define AT91_MATRIX_EBI_NUM_CS 8
110109
111110 #define AT91_MATRIX_USBPUCR_PUON BIT(30)
112111

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t