[U-Boot] Question about ARM compiler optimization problem

Hello, everyone.
Currently, I'm working on ARM922T-based board.(In fact, U-Boot is already ported on that board, Kendin/Micrel KS8695P.)
While, modifying configuration to fit on my new board, I found that /drivers/mtd/cfi_flash.c is not properly working when -Os optimization flag is applied.
In function flash_toggle(), following code always gets same result.
retval = flash_read??(addr) != flash_read??(addr);
When I re-compiled this code with -O0 option, it works well. even -O1 or -O2 is not helpful.
I think that is not so clean way to be done, is there any way to overcome this behaviour?
Following is my test environment.
gcc : 3.4.4 / 4.2.1 arm-linux toolchain - used for uClinux, distributed by http://www.snapgear.org/
Processor : ARM922T Micrel KS8695P
NOR Flash : STMicro M29W640FT (64Mbit 16bit buswidth)
Regards,
Choe, Hyun-ho

In cpu dir, there is arm920t/ks8695. ks8695p is some modified chip from ks8695.
In board section, OpenGear cm4008 and cm41xx uses ks8695.
2008-11-20 (목), 18:45 +0100, Jean-Christophe PLAGNIOL-VILLARD 쓰시길:
On 01:27 Fri 21 Nov , Choe, Hyun-ho wrote:
Hello, everyone.
Currently, I'm working on ARM922T-based board.(In fact, U-Boot is already ported on that board, Kendin/Micrel KS8695P.)
what version of U-Boot? I do not found your board in the mainline
Best Regards, J.

On 02:59 Fri 21 Nov , Choe, Hyun-ho wrote:
In cpu dir, there is arm920t/ks8695. ks8695p is some modified chip from ks8695.
do this modification is U-Boot mainline supported?
In board section, OpenGear cm4008 and cm41xx uses ks8695.
could give the board configuration? make xxxx_config
Best Regards, J.

Hi.
2008-11-20 (목), 19:02 +0100, Jean-Christophe PLAGNIOL-VILLARD 쓰시길:
On 02:59 Fri 21 Nov , Choe, Hyun-ho wrote:
In cpu dir, there is arm920t/ks8695. ks8695p is some modified chip from ks8695.
do this modification is U-Boot mainline supported?
I think so, but, there is some confusion in Linux machine type & other stuff.(MACH_TYPE:180 = KS8695, MACH_TYPE:363 = KS8695P)
I am not a Micrel guy, but AFAIK, there is some similar KS8695 family chips.
1. Original KS8695 : Built-in 5 MAC/PHY + 1 External MAC interface 2. KS8695X : Built-in 5 MAC/PHY + PCI bus(1 device supported) 3. KS8695P " Built-in 5 MAC/PHY + PCI bus(up to 3 devices supported)
But, all these three chips use the same core(ARM922T), and the same core & system clock, register address spaces, so I think there is no need to add additional chip type.
In fact, I could adapt U-Boot with few minor changes from existing configuration. I just only changed SDRAM & FLASH registers to fit to my board.
In board section, OpenGear cm4008 and cm41xx uses ks8695.
could give the board configuration? make xxxx_config
Do you mean the contents of include/configs/xxx.h file? or entire patch I approved? To submitting my patch takes some time to me for fixing up my source code, but you may try 'make cm4008_config' or 'make cm41xx_config' for quick testing.
BTW, I think, my original question is not related to the misconfiguration of board, but to ARM compiler optimization. Isn't there anyone suffer similar problem on ARM platform?
Best Regards, J.
participants (2)
-
Choe, Hyun-ho
-
Jean-Christophe PLAGNIOL-VILLARD