From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Detlev Zundel" <dzu@denx.de>, linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: Re: Question on mpc52xx_common.c
Date: Thu, 3 Apr 2008 13:00:29 -0600 [thread overview]
Message-ID: <fa686aa40804031200n4cd7aeb4g330ab3e2620680e@mail.gmail.com> (raw)
In-Reply-To: <m2wsne9a4c.fsf@ohwell.denx.de>
(cc'ing the mailing list in my reply)
On Thu, Apr 3, 2008 at 10:27 AM, Detlev Zundel <dzu@denx.de> wrote:
> I wrote,
>
> > debugging a lite5200b kernel (linux-2.6-denx equivalent of 2.6.25-rc8) I
> > noticed that in mpc52xx_map_common_devices (mpc52xx_common.c:161) the
> > cdm module is tentatively mapped. It seems strange to me that there is no
> > error checking here. Is a FDT without an cdm entry usable at all?
Sure, why not? If the firmware has already set it up correctly and no
devices using it are in use, then the kernel should be okay. :-)
That said, I can't imagine choosing to not put the cdm node into the
device tree.
> > Checking for the usage of mpc52xx_cdm I found mpc52xx_set_psc_clkdiv
> > (mpc52xx_common.c:186) only returning ENODEV when no CDM module is
> > mapped - but still not even a warning. Now the only user of
> > set_psc_clkdiv seems to be drivers/spi/mpc52xx_psc_spi.c:342 where the
> > return value is not even checked....
> >
> > Wouldn't at least a warning on a failed mapping be in order here?
By rights, the psc_spi driver should be fixed to report an error.
Other than that, there are no users of the CDM in-tree right now.
>
> And yes, I've seen that the lite5200 specific code warns on a missing
> cdm node but thats no help for other platforms....
And that's because older lite5200 firmware doesn't setup the CDM correctly.
Now, all of the mpc5200 common code needs some work I think. There
are too many places where bestcomm or other code redundantly goes
looking for common device nodes. I'd like to amalgamate a bunch of
that stuff to map them all at platform initialization time and provide
an api for retrieving the mapped region or for controlling the shared
device.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next parent reply other threads:[~2008-04-03 19:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m21w5map5f.fsf@ohwell.denx.de>
[not found] ` <m2wsne9a4c.fsf@ohwell.denx.de>
2008-04-03 19:00 ` Grant Likely [this message]
2008-04-07 22:31 ` Question on mpc52xx_common.c Matt Sealey
2008-04-08 2:14 ` Arnd Bergmann
2008-04-08 2:25 ` Grant Likely
[not found] ` <23d2e4300804071926n57746a3cj551ef38bf10486c7@mail.gmail.com>
[not found] ` <47FB3CD6.2090706@genesi-usa.com>
2008-04-08 14:52 ` Grant Likely
2008-04-08 19:45 ` Robert Schwebel
2008-04-08 20:07 ` Scott Wood
2008-04-08 23:51 ` David Gibson
2008-04-09 6:18 ` Wolfgang Denk
2008-04-08 20:12 ` Timur Tabi
2008-04-08 21:26 ` Grant Likely
2008-04-08 21:51 ` Segher Boessenkool
2008-04-09 16:46 ` Matt Sealey
2008-04-10 6:39 ` Robert Schwebel
2008-04-08 7:56 ` Sven Luther
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=fa686aa40804031200n4cd7aeb4g330ab3e2620680e@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=dzu@denx.de \
--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;
as well as URLs for NNTP newsgroup(s).