mci: stm32_sdmmc2: compare ios ->bus_width with correct constants
MMC_BUS_WIDTH_4 != 4 && MMC_BUS_WIDTH_8 != 8.

This enables driver support for 4-bit SD-Cards and 8-bit MMCs,
which before was disabled because of CRC errors:

  ERROR: error SDMMC_STA_DCRCFAIL (0x81042) for cmd 18
  ERROR: stm32_sdmmc2_end_cmd: error SDMMC_STA_CTIMEOUT (0x4) for cmd 12

These happened because the card was correctly instructed to use the new
bus width, but the controller wasn't.

Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Fixes: ce99d0c86b32ec ("mci: add support for stm32mp sd/mmc controller")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 88d2f57 commit afe89f86c70cde193e1fa989301900ce07aac9d9
@Ahmad Fatoum Ahmad Fatoum authored on 30 Jan 2020
Sascha Hauer committed on 3 Feb 2020
Showing 1 changed file
View
drivers/mci/stm32_sdmmc2.c