lkml.org 
[lkml]   [2012]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 0/3] capebus moving omap_devices to mach-omap2
    * Pantelis Antoniou <panto@antoniou-consulting.com> [121031 11:05]:
    > Hi Tony,
    >
    > On Oct 31, 2012, at 7:52 PM, Tony Lindgren wrote:
    >
    > > * Pantelis Antoniou <panto@antoniou-consulting.com> [121031 10:26]:
    > >> It is painless to move the adapter DT devices to arch/arm/mach-omap2
    > >>
    > >> However I got bit by the __init at omap_build_device family functions.
    > >> If you don't remove it, crashes every time you instantiate a device
    > >> at runtime, or you load the cape driver as a module.
    > >
    > > Hmm I think you misunderstood me. You only need to create the
    > > platform_device under arch/arm/mach-omap2. The device creation
    > > happens only at __init, so omap_build_device can stay as __init.
    > > The driver itself should be under drivers.
    > >
    > > But is this bus on non-device-tree omaps? If not, just make it
    > > device tree only.
    > >
    >
    > I'm afraid that's not the case. The whole notion of capebus is that
    > instantiation of the devices doesn't just happen early at the boot
    > sequence.
    >
    > It is perfectly valid for a cape to be instantiated via loading
    > a module, or by making an override by writing a sysfs file.
    >
    > When having the __init there, the function has been long removed
    > and you get a crash by calling into the weeds.
    >
    > So the sequence is:
    >
    > <early boot> Register the adapter driver.

    OK this is always there for the hardware, and done during
    the __init and this one should have an omap_device..

    > <user> insmod bone-geiger-cape
    > <cape-is-matched> call omap_build_device
    >
    > Please look into the capebus patches for the details.

    ..but it seems that the devices connected to capebus should
    not have anything to do with omap_device and hwmod?

    They should only need to use capebus, just like USB devices
    use the USB bus and are registered as USB devices.

    Anyways, please sort it out with Benoit, Kevin and Paul,
    I've added them to cc. Maybe I'm missing something here.

    Regards,

    Tony


    \
     
     \ /
      Last update: 2012-10-31 21:01    [W:2.350 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site