12 Nov, 2013
1 commit
-
Pull devicetree updates from Rob Herring:
"DeviceTree updates for 3.13. This is a bit larger pull request than
usual for this cycle with lots of clean-up.- Cross arch clean-up and consolidation of early DT scanning code.
- Clean-up and removal of arch prom.h headers. Makes arch specific
prom.h optional on all but Sparc.
- Addition of interrupts-extended property for devices connected to
multiple interrupt controllers.
- Refactoring of DT interrupt parsing code in preparation for
deferred probe of interrupts.
- ARM cpu and cpu topology bindings documentation.
- Various DT vendor binding documentation updates"* tag 'devicetree-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (82 commits)
powerpc: add missing explicit OF includes for ppc
dt/irq: add empty of_irq_count for !OF_IRQ
dt: disable self-tests for !OF_IRQ
of: irq: Fix interrupt-map entry matching
MIPS: Netlogic: replace early_init_devtree() call
of: Add Panasonic Corporation vendor prefix
of: Add Chunghwa Picture Tubes Ltd. vendor prefix
of: Add AU Optronics Corporation vendor prefix
of/irq: Fix potential buffer overflow
of/irq: Fix bug in interrupt parsing refactor.
of: set dma_mask to point to coherent_dma_mask
of: add vendor prefix for PHYTEC Messtechnik GmbH
DT: sort vendor-prefixes.txt
of: Add vendor prefix for Cadence
of: Add empty for_each_available_child_of_node() macro definition
arm/versatile: Fix versatile irq specifications.
of/irq: create interrupts-extended property
microblaze/pci: Drop PowerPC-ism from irq parsing
of/irq: Create of_irq_parse_and_map_pci() to consolidate arch code.
of/irq: Use irq_of_parse_and_map()
...
11 Nov, 2013
1 commit
-
Commit b5b4bb3f6a11f9 (of: only include prom.h on sparc) removed implicit
includes of of_*.h headers by powerpc's prom.h. Some components were
missed in initial clean-up patch, so add the necessary includes to fix
powerpc builds.Signed-off-by: Rob Herring
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Tejun Heo
Cc: Matt Mackall
Cc: Herbert Xu
Cc: "David S. Miller"
Cc: Vinod Koul
Cc: Dan Williams
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-ide@vger.kernel.org
Cc: linux-crypto@vger.kernel.org
08 Nov, 2013
1 commit
07 Nov, 2013
1 commit
-
Pull driver core / sysfs patches from Greg KH:
"Here's the big driver core / sysfs update for 3.13-rc1.There's lots of dev_groups updates for different subsystems, as they
all get slowly migrated over to the safe versions of the attribute
groups (removing userspace races with the creation of the sysfs
files.) Also in here are some kobject updates, devres expansions, and
the first round of Tejun's sysfs reworking to enable it to be used by
other subsystems as a backend for an in-kernel filesystem.All of these have been in linux-next for a while with no reported
issues"* tag 'driver-core-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (83 commits)
sysfs: rename sysfs_assoc_lock and explain what it's about
sysfs: use generic_file_llseek() for sysfs_file_operations
sysfs: return correct error code on unimplemented mmap()
mdio_bus: convert bus code to use dev_groups
device: Make dev_WARN/dev_WARN_ONCE print device as well as driver name
sysfs: separate out dup filename warning into a separate function
sysfs: move sysfs_hash_and_remove() to fs/sysfs/dir.c
sysfs: remove unused sysfs_get_dentry() prototype
sysfs: honor bin_attr.attr.ignore_lockdep
sysfs: merge sysfs_elem_bin_attr into sysfs_elem_attr
devres: restore zeroing behavior of devres_alloc()
sysfs: fix sysfs_write_file for bin file
input: gameport: convert bus code to use dev_groups
input: serio: remove bus usage of dev_attrs
input: serio: use DEVICE_ATTR_RO()
i2o: convert bus code to use dev_groups
memstick: convert bus code to use dev_groups
tifm: convert bus code to use dev_groups
virtio: convert bus code to use dev_groups
ipack: convert bus code to use dev_groups
...
26 Oct, 2013
1 commit
-
The "legacy" ECC layout used until 3.12-rc1 uses all the OOB area by
computing the ECC strength and ECC step size ourselves.Commit 2febcdf84b ("mtd: gpmi: set the BCHs geometry with the ecc info")
makes the driver use the ECC info (ECC strength and ECC step size)
provided by the MTD code, and creates a different NAND ECC layout
for the BCH, and use the new ECC layout. This causes a regression:We can not mount the ubifs which was created by the old NAND ECC layout.
This patch fixes this issue by reverting to the legacy ECC layout.
We will probably introduce a new device-tree property to indicate that
the new ECC layout can be used. For now though, for the imminent 3.12
release, we just unconditionally revert to the 3.11 behaviour.This leaves a harmless cosmetic warning about an unused function. At
this point in the cycle I really don't care.Signed-off-by: David Woodhouse
Signed-off-by: Brian Norris
Acked-by: Huang Shijie
Acked-by: Marek Vasut
Tested-by: Marek Vasut
25 Oct, 2013
1 commit
-
In a recent commit:
commit f455578dd961087a5cf94730d9f6489bb1d355f0
Author: Ezequiel Garcia
Date: Mon Aug 12 14:14:53 2013 -0300mtd: nand: pxa3xx: Remove hardcoded mtd name
There's no advantage in using a hardcoded name for the mtd device.
Instead use the provided by the platform_device.The MTD name was changed to use the one provided by the platform_device.
However, this can be problematic as some users want to set partitions
using the kernel parameter 'mtdparts', where the name is needed.Therefore, to avoid regressions in users relying in 'mtdparts' we revert
the change and use the previous one 'pxa3xx_nand-0'.While at it, let's put a big comment and prevent this change from happening
ever again.Signed-off-by: Ezequiel Garcia
Signed-off-by: Brian Norris
20 Oct, 2013
1 commit
-
We want these fixes here too.
Signed-off-by: Greg Kroah-Hartman
10 Oct, 2013
1 commit
-
Powerpc is a mess of implicit includes by prom.h. Add the necessary
explicit includes to drivers in preparation of prom.h cleanup.Signed-off-by: Rob Herring
Acked-by: Grant Likely
27 Sep, 2013
3 commits
-
According to the datasheet for Micron n25q256a (N25Q256A13ESF40F) 4-byte
addressing mode should be entered as follows:To enter or exit the 4-byte address mode, the WRITE ENABLE command
must be executed to set the write enable latch bit to 1. (Note: The
WRITE ENABLE command must NOT be executed on the N25Q256A83ESF40x and
N25Q256A83E1240x devices.) S# must be driven LOW. The effect of the
command is immediate; after the command has been executed, the write
enable latch bit is cleared to 0.Micron's portable way to perform this for all types of Micron flash
is to first issue a write enable, then switch the addressing mode
followed by a write disable to avoid leaving the flash in a write-
able state.Signed-off-by: Elie De Brauwer
[Brian: reworked a bit]
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
This fixes a memory leak in the ONFI support code for detecting the
required ECC levels from this commit:commit 6dcbe0cdd83fb5f77be4f44c9e06c535281c375a
Author: Huang Shijie
Date: Wed May 22 10:28:27 2013 +0800mtd: get the ECC info from the Extended Parameter Page
In the success case, we never freed the 'ep' buffer.
Also, this fixes an oversight in the same commit where we (harmlessly)
freed the NULL pointer.Signed-off-by: Brian Norris
Acked-by: Huang Shijie
Signed-off-by: David Woodhouse -
Move probe out of __init section and don't use platform_driver_probe
which cannot be used with deferred probing.Since commit e9354576 ("gpiolib: Defer failed gpio requests by default")
this driver might return -EPROBE_DEFER if a gpio_request fails.Cc: David Woodhouse
Cc: Josh Wu
Signed-off-by: Johan Hovold
Signed-off-by: Greg Kroah-Hartman
18 Sep, 2013
1 commit
-
There's no need to enclose this code within idef CONFIG_OF,
because the OF framework provides no-op stubs if CONFIG_OF=n.Cc: devicetree@vger.kernel.org
Signed-off-by: Ezequiel Garcia
Signed-off-by: Brian Norris
Signed-off-by: Olof Johansson
17 Sep, 2013
1 commit
-
Pull UBI fixes from Artem Bityutskiy:
"Just a single fastmap fix plus a regression fix"* tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubi:
UBI: Fix invalidate_fastmap()
UBI: Fix PEB leak in wear_leveling_worker()
10 Sep, 2013
1 commit
-
Pull mtd updates from David Woodhouse:
- factor out common code from MTD tests
- nand-gpio cleanup and portability to non-ARM
- m25p80 support for 4-byte addressing chips, other new chips
- pxa3xx cleanup and support for new platforms
- remove obsolete alauda, octagon-5066 drivers
- erase/write support for bcm47xxsflash
- improve detection of ECC requirements for NAND, controller setup
- NFC acceleration support for atmel-nand, read/write via SRAM
- etc* tag 'for-linus-20130909' of git://git.infradead.org/linux-mtd: (184 commits)
mtd: chips: Add support for PMC SPI Flash chips in m25p80.c
mtd: ofpart: use for_each_child_of_node() macro
mtd: mtdswap: replace strict_strtoul() with kstrtoul()
mtd cs553x_nand: use kzalloc() instead of memset
mtd: atmel_nand: fix error return code in atmel_nand_probe()
mtd: bcm47xxsflash: writing support
mtd: bcm47xxsflash: implement erasing support
mtd: bcm47xxsflash: convert to module_platform_driver instead of init/exit
mtd: bcm47xxsflash: convert kzalloc to avoid invalid access
mtd: remove alauda driver
mtd: nand: mxc_nand: mark 'const' properly
mtd: maps: cfi_flagadm: add missing __iomem annotation
mtd: spear_smi: add missing __iomem annotation
mtd: r852: Staticize local symbols
mtd: nandsim: Staticize local symbols
mtd: impa7: add missing __iomem annotation
mtd: sm_ftl: Staticize local symbols
mtd: m25p80: add support for mr25h10
mtd: m25p80: make CONFIG_M25PXX_USE_FAST_READ safe to enable
mtd: m25p80: Pass flags through CAT25_INFO macro
...
31 Aug, 2013
26 commits
-
Add support for PMC (now Chingis, part of ISSI) Pm25LV512 (512 Kib),
Pm25LV010 (1 Mib) and Pm25LQ032 (32 Mib) SPI Flash chips.This patch addresses two generations of PMC SPI Flash chips:
- Pm25LV512 and Pm25LV010: these have 4KiB sectors and 32KiB
blocks. The 4KiB sector erase uses a non-standard opcode
(0xd7). They do not support JEDEC RDID (0x9f), and so they can only
be detected by matching their name string with pre-configured
platform data. Because of the cascaded acquisitions, the datasheet
is no longer available on the current manufacturer's website,
although it is still commonly used in some recent wireless routers
(). The
only public datasheet available seems to be on GeoCities:
- Pm25LQ032: a newer generation flash, with 4KiB sectors and 64KiB
blocks. It uses the standard erase and JEDEC read-ID
opcodes. Manufacturer's datasheet is here:
This patch is resent in order to take into account both Brian Norris
remarks and this upstream patch:commit e534ee4f9ca29fdb38eea4b0c53f2154fbd8c1ee
Author: Krzysztof Mazur
Date: Fri Feb 22 15:51:05 2013 +0100mtd: m25p80: introduce SST_WRITE flag for SST byte programming
Not all SST devices implement the SST byte programming command.
Some devices (like SST25VF064C) implement only standard m25p80 page
write command.Now SPI flash devices that need sst_write() are explicitly marked
with new SST_WRITE flag and the decision to use sst_write() is based
on this flag instead of manufacturer id.Signed-off-by: Gabor Juhos
Signed-off-by: Michel Stempin
[Brian: fixed conflict]
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
Use for_each_child_of_node() macro instead of open coding it.
Signed-off-by: Wei Yongjun
Acked-by: Huang Shijie
Signed-off-by: David Woodhouse -
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.Signed-off-by: Jingoo Han
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
It's cleaner to use kzalloc() instead of zeroing out in a separate call
to memset().Signed-off-by: Dan Carpenter
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.Signed-off-by: Wei Yongjun
Acked-by: Josh Wu
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
Tested with BCM4706.
Signed-off-by: Rafał Miłecki
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
Signed-off-by: Rafał Miłecki
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
convert to module_platform_driver instead of init/exit
Suggested-by: Andy Shevchenko
Signed-off-by: Libo chen
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
mtd is just member of bcm47xxsflash, so we should free bcm47xxsflash not
its member. So I use devm_kazlloc instead of kazlloc to avoid it.* Changelog:
convert to devm_kzallocSigned-off-by: Libo chen
Suggested-by: Andy Shevchenko
Reviewed-by: Andy Shevchenko
[Brian: fixed conflicts]
Signed-off-by: Brian NorrisSigned-off-by: David Woodhouse
-
The driver has very low utility. Devices in question are limited to
about 400kB/s and the only known user (me) discarded the hardware
several years back.Signed-off-by: Joern Engel
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
The values pointed by the pointer are used as read-only.
Also, mtd_device_parse_register() uses 'part_probes[]' as
the second argument which is defined as 'const char * const *types'.
Thus, the 'const' should be moved to be after the '*'.drivers/mtd/nand/mxc_nand.c:269:25: warning: duplicate const
Signed-off-by: Jingoo Han
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
Added missing __iomem annotation and staticized local symbols
in order to fix the following sparse warnings:drivers/mtd/maps/cfi_flagadm.c:58:17: warning: symbol 'flagadm_map' was not declared. Should it be static?
drivers/mtd/maps/cfi_flagadm.c:64:22: warning: symbol 'flagadm_parts' was not declared. Should it be static?
drivers/mtd/maps/cfi_flagadm.c:115:18: warning: cast removes address space of expression
drivers/mtd/maps/cfi_flagadm.c:115:18: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/maps/cfi_flagadm.c:115:18: expected void volatile [noderef] *addr
drivers/mtd/maps/cfi_flagadm.c:115:18: got void *
drivers/mtd/maps/cfi_flagadm.c:126:26: warning: cast removes address space of expression
drivers/mtd/maps/cfi_flagadm.c:126:26: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/maps/cfi_flagadm.c:126:26: expected void volatile [noderef] *addr
drivers/mtd/maps/cfi_flagadm.c:126:26: got void *
drivers/mtd/maps/cfi_flagadm.c:127:36: warning: Using plain integer as NULL pointerSigned-off-by: Jingoo Han
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
Added missing __iomem annotation in order to fix the following
sparse warnings:drivers/mtd/devices/spear_smi.c:566:13: warning: incorrect type in assignment (different address spaces)
drivers/mtd/devices/spear_smi.c:566:13: expected void *src
drivers/mtd/devices/spear_smi.c:566:13: got void [noderef] *
drivers/mtd/devices/spear_smi.c:586:9: warning: incorrect type in argument 2 (different address spaces)
drivers/mtd/devices/spear_smi.c:586:9: expected void const volatile [noderef] *
drivers/mtd/devices/spear_smi.c:586:9: got unsigned char [usertype] *
drivers/mtd/devices/spear_smi.c:659:14: warning: incorrect type in assignment (different address spaces)
drivers/mtd/devices/spear_smi.c:659:14: expected void *dest
drivers/mtd/devices/spear_smi.c:659:14: got void [noderef] *
drivers/mtd/devices/spear_smi.c:620:9: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/devices/spear_smi.c:620:9: expected void volatile [noderef] *
drivers/mtd/devices/spear_smi.c:620:9: got void *dest
drivers/mtd/devices/spear_smi.c:620:9: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/devices/spear_smi.c:620:9: expected void volatile [noderef] *
drivers/mtd/devices/spear_smi.c:620:9: got void *dest
drivers/mtd/devices/spear_smi.c:620:9: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/devices/spear_smi.c:620:9: expected void volatile [noderef] *
drivers/mtd/devices/spear_smi.c:620:9: got void *destSigned-off-by: Jingoo Han
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
These local symbols are used only in this file.
Fix the following sparse warnings:drivers/mtd/nand/r852.c:232:6: warning: symbol 'r852_write_buf' was not declared. Should it be static?
drivers/mtd/nand/r852.c:264:6: warning: symbol 'r852_read_buf' was not declared. Should it be static?
drivers/mtd/nand/r852.c:315:6: warning: symbol 'r852_cmdctl' was not declared. Should it be static?
drivers/mtd/nand/r852.c:360:5: warning: symbol 'r852_wait' was not declared. Should it be static?
drivers/mtd/nand/r852.c:389:5: warning: symbol 'r852_ready' was not declared. Should it be static?
drivers/mtd/nand/r852.c:400:6: warning: symbol 'r852_ecc_hwctl' was not declared. Should it be static?
drivers/mtd/nand/r852.c:432:5: warning: symbol 'r852_ecc_calculate' was not declared. Should it be static?
drivers/mtd/nand/r852.c:464:5: warning: symbol 'r852_ecc_correct' was not declared. Should it be static?
drivers/mtd/nand/r852.c:532:6: warning: symbol 'r852_engine_enable' was not declared. Should it be static?
drivers/mtd/nand/r852.c:550:6: warning: symbol 'r852_engine_disable' was not declared. Should it be static?
drivers/mtd/nand/r852.c:560:6: warning: symbol 'r852_card_update_present' was not declared. Should it be static?
drivers/mtd/nand/r852.c:575:6: warning: symbol 'r852_update_card_detect' was not declared. Should it be static?
drivers/mtd/nand/r852.c:589:9: warning: symbol 'r852_media_type_show' was not declared. Should it be static?
drivers/mtd/nand/r852.c:600:1: warning: symbol 'dev_attr_media_type' was not declared. Should it be static?
drivers/mtd/nand/r852.c:604:6: warning: symbol 'r852_update_media_status' was not declared. Should it be static?
drivers/mtd/nand/r852.c:633:5: warning: symbol 'r852_register_nand_device' was not declared. Should it be static?
drivers/mtd/nand/r852.c:671:6: warning: symbol 'r852_unregister_nand_device' was not declared. Should it be static?
drivers/mtd/nand/r852.c:685:6: warning: symbol 'r852_card_detect_work' was not declared. Should it be static?
drivers/mtd/nand/r852.c:824:6: warning: symbol 'r852_probe' was not declared. Should it be static?
drivers/mtd/nand/r852.c:964:6: warning: symbol 'r852_remove' was not declared. Should it be static?
drivers/mtd/nand/r852.c:995:6: warning: symbol 'r852_shutdown' was not declared. Should it be static?Signed-off-by: Jingoo Han
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
These local symbols are used only in this file.
Fix the following sparse warnings:drivers/mtd/nand/nandsim.c:1436:5: warning: symbol 'do_read_error' was not declared. Should it be static?
drivers/mtd/nand/nandsim.c:1448:6: warning: symbol 'do_bit_flips' was not declared. Should it be static?Signed-off-by: Jingoo Han
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
Added missing __iomem annotation and used NULL instead of 0
in order to fix the following sparse warnings:drivers/mtd/maps/impa7.c:82:32: warning: Using plain integer as NULL pointer
drivers/mtd/maps/impa7.c:96:34: warning: cast removes address space of expression
drivers/mtd/maps/impa7.c:96:34: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/maps/impa7.c:96:34: expected void volatile [noderef] *addr
drivers/mtd/maps/impa7.c:96:34: got void *
drivers/mtd/maps/impa7.c:108:34: warning: cast removes address space of expression
drivers/mtd/maps/impa7.c:108:34: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/maps/impa7.c:108:34: expected void volatile [noderef] *addr
drivers/mtd/maps/impa7.c:108:34: got void *
drivers/mtd/maps/impa7.c:109:45: warning: Using plain integer as NULL pointerSigned-off-by: Jingoo Han
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
These local symbols are used only in this file.
Fix the following sparse warnings:drivers/mtd/sm_ftl.c:25:25: warning: symbol 'cache_flush_workqueue' was not declared. Should it be static?
drivers/mtd/sm_ftl.c:44:9: warning: symbol 'sm_attr_show' was not declared. Should it be static?
drivers/mtd/sm_ftl.c:57:24: warning: symbol 'sm_create_sysfs_attributes' was not declared. Should it be static?
drivers/mtd/sm_ftl.c:110:6: warning: symbol 'sm_delete_sysfs_attributes' was not declared. Should it be static?
drivers/mtd/sm_ftl.c:574:5: warning: symbol 'sm_get_media_info' was not declared. Should it be static?
drivers/mtd/sm_ftl.c:881:17: warning: symbol 'sm_get_zone' was not declared. Should it be static?
drivers/mtd/sm_ftl.c:902:6: warning: symbol 'sm_cache_init' was not declared. Should it be static?
drivers/mtd/sm_ftl.c:912:6: warning: symbol 'sm_cache_put' was not declared. Should it be static?
drivers/mtd/sm_ftl.c:920:5: warning: symbol 'sm_cache_get' was not declared. Should it be static?
drivers/mtd/sm_ftl.c:931:5: warning: symbol 'sm_cache_flush' was not declared. Should it be static?Signed-off-by: Jingoo Han
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
This adds support for the Everspin mr25h10 MRAM chip to the m25p80
driver.Signed-off-by: Sascha Hauer
Acked-by: Marek Vasut
Signed-off-by: Artem Bityutskiy
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
This patch adds a flag to struct flash_info indicating that
fast_read is not supported. This now gives the following logic
when determing whether to enable fastread:If the flash chip does not support fast_read, then disable it.
Otherwise:
1) enable fast_read if device node contains m25p,fast-read
2) enable fast_read if forced in KconfigThis makes enabling CONFIG_M25PXX_USE_FAST_READ a safe option
since we no longer enable the fast_read option unconditionally.For now fast_read is disabled for the everspin mr25h256 and the
catalyst devices. Others may need the flag aswell.Signed-off-by: Sascha Hauer
Acked-by: Marek Vasut
Signed-off-by: Artem Bityutskiy
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
The flags may have to be overwritten, so add them to the CAT25_INFO
macro.Signed-off-by: Sascha Hauer
Acked-by: Marek Vasut
Signed-off-by: Artem Bityutskiy
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
of_property_read_bool properly compiles away, no need to ifdef this
for non DT builds.Signed-off-by: Sascha Hauer
Acked-by: Marek Vasut
Signed-off-by: Artem Bityutskiy
Signed-off-by: Brian Norris
Signed-off-by: David Woodhouse -
If NO_DMA=y:
drivers/built-in.o: In function `denali_remove':
drivers/mtd/nand/denali.c:1605: undefined reference to `dma_unmap_single'
drivers/built-in.o: In function `denali_read_page_raw':
drivers/mtd/nand/denali.c:1190: undefined reference to `dma_sync_single_for_cpu'
drivers/built-in.o: In function `denali_read_page':
drivers/mtd/nand/denali.c:1140: undefined reference to `dma_sync_single_for_cpu'
drivers/built-in.o: In function `write_page':
drivers/mtd/nand/denali.c:1051: undefined reference to `dma_sync_single_for_cpu'
drivers/built-in.o: In function `denali_init':
drivers/mtd/nand/denali.c:1433: undefined reference to `dma_set_mask'
drivers/mtd/nand/denali.c:1438: undefined reference to `dma_map_single'
drivers/mtd/nand/denali.c:1442: undefined reference to `dma_mapping_error'Signed-off-by: Geert Uytterhoeven
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
Remove unneeded error handling on the result of a call to
platform_get_resource_byname when the value is passed to devm_ioremap_resource.A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)//
@@
expression pdev,res,e,e1;
expression ret != 0;
identifier l;
@@res = platform_get_resource_byname(...);
- if (res == NULL) { ... \(goto l;\|return ret;\) }
e = devm_ioremap_resource(e1, res);
//Signed-off-by: Julia Lawall
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
The PMECC use BCH algorithm to correct error. In BCH algorithm, the primitive
polynomial value is GF(2^13) for 512-bytes sector size. And it is GF(2^14) for
1024-bytes sector size.This patch will choose correct degree of the remainders (13 or 14) for
different sector size.Tested in AT91SAM9X5-EK with MLC nand flash.
More detail can be found in §5.4.1 of:
AT91SAM ARM-based Embedded MPU Application Note
Signed-off-by: Josh Wu
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
For SPI NOR flash that are larger than 128Mbit (16MiB), we need 4 bytes
of address space to reach the entire flash; however, the original SPI
flash protocol used only 3 bytes for the address. So far, the practice
for handling this has been either to use new command opcodes that are
defined to use 4 bytes for their address, or to use special
mode-switching command to configure all traditionally-3-byte-address
commands to take 4 bytes instead.Macronix and Spansion developed two incompatible methods for
entering/exiting "4-byte address mode." Micron flash uses the Macronix
method (OPCODE_{EN4B,EX4B}), not the Spansion method.This patch solves addressing issues on Micron n25q256a and provides the
ability to support other future Micron SPI flash >16MiB.Quoting a Micron representative:
"Majority of our NOR that needs 4-byte addressing (256Mb or 32MB and
higher) enter and exit 4byte through B7h and E9h commands. The
N25Q256A7xxx and N25Q512A7xxx parts do not support 4-byte addressing
mode via B7h or E9h command."They further clarified that those that don't support the enter/exit
opcodes (B7h/E9h) are manufactured specifically to come up by default in
4-byte mode. We don't need to treat those parts any diffently, as they
will discard the EN4B opcode as a no-op.Signed-off-by: Brian Norris
Acked-by: Marek Vasut
Signed-off-by: David Woodhouse -
First, the function argument is 'offset' not 'column'.
Second, the 'data_buf' name is inconsistent with the rest of this file.
Just use 'buf'.Signed-off-by: Brian Norris
Cc: Gupta, Pekon
Signed-off-by: David Woodhouse