On Mon, Sep 22, 2014 at 10:11 AM, Chen-Yu Tsai <w...@csie.org> wrote: > On Mon, Sep 22, 2014 at 2:44 AM, Ian Campbell <i...@hellion.org.uk> wrote: >> On Mon, 2014-09-08 at 21:28 +0800, Chen-Yu Tsai wrote: >>> From: Hans de Goede <hdego...@redhat.com> >>> >>> Signed-off-by: Hans de Goede <hdego...@redhat.com> >>> [w...@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 <w...@csie.org> >> >> 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. > > This was part of "sunxi-mmc: sun6i has its fifo at a different address", > but yeah, it definitely looks like a separate cleanup now. I'll split it > out. > >>> }; >>> >>> #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. > > Sounds reasonable. I wonder what else (in other drivers) we should > move over there.
Ian, include/configs/sun?i.h and sunxi-common.h only have config related #defines. Are we sure this is the place for something like register offsets? For reference, drivers/i2c/mvtwsi.c has sunxi specific register offsets wrapped in a #define in the file itself. Cheers ChenYu _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot