From: Steven Scholz <hidden> Date: 2001-09-27 14:59:06
Hi there,
are threre any structs for IDMA in the recent kernel sources?
I think of something similar to
I am looking for a "IDMA Buffer Descriptor" similar to
/* Buffer descriptors used by many of the CPM protocols.
*/
typedef struct cpm_buf_desc {
ushort cbd_sc; /* Status and Control */
ushort cbd_datlen; /* Data length in buffer */
uint cbd_bufaddr; /* Buffer address in host memory */
} cbd_t;
I need a way to access the IDMA's parameter RAM, which should be located
at IDMA1 base = IMMR+0x3cc0.
Is there a struct to access the "DMA Channel Mode Register (DCMR)" at
IDMA1 + 0x02?
I know Greg Johnson [off-list ref] proposed some stuff
last year. But they never made it into the linuxppc_2_4_devel, did they?
I could think of something like
/* Buffer descriptors used by IDMA
*/
typedef struct idma_buf_desc {
ushort ibd_sc; /* Status and Control */
unchar ibd_dfcr; /* destination function code register, s.20.3.4.1*/
unchar ibd_sfcr; /* source function code register */
uint ibd_buflen; /* "number of bytes to transfer" */
uint ibd_srcbuf; /* "points to the beginning of the source buffer" */
uint ibd_destbuf; /* "points to the beginning of the destination
buffer" */
} ibd_t;
TIA.
Cheers,
Steven
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
From: Dan Malek <hidden> Date: 2001-09-27 16:29:04
Steven Scholz wrote:
are threre any structs for IDMA in the recent kernel sources?
No, they would be in 'commproc.h'. Again, just use a similar
method to all of the other device drivers for the CPM. There
is a standard BD structure that is part of all devices for
DMA purposes, and simply add the information needed by IDMA.
I need a way to access the IDMA's parameter RAM,
Don't confuse "parameter ram" and IDMA buffer descriptors. If
you notice, the parameter ram is defined as the offset into the
appropriate pages of the CPM memory. This information for IDMA
is not currently defined in 'commproc.h' and you will need to do that.
I know Greg Johnson [off-list ref] proposed some stuff
last year. But they never made it into the linuxppc_2_4_devel, did they?
I don't recall anyone sending a patch to do this. If they did,
I apologize for missing it and I'll look through the archives to
find it.
I could think of something like
/* Buffer descriptors used by IDMA
*/
typedef struct idma_buf_desc {
There you go, the IDMA buffer descriptor. Why didn't you just
edit commproc.h to include this, get it working, and send a patch :-)?
Thanks.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
From: Steven Scholz <hidden> Date: 2001-09-27 17:07:31
Dan,
quoted
are threre any structs for IDMA in the recent kernel sources?
No, they would be in 'commproc.h'. Again, just use a similar
method to all of the other device drivers for the CPM. There
is a standard BD structure that is part of all devices for
DMA purposes, and simply add the information needed by IDMA.
Have you ever use IDMA? I think there is a significanct difference
between SDMA and IDMA.
The "standard BD structure" doesn't help much for IDMA, does it?
So it's not that easy. I already had a look at enet.c...
Don't confuse "parameter ram" and IDMA buffer descriptors. If
you notice, the parameter ram is defined as the offset into the
appropriate pages of the CPM memory. This information for IDMA
is not currently defined in 'commproc.h' and you will need to do that.
I don't. Thanks.
quoted
I know Greg Johnson [off-list ref] proposed some stuff
last year. But they never made it into the linuxppc_2_4_devel, did they?
I don't recall anyone sending a patch to do this. If they did,
I apologize for missing it and I'll look through the archives to
find it.
It was in April last year!
quoted
/* Buffer descriptors used by IDMA
*/
typedef struct idma_buf_desc {
There you go, the IDMA buffer descriptor. Why didn't you just
edit commproc.h to include this, get it working, and send a patch :-)?
I will!
But since I found this message from Greg I thought it's already done.
I'll attach what I have so far. It's basicly the patch sent by Greg. I
am about to check all these defines again.
Cheers,
Steven
From: Dan Malek <hidden> Date: 2001-09-27 17:34:56
Steven Scholz wrote:
Have you ever use IDMA?
Yes.
.... I think there is a significanct difference
between SDMA and IDMA.
Well, yes. IDMA (like all CPM devices) use the SDMA function
to access memory.....
The "standard BD structure" doesn't help much for IDMA, does it?
So it's not that easy. I already had a look at enet.c...
The IDMA uses the same logical sequence of events and processing
as all CPM devices. No, the bits aren't exactly the same in the
structure, but if that is all you are concerned about you are
missing the forest and worried about the trees. The same logical
steps for initializing the parameter ram, allocating DP memory,
initializing BDs, wiring interrupts, and managing BDs is the same
for all CPM devices. I apologize for not having the trivial data
structures ready for you to use.......
It was in April last year!
Sorry I missed it.
I'll attach what I have so far. It's basicly the patch sent by Greg. I
am about to check all these defines again.
Well, if this is it, I now understand why it was never integrated.
I don't simply update GPL header files without the corresponding
code that needs those changes. Wait until you actually have working
driver and I'll update everything at once.
Thanks.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/