crypto: ixp4xx - convert to platform driver
authorArnd Bergmann <arnd@arndb.de>
Tue, 25 May 2021 08:30:46 +0000 (10:30 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 3 Jun 2021 12:24:04 +0000 (20:24 +0800)
commitf5a6bf077126a1ac8a5c489022531e72a088603e
treee6b8575b9c84b3b1590a3ae1336a9ef38c7607e8
parent7551a074700a4093f5556a5ae51c1f83ea6b96ba
crypto: ixp4xx - convert to platform driver

The ixp4xx_crypto driver traditionally registers a bare platform
device without attaching it to a driver, and detects the hardware
at module init time by reading an SoC specific hardware register.

Change this to the conventional method of registering the platform
device from the platform code itself when the device is present,
turning the module_init/module_exit functions into probe/release
driver callbacks.

This enables compile-testing as well as potentially having ixp4xx
coexist with other ARMv5 platforms in the same kernel in the future.

Cc: Corentin Labbe <clabbe@baylibre.com>
Tested-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm/mach-ixp4xx/common.c
drivers/crypto/ixp4xx_crypto.c