diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-28 21:56:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-28 21:56:37 -0500 |
commit | 0e47c969c65e213421450c31043353ebe3c67e0c (patch) | |
tree | 5057541fd3dc3521cb0946880d6925f1185dc7b7 /drivers/mtd/lpddr/lpddr_cmds.c | |
parent | 268943fb7529a15254a5247372119ba4bd735e94 (diff) | |
parent | 0ff76a920e3558307567b45aa0a91fb914924bfc (diff) |
Merge tag 'for-linus-20140127' of git://git.infradead.org/linux-mtd
Pull MTD updates from Brian Norris:
- Add me (Brian Norris) as an additional MTD maintainer (it'd be nice to get
David's "ack" for this; I'm sure he approves, but he's been pretty silent
lately)
- Add Ezequiel Garcie as maintainer for the pxa3xx NAND driver
- Last (?) round of pxa3xx improvements for supporting Armada 370/XP
- Typical churn in driver boilerplate (OOM messages, printk()'s, devm_*, etc.)
- Quad read mode support for SPI NOR driver (m25p80)
- Update Davinci NAND driver to prepare for use on new platforms
- Begin to kill off NAND_MAX_{PAGE,OOB}SIZE macros; more work is pending
- Miscellaneous NAND device support (new IDs)
- Add READ RETRY support for Micron MLC NAND
- Support new GPMI NAND ECC layout device-tree binding
- Avoid mapping stack/vmalloc() memory for GPMI NAND DMA
* tag 'for-linus-20140127' of git://git.infradead.org/linux-mtd: (151 commits)
mtd: gpmi: add sanity check when mapping DMA for read_buf/write_buf
mtd: gpmi: allocate a proper buffer for non ECC read/write
mtd: m25p80: Set rx_nbits for Quad SPI transfers
mtd: m25p80: Enable Quad SPI read transfers for s25fl512s
mtd: s3c2410: Merge plat/regs-nand.h into s3c2410.c
mtd: mtdram: add missing 'const'
mtd: m25p80: assign default read command
mtd: nuc900_nand: remove redundant return value check of platform_get_resource()
mtd: plat_nand: remove redundant return value check of platform_get_resource()
mtd: nand: add Intel manufacturer ID
mtd: nand: add SanDisk manufacturer ID
mtd: nand: add support for Samsung K9LCG08U0B
mtd: nand: pxa3xx: Add support for 2048 bytes page size devices
mtd: m25p80: Use OPCODE_QUAD_READ_4B for 4-byte addressing
mtd: nand: don't use {read,write}_buf for 8-bit transfers
mtd: nand: use __packed shorthand
mtd: nand: support Micron READ RETRY
mtd: nand: add generic READ RETRY support
mtd: nand: add ONFI vendor block for Micron
mtd: nand: localize ECC failures per page
...
Diffstat (limited to 'drivers/mtd/lpddr/lpddr_cmds.c')
-rw-r--r-- | drivers/mtd/lpddr/lpddr_cmds.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c index 2ef19aa0086b..d38b6460d505 100644 --- a/drivers/mtd/lpddr/lpddr_cmds.c +++ b/drivers/mtd/lpddr/lpddr_cmds.c | |||
@@ -388,7 +388,7 @@ static void put_chip(struct map_info *map, struct flchip *chip) | |||
388 | wake_up(&chip->wq); | 388 | wake_up(&chip->wq); |
389 | } | 389 | } |
390 | 390 | ||
391 | int do_write_buffer(struct map_info *map, struct flchip *chip, | 391 | static int do_write_buffer(struct map_info *map, struct flchip *chip, |
392 | unsigned long adr, const struct kvec **pvec, | 392 | unsigned long adr, const struct kvec **pvec, |
393 | unsigned long *pvec_seek, int len) | 393 | unsigned long *pvec_seek, int len) |
394 | { | 394 | { |
@@ -469,7 +469,7 @@ int do_write_buffer(struct map_info *map, struct flchip *chip, | |||
469 | return ret; | 469 | return ret; |
470 | } | 470 | } |
471 | 471 | ||
472 | int do_erase_oneblock(struct mtd_info *mtd, loff_t adr) | 472 | static int do_erase_oneblock(struct mtd_info *mtd, loff_t adr) |
473 | { | 473 | { |
474 | struct map_info *map = mtd->priv; | 474 | struct map_info *map = mtd->priv; |
475 | struct lpddr_private *lpddr = map->fldrv_priv; | 475 | struct lpddr_private *lpddr = map->fldrv_priv; |
@@ -748,34 +748,6 @@ static int lpddr_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) | |||
748 | return do_xxlock(mtd, ofs, len, DO_XXLOCK_UNLOCK); | 748 | return do_xxlock(mtd, ofs, len, DO_XXLOCK_UNLOCK); |
749 | } | 749 | } |
750 | 750 | ||
751 | int word_program(struct map_info *map, loff_t adr, uint32_t curval) | ||
752 | { | ||
753 | int ret; | ||
754 | struct lpddr_private *lpddr = map->fldrv_priv; | ||
755 | int chipnum = adr >> lpddr->chipshift; | ||
756 | struct flchip *chip = &lpddr->chips[chipnum]; | ||
757 | |||
758 | mutex_lock(&chip->mutex); | ||
759 | ret = get_chip(map, chip, FL_WRITING); | ||
760 | if (ret) { | ||
761 | mutex_unlock(&chip->mutex); | ||
762 | return ret; | ||
763 | } | ||
764 | |||
765 | send_pfow_command(map, LPDDR_WORD_PROGRAM, adr, 0x00, (map_word *)&curval); | ||
766 | |||
767 | ret = wait_for_ready(map, chip, (1<<lpddr->qinfo->SingleWordProgTime)); | ||
768 | if (ret) { | ||
769 | printk(KERN_WARNING"%s word_program error at: %llx; val: %x\n", | ||
770 | map->name, adr, curval); | ||
771 | goto out; | ||
772 | } | ||
773 | |||
774 | out: put_chip(map, chip); | ||
775 | mutex_unlock(&chip->mutex); | ||
776 | return ret; | ||
777 | } | ||
778 | |||
779 | MODULE_LICENSE("GPL"); | 751 | MODULE_LICENSE("GPL"); |
780 | MODULE_AUTHOR("Alexey Korolev <akorolev@infradead.org>"); | 752 | MODULE_AUTHOR("Alexey Korolev <akorolev@infradead.org>"); |
781 | MODULE_DESCRIPTION("MTD driver for LPDDR flash chips"); | 753 | MODULE_DESCRIPTION("MTD driver for LPDDR flash chips"); |