mmc: mtk-sd: Limit getting top_base to SoCs that require it
authorChen-Yu Tsai <wenst@chromium.org>
Tue, 10 Dec 2024 07:32:11 +0000 (15:32 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 18 Dec 2024 14:57:59 +0000 (15:57 +0100)
commit6ee5233a4c91fd0299c439b06d2d79bae54db4a3
tree7154cf030b097f964c22f48763eeab35935dfa96
parent6af057a8a5f60512ea49af028e5cf4042cb70de3
mmc: mtk-sd: Limit getting top_base to SoCs that require it

Currently the mtk-sd driver tries to get and map the second register
base, named top_base in the code, regardless of whether the SoC model
actually has it or not. This produces confusing big error messages on
the platforms that don't need it:

    mtk-msdc 11260000.mmc: error -EINVAL: invalid resource (null)

Limit it to the platforms that actually require it, based on their
device tree entries, and properly fail if it is missing.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Message-ID: <20241210073212.3917912-3-wenst@chromium.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c