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) 2006 MIPS Technologies, Inc.
7 * written by Ralf Baechle <ralf@linux-mips.org>
10 #include <linux/init.h>
11 #include <linux/platform_device.h>
12 #include <linux/mtd/partitions.h>
13 #include <linux/mtd/physmap.h>
14 #include <mtd/mtd-abi.h>
16 static struct mtd_partition malta_mtd_partitions[] = {
21 .mask_flags = MTD_WRITEABLE
27 .name = "Board Config",
30 .mask_flags = MTD_WRITEABLE
34 static struct physmap_flash_data malta_flash_data = {
36 .nr_parts = ARRAY_SIZE(malta_mtd_partitions),
37 .parts = malta_mtd_partitions
40 static struct resource malta_flash_resource = {
43 .flags = IORESOURCE_MEM
46 static struct platform_device malta_flash = {
47 .name = "physmap-flash",
50 .platform_data = &malta_flash_data,
53 .resource = &malta_flash_resource,
56 static int __init malta_mtd_init(void)
58 platform_device_register(&malta_flash);
63 module_init(malta_mtd_init)