public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH][AT91] DataFlash: AT45DB021 fix and AT45DB081 support
@ 2008-08-08  6:19 Sergey Lapin
  2008-08-08  6:30 ` Sergey Lapin
  0 siblings, 1 reply; 8+ messages in thread
From: Sergey Lapin @ 2008-08-08  6:19 UTC (permalink / raw)
  To: u-boot

Fix for page size of AT45DB021. Also adding bigger AT45DB081
which comes with some newer boards.

Signed-off-by: Sergey Lapin <slapin@ossfans.org>
---
 drivers/mtd/dataflash.c |   15 ++++++++++++++-
 include/dataflash.h     |    3 ++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c
index 0ad48cd..049da69 100644
--- a/drivers/mtd/dataflash.c
+++ b/drivers/mtd/dataflash.c
@@ -56,7 +56,7 @@ int AT91F_DataflashInit (void)
 		switch (dfcode) {
 		case AT45DB021:
 			dataflash_info[i].Device.pages_number = 1024;
-			dataflash_info[i].Device.pages_size = 263;
+			dataflash_info[i].Device.pages_size = 264;
 			dataflash_info[i].Device.page_offset = 9;
 			dataflash_info[i].Device.byte_mask = 0x300;
 			dataflash_info[i].Device.cs = cs[i].cs;
@@ -65,6 +65,19 @@ int AT91F_DataflashInit (void)
 			dataflash_info[i].id = dfcode;
 			found[i] += dfcode;;
 			break;
+
+		case AT45DB081:
+			dataflash_info[i].Device.pages_number = 4096;
+			dataflash_info[i].Device.pages_size = 264;
+			dataflash_info[i].Device.page_offset = 9;
+			dataflash_info[i].Device.byte_mask = 0x300;
+			dataflash_info[i].Device.cs = cs[i].cs;
+			dataflash_info[i].Desc.DataFlash_state = IDLE;
+			dataflash_info[i].logical_address = cs[i].addr;
+			dataflash_info[i].id = dfcode;
+			found[i] += dfcode;;
+			break;
+
 		case AT45DB161:
 			dataflash_info[i].Device.pages_number = 4096;
 			dataflash_info[i].Device.pages_size = 528;
diff --git a/include/dataflash.h b/include/dataflash.h
index 11e5188..d75d9b6 100644
--- a/include/dataflash.h
+++ b/include/dataflash.h
@@ -135,6 +135,7 @@ struct dataflash_addr {
 	int cs;
 };
 /*-------------------------------------------------------------------------------------------------*/
+#define AT45DB081	0x24
 #define AT45DB161	0x2c
 #define AT45DB021	0x14
 #define AT45DB321	0x34
-- 
1.5.4.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH][AT91] DataFlash: AT45DB021 fix and AT45DB081 support
  2008-08-08  6:19 [U-Boot] [PATCH][AT91] DataFlash: AT45DB021 fix and AT45DB081 support Sergey Lapin
@ 2008-08-08  6:30 ` Sergey Lapin
  2008-08-08  9:29   ` Wolfgang Denk
  2008-08-08 20:31   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 2 replies; 8+ messages in thread
From: Sergey Lapin @ 2008-08-08  6:30 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 08, 2008 at 10:19:24AM +0400, Sergey Lapin wrote:
> Fix for page size of AT45DB021. Also adding bigger AT45DB081
> which comes with some newer boards.
> 
> Signed-off-by: Sergey Lapin <slapin@ossfans.org>
> ---
>  drivers/mtd/dataflash.c |   15 ++++++++++++++-
>  include/dataflash.h     |    3 ++-
>  2 files changed, 16 insertions(+), 2 deletions(-)

Also - is it possible to include this into 1.3.4?


Thanks a lot,
S.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH][AT91] DataFlash: AT45DB021 fix and AT45DB081 support
  2008-08-08  6:30 ` Sergey Lapin
@ 2008-08-08  9:29   ` Wolfgang Denk
  2008-08-08 20:31   ` Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2008-08-08  9:29 UTC (permalink / raw)
  To: u-boot

In message <20080808063012.GA3716@fan.ossfans.org> you wrote:
> On Fri, Aug 08, 2008 at 10:19:24AM +0400, Sergey Lapin wrote:
> > Fix for page size of AT45DB021. Also adding bigger AT45DB081
> > which comes with some newer boards.
> > 
> > Signed-off-by: Sergey Lapin <slapin@ossfans.org>
> > ---
> >  drivers/mtd/dataflash.c |   15 ++++++++++++++-
> >  include/dataflash.h     |    3 ++-
> >  2 files changed, 16 insertions(+), 2 deletions(-)
> 
> Also - is it possible to include this into 1.3.4?

If you manage to push the AT91 custodian to send a pull request in
time - sure :-)

Best regards,

Wolfgang Denk

-- 
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
"Free markets select for winning solutions."        - Eric S. Raymond

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH][AT91] DataFlash: AT45DB021 fix and AT45DB081 support
  2008-08-08  6:30 ` Sergey Lapin
  2008-08-08  9:29   ` Wolfgang Denk
