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 <plat/mv_xor.h>
23 #include <plat/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
,
90 resource_size_t mapbase
,
94 data
->mapbase
= mapbase
;
95 data
->membase
= (void __iomem
*)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(unsigned int 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(unsigned int 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(unsigned int 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(unsigned int 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
)
296 fill_resources(&orion_ge00_shared
, orion_ge00_shared_resources
,
297 mapbase
+ 0x2000, SZ_16K
- 1, irq_err
);
298 ge_complete(&orion_ge00_shared_data
,
299 orion_ge00_resources
, irq
, &orion_ge00_shared
,
300 eth_data
, &orion_ge00
);
303 /*****************************************************************************
305 ****************************************************************************/
306 struct mv643xx_eth_shared_platform_data orion_ge01_shared_data
= {
307 .shared_smi
= &orion_ge00_shared
,
310 static struct resource orion_ge01_shared_resources
[] = {
314 .name
= "ge01 err irq",
318 static struct platform_device orion_ge01_shared
= {
319 .name
= MV643XX_ETH_SHARED_NAME
,
322 .platform_data
= &orion_ge01_shared_data
,
326 static struct resource orion_ge01_resources
[] = {
329 .flags
= IORESOURCE_IRQ
,
333 static struct platform_device orion_ge01
= {
334 .name
= MV643XX_ETH_NAME
,
337 .resource
= orion_ge01_resources
,
339 .coherent_dma_mask
= DMA_BIT_MASK(32),
343 void __init
orion_ge01_init(struct mv643xx_eth_platform_data
*eth_data
,
344 unsigned long mapbase
,
346 unsigned long irq_err
)
348 fill_resources(&orion_ge01_shared
, orion_ge01_shared_resources
,
349 mapbase
+ 0x2000, SZ_16K
- 1, irq_err
);
350 ge_complete(&orion_ge01_shared_data
,
351 orion_ge01_resources
, irq
, &orion_ge01_shared
,
352 eth_data
, &orion_ge01
);
355 /*****************************************************************************
357 ****************************************************************************/
358 struct mv643xx_eth_shared_platform_data orion_ge10_shared_data
= {
359 .shared_smi
= &orion_ge00_shared
,
362 static struct resource orion_ge10_shared_resources
[] = {
366 .name
= "ge10 err irq",
370 static struct platform_device orion_ge10_shared
= {
371 .name
= MV643XX_ETH_SHARED_NAME
,
374 .platform_data
= &orion_ge10_shared_data
,
378 static struct resource orion_ge10_resources
[] = {
381 .flags
= IORESOURCE_IRQ
,
385 static struct platform_device orion_ge10
= {
386 .name
= MV643XX_ETH_NAME
,
389 .resource
= orion_ge10_resources
,
391 .coherent_dma_mask
= DMA_BIT_MASK(32),
395 void __init
orion_ge10_init(struct mv643xx_eth_platform_data
*eth_data
,
396 unsigned long mapbase
,
398 unsigned long irq_err
)
400 fill_resources(&orion_ge10_shared
, orion_ge10_shared_resources
,
401 mapbase
+ 0x2000, SZ_16K
- 1, irq_err
);
402 ge_complete(&orion_ge10_shared_data
,
403 orion_ge10_resources
, irq
, &orion_ge10_shared
,
404 eth_data
, &orion_ge10
);
407 /*****************************************************************************
409 ****************************************************************************/
410 struct mv643xx_eth_shared_platform_data orion_ge11_shared_data
= {
411 .shared_smi
= &orion_ge00_shared
,
414 static struct resource orion_ge11_shared_resources
[] = {
418 .name
= "ge11 err irq",
422 static struct platform_device orion_ge11_shared
= {
423 .name
= MV643XX_ETH_SHARED_NAME
,
426 .platform_data
= &orion_ge11_shared_data
,
430 static struct resource orion_ge11_resources
[] = {
433 .flags
= IORESOURCE_IRQ
,
437 static struct platform_device orion_ge11
= {
438 .name
= MV643XX_ETH_NAME
,
441 .resource
= orion_ge11_resources
,
443 .coherent_dma_mask
= DMA_BIT_MASK(32),
447 void __init
orion_ge11_init(struct mv643xx_eth_platform_data
*eth_data
,
448 unsigned long mapbase
,
450 unsigned long irq_err
)
452 fill_resources(&orion_ge11_shared
, orion_ge11_shared_resources
,
453 mapbase
+ 0x2000, SZ_16K
- 1, irq_err
);
454 ge_complete(&orion_ge11_shared_data
,
455 orion_ge11_resources
, irq
, &orion_ge11_shared
,
456 eth_data
, &orion_ge11
);
459 /*****************************************************************************
461 ****************************************************************************/
462 static struct resource orion_switch_resources
[] = {
466 .flags
= IORESOURCE_IRQ
,
470 static struct platform_device orion_switch_device
= {
474 .resource
= orion_switch_resources
,
477 void __init
orion_ge00_switch_init(struct dsa_platform_data
*d
, int irq
)
482 orion_switch_resources
[0].start
= irq
;
483 orion_switch_resources
[0].end
= irq
;
484 orion_switch_device
.num_resources
= 1;
487 d
->netdev
= &orion_ge00
.dev
;
488 for (i
= 0; i
< d
->nr_chips
; i
++)
489 d
->chip
[i
].mii_bus
= &orion_ge00_shared
.dev
;
490 orion_switch_device
.dev
.platform_data
= d
;
492 platform_device_register(&orion_switch_device
);
495 /*****************************************************************************
497 ****************************************************************************/
498 static struct mv64xxx_i2c_pdata orion_i2c_pdata
= {
500 .timeout
= 1000, /* Default timeout of 1 second */
503 static struct resource orion_i2c_resources
[2];
505 static struct platform_device orion_i2c
= {
506 .name
= MV64XXX_I2C_CTLR_NAME
,
509 .platform_data
= &orion_i2c_pdata
,
513 static struct mv64xxx_i2c_pdata orion_i2c_1_pdata
= {
515 .timeout
= 1000, /* Default timeout of 1 second */
518 static struct resource orion_i2c_1_resources
[2];
520 static struct platform_device orion_i2c_1
= {
521 .name
= MV64XXX_I2C_CTLR_NAME
,
524 .platform_data
= &orion_i2c_1_pdata
,
528 void __init
orion_i2c_init(unsigned long mapbase
,
530 unsigned long freq_m
)
532 orion_i2c_pdata
.freq_m
= freq_m
;
533 fill_resources(&orion_i2c
, orion_i2c_resources
, mapbase
,
535 platform_device_register(&orion_i2c
);
538 void __init
orion_i2c_1_init(unsigned long mapbase
,
540 unsigned long freq_m
)
542 orion_i2c_1_pdata
.freq_m
= freq_m
;
543 fill_resources(&orion_i2c_1
, orion_i2c_1_resources
, mapbase
,
545 platform_device_register(&orion_i2c_1
);
548 /*****************************************************************************
550 ****************************************************************************/
551 static struct resource orion_spi_resources
;
553 static struct platform_device orion_spi
= {
558 static struct resource orion_spi_1_resources
;
560 static struct platform_device orion_spi_1
= {
565 /* Note: The SPI silicon core does have interrupts. However the
566 * current Linux software driver does not use interrupts. */
568 void __init
orion_spi_init(unsigned long mapbase
)
570 fill_resources(&orion_spi
, &orion_spi_resources
,
571 mapbase
, SZ_512
- 1, NO_IRQ
);
572 platform_device_register(&orion_spi
);
575 void __init
orion_spi_1_init(unsigned long mapbase
)
577 fill_resources(&orion_spi_1
, &orion_spi_1_resources
,
578 mapbase
, SZ_512
- 1, NO_IRQ
);
579 platform_device_register(&orion_spi_1
);
582 /*****************************************************************************
584 ****************************************************************************/
585 static struct resource orion_wdt_resource
=
586 DEFINE_RES_MEM(TIMER_PHYS_BASE
, 0x28);
588 static struct platform_device orion_wdt_device
= {
592 .resource
= &orion_wdt_resource
,
595 void __init
orion_wdt_init(void)
597 platform_device_register(&orion_wdt_device
);
600 /*****************************************************************************
602 ****************************************************************************/
603 static u64 orion_xor_dmamask
= DMA_BIT_MASK(32);
605 void __init
orion_xor_init_channels(
606 struct mv_xor_platform_data
*orion_xor0_data
,
607 struct platform_device
*orion_xor0_channel
,
608 struct mv_xor_platform_data
*orion_xor1_data
,
609 struct platform_device
*orion_xor1_channel
)
612 * two engines can't do memset simultaneously, this limitation
613 * satisfied by removing memset support from one of the engines.
615 dma_cap_set(DMA_MEMCPY
, orion_xor0_data
->cap_mask
);
616 dma_cap_set(DMA_XOR
, orion_xor0_data
->cap_mask
);
617 platform_device_register(orion_xor0_channel
);
619 dma_cap_set(DMA_MEMCPY
, orion_xor1_data
->cap_mask
);
620 dma_cap_set(DMA_MEMSET
, orion_xor1_data
->cap_mask
);
621 dma_cap_set(DMA_XOR
, orion_xor1_data
->cap_mask
);
622 platform_device_register(orion_xor1_channel
);
625 /*****************************************************************************
627 ****************************************************************************/
628 static struct resource orion_xor0_shared_resources
[] = {
631 .flags
= IORESOURCE_MEM
,
633 .name
= "xor 0 high",
634 .flags
= IORESOURCE_MEM
,
638 static struct platform_device orion_xor0_shared
= {
639 .name
= MV_XOR_SHARED_NAME
,
641 .num_resources
= ARRAY_SIZE(orion_xor0_shared_resources
),
642 .resource
= orion_xor0_shared_resources
,
645 static struct resource orion_xor00_resources
[] = {
647 .flags
= IORESOURCE_IRQ
,
651 static struct mv_xor_platform_data orion_xor00_data
= {
652 .shared
= &orion_xor0_shared
,
654 .pool_size
= PAGE_SIZE
,
657 static struct platform_device orion_xor00_channel
= {
660 .num_resources
= ARRAY_SIZE(orion_xor00_resources
),
661 .resource
= orion_xor00_resources
,
663 .dma_mask
= &orion_xor_dmamask
,
664 .coherent_dma_mask
= DMA_BIT_MASK(64),
665 .platform_data
= &orion_xor00_data
,
669 static struct resource orion_xor01_resources
[] = {
671 .flags
= IORESOURCE_IRQ
,
675 static struct mv_xor_platform_data orion_xor01_data
= {
676 .shared
= &orion_xor0_shared
,
678 .pool_size
= PAGE_SIZE
,
681 static struct platform_device orion_xor01_channel
= {
684 .num_resources
= ARRAY_SIZE(orion_xor01_resources
),
685 .resource
= orion_xor01_resources
,
687 .dma_mask
= &orion_xor_dmamask
,
688 .coherent_dma_mask
= DMA_BIT_MASK(64),
689 .platform_data
= &orion_xor01_data
,
693 void __init
orion_xor0_init(unsigned long mapbase_low
,
694 unsigned long mapbase_high
,
698 orion_xor0_shared_resources
[0].start
= mapbase_low
;
699 orion_xor0_shared_resources
[0].end
= mapbase_low
+ 0xff;
700 orion_xor0_shared_resources
[1].start
= mapbase_high
;
701 orion_xor0_shared_resources
[1].end
= mapbase_high
+ 0xff;
703 orion_xor00_resources
[0].start
= irq_0
;
704 orion_xor00_resources
[0].end
= irq_0
;
705 orion_xor01_resources
[0].start
= irq_1
;
706 orion_xor01_resources
[0].end
= irq_1
;
708 platform_device_register(&orion_xor0_shared
);
710 orion_xor_init_channels(&orion_xor00_data
, &orion_xor00_channel
,
711 &orion_xor01_data
, &orion_xor01_channel
);
714 /*****************************************************************************
716 ****************************************************************************/
717 static struct resource orion_xor1_shared_resources
[] = {
720 .flags
= IORESOURCE_MEM
,
722 .name
= "xor 1 high",
723 .flags
= IORESOURCE_MEM
,
727 static struct platform_device orion_xor1_shared
= {
728 .name
= MV_XOR_SHARED_NAME
,
730 .num_resources
= ARRAY_SIZE(orion_xor1_shared_resources
),
731 .resource
= orion_xor1_shared_resources
,
734 static struct resource orion_xor10_resources
[] = {
736 .flags
= IORESOURCE_IRQ
,
740 static struct mv_xor_platform_data orion_xor10_data
= {
741 .shared
= &orion_xor1_shared
,
743 .pool_size
= PAGE_SIZE
,
746 static struct platform_device orion_xor10_channel
= {
749 .num_resources
= ARRAY_SIZE(orion_xor10_resources
),
750 .resource
= orion_xor10_resources
,
752 .dma_mask
= &orion_xor_dmamask
,
753 .coherent_dma_mask
= DMA_BIT_MASK(64),
754 .platform_data
= &orion_xor10_data
,
758 static struct resource orion_xor11_resources
[] = {
760 .flags
= IORESOURCE_IRQ
,
764 static struct mv_xor_platform_data orion_xor11_data
= {
765 .shared
= &orion_xor1_shared
,
767 .pool_size
= PAGE_SIZE
,
770 static struct platform_device orion_xor11_channel
= {
773 .num_resources
= ARRAY_SIZE(orion_xor11_resources
),
774 .resource
= orion_xor11_resources
,
776 .dma_mask
= &orion_xor_dmamask
,
777 .coherent_dma_mask
= DMA_BIT_MASK(64),
778 .platform_data
= &orion_xor11_data
,
782 void __init
orion_xor1_init(unsigned long mapbase_low
,
783 unsigned long mapbase_high
,
787 orion_xor1_shared_resources
[0].start
= mapbase_low
;
788 orion_xor1_shared_resources
[0].end
= mapbase_low
+ 0xff;
789 orion_xor1_shared_resources
[1].start
= mapbase_high
;
790 orion_xor1_shared_resources
[1].end
= mapbase_high
+ 0xff;
792 orion_xor10_resources
[0].start
= irq_0
;
793 orion_xor10_resources
[0].end
= irq_0
;
794 orion_xor11_resources
[0].start
= irq_1
;
795 orion_xor11_resources
[0].end
= irq_1
;
797 platform_device_register(&orion_xor1_shared
);
799 orion_xor_init_channels(&orion_xor10_data
, &orion_xor10_channel
,
800 &orion_xor11_data
, &orion_xor11_channel
);
803 /*****************************************************************************
805 ****************************************************************************/
806 static struct orion_ehci_data orion_ehci_data
;
807 static u64 ehci_dmamask
= DMA_BIT_MASK(32);
810 /*****************************************************************************
812 ****************************************************************************/
813 static struct resource orion_ehci_resources
[2];
815 static struct platform_device orion_ehci
= {
816 .name
= "orion-ehci",
819 .dma_mask
= &ehci_dmamask
,
820 .coherent_dma_mask
= DMA_BIT_MASK(32),
821 .platform_data
= &orion_ehci_data
,
825 void __init
orion_ehci_init(unsigned long mapbase
,
827 enum orion_ehci_phy_ver phy_version
)
829 orion_ehci_data
.phy_version
= phy_version
;
830 fill_resources(&orion_ehci
, orion_ehci_resources
, mapbase
, SZ_4K
- 1,
833 platform_device_register(&orion_ehci
);
836 /*****************************************************************************
838 ****************************************************************************/
839 static struct resource orion_ehci_1_resources
[2];
841 static struct platform_device orion_ehci_1
= {
842 .name
= "orion-ehci",
845 .dma_mask
= &ehci_dmamask
,
846 .coherent_dma_mask
= DMA_BIT_MASK(32),
847 .platform_data
= &orion_ehci_data
,
851 void __init
orion_ehci_1_init(unsigned long mapbase
,
854 fill_resources(&orion_ehci_1
, orion_ehci_1_resources
,
855 mapbase
, SZ_4K
- 1, irq
);
857 platform_device_register(&orion_ehci_1
);
860 /*****************************************************************************
862 ****************************************************************************/
863 static struct resource orion_ehci_2_resources
[2];
865 static struct platform_device orion_ehci_2
= {
866 .name
= "orion-ehci",
869 .dma_mask
= &ehci_dmamask
,
870 .coherent_dma_mask
= DMA_BIT_MASK(32),
871 .platform_data
= &orion_ehci_data
,
875 void __init
orion_ehci_2_init(unsigned long mapbase
,
878 fill_resources(&orion_ehci_2
, orion_ehci_2_resources
,
879 mapbase
, SZ_4K
- 1, irq
);
881 platform_device_register(&orion_ehci_2
);
884 /*****************************************************************************
886 ****************************************************************************/
887 static struct resource orion_sata_resources
[2] = {
895 static struct platform_device orion_sata
= {
899 .coherent_dma_mask
= DMA_BIT_MASK(32),
903 void __init
orion_sata_init(struct mv_sata_platform_data
*sata_data
,
904 unsigned long mapbase
,
907 orion_sata
.dev
.platform_data
= sata_data
;
908 fill_resources(&orion_sata
, orion_sata_resources
,
909 mapbase
, 0x5000 - 1, irq
);
911 platform_device_register(&orion_sata
);
914 /*****************************************************************************
915 * Cryptographic Engines and Security Accelerator (CESA)
916 ****************************************************************************/
917 static struct resource orion_crypto_resources
[] = {
921 .name
= "crypto interrupt",
924 .flags
= IORESOURCE_MEM
,
928 static struct platform_device orion_crypto
= {
933 void __init
orion_crypto_init(unsigned long mapbase
,
934 unsigned long srambase
,
935 unsigned long sram_size
,
938 fill_resources(&orion_crypto
, orion_crypto_resources
,
939 mapbase
, 0xffff, irq
);
940 orion_crypto
.num_resources
= 3;
941 orion_crypto_resources
[2].start
= srambase
;
942 orion_crypto_resources
[2].end
= srambase
+ sram_size
- 1;
944 platform_device_register(&orion_crypto
);