[U-Boot] [PATCH v1 15/19] spi: mvebu_a3700_spi: Use Armada 37xx clk driver for SPI clock frequency

Marek BehĂșn marek.behun at nic.cz
Tue Apr 24 13:55:12 UTC 2018


On Wed, 21 Mar 2018 10:37:33 +0100
Stefan Roese <sr at denx.de> wrote:

> Please add Jagan (on Cc) to Cc for SPI driver related changes.
Will do with next version

> Wouldn't it be easier to "select" CLK_ARMADA_3720 here instead? No
> changes to the config files necessary this way.

okay :)

> checkpatch will most likely complain about missing space in the line
> above.

yes, thanks

> Perhaps its better to check on "prescale >
> MVEBU_SPI_A3700_CLK_PRESCALE_MASK" instead of silently removing the
> potential additional bits.

The code just above ensures that prescale is never greater than 0x1f
which also is prescale_mask. The compiler should optimize the logical
and away.

I am using constants instead of macros in that code because when I
tried to put macros there with names like
MVEBU_SPI_A3700_CLK_PRESCALE_(MAX|HALF) or what not, the code was
uglier and the name of the macro does not explain much...

Marek


More information about the U-Boot mailing list