From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
Cc: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,
Jamie Lentin <jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org>,
Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
michael-QKn5cuLxLXY@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: kirkwood devicetree respin
Date: Tue, 20 Mar 2012 22:15:09 +0000 [thread overview]
Message-ID: <201203202215.09227.arnd@arndb.de> (raw)
In-Reply-To: <20120320220156.GI2484-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
On Tuesday 20 March 2012, Jason Cooper wrote:
> > If you want to add a dependency, it should be
> >
> > depends on PLAT_PXA
> >
> > Most other platform drivers have a dependency on the platform
> > they are for, but USB_EHCI_MV was only recently added, and nobody
> > has bothered to fix this yet.
>
> It's my understanding that will make the driver visible in menuconfig
> for PLAT_PXA. That may be useful, but what I'm trying to fix is a new
> user (me) from selecting USB_EHCI_MV on PLAT_ORION. It breaks when
> you do that (at runtime).
Are those two things not the same? The dependency makes the driver
visible only on PLAT_PXA, which means it is invisible on PLAT_ORION
and you can no longer select it. PLAT_PXA and PLAT_ORION are mutually
exclusive.
> Andrew's logic (!PLAT_ORION) makes sure the driver is not visible in
> menuconfig (when ehci-hcd would pick it up) and is visible in
> non-PLAT_ORION boards (where ehci-hcd wouldn't pick it up).
>
> My question is, are there any non-PLAT_ORION boards that would use this?
> Would it work on those boards if compiled outside of ehci-hcd?
ehci-orion only makes sense on PLAT_ORION, and they never have any
other platform ehci driver.
ehci-mv only makese sense on PLAT_PXA, and they also don't have any
other platform ehci driver.
> Although, it worked when I added the module_platform_driver() macro.
> maybe we could put some logic around that:
>
> #ifndef CONFIG_PLAT_ORION
> module_platform_driver(ehci_orion_driver);
> #endif
No, this is just wrong. It expands to module_init(), and
there is already a module_init in ehci-hcd.c, and you must
not have more than one of these when building as a module,
otherwise you get a duplicate symbol definition error.
> > > Maybe also -Werror for that one file to catch other similar cases?
> >
> > No, we are actually trying to make sure that any configuration you pick
> > results in a kernel that builds, so that would be counterproductive.
>
> I would argue it should build and work. Otherwise, there's no point
> in having a successful compile. So, maybe the answer is not to have
> it as a configuration option. Or, at least, invisible in menuconfig.
Making USB_EHCI_MV invisible everywhere would also be possible, in that
case the right logic would be
config USB_EHCI_MV
def_bool y
depends on USB_EHCI_HCD && PLAT_PXA
select USB_EHCI_ROOT_HUB_TT
This would unconditionally enable the pxa ehci driver whenever the
common ehci code is enabled, which is a reasonable choice, and matches
the behavior of the orion driver.
> > The problem will be much bigger when we get to the point where you
> > can actually build a multiplatform kernel, e.g. one that works
> > on both PXA and Kirkwood because then it will still be broken
> > for at least one of the two.
>
> I think there are a few other things that would be broken first, right
> now. ;-)
Yes, we're working on them one by one. At some point we'll get to this one.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-03-20 22:15 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120312214325.GD5050@titan.lakedaemon.net>
[not found] ` <20120312214325.GD5050-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2012-03-13 15:57 ` kirkwood devicetree respin Arnd Bergmann
[not found] ` <201203131557.49488.arnd-r2nGTMty4D4@public.gmane.org>
2012-03-13 16:00 ` Arnd Bergmann
2012-03-13 16:44 ` Jason Cooper
2012-03-15 2:22 ` Jason Cooper
2012-03-20 17:22 ` Jason Cooper
[not found] ` <20120320172238.GC2484-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2012-03-20 18:03 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.02.1203201401410.24151-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2012-03-20 18:24 ` Jason Cooper
[not found] ` <20120320182459.GD2484-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2012-03-20 19:03 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.02.1203201454540.24151-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2012-03-20 19:16 ` Jason Cooper
2012-03-20 19:15 ` Arnd Bergmann
[not found] ` <201203201915.08317.arnd-r2nGTMty4D4@public.gmane.org>
2012-03-20 19:32 ` Andrew Lunn
[not found] ` <20120320193222.GD8315-g2DYL2Zd6BY@public.gmane.org>
2012-03-20 19:44 ` Jason Cooper
[not found] ` <20120320194449.GH2484-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2012-03-20 20:45 ` Andrew Lunn
[not found] ` <20120320204504.GE8315-g2DYL2Zd6BY@public.gmane.org>
2012-03-20 20:57 ` Arnd Bergmann
[not found] ` <201203202057.38365.arnd-r2nGTMty4D4@public.gmane.org>
2012-03-20 22:01 ` Jason Cooper
[not found] ` <20120320220156.GI2484-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2012-03-20 22:15 ` Arnd Bergmann [this message]
[not found] ` <201203202215.09227.arnd-r2nGTMty4D4@public.gmane.org>
2012-03-20 23:06 ` Jason Cooper
2012-03-21 3:54 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.02.1203202348150.24151-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2012-03-21 8:21 ` Haojian Zhuang
[not found] ` <CAN1soZymEsMiivL_76o_g+-P1HhLx72Z2vbV3HBDs0x+oeWn+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-21 8:34 ` Andrew Lunn
[not found] ` <20120321083428.GA25111-g2DYL2Zd6BY@public.gmane.org>
2012-03-21 8:42 ` Haojian Zhuang
[not found] ` <CAN1soZyObqAPq=fhn8eB1z0aYqTs87oNBsF_AXbo6kq9fpvhMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-21 10:09 ` Arnd Bergmann
[not found] ` <201203211009.40934.arnd-r2nGTMty4D4@public.gmane.org>
2012-03-21 11:45 ` Felipe Balbi
[not found] ` <20120321114546.GC3092-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-03-21 13:17 ` Arnd Bergmann
[not found] ` <201203211317.38339.arnd-r2nGTMty4D4@public.gmane.org>
2012-03-21 13:22 ` Felipe Balbi
[not found] ` <20120321132230.GL3092-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-03-21 20:06 ` Paul Zimmerman
[not found] ` <A2CA0424C0A6F04399FB9E1CD98E0304090B77CA-Yu2iAY70zvrYN67daEjeMPufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2012-03-22 8:13 ` Felipe Balbi
[not found] ` <20120322081315.GG31160-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-03-22 18:28 ` Paul Zimmerman
[not found] ` <A2CA0424C0A6F04399FB9E1CD98E0304090B7F02-Yu2iAY70zvrYN67daEjeMPufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2012-03-27 9:05 ` Felipe Balbi
[not found] ` <20120327090518.GL7379-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-03-27 17:40 ` Paul Zimmerman
2012-03-21 13:36 ` EHCI_MV confusion was: " Jason Cooper
[not found] ` <20120321133609.GK2484-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2012-03-21 13:56 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1203210955140.1369-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-03-21 15:12 ` Jason Cooper
2012-03-21 16:18 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.02.1203211216010.24151-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2012-03-21 16:27 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1203211226310.1369-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-03-22 1:39 ` Neil Zhang
2012-03-20 19:33 ` Jason Cooper
2012-04-06 23:20 ` Grant Likely
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=201203202215.09227.arnd@arndb.de \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=andrew-g2DYL2Zd6BY@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
--cc=jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=michael-QKn5cuLxLXY@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.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).