[U-Boot] U-Boot Digest, Vol 9, Issue 49

null jimmy9696 at 163.com
Thu Feb 5 13:34:52 CET 2009


how can i download a bin file into nand flash in windows xp?


在2009-02-05,u-boot-request at lists.denx.de 写道:

Send U-Boot mailing list submissions to
	u-boot at lists.denx.de

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.denx.de/mailman/listinfo/u-boot
or, via email, send a message with subject or body 'help' to
	u-boot-request at lists.denx.de

You can reach the person managing the list at
	u-boot-owner at lists.denx.de

When replying, please edit your Subject line so it is more specific
than "Re: Contents of U-Boot digest..."


Today's Topics:

   1. Re: [PATCH 3/9] i.MX31: support GPIO as a chip-select in the
      mxc_spi driver (Guennadi Liakhovetski)
   2. Re: [PATCH 4/9] A driver for the S6E63D6 SPI display
      controller from Samsung (Guennadi Liakhovetski)
   3. Re: [PATCH 1/2] flash/cfi_flash: Use virtual sector start
      address, not phys (Stefan Roese)
   4. [PATCH] cfi_flash: Silence compilation warning (Stefan Roese)
   5. Re: [PATCH 4/9] A driver for the S6E63D6 SPI display
      controller from Samsung (Guennadi Liakhovetski)
   6. Re: [PATCH 1/2] flash/cfi_flash: Use virtual sector start
      address, not phys (Stefan Roese)
   7. [PATCH] cfi_flash: Fix typo in cfi_flash.c (Stefan Roese)
   8. [cfi-flash] Please pull
      git://www.denx.de/git/u-boot-cfi-flash.git (Stefan Roese)
   9. Re: [PATCH 9/9] ARM: add an "eet" variant of the
      imx31_phycore board (Guennadi Liakhovetski)


----------------------------------------------------------------------

Message: 1
Date: Thu, 5 Feb 2009 11:03:53 +0100 (CET)
From: Guennadi Liakhovetski <lg at denx.de>
Subject: Re: [U-Boot] [PATCH 3/9] i.MX31: support GPIO as a
	chip-select in the mxc_spi driver
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
Cc: U-Boot at lists.denx.de
Message-ID: <Pine.LNX.4.64.0902051102120.5553 at axis700.grange>
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Wed, 4 Feb 2009, Jean-Christophe PLAGNIOL-VILLARD wrote:

> On 17:59 Wed 04 Feb     , Guennadi Liakhovetski wrote:
> >  
> > +	/*
> > +	 * Some SPI devices require active chip-select over multiple
> > +	 * transactions, we achieve this using a GPIO. Still, the SPI
> > +	 * controller has to be configured to use one of its own chipselects.
> > +	 * To use this feature you have to call spi_setup_slave() with
> > +	 * cs = internal_cs | (gpio << 8), and you have to use some unused
> > +	 * on this SPI controller cs between 0 and 3.
> > +	 */
> > +	if (cs > 3) {
> > +		mxcs->gpio = cs >> 8;
> > +		cs &= 3;
> > +		mx31_gpio_direction(mxcs->gpio, MX31_GPIO_DIRECTION_OUT);
> > +	} else
> > +		mxcs->gpio = -1;
> > +
> why not add a callback for the chipselect instead
> as example if you have to use a gpio extender it will simplest to implent
> instead of hack the SPI driver

and how shall I pass this callback to

struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
			unsigned int max_hz, unsigned int mode)

?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


------------------------------

Message: 2
Date: Thu, 5 Feb 2009 11:19:38 +0100 (CET)
From: Guennadi Liakhovetski <lg at denx.de>
Subject: Re: [U-Boot] [PATCH 4/9] A driver for the S6E63D6 SPI display
	controller from Samsung
To: Anatolij Gustschin <agust at denx.de>
Cc: U-Boot at lists.denx.de
Message-ID: <Pine.LNX.4.64.0902051117020.5553 at axis700.grange>
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Wed, 4 Feb 2009, Anatolij Gustschin wrote:

> Hi Guennadi,
> 
> > +struct s6e63d6 {
> > +	unsigned int bus;
> > +	unsigned int cs;
> > +	struct spi_slave *slave;
> > +};
> 
> could we use "bus" and "cs" from struct spi_slave? "struct spi_slave"
> declares them already. Maybe we should drop struct s6e63d6 entirely and use
> struct spi_slave instead?

No, cs and bus here are input parameters, set up by the caller to 
s6e63d6_init() and used by the latter to setup the SPI-slave. slave is 
driver-"private" field, the caller doesn't need to know what is under 
s6e63d6.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


