diff options
author | Steven J. Hill <sjhill@mips.com> | 2012-05-30 17:02:49 -0400 |
---|---|---|
committer | Steven J. Hill <sjhill@mips.com> | 2012-09-13 16:43:46 -0400 |
commit | 3070033a16edcc21688d5ea8967c89522f833862 (patch) | |
tree | 48d1a4601dd4750d103bc0b02ff2494d75220321 /arch/mips/mti-sead3/sead3-mtd.c | |
parent | 006a851b10a395955c153a145ad8241494d43688 (diff) |
MIPS: Add core files for MIPS SEAD-3 development platform.
More information about the SEAD-3 platform can be found at
<http://www.mips.com/products/development-kits/mips-sead-3/>
on MTI's site. Currently, the M14K family of cores is what
the SEAD-3 is utilised with.
Signed-off-by: Douglas Leung <douglas@mips.com>
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
Diffstat (limited to 'arch/mips/mti-sead3/sead3-mtd.c')
-rw-r--r-- | arch/mips/mti-sead3/sead3-mtd.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/arch/mips/mti-sead3/sead3-mtd.c b/arch/mips/mti-sead3/sead3-mtd.c new file mode 100644 index 000000000000..ffa35f509789 --- /dev/null +++ b/arch/mips/mti-sead3/sead3-mtd.c | |||
@@ -0,0 +1,54 @@ | |||
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) 2012 MIPS Technologies, Inc. All rights reserved. | ||
7 | */ | ||
8 | #include <linux/init.h> | ||
9 | #include <linux/platform_device.h> | ||
10 | #include <linux/mtd/physmap.h> | ||
11 | |||
12 | static struct mtd_partition sead3_mtd_partitions[] = { | ||
13 | { | ||
14 | .name = "User FS", | ||
15 | .offset = 0x00000000, | ||
16 | .size = 0x01fc0000, | ||
17 | }, { | ||
18 | .name = "Board Config", | ||
19 | .offset = 0x01fc0000, | ||
20 | .size = 0x00040000, | ||
21 | .mask_flags = MTD_WRITEABLE | ||
22 | }, | ||
23 | }; | ||
24 | |||
25 | static struct physmap_flash_data sead3_flash_data = { | ||
26 | .width = 4, | ||
27 | .nr_parts = ARRAY_SIZE(sead3_mtd_partitions), | ||
28 | .parts = sead3_mtd_partitions | ||
29 | }; | ||
30 | |||
31 | static struct resource sead3_flash_resource = { | ||
32 | .start = 0x1c000000, | ||
33 | .end = 0x1dffffff, | ||
34 | .flags = IORESOURCE_MEM | ||
35 | }; | ||
36 | |||
37 | static struct platform_device sead3_flash = { | ||
38 | .name = "physmap-flash", | ||
39 | .id = 0, | ||
40 | .dev = { | ||
41 | .platform_data = &sead3_flash_data, | ||
42 | }, | ||
43 | .num_resources = 1, | ||
44 | .resource = &sead3_flash_resource, | ||
45 | }; | ||
46 | |||
47 | static int __init sead3_mtd_init(void) | ||
48 | { | ||
49 | platform_device_register(&sead3_flash); | ||
50 | |||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | module_init(sead3_mtd_init) | ||