mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
mtd: Add MTD concat support to concatenate multiple MTD NOR devices
This patch adds concatenation support to the U-Boot MTD infrastructure. By enabling CONFIG_MTD_CONCAT this MTD CFI wrapper will concatenate all found NOR devices into one single MTD device. This can be used by e.g by UBI to access a partition that spans over multiple NOR chips. Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
55e0ed6078
commit
0a57265533
5 changed files with 915 additions and 5 deletions
|
@ -19,11 +19,15 @@
|
|||
|
||||
#define kmalloc(size, flags) malloc(size)
|
||||
#define kzalloc(size, flags) calloc(size, 1)
|
||||
#define vmalloc(size) malloc(size)
|
||||
#define kfree(ptr) free(ptr)
|
||||
#define vfree(ptr) free(ptr)
|
||||
#define vmalloc(size) malloc(size)
|
||||
#define kfree(ptr) free(ptr)
|
||||
#define vfree(ptr) free(ptr)
|
||||
|
||||
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
#define DECLARE_WAITQUEUE(...) do { } while (0)
|
||||
#define add_wait_queue(...) do { } while (0)
|
||||
#define remove_wait_queue(...) do { } while (0)
|
||||
|
||||
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
||||
/*
|
||||
* ..and if you can't take the strict
|
||||
|
|
21
include/linux/mtd/concat.h
Normal file
21
include/linux/mtd/concat.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* MTD device concatenation layer definitions
|
||||
*
|
||||
* (C) 2002 Robert Kaiser <rkaiser@sysgo.de>
|
||||
*
|
||||
* This code is GPL
|
||||
*/
|
||||
|
||||
#ifndef MTD_CONCAT_H
|
||||
#define MTD_CONCAT_H
|
||||
|
||||
|
||||
struct mtd_info *mtd_concat_create(
|
||||
struct mtd_info *subdev[], /* subdevices to concatenate */
|
||||
int num_devs, /* number of subdevices */
|
||||
const char *name); /* name for the new device */
|
||||
|
||||
void mtd_concat_destroy(struct mtd_info *mtd);
|
||||
|
||||
#endif
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue