From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sat, 26 Apr 2014 20:43:35 +0200 Subject: [U-Boot] [PATCH v3 7/9] sunxi: mmc support In-Reply-To: <1397844350-7341-7-git-send-email-ijc@hellion.org.uk> References: <1397844323.19277.26.camel@hastur.hellion.org.uk> <1397844350-7341-7-git-send-email-ijc@hellion.org.uk> Message-ID: <201404262043.35922.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Signed-off-by: Luke Leighton > Signed-off-by: Oliver Schinagl > Signed-off-by: Wills Wang > Signed-off-by: Ian Campbell > Cc: Stefan Roese > Cc: Tom Cubie > Cc: Aaron Maoye > Cc: Pantelis Antoniou [...] > +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