Commit 3fade49b authored by Nicolas Pitre's avatar Nicolas Pitre

[ARM] orion5x: register the crypto device on SOCs that support it

Not all Orion variants do implement the crypto unit.
Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
parent 97f8a27a
...@@ -562,7 +562,7 @@ static struct platform_device orion5x_crypto_device = { ...@@ -562,7 +562,7 @@ static struct platform_device orion5x_crypto_device = {
.resource = orion5x_crypto_res, .resource = orion5x_crypto_res,
}; };
int __init orion5x_crypto_init(void) static int __init orion5x_crypto_init(void)
{ {
int ret; int ret;
...@@ -696,6 +696,14 @@ void __init orion5x_init(void) ...@@ -696,6 +696,14 @@ void __init orion5x_init(void)
disable_hlt(); disable_hlt();
} }
/*
* The 5082/5181l/5182/6082/6082l/6183 have crypto
* while 5180n/5181/5281 don't have crypto.
*/
if ((dev == MV88F5181_DEV_ID && rev >= MV88F5181L_REV_A0) ||
dev == MV88F5182_DEV_ID || dev == MV88F6183_DEV_ID)
orion5x_crypto_init();
/* /*
* Register watchdog driver * Register watchdog driver
*/ */
......
...@@ -38,7 +38,6 @@ void orion5x_spi_init(void); ...@@ -38,7 +38,6 @@ void orion5x_spi_init(void);
void orion5x_uart0_init(void); void orion5x_uart0_init(void);
void orion5x_uart1_init(void); void orion5x_uart1_init(void);
void orion5x_xor_init(void); void orion5x_xor_init(void);
int orion5x_crypto_init(void);
/* /*
* PCIe/PCI functions. * PCIe/PCI functions.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment