Skip to content

Commit 2dc6c6f

Browse files
marexericmiao
authored andcommitted
[ARM] pata_pxa: DMA-capable PATA driver
This patch adds a driver for a harddrive attached to PXA address and data bus. Unlike pata_platform, this driver allows usage of PXA DMA controller, making the transmission speed 3x higher. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
1 parent 406c86f commit 2dc6c6f

File tree

4 files changed

+457
-0
lines changed

4 files changed

+457
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Generic PXA PATA driver
3+
*
4+
* Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
5+
*
6+
* This program is free software; you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation; either version 2, or (at your option)
9+
* any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with this program; see the file COPYING. If not, write to
18+
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19+
*/
20+
21+
#ifndef __MACH_PATA_PXA_H__
22+
#define __MACH_PATA_PXA_H__
23+
24+
struct pata_pxa_pdata {
25+
/* PXA DMA DREQ<0:2> pin */
26+
uint32_t dma_dreq;
27+
/* Register shift */
28+
uint32_t reg_shift;
29+
/* IRQ flags */
30+
uint32_t irq_flags;
31+
};
32+
33+
#endif /* __MACH_PATA_PXA_H__ */

drivers/ata/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,17 @@ config PATA_VIA
642642

643643
If unsure, say N.
644644

645+
config PATA_PXA
646+
tristate "PXA DMA-capable PATA support"
647+
depends on ARCH_PXA
648+
help
649+
This option enables support for harddrive attached to PXA CPU's bus.
650+
651+
NOTE: This driver utilizes PXA DMA controller, in case your hardware
652+
is not capable of doing MWDMA, use pata_platform instead.
653+
654+
If unsure, say N.
655+
645656
config PATA_WINBOND
646657
tristate "Winbond SL82C105 PATA support"
647658
depends on PCI

drivers/ata/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ obj-$(CONFIG_PATA_RB532) += pata_rb532_cf.o
8989
obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o
9090
obj-$(CONFIG_PATA_WINBOND_VLB) += pata_winbond.o
9191

92+
obj-$(CONFIG_PATA_PXA) += pata_pxa.o
93+
9294
# Should be last but two libata driver
9395
obj-$(CONFIG_PATA_ACPI) += pata_acpi.o
9496
# Should be last but one libata driver

0 commit comments

Comments
 (0)