------------------------------

Message: 3
Date: Thu, 5 Feb 2009 11:25:16 +0100
From: Stefan Roese <sr at denx.de>
Subject: Re: [U-Boot] [PATCH 1/2] flash/cfi_flash: Use virtual sector
	start	address, not phys
To: u-boot at lists.denx.de
Message-ID: <200902051125.16237.sr at denx.de>
Content-Type: text/plain;  charset="iso-8859-1"

On Monday 02 February 2009, Becky Bruce wrote:
> include/flash.h was commented to say that the address in
> flash_info->start was a physical address.  However, from u-boot's
> point of view, and looking at most flash code, it makes more
> sense for this to be a virtual address.  So I corrected the
> comment to indicate that this was a virtual address.
>
> The only flash driver that was actually treating the address
> as physical was the mtd/cfi_flash driver.  However, this code
> was using it inconsistently as it actually directly dereferenced
> the "start" element, while it used map_physmem to get a
> virtual address in other places.  I changed this driver so
> that the code which initializes the info->start field calls
> map_physmem to get a virtual address, eliminating the need for
> further map_physmem calls.  The code is now consistent.
>
> The *only* place a physical address should be used is when defining the
> flash banks list that is used to initialize the flash_info struct,
> usually found in the board config file.

Applied to cfi-flash/master. Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


------------------------------

Message: 4
Date: Thu,  5 Feb 2009 11:26:42 +0100
From: Stefan Roese <sr at denx.de>
Subject: [U-Boot] [PATCH] cfi_flash: Silence compilation warning
To: u-boot at lists.denx.de
Message-ID: <1233829602-10031-1-git-send-email-sr at denx.de>

Patch "flash/cfi_flash: Use virtual sector start address, not phys"
introduced a small compilation warning. This patch fixes it.

