提交 acc79980 编写于 作者: J Jon Hunter

ARM: OMAP2+: Convert NAND to retrieve GPMC settings from DT

When booting with device-tree, retrieve GPMC settings for NAND from
the device-tree blob. This will allow us to remove all static settings
stored in the gpmc-nand.c in the future once the migration to
device-tree is complete.
Signed-off-by: NJon Hunter <jon-hunter@ti.com>
Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
上级 cdd6928c
...@@ -137,6 +137,9 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data, ...@@ -137,6 +137,9 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
return err; return err;
} }
if (gpmc_nand_data->of_node) {
gpmc_read_settings_dt(gpmc_nand_data->of_node, &s);
} else {
s.device_nand = true; s.device_nand = true;
/* Enable RD PIN Monitoring Reg */ /* Enable RD PIN Monitoring Reg */
...@@ -144,6 +147,7 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data, ...@@ -144,6 +147,7 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
s.wait_on_read = true; s.wait_on_read = true;
s.wait_on_write = true; s.wait_on_write = true;
} }
}
if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16) if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16)
s.device_width = GPMC_DEVWIDTH_16BIT; s.device_width = GPMC_DEVWIDTH_16BIT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册