From patchwork Tue Sep 16 11:20:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4916631 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 22D03BEEA5 for ; Tue, 16 Sep 2014 11:18:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 00044201DC for ; Tue, 16 Sep 2014 11:18:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B5B0820149 for ; Tue, 16 Sep 2014 11:18:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752833AbaIPLSO (ORCPT ); Tue, 16 Sep 2014 07:18:14 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:39889 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752824AbaIPLSN (ORCPT ); Tue, 16 Sep 2014 07:18:13 -0400 Received: by mail-pa0-f51.google.com with SMTP id kx10so8736756pab.10 for ; Tue, 16 Sep 2014 04:18:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=eqSmeAd8ZQ4SI95kzV0nCBtoQHEsi0Em0uYsvczIrUY=; b=ty1OvnP1My9pSSFKRDp1ml2qvLlVILR066cD1t7WWeN1G8jrYBbRD0Qbl4UWhzGcfg RjzQ8qf5eVAYRz60zginp3crCmMf2CceVznvdgdIgozUD4uPPMrJYhUKPjtOfHc/uSiY hGwTvC4+OXPy/Pl1hg1ZHdiV4Oe+VIZ0loPb1JCSlwi/lYKW0gsOMVaLZ+G6LjE+ivQ+ oCYGPqEhbd/ygKa8Zv2DMStLDb4fGjckPzhYhnyIXv67Mj+MW6SL1vCF/KJz4a+JK+BM l5Jy7UDVuC9u228Ifx4Dn1CH8GhdRQdcYP96BECSEKqa0XbJJwSY4CKgqNiRp7GqMj1U cxhw== X-Received: by 10.70.118.68 with SMTP id kk4mr57434918pdb.21.1410866292926; Tue, 16 Sep 2014 04:18:12 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id pn1sm13916901pbc.21.2014.09.16.04.18.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Sep 2014 04:18:11 -0700 (PDT) From: Magnus Damm To: Magnus Damm , linux-sh@vger.kernel.org Cc: Magnus Damm , laurent.pinchart@ideasonboard.com Date: Tue, 16 Sep 2014 20:20:34 +0900 Message-Id: <20140916112034.14889.85988.sendpatchset@w520> In-Reply-To: <20140916112001.14889.62059.sendpatchset@w520> References: <20140916112001.14889.62059.sendpatchset@w520> Subject: [PATCH 03/03] ARM: shmobile: lager-reference: IOMMUSY1 and USB tests Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 From: Magnus Damm Add some prototype code to allow testing of IPMMUSY1 and USB 2.0 Host controllers on the r8a7790 Lager board. The USB 2.0 Host controllers are described via DT while the IPMMU device is handled as platform device for now. Not for upstream merge. Not-Yet-Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/board-lager-reference.c | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/arch/arm/mach-shmobile/board-lager-reference.c +++ work/arch/arm/mach-shmobile/board-lager-reference.c 2014-09-16 17:04:43.000000000 +0900 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -88,6 +89,34 @@ static void __init lager_add_du_device(v } /* + * IPMMUSY1 + */ +static struct resource ipmmu_resources[] = { + DEFINE_RES_MEM(0xe6290800, 0x800), + DEFINE_RES_IRQ(gic_spi(225)), +}; + +static const struct ipmmu_vmsa_master ipmmu_masters[] = { + { "ee090000.pci", 6, }, + { "ee0b0000.pci", 8, }, + { "ee0d0000.pci", 9, }, +}; + +static struct ipmmu_vmsa_platform_data ipmmu_platform_data = { + .masters = ipmmu_masters, + .num_masters = ARRAY_SIZE(ipmmu_masters), +}; + +static void __init lager_add_ipmmu_devices(void) +{ + platform_device_register_resndata(NULL, "ipmmu-vmsa", -1, + ipmmu_resources, + ARRAY_SIZE(ipmmu_resources), + &ipmmu_platform_data, + sizeof(ipmmu_platform_data)); +} + +/* * This is a really crude hack to provide clkdev support to platform * devices until they get moved to DT. */ @@ -105,6 +134,7 @@ static void __init lager_add_standard_de of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); lager_add_du_device(); + lager_add_ipmmu_devices(); } static const char *lager_boards_compat_dt[] __initdata = {