* ppc_ide_md.insw
@ 2000-10-19 12:44 Adrian Cox
2000-10-20 8:31 ` ppc_ide_md.insw Neil Russell
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Cox @ 2000-10-19 12:44 UTC (permalink / raw)
To: LinuxPPC-Dev
Do ppc_ide_md.insw and .outsw actually do anything in recent 2.2
kernels? My grepping has left me unclear.
I need to implement a driver for a compact flash interface which can't
take 16-bit cycles. Do I need to invent my own mechanism to replace the
insw and outsw operations in drivers/block/ide.c?
- Adrian Cox, AG Electronics
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ppc_ide_md.insw
2000-10-19 12:44 ppc_ide_md.insw Adrian Cox
@ 2000-10-20 8:31 ` Neil Russell
2000-10-20 9:08 ` ppc_ide_md.insw Adrian Cox
0 siblings, 1 reply; 3+ messages in thread
From: Neil Russell @ 2000-10-20 8:31 UTC (permalink / raw)
To: Adrian Cox, LinuxPPC-Dev
They are used by macros in include/asm-ppc/ide.h called "insw" and "outsw".
I know they are called because I have traced them. You can just fix the
versions in the arch/ppc/kernel directory to do what you want.
Normally, there is logic to convert 16-bit accesses from a CPU into a pair
of 8-bit accesses for IDE (a hangover from the ISA bus). Our hardware does
this but I'm not entirely convinced that this is necessary. Anyhow, if you
are using one of the PPCs in the 8xx family, or the 8260 you can define a
chip select line for IDE that has an 8-bit bus width, obviating any need
to change software.
Neil
On Thu, Oct 19, 2000 at 01:44:21PM +0100, Adrian Cox wrote:
> Do ppc_ide_md.insw and .outsw actually do anything in recent 2.2
> kernels? My grepping has left me unclear.
>
> I need to implement a driver for a compact flash interface which can't
> take 16-bit cycles. Do I need to invent my own mechanism to replace the
> insw and outsw operations in drivers/block/ide.c?
>
> - Adrian Cox, AG Electronics
>
--
Neil Russell <caret@c-side.com>
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ppc_ide_md.insw
2000-10-20 8:31 ` ppc_ide_md.insw Neil Russell
@ 2000-10-20 9:08 ` Adrian Cox
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Cox @ 2000-10-20 9:08 UTC (permalink / raw)
To: Neil Russell; +Cc: LinuxPPC-Dev
Neil Russell wrote:
> They are used by macros in include/asm-ppc/ide.h called "insw" and "outsw".
> I know they are called because I have traced them. You can just fix the
> versions in the arch/ppc/kernel directory to do what you want.
I'm using the 2.2 bitkeeper kernel, and there are no macros in
include/asm-ppc/ide.h:
~/linux-bk/linuxppc_2_2> grep insw include/asm-ppc/*
grep: include/asm-ppc/SCCS: Is a directory
include/asm-ppc/ide.h: void (*insw)(ide_ioreg_t port, void
*buf, int ns);
include/asm-ppc/ide.h:void ide_insw(ide_ioreg_t port, void *buf, int
ns);
include/asm-ppc/io.h:#define insw(port, buf, ns) _insw_ns((unsigned
short *)((port)+_IO_BASE), (buf), (ns))
include/asm-ppc/io.h:extern void _insw(volatile unsigned short *port,
void *buf, int ns);
include/asm-ppc/io.h:#define insw_ns(port, buf, ns) _insw_ns((unsigned
short *)((port)+_IO_BASE), (buf), (ns))
include/asm-ppc/io.h:extern void _insw_ns(volatile unsigned short *port,
void *buf, int ns);
> Normally, there is logic to convert 16-bit accesses from a CPU into a pair
> of 8-bit accesses for IDE (a hangover from the ISA bus). Our hardware does
> this but I'm not entirely convinced that this is necessary. Anyhow, if you
> are using one of the PPCs in the 8xx family, or the 8260 you can define a
> chip select line for IDE that has an 8-bit bus width, obviating any need
> to change software.
I've got a CF card on PortX of an MPC107. The MPC107 breaks the 16-bit
read into two 8-bit reads, in the wrong order. This is not a simple
endianness problem, as this ordering doesn't correctly advance the
internal counter of the CF card.
- Adrian Cox, AG Electronics
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-10-20 9:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-19 12:44 ppc_ide_md.insw Adrian Cox
2000-10-20 8:31 ` ppc_ide_md.insw Neil Russell
2000-10-20 9:08 ` ppc_ide_md.insw Adrian Cox
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).