Skip to content

Commit

Permalink
[MTD] NAND: Clean up trailing white spaces
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner authored and Thomas Gleixner committed Nov 7, 2005
1 parent e5580fb commit 61b03bd
Show file tree
Hide file tree
Showing 17 changed files with 695 additions and 695 deletions.
10 changes: 5 additions & 5 deletions drivers/mtd/nand/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# drivers/mtd/nand/Kconfig
# $Id: Kconfig,v 1.34 2005/09/23 01:44:55 ppopov Exp $
# $Id: Kconfig,v 1.35 2005/11/07 11:14:30 gleixner Exp $

menu "NAND Flash Device Drivers"
depends on MTD!=n
Expand Down Expand Up @@ -27,14 +27,14 @@ config MTD_NAND_AUTCPU12
tristate "SmartMediaCard on autronix autcpu12 board"
depends on MTD_NAND && ARCH_AUTCPU12
help
This enables the driver for the autronix autcpu12 board to
This enables the driver for the autronix autcpu12 board to
access the SmartMediaCard.

config MTD_NAND_EDB7312
tristate "Support for Cirrus Logic EBD7312 evaluation board"
depends on MTD_NAND && ARCH_EDB7312
help
This enables the driver for the Cirrus Logic EBD7312 evaluation
This enables the driver for the Cirrus Logic EBD7312 evaluation
board to access the onboard NAND Flash.

config MTD_NAND_H1900
Expand Down Expand Up @@ -71,7 +71,7 @@ config MTD_NAND_RTC_FROM4
select REED_SOLOMON
select REED_SOLOMON_DEC8
help
This enables the driver for the Renesas Technology AG-AND
This enables the driver for the Renesas Technology AG-AND
flash interface board (FROM_BOARD4)

config MTD_NAND_PPCHAMELEONEVB
Expand All @@ -88,7 +88,7 @@ config MTD_NAND_S3C2410
SoCs

No board specfic support is done by this driver, each board
must advertise a platform_device for the driver to attach.
must advertise a platform_device for the driver to attach.

config MTD_NAND_S3C2410_DEBUG
bool "S3C2410 NAND driver debug"
Expand Down
58 changes: 29 additions & 29 deletions drivers/mtd/nand/au1550nd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (C) 2004 Embedded Edge, LLC
*
* $Id: au1550nd.c,v 1.12 2005/09/23 01:44:55 ppopov Exp $
* $Id: au1550nd.c,v 1.13 2005/11/07 11:14:30 gleixner Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
Expand All @@ -25,10 +25,10 @@
#else
#include <asm/au1000.h>
#ifdef CONFIG_MIPS_PB1550
#include <asm/pb1550.h>
#include <asm/pb1550.h>
#endif
#ifdef CONFIG_MIPS_DB1550
#include <asm/db1x00.h>
#include <asm/db1x00.h>
#endif
#endif

