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

Marek Vasut marex at denx.de
Sat Apr 26 20:43:35 CEST 2014


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 at henriknordstrom.net>
> Signed-off-by: Luke Leighton <lkcl at lkcl.net>
> Signed-off-by: Oliver Schinagl <oliver at schinagl.nl>
> Signed-off-by: Wills Wang <wills.wang.open at gmail.com>
> Signed-off-by: Ian Campbell <ijc at hellion.org.uk>
> Cc: Stefan Roese <sr at denx.de>
> Cc: Tom Cubie <Mr.hipboi at gmail.com>
> Cc: Aaron Maoye <leafy.myeh at allwinnertech.com>
> Cc: Pantelis Antoniou <panto at 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


More information about the U-Boot mailing list