From patchwork Mon Sep 10 10:30:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damian Hobson-Garcia X-Patchwork-Id: 1431201 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C5EEEDF28C for ; Mon, 10 Sep 2012 10:31:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756282Ab2IJKbg (ORCPT ); Mon, 10 Sep 2012 06:31:36 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:44257 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755918Ab2IJKbg (ORCPT ); Mon, 10 Sep 2012 06:31:36 -0400 Received: by mail-pb0-f46.google.com with SMTP id rr13so2245241pbb.19 for ; Mon, 10 Sep 2012 03:31:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=YkYOFaq4Gp6Ae7FlYgrR2Q3Nd8ovrVsjRjuf8wx0/pQ=; b=SMTUaFe4sIq1TnRe/qZEoLDmULdUkrcG4mX19KH5wwAC9cYh8AcWELw02edDMvLFOc qllvqd1QkW2HRlk3GvvtLaHRc/d6Ls7Dem672NGzjNYggYyM2mAPMGDzTknjewDr6czU q62gV2JoSrHCoQBqZBHJ5R+fyl46PyaQnFES/PUkVlL2aF8m0i6Gc7gGHNzXZHmWc39S ncM58zwPJF9PfIr2G8Kn3kqyx3EauRBBPGOzcy2Q1QG0wU4mcIv24M7Fy9iDO2s7CKlG TBvCXy8hgJlpz2CDcq38hQjgAuR/wVMqTnN7GY2l0TCPXJy9UIyWR/FguMDu1UR4EqGz N4+w== Received: by 10.66.83.234 with SMTP id t10mr21308158pay.39.1347273095759; Mon, 10 Sep 2012 03:31:35 -0700 (PDT) Received: from localhost.localdomain ([219.106.231.132]) by mx.google.com with ESMTPS id pi1sm2952472pbb.7.2012.09.10.03.31.32 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Sep 2012 03:31:34 -0700 (PDT) From: Damian Hobson-Garcia To: horms@verge.net.au, magnus.damm@gmail.com, hjk@hansjkoch.de Cc: linux-sh@vger.kernel.org, hdk@igel.co.jp, Damian Hobson-Garcia Subject: [RFC PATCH 2/2] ARM: shmobile: sh7372: Change VPU UIO to uio_dmem_genirq Date: Mon, 10 Sep 2012 19:30:55 +0900 Message-Id: <1347273055-10311-3-git-send-email-dhobsong@igel.co.jp> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1347273055-10311-1-git-send-email-dhobsong@igel.co.jp> References: <1347273055-10311-1-git-send-email-dhobsong@igel.co.jp> X-Gm-Message-State: ALoCoQk2o2v36qKAYptwiJZsL89d+kaBfx1+fsWdC5WPFCQkVQhuPoP7wkYKLhTJrCf72byuelVu Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org This allows the VPU memory to be allocated dynamically only when it is needed. Signed-off-by: Damian Hobson-Garcia --- arch/arm/mach-shmobile/setup-sh7372.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 1106b4f..fe75701 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -761,11 +762,19 @@ static struct platform_device usb_dma1_device = { }, }; +static unsigned int region_sizes[] = { + (32 << 20), +}; + /* VPU */ -static struct uio_info vpu_platform_data = { - .name = "VPU5HG", - .version = "0", - .irq = intcs_evt2irq(0x980), +static struct uio_dmem_genirq_pdata vpu_platform_data = { + .uioinfo = { + .name = "VPU5HG", + .version = "0", + .irq = intcs_evt2irq(0x980), + }, + .dynamic_region_sizes = region_sizes, + .num_dynamic_regions = ARRAY_SIZE(region_sizes), }; static struct resource vpu_resources[] = { @@ -778,7 +787,7 @@ static struct resource vpu_resources[] = { }; static struct platform_device vpu_device = { - .name = "uio_pdrv_genirq", + .name = "uio_dmem_genirq", .id = 0, .dev = { .platform_data = &vpu_platform_data,