@ 2008-08-08 20:31   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-08-08 21:37     ` Sergey Lapin
  2008-08-08 21:39     ` [U-Boot] [PATCH][AT91][Re-submit] " Sergey Lapin
  1 sibling, 2 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-08-08 20:31 UTC (permalink / raw)
  To: u-boot

On 10:30 Fri 08 Aug     , Sergey Lapin wrote:
> On Fri, Aug 08, 2008 at 10:19:24AM +0400, Sergey Lapin wrote:
> > Fix for page size of AT45DB021. Also adding bigger AT45DB081
> > which comes with some newer boards.
> > 
> > Signed-off-by: Sergey Lapin <slapin@ossfans.org>
> > ---
> >  drivers/mtd/dataflash.c |   15 ++++++++++++++-
> >  include/dataflash.h     |    3 ++-
> >  2 files changed, 16 insertions(+), 2 deletions(-)
> 
> Also - is it possible to include this into 1.3.4?
> 
DataFlash: AT45DB021 fix and AT45DB081 support

Fix for page size of AT45DB021. Also adding bigger AT45DB081
which comes with some newer boards.

Signed-off-by: Sergey Lapin <slapin@ossfans.org>
--------------------------
Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all y
Applying DataFlash: AT45DB021 fix and AT45DB081 support
error: patch failed: include/dataflash.h:135
error: include/dataflash.h: patch does not apply
Patch failed at 0003.

Please rebase your patch against current HEAD

Best Regards,
J.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH][AT91] DataFlash: AT45DB021 fix and AT45DB081 support
  2008-08-08 20:31   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-08-08 21:37     ` Sergey Lapin
  2008-08-08 22:35       ` Jean-Christophe PLAGNIOL-VILLARD
  2008-08-08 21:39     ` [U-Boot] [PATCH][AT91][Re-submit] " Sergey Lapin
  1 sibling, 1 reply; 8+ messages in thread
From: Sergey Lapin @ 2008-08-08 21:37 UTC (permalink / raw)
  To: u-boot

From: Sergey Lapin <slapin@slind.org>

Fix for page size of AT45DB021. Also adding bigger AT45DB081
which comes with some newer boards.

Signed-off-by: Sergey Lapin <slapin@ossfans.org>
---
 drivers/mtd/dataflash.c |   15 ++++++++++++++-
 include/dataflash.h     |    2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c
index 0ad48cd..049da69 100644
--- a/drivers/mtd/dataflash.c
+++ b/drivers/mtd/dataflash.c
@@ -56,7 +56,7 @@ int AT91F_DataflashInit (void)
 		switch (dfcode) {
 		case AT45DB021:
 			dataflash_info[i].Device.pages_number = 1024;
-			dataflash_info[i].Device.pages_size = 263;
+			dataflash_info[i].Device.pages_size = 264;
 			dataflash_info[i].Device.page_offset = 9;
 			dataflash_info[i].Device.byte_mask = 0x300;
 			dataflash_info[i].Device.cs = cs[i].cs;
@@ -65,6 +65,19 @@ int AT91F_DataflashInit (void)
 			dataflash_info[i].id = dfcode;
 			found[i] += dfcode;;
 			break;
+
+		case AT45DB081:
+			dataflash_info[i].Device.pages_number = 4096;
+			dataflash_info[i].Device.pages_size = 264;
+			dataflash_info[i].Device.page_offset = 9;
+			dataflash_info[i].Device.byte_mask = 0x300;
+			dataflash_info[i].Device.cs = cs[i].cs;
+			dataflash_info[i].Desc.DataFlash_state = IDLE;
+			dataflash_info[i].logical_address = cs[i].addr;
+			dataflash_info[i].id = dfcode;
+			found[i] += dfcode;;
+			break;
+
 		case AT45DB161:
 			dataflash_info[i].Device.pages_number = 4096;
 			dataflash_info[i].Device.pages_size = 528;
diff --git a/include/dataflash.h b/include/dataflash.h
index 11e5188..3d44d55 100644
--- a/include/dataflash.h
+++ b/include/dataflash.h
@@ -135,9 +135,9 @@ struct dataflash_addr {
 	int cs;
 };
 /*-------------------------------------------------------------------------------------------------*/
-
 #define AT45DB161	0x2c
 #define AT45DB021	0x14
+#define AT45DB081	0x24
 #define AT45DB321	0x34
 #define AT45DB642	0x3c
 #define AT45DB128	0x10
-- 
1.5.4.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH][AT91][Re-submit] DataFlash: AT45DB021 fix and AT45DB081 support
  2008-08-08 20:31   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-08-08 21:37     ` Sergey Lapin
