]> git.baikalelectronics.ru Git - uboot.git/commit
qspi: t210: Fix claim_bus's use of the wrong bus/device
authorTom Warren <twarren@nvidia.com>
Tue, 12 Nov 2019 20:17:37 +0000 (13:17 -0700)
committerTom Warren <twarren@nvidia.com>
Thu, 2 Apr 2020 21:30:02 +0000 (14:30 -0700)
commitd492ef6e3734c7f64cd90ef7db362376eb538afc
treee4b31b8a70b0bc995fd90e31195cb50f2b0c9a39
parent5b8430f77df77a01deef468d2e72ed25f17c65c3
qspi: t210: Fix claim_bus's use of the wrong bus/device

claim_bus() is passed a udevice *dev, which is the bus device's parent.
In this driver, claim_bus assumed it was the bus, which caused the
'priv' info pointer to be wrong, and periph_id was incorrect. This in
turn caused the periph clock call to assign the wrong clock (PLLM
instead of PLLP0), which caused a kernel warning. I only saw the 'bad'
periph_id when enabling DEBUG due to an assert. Not sure how QSPI was
working w/this errant clock, but it was moot as QSPI wasn't active
unless you probed it, and that wasn't happening until I posted a patch
to enable env save to QSPI for Nano (coming soon).

Signed-off-by: Tom Warren <twarren@nvidia.com>
drivers/spi/tegra210_qspi.c