]> git.dujemihanovic.xyz Git - u-boot.git/commit
spi: omap3: fix set_speed and set_mode dm callbacks
authorHannes Schmelzer <oe5hpm@oevsv.at>
Sat, 2 Jun 2018 06:06:48 +0000 (08:06 +0200)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 25 Jun 2018 10:05:15 +0000 (15:35 +0530)
commit9cddf70ead79f7b7c113d7481860a14b61aa6e0b
tree4f511758adec2f0e3cd8e43f73bef7ba6c33946b
parentb1d2b529b4137740f7f1575ba3d6561297a6a848
spi: omap3: fix set_speed and set_mode dm callbacks

commit 84807922874e03895bbf15c4472a2dcee8fbbd03
("spi: omap3: Skip set_mode, set_speed from claim") did break SPI
support on my AM335x board.

The named commit:

- ignored the responsible arguments (speed, mode)
The set speed/mode function must use the supplied function arguments to
work properly. With this commit we take those arguments and transfer
them to the priv-data.

- used wrong udevice pointer for getting priv data
the udevice-pointer within function argument is already the spi-bus
device, so it is wrong looking here for some parent (ocp-bus in this
case) and getting priv-pointer from there.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Jagan Teki <jagan@openedev.com>
drivers/spi/omap3_spi.c