Skip to content
Snippets Groups Projects
Commit 3f5c2bd8 authored by Wu, Qiming's avatar Wu, Qiming Committed by Kenneth Johansson
Browse files

Merge pull request #274 in SW_PON/linux from...

Merge pull request #274 in SW_PON/linux from feature/DRVLIB_SW-563-verify-spi-nand-flash-filesystem-on-falcon_mountain-haps to xrx500

* commit '13aecfe1c3fa2b2b05e1857a3430a041b5f641b5':
  Use compatible string to determine qspi flash type
  Change ltq spinand compatible string
parent 572dc56e
Branches
No related tags found
No related merge requests found
......@@ -1586,7 +1586,7 @@ static int spinand_remove(struct spi_device *spi)
}
static const struct of_device_id ltq_spinand_dt[] = {
{ .compatible = "lantiq,ltq_spinand", },
{ .compatible = "lantiq,spinand", },
{}
};
......
......@@ -267,12 +267,16 @@ static int cadence_qspi_of_get_pdata(struct platform_device *pdev)
return -ENXIO;
}
f_pdata = &(pdata->f_pdata[cs]);
if (of_property_read_u32(nc, "flash-type", &prop)) {
dev_err(&pdev->dev, "couldn't determine flash-type\n");
return -ENXIO;
}
pr_debug("[%s]cs=%d flash-type=%d\n", __func__, cs, prop);
f_pdata->flash_type = prop;
/* use compatible string to determine flash type */
if (of_device_is_compatible(nc, "lantiq,spinand"))
f_pdata->flash_type = QSPI_FLASH_TYPE_NAND;
else
f_pdata->flash_type = QSPI_FLASH_TYPE_NOR;
pr_debug("[%s]cs=%d flash-type=%d\n", __func__, cs,
f_pdata->flash_type);
if (of_property_read_u32(nc, "spi-rx-bus-width", &prop)) {
dev_err(&pdev->dev, "couldn't determine quad\n");
return -ENXIO;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment