aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
diff options
context:
space:
mode:
authorSekhar Nori <nsekhar@ti.com>2016-02-18 06:19:56 -0500
committerPaul Walmsley <paul@pwsan.com>2016-02-25 02:17:42 -0500
commit1c96bee4df1998b9dec3e2ef8f77e8436e29342b (patch)
tree4b16b9e8f55cb522c250d7532afd74fb09cbff92 /arch/arm/mach-omap2/omap_hwmod_7xx_data.c
parent4321dc8dff356cdc852936fcfb443463b504890d (diff)
ARM: DRA7: hwmod: Add custom reset handler for PCIeSS
Add a custom reset handler for DRA7x PCIeSS. This handler is required to deassert PCIe hardreset lines after they have been asserted. This enables the PCIe driver to access registers after PCIeSS has been runtime enabled without having to deassert hardreset lines itself. With this patch applied, used lspci to make sure connected PCIe device enumerates on DRA74x and DRA72x EVMs. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Reported-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Kishon Vijay Abraham I <kishon@ti.com> Cc: Suman Anna <s-anna@ti.com> Cc: Dave Gerlach <d-gerlach@ti.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod_7xx_data.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_7xx_data.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index b61355e2a771..252b74633e31 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -1526,8 +1526,31 @@ static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
1526 * 1526 *
1527 */ 1527 */
1528 1528
1529/*
1530 * As noted in documentation for _reset() in omap_hwmod.c, the stock reset
1531 * functionality of OMAP HWMOD layer does not deassert the hardreset lines
1532 * associated with an IP automatically leaving the driver to handle that
1533 * by itself. This does not work for PCIeSS which needs the reset lines
1534 * deasserted for the driver to start accessing registers.
1535 *
1536 * We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset
1537 * lines after asserting them.
1538 */
1539static int dra7xx_pciess_reset(struct omap_hwmod *oh)
1540{
1541 int i;
1542
1543 for (i = 0; i < oh->rst_lines_cnt; i++) {
1544 omap_hwmod_assert_hardreset(oh, oh->rst_lines[i].name);
1545 omap_hwmod_deassert_hardreset(oh, oh->rst_lines[i].name);
1546 }
1547
1548 return 0;
1549}
1550
1529static struct omap_hwmod_class dra7xx_pciess_hwmod_class = { 1551static struct omap_hwmod_class dra7xx_pciess_hwmod_class = {
1530 .name = "pcie", 1552 .name = "pcie",
1553 .reset = dra7xx_pciess_reset,
1531}; 1554};
1532 1555
1533/* pcie1 */ 1556/* pcie1 */