[U-Boot] [PATCH v3 7/9] sunxi: mmc support

Marek Vasut
2014-04-26T18:43:35Z

On Friday, April 18, 2014 at 08:05:48 PM, Ian Campbell wrote:
> This adds support for the MMC controller on the Allwinner A20 (sun7i)
> processor.
>
> Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
> Signed-off-by: Luke Leighton <lkcl@lkcl.net>
> Signed-off-by: Oliver Schinagl <oliver@schinagl.nl>
> Signed-off-by: Wills Wang <wills.wang.open@gmail.com>
> Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Tom Cubie <Mr.hipboi@gmail.com>
> Cc: Aaron Maoye <leafy.myeh@allwinnertech.com>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
[...]

> +static int mmc_clk_io_on(int sdc_no)
> +{
> + unsigned int pin;
> + unsigned int rval;
> + unsigned int pll_clk;
> + unsigned int divider;
> + struct sunxi_mmc_host *mmchost = &mmc_host[sdc_no];
> + struct sunxi_ccm_reg *ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
> +
> + debug("init mmc %d clock and io\n", sdc_no);
> +
> + /* config gpio */
> + switch (sdc_no) {
> + case 0:
> + /* D1-PF0, D0-PF1, CLK-PF2, CMD-PF3, D3-PF4, D4-PF5 */
> + for (pin = SUNXI_GPF(0); pin <= SUNXI_GPF(5); pin++) {
> + sunxi_gpio_set_cfgpin(pin, SUNXI_GPF0_SDC0);
> + sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);
> + sunxi_gpio_set_drv(pin, 2);
> + }
> + break;

Pinmux config is part of board files , not part of driver.
[...]

Best regards,
Marek Vasut