Commit 44f45994 authored by Amir Mahdi Ghorbanian's avatar Amir Mahdi Ghorbanian Committed by Miquel Raynal

mtd: onenand: omap2: Fix errors in style

Correct mispelling, spacing, and coding style flaws caught by
checkpatch.pl script in the Omap2 Onenand driver .
Signed-off-by: default avatarAmir Mahdi Ghorbanian <indigoomega021@gmail.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent 4aa906f1
...@@ -148,13 +148,13 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state) ...@@ -148,13 +148,13 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
unsigned long timeout; unsigned long timeout;
u32 syscfg; u32 syscfg;
if (state == FL_RESETING || state == FL_PREPARING_ERASE || if (state == FL_RESETTING || state == FL_PREPARING_ERASE ||
state == FL_VERIFYING_ERASE) { state == FL_VERIFYING_ERASE) {
int i = 21; int i = 21;
unsigned int intr_flags = ONENAND_INT_MASTER; unsigned int intr_flags = ONENAND_INT_MASTER;
switch (state) { switch (state) {
case FL_RESETING: case FL_RESETTING:
intr_flags |= ONENAND_INT_RESET; intr_flags |= ONENAND_INT_RESET;
break; break;
case FL_PREPARING_ERASE: case FL_PREPARING_ERASE:
...@@ -375,7 +375,7 @@ static int omap2_onenand_read_bufferram(struct mtd_info *mtd, int area, ...@@ -375,7 +375,7 @@ static int omap2_onenand_read_bufferram(struct mtd_info *mtd, int area,
* context fallback to PIO mode. * context fallback to PIO mode.
*/ */
if (!virt_addr_valid(buf) || bram_offset & 3 || (size_t)buf & 3 || if (!virt_addr_valid(buf) || bram_offset & 3 || (size_t)buf & 3 ||
count < 384 || in_interrupt() || oops_in_progress ) count < 384 || in_interrupt() || oops_in_progress)
goto out_copy; goto out_copy;
xtra = count & 3; xtra = count & 3;
...@@ -422,7 +422,7 @@ static int omap2_onenand_write_bufferram(struct mtd_info *mtd, int area, ...@@ -422,7 +422,7 @@ static int omap2_onenand_write_bufferram(struct mtd_info *mtd, int area,
* context fallback to PIO mode. * context fallback to PIO mode.
*/ */
if (!virt_addr_valid(buf) || bram_offset & 3 || (size_t)buf & 3 || if (!virt_addr_valid(buf) || bram_offset & 3 || (size_t)buf & 3 ||
count < 384 || in_interrupt() || oops_in_progress ) count < 384 || in_interrupt() || oops_in_progress)
goto out_copy; goto out_copy;
dma_src = dma_map_single(dev, buf, count, DMA_TO_DEVICE); dma_src = dma_map_single(dev, buf, count, DMA_TO_DEVICE);
...@@ -528,7 +528,8 @@ static int omap2_onenand_probe(struct platform_device *pdev) ...@@ -528,7 +528,8 @@ static int omap2_onenand_probe(struct platform_device *pdev)
c->gpmc_cs, c->phys_base, c->onenand.base, c->gpmc_cs, c->phys_base, c->onenand.base,
c->dma_chan ? "DMA" : "PIO"); c->dma_chan ? "DMA" : "PIO");
if ((r = onenand_scan(&c->mtd, 1)) < 0) r = onenand_scan(&c->mtd, 1);
if (r < 0)
goto err_release_dma; goto err_release_dma;
freq = omap2_onenand_get_freq(c->onenand.version_id); freq = omap2_onenand_get_freq(c->onenand.version_id);
......
...@@ -2853,7 +2853,7 @@ static int onenand_otp_write_oob_nolock(struct mtd_info *mtd, loff_t to, ...@@ -2853,7 +2853,7 @@ static int onenand_otp_write_oob_nolock(struct mtd_info *mtd, loff_t to,
/* Exit OTP access mode */ /* Exit OTP access mode */
this->command(mtd, ONENAND_CMD_RESET, 0, 0); this->command(mtd, ONENAND_CMD_RESET, 0, 0);
this->wait(mtd, FL_RESETING); this->wait(mtd, FL_RESETTING);
status = this->read_word(this->base + ONENAND_REG_CTRL_STATUS); status = this->read_word(this->base + ONENAND_REG_CTRL_STATUS);
status &= 0x60; status &= 0x60;
...@@ -2924,7 +2924,7 @@ static int do_otp_read(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -2924,7 +2924,7 @@ static int do_otp_read(struct mtd_info *mtd, loff_t from, size_t len,
/* Exit OTP access mode */ /* Exit OTP access mode */
this->command(mtd, ONENAND_CMD_RESET, 0, 0); this->command(mtd, ONENAND_CMD_RESET, 0, 0);
this->wait(mtd, FL_RESETING); this->wait(mtd, FL_RESETTING);
return ret; return ret;
} }
...@@ -2968,7 +2968,7 @@ static int do_otp_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -2968,7 +2968,7 @@ static int do_otp_write(struct mtd_info *mtd, loff_t to, size_t len,
/* Exit OTP access mode */ /* Exit OTP access mode */
this->command(mtd, ONENAND_CMD_RESET, 0, 0); this->command(mtd, ONENAND_CMD_RESET, 0, 0);
this->wait(mtd, FL_RESETING); this->wait(mtd, FL_RESETTING);
return ret; return ret;
} }
...@@ -3008,7 +3008,7 @@ static int do_otp_lock(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -3008,7 +3008,7 @@ static int do_otp_lock(struct mtd_info *mtd, loff_t from, size_t len,
/* Exit OTP access mode */ /* Exit OTP access mode */
this->command(mtd, ONENAND_CMD_RESET, 0, 0); this->command(mtd, ONENAND_CMD_RESET, 0, 0);
this->wait(mtd, FL_RESETING); this->wait(mtd, FL_RESETTING);
} else { } else {
ops.mode = MTD_OPS_PLACE_OOB; ops.mode = MTD_OPS_PLACE_OOB;
ops.ooblen = len; ops.ooblen = len;
...@@ -3413,7 +3413,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd) ...@@ -3413,7 +3413,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd)
this->boundary[die] = bdry & FLEXONENAND_PI_MASK; this->boundary[die] = bdry & FLEXONENAND_PI_MASK;
this->command(mtd, ONENAND_CMD_RESET, 0, 0); this->command(mtd, ONENAND_CMD_RESET, 0, 0);
this->wait(mtd, FL_RESETING); this->wait(mtd, FL_RESETTING);
printk(KERN_INFO "Die %d boundary: %d%s\n", die, printk(KERN_INFO "Die %d boundary: %d%s\n", die,
this->boundary[die], locked ? "(Locked)" : "(Unlocked)"); this->boundary[die], locked ? "(Locked)" : "(Unlocked)");
...@@ -3635,7 +3635,7 @@ static int flexonenand_set_boundary(struct mtd_info *mtd, int die, ...@@ -3635,7 +3635,7 @@ static int flexonenand_set_boundary(struct mtd_info *mtd, int die,
ret = this->wait(mtd, FL_WRITING); ret = this->wait(mtd, FL_WRITING);
out: out:
this->write_word(ONENAND_CMD_RESET, this->base + ONENAND_REG_COMMAND); this->write_word(ONENAND_CMD_RESET, this->base + ONENAND_REG_COMMAND);
this->wait(mtd, FL_RESETING); this->wait(mtd, FL_RESETTING);
if (!ret) if (!ret)
/* Recalculate device size on boundary change*/ /* Recalculate device size on boundary change*/
flexonenand_get_size(mtd); flexonenand_get_size(mtd);
...@@ -3671,7 +3671,7 @@ static int onenand_chip_probe(struct mtd_info *mtd) ...@@ -3671,7 +3671,7 @@ static int onenand_chip_probe(struct mtd_info *mtd)
/* Reset OneNAND to read default register values */ /* Reset OneNAND to read default register values */
this->write_word(ONENAND_CMD_RESET, this->base + ONENAND_BOOTRAM); this->write_word(ONENAND_CMD_RESET, this->base + ONENAND_BOOTRAM);
/* Wait reset */ /* Wait reset */
this->wait(mtd, FL_RESETING); this->wait(mtd, FL_RESETTING);
/* Restore system configuration 1 */ /* Restore system configuration 1 */
this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1); this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1);
......
...@@ -40,7 +40,7 @@ typedef enum { ...@@ -40,7 +40,7 @@ typedef enum {
FL_READING, FL_READING,
FL_CACHEDPRG, FL_CACHEDPRG,
/* These 4 come from onenand_state_t, which has been unified here */ /* These 4 come from onenand_state_t, which has been unified here */
FL_RESETING, FL_RESETTING,
FL_OTPING, FL_OTPING,
FL_PREPARING_ERASE, FL_PREPARING_ERASE,
FL_VERIFYING_ERASE, FL_VERIFYING_ERASE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment