Re: Re: [linux-sh:03360] About Compact Flash Memory Mapped
Fabio Giovagnini <[email protected]> Tue, 26 Oct 2004 09:17:26 +0000
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.ports.sh.general |
|---|---|
| Organization | Walbro Italy |
| Message-ID | <[email protected]> |
Another question:
if you read into ide.c of blob-2.0.5-pre3 you can find a function called
hd_busy_wait.
In such a function I can read the using of port of type PORT* (u32 pointer)
and a cast of port[1] to u8 for accessing to error register, but if I have
PORT *port, port0] is u32 so that &port[1] is &port[0] + 4. I'm a little
confused. I attach the piece of code:
hd_busy_wait(volatile PORT *port)
{
int count;
u8 status, err;
count = 0;
while (count++ < 1500) {
status = (u8)port[7];
if ((status & BUSY) == 0)
break;
udelay();
}
#if 0
SerialOutputString("busy_wait: count ");
SerialOutputHex(count);
SerialOutputString("\n");
SerialOutputString("status ");
SerialOutputHex(status);
SerialOutputString("\n");
#endif
if (status & 0x01) {
err = (u8)port[1];
SerialOutputString("err reg ");
SerialOutputHex(err);
SerialOutputString("\n");
return -1;
}
return 0;
}
On Friday 22 October 2004 12:08, mt wrote:
> Check out Marc Singer's Linux port/patch for Logic's
> Sharp A400; the A400 Card Engine has the same
> word-access setup as the 7760 Card Engine. A
> quote from Marc's webpage:
>
> "Compact Flash (IDE) driver with polling. It
> can now be used to host a root filesystem."
> ( http://projects.buici.com/arm/lpd7a40x )
>
>
> Also, Logic has a Linux port available for
> the Sharp 79520 Card Engine, which also has
> the same CF setup; though I'd recommend looking
> at Marc's work first.
>
>
> Regards
>
> --- Fabio Giovagnini <[email protected]> wrote:
> > Hi All, Hi Paul
> > I'm writing to understand what I'm in front of.
> > On my Logic PD 7760 based board, I want to enable the boot
> > from CF. The HW
> > manula of the card tells me the CF is connected only in Memory
> > Mapped Mode. I
> > got the eclectical schematic of CF connector connection and I
> > read A0 pin si
> > grounded.This means I can read and write only WORD, and I
> > cannot access the
> > single byte. Now, when I write the Drive/Head (offset 6)
> > register, I write
> > also Command register. Is it possible to execute a command
> > writing together
> > Drive / Head and commad task registers?
> >
> > Thanks a lot
> >
> > Fabio
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> linuxsh-dev mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linuxsh-dev
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl