From mboxrd@z Thu Jan 1 00:00:00 1970 From: kishon@ti.com (Kishon Vijay Abraham I) Date: Wed, 30 May 2012 16:26:33 +0530 Subject: [RFC PATCH 4/5] ARM: OMAP4: add _dev_attr_ to ocp2scp for representing usb_phy In-Reply-To: <1338375394-16268-1-git-send-email-kishon@ti.com> References: <1338375394-16268-1-git-send-email-kishon@ti.com> Message-ID: <1338375394-16268-5-git-send-email-kishon@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 Cc: Benoit Cousson --- 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 +#include #include #include @@ -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