diff options
author | Icenowy Zheng <icenowy@sipeed.com> | 2021-07-22 14:30:05 +0800 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2021-10-25 14:54:57 +0100 |
commit | c846fe43f0561311eb7261b34023a04646cdbd0d (patch) | |
tree | 3e735f37e47f895fe593a2f08152b68a1a97a12a | |
parent | 03510bf62149d8cbdc39564dcd4a3195f6d8d79e (diff) | |
download | u-boot-c846fe43f0561311eb7261b34023a04646cdbd0d.zip u-boot-c846fe43f0561311eb7261b34023a04646cdbd0d.tar.gz u-boot-c846fe43f0561311eb7261b34023a04646cdbd0d.tar.bz2 |
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>
-rw-r--r-- | drivers/mmc/sunxi_mmc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index c170c16..4bf8a9b 100644 --- a/drivers/mmc/sunxi_mmc.c +++ b/drivers/mmc/sunxi_mmc.c @@ -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; |