Skip to contentSkip to conversation

mflash : Fix some style issue

PATCH New unsik Kim 2 participants 4 messages Feb 17, 2009 – Apr 3, 2009 Block layer

lore
Share & tools
lore

unsik Kim

author
#0 lore raw

PATCH 1/3 mflash : Fix some style issue

---
  common/env_mgdisk.c     |    2 ++
  drivers/block/mg_disk.c |   13 +++++--------
  2 files changed, 7 insertions(+), 8 deletions(-)
common/env_mgdisk.c +2 -0
index 2b4949f..363ee68 100644
@@ -72,11 +72,13 @@ OUT:
  int saveenv(void)
  {
  	unsigned int err;
+
  	env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE);
  	err = mg_disk_write(CONFIG_ENV_ADDR, (u_char *)env_ptr,
  			CONFIG_ENV_SIZE);
  	if (err)
  		puts ("*** Warning - mg_disk_write error\n\n");
+
  	return err;
  }
 
drivers/block/mg_disk.c +5 -8
index 193a441..9ae8889 100644
@@ -28,8 +28,6 @@
  #include <asm/io.h>
  #include "mg_disk_prv.h"
 
-#ifdef CONFIG_CMD_MG_DISK
-
  #ifndef CONFIG_MG_DISK_RES
  #define CONFIG_MG_DISK_RES	0
  #endif
@@ -116,11 +114,11 @@ static void mg_ident_cpy (unsigned char *dst, unsigned char *src,
  		goto OUT;
 
  	/* skip leading white space */
-	while ((*src) && (src<end) && (*src==' '))
+	while ((*src) && (src < end) && (*src == ' '))
  		++src;
 
  	/* copy string, omitting trailing white space */
-	while ((*src) && (src<end)) {
+	while ((*src) && (src < end)) {
  		*dst++ = *src;
  		if (*src++ != ' ')
  			last = dst;
@@ -278,9 +276,9 @@ static unsigned int mg_out(unsigned int sect_num,
  {
  	u32 err = MG_ERR_NONE;
 
-	if ((err = mg_wait(MG_STAT_READY, 3000))) {
+	err = mg_wait(MG_STAT_READY, 3000);
+	if (err)
  		return err;
-	}
 
  	writeb((u8)sect_cnt, MG_BASE + MG_REG_SECT_CNT);
  	writeb((u8)sect_num, MG_BASE + MG_REG_SECT_NUM);
@@ -289,6 +287,7 @@ static unsigned int mg_out(unsigned int sect_num,
  	writeb((u8)((sect_num >> 24) | MG_REG_HEAD_LBA_MODE),
  		MG_BASE + MG_REG_DRV_HEAD);
  	writeb(cmd, MG_BASE + MG_REG_COMMAND);
+
  	return err;
  }
 
@@ -631,5 +630,3 @@ unsigned int mg_disk_init (void)
 
  	return err;
  }
-
-#endif /* CONFIG_CMD_MG_DISK */
Signature · 1 line
1.5.6.6
#1 lore raw

PATCH 1/3 mflash : Fix some style issue

Dear unsik Kim,

Quoted 5 lines · In message <[email protected]> you wrote:
---
  common/env_mgdisk.c     |    2 ++
  drivers/block/mg_disk.c |   13 +++++--------
  2 files changed, 7 insertions(+), 8 deletions(-)

Since your original patch did not make it in yet, it is probably best when you squash and rebase your whole patch series, and resubmit then Thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
This is an unauthorized cybernetic announcement.
#3 lore raw

PATCH 1/3 mflash : Fix some style issue

Dear unsik Kim,

Quoted 42 lines · In message <[email protected]> you wrote:

From 53292a06d57fcd93fa508c5c698bca5b60a19691 Mon Sep 17 00:00:00 2001
From: unsik Kim <[email protected]>
Date: Wed, 18 Feb 2009 14:31:49 +0900
Subject: [PATCH 09/13] Initial mflash support

Mflash is fusion memory device mainly targeted consumer eletronic and mobile phone.
Internally, it have nand flash and other hardware logics and supports some different operation (ATA, IO, XIP) modes.

IO mode is custom mode for the host that doesn't have IDE interface. (Many mobile targeted SoC doesn't have IDE bus)

This driver support mflash IO mode.

Followings are brief descriptions about IO mode.

1. IO mode based on ATA protocol and uses some custom command. (read confirm, write confirm)
2. IO mode uses SRAM bus interface.

---
 common/Makefile             |    2 +
 common/cmd_mgdisk.c         |   76 ++++++
 common/cmd_nvedit.c         |    8 +-
 common/env_mgdisk.c         |   92 +++++++
 disk/part.c                 |    8 +-
 disk/part_amiga.c           |    5 +-
 disk/part_dos.c             |    1 +
 disk/part_efi.c             |    1 +
 disk/part_iso.c             |    1 +
 disk/part_mac.c             |    1 +
 doc/README.mflash           |   94 +++++++
 drivers/block/Makefile      |    5 +-
 drivers/block/mg_disk.c     |  582 +++++++++++++++++++++++++++++++++++++++++++
 drivers/block/mg_disk_prv.h |  145 +++++++++++
 fs/fat/fat.c                |    2 +
 include/config_cmd_all.h    |    1 +
 include/environment.h       |   12 +
 include/mg_disk.h           |   51 ++++
Quoted 8 lines
 include/part.h              |    1 +
 19 files changed, 1080 insertions(+), 8 deletions(-)
 create mode 100644 common/cmd_mgdisk.c
 create mode 100644 common/env_mgdisk.c
 create mode 100644 doc/README.mflash
 create mode 100644 drivers/block/mg_disk.c
 create mode 100644 drivers/block/mg_disk_prv.h
 create mode 100644 include/mg_disk.h

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 8 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
In a business, marketroids, salespukes, and  lawyers  have  different
goals from those who actually do work and produce something. Usually,
is  is the former who triumph over the latter, due to the simple rule
that those who print the money make the rules.
         -- Tom Christiansen in <[email protected]>