All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mmc: Changed the datatype of the variable to handle 64-bit arch
@ 2018-05-03  6:53 Michal Simek
  2018-05-11 12:57 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Simek @ 2018-05-03  6:53 UTC (permalink / raw)
  To: u-boot

From: Vipul Kumar <vipul.kumar@xilinx.com>

This patch changed the datatype of variable "start" from uint to ulong
to work properly on 64-bit machines as well. Also the return type of
get_timer() function is ulong.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 drivers/mmc/mmc.c   | 4 ++--
 drivers/mmc/sdhci.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index fe7c0b39ac17..cbadba4f7b5a 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -680,7 +680,7 @@ static int mmc_complete_op_cond(struct mmc *mmc)
 {
 	struct mmc_cmd cmd;
 	int timeout = 1000;
-	uint start;
+	ulong start;
 	int err;
 
 	mmc->op_cond_pending = 0;
@@ -2608,7 +2608,7 @@ static int mmc_complete_init(struct mmc *mmc)
 int mmc_init(struct mmc *mmc)
 {
 	int err = 0;
-	__maybe_unused unsigned start;
+	__maybe_unused ulong start;
 #if CONFIG_IS_ENABLED(DM_MMC)
 	struct mmc_uclass_priv *upriv = dev_get_uclass_priv(mmc->dev);
 
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 1e5e8a615917..19ac32b66296 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -152,7 +152,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
 	u32 mask, flags, mode;
 	unsigned int time = 0, start_addr = 0;
 	int mmc_dev = mmc_get_blk_desc(mmc)->devnum;
-	unsigned start = get_timer(0);
+	ulong start = get_timer(0);
 
 	/* Timeout unit - ms */
 	static unsigned int cmd_timeout = SDHCI_CMD_DEFAULT_TIMEOUT;
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] mmc: Changed the datatype of the variable to handle 64-bit arch
  2018-05-03  6:53 [U-Boot] [PATCH] mmc: Changed the datatype of the variable to handle 64-bit arch Michal Simek
@ 2018-05-11 12:57 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2018-05-11 12:57 UTC (permalink / raw)
  To: u-boot

On 3.5.2018 08:53, Michal Simek wrote:
> From: Vipul Kumar <vipul.kumar@xilinx.com>
> 
> This patch changed the datatype of variable "start" from uint to ulong
> to work properly on 64-bit machines as well. Also the return type of
> get_timer() function is ulong.
> 
> Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
>  drivers/mmc/mmc.c   | 4 ++--
>  drivers/mmc/sdhci.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index fe7c0b39ac17..cbadba4f7b5a 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -680,7 +680,7 @@ static int mmc_complete_op_cond(struct mmc *mmc)
>  {
>  	struct mmc_cmd cmd;
>  	int timeout = 1000;
> -	uint start;
> +	ulong start;
>  	int err;
>  
>  	mmc->op_cond_pending = 0;
> @@ -2608,7 +2608,7 @@ static int mmc_complete_init(struct mmc *mmc)
>  int mmc_init(struct mmc *mmc)
>  {
>  	int err = 0;
> -	__maybe_unused unsigned start;
> +	__maybe_unused ulong start;
>  #if CONFIG_IS_ENABLED(DM_MMC)
>  	struct mmc_uclass_priv *upriv = dev_get_uclass_priv(mmc->dev);
>  
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> index 1e5e8a615917..19ac32b66296 100644
> --- a/drivers/mmc/sdhci.c
> +++ b/drivers/mmc/sdhci.c
> @@ -152,7 +152,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
>  	u32 mask, flags, mode;
>  	unsigned int time = 0, start_addr = 0;
>  	int mmc_dev = mmc_get_blk_desc(mmc)->devnum;
> -	unsigned start = get_timer(0);
> +	ulong start = get_timer(0);
>  
>  	/* Timeout unit - ms */
>  	static unsigned int cmd_timeout = SDHCI_CMD_DEFAULT_TIMEOUT;
> 

Based on discussion with Tom applied to xilinx/microblaze tree.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180511/c1fe94ea/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-11 12:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03  6:53 [U-Boot] [PATCH] mmc: Changed the datatype of the variable to handle 64-bit arch Michal Simek
2018-05-11 12:57 ` Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.