Skip to content

Commit

Permalink
mtd: spi-nor: aspeed-smc: Fix flash struct setup for scan
Browse files Browse the repository at this point in the history
Two updates to the spi-nor drivers between 4.3 and 4.4 were missed
in the aspeed-smc rebase.

The mtd->priv field is now filled out by the common layer so that
can be dropped.  And the new flash_node driver was added and needs
to be set to the child flash node.

Not having this set changed the behavior of spi_nor_scan to follow
the not-in-device-tree path and defaulting to FAST_READ support.
The flash chip was programmed for FAST_READ but the driver was not
expecting it, and the additonal 8 bits of data caused all flash
data reads to be shifted 1 byte.

Signed-off-by: Milton Miller <[email protected]>
Signed-off-by: Joel Stanley <[email protected]>
  • Loading branch information
mdmillerii authored and shenki committed Mar 29, 2016
1 parent f24385a commit aeb4718
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/spi-nor/aspeed-smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ static int aspeed_smc_probe(struct platform_device *dev)

chip->nor.dev = &cdev->dev;
chip->nor.priv = chip;
chip->nor.mtd.priv = &chip->nor; /* should be in spi_nor_scan()!! */
chip->nor.flash_node = child;
chip->nor.mtd.name = of_get_property(child, "label", NULL);
chip->nor.erase = aspeed_smc_erase;
chip->nor.read = aspeed_smc_read_user;
Expand Down

0 comments on commit aeb4718

Please sign in to comment.