16 Sep, 2019
2 commits
-
We have a dedicated pointer for that, so use it. Much easier to read and
less computation involved.Signed-off-by: Wolfram Sang
Signed-off-by: Richard Weinberger -
pxa2xx-flash is the only user of ioremap_cached, which is an alias
for ioremap_cache anyway.Signed-off-by: Christoph Hellwig
Signed-off-by: Richard Weinberger
21 Aug, 2019
1 commit
-
Mark switch cases where we are expecting to fall through.
Fix the following warning (Building: assabet_defconfig arm):
drivers/mtd/maps/sa1100-flash.c: In function ‘sa1100_probe_subdev’:
drivers/mtd/maps/sa1100-flash.c:82:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
printk(KERN_WARNING "SA1100 flash: unknown base address "
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"0x%08lx, assuming CS0\n", phys);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/maps/sa1100-flash.c:85:2: note: here
case SA1100_CS0_PHYS:
^~~~Signed-off-by: Gustavo A. R. Silva
19 Jun, 2019
2 commits
-
Based on 2 normalized pattern(s):
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 foundationthis 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 #extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 4122 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Enrico Weigelt
Reviewed-by: Kate Stewart
Reviewed-by: Allison Randal
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman -
Based on 1 normalized pattern(s):
licensed under version 2 of the gnu general public licence
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 1 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Enrico Weigelt
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081202.750147367@linutronix.de
Signed-off-by: Greg Kroah-Hartman
31 May, 2019
2 commits
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the licenseextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 24 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Alexios Zavras
Reviewed-by: Steve Winslow
Reviewed-by: Allison Randal
Reviewed-by: Richard Fontana
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190528170026.162703968@linutronix.de
Signed-off-by: Greg Kroah-Hartman -
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
59 temple place suite 330 boston ma 02111 1307 usaextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 1334 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Richard Fontana
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman
21 May, 2019
2 commits
-
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:GPL-2.0-only
Signed-off-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman -
Add SPDX license identifiers to all files which:
- Have no license information of any form
- Have MODULE_LICENCE("GPL*") inside which was used in the initial
scan/conversion to ignore the fileThese files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:GPL-2.0-only
Signed-off-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
15 May, 2019
1 commit
-
Since commit dccd2304cc90 ("ARM: 7430/1: sizes.h: move from asm-generic
to "), and are just
wrappers of .This commit replaces all and to
prepare for the removal.Link: http://lkml.kernel.org/r/1553267665-27228-1-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 May, 2019
4 commits
-
The blackfin architecture has been removed a while ago, so there is
no more need to declare uclinux_ram_map as a global structure.Signed-off-by: Thomas Huth
Signed-off-by: Richard Weinberger -
When the physmap_of_core.c code was merged into physmap-core.c the
ability to use MTD_PHYSMAP_OF with only MTD_RAM selected was lost.
Restore this by adding MTD_RAM to the dependencies of MTD_PHYSMAP.Fixes: commit 642b1e8dbed7 ("mtd: maps: Merge physmap_of.c into physmap-core.c")
Cc:
Signed-off-by: Chris Packham
Reviewed-by: Hamish Martin
Signed-off-by: Richard Weinberger -
When the gpio-addr-flash.c driver was merged with physmap-core.c the
code to store the current gpio_values was lost. This meant that once a
gpio was asserted it was never de-asserted. Fix this by storing the
current offset in gpio_values like the old driver used to.Fixes: commit ba32ce95cbd9 ("mtd: maps: Merge gpio-addr-flash.c into physmap-core.c")
Cc:
Signed-off-by: Chris Packham
Reviewed-by: Boris Brezillon
Signed-off-by: Richard Weinberger -
Marking a local variable as __xipram causes a warning because of the
noinline attribute:drivers/mtd/maps/physmap-gemini.c:89:11: error: '__noinline__' attribute only applies to functions [-Werror,-Wignored-attributes]
map_word __xipram ret;
^
include/linux/mtd/xip.h:34:18: note: expanded from macro '__xipram'
#define __xipram noinline __attribute__ ((__section__ (".xiptext")))I can't see any reason for the anotation anyway, so just remove it here.
Fixes: 9d3b5086f6d4 ("mtd: physmap_of_gemini: Handle pin control")
Signed-off-by: Arnd Bergmann
Acked-by: Linus Walleij
Signed-off-by: Richard Weinberger
30 Dec, 2018
1 commit
-
Pull Kbuild updates from Masahiro Yamada:
"Kbuild core:
- remove unneeded $(call cc-option,...) switches
- consolidate Clang compiler flags into CLANG_FLAGS
- announce the deprecation of SUBDIRS
- fix single target build for external module
- simplify the dependencies of 'prepare' stage targets
- allow fixdep to directly write to .*.cmd files
- simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS
- change if_changed_rule to accept multi-line recipe
- move .SECONDARY special target to scripts/Kbuild.include
- remove redundant 'set -e'
- improve parallel execution for CONFIG_HEADERS_CHECK
- misc cleanupsTreewide fixes and cleanups
- set Clang flags correctly for PowerPC boot images
- fix UML build error with CONFIG_GCC_PLUGINS
- remove unneeded patterns from .gitignore files
- refactor firmware/Makefile
- remove unneeded rules for *offsets.s
- avoid unneeded regeneration of intermediate .s files
- clean up ./KbuildModpost:
- remove unused -M, -K options
- fix false positive warnings about section mismatch
- use simple devtable lookup instead of linker magic
- misc cleanupsCoccinelle:
- relax boolinit.cocci checks for overall consistency
- fix warning messages of boolinit.cocciOther tools:
- improve -dirty check of scripts/setlocalversion
- add a tool to generate compile_commands.json from .*.cmd files"* tag 'kbuild-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (51 commits)
kbuild: remove unused cmd_gentimeconst
kbuild: remove $(obj)/ prefixes in ./Kbuild
treewide: add intermediate .s files to targets
treewide: remove explicit rules for *offsets.s
firmware: refactor firmware/Makefile
firmware: remove unnecessary patterns from .gitignore
scripts: remove unnecessary ihex2fw and check-lc_ctypes from .gitignore
um: remove unused filechk_gen_header in Makefile
scripts: add a tool to produce a compile_commands.json file
kbuild: add -Werror=implicit-int flag unconditionally
kbuild: add -Werror=strict-prototypes flag unconditionally
kbuild: add -fno-PIE flag unconditionally
scripts: coccinelle: Correct warning message
scripts: coccinelle: only suggest true/false in files that already use them
kbuild: handle part-of-module correctly for *.ll and *.symtypes
kbuild: refactor part-of-module
kbuild: refactor quiet_modtag
kbuild: remove redundant quiet_modtag for $(obj-m)
kbuild: refactor Makefile.asm-generic
user/Makefile: Fix typo and capitalization in comment section
...
19 Dec, 2018
1 commit
-
NAND core changes:
- kernel-doc miscellaneous fixes.
- Third batch of fixes/cleanup to the raw NAND core impacting various
controller drivers (ams-delta, marvell, fsmc, denali, tegra, vf610):
* Stopping to pass mtd_info objects to internal functions
* Reorganizing code to avoid forward declarations
* Dropping useless test in nand_legacy_set_defaults()
* Moving nand_exec_op() to internal.h
* Adding nand_[de]select_target() helpers
* Passing the CS line to be selected in struct nand_operation
* Making ->select_chip() optional when ->exec_op() is implemented
* Deprecating the ->select_chip() hook
* Moving the ->exec_op() method to nand_controller_ops
* Moving ->setup_data_interface() to nand_controller_ops
* Deprecating the dummy_controller field
* Fixing JEDEC detection
* Providing a helper for polling GPIO R/B pinRaw NAND chip drivers changes:
- Macronix:
* Flagging 1.8V AC chips with a broken GET_FEATURES(TIMINGS)Raw NAND controllers drivers changes:
- Ams-delta:
* Fixing the error path
* SPDX tag added
* May be compiled with COMPILE_TEST=y
* Conversion to ->exec_op() interface
* Dropping .IOADDR_R/W use
* Use GPIO API for data I/O
- Denali:
* Removing denali_reset_banks()
* Removing ->dev_ready() hook
* Including instead of
* Changes to comply with the above fixes/cleanup done in the core.
- FSMC:
* Adding an SPDX tag to replace the license text
* Making conversion from chip to fsmc consistent
* Fixing unchecked return value in fsmc_read_page_hwecc
* Changes to comply with the above fixes/cleanup done in the core.
- Marvell:
* Preventing timeouts on a loaded machine (fix)
* Changes to comply with the above fixes/cleanup done in the core.
- OMAP2:
* Pass the parent of pdev to dma_request_chan() (fix)
- R852:
* Use generic DMA API
- sh_flctl:
* Converting to SPDX identifiers
- Sunxi:
* Write pageprog related opcodes to the right register: WCMD_SET (fix)
- Tegra:
* Stop implementing ->select_chip()
- VF610:
* Adding an SPDX tag to replace the license text
* Changes to comply with the above fixes/cleanup done in the core.
- Various trivial/spelling/coding style fixes.SPI-NAND drivers changes:
- Removing the depreacated mt29f_spinand driver from staging.
- Adding support for:
* Toshiba TC58CVG2S0H
* GigaDevice GD5FxGQ4xA
* Winbond W25N01GV
06 Dec, 2018
2 commits
-
This enables the complex mapping for the Gemini and kicks in
custom read/write functions that will wrap the existing
simple functions in calls to enable/disable the parallel
flash pins using pin controls.This is necessary on some hardware such as the D-Link
DIR-685 where all flash pins are patched in/out at the same
time, but some of the flash pins are in practice unused by
the flash and have anyway been reused as GPIO.This concerns specifically CE1 on the Gemini. There is only
one flash chip, so only CE0 is used, and the line for CE1
has been reused as chip select for the emulated SPI port
connected to the display. If we try to use the same lines
for flash and GPIO at the same time, one of them will loose:
the GPIO line will disappear because it gets disconnected
from the pin when the flash group is muxed out.Fix this by introducing two pin control states named simply
"enabled" and "disabled" and only enable the flash lines
when absolutely necessary (during read/write/copy). This
way, they are available for GPIO at all other times and
the display works.Collect all the state variables in a struct named
struct gemini_flash and allocate this struct at probe
time.Signed-off-by: Linus Walleij
Signed-off-by: Boris Brezillon -
SoC-specific drivers might provide their own map->xxx()
implementations, and calling simple_map_init() unconditionally will
override those implementations.Make sure map->read is NULL before calling simple_map_init().
Signed-off-by: Linus Walleij
Signed-off-by: Boris Brezillon
01 Dec, 2018
1 commit
-
SUBDIRS has been kept as a backward compatibility since
commit ("[PATCH] kbuild: external module support") in 2002.We do not need multiple ways to do the same thing, so I will remove
SUBDIRS after the Linux 5.3 release. I cleaned up in-tree code, and
updated the document so that nobody would try to use it.Meanwhile, display the following warning if SUBDIRS is used.
Makefile:189: ================= WARNING ================
Makefile:190: 'SUBDIRS' will be removed after Linux 5.3
Makefile:191: Please use 'M=' or 'KBUILD_EXTMOD' instead
Makefile:192: ==========================================Signed-off-by: Masahiro Yamada
Acked-by: Boris Brezillon # for scx200_docflash.c
Acked-by: Guenter Roeck # for scx200_wdt.c
07 Nov, 2018
2 commits
-
Looks like this driver was initially added to support the NOR on the
DA830-EVM (Davinci) board, but the board file update was never merged.Keeping unused drivers just adds to the maintenance burden, so let's
remove it if nobody uses it.Cc: David Griego
Cc: Aleksey Makarov
Cc: Sergei Shtylyov
Cc: Savinay Dharmappa
Signed-off-by: Boris Brezillon
Acked-by: Sekhar Nori -
It is preferred to have the positive statement on an if/else. While we
are at it we replace the way we access rom_probe_types.Signed-off-by: Ricardo Ribalda Delgado
Signed-off-by: Boris Brezillon
Acked-by: Linus Walleij
06 Nov, 2018
14 commits
-
Enabling -Wvla found another variable-length array with randconfig
testing:drivers/mtd/maps/sa1100-flash.c: In function 'sa1100_setup_mtd':
drivers/mtd/maps/sa1100-flash.c:224:10: error: ISO C90 forbids variable length array 'cdev' [-Werror=vla]Dynamically allocate the cdev array passed to mtd_concat_create()
instead of using a VLA.Reported-by: Arnd Bergmann
Signed-off-by: Boris Brezillon
Cc: Kees Cook
Cc: Olof Johansson -
Controlling some MSB address lines using GPIOs is just a small
deviation from the generic physmap logic, and merging those two drivers
allows us to share most of the probe logic, which is a good thing.Also, the gpio-addr-flash driver is unused since the removal of
the blackfin arch in v4.17, so we can safely remove the old driver
without risking breaking existing boards.Signed-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Tested-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij -
Now that the physmap_of driver is gone, the gemini and versative
extensions are part of the physmap driver. Rename the source files and
the config option to reflect this.Signed-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij -
There's no real reason to have two separate driver for the DT and pdata
case. Just do what we do everywhere else and handle DT and pdata
parsing in the same driver.Signed-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij -
We want to merge the physmap and physmap_of driver, but before we can
do that we must prepare things to create physmap.o out of several .c
files. Rename physmap.c into physmap-core.c and add a new Makefile
rule to create physmap.o (right now it only contains physmap-core.o).Signed-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij -
Fix the following coding style issues:
- != NULL and == NULL test replaced by ! (or nothing)
- split over 80 chars lines
- add missing braces in multi-line if() {} else {} statementsSigned-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij -
There's no point going to the err_out path since no resources have
been allocated yet, just return -ENOMEM directly.Signed-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij -
mtd_device_parse_register() and mtd_device_unregister() can fail,
check their return code and propagate the error to the upper layer
if needed.Signed-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij -
Remove the MAX_RESOURCES limitation by dynamically allocating the
->mtds[] and ->maps[] at probe time based on the number of iomem
resources attached to the platform device.Signed-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij -
Use devm_ioremap_resource() to replace the devm_request_mem_region() +
devm_ioremap() combination.Signed-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij -
Replace printk(KERN_NOTICE) by dev_notice() use the %pR specifier to
print the iomem resource.Signed-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij -
Stop manipulating the dev->resource array directly and use the
platform_get_resource() helper instead.While at it, fix the loop check so that we never overflow the info->maps
and info->mtds array even if the number of resources attached to the
platform dev is higher than MAX_RESOURCES.Signed-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij -
The ->map and ->mtd fields are actually arrays of map and mtd objects.
Rename those fields into ->maps and ->mtds to make it obvious.Signed-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij -
Add an SPDX header matching the MODULE_LICENSE("GPL") definition.
Signed-off-by: Boris Brezillon
Reviewed-by: Ricardo Ribalda Delgado
Acked-by: Linus Walleij
09 Oct, 2018
3 commits
-
Convert from legacy gpio API to gpiod.
Board files will have to use gpiod_lookup_tables.Signed-off-by: Ricardo Ribalda Delgado
Suggested-by: Boris Brezillon
Signed-off-by: Boris Brezillon -
By replacing the array with an integer we can avoid completely
the bit comparison loop if the value has not changed (by far
the most common case).Signed-off-by: Ricardo Ribalda Delgado
Signed-off-by: Boris Brezillon -
By using the order of the window instead of the size, we can replace a
lot of expensive division and modulus on the code with simple bit
operations.Signed-off-by: Ricardo Ribalda Delgado
Signed-off-by: Boris Brezillon
05 Oct, 2018
2 commits
-
By using devm functions we can make the code cleaner.
Signed-off-by: Ricardo Ribalda Delgado
Signed-off-by: Boris Brezillon -
We should only iomap the area of the chip that is memory mapped.
Otherwise we could be mapping devices beyond the memory space or that
belong to other devices.Signed-off-by: Ricardo Ribalda Delgado
Fixes: ebd71e3a4861 ("mtd: maps: gpio-addr-flash: fix warnings and make more portable")
Cc:
Signed-off-by: Boris Brezillon