aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/amba-pl08x.c
diff options
context:
space:
mode:
authorRussell King - ARM Linux <linux@arm.linux.org.uk>2011-01-03 17:30:24 -0500
committerDan Williams <dan.j.williams@intel.com>2011-01-04 22:13:38 -0500
commite8b5e11df3d02e7bbd85c025cc705a8e67746f73 (patch)
tree33c31a3b3d56c917babe0c8a675dfb9e6127f8ef /drivers/dma/amba-pl08x.c
parente8a7e48bb248a1196484d3f8afa53bded2b24e71 (diff)
ARM: PL08x: fix spelling errors
Correct mis-spellings in comments and printk strings. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/amba-pl08x.c')
-rw-r--r--drivers/dma/amba-pl08x.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index b605cc9ac3a2..3da49ed5f800 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -19,7 +19,7 @@
19 * this program; if not, write to the Free Software Foundation, Inc., 59 19 * this program; if not, write to the Free Software Foundation, Inc., 59
20 * Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 * 21 *
22 * The full GNU General Public License is iin this distribution in the 22 * The full GNU General Public License is in this distribution in the
23 * file called COPYING. 23 * file called COPYING.
24 * 24 *
25 * Documentation: ARM DDI 0196G == PL080 25 * Documentation: ARM DDI 0196G == PL080
@@ -82,7 +82,7 @@
82 82
83/** 83/**
84 * struct vendor_data - vendor-specific config parameters 84 * struct vendor_data - vendor-specific config parameters
85 * for PL08x derivates 85 * for PL08x derivatives
86 * @name: the name of this specific variant 86 * @name: the name of this specific variant
87 * @channels: the number of channels available in this variant 87 * @channels: the number of channels available in this variant
88 * @dualmaster: whether this version supports dual AHB masters 88 * @dualmaster: whether this version supports dual AHB masters
@@ -96,10 +96,8 @@ struct vendor_data {
96 96
97/* 97/*
98 * PL08X private data structures 98 * PL08X private data structures
99 * An LLI struct - see pl08x TRM 99 * An LLI struct - see PL08x TRM. Note that next uses bit[0] as a bus bit,
100 * Note that next uses bit[0] as a bus bit, 100 * start & end do not - their bus bit info is in cctl.
101 * start & end do not - their bus bit info
102 * is in cctl
103 */ 101 */
104struct lli { 102struct lli {
105 dma_addr_t src; 103 dma_addr_t src;
@@ -152,7 +150,7 @@ struct pl08x_driver_data {
152/* Size (bytes) of each LLI buffer allocated for one transfer */ 150/* Size (bytes) of each LLI buffer allocated for one transfer */
153# define PL08X_LLI_TSFR_SIZE 0x2000 151# define PL08X_LLI_TSFR_SIZE 0x2000
154 152
155/* Maximimum times we call dma_pool_alloc on this pool without freeing */ 153/* Maximum times we call dma_pool_alloc on this pool without freeing */
156#define PL08X_MAX_ALLOCS 0x40 154#define PL08X_MAX_ALLOCS 0x40
157#define MAX_NUM_TSFR_LLIS (PL08X_LLI_TSFR_SIZE/sizeof(struct lli)) 155#define MAX_NUM_TSFR_LLIS (PL08X_LLI_TSFR_SIZE/sizeof(struct lli))
158#define PL08X_ALIGN 8 156#define PL08X_ALIGN 8
@@ -177,7 +175,7 @@ static int pl08x_phy_channel_busy(struct pl08x_phy_chan *ch)
177 175
178/* 176/*
179 * Set the initial DMA register values i.e. those for the first LLI 177 * Set the initial DMA register values i.e. those for the first LLI
180 * The next lli pointer and the configuration interrupt bit have 178 * The next LLI pointer and the configuration interrupt bit have
181 * been set when the LLIs were constructed 179 * been set when the LLIs were constructed
182 */ 180 */
183static void pl08x_set_cregs(struct pl08x_driver_data *pl08x, 181static void pl08x_set_cregs(struct pl08x_driver_data *pl08x,
@@ -366,8 +364,7 @@ static u32 pl08x_getbytes_chan(struct pl08x_dma_chan *plchan)
366 while (clli) { 364 while (clli) {
367 bytes += get_bytes_in_cctl(llis_va[i].cctl); 365 bytes += get_bytes_in_cctl(llis_va[i].cctl);
368 /* 366 /*
369 * A clli of 0x00000000 will terminate the 367 * A LLI pointer of 0 terminates the LLI list
370 * LLI list
371 */ 368 */
372 clli = llis_va[i].next; 369 clli = llis_va[i].next;
373 i++; 370 i++;
@@ -469,7 +466,7 @@ static inline u32 pl08x_cctl_bits(u32 cctl, u8 srcwidth, u8 dstwidth,
469{ 466{
470 u32 retbits = cctl; 467 u32 retbits = cctl;
471 468
472 /* Remove all src, dst and transfersize bits */ 469 /* Remove all src, dst and transfer size bits */
473 retbits &= ~PL080_CONTROL_DWIDTH_MASK; 470 retbits &= ~PL080_CONTROL_DWIDTH_MASK;
474 retbits &= ~PL080_CONTROL_SWIDTH_MASK; 471 retbits &= ~PL080_CONTROL_SWIDTH_MASK;
475 retbits &= ~PL080_CONTROL_TRANSFER_SIZE_MASK; 472 retbits &= ~PL080_CONTROL_TRANSFER_SIZE_MASK;
@@ -701,7 +698,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
701 * Choose bus to align to 698 * Choose bus to align to
702 * - prefers destination bus if both available 699 * - prefers destination bus if both available
703 * - if fixed address on one bus chooses other 700 * - if fixed address on one bus chooses other
704 * - modifies cctl to choose an apropriate master 701 * - modifies cctl to choose an appropriate master
705 */ 702 */
706 pl08x_choose_master_bus(&txd->srcbus, &txd->dstbus, 703 pl08x_choose_master_bus(&txd->srcbus, &txd->dstbus,
707 &mbus, &sbus, cctl); 704 &mbus, &sbus, cctl);
@@ -775,7 +772,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
775 target_len = max_bytes_per_lli; 772 target_len = max_bytes_per_lli;
776 773
777 /* 774 /*
778 * Set bus lengths for incrementing busses 775 * Set bus lengths for incrementing buses
779 * to number of bytes which fill to next memory 776 * to number of bytes which fill to next memory
780 * boundary 777 * boundary
781 */ 778 */
@@ -826,7 +823,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
826 /* 823 /*
827 * So now we know how many bytes to transfer 824 * So now we know how many bytes to transfer
828 * to get to the nearest boundary 825 * to get to the nearest boundary
829 * The next lli will past the boundary 826 * The next LLI will past the boundary
830 * - however we may be working to a boundary 827 * - however we may be working to a boundary
831 * on the slave bus 828 * on the slave bus
832 * We need to ensure the master stays aligned 829 * We need to ensure the master stays aligned
@@ -884,7 +881,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
884 && (remainder); j++) { 881 && (remainder); j++) {
885 cctl = pl08x_cctl_bits(cctl, 1, 1, 1); 882 cctl = pl08x_cctl_bits(cctl, 1, 1, 1);
886 dev_vdbg(&pl08x->adev->dev, 883 dev_vdbg(&pl08x->adev->dev,
887 "%s align with boundardy, single byte (remain %08x)\n", 884 "%s align with boundary, single byte (remain %08x)\n",
888 __func__, remainder); 885 __func__, remainder);
889 num_llis = 886 num_llis =
890 pl08x_fill_lli_for_desc(pl08x, 887 pl08x_fill_lli_for_desc(pl08x,
@@ -907,7 +904,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
907 while (remainder) { 904 while (remainder) {
908 cctl = pl08x_cctl_bits(cctl, 1, 1, 1); 905 cctl = pl08x_cctl_bits(cctl, 1, 1, 1);
909 dev_vdbg(&pl08x->adev->dev, 906 dev_vdbg(&pl08x->adev->dev,
910 "%s align with boundardy, single odd byte (remain %d)\n", 907 "%s align with boundary, single odd byte (remain %d)\n",
911 __func__, remainder); 908 __func__, remainder);
912 num_llis = pl08x_fill_lli_for_desc(pl08x, txd, num_llis, 909 num_llis = pl08x_fill_lli_for_desc(pl08x, txd, num_llis,
913 1, cctl, &remainder); 910 1, cctl, &remainder);
@@ -1367,8 +1364,8 @@ static int pl08x_prep_channel_resources(struct pl08x_dma_chan *plchan,
1367 * available to handle it whereas slave transfers may 1364 * available to handle it whereas slave transfers may
1368 * have been denied due to platform channel muxing restrictions 1365 * have been denied due to platform channel muxing restrictions
1369 * and since there is no guarantee that this will ever be 1366 * and since there is no guarantee that this will ever be
1370 * resolved, and since the signal must be aquired AFTER 1367 * resolved, and since the signal must be acquired AFTER
1371 * aquiring the physical channel, we will let them be NACK:ed 1368 * acquiring the physical channel, we will let them be NACK:ed
1372 * with -EBUSY here. The drivers can alway retry the prep() 1369 * with -EBUSY here. The drivers can alway retry the prep()
1373 * call if they are eager on doing this using DMA. 1370 * call if they are eager on doing this using DMA.
1374 */ 1371 */
@@ -1620,7 +1617,7 @@ static void pl08x_ensure_on(struct pl08x_driver_data *pl08x)
1620 1617
1621 val = readl(pl08x->base + PL080_CONFIG); 1618 val = readl(pl08x->base + PL080_CONFIG);
1622 val &= ~(PL080_CONFIG_M2_BE | PL080_CONFIG_M1_BE | PL080_CONFIG_ENABLE); 1619 val &= ~(PL080_CONFIG_M2_BE | PL080_CONFIG_M1_BE | PL080_CONFIG_ENABLE);
1623 /* We implictly clear bit 1 and that means little-endian mode */ 1620 /* We implicitly clear bit 1 and that means little-endian mode */
1624 val |= PL080_CONFIG_ENABLE; 1621 val |= PL080_CONFIG_ENABLE;
1625 writel(val, pl08x->base + PL080_CONFIG); 1622 writel(val, pl08x->base + PL080_CONFIG);
1626} 1623}
@@ -2160,7 +2157,7 @@ static int __init pl08x_init(void)
2160 retval = amba_driver_register(&pl08x_amba_driver); 2157 retval = amba_driver_register(&pl08x_amba_driver);
2161 if (retval) 2158 if (retval)
2162 printk(KERN_WARNING DRIVER_NAME 2159 printk(KERN_WARNING DRIVER_NAME
2163 "failed to register as an amba device (%d)\n", 2160 "failed to register as an AMBA device (%d)\n",
2164 retval); 2161 retval);
2165 return retval; 2162 return retval;
2166} 2163}