From patchwork Mon Sep 15 13:45:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4905451 Return-Path: X-Original-To: patchwork-linux-sh@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 04CFA9F32F for ; Mon, 15 Sep 2014 13:40:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 46593201DE for ; Mon, 15 Sep 2014 13:43:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 904EC2012D for ; Mon, 15 Sep 2014 13:43:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752626AbaIONnL (ORCPT ); Mon, 15 Sep 2014 09:43:11 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:55013 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752656AbaIONnK (ORCPT ); Mon, 15 Sep 2014 09:43:10 -0400 Received: by mail-pa0-f42.google.com with SMTP id lj1so6501400pab.1 for ; Mon, 15 Sep 2014 06:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=9wJUSFbioV3CpUFqbQmoncJv1zURnp4ePVJ0krpF92Q=; b=A5/N9GNEdlbu3mArE1qqN6NBi/SX0HWzTasjbUzD29Pw6CLOOQGZwbzsx1qK0X0fXd uS7SO3mqZBFOkmrc/Sd5gsnjT3E03PKs0YxbUi83E+OK1o1oYWoeLfDsK29384Z3FntA GOT5Pp3osJ9kv0mCEhcQXQfWUYUBPxzHAeE4Zn8f5U7DUTYA5yW1Sj7abjXj0gWm7Gth nxuDz3Ei5S2EwEt2t+RxW2c6s0ThLzav7WeH0Oau0I2i9e55ZyRAi0R4vO4eerqM/0RG xBbrXMw9JJLOgKbuHOUtcHkUcDGdHqcQ30nCqpFWTHeiYFwGVtYS2D6tBmLReAjiH+8d DYFg== X-Received: by 10.68.194.194 with SMTP id hy2mr5271070pbc.149.1410788590024; Mon, 15 Sep 2014 06:43:10 -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 qp9sm11531051pbc.31.2014.09.15.06.43.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Sep 2014 06:43:08 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm Date: Mon, 15 Sep 2014 22:45:29 +0900 Message-Id: <20140915134529.21562.28560.sendpatchset@w520> Subject: [PATCH][TEST] ARM: shmobile: lager-reference: Instantiate IPMMU-MX 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 Hook up the IPMMU MX together with the DU on the Lager board. Based on the very similar r8a7791 Koelsch code written by Laurent Pinchart, thanks to him for that. Tested with DU using the VGA connector on the r8a7790 Lager board. Not-Signed-off-by: Magnus Damm --- Written against renesas-devel-20140911-v3.17-rc4 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-15 20:45:37.000000000 +0900 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -88,6 +89,34 @@ static void __init lager_add_du_device(v } /* + * IPMMUs + * + * MX: for JPU, 2DDMAC, VSP, DCU, FDP, IMR-LSX2, DU, VCP, VPC and VIN + */ +static struct resource ipmmu_mx_resources[] = { + DEFINE_RES_MEM(0xfe951800, 0x800), + DEFINE_RES_IRQ(gic_spi(222)), +}; + +static const struct ipmmu_vmsa_master ipmmu_mx_masters[] = { + { "rcar-du-r8a7790", 15, }, +}; + +static struct ipmmu_vmsa_platform_data ipmmu_mx_platform_data = { + .masters = ipmmu_mx_masters, + .num_masters = ARRAY_SIZE(ipmmu_mx_masters), +}; + +static void __init lager_add_ipmmu_devices(void) +{ + platform_device_register_resndata(NULL, "ipmmu-vmsa", -1, + ipmmu_mx_resources, + ARRAY_SIZE(ipmmu_mx_resources), + &ipmmu_mx_platform_data, + sizeof(ipmmu_mx_platform_data)); +} + +/* * This is a really crude hack to provide clkdev support to platform * devices until they get moved to DT. */ @@ -104,6 +133,7 @@ static void __init lager_add_standard_de shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + lager_add_ipmmu_devices(); lager_add_du_device(); }