public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Ben Warren <bwarren@qstreams•com>
To: Michael Brian Willis <willis@arlut•utexas.edu>
Cc: linuxppc-embedded@ozlabs•org
Subject: Re: MPC85xx and linux IDE driver
Date: Fri, 12 Oct 2007 15:48:26 -0400	[thread overview]
Message-ID: <470FCF8A.1000504@qstreams.com> (raw)
In-Reply-To: <1192213784.4862.48.camel@louie>

Michael Brian Willis wrote:
> Hello, 
>
> I am using an MPC8540 based embedded system with a Compact Flash card in
> true IDE mode. The Compact Flash card is directly connected to the
> MPC8540 bus without the use of a pcmcia adapter. 
>
> The Compact Flash card is being initialized correctly using the U-boot
> boot-loader and is working properly as an ide device in U-boot. However
> I cannot get linux to recognize the ide device.
>
> I have tried several different linux config options and have tried
> passing kernel command line options as advised in the
> Documentation/ide.txt help file. However I have not been able to get the
> kernel to recognize my ide device. 
>
> Does anybody know if I can use the generic linux ide drivers? Or will I
> need to modify/write my own driver for this type of setup? 
>   
Here's what I use:

http://marc.info/?l=linux-kernel&m=113877891224982&w=2

Please note that if you're using a kernel newer than 2.6.18, the _insw() 
and _outsw() calls no longer exist, so you'll need to replace them. 
Here's how I modified Kumar's functions. Not necessarily the right way, 
but it seems to work:

/* xxx: use standard outsw, insw when byte lanes swapped */
static void cfide_outsw(unsigned long port, void *addr, u32 count)
{
u16 *tmp = addr;
while (count--)
out_le16((u16 *)port, *tmp++);
}

static void cfide_insw(unsigned long port, void *addr, u32 count)
{
u16 *tmp = addr;
while (count--)
*tmp++ = in_le16((u16 *)port);
}


regards,
Ben

  reply	other threads:[~2007-10-12 19:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-12 18:29 MPC85xx and linux IDE driver Michael Brian Willis
2007-10-12 19:48 ` Ben Warren [this message]
2007-10-17 17:47   ` Michael Brian Willis
2007-10-17 18:44     ` Ben Warren
2007-10-25 21:49       ` Michael Brian Willis
2007-10-25 22:04         ` Ben Warren

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=470FCF8A.1000504@qstreams.com \
    --to=bwarren@qstreams$(echo .)com \
    --cc=linuxppc-embedded@ozlabs$(echo .)org \
    --cc=willis@arlut$(echo .)utexas.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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