summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/denali.c
Commit message (Collapse)AuthorAgeFilesLines
* mtd: convert remaining users to mtd_device_register()Jamie Iles2011-05-251-2/+2
| | | | | | | | | | The older add_mtd_device()/add_mtd_partitions() and their removal counterparts will soon be gone. Replace uses with mtd_device_register() and mtd_device_unregister(). Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: denali: detect the number of banksJamie Iles2011-05-251-8/+20
| | | | | | | | | | Not all configurations of the Denali controller support 4 banks. The controller can support between 1 and 16 banks. Detect this from the design features register. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: denali: remove nearly-duplicated register definitionsJamie Iles2011-05-251-81/+53
| | | | | | | | | | | The controller has interrupt enable/status register pairs for each bank (along with ECC and status registers) that differ only in address offset. Rather than providing definitions for each register, make the address a macro so that it scales for devices with different numbers of banks. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: denali: convert to generic DMA APIJamie Iles2011-05-251-43/+39
| | | | | | | | | | Rather than using the PCI specific DMA API, convert to the generic DMA API so that we can use the Denali NAND controller on other bus types. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: denali: drop __TIME__ usageMichal Marek2011-05-251-2/+1
| | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Fix common misspellingsLucas De Marchi2011-03-311-3/+3
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* mtd: nand: denali should also handle NAND_CMD_PARAMFlorian Fainelli2010-10-241-0/+1
| | | | | Signed-off-by: Florian Fainelli <ffainelli@freebox.fr> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* nand/denali: move all hardware initialization work to denali_hw_initChuanxiao Dong2010-08-121-5/+6
| | | | | | | | | | All hardware initialization will be done in denali_hw_init before irq handler registered Change mtd name from "DENALI NAND" to be "denali-nand" since whitespace in name can cause problems if we use cmdlinepart Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* nand/denali: Add a page check in denali_read_page & denali_read_page_rawChuanxiao Dong2010-08-121-0/+14
| | | | | Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* nand/denali: use cpu_relax() while waiting for hardware interruptChuanxiao Dong2010-08-121-2/+2
| | | | | Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* nand/denali: change read_status function methodChuanxiao Dong2010-08-121-7/+5
| | | | | | | | | | | | | | | | In mtd->write, Denali controller will use MODE_11 mode to read NAND flash status, then return back to MODE_1O mode to do page write. Here comes a bug for this kind of using, sometimes controller will not write data to NAND and just return a good interrupt to tell driver writing work is done. The data in this page is all 0xff and this page can not be written again. The reason is unknow. So read Denali controller register WRITE_PROTECT to get NAND status instead. Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* nand/denali: Fixed check patch warningsChuanxiao Dong2010-08-121-12/+13
| | | | | | | waring: no space for starting a line Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* nand/denali: use dev_xx debug function to replace nand_dbg_print and some printkChuanxiao Dong2010-08-111-166/+42
| | | | | Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* nand/denali: Fixed handle ECC error bugsChuanxiao Dong2010-08-111-16/+29
| | | | | | | | | Once the last ECC error was handled, controller will triger an interrupt. If this interrupt can not be clean on time, controller may corrupt. Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* nand/denali: use iowrite32() to replace denali_write32()Chuanxiao Dong2010-08-111-76/+62
| | | | | | | | denali_write32() just implements a debug function for iowrite32(), only print out the write value. Remove this function since it's useless Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* nand/denali: Fixed probe function bugsChuanxiao Dong2010-08-111-21/+23
| | | | | | | | Fixed a pci_resource_len function error; Changed returning sequence of probe function; Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Merge git://git.infradead.org/mtd-2.6Linus Torvalds2010-08-101-765/+475
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/mtd-2.6: (79 commits) mtd: Remove obsolete <mtd/compatmac.h> include mtd: Update copyright notices jffs2: Update copyright notices mtd-physmap: add support users can assign the probe type in board files mtd: remove redwood map driver mxc_nand: Add v3 (i.MX51) Support mxc_nand: support 8bit ecc mxc_nand: fix correct_data function mxc_nand: add V1_V2 namespace to registers mxc_nand: factor out a check_int function mxc_nand: make some internally used functions overwriteable mxc_nand: rework get_dev_status mxc_nand: remove 0xe00 offset from registers mtd: denali: Add multi connected NAND support mtd: denali: Remove set_ecc_config function mtd: denali: Remove unuseful code in get_xx_nand_para functions mtd: denali: Remove device_info_tag structure mtd: m25p80: add support for the Winbond W25Q32 SPI flash chip mtd: m25p80: add support for the Intel/Numonyx {16,32,64}0S33B SPI flash chips mtd: m25p80: add support for the EON EN25P{32, 64} SPI flash chips ... Fix up trivial conflicts in drivers/mtd/maps/{Kconfig,redwood.c} due to redwood driver removal.
| * mtd: denali: Add multi connected NAND supportChuanxiao Dong2010-08-061-1/+21
| | | | | | | | | | Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: denali: Remove set_ecc_config functionChuanxiao Dong2010-08-061-40/+47
| | | | | | | | | | | | | | | | | | | | set_ecc_config function only set ECC_CORRECTION register, so move register setting to probe function. Since controller only support 15bit and 8bit ecc correction, updated nand ecc layout information. Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: denali: Remove unuseful code in get_xx_nand_para functionsChuanxiao Dong2010-08-061-74/+7
| | | | | | | | | | Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: denali: Remove device_info_tag structureChuanxiao.Dong2010-08-061-266/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi David, I sent 4 patches using my intel email account. If there is any problem about the format of these patches, I will resend them after I arrived at home by using my gmail account, and I will keep on using gmail account to send patches. Thanks. >From 242e3bf5e17f54b1df8cf285154a7c7a61ff62e9 Mon Sep 17 00:00:00 2001 From: Chuanxiao Dong <chuanxiao.dong@intel.com> Date: Fri, 6 Aug 2010 15:29:41 +0800 Subject: [PATCH 1/4] mtd: denali: Remove device_info_tag structure. Most of the variables in this structure are useless, so just remove this structure and relevant codes. Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: Missing slab.h includeDavid Miller2010-08-061-0/+1
| | | | | | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: denali: update get nand para functionsChuanxiao Dong2010-08-051-72/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In denali driver, wTotalBlocks variable is useless, so just remove them in get_toshiba_nand_para and get_hynix_nand_para first. Other wTotalBlocks in denali.c and other variables in dev_info struct are also useless, will remove them later. Also add a parameter in get_hynix_nand_para to prepare to remove dev_info struct. This parameter comes by reading NAND ID directly. Reading register will report wrong value for some NAND chips, e.g. some Micron MT29F32G08QAA chips. So update NAND_CMD_READID method as well. Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: denali: rename functions which is named by using capitalsChuanxiao Dong2010-08-051-11/+11
| | | | | | | | | | | | | | | | rename these functions' name and remove additional declarations in header file Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: denali.c: fix reserved all check-patch errorsChuanxiao Dong2010-08-051-49/+53
| | | | | | | | | | Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: denali.c: fix all "line over 80 characters" warningsChuanxiao Dong2010-08-051-108/+192
| | | | | | | | | | Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: denali.c: add and update KERN_ facility level in printk()Chuanxiao Dong2010-08-051-16/+16
| | | | | | | | | | Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: denali.c: fixed all open brace { check-patch errorsChuanxiao Dong2010-08-051-116/+48
| | | | | | | | | | Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * nand/denali Clean up all white spaces in code indentChuanxiao2010-08-051-169/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi, I have changed the outlook mail cliet to be linux mutt client and use my personal gmail to submit patches. Here are 5 new patches to fix nand/denali check patch errors. The other 4 patches will be sent out after this mail. Thanks for your review. >From d125ad3f57bbf517131dccad6b5933edf8c2632a Mon Sep 17 00:00:00 2001 From: Chuanxiao Dong <chuanxiao.dong@intel.com> Date: Tue, 3 Aug 2010 15:54:48 +0800 Subject: [PATCH 1/5] mtd: denali.c: clean up all whitespaces in code indent Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | fix typos concerning "initiali[zs]e"Uwe Kleine-König2010-06-161-1/+1
|/ | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* mtd/nand: Fix denali build on ppc64David Woodhouse2010-05-131-11/+11
| | | | | | | drivers/mtd/nand/denali.c:1427: error: conflicting types for ‘enable_dma’ arch/powerpc/include/asm/dma.h:189: note: previous definition of ‘enable_dma’ was here Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd/nand: Add Intel Moorestown/Denali NAND supportJason Roberts2010-05-131-0/+2134
There is more work to be done on this but it is basically working now. Signed-off-by: Jason Roberts <jason.e.roberts@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
OpenPOWER on IntegriCloud