Expand All @@ -43,12 +43,12 @@ static int nand_width = 1; /* default x8*/
* Define partitions for flash device
*/
const static struct mtd_partition partition_info[] = {
{
{
.name = "NAND FS 0",
.offset = 0,
.size = 8*1024*1024
.size = 8*1024*1024
},
{
{
.name = "NAND FS 1",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL
Expand Down Expand Up @@ -89,7 +89,7 @@ static void au_write_byte(struct mtd_info *mtd, u_char byte)
* au_read_byte16 - read one byte endianess aware from the chip
* @mtd: MTD device structure
*
* read function for 16bit buswith with
* read function for 16bit buswith with
* endianess conversion
*/
static u_char au_read_byte16(struct mtd_info *mtd)
Expand Down Expand Up @@ -119,7 +119,7 @@ static void au_write_byte16(struct mtd_info *mtd, u_char byte)
* au_read_word - read one word from the chip
* @mtd: MTD device structure
*
* read function for 16bit buswith without
* read function for 16bit buswith without
* endianess conversion
*/
static u16 au_read_word(struct mtd_info *mtd)
Expand All @@ -135,7 +135,7 @@ static u16 au_read_word(struct mtd_info *mtd)
* @mtd: MTD device structure
* @word: data word to write
*
* write function for 16bit buswith without
* write function for 16bit buswith without
* endianess conversion
*/
static void au_write_word(struct mtd_info *mtd, u16 word)
Expand Down Expand Up @@ -165,7 +165,7 @@ static void au_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
}

/**
* au_read_buf - read chip data into buffer
* au_read_buf - read chip data into buffer
* @mtd: MTD device structure
* @buf: buffer to store date
* @len: number of bytes to read
Expand All @@ -179,12 +179,12 @@ static void au_read_buf(struct mtd_info *mtd, u_char *buf, int len)

for (i=0; i<len; i++) {
buf[i] = readb(this->IO_ADDR_R);
au_sync();
au_sync();
}
}

/**
* au_verify_buf - Verify chip data against buffer
* au_verify_buf - Verify chip data against buffer
* @mtd: MTD device structure
* @buf: buffer containing the data to compare
* @len: number of bytes to compare
Expand Down Expand Up @@ -219,16 +219,16 @@ static void au_write_buf16(struct mtd_info *mtd, const u_char *buf, int len)
struct nand_chip *this = mtd->priv;
u16 *p = (u16 *) buf;
len >>= 1;

for (i=0; i<len; i++) {
writew(p[i], this->IO_ADDR_W);
au_sync();
}

}

/**
* au_read_buf16 - read chip data into buffer
* au_read_buf16 - read chip data into buffer
* @mtd: MTD device structure
* @buf: buffer to store date
* @len: number of bytes to read
Expand All @@ -249,7 +249,7 @@ static void au_read_buf16(struct mtd_info *mtd, u_char *buf, int len)
}

/**
* au_verify_buf16 - Verify chip data against buffer
* au_verify_buf16 - Verify chip data against buffer
* @mtd: MTD device structure
* @buf: buffer containing the data to compare
* @len: number of bytes to compare
Expand Down Expand Up @@ -282,26 +282,26 @@ static void au1550_hwcontrol(struct mtd_info *mtd, int cmd)
case NAND_CTL_CLRCLE: this->IO_ADDR_W = p_nand + MEM_STNAND_DATA; break;

case NAND_CTL_SETALE: this->IO_ADDR_W = p_nand + MEM_STNAND_ADDR; break;
case NAND_CTL_CLRALE:
this->IO_ADDR_W = p_nand + MEM_STNAND_DATA;
/* FIXME: Nobody knows why this is neccecary,
case NAND_CTL_CLRALE:
this->IO_ADDR_W = p_nand + MEM_STNAND_DATA;
/* FIXME: Nobody knows why this is neccecary,
* but it works only that way */
udelay(1);
udelay(1);
break;

case NAND_CTL_SETNCE:
case NAND_CTL_SETNCE:
/* assert (force assert) chip enable */
au_writel((1<<(4+NAND_CS)) , MEM_STNDCTL); break;
break;

case NAND_CTL_CLRNCE:
case NAND_CTL_CLRNCE:
/* deassert chip enable */
au_writel(0, MEM_STNDCTL); break;
break;
}

this->IO_ADDR_R = this->IO_ADDR_W;

/* Drain the writebuffer */
au_sync();
}
Expand All @@ -325,7 +325,7 @@ int __init au1xxx_nand_init (void)
u32 nand_phys;

/* Allocate memory for MTD device structure and private data */
au1550_mtd = kmalloc (sizeof(struct mtd_info) +
au1550_mtd = kmalloc (sizeof(struct mtd_info) +
sizeof (struct nand_chip), GFP_KERNEL);
if (!au1550_mtd) {
printk ("Unable to allocate NAND MTD dev structure.\n");
Expand All @@ -345,15 +345,15 @@ int __init au1xxx_nand_init (void)

/* disable interrupts */
au_writel(au_readl(MEM_STNDCTL) & ~(1<<8), MEM_STNDCTL);

/* disable NAND boot */
au_writel(au_readl(MEM_STNDCTL) & ~(1<<0), MEM_STNDCTL);

#ifdef CONFIG_MIPS_PB1550
/* set gpio206 high */
au_writel(au_readl(GPIO2_DIR) & ~(1<<6), GPIO2_DIR);

boot_swapboot = (au_readl(MEM_STSTAT) & (0x7<<1)) |
boot_swapboot = (au_readl(MEM_STSTAT) & (0x7<<1)) |
((bcsr->status >> 6) & 0x1);
switch (boot_swapboot) {
case 0:
Expand Down Expand Up @@ -402,7 +402,7 @@ int __init au1xxx_nand_init (void)
au_writel(NAND_STADDR, MEM_STADDR3);
}
#endif

/* Locate NAND chip-select in order to determine NAND phys address */
mem_staddr = 0x00000000;
if (((au_readl(MEM_STCFG0) & 0x7) == 0x5) && (NAND_CS == 0))
Expand Down Expand Up @@ -438,7 +438,7 @@ int __init au1xxx_nand_init (void)
this->hwcontrol = au1550_hwcontrol;
this->dev_ready = au1550_device_ready;
/* 30 us command delay time */
this->chip_delay = 30;
this->chip_delay = 30;
this->eccmode = NAND_ECC_SOFT;

this->options = NAND_NO_AUTOINCR;
Expand Down Expand Up @@ -467,7 +467,7 @@ int __init au1xxx_nand_init (void)

outio:
iounmap ((void *)p_nand);

outmem:
kfree (au1550_mtd);
return retval;
Expand Down
22 changes: 11 additions & 11 deletions drivers/mtd/nand/autcpu12.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
*
* Derived from drivers/mtd/spia.c
* Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com)
*
* $Id: autcpu12.c,v 1.22 2004/11/04 12:53:10 gleixner Exp $
*
* $Id: autcpu12.c,v 1.23 2005/11/07 11:14:30 gleixner Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Overview:
* This is a device driver for the NAND flash device found on the
* autronix autcpu12 board, which is a SmartMediaCard. It supports
* autronix autcpu12 board, which is a SmartMediaCard. It supports
* 16MiB, 32MiB and 64MiB cards.
*
*
Expand Down Expand Up @@ -93,7 +93,7 @@ static struct mtd_partition partition_info128k[] = {
#define NUM_PARTITIONS32K 2
#define NUM_PARTITIONS64K 2
#define NUM_PARTITIONS128K 2
/*
/*
* hardware specific access to control-lines
*/
static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd)
Expand Down Expand Up @@ -163,29 +163,29 @@ int __init autcpu12_init (void)
this->hwcontrol = autcpu12_hwcontrol;
this->dev_ready = autcpu12_device_ready;
/* 20 us command delay time */
this->chip_delay = 20;
this->chip_delay = 20;
this->eccmode = NAND_ECC_SOFT;

/* Enable the following for a flash based bad block table */
/*
this->options = NAND_USE_FLASH_BBT;
*/
this->options = NAND_USE_FLASH_BBT;

/* Scan to find existance of the device */
if (nand_scan (autcpu12_mtd, 1)) {
err = -ENXIO;
goto out_ior;
}

/* Register the partitions */
switch(autcpu12_mtd->size){
case SZ_16M: add_mtd_partitions(autcpu12_mtd, partition_info16k, NUM_PARTITIONS16K); break;
case SZ_32M: add_mtd_partitions(autcpu12_mtd, partition_info32k, NUM_PARTITIONS32K); break;
case SZ_64M: add_mtd_partitions(autcpu12_mtd, partition_info64k, NUM_PARTITIONS64K); break;
case SZ_128M: add_mtd_partitions(autcpu12_mtd, partition_info128k, NUM_PARTITIONS128K); break;
case SZ_64M: add_mtd_partitions(autcpu12_mtd, partition_info64k, NUM_PARTITIONS64K); break;
case SZ_128M: add_mtd_partitions(autcpu12_mtd, partition_info128k, NUM_PARTITIONS128K); break;
default: {
printk ("Unsupported SmartMedia device\n");
printk ("Unsupported SmartMedia device\n");
err = -ENXIO;
goto out_ior;
}
Expand Down Expand Up @@ -213,7 +213,7 @@ static void __exit autcpu12_cleanup (void)

/* unmap physical adress */
iounmap((void *)autcpu12_fio_base);

/* Free the MTD device structure */
kfree (autcpu12_mtd);
}
Expand Down
Loading

0 comments on commit 61b03bd

Please sign in to comment.