Signed-off-by: Stefan Roese <sr at denx.de>
---
 drivers/mtd/cfi_flash.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 4cb5fb5..3a8f8e4 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -879,7 +879,7 @@ static int flash_write_cfibuffer (flash_info_t * info, ulong dest, uchar * cp,
 	int cnt;
 	int retcode;
 	void *src = cp;
-	void *dst = dest;
+	void *dst = (void *)dest;
 	void *dst2 = dst;
 	int flag = 0;
 	uint offset = 0;
-- 
1.6.1.2



------------------------------

Message: 5
Date: Thu, 5 Feb 2009 11:33:58 +0100 (CET)
From: Guennadi Liakhovetski <lg at denx.de>
Subject: Re: [U-Boot] [PATCH 4/9] A driver for the S6E63D6 SPI display
	controller from Samsung
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
Cc: U-Boot at lists.denx.de
Message-ID: <Pine.LNX.4.64.0902051131450.5553 at axis700.grange>
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Wed, 4 Feb 2009, Jean-Christophe PLAGNIOL-VILLARD wrote:

> On 17:59 Wed 04 Feb     , Guennadi Liakhovetski wrote:
> > +
> > +/*
> > + * Each transfer is performed as:
> > + * 1. chip-select active
> > + * 2. send 8-bit start code
> > + * 3. send 16-bit data
> > + * 4. chip-select inactive
> > + */
> > +static int send_word(struct spi_slave *spi, u8 rs, u16 data)
> > +{
> > +	u32 buf8 = 0x70 | ID | (rs & 2);
> why?

That's how the start byte looks like:

01110<ID><RS><R/W>

rs is 0 for index or 1 for data, and R/W is 0 for write.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


------------------------------

Message: 6
Date: Thu, 5 Feb 2009 11:42:45 +0100
From: Stefan Roese <sr at denx.de>
Subject: Re: [U-Boot] [PATCH 1/2] flash/cfi_flash: Use virtual sector
	start	address, not phys
To: Kumar Gala <galak at kernel.crashing.org>
Cc: U-Boot List <u-boot at lists.denx.de>
Message-ID: <200902051142.45680.sr at denx.de>
Content-Type: text/plain;  charset="iso-8859-1"

On Tuesday 03 February 2009, Kumar Gala wrote:
> On Feb 3, 2009, at 2:53 AM, Pieter wrote:
> >> static inline void flash_unmap(flash_info_t *info, flash_sect_t sect,
> >> 		unsigned int offset, void *addr)
> >> {
> >> -	unsigned int byte_offset = offset * info->portwidth;
> >> -
> >> -	unmap_physmem(addr, flash_sector_size(info, sect) - byte_offset);
> >> }
> >
> > <snip>
> >
> > Since "flash_unmap(flash_info_t *info, flash_sect_t sect,unsigned
> > int offset, void *addr)" function is empty after applying the patch,
> > should all function calls in the /drivers/mtd/cfi_flash.c file not
> > also be removed?
> >
> > cheers pieter
>
> I think its best to leave them alone for now.  If in the future we
> really think flash_unmap isn't going to get called we can remove
> them.  Stefan?

Fine with me.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


------------------------------

Message: 7
Date: Thu,  5 Feb 2009 11:45:30 +0100
From: Stefan Roese <sr at denx.de>
Subject: [U-Boot] [PATCH] cfi_flash: Fix typo in cfi_flash.c
To: u-boot at lists.denx.de
Message-ID: <1233830730-12262-1-git-send-email-sr at denx.de>

Patch "flash/cfi_flash: Use virtual sector start address, not phys"
introduced a small typo and compilation warning for systems with CFI
legacy support (e.g. hcu4). This patch fixes it.

Signed-off-by: Stefan Roese <sr at denx.de>
---
 drivers/mtd/cfi_flash.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 3a8f8e4..bdfad98 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -1622,7 +1622,7 @@ static int flash_detect_legacy(phys_addr_t base, int banknum)
 				info->vendor = modes[i];
 				info->start[0] =
 					(ulong)map_physmem(base,
-							   info->portwith,
+							   info->portwidth,
 							   MAP_NOCACHE);
 				if (info->portwidth == FLASH_CFI_8BIT
 					&& info->interface == FLASH_CFI_X8X16) {
@@ -1640,7 +1640,7 @@ static int flash_detect_legacy(phys_addr_t base, int banknum)
 				if (jedec_flash_match(info, info->start[0]))
 					break;
 				else
-					unmap_physmem(info->start[0],
+					unmap_physmem((void *)info->start[0],
 						      MAP_NOCACHE);
 			}
 		}
-- 
1.6.1.2



------------------------------

Message: 8
Date: Thu, 5 Feb 2009 11:49:45 +0100
From: Stefan Roese <sr at denx.de>
Subject: [U-Boot] [cfi-flash] Please pull
	git://www.denx.de/git/u-boot-cfi-flash.git
To: "U-Boot-Users" <u-boot at lists.denx.de>
Message-ID: <200902051149.45244.sr at denx.de>
Content-Type: text/plain;  charset="utf-8"

The following changes since commit 9d8811c5bd2b7dd6307742cf22fbdb7953b6f816:
  Wolfgang Denk (1):
        Merge branch 'master' of git://git.denx.de/u-boot-usb

are available in the git repository at:

  git://www.denx.de/git/u-boot-cfi-flash.git master

Becky Bruce (1):
      flash/cfi_flash: Use virtual sector start address, not phys

Stefan Roese (3):
      cfi_flash: Silence compilation warning
      jedec_flash: Only use manufacturer defines from common flash.h
      cfi_flash: Fix typo in cfi_flash.c

 drivers/mtd/cfi_flash.c   |   53 ++++++++++++++++++++------------------------
 drivers/mtd/jedec_flash.c |   16 +++++--------
 include/flash.h           |    2 +-
 3 files changed, 31 insertions(+), 40 deletions(-)


------------------------------

Message: 9
Date: Thu, 5 Feb 2009 11:51:20 +0100 (CET)
From: Guennadi Liakhovetski <lg at denx.de>
Subject: Re: [U-Boot] [PATCH 9/9] ARM: add an "eet" variant of the
	imx31_phycore board
To: Wolfgang Denk <wd at denx.de>
Cc: U-Boot at lists.denx.de
Message-ID: <Pine.LNX.4.64.0902051149390.5553 at axis700.grange>
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Wed, 4 Feb 2009, Wolfgang Denk wrote:

> Dear Guennadi Liakhovetski,
> 
> In message <Pine.LNX.4.64.0902042316110.6279 at axis700.grange> you wrote:
> >
> > > > +#ifdef BOARD_LATE_INIT
> > > CONFIG_?
> > 
> > grep?:
> > 
> > $ grep -r BOARD_LATE_INIT lib*
> > lib_arm/board.c:#ifdef BOARD_LATE_INIT
> > lib_nios2/board.c:#if defined(CONFIG_BOARD_LATE_INIT)
> > lib_sh/board.c:#ifdef BOARD_LATE_INIT
> > lib_sparc/board.c:#if defined(CONFIG_BOARD_LATE_INIT)
> 
> Good idea to search - so you can fix the other occurances, too.

This is outside of the scope of this patch series, so, I'll put it on my 
todo.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


------------------------------

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


End of U-Boot Digest, Vol 9, Issue 49
*************************************



More information about the U-Boot mailing list