Re: [PATCH 0/2] share sdhci-pxa among mmp2, pxa910, pxa168 and pxa955

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 3, 2010 at 1:26 AM, zhangfei gao <zhangfei.gao@xxxxxxxxx> wrote:
> These two patches introduce several call backs, in order to share sdhci-pxa.
>
> patch 1: move sdhci_priv and sdhci_ops definition to
> include/linux/mmc/sdhci.h from drivers/mmc/host/sdhci.h
> 1. platfrom could directly overwrite sdhci_ops with soc specific ops,
> this case occurs at different controller share the same driver, while
> different ops they may use, so move sdhci_ops definition to include
> 2. platform code will use sdhci_priv to access host->private
>
> Patch 2: Introduce several call backs.
> pxa955 may require external gpio to detect card insert and remove.
> soc_set_ops is used to overwrite host ops directly from platfrom ops.
>
> example in board.c
> static unsigned int mmc0_get_ro(struct sdhci_host *host)
> {
>        return 0;
> }
>
> static void mmc0_generate_init_clocks_mmp2(struct sdhci_host *host, u8
> power_mode)
> {
>        struct sdhci_pxa *pxa = sdhci_priv(host);
> i       /* do something */
> }
>
> static void mmc0_set_ops(struct sdhci_pxa *pxa)
> {
>        pxa->ops->get_ro = mmc0_get_ro;
>        pxa->ops->platform_send_init_74_clocks = mmp2_send_init_74_clocks;
> }
>
> static struct sdhci_pxa_platdata mmp2_sdh_platdata_mmc0 = {
>        .soc_set_ops    = mmc0_set_ops,
>        .clk_delay_cycles       = 0xf,
>        .soc_set_timing = mmp2_init_sdh,
> };
>

Hi, Chris

What's your suggestion about these two patches,  we already use this
interface locally among mmp2, pxa910 and pxa955.
If no problem, can you help merge these two patches, only with these
patch, we can push machine support to arch/arm.

Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux