public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Jaap-Jan Boor <jjboor@aimsys.nl>
To: "Stefan Stürke" <sst@pandatel.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: MTD and 28F128J3A
Date: Thu, 19 Aug 2004 14:48:54 +0200	[thread overview]
Message-ID: <1092919733.23187.34.camel@linpc003.aimsys.nl> (raw)
In-Reply-To: <cg23u5$gd0$1@sea.gmane.org>

Stefan,

what I did is force a checkstop the will result in a processor
reset before executing 'm8260_gorom()' (this should also reset
your flash devices) by adding the following code to
m8260_machine_restart():

static void
m8260_restart(char *cmd)
{
        extern void m8260_gorom(bd_t *bi, uint addr);
        uint    startaddr;

#ifdef CONFIG_MYSYSTEM
        unsigned long hid0;
        // Need interrupts off to force checkstop
        cli();
        // Checkstop reset enable
        ((immap_t *)IMAP_ADDR)->im_clkrst.car_rmr |= 0x01;
        // Force a checkstop by turning on parity which is not
        // implemented
        hid0 = mfspr(HID0);
        hid0 |= 0x30000000;
        mtspr(HID0, hid0);
#else
        /* Most boot roms have a warmstart as the second instruction
         * of the reset vector.  If that doesn't work for you, change
         * this or the reboot program to send a proper address.
         */
        startaddr = 0xff000104;

        if (cmd != NULL) {
                if (!strncmp(cmd, "startaddr=", 10))
                        startaddr = simple_strtoul(&cmd[10], NULL, 0);
        }

        m8260_gorom((unsigned int)__pa(__res), startaddr);
#endif
}

Jaap-Jan


On Thu, 2004-08-19 at 13:46, Stefan Stürke wrote:
> Hi,
> 
> I have a problem with the 28F128J3A flash during system reboot.
> 
> Environment:
> 
> - mpc8270
> - linuxppc_2_4_devel (snapshot from the denx ppc tree based on 2.4.25)
> - mtd version included in that tree
> - a jffs2 file system is mounted on the flash
> 
> Problem:
> 
> When I reboot the system, I get a kernel panic right after the jump to 
> the reset vector in m8260_gorom().
> 
> Using my BDI2000 I was able to find out that the kernel panic occurred
> because 8260_gorom tries to execute some code in Flash (this is
> correct because the bootloader is also located in that flash) but the
> Flash is in query mode at this time. So the correct code could not be
> read by the processor
> 
> So my question: Why is the flash left in query mode?
> I found that also in normal operation the flash is in query mode after
> writing to it. Is this ok? (I have no problems during normal operation).
> What can I do to leave the query mode before reboot?
> 
> When I use the same hardware platform with another flash type
> AMD29LV128M I have no problems during reboot.
> 
> One difference I can think of is, that in the case of the
> 28F128J3A the chips/cfi_cmdset_0001 driver is used, while in the case
> of the AMD29LV128M the chips/cfi_cmdset_0002 driver is used.
> Any ideas?
> 
> Thanks in advance,
> Stefan
-- 
J.G.J. Boor                       Anton Philipsweg 1
Software Engineer                 1223 KZ Hilversum
AimSys bv                         tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor@aimsys.nl

  reply	other threads:[~2004-08-19 12:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-19 11:46 MTD and 28F128J3A Stefan Stürke
2004-08-19 12:48 ` Jaap-Jan Boor [this message]
2004-08-19 12:50   ` Jaap-Jan Boor
2004-08-19 15:33   ` Stefan Stürke
2004-08-19 15:49     ` Josh Boyer
2004-08-20  7:53       ` Jaap-Jan Boor
2004-08-20  8:17       ` Stefan Stürke

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=1092919733.23187.34.camel@linpc003.aimsys.nl \
    --to=jjboor@aimsys.nl \
    --cc=linux-mtd@lists.infradead.org \
    --cc=sst@pandatel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox