From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Thu, 24 Jan 2013 19:22:36 +0100 Subject: [U-Boot] [PATCH 1/6] mxs: dma: Fix APBH DMA driver for MX23 In-Reply-To: <1358902865-20475-1-git-send-email-marex@denx.de> References: <1358902865-20475-1-git-send-email-marex@denx.de> Message-ID: <51017BEC.7070500@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Cc: Otavio Salvador > Cc: Fabio Estevam > Cc: Stefano Babic > --- > 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 > > #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. Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================