lkml.org 
[lkml]   [2012]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH 4/5] ARM: OMAP4: add _dev_attr_ to ocp2scp for representing usb_phy
    Date
    In order to reflect devices(usb_phy) attached to ocp2scp bus, ocp2scp
    is assigned a device attribute to represent the attached devices.

    Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
    Cc: Benoit Cousson <b-cousson@ti.com>
    ---
    arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 21 +++++++++++++++++++++
    1 files changed, 21 insertions(+), 0 deletions(-)

    diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
    index 249ff76..b5a91e8 100644
    --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
    +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
    @@ -19,6 +19,7 @@
    */

    #include <linux/io.h>
    +#include <linux/platform_data/omap_ocp2scp.h>

    #include <plat/omap_hwmod.h>
    #include <plat/cpu.h>
    @@ -2499,6 +2500,25 @@ static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = {
    .name = "ocp2scp",
    };

    +/* ocp2scp dev_attr */
    +static struct resource omap44xx_usb_phy_and_pll_addrs[] = {
    + {
    + .name = "usb_phy",
    + .start = 0x4a0ad080,
    + .end = 0x4a0ae000,
    + .flags = IORESOURCE_MEM,
    + },
    + { }
    +};
    +
    +static struct omap_ocp2scp_dev ocp2scp_dev_attr[] = {
    + {
    + .drv_name = "omap-usb2",
    + .res = omap44xx_usb_phy_and_pll_addrs,
    + },
    + { }
    +};
    +
    /* ocp2scp_usb_phy */
    static struct omap_hwmod_opt_clk ocp2scp_usb_phy_opt_clks[] = {
    { .role = "phy_48m", .clk = "ocp2scp_usb_phy_phy_48m" },
    @@ -2516,6 +2536,7 @@ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
    .modulemode = MODULEMODE_HWCTRL,
    },
    },
    + .dev_attr = ocp2scp_dev_attr,
    .opt_clks = ocp2scp_usb_phy_opt_clks,
    .opt_clks_cnt = ARRAY_SIZE(ocp2scp_usb_phy_opt_clks),
    };
    --
    1.7.5.4


    \
     
     \ /
      Last update: 2012-05-30 13:41    [W:0.025 / U:64.736 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site