mm: make wait_on_page_writeback() wait for multiple pending writebacks
[linux/fpc-iii.git] / arch / arm / mach-s3c / bast-ide.c
blobda64db1811d88d2be8c0018f6f04bf4f9833c3b4
1 // SPDX-License-Identifier: GPL-2.0
2 //
3 // Copyright 2007 Simtec Electronics
4 // http://www.simtec.co.uk/products/EB2410ITX/
5 // http://armlinux.simtec.co.uk/
6 // Ben Dooks <ben@simtec.co.uk>
8 #include <linux/kernel.h>
9 #include <linux/types.h>
10 #include <linux/init.h>
11 #include <linux/interrupt.h>
13 #include <linux/platform_device.h>
14 #include <linux/ata_platform.h>
16 #include <asm/mach-types.h>
18 #include <asm/mach/arch.h>
19 #include <asm/mach/map.h>
20 #include <asm/mach/irq.h>
22 #include "map.h"
23 #include <mach/irqs.h>
25 #include "bast.h"
27 /* IDE ports */
29 static struct pata_platform_info bast_ide_platdata = {
30 .ioport_shift = 5,
33 static struct resource bast_ide0_resource[] = {
34 [0] = DEFINE_RES_MEM(BAST_IDE_CS + BAST_PA_IDEPRI, 8 * 0x20),
35 [1] = DEFINE_RES_MEM(BAST_IDE_CS + BAST_PA_IDEPRIAUX + (6 * 0x20), 0x20),
36 [2] = DEFINE_RES_IRQ(BAST_IRQ_IDE0),
39 static struct platform_device bast_device_ide0 = {
40 .name = "pata_platform",
41 .id = 0,
42 .num_resources = ARRAY_SIZE(bast_ide0_resource),
43 .resource = bast_ide0_resource,
44 .dev = {
45 .platform_data = &bast_ide_platdata,
46 .coherent_dma_mask = ~0,
51 static struct resource bast_ide1_resource[] = {
52 [0] = DEFINE_RES_MEM(BAST_IDE_CS + BAST_PA_IDESEC, 8 * 0x20),
53 [1] = DEFINE_RES_MEM(BAST_IDE_CS + BAST_PA_IDESECAUX + (6 * 0x20), 0x20),
54 [2] = DEFINE_RES_IRQ(BAST_IRQ_IDE1),
57 static struct platform_device bast_device_ide1 = {
58 .name = "pata_platform",
59 .id = 1,
60 .num_resources = ARRAY_SIZE(bast_ide1_resource),
61 .resource = bast_ide1_resource,
62 .dev = {
63 .platform_data = &bast_ide_platdata,
64 .coherent_dma_mask = ~0,
68 static struct platform_device *bast_ide_devices[] __initdata = {
69 &bast_device_ide0,
70 &bast_device_ide1,
73 static __init int bast_ide_init(void)
75 if (machine_is_bast() || machine_is_vr1000())
76 return platform_add_devices(bast_ide_devices,
77 ARRAY_SIZE(bast_ide_devices));
79 return 0;
82 fs_initcall(bast_ide_init);