Yes, it seem to be init with 40 MHz, but for the same reason I’ve noticed you at the first post, I think the 40 MHz “requested” is in fact the default one (25 MHz).
To check if the 40 MHz is reached, there is two ways:
check the clock signal with an oscilloscope,
look at the value returned by the spi_init() function.