2 * arch/arm/plat-orion/common.c
4 * Marvell Orion SoC common setup code used by multiple mach-/common.c
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
14 #include <linux/dma-mapping.h>
15 #include <linux/serial_8250.h>
16 #include <linux/ata_platform.h>
17 #include <linux/clk.h>
18 #include <linux/clkdev.h>
19 #include <linux/mv643xx_eth.h>
20 #include <linux/mv643xx_i2c.h>
22 #include <linux/platform_data/dma-mv_xor.h>
23 #include <linux/platform_data/usb-ehci-orion.h>
24 #include <mach/bridge-regs.h>
26 /* Create a clkdev entry for a given device/clk */
27 void __init
orion_clkdev_add(const char *con_id
, const char *dev_id
,
30 struct clk_lookup
*cl
;
32 cl
= clkdev_alloc(clk
, con_id
, dev_id
);
37 /* Create clkdev entries for all orion platforms except kirkwood.
38 Kirkwood has gated clocks for some of its peripherals, so creates
39 its own clkdev entries. For all the other orion devices, create
40 clkdev entries to the tclk. */
41 void __init
orion_clkdev_init(struct clk
*tclk
)
43 orion_clkdev_add(NULL
, "orion_spi.0", tclk
);
44 orion_clkdev_add(NULL
, "orion_spi.1", tclk
);
45 orion_clkdev_add(NULL
, MV643XX_ETH_NAME
".0", tclk
);
46 orion_clkdev_add(NULL
, MV643XX_ETH_NAME
".1", tclk
);
47 orion_clkdev_add(NULL
, MV643XX_ETH_NAME
".2", tclk
);
48 orion_clkdev_add(NULL
, MV643XX_ETH_NAME
".3", tclk
);
49 orion_clkdev_add(NULL
, "orion_wdt", tclk
);
50 orion_clkdev_add(NULL
, MV64XXX_I2C_CTLR_NAME
".0", tclk
);
53 /* Fill in the resources structure and link it into the platform
54 device structure. There is always a memory region, and nearly
55 always an interrupt.*/
56 static void fill_resources(struct platform_device
*device
,
57 struct resource
*resources
,
58 resource_size_t mapbase
,
62 device
->resource
= resources
;
63 device
->num_resources
= 1;
64 resources
[0].flags
= IORESOURCE_MEM
;
65 resources
[0].start
= mapbase
;
66 resources
[0].end
= mapbase
+ size
;
69 device
->num_resources
++;
70 resources
[1].flags
= IORESOURCE_IRQ
;
71 resources
[1].start
= irq
;
72 resources
[1].end
= irq
;
76 /*****************************************************************************
78 ****************************************************************************/
79 static unsigned long __init
uart_get_clk_rate(struct clk
*clk
)
81 clk_prepare_enable(clk
);
82 return clk_get_rate(clk
);
85 static void __init
uart_complete(
86 struct platform_device
*orion_uart
,
87 struct plat_serial8250_port
*data
,
88 struct resource
*resources
,
89 void __iomem
*membase
,
90 resource_size_t mapbase
,
94 data
->mapbase
= mapbase
;
95 data
->membase
= membase
;
97 data
->uartclk
= uart_get_clk_rate(clk
);
98 orion_uart
->dev
.platform_data
= data
;
100 fill_resources(orion_uart
, resources
, mapbase
, 0xff, irq
);
101 platform_device_register(orion_uart
);
104 /*****************************************************************************
106 ****************************************************************************/
107 static struct plat_serial8250_port orion_uart0_data
[] = {
109 .flags
= UPF_SKIP_TEST
| UPF_BOOT_AUTOCONF
,
116 static struct resource orion_uart0_resources
[2];
118 static struct platform_device orion_uart0
= {
119 .name
= "serial8250",
120 .id
= PLAT8250_DEV_PLATFORM
,
123 void __init
orion_uart0_init(void __iomem
*membase
,
124 resource_size_t mapbase
,
128 uart_complete(&orion_uart0
, orion_uart0_data
, orion_uart0_resources
,
129 membase
, mapbase
, irq
, clk
);
132 /*****************************************************************************
134 ****************************************************************************/
135 static struct plat_serial8250_port orion_uart1_data
[] = {
137 .flags
= UPF_SKIP_TEST
| UPF_BOOT_AUTOCONF
,
144 static struct resource orion_uart1_resources
[2];
146 static struct platform_device orion_uart1
= {
147 .name
= "serial8250",
148 .id
= PLAT8250_DEV_PLATFORM1
,
151 void __init
orion_uart1_init(void __iomem
*membase
,
152 resource_size_t mapbase
,
156 uart_complete(&orion_uart1
, orion_uart1_data
, orion_uart1_resources
,
157 membase
, mapbase
, irq
, clk
);
160 /*****************************************************************************
162 ****************************************************************************/
163 static struct plat_serial8250_port orion_uart2_data
[] = {
165 .flags
= UPF_SKIP_TEST
| UPF_BOOT_AUTOCONF
,
172 static struct resource orion_uart2_resources
[2];
174 static struct platform_device orion_uart2
= {
175 .name
= "serial8250",
176 .id
= PLAT8250_DEV_PLATFORM2
,
179 void __init
orion_uart2_init(void __iomem
*membase
,
180 resource_size_t mapbase
,
184 uart_complete(&orion_uart2
, orion_uart2_data
, orion_uart2_resources
,
185 membase
, mapbase
, irq
, clk
);
188 /*****************************************************************************
190 ****************************************************************************/
191 static struct plat_serial8250_port orion_uart3_data
[] = {
193 .flags
= UPF_SKIP_TEST
| UPF_BOOT_AUTOCONF
,
200 static struct resource orion_uart3_resources
[2];
202 static struct platform_device orion_uart3
= {
203 .name
= "serial8250",
207 void __init
orion_uart3_init(void __iomem
*membase
,
208 resource_size_t mapbase
,
212 uart_complete(&orion_uart3
, orion_uart3_data
, orion_uart3_resources
,
213 membase
, mapbase
, irq
, clk
);
216 /*****************************************************************************
218 ****************************************************************************/
219 static struct resource orion_rtc_resource
[2];
221 void __init
orion_rtc_init(unsigned long mapbase
,
224 orion_rtc_resource
[0].start
= mapbase
;
225 orion_rtc_resource
[0].end
= mapbase
+ SZ_32
- 1;
226 orion_rtc_resource
[0].flags
= IORESOURCE_MEM
;
227 orion_rtc_resource
[1].start
= irq
;
228 orion_rtc_resource
[1].end
= irq
;
229 orion_rtc_resource
[1].flags
= IORESOURCE_IRQ
;
231 platform_device_register_simple("rtc-mv", -1, orion_rtc_resource
, 2);
234 /*****************************************************************************
236 ****************************************************************************/
237 static __init
void ge_complete(
238 struct mv643xx_eth_shared_platform_data
*orion_ge_shared_data
,
239 struct resource
*orion_ge_resource
, unsigned long irq
,
240 struct platform_device
*orion_ge_shared
,
241 struct mv643xx_eth_platform_data
*eth_data
,
242 struct platform_device
*orion_ge
)
244 orion_ge_resource
->start
= irq
;
245 orion_ge_resource
->end
= irq
;
246 eth_data
->shared
= orion_ge_shared
;
247 orion_ge
->dev
.platform_data
= eth_data
;
249 platform_device_register(orion_ge_shared
);
250 platform_device_register(orion_ge
);
253 /*****************************************************************************
255 ****************************************************************************/
256 struct mv643xx_eth_shared_platform_data orion_ge00_shared_data
;
258 static struct resource orion_ge00_shared_resources
[] = {
262 .name
= "ge00 err irq",
266 static struct platform_device orion_ge00_shared
= {
267 .name
= MV643XX_ETH_SHARED_NAME
,
270 .platform_data
= &orion_ge00_shared_data
,
274 static struct resource orion_ge00_resources
[] = {
277 .flags
= IORESOURCE_IRQ
,
281 static struct platform_device orion_ge00
= {
282 .name
= MV643XX_ETH_NAME
,
285 .resource
= orion_ge00_resources
,
287 .coherent_dma_mask
= DMA_BIT_MASK(32),
291 void __init
orion_ge00_init(struct mv643xx_eth_platform_data
*eth_data
,
292 unsigned long mapbase
,
294 unsigned long irq_err
,
295 unsigned int tx_csum_limit
)
297 fill_resources(&orion_ge00_shared
, orion_ge00_shared_resources
,
298 mapbase
+ 0x2000, SZ_16K
- 1, irq_err
);
299 orion_ge00_shared_data
.tx_csum_limit
= tx_csum_limit
;
300 ge_complete(&orion_ge00_shared_data
,
301 orion_ge00_resources
, irq
, &orion_ge00_shared
,
302 eth_data
, &orion_ge00
);
305 /*****************************************************************************
307 ****************************************************************************/
308 struct mv643xx_eth_shared_platform_data orion_ge01_shared_data
= {
309 .shared_smi
= &orion_ge00_shared
,
312 static struct resource orion_ge01_shared_resources
[] = {
316 .name
= "ge01 err irq",
320 static struct platform_device orion_ge01_shared
= {
321 .name
= MV643XX_ETH_SHARED_NAME
,
324 .platform_data
= &orion_ge01_shared_data
,
328 static struct resource orion_ge01_resources
[] = {
331 .flags
= IORESOURCE_IRQ
,
335 static struct platform_device orion_ge01
= {
336 .name
= MV643XX_ETH_NAME
,
339 .resource
= orion_ge01_resources
,
341 .coherent_dma_mask
= DMA_BIT_MASK(32),
345 void __init
orion_ge01_init(struct mv643xx_eth_platform_data
*eth_data
,
346 unsigned long mapbase
,
348 unsigned long irq_err
,
349 unsigned int tx_csum_limit
)
351 fill_resources(&orion_ge01_shared
, orion_ge01_shared_resources
,
352 mapbase
+ 0x2000, SZ_16K
- 1, irq_err
);
353 orion_ge01_shared_data
.tx_csum_limit
= tx_csum_limit
;
354 ge_complete(&orion_ge01_shared_data
,
355 orion_ge01_resources
, irq
, &orion_ge01_shared
,
356 eth_data
, &orion_ge01
);
359 /*****************************************************************************
361 ****************************************************************************/
362 struct mv643xx_eth_shared_platform_data orion_ge10_shared_data
= {
363 .shared_smi
= &orion_ge00_shared
,
366 static struct resource orion_ge10_shared_resources
[] = {
370 .name
= "ge10 err irq",
374 static struct platform_device orion_ge10_shared
= {
375 .name
= MV643XX_ETH_SHARED_NAME
,
378 .platform_data
= &orion_ge10_shared_data
,
382 static struct resource orion_ge10_resources
[] = {
385 .flags
= IORESOURCE_IRQ
,
389 static struct platform_device orion_ge10
= {
390 .name
= MV643XX_ETH_NAME
,
393 .resource
= orion_ge10_resources
,
395 .coherent_dma_mask
= DMA_BIT_MASK(32),
399 void __init
orion_ge10_init(struct mv643xx_eth_platform_data
*eth_data
,
400 unsigned long mapbase
,
402 unsigned long irq_err
)
404 fill_resources(&orion_ge10_shared
, orion_ge10_shared_resources
,
405 mapbase
+ 0x2000, SZ_16K
- 1, irq_err
);
406 ge_complete(&orion_ge10_shared_data
,
407 orion_ge10_resources
, irq
, &orion_ge10_shared
,
408 eth_data
, &orion_ge10
);
411 /*****************************************************************************
413 ****************************************************************************/
414 struct mv643xx_eth_shared_platform_data orion_ge11_shared_data
= {
415 .shared_smi
= &orion_ge00_shared
,
418 static struct resource orion_ge11_shared_resources
[] = {
422 .name
= "ge11 err irq",
426 static struct platform_device orion_ge11_shared
= {
427 .name
= MV643XX_ETH_SHARED_NAME
,
430 .platform_data
= &orion_ge11_shared_data
,
434 static struct resource orion_ge11_resources
[] = {
437 .flags
= IORESOURCE_IRQ
,
441 static struct platform_device orion_ge11
= {
442 .name
= MV643XX_ETH_NAME
,
445 .resource
= orion_ge11_resources
,
447 .coherent_dma_mask
= DMA_BIT_MASK(32),
451 void __init
orion_ge11_init(struct mv643xx_eth_platform_data
*eth_data
,
452 unsigned long mapbase
,
454 unsigned long irq_err
)
456 fill_resources(&orion_ge11_shared
, orion_ge11_shared_resources
,
457 mapbase
+ 0x2000, SZ_16K
- 1, irq_err
);
458 ge_complete(&orion_ge11_shared_data
,
459 orion_ge11_resources
, irq
, &orion_ge11_shared
,
460 eth_data
, &orion_ge11
);
463 /*****************************************************************************
465 ****************************************************************************/
466 static struct resource orion_switch_resources
[] = {
470 .flags
= IORESOURCE_IRQ
,
474 static struct platform_device orion_switch_device
= {
478 .resource
= orion_switch_resources
,
481 void __init
orion_ge00_switch_init(struct dsa_platform_data
*d
, int irq
)
486 orion_switch_resources
[0].start
= irq
;
487 orion_switch_resources
[0].end
= irq
;
488 orion_switch_device
.num_resources
= 1;
491 d
->netdev
= &orion_ge00
.dev
;
492 for (i
= 0; i
< d
->nr_chips
; i
++)
493 d
->chip
[i
].mii_bus
= &orion_ge00_shared
.dev
;
494 orion_switch_device
.dev
.platform_data
= d
;
496 platform_device_register(&orion_switch_device
);
499 /*****************************************************************************
501 ****************************************************************************/
502 static struct mv64xxx_i2c_pdata orion_i2c_pdata
= {
504 .timeout
= 1000, /* Default timeout of 1 second */
507 static struct resource orion_i2c_resources
[2];
509 static struct platform_device orion_i2c
= {
510 .name
= MV64XXX_I2C_CTLR_NAME
,
513 .platform_data
= &orion_i2c_pdata
,
517 static struct mv64xxx_i2c_pdata orion_i2c_1_pdata
= {
519 .timeout
= 1000, /* Default timeout of 1 second */
522 static struct resource orion_i2c_1_resources
[2];
524 static struct platform_device orion_i2c_1
= {
525 .name
= MV64XXX_I2C_CTLR_NAME
,
528 .platform_data
= &orion_i2c_1_pdata
,
532 void __init
orion_i2c_init(unsigned long mapbase
,
534 unsigned long freq_m
)
536 orion_i2c_pdata
.freq_m
= freq_m
;
537 fill_resources(&orion_i2c
, orion_i2c_resources
, mapbase
,
539 platform_device_register(&orion_i2c
);
542 void __init
orion_i2c_1_init(unsigned long mapbase
,
544 unsigned long freq_m
)
546 orion_i2c_1_pdata
.freq_m
= freq_m
;
547 fill_resources(&orion_i2c_1
, orion_i2c_1_resources
, mapbase
,
549 platform_device_register(&orion_i2c_1
);
552 /*****************************************************************************
554 ****************************************************************************/
555 static struct resource orion_spi_resources
;
557 static struct platform_device orion_spi
= {
562 static struct resource orion_spi_1_resources
;
564 static struct platform_device orion_spi_1
= {
569 /* Note: The SPI silicon core does have interrupts. However the
570 * current Linux software driver does not use interrupts. */
572 void __init
orion_spi_init(unsigned long mapbase
)
574 fill_resources(&orion_spi
, &orion_spi_resources
,
575 mapbase
, SZ_512
- 1, NO_IRQ
);
576 platform_device_register(&orion_spi
);
579 void __init
orion_spi_1_init(unsigned long mapbase
)
581 fill_resources(&orion_spi_1
, &orion_spi_1_resources
,
582 mapbase
, SZ_512
- 1, NO_IRQ
);
583 platform_device_register(&orion_spi_1
);
586 /*****************************************************************************
588 ****************************************************************************/
589 static struct resource orion_wdt_resource
=
590 DEFINE_RES_MEM(TIMER_PHYS_BASE
, 0x28);
592 static struct platform_device orion_wdt_device
= {
596 .resource
= &orion_wdt_resource
,
599 void __init
orion_wdt_init(void)
601 platform_device_register(&orion_wdt_device
);
604 /*****************************************************************************
606 ****************************************************************************/
607 static u64 orion_xor_dmamask
= DMA_BIT_MASK(32);
609 /*****************************************************************************
611 ****************************************************************************/
612 static struct resource orion_xor0_shared_resources
[] = {
615 .flags
= IORESOURCE_MEM
,
617 .name
= "xor 0 high",
618 .flags
= IORESOURCE_MEM
,
620 .name
= "irq channel 0",
621 .flags
= IORESOURCE_IRQ
,
623 .name
= "irq channel 1",
624 .flags
= IORESOURCE_IRQ
,
628 static struct platform_device orion_xor0_shared
;
630 static struct mv_xor_platform_data orion_xor0_channels_pdata
[2] = {
632 .shared
= &orion_xor0_shared
,
634 .pool_size
= PAGE_SIZE
,
637 .shared
= &orion_xor0_shared
,
639 .pool_size
= PAGE_SIZE
,
643 static struct mv_xor_shared_platform_data orion_xor0_pdata
= {
644 .channels
= orion_xor0_channels_pdata
,
647 static struct platform_device orion_xor0_shared
= {
648 .name
= MV_XOR_SHARED_NAME
,
650 .num_resources
= ARRAY_SIZE(orion_xor0_shared_resources
),
651 .resource
= orion_xor0_shared_resources
,
653 .dma_mask
= &orion_xor_dmamask
,
654 .coherent_dma_mask
= DMA_BIT_MASK(64),
655 .platform_data
= &orion_xor0_pdata
,
659 void __init
orion_xor0_init(unsigned long mapbase_low
,
660 unsigned long mapbase_high
,
664 orion_xor0_shared_resources
[0].start
= mapbase_low
;
665 orion_xor0_shared_resources
[0].end
= mapbase_low
+ 0xff;
666 orion_xor0_shared_resources
[1].start
= mapbase_high
;
667 orion_xor0_shared_resources
[1].end
= mapbase_high
+ 0xff;
669 orion_xor0_shared_resources
[2].start
= irq_0
;
670 orion_xor0_shared_resources
[2].end
= irq_0
;
671 orion_xor0_shared_resources
[3].start
= irq_1
;
672 orion_xor0_shared_resources
[3].end
= irq_1
;
675 * two engines can't do memset simultaneously, this limitation
676 * satisfied by removing memset support from one of the engines.
678 dma_cap_set(DMA_MEMCPY
, orion_xor0_channels_pdata
[0].cap_mask
);
679 dma_cap_set(DMA_XOR
, orion_xor0_channels_pdata
[0].cap_mask
);
681 dma_cap_set(DMA_MEMSET
, orion_xor0_channels_pdata
[1].cap_mask
);
682 dma_cap_set(DMA_MEMCPY
, orion_xor0_channels_pdata
[1].cap_mask
);
683 dma_cap_set(DMA_XOR
, orion_xor0_channels_pdata
[1].cap_mask
);
685 platform_device_register(&orion_xor0_shared
);
688 /*****************************************************************************
690 ****************************************************************************/
691 static struct resource orion_xor1_shared_resources
[] = {
694 .flags
= IORESOURCE_MEM
,
696 .name
= "xor 1 high",
697 .flags
= IORESOURCE_MEM
,
699 .name
= "irq channel 0",
700 .flags
= IORESOURCE_IRQ
,
702 .name
= "irq channel 1",
703 .flags
= IORESOURCE_IRQ
,
707 static struct platform_device orion_xor1_shared
;
709 static struct mv_xor_platform_data orion_xor1_channels_pdata
[2] = {
711 .shared
= &orion_xor1_shared
,
713 .pool_size
= PAGE_SIZE
,
716 .shared
= &orion_xor1_shared
,
718 .pool_size
= PAGE_SIZE
,
722 static struct mv_xor_shared_platform_data orion_xor1_pdata
= {
723 .channels
= orion_xor1_channels_pdata
,
726 static struct platform_device orion_xor1_shared
= {
727 .name
= MV_XOR_SHARED_NAME
,
729 .num_resources
= ARRAY_SIZE(orion_xor1_shared_resources
),
730 .resource
= orion_xor1_shared_resources
,
732 .dma_mask
= &orion_xor_dmamask
,
733 .coherent_dma_mask
= DMA_BIT_MASK(64),
734 .platform_data
= &orion_xor1_pdata
,
738 void __init
orion_xor1_init(unsigned long mapbase_low
,
739 unsigned long mapbase_high
,
743 orion_xor1_shared_resources
[0].start
= mapbase_low
;
744 orion_xor1_shared_resources
[0].end
= mapbase_low
+ 0xff;
745 orion_xor1_shared_resources
[1].start
= mapbase_high
;
746 orion_xor1_shared_resources
[1].end
= mapbase_high
+ 0xff;
748 orion_xor1_shared_resources
[2].start
= irq_0
;
749 orion_xor1_shared_resources
[2].end
= irq_0
;
750 orion_xor1_shared_resources
[3].start
= irq_1
;
751 orion_xor1_shared_resources
[3].end
= irq_1
;
754 * two engines can't do memset simultaneously, this limitation
755 * satisfied by removing memset support from one of the engines.
757 dma_cap_set(DMA_MEMCPY
, orion_xor1_channels_pdata
[0].cap_mask
);
758 dma_cap_set(DMA_XOR
, orion_xor1_channels_pdata
[0].cap_mask
);
760 dma_cap_set(DMA_MEMSET
, orion_xor1_channels_pdata
[1].cap_mask
);
761 dma_cap_set(DMA_MEMCPY
, orion_xor1_channels_pdata
[1].cap_mask
);
762 dma_cap_set(DMA_XOR
, orion_xor1_channels_pdata
[1].cap_mask
);
764 platform_device_register(&orion_xor1_shared
);
767 /*****************************************************************************
769 ****************************************************************************/
770 static struct orion_ehci_data orion_ehci_data
;
771 static u64 ehci_dmamask
= DMA_BIT_MASK(32);
774 /*****************************************************************************
776 ****************************************************************************/
777 static struct resource orion_ehci_resources
[2];
779 static struct platform_device orion_ehci
= {
780 .name
= "orion-ehci",
783 .dma_mask
= &ehci_dmamask
,
784 .coherent_dma_mask
= DMA_BIT_MASK(32),
785 .platform_data
= &orion_ehci_data
,
789 void __init
orion_ehci_init(unsigned long mapbase
,
791 enum orion_ehci_phy_ver phy_version
)
793 orion_ehci_data
.phy_version
= phy_version
;
794 fill_resources(&orion_ehci
, orion_ehci_resources
, mapbase
, SZ_4K
- 1,
797 platform_device_register(&orion_ehci
);
800 /*****************************************************************************
802 ****************************************************************************/
803 static struct resource orion_ehci_1_resources
[2];
805 static struct platform_device orion_ehci_1
= {
806 .name
= "orion-ehci",
809 .dma_mask
= &ehci_dmamask
,
810 .coherent_dma_mask
= DMA_BIT_MASK(32),
811 .platform_data
= &orion_ehci_data
,
815 void __init
orion_ehci_1_init(unsigned long mapbase
,
818 fill_resources(&orion_ehci_1
, orion_ehci_1_resources
,
819 mapbase
, SZ_4K
- 1, irq
);
821 platform_device_register(&orion_ehci_1
);
824 /*****************************************************************************
826 ****************************************************************************/
827 static struct resource orion_ehci_2_resources
[2];
829 static struct platform_device orion_ehci_2
= {
830 .name
= "orion-ehci",
833 .dma_mask
= &ehci_dmamask
,
834 .coherent_dma_mask
= DMA_BIT_MASK(32),
835 .platform_data
= &orion_ehci_data
,
839 void __init
orion_ehci_2_init(unsigned long mapbase
,
842 fill_resources(&orion_ehci_2
, orion_ehci_2_resources
,
843 mapbase
, SZ_4K
- 1, irq
);
845 platform_device_register(&orion_ehci_2
);
848 /*****************************************************************************
850 ****************************************************************************/
851 static struct resource orion_sata_resources
[2] = {
859 static struct platform_device orion_sata
= {
863 .coherent_dma_mask
= DMA_BIT_MASK(32),
867 void __init
orion_sata_init(struct mv_sata_platform_data
*sata_data
,
868 unsigned long mapbase
,
871 orion_sata
.dev
.platform_data
= sata_data
;
872 fill_resources(&orion_sata
, orion_sata_resources
,
873 mapbase
, 0x5000 - 1, irq
);
875 platform_device_register(&orion_sata
);
878 /*****************************************************************************
879 * Cryptographic Engines and Security Accelerator (CESA)
880 ****************************************************************************/
881 static struct resource orion_crypto_resources
[] = {
885 .name
= "crypto interrupt",
888 .flags
= IORESOURCE_MEM
,
892 static struct platform_device orion_crypto
= {
897 void __init
orion_crypto_init(unsigned long mapbase
,
898 unsigned long srambase
,
899 unsigned long sram_size
,
902 fill_resources(&orion_crypto
, orion_crypto_resources
,
903 mapbase
, 0xffff, irq
);
904 orion_crypto
.num_resources
= 3;
905 orion_crypto_resources
[2].start
= srambase
;
906 orion_crypto_resources
[2].end
= srambase
+ sram_size
- 1;
908 platform_device_register(&orion_crypto
);