summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/brcmnand
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-09-03 18:35:36 +0200
committerBrian Norris <computersforpeace@gmail.com>2015-09-11 15:48:21 -0700
commit11bff0b70cc003b995cf4c2acec4adab90957b02 (patch)
tree32fdd875bbad438548feeb4b0cb52f5367776980 /drivers/mtd/nand/brcmnand
parentf9b97fe61402f7f18da71e034b1e72f68df82c1a (diff)
downloadtalos-obmc-linux-11bff0b70cc003b995cf4c2acec4adab90957b02.tar.gz
talos-obmc-linux-11bff0b70cc003b995cf4c2acec4adab90957b02.zip
mtd: spi-nor: Decouple SPI NOR's device_node from controller device
The problem this patch is trying to address is such, that SPI NOR flash devices attached to a dedicated SPI NOR controller cannot read their properties from the associated struct device_node. A couple of facts first: 1) Each SPI NOR flash has a struct spi_nor associated with it. 2) Each SPI NOR flash has certain device properties associated with it, for example the OF property 'm25p,fast-read' is a good pick. These properties are used by the SPI NOR core to select which opcodes are sent to such SPI NOR flash. These properties are coming from spi_nor .dev->of_node . The problem is, that for SPI NOR controllers, the struct spi_nor .dev element points to the struct device of the SPI NOR controller, not the SPI NOR flash. Therefore, the associated dev->of_node also is the one of the controller and therefore the SPI NOR core code is trying to parse the SPI NOR controller's properties, not the properties of the SPI NOR flash. Note: The m25p80 driver is not affected, because the controller and the flash are the same device, so the associated device_node of the controller and the flash are the same. This patch adjusts the SPI NOR core such that the device_node is not picked from spi_nor .dev directly, but from a new separate spi_nor .flash_node element. This let's the SPI NOR controller drivers set up a different spi_nor .flash_node element for each SPI NOR flash. This patch also fixes the controller drivers to be compatible with this modification and correctly set the spi_nor .flash_node element. This patch is inspired by 5844feeaa4154d1c46d3462c7a4653d22356d8b4 mtd: nand: add common DT init code Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/brcmnand')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud