How to access MPC8555 DMA register ?

Shinji Watanabe watashin at mvision.co.jp
Thu Feb 15 21:16:27 EST 2007


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





More information about the Linuxppc-embedded mailing list