From patchwork Fri Feb 14 10:29:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 24619 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 682AE203C4 for ; Fri, 14 Feb 2014 10:34:46 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id fp1sf24127679pdb.2 for ; Fri, 14 Feb 2014 02:34:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=TnDTjvgap5nLkq65EQwohaiiic9QAbFrYKNJj4x0ZI8=; b=grRzSSTaOzo1suZVps3vekwtEGNHrr23owml9MBYKUvenyR9rMIp98Ie0uz4fDORaA Ze494uT7fbzewjufQmHyx7XYqBHVO0ZlQW3vXKhD+v97Q0Rtr6aJ5dZCXhN1b51N0O5m azaIYwNTxEvtsAbQO4ICq3yz683PESRS+JPJrB9IHca0/apUKxc68wJhoEksiC58+9r8 0Hr+DgnCs4r1irPI5bm1P0L/m1zOZMPa2XbRT3eVvZoT3j5C4rYBviUSO+9ndvtM9fYc y5vgALmc9jBy5qgOt/LahgfhdrfGHB/8sUP00Ef7TnXWkBZbOeNOJq3U6L8FVgiqLkOg ndhQ== X-Gm-Message-State: ALoCoQnYk+dtE05DDasggyS82C0q9n3R52YzYrpx7XIMlAMOp2Gov1iMoNiU1Gdy9EEw/ktK8Bew X-Received: by 10.66.6.1 with SMTP id w1mr2701571paw.6.1392374085646; Fri, 14 Feb 2014 02:34:45 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.42.138 with SMTP id c10ls32997qga.63.gmail; Fri, 14 Feb 2014 02:34:45 -0800 (PST) X-Received: by 10.52.188.41 with SMTP id fx9mr4048782vdc.19.1392374085529; Fri, 14 Feb 2014 02:34:45 -0800 (PST) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id tj7si1773949vdc.72.2014.02.14.02.34.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 02:34:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hu8so9363362vcb.29 for ; Fri, 14 Feb 2014 02:34:45 -0800 (PST) X-Received: by 10.52.179.198 with SMTP id di6mr4151195vdc.7.1392374085329; Fri, 14 Feb 2014 02:34:45 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp98101vcz; Fri, 14 Feb 2014 02:34:44 -0800 (PST) X-Received: by 10.194.71.47 with SMTP id r15mr5321789wju.19.1392374084163; Fri, 14 Feb 2014 02:34:44 -0800 (PST) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id e3si3352512wja.28.2014.02.14.02.34.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Feb 2014 02:34:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WEG3U-000803-JD; Fri, 14 Feb 2014 10:31:37 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WEG37-0004kJ-KF; Fri, 14 Feb 2014 10:31:13 +0000 Received: from mail-wi0-f174.google.com ([209.85.212.174]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WEG2V-0004c6-8H for linux-arm-kernel@lists.infradead.org; Fri, 14 Feb 2014 10:30:38 +0000 Received: by mail-wi0-f174.google.com with SMTP id f8so309777wiw.13 for ; Fri, 14 Feb 2014 02:30:12 -0800 (PST) X-Received: by 10.180.72.195 with SMTP id f3mr1470502wiv.61.1392373812051; Fri, 14 Feb 2014 02:30:12 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id t6sm3227388wix.4.2014.02.14.02.30.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Feb 2014 02:30:11 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Will Deacon , Jonathan Austin Subject: [PATCH 6/6] RFC: ARM: integrator: get rid of Date: Fri, 14 Feb 2014 11:29:31 +0100 Message-Id: <1392373771-17303-7-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1392373771-17303-1-git-send-email-linus.walleij@linaro.org> References: <1392373771-17303-1-git-send-email-linus.walleij@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140214_053035_489436_C3DE704F X-CRM114-Status: GOOD ( 20.55 ) 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.212.174 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: Linus Walleij , Russell King , Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 The Integrator has a custom header defining the BUS_OFFSET for *_to_bus and bus_to_* operations as offset from 0x80000000. I have searched the documentation and cannot find any clue to this set-up. The Integrators have no intrinsic DMA engine(s) that need to perform any bus translations. The only thing I can think of is the PCIv3 host found in the Integrator/AP. After searching its documentation I cannot find any hint whatsoever saying that it would perform DMA operations to memory offset to 0x80000000. The PCIv3 driver does not configure anything for DMA, and the hardware contains registers to configure the local (CPU) side address translation. When I dump the default values of these registers (the Linux driver does not touch them) they contain zeroes meaning a 1-to-1 mapping to the bus. So patch the mapping to use the kernel default. Cc: Will Deacon Cc: Jonathan Austin Cc: Russell King Signed-off-by: Linus Walleij --- Admittedly I'm not certain about how DMA works in PCI scenarios (only experienced with DMA engines) so some input here would be appreciated. Like if DMA support is compulory for PCI hosts or if it's somehow even unused on the PCIv3. And if someone has ever tested some DMA:ing PCI card on this machine. --- arch/arm/Kconfig | 1 - arch/arm/mach-integrator/include/mach/memory.h | 34 -------------------------- 2 files changed, 35 deletions(-) delete mode 100644 arch/arm/mach-integrator/include/mach/memory.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e25419817791..c4094131314e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -325,7 +325,6 @@ config ARCH_INTEGRATOR select HAVE_TCM select ICST select MULTI_IRQ_HANDLER - select NEED_MACH_MEMORY_H select PLAT_VERSATILE select SPARSE_IRQ select USE_OF diff --git a/arch/arm/mach-integrator/include/mach/memory.h b/arch/arm/mach-integrator/include/mach/memory.h deleted file mode 100644 index 334d5e271889..000000000000 --- a/arch/arm/mach-integrator/include/mach/memory.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * arch/arm/mach-integrator/include/mach/memory.h - * - * Copyright (C) 1999 ARM Limited - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef __ASM_ARCH_MEMORY_H -#define __ASM_ARCH_MEMORY_H - -/* - * Physical DRAM offset. - */ -#define PLAT_PHYS_OFFSET UL(0x00000000) - -#define BUS_OFFSET UL(0x80000000) -#define __virt_to_bus(x) ((x) - PAGE_OFFSET + BUS_OFFSET) -#define __bus_to_virt(x) ((x) - BUS_OFFSET + PAGE_OFFSET) -#define __pfn_to_bus(x) (__pfn_to_phys(x) + (BUS_OFFSET - PHYS_OFFSET)) -#define __bus_to_pfn(x) __phys_to_pfn((x) - (BUS_OFFSET - PHYS_OFFSET)) - -#endif