linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* How to access MPC8555 DMA register ?
@ 2007-02-06  8:44 Shinji Watanabe
  2007-02-06 16:36 ` Kumar Gala
  0 siblings, 1 reply; 3+ messages in thread
From: Shinji Watanabe @ 2007-02-06  8:44 UTC (permalink / raw)
  To: linuxppc-embedded

Hi, all.

I used MPC8555CDS.

How to access DMA registers of MPC8555 ?

I can't read/write these registers on LINUX.

I called request_mem_region( 0xE0000000, LENGTH, ... ) in my device driver.

When I set LENGTH 0x21100, this function call succeded.

But When I set LENGTH 0x21200, this function call failed.

"e0021100-e002117f : fsl-dma0" is part of /proc/iomem log.

I guess my driver can't access fsl-dma0 area.

But fsl-dma0 area encompassed DMA registers I want to access.

I must find remove simbols like fsl-dma0.
Or I must find how to use modules encompass fsl-dma0.

Counld you give me some help/hint/tips ?

regards,

Shinji

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to access MPC8555 DMA register ?
  2007-02-06  8:44 Shinji Watanabe
@ 2007-02-06 16:36 ` Kumar Gala
  0 siblings, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2007-02-06 16:36 UTC (permalink / raw)
  To: Shinji Watanabe; +Cc: linuxppc-embedded


On Feb 6, 2007, at 2:44 AM, Shinji Watanabe wrote:

> Hi, all.
>
> I used MPC8555CDS.
>
> How to access DMA registers of MPC8555 ?
>
> I can't read/write these registers on LINUX.
>
> I called request_mem_region( 0xE0000000, LENGTH, ... ) in my device  
> driver.
>
> When I set LENGTH 0x21100, this function call succeded.
>
> But When I set LENGTH 0x21200, this function call failed.
>
> "e0021100-e002117f : fsl-dma0" is part of /proc/iomem log.
>
> I guess my driver can't access fsl-dma0 area.
>
> But fsl-dma0 area encompassed DMA registers I want to access.
>
> I must find remove simbols like fsl-dma0.
> Or I must find how to use modules encompass fsl-dma0.
>
> Counld you give me some help/hint/tips ?

You need to have your driver bind to the fsl-dma0 device.  The  
platform code is setting up a device for each dma channel (fsl-dma0,  
fsl-dma1, ..) and you need to have your driver be setup to bind to  
that device.

Take a look at drivers/i2c/busses/i2c-mpc.c, drivers/net/gianfar.c  
for an examples of how drivers are setup to do the binding.

- k

^ permalink raw reply	[flat|nested] 3+ messages in thread

* How to access MPC8555 DMA register ?
@ 2007-02-15 10:16 Shinji Watanabe
  0 siblings, 0 replies; 3+ messages in thread
From: Shinji Watanabe @ 2007-02-15 10:16 UTC (permalink / raw)
  To: linuxppc-embedded

I don't know how to bind the driver.

I maked driver of pci device type for MPC8555 as Log.A.

/var/log/message log is Log.B.

When I called platform_get_resource,
I can't get validate value.

Why ?

please help me!

///////////////////////// log.A

#define VENDORID_MVPPC 0x1057
#define DEVICEID_MVPPC 0x000A

static struct pci_device_id ids[] = {
 { PCI_DEVICE(VENDORID_MVPPC, DEVICEID_MVPPC), },
 { 0, }
};

MODULE_DEVICE_TABLE(pci, ids);

static struct pci_driver pci_driver = {
 .name = PCI_DEVICE_NAME, 
 ...
 .id_table = ids,
 .probe = probe,
};


static int probe(struct pci_dev *dev, const struct pci_device_id *id)
{
 struct resource *res;
 ...
 ...
 struct platform_device *pdev = to_platform_device(&dev->dev);
 ..
 ..
 pci_enable_device(dev);
 ..
 ..
 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  dprintk("res0 %p\n", 
   res
   );
 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 dprintk("res1 %p\n", 
   res
   );
 res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
 dprintk("res2 %p\n", 
   res
   );
 ...
 ...
}


///////////////////////// log.b
Feb 10 11:34:23 mpc8555cds user.debug kernel: res0 00000000
Feb 10 11:34:23 mpc8555cds user.debug kernel: res1 00000000
Feb 10 11:34:23 mpc8555cds user.debug kernel: res2 00000000


Regars,

shinji

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-15 10:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-15 10:16 How to access MPC8555 DMA register ? Shinji Watanabe
  -- strict thread matches above, loose matches on Subject: below --
2007-02-06  8:44 Shinji Watanabe
2007-02-06 16:36 ` Kumar Gala

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).