cns3xxx: add linux 3.8 support and use it by default
[openwrt/svn-archive/archive.git] / target / linux / cns3xxx / patches-3.8 / 080-sata_support.patch
1 --- a/arch/arm/mach-cns3xxx/devices.c
2 +++ b/arch/arm/mach-cns3xxx/devices.c
3 @@ -41,7 +41,7 @@ static struct resource cns3xxx_ahci_reso
4 static u64 cns3xxx_ahci_dmamask = DMA_BIT_MASK(32);
5
6 static struct platform_device cns3xxx_ahci_pdev = {
7 - .name = "ahci",
8 + .name = "cns3xxx-ahci",
9 .id = 0,
10 .resource = cns3xxx_ahci_resource,
11 .num_resources = ARRAY_SIZE(cns3xxx_ahci_resource),
12 --- a/drivers/ata/ahci_platform.c
13 +++ b/drivers/ata/ahci_platform.c
14 @@ -31,6 +31,7 @@ enum ahci_type {
15 AHCI, /* standard platform ahci */
16 IMX53_AHCI, /* ahci on i.mx53 */
17 STRICT_AHCI, /* delayed DMA engine start */
18 + CNS3XXX_AHCI, /* AHCI on cns3xxx */
19 };
20
21 static struct platform_device_id ahci_devtype[] = {
22 @@ -44,6 +45,9 @@ static struct platform_device_id ahci_de
23 .name = "strict-ahci",
24 .driver_data = STRICT_AHCI,
25 }, {
26 + .name = "cns3xxx-ahci",
27 + .driver_data = CNS3XXX_AHCI,
28 + }, {
29 /* sentinel */
30 }
31 };
32 @@ -80,6 +84,12 @@ static const struct ata_port_info ahci_p
33 .udma_mask = ATA_UDMA6,
34 .port_ops = &ahci_platform_ops,
35 },
36 + [CNS3XXX_AHCI] = {
37 + .flags = AHCI_FLAG_COMMON,
38 + .pio_mask = ATA_PIO4,
39 + .udma_mask = ATA_UDMA6,
40 + .port_ops = &ahci_platform_retry_srst_ops,
41 + }
42 };
43
44 static struct scsi_host_template ahci_platform_sht = {