From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/6] mxs: dma: Fix APBH DMA driver for MX23
Date: Thu, 24 Jan 2013 19:27:29 +0100 [thread overview]
Message-ID: <201301241927.29446.marex@denx.de> (raw)
In-Reply-To: <51017BEC.7070500@denx.de>
Dear Stefano Babic,
> On 23/01/2013 02:01, Marek Vasut wrote:
> > The MX23 has less channels for the APBH DMA, sligtly different register
> > layout and some bits in those registers are placed differently. Reflect
> > this in the driver. This patch fixes MMC/DMA issue on MX23.
> >
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Otavio Salvador <otavio@ossystems.com.br>
> > Cc: Fabio Estevam <fabio.estevam@freescale.com>
> > Cc: Stefano Babic <sbabic@denx.de>
> > ---
> >
> > arch/arm/include/asm/arch-mxs/regs-apbh.h | 121
> > +++++++++++++++++++++++++++++ drivers/dma/apbh_dma.c
> > | 10 ++-
> > 2 files changed, 129 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/include/asm/arch-mxs/regs-apbh.h
> > b/arch/arm/include/asm/arch-mxs/regs-apbh.h index e18e677..fcef4b8
> > 100644
> > --- a/arch/arm/include/asm/arch-mxs/regs-apbh.h
> > +++ b/arch/arm/include/asm/arch-mxs/regs-apbh.h
> > @@ -29,6 +29,87 @@
> >
> > #include <asm/arch/regs-common.h>
> >
> > #ifndef __ASSEMBLY__
> >
> > +
> > +#if defined(CONFIG_MX23)
> > +struct mxs_apbh_regs {
> > + mxs_reg_32(hw_apbh_ctrl0)
> > + mxs_reg_32(hw_apbh_ctrl1)
> > + mxs_reg_32(hw_apbh_ctrl2)
> > + mxs_reg_32(hw_apbh_channel_ctrl)
>
> I see there are diffrent definitions, but why do not we set a common
> name (as an alias) ?
>
> Such as:
> #define hw_ahph_ctrl_set hw_apbh_ctrl0
>
> > +#if defined(CONFIG_MX23)
> > + uint32_t setreg = (uint32_t)(&apbh_regs->hw_apbh_ctrl0_set);
> > + uint32_t offset = APBH_CTRL0_RESET_CHANNEL_OFFSET;
>
> and we could drop the #ifdef in the driver file.
Oh this junk. On mx23, this bitfield is located in ctrl0 at offset 16 ; on mx28
there's a dedicated register for this bitfield (since mx28 has 16 dma channels,
mx23 has only 8).
So it's a bit confusing, but that's how it has to be done.
Best regards,
Marek Vasut
next prev parent reply other threads:[~2013-01-24 18:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 1:01 [U-Boot] [PATCH 1/6] mxs: dma: Fix APBH DMA driver for MX23 Marek Vasut
2013-01-23 1:01 ` [U-Boot] [PATCH 2/6] mxs: ssp: Add SSP registers map " Marek Vasut
2013-01-23 1:01 ` [U-Boot] [PATCH 3/6] mxs: mmc: Fix MMC reset on iMX23 Marek Vasut
2013-01-23 1:01 ` [U-Boot] [PATCH 4/6] mxs: mmc: Allow overriding default card detect implementation Marek Vasut
2013-01-24 18:27 ` Stefano Babic
2013-01-24 18:29 ` Marek Vasut
2013-01-24 18:33 ` Stefano Babic
2013-01-24 18:39 ` Marek Vasut
2013-01-24 18:34 ` Marek Vasut
2013-01-28 5:30 ` Stefano Babic
2013-01-23 1:01 ` [U-Boot] [PATCH 5/6] mxs: mmc: Fix the MMC driver for MX23 Marek Vasut
2013-01-23 1:01 ` [U-Boot] [PATCH 6/6] mxs: mmc: mx23_olinuxino: Add MMC support Marek Vasut
2013-01-23 1:23 ` Fabio Estevam
2013-01-23 3:33 ` Marek Vasut
2013-01-23 3:51 ` Fabio Estevam
2013-01-23 12:24 ` Otavio Salvador
2013-01-24 18:22 ` [U-Boot] [PATCH 1/6] mxs: dma: Fix APBH DMA driver for MX23 Stefano Babic
2013-01-24 18:27 ` Marek Vasut [this message]
2013-01-28 10:53 ` 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=201301241927.29446.marex@denx.de \
--to=marex@denx.de \
--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 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.