]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
mmc: moxart: fix 4-bit bus width and remove 8-bit bus width
authorSergei Antonov <saproj@gmail.com>
Wed, 7 Sep 2022 20:57:53 +0000 (23:57 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 23 Nov 2022 14:11:57 +0000 (15:11 +0100)
commit4a3f343bc69689b20b8ed670fc761a16cb4789a9
tree5ac56e7a993a164b5e4912c79d977e95f34876cf
parent4a9a8910fa1351facc13cd3f9a93d336d86d4c7c
mmc: moxart: fix 4-bit bus width and remove 8-bit bus width

BugLink: https://bugs.launchpad.net/bugs/1995517
commit 35ca91d1338ae158f6dcc0de5d1e86197924ffda upstream.

According to the datasheet [1] at page 377, 4-bit bus width is turned on by
bit 2 of the Bus Width Register. Thus the current bitmask is wrong: define
BUS_WIDTH_4 BIT(1)

BIT(1) does not work but BIT(2) works. This has been verified on real MOXA
hardware with FTSDC010 controller revision 1_6_0.

The corrected value of BUS_WIDTH_4 mask collides with: define BUS_WIDTH_8
BIT(2). Additionally, 8-bit bus width mode isn't supported according to the
datasheet, so let's remove the corresponding code.

[1]
https://bitbucket.org/Kasreyn/mkrom-uc7112lx/src/master/documents/FIC8120_DS_v1.2.pdf

Fixes: 1b66e94e6b99 ("mmc: moxart: Add MOXA ART SD/MMC driver")
Signed-off-by: Sergei Antonov <saproj@gmail.com>
Cc: Jonas Jensen <jonas.jensen@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220907205753.1577434-1-saproj@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/mmc/host/moxart-mmc.c