diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2005-08-08 01:03:24 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2005-08-08 01:03:24 +0200 |
commit | 700a0c648df72f2c8e0589c0d0470b5ffd7cab7b (patch) | |
tree | 819928504de4b8fc80e632fa5c485204fd7542a7 /board/mpc8260ads | |
parent | 452e8e72ada5141f58008a902e1d4be42ce15abb (diff) | |
download | u-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/mpc8260ads')
-rw-r--r-- | board/mpc8260ads/flash.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/board/mpc8260ads/flash.c b/board/mpc8260ads/flash.c index b2e9df2..59997aa 100644 --- a/board/mpc8260ads/flash.c +++ b/board/mpc8260ads/flash.c @@ -490,59 +490,3 @@ int flash_real_protect(flash_info_t *info, long sector, int prot) return rc; } - -/*----------------------------------------------------------------------- - * Support for flash file system (JFFS2) - * - * We use custom partition info function because we have to fit the - * file system image between first sector (containing hard reset - * configuration word) and the sector containing U-Boot image. Standard - * partition info function does not allow for last sector specification - * and assumes that the file system occupies flash bank up to and - * including bank's last sector. - */ -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CFG_JFFS_CUSTOM_PART) - -#ifndef CFG_JFFS2_FIRST_SECTOR -#define CFG_JFFS2_FIRST_SECTOR 0 -#endif -#ifndef CFG_JFFS2_FIRST_BANK -#define CFG_JFFS2_FIRST_BANK 0 -#endif -#ifndef CFG_JFFS2_NUM_BANKS -#define CFG_JFFS2_NUM_BANKS 1 -#endif -#define CFG_JFFS2_LAST_BANK (CFG_JFFS2_FIRST_BANK + CFG_JFFS2_NUM_BANKS - 1) - -#include <jffs2/jffs2.h> - -static struct part_info partition; - -struct part_info *jffs2_part_info(int part_num) -{ - int i; - - if (part_num == 0) { - if (partition.usr_priv == 0) { - partition.offset = - (unsigned char *) flash_info[CFG_JFFS2_FIRST_BANK].start[CFG_JFFS2_FIRST_SECTOR]; - for (i = CFG_JFFS2_FIRST_BANK; i <= CFG_JFFS2_LAST_BANK; i++) - partition.size += flash_info[i].size; - partition.size -= - flash_info[CFG_JFFS2_FIRST_BANK].start[CFG_JFFS2_FIRST_SECTOR] - - flash_info[CFG_JFFS2_FIRST_BANK].start[0]; -#ifdef CFG_JFFS2_LAST_SECTOR - i = flash_info[CFG_JFFS2_LAST_BANK].sector_count - 1; - partition.size -= - flash_info[CFG_JFFS2_LAST_BANK].start[i] - - flash_info[CFG_JFFS2_LAST_BANK].start[CFG_JFFS2_LAST_SECTOR]; -#endif - - partition.usr_priv = (void *)1; - } - return &partition; - } - return 0; -} - -#endif /* JFFS2 */ |