mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
mmc: sunxi: conditionally include MMC2 initialization code
Allwinner R329 has no MMC2. Only include the code of MMC2 if the base address of it is defined. Signed-off-by: Icenowy Zheng <icenowy@sipeed.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
parent
03510bf621
commit
c846fe43f0
1 changed files with 2 additions and 0 deletions
|
@ -72,10 +72,12 @@ static int mmc_resource_init(int sdc_no)
|
|||
priv->reg = (struct sunxi_mmc *)SUNXI_MMC1_BASE;
|
||||
priv->mclkreg = &ccm->sd1_clk_cfg;
|
||||
break;
|
||||
#ifdef SUNXI_MMC2_BASE
|
||||
case 2:
|
||||
priv->reg = (struct sunxi_mmc *)SUNXI_MMC2_BASE;
|
||||
priv->mclkreg = &ccm->sd2_clk_cfg;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SUNXI_MMC3_BASE
|
||||
case 3:
|
||||
priv->reg = (struct sunxi_mmc *)SUNXI_MMC3_BASE;
|
||||
|
|
Loading…
Add table
Reference in a new issue