aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv/mb93090-mb00
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-09-24 10:12:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-24 20:18:38 -0400
commitc775197d59995228909957e9f0ec128de2590682 (patch)
tree740a471323a2a7d90a81de90ada991ebfe661e20 /arch/frv/mb93090-mb00
parent9d93f00580243cc059510d9d6ac4d2f5e97e5b83 (diff)
FRV: Flash mappings for the MB93090-MB00 motherboard
Flash mappings for the MB93090-MB00 evaluation motherboard. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/frv/mb93090-mb00')
-rw-r--r--arch/frv/mb93090-mb00/Makefile2
-rw-r--r--arch/frv/mb93090-mb00/flash.c90
2 files changed, 92 insertions, 0 deletions
diff --git a/arch/frv/mb93090-mb00/Makefile b/arch/frv/mb93090-mb00/Makefile
index 76595e870733..b73b542f8f48 100644
--- a/arch/frv/mb93090-mb00/Makefile
+++ b/arch/frv/mb93090-mb00/Makefile
@@ -11,3 +11,5 @@ else
11obj-y += pci-dma-nommu.o 11obj-y += pci-dma-nommu.o
12endif 12endif
13endif 13endif
14
15obj-$(CONFIG_MTD) += flash.o
diff --git a/arch/frv/mb93090-mb00/flash.c b/arch/frv/mb93090-mb00/flash.c
new file mode 100644
index 000000000000..c0e3707c2299
--- /dev/null
+++ b/arch/frv/mb93090-mb00/flash.c
@@ -0,0 +1,90 @@
1/* Flash mappings for the MB93090-MB00 motherboard
2 *
3 * Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11
12#include <linux/init.h>
13#include <linux/platform_device.h>
14#include <linux/mtd/partitions.h>
15#include <linux/mtd/physmap.h>
16
17#define MB93090_BOOTROM_ADDR 0xFF000000 /* Boot ROM */
18#define MB93090_BOOTROM_SIZE (2 * 1024 * 1024)
19#define MB93090_USERROM_ADDR 0xFF200000 /* User ROM */
20#define MB93090_USERROM_SIZE (2 * 1024 * 1024)
21
22/*
23 * default MTD partition table for both main flash devices, expected to be
24 * overridden by RedBoot
25 */
26static struct mtd_partition mb93090_partitions[] = {
27 {
28 .name = "Filesystem",
29 .size = MTDPART_SIZ_FULL,
30 .offset = 0,
31 }
32};
33
34/*
35 * Definition of the MB93090 Boot ROM (on the CPU card)
36 */
37static struct physmap_flash_data mb93090_bootrom_data = {
38 .width = 2,
39 .nr_parts = 2,
40 .parts = mb93090_partitions,
41};
42
43static struct resource mb93090_bootrom_resource = {
44 .start = MB93090_BOOTROM_ADDR,
45 .end = MB93090_BOOTROM_ADDR + MB93090_BOOTROM_SIZE - 1,
46 .flags = IORESOURCE_MEM,
47};
48
49static struct platform_device mb93090_bootrom = {
50 .name = "physmap-flash",
51 .id = 0,
52 .dev.platform_data = &mb93090_bootrom_data,
53 .num_resources = 1,
54 .resource = &mb93090_bootrom_resource,
55};
56
57/*
58 * Definition of the MB93090 User ROM definition (on the motherboard)
59 */
60static struct physmap_flash_data mb93090_userrom_data = {
61 .width = 2,
62 .nr_parts = 2,
63 .parts = mb93090_partitions,
64};
65
66static struct resource mb93090_userrom_resource = {
67 .start = MB93090_USERROM_ADDR,
68 .end = MB93090_USERROM_ADDR + MB93090_USERROM_SIZE - 1,
69 .flags = IORESOURCE_MEM,
70};
71
72static struct platform_device mb93090_userrom = {
73 .name = "physmap-flash",
74 .id = 1,
75 .dev.platform_data = &mb93090_userrom_data,
76 .num_resources = 1,
77 .resource = &mb93090_userrom_resource,
78};
79
80/*
81 * register the MB93090 flashes
82 */
83static int __init mb93090_mtd_init(void)
84{
85 platform_device_register(&mb93090_bootrom);
86 platform_device_register(&mb93090_userrom);
87 return 0;
88}
89
90module_init(mb93090_mtd_init);