From patchwork Wed Nov 26 21:27:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Gerlach X-Patchwork-Id: 5388191 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A49189F319 for ; Wed, 26 Nov 2014 21:28:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1F6120149 for ; Wed, 26 Nov 2014 21:28:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9BB1E201FE for ; Wed, 26 Nov 2014 21:28:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752846AbaKZV2E (ORCPT ); Wed, 26 Nov 2014 16:28:04 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:44559 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750792AbaKZV2A (ORCPT ); Wed, 26 Nov 2014 16:28:00 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id sAQLRYbX000336; Wed, 26 Nov 2014 15:27:34 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id sAQLRYCH019504; Wed, 26 Nov 2014 15:27:34 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Wed, 26 Nov 2014 15:27:34 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id sAQLRYLD030024; Wed, 26 Nov 2014 15:27:34 -0600 Received: from localhost (j-172-22-146-2.vpn.ti.com [172.22.146.2]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id sAQLRXt14825; Wed, 26 Nov 2014 15:27:33 -0600 (CST) From: Dave Gerlach To: , , , CC: Tony Lindgren , Paul Walmsley , Benoit Cousson , Kevin Hilman , Ohad Ben-Cohen , Suman Anna , Dave Gerlach Subject: [RFC PATCH 1/3] ARM: OMAP2+: Use pdata-quirks for wkup_m3 deassert_hardreset Date: Wed, 26 Nov 2014 15:27:10 -0600 Message-ID: <735836ce94cac8261f0f61851ea6b55ceb3759ba.1417029919.git.d-gerlach@ti.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use pdata-quirks to provide platform data required for reset of the wkup_m3 during boot. Signed-off-by: Dave Gerlach --- arch/arm/mach-omap2/pdata-quirks.c | 13 +++++++++++++ include/linux/platform_data/wkup_m3.h | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 include/linux/platform_data/wkup_m3.h diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index cec9d6c..1c0bcdb 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -17,6 +17,7 @@ #include #include +#include #include "am35xx.h" #include "common.h" @@ -260,6 +261,14 @@ static void __init omap3_tao3530_legacy_init(void) } #endif /* CONFIG_ARCH_OMAP3 */ +#ifdef CONFIG_SOC_AM33XX +static struct wkup_m3_platform_data wkup_m3_data = { + .reset_name = "wkup_m3", + .assert_reset = omap_device_assert_hardreset, + .deassert_reset = omap_device_deassert_hardreset, +}; +#endif + #ifdef CONFIG_ARCH_OMAP4 static void __init omap4_sdp_legacy_init(void) { @@ -355,6 +364,10 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0", &am35xx_emac_pdata), #endif +#ifdef CONFIG_SOC_AM33XX + OF_DEV_AUXDATA("ti,am3353-wkup-m3", 0x44d00000, "44d00000.wkup_m3", + &wkup_m3_data), +#endif #ifdef CONFIG_ARCH_OMAP4 OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a100040, "4a100040.pinmux", &pcs_pdata), OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a31e040, "4a31e040.pinmux", &pcs_pdata), diff --git a/include/linux/platform_data/wkup_m3.h b/include/linux/platform_data/wkup_m3.h new file mode 100644 index 0000000..6ee33d7 --- /dev/null +++ b/include/linux/platform_data/wkup_m3.h @@ -0,0 +1,23 @@ +/* + * omap wkup_m3: platform data + * + * Copyright (C) 2014 Texas Instruments, Inc. + * + * Dave Gerlach + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef _LINUX_PLATFORM_DATA_WKUP_M3_H +#define _LINUX_PLATFORM_DATA_WKUP_M3_H + +struct wkup_m3_platform_data { + const char *reset_name; + + int (*assert_reset)(struct platform_device *pdev, const char *name); + int (*deassert_reset)(struct platform_device *pdev, const char *name); +}; + +#endif /* _LINUX_PLATFORM_DATA_WKUP_M3_H */