aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/cafe.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-11-30 03:17:38 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2006-11-30 03:17:38 -0500
commitc9ac5977299dd106ddb759e7e10035770dff185b (patch)
tree516a5bce7204718c958ef083c1ad3435b6b5907a /drivers/mtd/nand/cafe.c
parentdd36f2673573fc027945d488342f2f70664f0448 (diff)
[MTD] Remove trailing whitespace
The newly-added cafe_ecc.c had a lot of it because of the way the lookup table was auto-generated; clean up the other files too while we're at it. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/nand/cafe.c')
-rw-r--r--drivers/mtd/nand/cafe.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/mtd/nand/cafe.c b/drivers/mtd/nand/cafe.c
index c0a5ec125907..b8d9b64cccc0 100644
--- a/drivers/mtd/nand/cafe.c
+++ b/drivers/mtd/nand/cafe.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * Driver for One Laptop Per Child ‘CAFÉ’ controller, aka Marvell 88ALP01 2 * Driver for One Laptop Per Child ‘CAFÉ’ controller, aka Marvell 88ALP01
3 * 3 *
4 * Copyright © 2006 Red Hat, Inc. 4 * Copyright © 2006 Red Hat, Inc.
@@ -60,7 +60,6 @@ struct cafe_priv {
60 int page_addr; 60 int page_addr;
61 dma_addr_t dmaaddr; 61 dma_addr_t dmaaddr;
62 unsigned char *dmabuf; 62 unsigned char *dmabuf;
63
64}; 63};
65 64
66static int usedma = 1; 65static int usedma = 1;
@@ -217,7 +216,7 @@ static void cafe_nand_cmdfunc(struct mtd_info *mtd, unsigned command,
217 ctl1 |= ((adrbytes-1)|8) << 27; 216 ctl1 |= ((adrbytes-1)|8) << 27;
218 217
219 if (command == NAND_CMD_SEQIN || command == NAND_CMD_ERASE1) { 218 if (command == NAND_CMD_SEQIN || command == NAND_CMD_ERASE1) {
220 /* Ignore the first command of a pair; the hardware 219 /* Ignore the first command of a pair; the hardware
221 deals with them both at once, later */ 220 deals with them both at once, later */
222 cafe->ctl1 = ctl1; 221 cafe->ctl1 = ctl1;
223 cafe_dev_dbg(&cafe->pdev->dev, "Setup for delayed command, ctl1 %08x, dlen %x\n", 222 cafe_dev_dbg(&cafe->pdev->dev, "Setup for delayed command, ctl1 %08x, dlen %x\n",
@@ -231,7 +230,7 @@ static void cafe_nand_cmdfunc(struct mtd_info *mtd, unsigned command,
231 cafe_writel(cafe, cafe->ctl2 | 0x100 | NAND_CMD_READSTART, NAND_CTRL2); 230 cafe_writel(cafe, cafe->ctl2 | 0x100 | NAND_CMD_READSTART, NAND_CTRL2);
232 231
233 do_command: 232 do_command:
234 cafe_dev_dbg(&cafe->pdev->dev, "dlen %x, ctl1 %x, ctl2 %x\n", 233 cafe_dev_dbg(&cafe->pdev->dev, "dlen %x, ctl1 %x, ctl2 %x\n",
235 cafe->datalen, ctl1, cafe_readl(cafe, NAND_CTRL2)); 234 cafe->datalen, ctl1, cafe_readl(cafe, NAND_CTRL2));
236 235
237 /* NB: The datasheet lies -- we really should be subtracting 1 here */ 236 /* NB: The datasheet lies -- we really should be subtracting 1 here */
@@ -380,7 +379,7 @@ static int cafe_nand_read_page(struct mtd_info *mtd, struct nand_chip *chip,
380 uint32_t tmp = cafe_readl(cafe, NAND_ECC_SYN01 + (i*2)); 379 uint32_t tmp = cafe_readl(cafe, NAND_ECC_SYN01 + (i*2));
381 syn[i] = tmp & 0xfff; 380 syn[i] = tmp & 0xfff;
382 syn[i+1] = (tmp >> 16) & 0xfff; 381 syn[i+1] = (tmp >> 16) & 0xfff;
383 } 382 }
384 383
385 if ((i = cafe_correct_ecc(buf, syn)) < 0) { 384 if ((i = cafe_correct_ecc(buf, syn)) < 0) {
386 dev_dbg(&cafe->pdev->dev, "Failed to correct ECC at %08x\n", 385 dev_dbg(&cafe->pdev->dev, "Failed to correct ECC at %08x\n",
@@ -404,7 +403,7 @@ static struct nand_ecclayout cafe_oobinfo_2048 = {
404 .oobfree = {{14, 50}} 403 .oobfree = {{14, 50}}
405}; 404};
406 405
407/* Ick. The BBT code really ought to be able to work this bit out 406/* Ick. The BBT code really ought to be able to work this bit out
408 for itself from the above, at least for the 2KiB case */ 407 for itself from the above, at least for the 2KiB case */
409static uint8_t cafe_bbt_pattern_2048[] = { 'B', 'b', 't', '0' }; 408static uint8_t cafe_bbt_pattern_2048[] = { 'B', 'b', 't', '0' };
410static uint8_t cafe_mirror_pattern_2048[] = { '1', 't', 'b', 'B' }; 409static uint8_t cafe_mirror_pattern_2048[] = { '1', 't', 'b', 'B' };
@@ -579,7 +578,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
579 cafe->nand.options |= NAND_SKIP_BBTSCAN; 578 cafe->nand.options |= NAND_SKIP_BBTSCAN;
580 cafe->nand.block_bad = cafe_nand_block_bad; 579 cafe->nand.block_bad = cafe_nand_block_bad;
581 } 580 }
582 581
583 /* Start off by resetting the NAND controller completely */ 582 /* Start off by resetting the NAND controller completely */
584 cafe_writel(cafe, 1, NAND_RESET); 583 cafe_writel(cafe, 1, NAND_RESET);
585 cafe_writel(cafe, 0, NAND_RESET); 584 cafe_writel(cafe, 0, NAND_RESET);
@@ -600,7 +599,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
600 err = request_irq(pdev->irq, &cafe_nand_interrupt, SA_SHIRQ, "CAFE NAND", mtd); 599 err = request_irq(pdev->irq, &cafe_nand_interrupt, SA_SHIRQ, "CAFE NAND", mtd);
601 if (err) { 600 if (err) {
602 dev_warn(&pdev->dev, "Could not register IRQ %d\n", pdev->irq); 601 dev_warn(&pdev->dev, "Could not register IRQ %d\n", pdev->irq);
603 602
604 goto out_free_dma; 603 goto out_free_dma;
605 } 604 }
606#if 1 605#if 1
@@ -654,7 +653,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
654 writel(0x84600070, cafe->mmio); 653 writel(0x84600070, cafe->mmio);
655 udelay(10); 654 udelay(10);
656 cafe_dev_dbg(&cafe->pdev->dev, "Status %x\n", cafe_readl(cafe, NAND_NONMEM)); 655 cafe_dev_dbg(&cafe->pdev->dev, "Status %x\n", cafe_readl(cafe, NAND_NONMEM));
657#endif 656#endif
658 /* Scan to find existance of the device */ 657 /* Scan to find existance of the device */
659 if (nand_scan_ident(mtd, 1)) { 658 if (nand_scan_ident(mtd, 1)) {
660 err = -ENXIO; 659 err = -ENXIO;