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
19#include <linux/regmap.h>19#include <linux/regmap.h>
20#include <soc/at91/atmel-sfr.h>20#include <soc/at91/atmel-sfr.h>
21 21
22#define AT91_EBI_NUM_CS 8
23
22struct atmel_ebi_dev_config {24struct atmel_ebi_dev_config {
23 int cs;25 int cs;
24 struct atmel_smc_cs_conf smcconf;26 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
314 if (ret)316 if (ret)
315 return ret;317 return ret;
316 318
317 if (cs >= AT91_MATRIX_EBI_NUM_CS ||319 if (cs >= AT91_EBI_NUM_CS ||
318 !(ebi->caps->available_cs & BIT(cs))) {320 !(ebi->caps->available_cs & BIT(cs))) {
319 dev_err(dev, "invalid reg property in %pOF\n", np);321 dev_err(dev, "invalid reg property in %pOF\n", np);
320 return -EINVAL;322 return -EINVAL;
@@ -344,7 +346,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np, · 23 unmodified lines
344 apply = true;346 apply = true;
345 347
346 i = 0;348 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) {
348 ebid->configs[i].cs = cs;350 ebid->configs[i].cs = cs;
349 351
350 if (apply) {352 if (apply) {
include/linux/mfd/syscon/atmel-matrix.h+0−1
@@ -106,7 +106,6 @@ · 105 unmodified lines
106#define AT91_MATRIX_DDR_IOSR BIT(18)106#define AT91_MATRIX_DDR_IOSR BIT(18)
107#define AT91_MATRIX_NFD0_SELECT BIT(24)107#define AT91_MATRIX_NFD0_SELECT BIT(24)
108#define AT91_MATRIX_DDR_MP_EN BIT(25)108#define AT91_MATRIX_DDR_MP_EN BIT(25)
109#define AT91_MATRIX_EBI_NUM_CS 8
110 109
111#define AT91_MATRIX_USBPUCR_PUON BIT(30)110#define AT91_MATRIX_USBPUCR_PUON BIT(30)
112 111

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