Skip to contentSkip to conversation

cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); not workin

DISCUSSION Vikram Mehta 3 participants 4 messages Jun 3, 2003 – Jun 4, 2003 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi joern,
Thanx
I agree this format was confusing. So let me put it simply

in cfi_probe.c in cfi_probe_chip function

cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); Works
but

cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); doesnot work.
It fails when __raw_writew(d, map->map_priv_1 +adr); is called in its stack.

The stack built is (downwards)

cfi_send_gen_cmd
cfi_h_cfi_build_cmd
cfi_write
my_physmap_write16
__raw_writew(d, map->map_priv_1 +adr)

So what do u think. I hope it i s amore understandable format now.

Quoted 42 lines

From: J�rn Engel <[email protected]>
To: Vikram Mehta <[email protected]>
CC: mtd <[email protected]>
Subject: Re: cfi_probe_chip problem
Date: Tue, 3 Jun 2003 11:00:13 +0200

Quoted 29 lines · Vikram Mehta

Let me tell u in detail with a map
cfi_probe calls
cfi_probe_chip. calls
cfi_send_gen_cmd calls
cfi_build_cmd
cfi_build_cmd returns
cfi_send_gen_cmd: code
if (prev_val)
*prev_val = cfi_read(map, addr); doesnot satify
cfi_send_gen_cmd calls
cfi_write The values called are __u32
val=250 and __u32 addr = 0

                            cfi_write calls
                                   mymap->write16 calls
                                      __raw_writew(d, map->map_priv_1 +
adr);
                                       __raw_writew(d, map->map_priv_1 +
adr);      returns
                                     mymap->write16  returns
                           cfi_write retruns
        cfi_send_gen_cmd  returns

cfi_probe_chip again calls
cfi_send_gen_cmd
.........similar to above stack
cfi_write The values called are __u32
val=152 and __u32 addr = 170
cfi_write calls

Quoted 5 lines
                                   mymap->write16 calls
                                       __raw_writew(d, map->map_priv_1 +

adr);
DOES NOT RETURN
Whay could be wrong here?

Quoted 8 lines

You might be using a proportional font. The result is completely unreadable for anyone else. Set your font to courier and redraw.

J�rn

--
Victory in war is not repetitious.
-- Sun Tzu

_________________________________________________________________
HCL Beanstalk PCs. You could win one. http://server1.msn.co.in/sp03/hclbeanstalktour/index.asp Interested?

#1 lore raw
Quoted 10 lines · Vikram Mehta

Hi joern,
Thanx
I agree this format was confusing. So let me put it simply

in cfi_probe.c in cfi_probe_chip function

cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); Works
but

Quoted 6 lines

cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); doesnot work.
It fails when __raw_writew(d, map->map_priv_1 +adr); is called in its
stack.

From the Cc I'm inferring you're using uCLinux. Are you running with

your kernel in flash? Is your kernel in the _same_ flash chip as is being probed here?

If so, it's not really surprising it doesn't work. As soon as you send the '0x98' command, your entire kernel turns into the CFI query results and it isn't really going to work too well :)

Signature · 1 line
dwmw2
#2 lore raw
Quoted 19 lines · David Woodhouse
Quoted 15 lines · Vikram Mehta

Hi joern,
Thanx
I agree this format was confusing. So let me put it simply

in cfi_probe.c in cfi_probe_chip function

cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); Works
but

cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); doesnot work.
It fails when __raw_writew(d, map->map_priv_1 +adr); is called in its stack.

Quoted 10 lines
Quoted 1 line

From the Cc I'm inferring you're using uCLinux. Are you running with

your kernel in flash? Is your kernel in the _same_ flash chip as is being probed here?

If so, it's not really surprising it doesn't work. As soon as you send the '0x98' command, your entire kernel turns into the CFI query results and it isn't really going to work too well :)

We had this problem as well on our uClinux systems. Once we changed to running the kernel out of RAM our chips were detected properly.

The uClinux archives have a large amount of information on how to get uClinux+MTD+JFFS(2) to play nicely together. I suggest searching the online archive, as the subject comes up very often on that list.

Good luck,
Andrew Goodney
[email protected]
-----------------------
www.blueskylabs.com

#3 lore raw
Quoted 11 lines · Andrew Goodney
Quoted 4 lines · David Woodhouse

If so, it's not really surprising it doesn't work. As soon as you send the '0x98' command, your entire kernel turns into the CFI query results and it isn't really going to work too well :)

We had this problem as well on our uClinux systems. Once we changed to running the kernel out of RAM our chips were detected properly.

The uClinux archives have a large amount of information on how to get uClinux+MTD+JFFS(2) to play nicely together. I suggest searching the online archive, as the subject comes up very often on that list.

As it happens, Intel have recently sponsored some development work on this. With a small amount of further arch-specific code, it should be possible to get this to work. I'll be posting details to the list shortly.

Signature · 1 line
dwmw2