aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-12-11 10:33:30 -0500
committerRalf Baechle <ralf@linux-mips.org>2006-12-11 20:46:24 -0500
commitb228f4c54df37b53c6f364aa7f3efa4280bcc4f0 (patch)
tree7f5f481ff4e772a926641359981226e048bbcf47
parent2efac77e82a36bf616d474f2eb721d95543cfae9 (diff)
[MIPS] Malta: Resurrect MTD support for onboard flash.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/configs/malta_defconfig80
-rw-r--r--arch/mips/mips-boards/malta/Makefile2
-rw-r--r--arch/mips/mips-boards/malta/malta_setup.c39
3 files changed, 80 insertions, 41 deletions
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index 1f9300f37f52..96e941084c04 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -644,7 +644,85 @@ CONFIG_CONNECTOR=m
644# 644#
645# Memory Technology Devices (MTD) 645# Memory Technology Devices (MTD)
646# 646#
647# CONFIG_MTD is not set 647CONFIG_MTD=y
648# CONFIG_MTD_DEBUG is not set
649# CONFIG_MTD_CONCAT is not set
650CONFIG_MTD_PARTITIONS=y
651# CONFIG_MTD_REDBOOT_PARTS is not set
652# CONFIG_MTD_CMDLINE_PARTS is not set
653
654#
655# User Modules And Translation Layers
656#
657CONFIG_MTD_CHAR=y
658CONFIG_MTD_BLOCK=y
659# CONFIG_FTL is not set
660# CONFIG_NFTL is not set
661# CONFIG_INFTL is not set
662# CONFIG_RFD_FTL is not set
663# CONFIG_SSFDC is not set
664
665#
666# RAM/ROM/Flash chip drivers
667#
668CONFIG_MTD_CFI=y
669# CONFIG_MTD_JEDECPROBE is not set
670CONFIG_MTD_GEN_PROBE=y
671# CONFIG_MTD_CFI_ADV_OPTIONS is not set
672CONFIG_MTD_MAP_BANK_WIDTH_1=y
673CONFIG_MTD_MAP_BANK_WIDTH_2=y
674CONFIG_MTD_MAP_BANK_WIDTH_4=y
675# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
676# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
677# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
678CONFIG_MTD_CFI_I1=y
679CONFIG_MTD_CFI_I2=y
680# CONFIG_MTD_CFI_I4 is not set
681# CONFIG_MTD_CFI_I8 is not set
682CONFIG_MTD_CFI_INTELEXT=y
683CONFIG_MTD_CFI_AMDSTD=y
684CONFIG_MTD_CFI_STAA=y
685CONFIG_MTD_CFI_UTIL=y
686# CONFIG_MTD_RAM is not set
687# CONFIG_MTD_ROM is not set
688# CONFIG_MTD_ABSENT is not set
689# CONFIG_MTD_OBSOLETE_CHIPS is not set
690
691#
692# Mapping drivers for chip access
693#
694# CONFIG_MTD_COMPLEX_MAPPINGS is not set
695CONFIG_MTD_PHYSMAP=y
696CONFIG_MTD_PHYSMAP_START=0x0
697CONFIG_MTD_PHYSMAP_LEN=0x0
698CONFIG_MTD_PHYSMAP_BANKWIDTH=0
699# CONFIG_MTD_PLATRAM is not set
700
701#
702# Self-contained MTD device drivers
703#
704# CONFIG_MTD_PMC551 is not set
705# CONFIG_MTD_SLRAM is not set
706# CONFIG_MTD_PHRAM is not set
707# CONFIG_MTD_MTDRAM is not set
708# CONFIG_MTD_BLOCK2MTD is not set
709
710#
711# Disk-On-Chip Device Drivers
712#
713# CONFIG_MTD_DOC2000 is not set
714# CONFIG_MTD_DOC2001 is not set
715# CONFIG_MTD_DOC2001PLUS is not set
716
717#
718# NAND Flash Device Drivers
719#
720# CONFIG_MTD_NAND is not set
721
722#
723# OneNAND Flash Device Drivers
724#
725# CONFIG_MTD_ONENAND is not set
648 726
649# 727#
650# Parallel port support 728# Parallel port support
diff --git a/arch/mips/mips-boards/malta/Makefile b/arch/mips/mips-boards/malta/Makefile
index 77ee5c6d33c1..b662c75fb28e 100644
--- a/arch/mips/mips-boards/malta/Makefile
+++ b/arch/mips/mips-boards/malta/Makefile
@@ -19,5 +19,5 @@
19# under Linux. 19# under Linux.
20# 20#
21 21
22obj-y := malta_int.o malta_setup.o 22obj-y := malta_int.o malta_mtd.o malta_setup.o
23obj-$(CONFIG_SMP) += malta_smp.o 23obj-$(CONFIG_SMP) += malta_smp.o
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index 282f3e52eea3..56ea76679cd4 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -21,13 +21,6 @@
21#include <linux/pci.h> 21#include <linux/pci.h>
22#include <linux/screen_info.h> 22#include <linux/screen_info.h>
23 23
24#ifdef CONFIG_MTD
25#include <linux/mtd/partitions.h>
26#include <linux/mtd/physmap.h>
27#include <linux/mtd/mtd.h>
28#include <linux/mtd/map.h>
29#endif
30
31#include <asm/cpu.h> 24#include <asm/cpu.h>
32#include <asm/bootinfo.h> 25#include <asm/bootinfo.h>
33#include <asm/irq.h> 26#include <asm/irq.h>
@@ -58,30 +51,6 @@ struct resource standard_io_resources[] = {
58 { .name = "dma2", .start = 0xc0, .end = 0xdf, .flags = IORESOURCE_BUSY }, 51 { .name = "dma2", .start = 0xc0, .end = 0xdf, .flags = IORESOURCE_BUSY },
59}; 52};
60 53
61#ifdef CONFIG_MTD
62static struct mtd_partition malta_mtd_partitions[] = {
63 {
64 .name = "YAMON",
65 .offset = 0x0,
66 .size = 0x100000,
67 .mask_flags = MTD_WRITEABLE
68 },
69 {
70 .name = "User FS",
71 .offset = 0x100000,
72 .size = 0x2e0000
73 },
74 {
75 .name = "Board Config",
76 .offset = 0x3e0000,
77 .size = 0x020000,
78 .mask_flags = MTD_WRITEABLE
79 }
80};
81
82#define number_partitions (sizeof(malta_mtd_partitions)/sizeof(struct mtd_partition))
83#endif
84
85const char *get_system_type(void) 54const char *get_system_type(void)
86{ 55{
87 return "MIPS Malta"; 56 return "MIPS Malta";
@@ -211,14 +180,6 @@ void __init plat_mem_setup(void)
211#endif 180#endif
212#endif 181#endif
213 182
214#ifdef CONFIG_MTD
215 /*
216 * Support for MTD on Malta. Use the generic physmap driver
217 */
218 physmap_configure(0x1e000000, 0x400000, 4, NULL);
219 physmap_set_partitions(malta_mtd_partitions, number_partitions);
220#endif
221
222 mips_reboot_setup(); 183 mips_reboot_setup();
223 184
224 board_time_init = mips_time_init; 185 board_time_init = mips_time_init;