Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27913
b: refs/heads/master
c: 92cbfdc
h: refs/heads/master
i:
  27911: db96e16
v: v3
  • Loading branch information
Joern Engel committed May 30, 2006
1 parent 9fff523 commit db23c0a
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e369d62e92d526a7ed641e2f0b2978fb0ce366c5
refs/heads/master: 92cbfdcc3661d7670b01b92b89811cd3a2412297
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/chips/map_ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static struct mtd_info *map_ram_probe(struct map_info *map)
map->fldrv = &mapram_chipdrv;
mtd->priv = map;
mtd->name = map->name;
mtd->type = MTD_RAM;
mtd->type = MTD_GENERIC_TYPE;
mtd->size = map->size;
mtd->erase = mapram_erase;
mtd->read = mapram_read;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/devices/block2mtd.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)

dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
dev->mtd.erasesize = erase_size;
dev->mtd.type = MTD_RAM;
dev->mtd.type = MTD_GENERIC_TYPE;
dev->mtd.flags = MTD_CAP_RAM;
dev->mtd.erase = block2mtd_erase;
dev->mtd.write = block2mtd_write;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/devices/ms02-nv.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static int __init ms02nv_init_one(ulong addr)
fixsize = (size - (fixaddr - addr)) & ~(PAGE_SIZE - 1);
mp->uaddr = phys_to_virt(fixaddr);

mtd->type = MTD_RAM;
mtd->type = MTD_GENERIC_TYPE;
mtd->flags = MTD_CAP_RAM;
mtd->size = fixsize;
mtd->name = (char *)ms02nv_name;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/devices/mtdram.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int mtdram_init_device(struct mtd_info *mtd, void *mapped_address,

/* Setup the MTD structure */
mtd->name = name;
mtd->type = MTD_RAM;
mtd->type = MTD_GENERIC_TYPE;
mtd->flags = MTD_CAP_RAM;
mtd->size = size;
mtd->erasesize = MTDRAM_ERASE_SIZE;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/devices/phram.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static int register_device(char *name, unsigned long start, unsigned long len)
new->mtd.read = phram_read;
new->mtd.write = phram_write;
new->mtd.owner = THIS_MODULE;
new->mtd.type = MTD_RAM;
new->mtd.type = MTD_GENERIC_TYPE;
new->mtd.erasesize = PAGE_SIZE;

ret = -EAGAIN;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/devices/pmc551.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ static int __init init_pmc551(void)
mtd->write = pmc551_write;
mtd->point = pmc551_point;
mtd->unpoint = pmc551_unpoint;
mtd->type = MTD_RAM;
mtd->type = MTD_GENERIC_TYPE;
mtd->name = "PMC551 RAM board";
mtd->erasesize = 0x10000;
mtd->owner = THIS_MODULE;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/devices/slram.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static int register_device(char *name, unsigned long start, unsigned long length
(*curmtd)->mtdinfo->read = slram_read;
(*curmtd)->mtdinfo->write = slram_write;
(*curmtd)->mtdinfo->owner = THIS_MODULE;
(*curmtd)->mtdinfo->type = MTD_RAM;
(*curmtd)->mtdinfo->type = MTD_GENERIC_TYPE;
(*curmtd)->mtdinfo->erasesize = SLRAM_BLK_SZ;

if (add_mtd_device((*curmtd)->mtdinfo)) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/mtdblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd)

mutex_init(&mtdblk->cache_mutex);
mtdblk->cache_state = STATE_EMPTY;
if (mtdblk->mtd->type != MTD_RAM && mtdblk->mtd->erasesize) {
if ( !(mtdblk->mtd->flags & MTD_NO_ERASE) && mtdblk->mtd->erasesize) {
mtdblk->cache_size = mtdblk->mtd->erasesize;
mtdblk->cache_data = NULL;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/mtd/mtd-abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ struct mtd_oob_buf {
};

#define MTD_ABSENT 0
#define MTD_RAM 1
#define MTD_NORFLASH 3
#define MTD_NANDFLASH 4
#define MTD_DATAFLASH 6
#define MTD_GENERIC_TYPE 7

#define MTD_WRITEABLE 0x400 /* Device is writeable */
#define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */
#define MTD_NO_ERASE 0x1000 /* No erase necessary */

// Some common devices / combinations of capabilities
#define MTD_CAP_ROM 0
#define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE)
#define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE)
#define MTD_CAP_NANDFLASH (MTD_WRITEABLE)

Expand Down

0 comments on commit db23c0a

Please sign in to comment.