@ 2008-08-08 21:39     ` Sergey Lapin
  1 sibling, 0 replies; 8+ messages in thread
From: Sergey Lapin @ 2008-08-08 21:39 UTC (permalink / raw)
  To: u-boot

Fix for page size of AT45DB021. Also adding bigger AT45DB081
which comes with some newer boards.

Signed-off-by: Sergey Lapin <slapin@ossfans.org>
---
 drivers/mtd/dataflash.c |   15 ++++++++++++++-
 include/dataflash.h     |    2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c
index 0ad48cd..049da69 100644
--- a/drivers/mtd/dataflash.c
+++ b/drivers/mtd/dataflash.c
@@ -56,7 +56,7 @@ int AT91F_DataflashInit (void)
 		switch (dfcode) {
 		case AT45DB021:
 			dataflash_info[i].Device.pages_number = 1024;
-			dataflash_info[i].Device.pages_size = 263;
+			dataflash_info[i].Device.pages_size = 264;
 			dataflash_info[i].Device.page_offset = 9;
 			dataflash_info[i].Device.byte_mask = 0x300;
 			dataflash_info[i].Device.cs = cs[i].cs;
@@ -65,6 +65,19 @@ int AT91F_DataflashInit (void)
 			dataflash_info[i].id = dfcode;
 			found[i] += dfcode;;
 			break;
+
+		case AT45DB081:
+			dataflash_info[i].Device.pages_number = 4096;
+			dataflash_info[i].Device.pages_size = 264;
+			dataflash_info[i].Device.page_offset = 9;
+			dataflash_info[i].Device.byte_mask = 0x300;
+			dataflash_info[i].Device.cs = cs[i].cs;
+			dataflash_info[i].Desc.DataFlash_state = IDLE;
+			dataflash_info[i].logical_address = cs[i].addr;
+			dataflash_info[i].id = dfcode;
+			found[i] += dfcode;;
+			break;
+
 		case AT45DB161:
 			dataflash_info[i].Device.pages_number = 4096;
 			dataflash_info[i].Device.pages_size = 528;
diff --git a/include/dataflash.h b/include/dataflash.h
index 11e5188..3d44d55 100644
--- a/include/dataflash.h
+++ b/include/dataflash.h
@@ -135,9 +135,9 @@ struct dataflash_addr {
 	int cs;
 };
 /*-------------------------------------------------------------------------------------------------*/
-
 #define AT45DB161	0x2c
 #define AT45DB021	0x14
+#define AT45DB081	0x24
 #define AT45DB321	0x34
 #define AT45DB642	0x3c
 #define AT45DB128	0x10
-- 
1.5.4.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH][AT91] DataFlash: AT45DB021 fix and AT45DB081 support
  2008-08-08 21:37     ` Sergey Lapin
@ 2008-08-08 22:35       ` Jean-Christophe PLAGNIOL-VILLARD
  2008-08-09 20:12         ` Sergey Lapin
  0 siblings, 1 reply; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-08-08 22:35 UTC (permalink / raw)
  To: u-boot

On 01:37 Sat 09 Aug     , Sergey Lapin wrote:
> From: Sergey Lapin <slapin@slind.org>
> 
> Fix for page size of AT45DB021. Also adding bigger AT45DB081
> which comes with some newer boards.
> 
> Signed-off-by: Sergey Lapin <slapin@ossfans.org>
> ---
>  drivers/mtd/dataflash.c |   15 ++++++++++++++-
>  include/dataflash.h     |    2 +-
>  2 files changed, 15 insertions(+), 2 deletions(-)
> 
Applied to u-boot-at91 

Best Regards,
J.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH][AT91] DataFlash: AT45DB021 fix and AT45DB081 support
  2008-08-08 22:35       ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-08-09 20:12         ` Sergey Lapin
  0 siblings, 0 replies; 8+ messages in thread
From: Sergey Lapin @ 2008-08-09 20:12 UTC (permalink / raw)
  To: u-boot

On Sat, Aug 09, 2008 at 12:35:29AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 01:37 Sat 09 Aug     , Sergey Lapin wrote:
> > From: Sergey Lapin <slapin@slind.org>
> > 
> > Fix for page size of AT45DB021. Also adding bigger AT45DB081
> > which comes with some newer boards.
> > 
> > Signed-off-by: Sergey Lapin <slapin@ossfans.org>
> > ---
> >  drivers/mtd/dataflash.c |   15 ++++++++++++++-
> >  include/dataflash.h     |    2 +-
> >  2 files changed, 15 insertions(+), 2 deletions(-)
> > 
> Applied to u-boot-at91 

Thanks a lot!

S.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-08-09 20:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08  6:19 [U-Boot] [PATCH][AT91] DataFlash: AT45DB021 fix and AT45DB081 support Sergey Lapin
2008-08-08  6:30 ` Sergey Lapin
2008-08-08  9:29   ` Wolfgang Denk
2008-08-08 20:31   ` Jean-Christophe PLAGNIOL-VILLARD
2008-08-08 21:37     ` Sergey Lapin
2008-08-08 22:35       ` Jean-Christophe PLAGNIOL-VILLARD
2008-08-09 20:12         ` Sergey Lapin
2008-08-08 21:39     ` [U-Boot] [PATCH][AT91][Re-submit] " Sergey Lapin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox