* [U-Boot-Users] [PATCH] Fix duplicated flash state
@ 2008-07-22 8:09 Kyungmin Park
2008-07-23 23:10 ` [U-Boot-Users] unassigned-patches/4: " u-boot at bugs.denx.de
2008-07-24 7:43 ` [U-Boot-Users] " Fathi Boudra
0 siblings, 2 replies; 8+ messages in thread
From: Kyungmin Park @ 2008-07-22 8:09 UTC (permalink / raw)
To: u-boot
Move to one place
I just compiled test. Please check other NAND users.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 05ba375..ce9d937 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -19,6 +19,20 @@
#define MTD_ERASE_DONE 0x08
#define MTD_ERASE_FAILED 0x10
+/*
+ * Enumeration for NAND/OneNAND flash chip state
+ */
+enum {
+ FL_READY,
+ FL_READING,
+ FL_WRITING,
+ FL_ERASING,
+ FL_SYNCING,
+ FL_CACHEDPRG,
+ FL_UNLOCKING,
+ FL_LOCKING,
+};
+
/* If the erase fails, fail_addr might indicate exactly which block failed. If
fail_addr = 0xffffffff, the failure was not at the device level or was not
specific to any particular block. */
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index e2a25a6..0b64d3c 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -195,20 +195,6 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_
/* Nand scan has allocated data_buf */
#define NAND_DATABUF_ALLOC 0x80000000
-
-/*
- * nand_state_t - chip states
- * Enumeration for NAND flash chip state
- */
-typedef enum {
- FL_READY,
- FL_READING,
- FL_WRITING,
- FL_ERASING,
- FL_SYNCING,
- FL_CACHEDPRG,
-} nand_state_t;
-
/* Keep gcc happy */
struct nand_chip;
diff --git a/include/linux/mtd/nand_legacy.h b/include/linux/mtd/nand_legacy.h
index b05e726..bb66e45 100644
--- a/include/linux/mtd/nand_legacy.h
+++ b/include/linux/mtd/nand_legacy.h
@@ -55,18 +55,6 @@
#define NAND_CMD_RESET 0xff
/*
- * Enumeration for NAND flash chip state
- */
-typedef enum {
- FL_READY,
- FL_READING,
- FL_WRITING,
- FL_ERASING,
- FL_SYNCING
-} nand_state_t;
-
-
-/*
* NAND Private Flash Chip Data
*
* Structure overview:
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 4b0c2df..903c3af 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -17,6 +17,7 @@
/* Note: The header order is impoertant */
#include <onenand_uboot.h>
+#include <linux/mtd/compat.h>
#include <linux/mtd/bbm.h>
#define MAX_BUFFERRAM 2
@@ -28,20 +29,6 @@ extern int onenand_scan (struct mtd_info *mtd, int max_chips);
extern void onenand_release (struct mtd_info *mtd);
/**
- * onenand_state_t - chip states
- * Enumeration for OneNAND flash chip state
- */
-typedef enum {
- FL_READY,
- FL_READING,
- FL_WRITING,
- FL_ERASING,
- FL_SYNCING,
- FL_UNLOCKING,
- FL_LOCKING,
-} onenand_state_t;
-
-/**
* struct onenand_bufferram - OneNAND BufferRAM Data
* @param block block address in BufferRAM
* @param page page address in BufferRAM
@@ -106,7 +93,7 @@ struct onenand_chip {
spinlock_t chip_lock;
wait_queue_head_t wq;
- onenand_state_t state;
+ int state;
struct nand_oobinfo *autooob;
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot-Users] unassigned-patches/4: [PATCH] Fix duplicated flash state
2008-07-22 8:09 [U-Boot-Users] [PATCH] Fix duplicated flash state Kyungmin Park
@ 2008-07-23 23:10 ` u-boot at bugs.denx.de
2008-07-24 18:42 ` Scott Wood
2008-07-24 7:43 ` [U-Boot-Users] " Fathi Boudra
1 sibling, 1 reply; 8+ messages in thread
From: u-boot at bugs.denx.de @ 2008-07-23 23:10 UTC (permalink / raw)
To: u-boot
Move to one place
I just compiled test. Please check other NAND users.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
Added to GNATS database as unassigned-patches/4
>Responsible: patch-coord
>Message-Id: <20080722080919.GA14956@july>
>In-Reply-To:
>References:
>Patch-Date: Tue Jul 22 10:09:19 +0200 2008
---
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 05ba375..ce9d937 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -19,6 +19,20 @@
#define MTD_ERASE_DONE 0x08
#define MTD_ERASE_FAILED 0x10
+/*
+ * Enumeration for NAND/OneNAND flash chip state
+ */
+enum {
+ FL_READY,
+ FL_READING,
+ FL_WRITING,
+ FL_ERASING,
+ FL_SYNCING,
+ FL_CACHEDPRG,
+ FL_UNLOCKING,
+ FL_LOCKING,
+};
+
/* If the erase fails, fail_addr might indicate exactly which block failed. If
fail_addr = 0xffffffff, the failure was not at the device level or was not
specific to any particular block. */
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index e2a25a6..0b64d3c 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -195,20 +195,6 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_
/* Nand scan has allocated data_buf */
#define NAND_DATABUF_ALLOC 0x80000000
-
-/*
- * nand_state_t - chip states
- * Enumeration for NAND flash chip state
- */
-typedef enum {
- FL_READY,
- FL_READING,
- FL_WRITING,
- FL_ERASING,
- FL_SYNCING,
- FL_CACHEDPRG,
-} nand_state_t;
-
/* Keep gcc happy */
struct nand_chip;
diff --git a/include/linux/mtd/nand_legacy.h b/include/linux/mtd/nand_legacy.h
index b05e726..bb66e45 100644
--- a/include/linux/mtd/nand_legacy.h
+++ b/include/linux/mtd/nand_legacy.h
@@ -55,18 +55,6 @@
#define NAND_CMD_RESET 0xff
/*
- * Enumeration for NAND flash chip state
- */
-typedef enum {
- FL_READY,
- FL_READING,
- FL_WRITING,
- FL_ERASING,
- FL_SYNCING
-} nand_state_t;
-
-
-/*
* NAND Private Flash Chip Data
*
* Structure overview:
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 4b0c2df..903c3af 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -17,6 +17,7 @@
/* Note: The header order is impoertant */
#include <onenand_uboot.h>
+#include <linux/mtd/compat.h>
#include <linux/mtd/bbm.h>
#define MAX_BUFFERRAM 2
@@ -28,20 +29,6 @@ extern int onenand_scan (struct mtd_info *mtd, int max_chips);
extern void onenand_release (struct mtd_info *mtd);
/**
- * onenand_state_t - chip states
- * Enumeration for OneNAND flash chip state
- */
-typedef enum {
- FL_READY,
- FL_READING,
- FL_WRITING,
- FL_ERASING,
- FL_SYNCING,
- FL_UNLOCKING,
- FL_LOCKING,
-} onenand_state_t;
-
-/**
* struct onenand_bufferram - OneNAND BufferRAM Data
* @param block block address in BufferRAM
* @param page page address in BufferRAM
@@ -106,7 +93,7 @@ struct onenand_chip {
spinlock_t chip_lock;
wait_queue_head_t wq;
- onenand_state_t state;
+ int state;
struct nand_oobinfo *autooob;
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot-Users] [PATCH] Fix duplicated flash state
2008-07-22 8:09 [U-Boot-Users] [PATCH] Fix duplicated flash state Kyungmin Park
2008-07-23 23:10 ` [U-Boot-Users] unassigned-patches/4: " u-boot at bugs.denx.de
@ 2008-07-24 7:43 ` Fathi Boudra
2008-07-24 23:31 ` Kyungmin Park
1 sibling, 1 reply; 8+ messages in thread
From: Fathi Boudra @ 2008-07-24 7:43 UTC (permalink / raw)
To: u-boot
On Tue, Jul 22, 2008 at 10:09 AM, Kyungmin Park <kmpark@infradead.org>
wrote:
> Move to one place
> I just compiled test. Please check other NAND users.
>
>
It fails to build, redefinition of id:
jffs2_1pass.c: In function 'put_fl_mem':
jffs2_1pass.c:466: error: redefinition of 'id'
jffs2_1pass.c:459: error: previous definition of 'id' was here
Relevant piece of code:
static inline void put_fl_mem(void *buf)
{
#if defined(CONFIG_JFFS2_NAND) && \
defined(CONFIG_CMD_NAND)
struct mtdids *id = current_part->dev->id;
if (id->type == MTD_DEV_TYPE_NAND)
return put_fl_mem_nand(buf);
#endif
#if defined(CONFIG_CMD_ONENAND)
struct mtdids *id = current_part->dev->id;
if (id->type == MTD_DEV_TYPE_ONENAND)
return put_fl_mem_onenand(buf);
#endif
}
cheers,
Fathi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080724/ab442428/attachment.htm
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] unassigned-patches/4: [PATCH] Fix duplicated flash state
2008-07-23 23:10 ` [U-Boot-Users] unassigned-patches/4: " u-boot at bugs.denx.de
@ 2008-07-24 18:42 ` Scott Wood
0 siblings, 0 replies; 8+ messages in thread
From: Scott Wood @ 2008-07-24 18:42 UTC (permalink / raw)
To: u-boot
On Thu, Jul 24, 2008 at 01:10:02AM +0200, u-boot at bugs.denx.de wrote:
> diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
> index 4b0c2df..903c3af 100644
> --- a/include/linux/mtd/onenand.h
> +++ b/include/linux/mtd/onenand.h
> @@ -17,6 +17,7 @@
> /* Note: The header order is impoertant */
> #include <onenand_uboot.h>
>
> +#include <linux/mtd/compat.h>
Shouldn't this be <linux/mtd/mtd.h>?
Also, as this is not a regression fix (if it is, please say so
explicitly), please post a patch against the testing branch of
u-boot-nand-flash. For all NAND patches, please CC me, and include NAND
in the subject.
-Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] [PATCH] Fix duplicated flash state
2008-07-24 7:43 ` [U-Boot-Users] " Fathi Boudra
@ 2008-07-24 23:31 ` Kyungmin Park
2008-07-25 8:40 ` Fathi Boudra
0 siblings, 1 reply; 8+ messages in thread
From: Kyungmin Park @ 2008-07-24 23:31 UTC (permalink / raw)
To: u-boot
On Thu, Jul 24, 2008 at 4:43 PM, Fathi Boudra <fboudra@gmail.com> wrote:
> On Tue, Jul 22, 2008 at 10:09 AM, Kyungmin Park <kmpark@infradead.org>
> wrote:
>>
>> Move to one place
>> I just compiled test. Please check other NAND users.
>>
>
> It fails to build, redefinition of id:
> jffs2_1pass.c: In function 'put_fl_mem':
> jffs2_1pass.c:466: error: redefinition of 'id'
> jffs2_1pass.c:459: error: previous definition of 'id' was here
>
> Relevant piece of code:
>
> static inline void put_fl_mem(void *buf)
> {
> #if defined(CONFIG_JFFS2_NAND) && \
> defined(CONFIG_CMD_NAND)
> struct mtdids *id = current_part->dev->id;
>
> if (id->type == MTD_DEV_TYPE_NAND)
> return put_fl_mem_nand(buf);
> #endif
>
> #if defined(CONFIG_CMD_ONENAND)
> struct mtdids *id = current_part->dev->id;
>
> if (id->type == MTD_DEV_TYPE_ONENAND)
> return put_fl_mem_onenand(buf);
> #endif
> }
>
It's not this patch contents.
I'ts related with the previous patch "JFFS2 support on OneNAND"
Anyway, it should be below.
static inline void put_fl_mem(void *buf)
{
-#if defined(CONFIG_JFFS2_NAND) && \
- defined(CONFIG_CMD_NAND)
+#if (defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)) || \
+ defined(CONFIG_CMD_ONENAND)
struct mtdids *id = current_part->dev->id;
+#endif
+#if defined(CONFIG_JFFS2_NAND) && \
+ defined(CONFIG_CMD_NAND)
if (id->type == MTD_DEV_TYPE_NAND)
return put_fl_mem_nand(buf);
#endif
+
+#if defined(CONFIG_CMD_ONENAND)
+ if (id->type == MTD_DEV_TYPE_ONENAND)
+ return put_fl_mem_onenand(buf);
+#endif
Next time it will be clean-uped with next patches.
Thank you,
Kyungmin Park
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] [PATCH] Fix duplicated flash state
2008-07-24 23:31 ` Kyungmin Park
@ 2008-07-25 8:40 ` Fathi Boudra
2008-07-25 8:42 ` Fathi Boudra
0 siblings, 1 reply; 8+ messages in thread
From: Fathi Boudra @ 2008-07-25 8:40 UTC (permalink / raw)
To: u-boot
>
> It's not this patch contents.
>
I'ts related with the previous patch "JFFS2 support on OneNAND"
> Anyway, it should be below.
>
> static inline void put_fl_mem(void *buf)
> {
> -#if defined(CONFIG_JFFS2_NAND) && \
> - defined(CONFIG_CMD_NAND)
> +#if (defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)) || \
> + defined(CONFIG_CMD_ONENAND)
> struct mtdids *id = current_part->dev->id;
> +#endif
>
> +#if defined(CONFIG_JFFS2_NAND) && \
> + defined(CONFIG_CMD_NAND)
> if (id->type == MTD_DEV_TYPE_NAND)
> return put_fl_mem_nand(buf);
> #endif
> +
> +#if defined(CONFIG_CMD_ONENAND)
> + if (id->type == MTD_DEV_TYPE_ONENAND)
> + return put_fl_mem_onenand(buf);
> +#endif
>
> Next time it will be clean-uped with next patches.
>
nand_bbt_descr is duplicated:
In file included from /u-boot-1.3.3/include/linux/mtd/onenand.h:21,
from jffs2_1pass.c:279:
/u-boot-1.3.3/include/linux/mtd/bbm.h:49: error: redefinition of 'struct
nand_bbt_descr'
make[1]: *** [jffs2_1pass.o] Error 1
It is defined in iinclude/linux/mtd/bbm.h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080725/ebc3d331/attachment.htm
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] [PATCH] Fix duplicated flash state
2008-07-25 8:40 ` Fathi Boudra
@ 2008-07-25 8:42 ` Fathi Boudra
2008-07-25 8:52 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 8+ messages in thread
From: Fathi Boudra @ 2008-07-25 8:42 UTC (permalink / raw)
To: u-boot
sorry, mail sent too fast...
nand_bbt_desc structure is defined in include/linux/mtd/bbm.h and
iinclude/linux/mtd/nand.h
cheers,
Fathi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080725/177d8738/attachment.htm
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] [PATCH] Fix duplicated flash state
2008-07-25 8:42 ` Fathi Boudra
@ 2008-07-25 8:52 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-07-25 8:52 UTC (permalink / raw)
To: u-boot
Please stop to post in HTML.
Please post in text
Best Regards,
J.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-07-25 8:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-22 8:09 [U-Boot-Users] [PATCH] Fix duplicated flash state Kyungmin Park
2008-07-23 23:10 ` [U-Boot-Users] unassigned-patches/4: " u-boot at bugs.denx.de
2008-07-24 18:42 ` Scott Wood
2008-07-24 7:43 ` [U-Boot-Users] " Fathi Boudra
2008-07-24 23:31 ` Kyungmin Park
2008-07-25 8:40 ` Fathi Boudra
2008-07-25 8:42 ` Fathi Boudra
2008-07-25 8:52 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox