1 /* Flash mappings for the MB93090-MB00 motherboard
3 * Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
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.
12 #include <linux/module.h>
13 #include <linux/platform_device.h>
14 #include <linux/mtd/partitions.h>
15 #include <linux/mtd/physmap.h>
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)
23 * default MTD partition table for both main flash devices, expected to be
24 * overridden by RedBoot
26 static struct mtd_partition mb93090_partitions
[] = {
29 .size
= MTDPART_SIZ_FULL
,
35 * Definition of the MB93090 Boot ROM (on the CPU card)
37 static struct physmap_flash_data mb93090_bootrom_data
= {
40 .parts
= mb93090_partitions
,
43 static struct resource mb93090_bootrom_resource
= {
44 .start
= MB93090_BOOTROM_ADDR
,
45 .end
= MB93090_BOOTROM_ADDR
+ MB93090_BOOTROM_SIZE
- 1,
46 .flags
= IORESOURCE_MEM
,
49 static struct platform_device mb93090_bootrom
= {
50 .name
= "physmap-flash",
52 .dev
.platform_data
= &mb93090_bootrom_data
,
54 .resource
= &mb93090_bootrom_resource
,
58 * Definition of the MB93090 User ROM definition (on the motherboard)
60 static struct physmap_flash_data mb93090_userrom_data
= {
63 .parts
= mb93090_partitions
,
66 static struct resource mb93090_userrom_resource
= {
67 .start
= MB93090_USERROM_ADDR
,
68 .end
= MB93090_USERROM_ADDR
+ MB93090_USERROM_SIZE
- 1,
69 .flags
= IORESOURCE_MEM
,
72 static struct platform_device mb93090_userrom
= {
73 .name
= "physmap-flash",
75 .dev
.platform_data
= &mb93090_userrom_data
,
77 .resource
= &mb93090_userrom_resource
,
81 * register the MB93090 flashes
83 static int __init
mb93090_mtd_init(void)
85 platform_device_register(&mb93090_bootrom
);
86 platform_device_register(&mb93090_userrom
);
90 module_init(mb93090_mtd_init
);