Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 492e1501 authored by Mika Korhonen's avatar Mika Korhonen Committed by David Woodhouse
Browse files
parent bc8cec0d
Loading
Loading
Loading
Loading
+10 −10
Original line number Original line Diff line number Diff line
@@ -1191,7 +1191,7 @@ static int onenand_read_ops_nolock(struct mtd_info *mtd, loff_t from,
 			/*
 			/*
 			 * Chip boundary handling in DDP
 			 * Chip boundary handling in DDP
 			 * Now we issued chip 1 read and pointed chip 1
 			 * Now we issued chip 1 read and pointed chip 1
 			 * bufferam so we have to point chip 0 bufferam.
			 * bufferram so we have to point chip 0 bufferram.
 			 */
 			 */
 			if (ONENAND_IS_DDP(this) &&
 			if (ONENAND_IS_DDP(this) &&
 			    unlikely(from == (this->chipsize >> 1))) {
 			    unlikely(from == (this->chipsize >> 1))) {
@@ -1867,8 +1867,8 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
			ONENAND_SET_NEXT_BUFFERRAM(this);
			ONENAND_SET_NEXT_BUFFERRAM(this);


		/*
		/*
		 * 2 PLANE, MLC, and Flex-OneNAND doesn't support
		 * 2 PLANE, MLC, and Flex-OneNAND do not support
		 * write-while-programe feature.
		 * write-while-program feature.
		 */
		 */
		if (!ONENAND_IS_2PLANE(this) && !first) {
		if (!ONENAND_IS_2PLANE(this) && !first) {
			ONENAND_SET_PREV_BUFFERRAM(this);
			ONENAND_SET_PREV_BUFFERRAM(this);
@@ -1879,7 +1879,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
			onenand_update_bufferram(mtd, prev, !ret && !prev_subpage);
			onenand_update_bufferram(mtd, prev, !ret && !prev_subpage);
			if (ret) {
			if (ret) {
				written -= prevlen;
				written -= prevlen;
				printk(KERN_ERR "onenand_write_ops_nolock: write filaed %d\n", ret);
				printk(KERN_ERR "onenand_write_ops_nolock: write failed %d\n", ret);
				break;
				break;
			}
			}


@@ -1905,7 +1905,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
			/* In partial page write we don't update bufferram */
			/* In partial page write we don't update bufferram */
			onenand_update_bufferram(mtd, to, !ret && !subpage);
			onenand_update_bufferram(mtd, to, !ret && !subpage);
			if (ret) {
			if (ret) {
				printk(KERN_ERR "onenand_write_ops_nolock: write filaed %d\n", ret);
				printk(KERN_ERR "onenand_write_ops_nolock: write failed %d\n", ret);
				break;
				break;
			}
			}


@@ -2201,7 +2201,7 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
	/* Grab the lock and see if the device is available */
	/* Grab the lock and see if the device is available */
	onenand_get_device(mtd, FL_ERASING);
	onenand_get_device(mtd, FL_ERASING);


	/* Loop throught the pages */
	/* Loop through the blocks */
	instr->state = MTD_ERASING;
	instr->state = MTD_ERASING;


	while (len) {
	while (len) {
@@ -2328,7 +2328,7 @@ static int onenand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
        if (bbm->bbt)
        if (bbm->bbt)
                bbm->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1);
                bbm->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1);


        /* We write two bytes, so we dont have to mess with 16 bit access */
        /* We write two bytes, so we don't have to mess with 16-bit access */
        ofs += mtd->oobsize + (bbm->badblockpos & ~0x01);
        ofs += mtd->oobsize + (bbm->badblockpos & ~0x01);
	/* FIXME : What to do when marking SLC block in partition
	/* FIXME : What to do when marking SLC block in partition
	 * 	   with MLC erasesize? For now, it is not advisable to
	 * 	   with MLC erasesize? For now, it is not advisable to
@@ -2557,7 +2557,7 @@ static void onenand_unlock_all(struct mtd_info *mtd)


#ifdef CONFIG_MTD_ONENAND_OTP
#ifdef CONFIG_MTD_ONENAND_OTP


/* Interal OTP operation */
/* Internal OTP operation */
typedef int (*otp_op_t)(struct mtd_info *mtd, loff_t form, size_t len,
typedef int (*otp_op_t)(struct mtd_info *mtd, loff_t form, size_t len,
		size_t *retlen, u_char *buf);
		size_t *retlen, u_char *buf);


@@ -2921,7 +2921,7 @@ static void onenand_check_features(struct mtd_info *mtd)
		this->options |= ONENAND_HAS_2PLANE;
		this->options |= ONENAND_HAS_2PLANE;


	case ONENAND_DEVICE_DENSITY_2Gb:
	case ONENAND_DEVICE_DENSITY_2Gb:
		/* 2Gb DDP don't have 2 plane */
		/* 2Gb DDP does not have 2 plane */
		if (!ONENAND_IS_DDP(this))
		if (!ONENAND_IS_DDP(this))
			this->options |= ONENAND_HAS_2PLANE;
			this->options |= ONENAND_HAS_2PLANE;
		this->options |= ONENAND_HAS_UNLOCK_ALL;
		this->options |= ONENAND_HAS_UNLOCK_ALL;
@@ -3364,7 +3364,7 @@ static int onenand_probe(struct mtd_info *mtd)
	/* It's real page size */
	/* It's real page size */
	this->writesize = mtd->writesize;
	this->writesize = mtd->writesize;


	/* REVIST: Multichip handling */
	/* REVISIT: Multichip handling */


	if (FLEXONENAND(this))
	if (FLEXONENAND(this))
		flexonenand_get_size(mtd);
		flexonenand_get_size(mtd);