diff options
author | Nicolas Pitre <nico@cam.org> | 2009-06-11 22:27:20 +0200 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2009-06-15 00:37:08 -0400 |
commit | 3fade49b734cca2d8c4f1bcd7c3023302b557f3b (patch) | |
tree | 0c4d33f43c7c707c3d9dfb6e0edf7cf568b77941 | |
parent | 97f8a27a5cfb08c9ce3abc90aaafb791759aed94 (diff) | |
download | linux-3fade49b734cca2d8c4f1bcd7c3023302b557f3b.tar.gz linux-3fade49b734cca2d8c4f1bcd7c3023302b557f3b.tar.bz2 linux-3fade49b734cca2d8c4f1bcd7c3023302b557f3b.zip |
[ARM] orion5x: register the crypto device on SOCs that support it
Not all Orion variants do implement the crypto unit.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/common.h | 1 |
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index eafcc49009ea..f87fa1253803 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c @@ -562,7 +562,7 @@ static struct platform_device orion5x_crypto_device = { .resource = orion5x_crypto_res, }; -int __init orion5x_crypto_init(void) +static int __init orion5x_crypto_init(void) { int ret; @@ -697,6 +697,14 @@ void __init orion5x_init(void) } /* + * 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 */ orion5x_wdt_init(); diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index de483e83edd7..8f004503c96d 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h @@ -38,7 +38,6 @@ void orion5x_spi_init(void); void orion5x_uart0_init(void); void orion5x_uart1_init(void); void orion5x_xor_init(void); -int orion5x_crypto_init(void); /* * PCIe/PCI functions. |