2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
8 #include <linux/init.h>
9 #include <linux/platform_device.h>
10 #include <linux/mtd/physmap.h>
12 static struct mtd_partition sead3_mtd_partitions
[] = {
18 .name
= "Board Config",
21 .mask_flags
= MTD_WRITEABLE
25 static struct physmap_flash_data sead3_flash_data
= {
27 .nr_parts
= ARRAY_SIZE(sead3_mtd_partitions
),
28 .parts
= sead3_mtd_partitions
31 static struct resource sead3_flash_resource
= {
34 .flags
= IORESOURCE_MEM
37 static struct platform_device sead3_flash
= {
38 .name
= "physmap-flash",
41 .platform_data
= &sead3_flash_data
,
44 .resource
= &sead3_flash_resource
,
47 static int __init
sead3_mtd_init(void)
49 platform_device_register(&sead3_flash
);
54 module_init(sead3_mtd_init
)