19 Dec, 2015
40 commits
-
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick
Signed-off-by: Brian Norris -
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick
Signed-off-by: Brian Norris -
Move write data register before excute command to avoid
missing first byte write to nor flashSigned-off-by: Bayi Cheng
Signed-off-by: Brian Norris -
Nobody uses the get_platform_nandchip() helper function which is supposed
to return a pointer to a platform_nand_chip struct from an mtd_info
pointer.
Moreover, this function is buggy since the introduction of the plat_nand
layer (chip->priv is now storing a pointer to an intermediate
plat_nand_data structure allocated in plat_nand_probe(), and we have no
way to retrieve a pointer to the provided platform_nand_chip struct from
this plat_nand_data pointer).While we are at it, remove the useless (and buggy, since it's pointing to
something stored on the stack) data->chip.priv assignment.Signed-off-by: Boris Brezillon
Fixes: 711fdf627ce1 ("[MTD] [NAND] platform NAND driver: add driver")
Cc: Vitaly Wool
Signed-off-by: Brian Norris -
Now that the nand_chip struct directly embeds an mtd_info struct we can
get rid of the ->flash_node field and forward set/get_flash_node requests
to the MTD layer.As a side effect, we no longer need the mtd_set_of_node() call done in
nand_dt_init().Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
nand_dt_init() function requires 3 arguments where it actually needs one
(dn and mtd can both be retrieved from chip). Drop these parameters.Testing for dn != NULL inside nand_dt_init() also helps simplifying the
caller code.Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
mtd_to_nand() now uses the container_of() approach to transform an
mtd_info pointer into a nand_chip one. Drop useless mtd->priv
assignments from NAND controller drivers.Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
mtd_to_nand() now uses the container_of() approach to transform an
mtd_info pointer into a nand_chip one. Drop useless mtd->priv
assignments from NAND controller drivers.Signed-off-by: Boris Brezillon
Acked-by: Jesper Nilsson
Signed-off-by: Brian Norris -
mtd_to_nand() now uses the container_of() approach to transform an
mtd_info pointer into a nand_chip one. Drop useless mtd->priv
assignments from NAND controller drivers.Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
Now that all drivers are using the mtd instance embedded in the nand_chip
struct we can safely update the mtd_to_nand() implementation to use
the container_of macro instead of returning the content of mtd->priv.
This will allow us to remove mtd->priv = chip assignments done in all
NAND controller drivers.Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Patch all drivers to make use
of this mtd instance instead of using the instance embedded in their
private struct or dynamically allocated.Signed-off-by: Boris Brezillon
Acked-by: Jesper Nilsson
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device, use it instead of allocating
a new one.Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
Other refactorings have left the 'fail' label much simpler, so it
shouldn't have to handle the failed allocation case.This also fixes a -Wshadow warning.
Signed-off-by: Brian Norris
Reviewed-by: Boris Brezillon -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Reviewed-by: Krzysztof Kozlowski
Signed-off-by: Brian Norris -
The MTD device is now directly embedded in the nand_chip struct. Update the
mtdnand documentation to mention this aspect and fix the different
examples.Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris -
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon
Signed-off-by: Brian Norris