spi-topcliff-pch: Fix issue for transmitting over 4KByte
[zen-stable.git] / arch / frv / mb93090-mb00 / flash.c
blobc0e3707c2299bae3f4cb5cf1a1c7ded959f361e9
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/init.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[] = {
28 .name = "Filesystem",
29 .size = MTDPART_SIZ_FULL,
30 .offset = 0,
35 * Definition of the MB93090 Boot ROM (on the CPU card)
37 static struct physmap_flash_data mb93090_bootrom_data = {
38 .width = 2,
39 .nr_parts = 2,
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",
51 .id = 0,
52 .dev.platform_data = &mb93090_bootrom_data,
53 .num_resources = 1,
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 = {
61 .width = 2,
62 .nr_parts = 2,
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",
74 .id = 1,
75 .dev.platform_data = &mb93090_userrom_data,
76 .num_resources = 1,
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);
87 return 0;
90 module_init(mb93090_mtd_init);