From b902e07cea51e33fbe36453f7b1412dd7bbe760f Mon Sep 17 00:00:00 2001 From: Jagannadha Sutradharudu Teki Date: Sat, 11 Jan 2014 15:25:04 +0530 Subject: sf: Add CONFIG_SF_DUAL_FLASH This config will use for defining greater than single flash support. currently - DUAL_STACKED and DUAL_PARALLEL. Signed-off-by: Jagannadha Sutradharudu Teki --- drivers/mtd/spi/sf_probe.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/mtd/spi/sf_probe.c') diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 48de7c1986..bc3cf6cc64 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -150,8 +150,10 @@ static struct spi_flash *spi_flash_validate_params(struct spi_slave *spi, flash->page_size = ((ext_jedec == 0x4d00) ? 512 : 256) << flash->shift; flash->sector_size = params->sector_size << flash->shift; flash->size = flash->sector_size * params->nr_sectors << flash->shift; +#ifdef CONFIG_SF_DUAL_FLASH if (flash->dual_flash & SF_DUAL_STACKED_FLASH) flash->size <<= 1; +#endif /* Compute erase sector and command */ if (params->flags & SECT_4K) { -- cgit