diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-12-12 06:52:34 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-01-08 16:41:04 -0500 |
commit | 61e84f99877fa8caaf1be86d51d825406e8d8bc1 (patch) | |
tree | ecca04e2af3cc1fb735463a82365072e639a54ca /arch/mips/mips-boards | |
parent | bf81b46482c0fa8ea638e409d39768ea92a6b0f0 (diff) |
[MIPS] Malta: Add missing MTD file.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mips-boards')
-rw-r--r-- | arch/mips/mips-boards/malta/malta_mtd.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/mips/mips-boards/malta/malta_mtd.c b/arch/mips/mips-boards/malta/malta_mtd.c new file mode 100644 index 000000000000..8ad9bdf25dce --- /dev/null +++ b/arch/mips/mips-boards/malta/malta_mtd.c | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
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 | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006 MIPS Technologies, Inc. | ||
7 | * written by Ralf Baechle <ralf@linux-mips.org> | ||
8 | */ | ||
9 | |||
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> | ||
15 | |||
16 | static struct mtd_partition malta_mtd_partitions[] = { | ||
17 | { | ||
18 | .name = "YAMON", | ||
19 | .offset = 0x0, | ||
20 | .size = 0x100000, | ||
21 | .mask_flags = MTD_WRITEABLE | ||
22 | }, { | ||
23 | .name = "User FS", | ||
24 | .offset = 0x100000, | ||
25 | .size = 0x2e0000 | ||
26 | }, { | ||
27 | .name = "Board Config", | ||
28 | .offset = 0x3e0000, | ||
29 | .size = 0x020000, | ||
30 | .mask_flags = MTD_WRITEABLE | ||
31 | } | ||
32 | }; | ||
33 | |||
34 | static struct physmap_flash_data malta_flash_data = { | ||
35 | .width = 4, | ||
36 | .nr_parts = ARRAY_SIZE(malta_mtd_partitions), | ||
37 | .parts = malta_mtd_partitions | ||
38 | }; | ||
39 | |||
40 | static struct resource malta_flash_resource = { | ||
41 | .start = 0x1e000000, | ||
42 | .end = 0x1e3fffff, | ||
43 | .flags = IORESOURCE_MEM | ||
44 | }; | ||
45 | |||
46 | static struct platform_device malta_flash = { | ||
47 | .name = "physmap-flash", | ||
48 | .id = 0, | ||
49 | .dev = { | ||
50 | .platform_data = &malta_flash_data, | ||
51 | }, | ||
52 | .num_resources = 1, | ||
53 | .resource = &malta_flash_resource, | ||
54 | }; | ||
55 | |||
56 | static int __init malta_mtd_init(void) | ||
57 | { | ||
58 | platform_device_register(&malta_flash); | ||
59 | |||
60 | return 0; | ||
61 | } | ||
62 | |||
63 | module_init(malta_mtd_init) | ||