On Tue, Sep 23, 2014 at 7:54 PM, Ian Campbell <[email protected]> wrote:
> On Tue, 2014-09-23 at 19:50 +0800, Chen-Yu Tsai wrote:
>> 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?
>
> I guess not ;-)
>
>> For reference, drivers/i2c/mvtwsi.c has sunxi specific register
>> offsets wrapped in a #define in the file itself.
>
> How about either ./arch/arm/include/asm/arch-sunxi/mmc.h or near the top
> of this C file (i.e. outside the code itself)?
Adding it to the register definitions in ./arch/arm/include/asm/arch-sunxi/mmc.h
seems like a good choice. The last bit of struct sunxi_mmc would be like:
u32 idie; /* 0x8c internal DMA interrupt enable */
u32 chda; /* 0x90 */
u32 cbda; /* 0x94 */
#if defined(CONFIG_SUN6I)
u32 res1[126];
#else
u32 res1[26];
#endif
u32 fifo; /* 0x100 (0x200 on sun6i) FIFO access address */
};
And have
mmchost->database = &mmchost->reg->fifo;
Or just get rid of ->database and use ->reg->fifo directly.
The latter seems better.
ChenYu
--
You received this message because you are subscribed to the Google Groups
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.