diff options
Diffstat (limited to 'arch/arm/mach-omap2/gpmc.c')
| -rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 6c4da1254f5..a195468286f 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1345,6 +1345,13 @@ static const char * const nand_ecc_opts[] = {  	[OMAP_ECC_BCH8_CODE_HW]			= "bch8",  }; +static const char * const nand_xfer_types[] = { +	[NAND_OMAP_PREFETCH_POLLED]		= "prefetch-polled", +	[NAND_OMAP_POLLED]			= "polled", +	[NAND_OMAP_PREFETCH_DMA]		= "prefetch-dma", +	[NAND_OMAP_PREFETCH_IRQ]		= "prefetch-irq", +}; +  static int gpmc_probe_nand_child(struct platform_device *pdev,  				 struct device_node *child)  { @@ -1374,6 +1381,13 @@ static int gpmc_probe_nand_child(struct platform_device *pdev,  				break;  			} +	if (!of_property_read_string(child, "ti,nand-xfer-type", &s)) +		for (val = 0; val < ARRAY_SIZE(nand_xfer_types); val++) +			if (!strcasecmp(s, nand_xfer_types[val])) { +				gpmc_nand_data->xfer_type = val; +				break; +			} +  	val = of_get_nand_bus_width(child);  	if (val == 16)  		gpmc_nand_data->devsize = NAND_BUSWIDTH_16;  |