Hot plug support for aspeed-smc driver

Phil Eichinger phil at zankapfel.net
Fri Jan 15 21:56:26 AEDT 2021


On 2021-01-15 11:41, Shakeeb B K wrote:
> Hi All,
> 
> We have a use case for dynamic enabling/disabling access to spi nor
> flash using an external mux.
> This is mainly for data flash access over spi controller.
> 
> Since we use aspeed-smc driver for both fmc and smc, we cannot make it
> loadable as of now.
> Is there any way to handle this other than writing a new
> implementation for spi controller?

Hi Shakeeb,

You can use manual driver binding and unbinding to accomplish this (see 
also: https://lwn.net/Articles/143397/).

Example for spi1:
echo 1e630000.spi > /sys/bus/platform/drivers/aspeed-smc/unbind
[change mux]
echo 1e630000.spi > /sys/bus/platform/drivers/aspeed-smc/bind

Cheers
Phil


More information about the openbmc mailing list