All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Scharsig <js_at_ng@scharsoft.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [STATUS] v2009.08-rc3 is out
Date: Wed, 22 Dec 2010 10:29:41 +0100	[thread overview]
Message-ID: <4D11C505.1060703@scharsoft.de> (raw)
In-Reply-To: <20101221145030.180B1126EB19@gemini.denx.de>

Dear Wolfgang Denk,
> Can you please try and investigate the issue?
> 

I have parsed the code again and again. In result I found the problem in generated code.


By an Examble:

Source:

 
/* Setup Smart Media, first enable the address range of CS3 */
writel(readl(&mc->ebi.csa) | AT91_EBI_CSA_CS3A, &mc->ebi.csa);

/* RWH = 1 | RWS = 0 | TDF = 1 | NWS = 3 */
csr =	AT91_SMC_CSR_RWHOLD(1) | AT91_SMC_CSR_TDF(1) |
	AT91_SMC_CSR_NWS(3) |
	AT91_SMC_CSR_ACSS_STANDARD | AT91_SMC_CSR_DBW_8 |
	AT91_SMC_CSR_WSEN;
	writel(csr, &mc->smc.csr[3]);


4.2.2 (ELDK) generated code

0x23fdc698	<nand_hw_init>:		mvn	r2, #159	; 0x9f
0x23fdc698	<nand_hw_init+4>:	ldr	r3, [r2]
0x23fdc69c	<nand_hw_init+8>:	orr	r3, r3, #8
0x23fdc6a0	<nand_hw_init+12>:	str	r3, [r2]
0x23fdc6a4	<nand_hw_init+16>:	mvn	r3, #0
0x23fdc6a8	<nand_hw_init+20>:	ldrb	r2, [r3, #-131]	; 0x83
0x23fdc6ac	<nand_hw_init+24>:	mvn	r2, #124	; 0x7c
0x23fdc6b0	<nand_hw_init+28>:	strb	r2, [r3, #-131]	; 0x83
0x23fdc6b4	<nand_hw_init+32>:	ldrb	r2, [r3, #-130]	; 0x82
0x23fdc6b8	<nand_hw_init+36>:	mov	r2, #65	; 0x41
0x23fdc6bc	<nand_hw_init+40>:	strb	r2, [r3, #-130]	; 0x82
0x23fdc6c0	<nand_hw_init+44>:	ldrb	r2, [r3, #-129]	; 0x81
0x23fdc6c4	<nand_hw_init+48>:	mov	r2, #0
0x23fdc6c8	<nand_hw_init+52>:	strb	r2, [r3, #-129]	; 0x81
0x23fdc6cc	<nand_hw_init+56>:	mov	r0, #16
0x23fdc6d0	<nand_hw_init+60>:	ldrb	r2, [r3, #-128]	; 0x80
0x23fdc6d4	<nand_hw_init+64>:	strb	r0, [r3, #-128]	; 0x80


4.5.1 (buildroot)  generated code

0x23fdc308	<nand_hw_init>:		mvn	r3, #159	; 0x9f
0x23fdc30c	<nand_hw_init+4>:	ldr	r2, [r3]
0x23fdc310	<nand_hw_init+8>:	orr	r2, r2, #8
0x23fdc314	<nand_hw_init+12>:	str	r2, [r3]
0x23fdc318	<nand_hw_init+16>:	ldr	r2, [pc, #76]	; 0x23fdc36c <nand_hw_init+100>
0x23fdc31c	<nand_hw_init+20>:	add	r3, r3, #28
0x23fdc320	<nand_hw_init+24>:	str	r2, [r3]

In fact, the 4.2.2 code does access byte wise to soc (AT91) control registers, but should write data as an single word.

But I have no idea to prevent this.

Best regards

Jens Scharsig

  parent reply	other threads:[~2010-12-22  9:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-22 21:41 [U-Boot] [STATUS] v2009.08-rc3 is out Wolfgang Denk
2009-08-22 23:08 ` Mike Frysinger
2009-08-23 20:21   ` Wolfgang Denk
2010-12-21 14:36 ` Jens Scharsig
2010-12-21 14:50   ` Wolfgang Denk
2010-12-21 18:04     ` Jens Scharsig
2010-12-22  9:29     ` Jens Scharsig [this message]
2010-12-22  9:37       ` Jens Scharsig
2010-12-22 10:00       ` Reinhard Meyer
2010-12-22 10:50         ` Jens Scharsig
2010-12-22  9:41     ` Jens Scharsig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D11C505.1060703@scharsoft.de \
    --to=js_at_ng@scharsoft.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.