setting up of platform device archdata?
From: Kumar Gala <hidden>
Date: 2010-08-03 13:43:39
Also in:
lkml
From: Kumar Gala <hidden>
Date: 2010-08-03 13:43:39
Also in:
lkml
Greg,
We are running into in issue in that we need the platform device =
archdata setup before platform_device_add gets called since we need some =
data in archdata setup to allow the bus notifiers to work properly. On =
PPC we need this to get the dma masks setup properly that we than use in =
the bus notifiers to determine if we need SWIOTLB support for a given =
device or not. Any suggestions on how to do this? Something like below?
struct platform_device *platform_device_alloc(const char *name, int id)
...
if (pa) {
strcpy(pa->name, name);
pa->pdev.name =3D pa->name;
pa->pdev.id =3D id;
device_initialize(&pa->pdev.dev);
pa->pdev.dev.release =3D platform_device_release;
#ifdef ARCH_HAS_PDEV_ARCHDATA_SETUP
arch_setup_pdev_archdata(&pa->pdev.dev);
#endif
}
- k=