Re: [linux-sh:03363] Re: Re: About Compact Flash Memory Mapped
Fabio Giovagnini <[email protected]> Wed, 27 Oct 2004 10:09:48 +0000
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.ports.sh.general |
|---|---|
| Organization | Walbro Italy |
| Message-ID | <[email protected]> |
Hi, I solved the problem with calling like this: #define ALT_STATUS 0x000e // read #define STATUS 0x0006 // read #define HAED_COMMAND 0x0006 // write #define ACMD .... alt_status = *((volatile unsigned short*)(offset +ALT_STATUS )); status = *((volatile unsigned short*)(offset + STATUS )) >> 8; *((volatile unsigned short*)(offset + COMAMND)) = 0xa0 + (((unsigned short)ACMD) << 8) wher 0xa0 is the write value to put in head register when you don't cre LBA Now every thing is clear and maybe the previous problems came form my attempt to use the inline ide_inw and ide_outw functions defined in io.h and thought for I/O or true IDE interfaces. Ciao everyone Fabio On Tuesday 26 October 2004 17:40, mt wrote: > You're correct. I dont have the code > in front of me. From your earlier > description, it sounded like the variable > itself was being used as a pointer. You > should be doing 16-bit accesses to the > registers, if you're doing 32-bit accesses > it will be doing two accesses instead of > one, and that's not what you want. > > --- Fabio Giovagnini <[email protected]> wrote: > > Sorry but I'm just confused; > > if you declare: > > typedef unsigned long PORT; > > > > PORT *port; > > > > I understand port is apointer to unsigned long, so: > > port[0] is at PORTADDRESS (i.e. 0x40000000) > > port[1] is at PORTADDRESS + 4 (i.e. 0x40000004) > > > > Another thing is the following declaration; > > > > PORT port; > > > > ((unsigned char*)port) > > or > > ((unsigned short*)port) > > > > in such a case port is 32 bit word and using the cast you use > > it as an address > > to a char, short or long. > > > > Do you agree my analysis? > > > > Ciao > > > > Fabio > > > > On Monday 25 October 2004 20:04, mt wrote: > > > if it's used as a pointer, it would have > > > to be 32 bits, since addresses are 32 bits. > > > > > > --- Fabio Giovagnini <[email protected]> wrote: > > > > I got Marc's patches. and I read some pieces of code > > > > condiltionally compiled: > > > > #if defined(LH7A400) > > > > typedef u32 PORT > > > > #else > > > > .... > > > > > > > > PORT later in the code is used as a ponter to the task > > > > registers; I ask: if > > > > the data bus is 16 bits wide, why PORT is u32 and not u16? > > > > > > > > Thanks a lot. > > > > > > > > Fabio > > > > > > > > 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 > > > > > > _______________________________ > > > Do you Yahoo!? > > > Declare Yourself - Register online to vote today! > > > http://vote.yahoo.com > > __________________________________ > Do you Yahoo!? > Yahoo! Mail Address AutoComplete - You start. We finish. > http://promotions.yahoo.com/new_mail ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click