Patchwork [U-Boot] imx6: mx6qarm2: updated

login
register
mail settings
Submitter Stefano Babic
Date Jan. 17, 2012, 11:18 a.m.
Message ID <1326799121-28403-1-git-send-email-sbabic@denx.de>
Download mbox | patch
Permalink /patch/136451/
State Changes Requested
Headers show

Comments

Stefano Babic - Jan. 17, 2012, 11:18 a.m.
Commit 314284b1567f1ce29c19060641e7f213146f7ab8 has
changed board_mmc_getcd() function prototype, while
mx6qarm2 has still the old one.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Jason Liu <jason.hui@linaro.org>
---
 board/freescale/mx6qarm2/mx6qarm2.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
Dirk Behme - Jan. 17, 2012, 11:50 a.m.
On 17.01.2012 12:18, Stefano Babic wrote:
> Commit 314284b1567f1ce29c19060641e7f213146f7ab8 has
> changed board_mmc_getcd() function prototype, while
> mx6qarm2 has still the old one.
> 
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> CC: Jason Liu <jason.hui@linaro.org>

Acked-by: Dirk Behme <dirk.behme@de.bosch.com>

Thanks

Dirk
Fabio Estevam - Jan. 17, 2012, 12:03 p.m.
Hi Stefano,

On Tue, Jan 17, 2012 at 9:18 AM, Stefano Babic <sbabic@denx.de> wrote:
> Commit 314284b1567f1ce29c19060641e7f213146f7ab8 has
> changed board_mmc_getcd() function prototype, while
> mx6qarm2 has still the old one.
>
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> CC: Jason Liu <jason.hui@linaro.org>

I think the subject of the patch could be improved.

Writing only "updated" in the subject is too vague.

Regards,

Fabio Estevam
Stefano Babic - Jan. 17, 2012, 1:11 p.m.
On 17/01/2012 13:03, Fabio Estevam wrote:
> Hi Stefano,
> 
> On Tue, Jan 17, 2012 at 9:18 AM, Stefano Babic <sbabic@denx.de> wrote:
>> Commit 314284b1567f1ce29c19060641e7f213146f7ab8 has
>> changed board_mmc_getcd() function prototype, while
>> mx6qarm2 has still the old one.
>>
>> Signed-off-by: Stefano Babic <sbabic@denx.de>
>> CC: Jason Liu <jason.hui@linaro.org>
> 
> I think the subject of the patch could be improved.

...one part was lost editing the commit message - I will send V2.

Stefano

Patch

diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c
index 9894245..9724c16 100644
--- a/board/freescale/mx6qarm2/mx6qarm2.c
+++ b/board/freescale/mx6qarm2/mx6qarm2.c
@@ -120,17 +120,18 @@  struct fsl_esdhc_cfg usdhc_cfg[2] = {
 	{USDHC4_BASE_ADDR, 1},
 };
 
-int board_mmc_getcd(u8 *cd, struct mmc *mmc)
+int board_mmc_getcd(struct mmc *mmc)
 {
 	struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
+	int ret;
 
 	if (cfg->esdhc_base == USDHC3_BASE_ADDR) {
 		gpio_direction_input(171); /*GPIO6_11*/
-		*cd = gpio_get_value(171);
+		ret = !gpio_get_value(171);
 	} else /* Don't have the CD GPIO pin on board */
-		*cd = 0;
+		ret = 0;
 
-	return 0;
+	return ret;
 }
 
 int board_mmc_init(bd_t *bis)