linux-next: build failure after merge of the mmc-uh tree
Subsystems (4)
Hi Ulf,
After merging the mmc-uh tree, today's linux-next build (arm multi_v7_defconfig) failed like this:
drivers/mmc/host/dw_mmc.c: In function 'dw_mci_reset':drivers/mmc/host/dw_mmc.c:2262:3: error: implicit declaration of function 'dw_mci_idmac_reset' [-Werror=implicit-function-declaration]
dw_mci_idmac_reset(host);
^
Caused by commit 25f7dadbd982 ("mmc: dw_mmc: change to use recommended reset procedure").
I have used the mmc-uh tree from next-20140725 for today.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Quoted 9 lines · Stephen Rothwell
Hi Ulf,
After merging the mmc-uh tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
drivers/mmc/host/dw_mmc.c: In function 'dw_mci_reset':drivers/mmc/host/dw_mmc.c:2262:3: error: implicit declaration of function 'dw_mci_idmac_reset' [-Werror=implicit-function-declaration]dw_mci_idmac_reset(host); ^
Hi, sorry about that. It looks like it fails to build when CONFIG_MMC_DW_IDMAC is not set.
I changed that bit of code from using #ifdef to using just C if statement, but I think in this case the function being called doesn't exist when CONFIG_MMC_DW_IDMAC is not set, so that was incorrect and we should go back to using something like:
#if IS_ENABLED(CONFIG_MMC_DW_IDMAC)
/* It is also recommended that we reset and reprogram idmac */
dw_mci_idmac_reset(host);#endif
Ulf, I can respin the patch if you'd like or feel free to fix it yourself too. Thanks.
Quoted 8 lines
Caused by commit
25f7dadbd982("mmc:dw_mmc: change to use recommended reset procedure").I have used the mmc-uh tree from next-20140725 for today. --
Cheers,
Stephen Rothwell [email protected]
Quoted 18 lines · Sonny Rao
Quoted 9 lines · Stephen Rothwell
Hi Ulf,
After merging the mmc-uh tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
drivers/mmc/host/dw_mmc.c: In function 'dw_mci_reset':drivers/mmc/host/dw_mmc.c:2262:3: error: implicit declaration of function 'dw_mci_idmac_reset' [-Werror=implicit-function-declaration]dw_mci_idmac_reset(host); ^Hi, sorry about that. It looks like it fails to build when
CONFIG_MMC_DW_IDMACis not set.
I changed that bit of code from using #ifdef to using just C if statement, but I think in this case the function being called doesn't exist whenCONFIG_MMC_DW_IDMACis not set, so that was incorrect and we should go back to using something like:
Quoted 8 lines
#if IS_ENABLED(CONFIG_MMC_DW_IDMAC) /* It is also recommended that we reset and reprogram idmac */ dw_mci_idmac_reset(host);#endif
Ulf, I can respin the patch if you'd like or feel free to fix it yourself too. Thanks.
I haven't got the time to fix this yet, sorry.
It would simplify a bit if you respin the patch, so please do so.
Kind regards
Uffe
Quoted 10 lines
Quoted 10 lines
Caused by commit
25f7dadbd982("mmc:dw_mmc: change to use recommended reset procedure").I have used the mmc-uh tree from next-20140725 for today. --
Cheers,
Stephen Rothwell [email protected]
PATCH 1/1 mmc: dw_mmc: change to use recommended reset procedure
This patch changes the fifo reset code to follow the reset procedure outlined in the documentation of Synopsys Mobile storage host databook.
--- drivers/mmc/host/dw_mmc.c | 87 ++++++++++++++++++++++++++++++++++------------- drivers/mmc/host/dw_mmc.h | 5 +++ 2 files changed, 69 insertions(+), 23 deletions(-)
drivers/mmc/host/dw_mmc.c +64 -23
@@ -111,8 +111,7 @@ static const u8 tuning_blk_pattern_8bit[] = { 0xff, 0x77, 0x77, 0xff, 0x77, 0xbb, 0xdd, 0xee, }; -static inline bool dw_mci_fifo_reset (struct dw_mci *host); -static inline bool dw_mci_ctrl_all_reset (struct dw_mci *host); +static bool dw_mci_reset (struct dw_mci *host);#if defined(CONFIG_DEBUG_FS )static int dw_mci_req_show (struct seq_file *s,void *v)
@@ -1235,7 +1234,7 @@ static int dw_mci_data_complete(struct dw_mci *host, struct mmc_data *data)* After an error, there may be data lingering * in the FIFO */ -dw_mci_fifo_reset (host); +dw_mci_reset (host); }else { data->bytes_xfered = data->blocks * data->blksz; data->error =0 ;
@@ -1352,7 +1351,7 @@ static void dw_mci_tasklet_func(unsigned long priv)/* CMD error in data command */ if (mrq->cmd->error && mrq->data) -dw_mci_fifo_reset (host); +dw_mci_reset (host); host->cmd =NULL ; host->data =NULL ;
@@ -1963,14 +1962,8 @@ static void dw_mci_work_routine_card(struct work_struct *work) }/* Power down slot */ -if (present ==0 ) { -/* Clear down the FIFO */ -dw_mci_fifo_reset (host); -#ifdef CONFIG_MMC_DW_IDMAC -dw_mci_idmac_reset (host); -#endif - - } +if (present ==0 ) +dw_mci_reset (host);spin_unlock_bh (&host->lock);
@@ -2208,8 +2201,11 @@ static bool dw_mci_ctrl_reset(struct dw_mci *host, u32 reset)return false; } -static inline bool dw_mci_fifo_reset (struct dw_mci *host) +static bool dw_mci_reset (struct dw_mci *host) { +u32 flags =SDMMC_CTRL_RESET |SDMMC_CTRL_FIFO_RESET ; +bool ret = false; +/* * Reseting generates a block interrupt, hence setting * the scatter-gather pointer to NULL.
@@ -2219,15 +2215,60 @@ static inline bool dw_mci_fifo_reset(struct dw_mci *host) host->sg =NULL ; } -return dw_mci_ctrl_reset (host,SDMMC_CTRL_FIFO_RESET ); -} +if (host->use_dma) + flags |=SDMMC_CTRL_DMA_RESET ; -static inline bool dw_mci_ctrl_all_reset (struct dw_mci *host) -{ -return dw_mci_ctrl_reset (host, -SDMMC_CTRL_FIFO_RESET | -SDMMC_CTRL_RESET | -SDMMC_CTRL_DMA_RESET ); +if (dw_mci_ctrl_reset (host, flags)) { +/* +* In all cases we clear the RAWINTS register to clear any +* interrupts. +*/ +mci_writel (host,RINTSTS ,0xFFFFFFFF ); + +/* if using dma we wait for dma_req to clear */ +if (host->use_dma) { +unsigned long timeout = jiffies +msecs_to_jiffies (500 ); +u32 status; +do { + status =mci_readl (host,STATUS ); +if (!(status &SDMMC_STATUS_DMA_REQ )) +break ; +cpu_relax (); + }while (time_before (jiffies, timeout)); + +if (status &SDMMC_STATUS_DMA_REQ ) { +dev_err (host->dev, +"%s: Timeout waiting for dma_req to " +"clear during reset\n" , __func__); + goto ciu_out; + } + +/* when using DMA next we reset the fifo again */ +if (!dw_mci_ctrl_reset (host,SDMMC_CTRL_FIFO_RESET )) + goto ciu_out; + } + }else { +/* if the controller reset bit did clear, then set clock regs */ +if (!(mci_readl (host,CTRL ) &SDMMC_CTRL_RESET )) { +dev_err (host->dev,"%s: fifo/dma reset bits didn't " +"clear but ciu was reset, doing clock update\n" , + __func__); + goto ciu_out; + } + } + +#if IS_ENABLED (CONFIG_MMC_DW_IDMAC ) +/* It is also recommended that we reset and reprogram idmac */ +dw_mci_idmac_reset (host); +#endif + + ret = true; + +ciu_out: +/* After a CTRL reset we need to have CIU set clock registers */ +mci_send_cmd (host->cur_slot,SDMMC_CMD_UPD_CLK ,0 ); + +return ret; }#ifdef CONFIG_OF
@@ -2425,7 +2466,7 @@ int dw_mci_probe(struct dw_mci *host) }/* Reset all blocks */ -if (!dw_mci_ctrl_all_reset (host)) +if (!dw_mci_ctrl_reset (host,SDMMC_CTRL_ALL_RESET_FLAGS ))return -ENODEV ; host->dma_ops = host->pdata->dma_ops;
@@ -2612,7 +2653,7 @@ int dw_mci_resume(struct dw_mci *host) } } -if (!dw_mci_ctrl_all_reset (host)) { +if (!dw_mci_ctrl_reset (host,SDMMC_CTRL_ALL_RESET_FLAGS )) { ret = -ENODEV ;return ret; }
drivers/mmc/host/dw_mmc.h +5 -0
@@ -129,6 +129,7 @@#define SDMMC_CMD_INDX (n) ((n) & 0x1F)/* Status register defines */ #define SDMMC_GET_FCNT (x) (((x)>>17) & 0x1FFF) +#define SDMMC_STATUS_DMA_REQ BIT(31)/* FIFOTH register defines */ #define SDMMC_SET_FIFOTH (m, r, t) (((m) & 0x7) << 28 | \ ((r) & 0xFFF) << 16 | \
@@ -150,6 +151,10 @@/* Card read threshold */ #define SDMMC_SET_RD_THLD (v, x) (((v) & 0x1FFF) << 16 | (x)) +/* All ctrl reset bits */ +#define SDMMC_CTRL_ALL_RESET_FLAGS \ + (SDMMC_CTRL_RESET | SDMMC_CTRL_FIFO_RESET | SDMMC_CTRL_DMA_RESET) +/* Register access macros */ #define mci_readl (dev, reg) \ __raw_readl((dev)->regs + SDMMC_##reg)
Signature · 1 line
1.8.3.2
Re: [PATCH] mmc: dw_mmc: change to use recommended reset procedure
Hi,
I remembered that this patch was pushed at Ulf's tree.
Since dw_mci_idmac_reset() is located into #if CONFIG_MMC_DW_IDMAC, it occurred the compiler error.
And it seems that didn't need to use "IS_ENABLED()" at there.
Best Regards,
Jaehoon Chung
Quoted 186 lines · Sonny Rao
This patch changes the fifo reset code to follow the reset procedure outlined in the documentation of Synopsys Mobile storage host databook.
Signed-off-by Sonny Rao <[email protected]>Signed-off-by Yuvaraj Kumar C D <[email protected]>Acked-by Seungwon Jeon <[email protected]>Signed-off-by Ulf Hansson <[email protected]>[sonnyrao: fix compile for !CONFIG_MMC_DW_IDMAC case]--- drivers/mmc/host/dw_mmc.c | 87 ++++++++++++++++++++++++++++++++++------------- drivers/mmc/host/dw_mmc.h | 5 +++ 2 files changed, 69 insertions(+), 23 deletions(-)drivers/mmc/host/dw_mmc.c +64
-23@@ -111,8 +111,7 @@ static const u8 tuning_blk_pattern_8bit[] = { 0xff, 0x77, 0x77, 0xff, 0x77, 0xbb, 0xdd, 0xee, }; -static inline bool dw_mci_fifo_reset (struct dw_mci *host); -static inline bool dw_mci_ctrl_all_reset (struct dw_mci *host); +static bool dw_mci_reset (struct dw_mci *host);#if defined(CONFIG_DEBUG_FS )static int dw_mci_req_show (struct seq_file *s,void *v)@@ -1235,7 +1234,7 @@ static int dw_mci_data_complete(struct dw_mci *host, struct mmc_data *data)* After an error, there may be data lingering * in the FIFO */ -dw_mci_fifo_reset (host); +dw_mci_reset (host); }else { data->bytes_xfered = data->blocks * data->blksz; data->error =0 ;@@ -1352,7 +1351,7 @@ static void dw_mci_tasklet_func(unsigned long priv)/* CMD error in data command */ if (mrq->cmd->error && mrq->data) -dw_mci_fifo_reset (host); +dw_mci_reset (host); host->cmd =NULL ; host->data =NULL ;@@ -1963,14 +1962,8 @@ static void dw_mci_work_routine_card(struct work_struct *work) }/* Power down slot */ -if (present ==0 ) { -/* Clear down the FIFO */ -dw_mci_fifo_reset (host); -#ifdef CONFIG_MMC_DW_IDMAC -dw_mci_idmac_reset (host); -#endif - - } +if (present ==0 ) +dw_mci_reset (host);spin_unlock_bh (&host->lock);@@ -2208,8 +2201,11 @@ static bool dw_mci_ctrl_reset(struct dw_mci *host, u32 reset)return false; } -static inline bool dw_mci_fifo_reset (struct dw_mci *host) +static bool dw_mci_reset (struct dw_mci *host) { +u32 flags =SDMMC_CTRL_RESET |SDMMC_CTRL_FIFO_RESET ; +bool ret = false; +/* * Reseting generates a block interrupt, hence setting * the scatter-gather pointer to NULL. @@ -2219,15 +2215,60 @@ static inline bool dw_mci_fifo_reset(struct dw_mci *host) host->sg =NULL ; } -return dw_mci_ctrl_reset (host,SDMMC_CTRL_FIFO_RESET ); -} +if (host->use_dma) + flags |=SDMMC_CTRL_DMA_RESET ; -static inline bool dw_mci_ctrl_all_reset (struct dw_mci *host) -{ -return dw_mci_ctrl_reset (host, -SDMMC_CTRL_FIFO_RESET | -SDMMC_CTRL_RESET | -SDMMC_CTRL_DMA_RESET ); +if (dw_mci_ctrl_reset (host, flags)) { +/* +* In all cases we clear the RAWINTS register to clear any +* interrupts. +*/ +mci_writel (host,RINTSTS ,0xFFFFFFFF ); + +/* if using dma we wait for dma_req to clear */ +if (host->use_dma) { +unsigned long timeout = jiffies +msecs_to_jiffies (500 ); +u32 status; +do { + status =mci_readl (host,STATUS ); +if (!(status &SDMMC_STATUS_DMA_REQ )) +break ; +cpu_relax (); + }while (time_before (jiffies, timeout)); + +if (status &SDMMC_STATUS_DMA_REQ ) { +dev_err (host->dev, +"%s: Timeout waiting for dma_req to " +"clear during reset\n" , __func__); + goto ciu_out; + } + +/* when using DMA next we reset the fifo again */ +if (!dw_mci_ctrl_reset (host,SDMMC_CTRL_FIFO_RESET )) + goto ciu_out; + } + }else { +/* if the controller reset bit did clear, then set clock regs */ +if (!(mci_readl (host,CTRL ) &SDMMC_CTRL_RESET )) { +dev_err (host->dev,"%s: fifo/dma reset bits didn't " +"clear but ciu was reset, doing clock update\n" , + __func__); + goto ciu_out; + } + } + +#if IS_ENABLED (CONFIG_MMC_DW_IDMAC ) +/* It is also recommended that we reset and reprogram idmac */ +dw_mci_idmac_reset (host); +#endif + + ret = true; + +ciu_out: +/* After a CTRL reset we need to have CIU set clock registers */ +mci_send_cmd (host->cur_slot,SDMMC_CMD_UPD_CLK ,0 ); + +return ret; }#ifdef CONFIG_OF @@ -2425,7 +2466,7 @@ int dw_mci_probe(struct dw_mci *host) }/* Reset all blocks */ -if (!dw_mci_ctrl_all_reset (host)) +if (!dw_mci_ctrl_reset (host,SDMMC_CTRL_ALL_RESET_FLAGS ))return -ENODEV ; host->dma_ops = host->pdata->dma_ops;@@ -2612,7 +2653,7 @@ int dw_mci_resume(struct dw_mci *host) } } -if (!dw_mci_ctrl_all_reset (host)) { +if (!dw_mci_ctrl_reset (host,SDMMC_CTRL_ALL_RESET_FLAGS )) { ret = -ENODEV ;return ret; }drivers/mmc/host/dw_mmc.h +5
-0@@ -129,6 +129,7 @@#define SDMMC_CMD_INDX (n) ((n) & 0x1F)/* Status register defines */ #define SDMMC_GET_FCNT (x) (((x)>>17) & 0x1FFF) +#define SDMMC_STATUS_DMA_REQ BIT(31)/* FIFOTH register defines */ #define SDMMC_SET_FIFOTH (m, r, t) (((m) & 0x7) << 28 | \ ((r) & 0xFFF) << 16 | \@@ -150,6 +151,10 @@/* Card read threshold */ #define SDMMC_SET_RD_THLD (v, x) (((v) & 0x1FFF) << 16 | (x)) +/* All ctrl reset bits */ +#define SDMMC_CTRL_ALL_RESET_FLAGS \ + (SDMMC_CTRL_RESET | SDMMC_CTRL_FIFO_RESET | SDMMC_CTRL_DMA_RESET) +/* Register access macros */ #define mci_readl (dev, reg) \ __raw_readl((dev)->regs + SDMMC_##reg)
Hi all,
Quoted 6 lines · On Mon, 28 Jul 2014 14:46:08 +1000 Stephen Rothwell <[email protected]>…
After merging the mmc-uh tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
drivers/mmc/host/dw_mmc.c: In function 'dw_mci_reset':drivers/mmc/host/dw_mmc.c:2262:3: error: implicit declaration of function 'dw_mci_idmac_reset' [-Werror=implicit-function-declaration]
Quoted 7 lines
dw_mci_idmac_reset(host); ^Caused by commit
25f7dadbd982("mmc:dw_mmc: change to use recommended reset procedure").I have used the mmc-uh tree from next-20140725 for today.
Ping. We are nearly half way through the merge window and there has been a patch posted for this, but the tree is still broken ...
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Quoted 12 lines · Stephen Rothwell
Hi all,
Quoted 9 lines · On Mon, 28 Jul 2014 14:46:08 +1000 Stephen Rothwell <[email protected]>…
After merging the mmc-uh tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
drivers/mmc/host/dw_mmc.c: In function 'dw_mci_reset':drivers/mmc/host/dw_mmc.c:2262:3: error: implicit declaration of function 'dw_mci_idmac_reset' [-Werror=implicit-function-declaration]dw_mci_idmac_reset(host); ^
Quoted 7 lines
Quoted 4 lines
Caused by commit
25f7dadbd982("mmc:dw_mmc: change to use recommended reset procedure").I have used the mmc-uh tree from next-20140725 for today.
Ping. We are nearly half way through the merge window and there has been a patch posted for this, but the tree is still broken ...
Sorry for the delay. I have picked up the new version of the patch now.
Kind regards
Ulf Hansson
Quoted 4 lines
--
Cheers,
Stephen Rothwell [email protected]
Ulf Hansson
AppliedRe: [PATCH] mmc: dw_mmc: change to use recommended reset procedure
In reply to Sonny RaoQuoted 8 lines · Sonny Rao
This patch changes the fifo reset code to follow the reset procedure outlined in the documentation of Synopsys Mobile storage host databook.
Signed-off-by Sonny Rao <[email protected]>Signed-off-by Yuvaraj Kumar C D <[email protected]>Acked-by Seungwon Jeon <[email protected]>Signed-off-by Ulf Hansson <[email protected]>[sonnyrao: fix compile for !CONFIG_MMC_DW_IDMAC case]
Thanks! Applied for next!
Kind regards
Uffe
Quoted 180 lines
--- drivers/mmc/host/dw_mmc.c | 87 ++++++++++++++++++++++++++++++++++------------- drivers/mmc/host/dw_mmc.h | 5 +++ 2 files changed, 69 insertions(+), 23 deletions(-)drivers/mmc/host/dw_mmc.c +64
-23@@ -111,8 +111,7 @@ static const u8 tuning_blk_pattern_8bit[] = { 0xff, 0x77, 0x77, 0xff, 0x77, 0xbb, 0xdd, 0xee, }; -static inline bool dw_mci_fifo_reset (struct dw_mci *host); -static inline bool dw_mci_ctrl_all_reset (struct dw_mci *host); +static bool dw_mci_reset (struct dw_mci *host);#if defined(CONFIG_DEBUG_FS )static int dw_mci_req_show (struct seq_file *s,void *v)@@ -1235,7 +1234,7 @@ static int dw_mci_data_complete(struct dw_mci *host, struct mmc_data *data)* After an error, there may be data lingering * in the FIFO */ -dw_mci_fifo_reset (host); +dw_mci_reset (host); }else { data->bytes_xfered = data->blocks * data->blksz; data->error =0 ;@@ -1352,7 +1351,7 @@ static void dw_mci_tasklet_func(unsigned long priv)/* CMD error in data command */ if (mrq->cmd->error && mrq->data) -dw_mci_fifo_reset (host); +dw_mci_reset (host); host->cmd =NULL ; host->data =NULL ;@@ -1963,14 +1962,8 @@ static void dw_mci_work_routine_card(struct work_struct *work) }/* Power down slot */ -if (present ==0 ) { -/* Clear down the FIFO */ -dw_mci_fifo_reset (host); -#ifdef CONFIG_MMC_DW_IDMAC -dw_mci_idmac_reset (host); -#endif - - } +if (present ==0 ) +dw_mci_reset (host);spin_unlock_bh (&host->lock);@@ -2208,8 +2201,11 @@ static bool dw_mci_ctrl_reset(struct dw_mci *host, u32 reset)return false; } -static inline bool dw_mci_fifo_reset (struct dw_mci *host) +static bool dw_mci_reset (struct dw_mci *host) { +u32 flags =SDMMC_CTRL_RESET |SDMMC_CTRL_FIFO_RESET ; +bool ret = false; +/* * Reseting generates a block interrupt, hence setting * the scatter-gather pointer to NULL. @@ -2219,15 +2215,60 @@ static inline bool dw_mci_fifo_reset(struct dw_mci *host) host->sg =NULL ; } -return dw_mci_ctrl_reset (host,SDMMC_CTRL_FIFO_RESET ); -} +if (host->use_dma) + flags |=SDMMC_CTRL_DMA_RESET ; -static inline bool dw_mci_ctrl_all_reset (struct dw_mci *host) -{ -return dw_mci_ctrl_reset (host, -SDMMC_CTRL_FIFO_RESET | -SDMMC_CTRL_RESET | -SDMMC_CTRL_DMA_RESET ); +if (dw_mci_ctrl_reset (host, flags)) { +/* +* In all cases we clear the RAWINTS register to clear any +* interrupts. +*/ +mci_writel (host,RINTSTS ,0xFFFFFFFF ); + +/* if using dma we wait for dma_req to clear */ +if (host->use_dma) { +unsigned long timeout = jiffies +msecs_to_jiffies (500 ); +u32 status; +do { + status =mci_readl (host,STATUS ); +if (!(status &SDMMC_STATUS_DMA_REQ )) +break ; +cpu_relax (); + }while (time_before (jiffies, timeout)); + +if (status &SDMMC_STATUS_DMA_REQ ) { +dev_err (host->dev, +"%s: Timeout waiting for dma_req to " +"clear during reset\n" , __func__); + goto ciu_out; + } + +/* when using DMA next we reset the fifo again */ +if (!dw_mci_ctrl_reset (host,SDMMC_CTRL_FIFO_RESET )) + goto ciu_out; + } + }else { +/* if the controller reset bit did clear, then set clock regs */ +if (!(mci_readl (host,CTRL ) &SDMMC_CTRL_RESET )) { +dev_err (host->dev,"%s: fifo/dma reset bits didn't " +"clear but ciu was reset, doing clock update\n" , + __func__); + goto ciu_out; + } + } + +#if IS_ENABLED (CONFIG_MMC_DW_IDMAC ) +/* It is also recommended that we reset and reprogram idmac */ +dw_mci_idmac_reset (host); +#endif + + ret = true; + +ciu_out: +/* After a CTRL reset we need to have CIU set clock registers */ +mci_send_cmd (host->cur_slot,SDMMC_CMD_UPD_CLK ,0 ); + +return ret; }#ifdef CONFIG_OF @@ -2425,7 +2466,7 @@ int dw_mci_probe(struct dw_mci *host) }/* Reset all blocks */ -if (!dw_mci_ctrl_all_reset (host)) +if (!dw_mci_ctrl_reset (host,SDMMC_CTRL_ALL_RESET_FLAGS ))return -ENODEV ; host->dma_ops = host->pdata->dma_ops;@@ -2612,7 +2653,7 @@ int dw_mci_resume(struct dw_mci *host) } } -if (!dw_mci_ctrl_all_reset (host)) { +if (!dw_mci_ctrl_reset (host,SDMMC_CTRL_ALL_RESET_FLAGS )) { ret = -ENODEV ;return ret; }drivers/mmc/host/dw_mmc.h +5
-1@@ -129,6 +129,7 @@#define SDMMC_CMD_INDX (n) ((n) & 0x1F)/* Status register defines */ #define SDMMC_GET_FCNT (x) (((x)>>17) & 0x1FFF) +#define SDMMC_STATUS_DMA_REQ BIT(31)/* FIFOTH register defines */ #define SDMMC_SET_FIFOTH (m, r, t) (((m) & 0x7) << 28 | \ ((r) & 0xFFF) << 16 | \@@ -150,6 +151,10 @@/* Card read threshold */ #define SDMMC_SET_RD_THLD (v, x) (((v) & 0x1FFF) << 16 | (x)) +/* All ctrl reset bits */ +#define SDMMC_CTRL_ALL_RESET_FLAGS \ + (SDMMC_CTRL_RESET | SDMMC_CTRL_FIFO_RESET | SDMMC_CTRL_DMA_RESET) +/* Register access macros */ #define mci_readl (dev, reg) \ __raw_readl((dev)->regs + SDMMC_##reg) --1.8.3.2