mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Todd Poynor <tpoynor@mvista.com>,
	rpurdie@rpsys.net, lenz@cs.wisc.edu,
	kernel list <linux-kernel@vger.kernel.org>,
	Russell King <rmk@arm.linux.org.uk>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: latest mtd changes broke collie
Date: Thu, 10 Nov 2005 11:59:54 +0100	[thread overview]
Message-ID: <20051110105954.GE2401@elf.ucw.cz> (raw)
In-Reply-To: <1131619903.27347.177.camel@baythorne.infradead.org>

Hi!

> > That said... I can certainly do few experiments. Switching map_name
> > from "sharp" to "cfi" should be theoretically enough to get new code
> > up?
> 
> That's if the chips are actually compliant with the Common Flash
> Interface. Otherwise, use the 'jedec_probe' method to identify them,
> which will still end up using the same actual back-end driver.

Well, how do I found out? I tried switching to CFI, and it will not
boot (unable to mount root...). No mtd-related messages as far as I
can see. There's quite a lot of mtd-related config options, I set them
like this:

#
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
# CONFIG_MTD_DEBUG is not set
# CONFIG_MTD_CONCAT is not set
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
# CONFIG_MTD_AFS_PARTS is not set

#
# User Modules And Translation Layers
#
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
# CONFIG_RFD_FTL is not set

#
# RAM/ROM/Flash chip drivers
#
CONFIG_MTD_CFI=y
CONFIG_MTD_JEDECPROBE=y
CONFIG_MTD_GEN_PROBE=y
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_CFI_I4 is not set
# CONFIG_MTD_CFI_I8 is not set
CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_CFI_AMDSTD_RETRY=0
CONFIG_MTD_CFI_STAA=y
CONFIG_MTD_CFI_UTIL=y
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
CONFIG_MTD_OBSOLETE_CHIPS=y
# CONFIG_MTD_AMDSTD is not set
# CONFIG_MTD_SHARP is not set
# CONFIG_MTD_JEDEC is not set
# CONFIG_MTD_XIP is not set

#
# Mapping drivers for chip access
#
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_ARM_INTEGRATOR is not set
CONFIG_MTD_SA1100=y
# CONFIG_MTD_IMPA7 is not set
# CONFIG_MTD_PLATRAM is not set

#
# Self-contained MTD device drivers
#
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_PHRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_BLKMTD is not set
# CONFIG_MTD_BLOCK2MTD is not set

There's this kind of strange code in sharp.c; is it the thing I need
to rewrite into cfi_probe?

static int sharp_probe_map(struct map_info *map,struct mtd_info *mtd)
{
        map_word tmp, read0, read4;
        unsigned long base = 0;
        int width = 4;

        tmp = map_read(map, base+0);

        sharp_send_cmd(map, CMD_READ_ID, base+0);

        read0 = map_read(map, base+0);
        read4 = map_read(map, base+4);
        if (read0.x[0] == 0x00b000b0) {
                switch(read4.x[0]){
                case 0xaaaaaaaa:
                case 0xa0a0a0a0:
                        /* aa - LH28F016SCT-L95 2Mx8, 32 64k blocks*/
                        /* a0 - LH28F016SCT-Z4  2Mx8, 32 64k blocks*/
                        mtd->erasesize = 0x10000 * width;
                        mtd->size = 0x200000 * width;
                        return width;
                case 0xa6a6a6a6:
                        /* a6 - LH28F008SCT-L12 1Mx8, 16 64k blocks*/
                        /* a6 - LH28F008SCR-L85 1Mx8, 16 64k blocks*/
                        mtd->erasesize = 0x10000 * width;
                        mtd->size = 0x100000 * width;
                        return width;
                case 0x00b000b0:
                        /* a6 - LH28F640BFHE 8 64k * 2 chip blocks*/
                        mtd->erasesize = 0x10000 * width / 2;
                        mtd->size = 0x800000 * width / 2;
                        return width;
                default:
                        printk("Sort-of looks like sharp flash.\n");
                }

?
							Pavel
-- 
Thanks, Sharp!

  reply	other threads:[~2005-11-10 11:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-09 22:17 Pavel Machek
2005-11-10  0:19 ` Josh Boyer
2005-11-10  9:48   ` Pavel Machek
2005-11-10  2:59 ` Todd Poynor
2005-11-10  9:50   ` Pavel Machek
2005-11-10 10:02     ` David Woodhouse
2005-11-10 10:38       ` Pavel Machek
2005-11-10 10:51         ` David Woodhouse
2005-11-10 10:59           ` Pavel Machek [this message]
2005-11-10 11:11             ` David Woodhouse
2005-11-10 11:44               ` Pavel Machek
2005-11-10 12:07               ` Pavel Machek
2005-11-10 13:02                 ` David Vrabel
2005-11-10 13:09                   ` Pavel Machek
2005-11-10 17:41                     ` Richard Purdie
2005-11-10 18:09                       ` Richard Purdie
2005-11-10 22:06                         ` Pavel Machek
2005-11-10 22:41               ` Pavel Machek
2005-11-10 23:58                 ` Todd Poynor
2005-11-11  0:16                   ` Pavel Machek
2005-11-11  7:01                     ` Ian Campbell
2005-11-12 21:33                       ` Pavel Machek
2005-11-13 10:35                         ` Ian Campbell
2005-11-14 12:10                           ` Pavel Machek
2005-11-13 19:40                         ` Todd Poynor
2005-11-14 12:08                           ` Pavel Machek

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=20051110105954.GE2401@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@osdl.org \
    --cc=dwmw2@infradead.org \
    --cc=lenz@cs.wisc.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=rpurdie@rpsys.net \
    --cc=tpoynor@mvista.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

Powered by JetHome