linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org, Andrew Victor <avictor.za@gmail.com>,
	linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: [PATCH 3/3 v2] AT91: initialize Compact Flash on AT91SAM9263 cpu
Date: Fri, 6 Feb 2009 14:32:19 +0100	[thread overview]
Message-ID: <200902061432.20291.stf_xl@wp.pl> (raw)
In-Reply-To: <498C272A.5070101@ru.mvista.com>

Friday 06 February 2009 13:03:54 Sergei Shtylyov napisał(a):
> > +/* --------------------------------------------------------------------
> > + *  Compact Flash (PCMCIA or IDE)
> > + * -------------------------------------------------------------------- */
> > +
> > +#if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE) || \
> > +    defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE)
> >   
> 
>    Ugh... what are trying to achieve with this, marginal memory save?
Some memory save. There are users which count every byte. 

> > +	cf_resources[0].start = addr_space;
> > +	cf_resources[0].end = addr_space + SZ_256M - 1;
> >   
> 
>    In the datasheet the CF mode address space is just 0x1000000, i.e. 16 
> MB, not 256. Moreover, address lines above A22 are not connected to CF 
> at all.
We take here all particular chip select address space 
CS5: 0x50000000 - 0x5fffffff
CS6: 0x60000000 - 0x6fffffff 

> > +	if (data->det_pin) {
> > +		/* check if device is present */
> > +		at91_set_gpio_input(data->det_pin, 1);
> > +		at91_set_deglitch(data->det_pin, 1);
> > +		if (at91_get_gpio_value(data->det_pin) != 0) {
> > +			printk(KERN_ERR "AT91: no CF card detected\n");
> > +			return;
> > +		}
> > +	}
> >   
> 
>    Bart, I'm not sure: don't we support warm-plug now? Or it won't avail 
> us with CF?
Uhh, this code is wrong at least for PCMCIA as we hotplug there. I don't think
hotplug is supported for ATA devices.

> > +	if (data->rst_pin) {
> > +		/* reset the card */
> > +		int reset = (data->flags & AT91_CF_TRUE_IDE) ? 0 : 1;
> > +
> > +		at91_set_gpio_output(data->rst_pin, reset);
> > +		udelay(25); /* taken from ATA docs, CFA not specify it ? */
> > +		at91_set_gpio_output(data->rst_pin, !reset);
> > +	}
> >   
> 
>    Is there really a need to hard reset CF on every reboot?
I think this have sense for ATA devices.
 
> > +	if (data->vcc_pin)
> > +		/* initially off */
> > +		at91_set_gpio_output(data->vcc_pin, 0);
> >   
> 
>    Why? Moreover, resetting CF without power applied (or cutting off 
> power afterwards) just doesn't make sense...
Right.

Stanislaw Gruszka

  reply	other threads:[~2009-02-06 13:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06 11:14 [PATCH 3/3 v2] AT91: initialize Compact Flash on AT91SAM9263 cpu Stanislaw Gruszka
2009-02-06 12:03 ` Sergei Shtylyov
2009-02-06 13:32   ` Stanislaw Gruszka [this message]
2009-02-15 16:00     ` Sergei Shtylyov
2009-02-15 16:07       ` Sergei Shtylyov
2009-02-06 12:17 ` Sergei Shtylyov
2009-02-06 13:33   ` Stanislaw Gruszka
2009-02-06 17:23     ` Sergei Shtylyov

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=200902061432.20291.stf_xl@wp.pl \
    --to=stf_xl@wp.pl \
    --cc=avictor.za@gmail.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-ide@vger.kernel.org \
    --cc=sshtylyov@ru.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;
as well as URLs for NNTP newsgroup(s).