Commit 255529ba authored by Mamta Shukla's avatar Mamta Shukla

sw: drv: Add flash partitions

Flash on svec requires partitons to hold bootloader(SFPGA) and later partition for storing application
bitstream to be loaded in AFPGA. The partitions can be observed as:

dev:    size   erasesize  name
mtd0: 00100000 00040000 "SFPGA"
mtd1: 00500000 00040000 "AFPGA"
mtd2: 00a00000 00040000 "AFPGA_DATA"
Signed-off-by: Mamta Shukla's avatarMamta Shukla <mamta.ramendra.shukla@cern.ch>
Suggested-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 6aef0d6b
......@@ -13,6 +13,8 @@
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
#include <linux/delay.h>
#include <linux/sizes.h>
#include <linux/mtd/partitions.h>
#include "svec.h"
#include "svec-core-fpga.h"
......@@ -279,10 +281,29 @@ static struct resource svec_fpga_spi_res[] = {
},
};
static struct mtd_partition svec_flash_parts[] = {
[0] = {
.name = "SFPGA",
.offset = 0,
.size = SZ_1M,
},
[1] = {
.name = "AFPGA",
.offset = 0x100000,
.size = 5 * SZ_1M,
},
[2] = {
.name = "AFPGA_DATA",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
},
};
struct flash_platform_data svec_flash_pdata = {
.name = "svec-flash",
.parts = NULL,
.nr_parts = 0,
.parts = svec_flash_parts,
.nr_parts = ARRAY_SIZE(svec_flash_parts),
.type = "m25p128",
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment