From patchwork Mon Jan 21 10:54:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hideki EIRAKU X-Patchwork-Id: 2010811 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 810623FD1A for ; Mon, 21 Jan 2013 10:58:44 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TxF2x-00076F-0t; Mon, 21 Jan 2013 10:56:11 +0000 Received: from mail-pa0-f48.google.com ([209.85.220.48]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TxF2e-00072O-TB for linux-arm-kernel@lists.infradead.org; Mon, 21 Jan 2013 10:55:53 +0000 Received: by mail-pa0-f48.google.com with SMTP id fa1so3348187pad.21 for ; Mon, 21 Jan 2013 02:54:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=JOyOGmLc5StTd2SA0la69NjA1nMfZqLXyN9eiTukMkk=; b=E80laF3h/a4rn7QtJFvMn8m5s4yO7j6C38M1GFbYuS5lEQ11sA76mXKPS9adQs52Fi Ax/qBFxHW6VcxuxgRa4QlCt89sJxvE9jwF4k1uFu3tpLKFdim2waE9JGwrDTIg4isGSo FeppaJFBK8w0F2enbdkqeVI9s/wJtkMbauAAcH65EnHpCDYQn/3OxYg/+y/4/rI6jugO ry1Apj3b+TOj4CqZrFBEeXzK+X5iC3IAnDUMpBjZUCgNGVGZJ1i7SlI2slvL+DrnpUz2 tqD0MOevjAq9+at4rEtZ1BpcJ5zsCuR1VyUV2WF1ClgB8vcZTQGugV37uh0XNaEpKlmM c06w== X-Received: by 10.66.89.132 with SMTP id bo4mr46005493pab.62.1358765687841; Mon, 21 Jan 2013 02:54:47 -0800 (PST) Received: from tyrell.hq.igel.co.jp ([219.106.231.132]) by mx.google.com with ESMTPS id na7sm8496575pbc.48.2013.01.21.02.54.45 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 21 Jan 2013 02:54:47 -0800 (PST) From: Hideki EIRAKU To: Paul Mundt , Magnus Damm , Russell King , Simon Horman , Laurent Pinchart Subject: [PATCH v6 3/4] ARM: mach-shmobile: sh73a0: Add IPMMU device Date: Mon, 21 Jan 2013 19:54:28 +0900 Message-Id: <1358765669-14567-4-git-send-email-hdk@igel.co.jp> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1358765669-14567-1-git-send-email-hdk@igel.co.jp> References: <1358765669-14567-1-git-send-email-hdk@igel.co.jp> X-Gm-Message-State: ALoCoQm2krsfEQSAWj853uQrZTqHYunjvmQnRqYWkkMyOB6bOPve5foOEX21z4meUrGlw9KxDoCY X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130121_055553_025063_476F568B X-CRM114-Status: GOOD ( 15.00 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.48 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Katsuya MATSUBARA , Hideki EIRAKU , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Damian Hobson-Garcia , linux-arm-kernel@lists.infradead.org, Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds an IPMMU device and notifies the IPMMU driver which devices are connected via the IPMMU module. All devices connected to the main memory bus via the IPMMU module MUST be registered when SHMOBILE_IPMMU and SHMOBILE_IOMMU are enabled because physical address cannot be used while the IPMMU module's MMU function is enabled. Signed-off-by: Hideki EIRAKU --- arch/arm/mach-shmobile/setup-sh73a0.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index db99a4a..36c2b2e 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -754,6 +755,35 @@ static struct platform_device pmu_device = { .resource = pmu_resources, }; +/* an IPMMU module for ICB */ +static struct resource ipmmu_resources[] = { + [0] = { + .name = "IPMMU", + .start = 0xfe951000, + .end = 0xfe9510ff, + .flags = IORESOURCE_MEM, + }, +}; + +static const char * const ipmmu_dev_names[] = { + "sh_mobile_lcdc_fb.0", +}; + +static struct shmobile_ipmmu_platform_data ipmmu_platform_data = { + .dev_names = ipmmu_dev_names, + .num_dev_names = ARRAY_SIZE(ipmmu_dev_names), +}; + +static struct platform_device ipmmu_device = { + .name = "ipmmu", + .id = -1, + .dev = { + .platform_data = &ipmmu_platform_data, + }, + .resource = ipmmu_resources, + .num_resources = ARRAY_SIZE(ipmmu_resources), +}; + static struct platform_device *sh73a0_early_devices[] __initdata = { &scif0_device, &scif1_device, @@ -767,6 +797,7 @@ static struct platform_device *sh73a0_early_devices[] __initdata = { &cmt10_device, &tmu00_device, &tmu01_device, + &ipmmu_device, }; static struct platform_device *sh73a0_late_devices[] __initdata = {