Skip to content

Commit

Permalink
drivers: mmc: sunxi: limit A64 MMC2 to 8K DMA buffer
Browse files Browse the repository at this point in the history
Unlike the A64 user manual reports, the third MMC controller on the
A64 (and the only one capable of 8-bit HS400 eMMC transfers) has a
DMA buffer size limit of 8KB (much like the very old Allwinner SoCs).
This does not affect the other two controllers, so introduce a new
DT compatible string to let the driver use different settings for that
particular device.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
  • Loading branch information
mripard authored and Andre-ARM committed Nov 29, 2016
1 parent 4774574 commit a8c3e0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
Expand Up @@ -343,8 +343,7 @@
};

mmc2: mmc@1c11000 {
compatible = "allwinner,sun50i-a64-mmc",
"allwinner,sun5i-a13-mmc";
compatible = "allwinner,sun50i-a64-emmc";
reg = <0x01c11000 0x1000>;
clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
clock-names = "ahb", "mmc";
Expand Down
7 changes: 7 additions & 0 deletions drivers/mmc/host/sunxi-mmc.c
Expand Up @@ -1095,12 +1095,19 @@ static const struct sunxi_mmc_cfg sun50i_a64_cfg = {
.can_calibrate = true,
};

static const struct sunxi_mmc_cfg sun50i_a64_emmc_cfg = {
.idma_des_size_bits = 13,
.clk_delays = sun50i_mmc_clk_delays,
.can_calibrate = true,
};

static const struct of_device_id sunxi_mmc_of_match[] = {
{ .compatible = "allwinner,sun4i-a10-mmc", .data = &sun4i_a10_cfg },
{ .compatible = "allwinner,sun5i-a13-mmc", .data = &sun5i_a13_cfg },
{ .compatible = "allwinner,sun7i-a20-mmc", .data = &sun7i_a20_cfg },
{ .compatible = "allwinner,sun9i-a80-mmc", .data = &sun9i_a80_cfg },
{ .compatible = "allwinner,sun50i-a64-mmc", .data = &sun50i_a64_cfg },
{ .compatible = "allwinner,sun50i-a64-emmc", .data = &sun50i_a64_emmc_cfg },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, sunxi_mmc_of_match);
Expand Down

0 comments on commit a8c3e0b

Please sign in to comment.