Linux uses SDHCI_MAX_DIV_SPEC_200 for what we have SDHCI_SPEC_200_MAX_CLK_DIVIDER. Also we have SDHCI_MAX_DIV_SPEC_300 defined in the arasan driver. Use the Linux defines and add them both to the header file. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/mci/arasan-sdhci.c | 2 -- drivers/mci/dove-sdhci.c | 2 +- drivers/mci/sdhci.h | 4 +++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mci/arasan-sdhci.c b/drivers/mci/arasan-sdhci.c index 53492e10d4..e22db4cfa3 100644 --- a/drivers/mci/arasan-sdhci.c +++ b/drivers/mci/arasan-sdhci.c @@ -152,8 +152,6 @@ static int arasan_sdhci_init(struct mci_host *mci, struct device_d *dev) return 0; } -#define SDHCI_MAX_DIV_SPEC_300 2046 - static u16 arasan_sdhci_get_clock_divider(struct arasan_sdhci_host *host, unsigned int reqclk) { diff --git a/drivers/mci/dove-sdhci.c b/drivers/mci/dove-sdhci.c index 945c4bb4b1..9c10e67eb8 100644 --- a/drivers/mci/dove-sdhci.c +++ b/drivers/mci/dove-sdhci.c @@ -197,7 +197,7 @@ static u16 dove_sdhci_get_clock_divider(struct dove_sdhci *host, u32 reqclk) { u16 div; - for (div = 1; div < SDHCI_SPEC_200_MAX_CLK_DIVIDER; div *= 2) + for (div = 1; div < SDHCI_MAX_DIV_SPEC_200; div *= 2) if ((host->mci.f_max / div) <= reqclk) break; div /= 2; diff --git a/drivers/mci/sdhci.h b/drivers/mci/sdhci.h index fd63cd84de..aa6dd9824e 100644 --- a/drivers/mci/sdhci.h +++ b/drivers/mci/sdhci.h @@ -139,9 +139,11 @@ #define SDHCI_CLOCK_MUL_SHIFT 16 -#define SDHCI_SPEC_200_MAX_CLK_DIVIDER 256 #define SDHCI_MMC_BOOT 0xC4 +#define SDHCI_MAX_DIV_SPEC_200 256 +#define SDHCI_MAX_DIV_SPEC_300 2046 + struct sdhci { u32 (*read32)(struct sdhci *host, int reg); u16 (*read16)(struct sdhci *host, int reg); -- 2.29.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox