summaryrefslogtreecommitdiff
path: root/board/mx1fs2
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-08-08 01:03:24 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-08-08 01:03:24 +0200
commit700a0c648df72f2c8e0589c0d0470b5ffd7cab7b (patch)
tree819928504de4b8fc80e632fa5c485204fd7542a7 /board/mx1fs2
parent452e8e72ada5141f58008a902e1d4be42ce15abb (diff)
downloadu-boot-imx-700a0c648df72f2c8e0589c0d0470b5ffd7cab7b.zip
u-boot-imx-700a0c648df72f2c8e0589c0d0470b5ffd7cab7b.tar.gz
u-boot-imx-700a0c648df72f2c8e0589c0d0470b5ffd7cab7b.tar.bz2
Add common (with Linux) MTD partition scheme and "mtdparts" command
Old, obsolete and duplicated code was cleaned up and replace by the new partitioning method. There are two possible approaches now: * define a single, static partition * use mtdparts command line option and dynamic partitioning Default is static partitioning.
Diffstat (limited to 'board/mx1fs2')
-rw-r--r--board/mx1fs2/flash.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/board/mx1fs2/flash.c b/board/mx1fs2/flash.c
index 3a79a9e..3806310 100644
--- a/board/mx1fs2/flash.c
+++ b/board/mx1fs2/flash.c
@@ -25,10 +25,6 @@
#include <common.h>
-#if defined CFG_JFFS_CUSTOM_PART
-#include <jffs2/jffs2.h>
-#endif
-
#define FLASH_BANK_SIZE MX1FS2_FLASH_BANK_SIZE
#define MAIN_SECT_SIZE MX1FS2_FLASH_SECT_SIZE
@@ -70,67 +66,6 @@ static int write_word_amd(flash_info_t * info, FPWV * dest, FPW data);
static void flash_sync_real_protect(flash_info_t * info);
#endif
-#if defined CFG_JFFS_CUSTOM_PART
-
-/**
- * jffs2_part_info - get information about a JFFS2 partition
- *
- * @part_num: number of the partition you want to get info about
- * @return: struct part_info* in case of success, 0 if failure
- */
-
-static struct part_info part;
-static int current_part = -1;
-
-struct part_info *
-jffs2_part_info(int part_num)
-{
- void *jffs2_priv_saved = part.jffs2_priv;
-
- printf("jffs2_part_info: part_num=%i\n", part_num);
-
- if (current_part == part_num)
- return &part;
-
- /* rootfs */
- if (part_num == 0) {
- memset(&part, 0, sizeof (part));
-
- part.offset = (char *) MX1FS2_JFFS2_PART0_START;
- part.size = MX1FS2_JFFS2_PART0_SIZE;
-
- /* Mark the struct as ready */
- current_part = part_num;
-
- printf("part.offset = 0x%08x\n", (unsigned int) part.offset);
- printf("part.size = 0x%08x\n", (unsigned int) part.size);
- }
-
- /* userfs */
- if (part_num == 1) {
- memset(&part, 0, sizeof (part));
-
- part.offset = (char *) MX1FS2_JFFS2_PART1_START;
- part.size = MX1FS2_JFFS2_PART1_SIZE;
-
- /* Mark the struct as ready */
- current_part = part_num;
-
- printf("part.offset = 0x%08x\n", (unsigned int) part.offset);
- printf("part.size = 0x%08x\n", (unsigned int) part.size);
- }
-
- if (current_part == part_num) {
- part.usr_priv = &current_part;
- part.jffs2_priv = jffs2_priv_saved;
- return &part;
- }
-
- printf("jffs2_part_info: end of partition table\n");
- return 0;
-}
-#endif /* CFG_JFFS_CUSTOM_PART */
-
/*-----------------------------------------------------------------------
* flash_init()
*