From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Date: Sun, 21 Sep 2014 19:44:25 +0100 Subject: [U-Boot] [PATCH 5/7] ARM: sunxi-mmc: Add mmc support for sun6i / A31 In-Reply-To: <1410182892-18647-6-git-send-email-wens@csie.org> References: <1410182892-18647-1-git-send-email-wens@csie.org> <1410182892-18647-6-git-send-email-wens@csie.org> Message-ID: <1411325065.27559.14.camel@hellion.org.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 2014-09-08 at 21:28 +0800, Chen-Yu Tsai wrote: > From: Hans de Goede > > Signed-off-by: Hans de Goede > [wens at csie.org: use setbits_le32 for reset control, drop obsolete changes, > squash "sunxi-mmc: sun6i has its fifo at a different address"] > Signed-off-by: Chen-Yu Tsai Adding CC to Pantelis (MMC custodian). Pantelis, once you are happy with this I propose we take this via the sunxi tree along with the rest of the series. For my part I only have nitpicks: > --- > arch/arm/include/asm/arch-sunxi/mmc.h | 2 -- > drivers/mmc/sunxi_mmc.c | 9 +++++++++ > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/include/asm/arch-sunxi/mmc.h b/arch/arm/include/asm/arch-sunxi/mmc.h > index 53196e3..bafde4b 100644 > --- a/arch/arm/include/asm/arch-sunxi/mmc.h > +++ b/arch/arm/include/asm/arch-sunxi/mmc.h > @@ -42,8 +42,6 @@ struct sunxi_mmc { > u32 idie; /* 0x8c internal DMA interrupt enable */ > u32 chda; /* 0x90 */ > u32 cbda; /* 0x94 */ > - u32 res1[26]; > - u32 fifo; /* 0x100 FIFO access address */ This seems unrelated to the stated purpose of the commit, should probably be a separate cleanup. > }; > > #define SUNXI_MMC_CLK_POWERSAVE (0x1 << 17) > diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c > index d4e574f..b035bba 100644 > --- a/drivers/mmc/sunxi_mmc.c > +++ b/drivers/mmc/sunxi_mmc.c > @@ -57,7 +57,11 @@ static int mmc_resource_init(int sdc_no) > printf("Wrong mmc number %d\n", sdc_no); > return -1; > } > +#ifdef CONFIG_SUN6I > + mmchost->database = (unsigned int)mmchost->reg + 0x200; > +#else > mmchost->database = (unsigned int)mmchost->reg + 0x100; > +#endif Adding a #define to ./include/configs/sun?i.h would be preferred, I think. Ian.