From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] MX28: DMA: Prolong the DMA timeout
Date: Wed, 22 Aug 2012 21:55:43 +0200 [thread overview]
Message-ID: <201208222155.44018.marek.vasut@gmail.com> (raw)
In-Reply-To: <CAOMZO5CobU64+VyT1ao_VH13ZkketBPypnnX=KM0NsTewrYd+g@mail.gmail.com>
Dear Fabio Estevam,
> On Wed, Aug 22, 2012 at 2:42 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > Dear Fabio Estevam,
> >
> >> On Tue, Aug 21, 2012 at 11:17 PM, Marek Vasut <marex@denx.de> wrote:
> >> > int mxs_dma_go(int chan)
> >> > {
> >> >
> >> > - uint32_t timeout = 10000;
> >> > + uint32_t timeout = 10000000;
> >>
> >> Should we use a proper timeout mechanism instead?
> >
> > What would that be? I think 10 seconds is more than plenty for now.
>
> Ok, but we need to change to unsigned int to be able to fit 10000000:
Do we? 10M still fits in ... but it's indeed a good idea, can you submit a patch
for that please?
> --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
> @@ -81,7 +81,8 @@ void enable_caches(void)
> #endif
> }
>
> -int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int
> timeout) +int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t
> mask, unsigned +
> int timeout) {
> while (--timeout) {
> if ((readl(®->reg) & mask) == mask)
> @@ -92,7 +93,8 @@ int mxs_wait_mask_set(struct mxs_register_32 *reg,
> uint32_t ma return !timeout;
> }
>
> -int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, int
> timeout) +int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t
> mask, unsigned +
> int timeout) {
> while (--timeout) {
> if ((readl(®->reg) & mask) == 0)
> diff --git a/arch/arm/include/asm/arch-mxs/sys_proto.h
> b/arch/arm/include/asm/ar index 4610363..983b888 100644
> --- a/arch/arm/include/asm/arch-mxs/sys_proto.h
> +++ b/arch/arm/include/asm/arch-mxs/sys_proto.h
> @@ -26,10 +26,10 @@
> int mxs_reset_block(struct mxs_register_32 *reg);
> int mxs_wait_mask_set(struct mxs_register_32 *reg,
> uint32_t mask,
> - int timeout);
> + unsigned int timeout);
> int mxs_wait_mask_clr(struct mxs_register_32 *reg,
> uint32_t mask,
> - int timeout);
> + unsigned int timeout);
>
> int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int));
>
> Regards,
>
> Fabio Estevam
Best regards,
Marek Vasut
next prev parent reply other threads:[~2012-08-22 19:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 2:17 [U-Boot] [PATCH 1/5] MX28: DMA: Align the struct mxs_dma_desc Marek Vasut
2012-08-22 2:17 ` [U-Boot] [PATCH 2/5] MX28: DMA: Prolong the DMA timeout Marek Vasut
2012-08-22 15:33 ` Fabio Estevam
2012-08-22 17:42 ` Marek Vasut
2012-08-22 18:53 ` Fabio Estevam
2012-08-22 19:55 ` Marek Vasut [this message]
2012-08-22 2:17 ` [U-Boot] [PATCH 3/5] MX28: SPI: Supercharge the SPI driver Marek Vasut
2012-08-22 15:30 ` Mike Frysinger
2012-08-22 17:43 ` Marek Vasut
2012-08-22 21:24 ` Mike Frysinger
2012-08-22 2:17 ` [U-Boot] [PATCH 4/5] MX28: m28evk: Align SSP clock speed Marek Vasut
2012-08-22 2:17 ` [U-Boot] [PATCH 5/5] MX28: m28evk: Enable SPI DMA Marek Vasut
2012-08-27 6:09 ` [U-Boot] [PATCH 1/5] MX28: DMA: Align the struct mxs_dma_desc Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201208222155.44018.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox