From: Kumar Gala <galak@kernel.crashing.org>
To: Greg KH <greg@kroah.com>
Cc: "linuxppc-dev@ozlabs.org list" <linuxppc-dev@ozlabs.org>,
"linux-kernel@vger.kernel.org List"
<linux-kernel@vger.kernel.org>
Subject: setting up of platform device archdata?
Date: Tue, 3 Aug 2010 08:43:30 -0500 [thread overview]
Message-ID: <8AD41167-5FB1-4C42-83A7-9F0CC6AF69AA@kernel.crashing.org> (raw)
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=
reply other threads:[~2010-08-03 13:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8AD41167-5FB1-4C42-83A7-9F0CC6AF69AA@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox