summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips/Kconfig
Commit message (Collapse)AuthorAgeFilesLines
* mtd: avoid stack overflow in MTD CFI codeArnd Bergmann2016-04-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When map_word gets too large, we use a lot of kernel stack, and for MTD_MAP_BANK_WIDTH_32, this means we use more than the recommended 1024 bytes in a number of functions: drivers/mtd/chips/cfi_cmdset_0020.c: In function 'cfi_staa_write_buffers': drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: the frame size of 1336 bytes is larger than 1024 bytes [-Wframe-larger-than=] drivers/mtd/chips/cfi_cmdset_0020.c: In function 'cfi_staa_erase_varsize': drivers/mtd/chips/cfi_cmdset_0020.c:972:1: warning: the frame size of 1208 bytes is larger than 1024 bytes [-Wframe-larger-than=] drivers/mtd/chips/cfi_cmdset_0001.c: In function 'do_write_buffer': drivers/mtd/chips/cfi_cmdset_0001.c:1835:1: warning: the frame size of 1240 bytes is larger than 1024 bytes [-Wframe-larger-than=] This can be avoided if all operations on the map word are done indirectly and the stack gets reused between the calls. We can mostly achieve this by selecting MTD_COMPLEX_MAPPINGS whenever MTD_MAP_BANK_WIDTH_32 is set, but for the case that no other bank width is enabled, we also need to use a non-constant map_bankwidth() to convince the compiler to use less stack. Signed-off-by: Arnd Bergmann <arnd@arndb.de> [Brian: this patch mostly achieves its goal by forcing MTD_COMPLEX_MAPPINGS (and the accompanying indirection) for 256-bit mappings; the rest of the change is mostly a wash, though it helps reduce stack size slightly. If we really care about supporting 256-bit mappings though, we should consider rewriting some of this code to avoid keeping and assigning so many 256-bit objects on the stack.] Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: cfi: enforce valid geometry configurationArnd Bergmann2015-11-301-0/+4
| | | | | | | | | | | | | | | | | MTD allows compile-time configuration of the possible CFI geometry settings that are allowed by the kernel, but that includes a couple of invalid configurations, where no bank width or no interleave setting is allowed. These are then caught with a compile-time warning: include/linux/mtd/cfi.h:76:2: warning: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. include/linux/mtd/map.h:145:2: warning: #warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work" This is a bit annoying for randconfig tests, and can be avoided if we change the Kconfig logic to always select the simplest configuration when no other one is enabled. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: chips: fixup dependencies, to prevent build errorBrian Norris2015-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4612c715a6ea ("mtd: cfi: deinline large functions") moved some code into the cfi_util library without creating a new dependency. So we can get build failures like the following, when CONFIG_MTD_JEDECPROBE=y and CONFIG_MTD_CFI_UTIL=m. drivers/built-in.o: In function `jedec_read_id': >> jedec_probe.c:(.text+0x187ed8): undefined reference to `cfi_build_cmd_addr' drivers/built-in.o: In function `jedec_read_mfr': >> jedec_probe.c:(.text+0x187f4a): undefined reference to `cfi_build_cmd_addr' drivers/built-in.o: In function `jedec_reset': >> jedec_probe.c:(.text+0x187fe0): undefined reference to `cfi_send_gen_cmd' >> jedec_probe.c:(.text+0x188004): undefined reference to `cfi_send_gen_cmd' >> jedec_probe.c:(.text+0x18802b): undefined reference to `cfi_send_gen_cmd' >> jedec_probe.c:(.text+0x18804e): undefined reference to `cfi_send_gen_cmd' drivers/built-in.o: In function `jedec_probe_chip': >> jedec_probe.c:(.text+0x188130): undefined reference to `cfi_build_cmd_addr' >> jedec_probe.c:(.text+0x18814d): undefined reference to `cfi_build_cmd_addr' >> jedec_probe.c:(.text+0x1881dc): undefined reference to `cfi_send_gen_cmd' >> jedec_probe.c:(.text+0x188203): undefined reference to `cfi_send_gen_cmd' >> jedec_probe.c:(.text+0x18822d): undefined reference to `cfi_send_gen_cmd' >> jedec_probe.c:(.text+0x1884c0): undefined reference to `cfi_send_gen_cmd' >> jedec_probe.c:(.text+0x1884e7): undefined reference to `cfi_send_gen_cmd' drivers/built-in.o:jedec_probe.c:(.text+0x188511): more undefined references to `cfi_send_gen_cmd' follow drivers/built-in.o: In function `jedec_probe_chip': >> jedec_probe.c:(.text+0x188618): undefined reference to `cfi_build_cmd' So let's express the dependency properly. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: Kconfig: give the CFI command set version in prompt and helpPhilippe De Muyter2014-05-201-8/+8
| | | | | | | Enhances the help for the CFI command set choices. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: merge mtdchar module with mtdcoreArtem Bityutskiy2013-04-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MTD subsystem has historically tried to be as configurable as possible. The side-effect of this is that its configuration menu is rather large, and we are gradually shrinking it. For example, we recently merged partitions support with the mtdcore. This patch does the next step - it merges the mtdchar module to mtdcore. And in this case this is not only about eliminating too fine-grained separation and simplifying the configuration menu. This is also about eliminating seemingly useless kernel module. Indeed, mtdchar is a module that allows user-space making use of MTD devices via /dev/mtd* character devices. If users do not enable it, they simply cannot use MTD devices at all. They cannot read or write the flash contents. Is it a sane and useful setup? I believe not. And everyone just enables mtdchar. Having mtdchar separate is also a little bit harmful. People sometimes miss the fact that they need to enable an additional configuration option to have user-space MTD interfaces, and then they wonder why on earth the kernel does not allow using the flash? They spend time asking around. Thus, let's just get rid of this module and make it part of mtd core. Note, mtdchar had additional configuration option to enable OTP interfaces, which are present on some flashes. I removed that option as well - it saves a really tiny amount space. [dwmw2: Strictly speaking, you can mount file systems on MTD devices just fine without the mtdchar (or mtdblock) devices; you just can't do other manipulations directly on the underlying device. But still I agree that it makes sense to make this unconditional. And Yay! we get to kill off an instance of checking CONFIG_foo_MODULE, which is an abomination that should never happen.] Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* drivers/mtd/chips: remove depends on CONFIG_EXPERIMENTALKees Cook2013-01-111-1/+1
| | | | | | | | | | The CONFIG_EXPERIMENTAL config item has not carried much meaning for a while now and is almost always enabled by default. As agreed during the Linux kernel summit, remove it from any "depends on" lines in Kconfigs. CC: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
* mtd: chips: reorganize Kconfig help on swappingPaul Bolle2012-07-061-9/+2
| | | | | | | | | | | | | | | | The Kconfig help on "Flash cmd/query data swapping" still mentions LART_ENDIAN_BYTE. That option used to be relevant for setting CONFIG_MTD_CFI_LART_BIT_SWAP. That option and macro got both removed in v2.4.11-pre4. So, although LART endianness sounds intriguing, that part of the help text can be removed. And, while we're touching this choice, move the help text up one level. Currently it's available under the "NO" option, while it's relevant for all three options. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* Kconfig: Remove useless and sometimes wrong commentsMichael Roth2009-11-091-3/+0
| | | | | | | Additionally, some excessive newlines removed. Signed-off-by: Michael Roth <mroth@nessie.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* [MTD] [NOR] Select MTD_CFI_UTIL when MTD_CFI probe routine is enabledDavid Woodhouse2008-09-011-0/+1
| | | | | | | | It requires cfi_qry_mode_on(), which is in cfi_util.c Reported by Russell King Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* [MTD] [NOR] Add "Spansion" to MTD_CFI_AMDSTD kconfig menu descriptionGeorge G. Davis2008-08-061-1/+1
| | | | | | | | | This long overdue trivial change to the MTD_CFI_AMDSTD kconfig menu description is intended to help clarify that this option also supports Spansion flash devices. Signed-off-by: George G. Davis <gdavis@mvista.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* [MTD] dataflash OTP supportDavid Brownell2008-08-011-0/+1
| | | | | | | | | | | | | | | Now that we can tell when we have one of the newer DataFlash chips, optionally expose the 128 bytes of OTP memory they provide. Tested on at45db642 revision B and D chips. Switch mtdchar over to a generic HAVE_MTD_OTP flag instead of adding another #ifdef for each type of chip whose driver has OTP support. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Bryan Wu <cooloney@kernel.org> Cc: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* [MTD] [CHIPS] Remove MTD_OBSOLETE_CHIPS (jedec, amd_flash, sharp)David Woodhouse2007-05-091-40/+0
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Use menuconfig objects: MTDJan Engelhardt2007-04-191-9/+3
| | | | | | | | | Use menuconfigs instead of menus, so the whole menu can be disabled at once instead of going through all options. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Fix several typos in drivers/Matt LaPlante2006-10-031-1/+1
| | | | Signed-off-by: Adrian Bunk <bunk@stusta.de>
* Remove use of inter_module_crap in NOR flash chip drivers.David Woodhouse2006-05-081-1/+0
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* MTD: remove obsolete Kconfig optionsAnders Larsen2006-04-011-21/+0
| | | | | | | | | | | | Remove the obsolete Kconfig options MTD_CFI_AMDSTD_RETRY and MTD_CFI_AMDSTD_RETRY_MAX The code that depended on these was removed in early 2004, but Kconfig was not updated accordingly. Signed-off-by: Anders Larsen <al@alarsen.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* Kconfig help: MTD_JEDECPROBE already supports IntelAdrian Bunk2006-03-261-3/+2
| | | | | | | Intel chips are already supported. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: David Woodhouse <dwmw2@infradead.org>
* [PATCH] arm: fix dependencies for MTD_XIPAl Viro2006-02-081-1/+1
| | | | | | | | | MTD_XIP depends on having working asm/mtd-xip.h; it's not just per-architecture (arm-only, as current Kconfig would have it), but actually per-subarch as well. Introduced a new symbol (ARCH_MTD_XIP) set by arch Kconfig; MTD_XIP depends on it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [PATCH] build kernel/intermodule.c only when requiredAdrian Bunk2006-01-161-0/+1
| | | | | | | | | | Build kernel/intermodule.c only when required. Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] no longer mark MTD_OBSOLETE_CHIPS as BROKENAdrian Bunk2006-01-161-3/+3
| | | | | | | | | | This patch removes the wrong dependency of MTD_OBSOLETE_CHIPS on BROKEN and marks the non-compiling MTD_AMDSTD and MTD_JEDEC drivers as BROKEN. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [MTD] chips: Clean up trailing white spacesThomas Gleixner2005-11-071-11/+11
| | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] Make XIP support depend on CONFIG_ARMThomas Gleixner2005-07-121-1/+1
| | | | | | | ARM is the only known user of this at the moment. Prevent allyes builds for other archs from failing Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] XIP for AMD CFI flash.Todd Poynor2005-06-291-2/+2
| | | | | | Author: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] Support for protection register support on Intel FLASH chipsNicolas Pitre2005-05-231-1/+26
| | | | | | | | | | This enables support for reading, writing and locking so called "Protection Registers" present on some flash chips. A subset of them are pre-programmed at the factory with a unique set of values. The rest is user-programmable. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+286
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
OpenPOWER on IntegriCloud