From patchwork Mon Feb 13 16:15:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: H Hartley Sweeten X-Patchwork-Id: 9570213 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1BD2960442 for ; Mon, 13 Feb 2017 16:20:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A6ED26CFC for ; Mon, 13 Feb 2017 16:20:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF11526E4D; Mon, 13 Feb 2017 16:19:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8325926CFC for ; Mon, 13 Feb 2017 16:19:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=MMbaZxS0RXyQGsk/pKKTHZ/R4l8x8n6qur61TSKCQmc=; b=dQE VuOW3m8CDEnOmjUCnB91/9BPAvkMnAZWN4+C0S3XnCjBYcng1wdjaYBBxLHdDJPaUfKqomM+DzqKp 7VraSkZQrEnOTnGUVkazyCac3jUkT/PsMnLtOdU4tR65gQ71R0u2bGkzouLnA3ucaWxaSsI6kJTRr 23rnTR/SFiADAwpH6ASx2pbDHJQl19jV7dP2gutfLQXfeWU9p0zdxiwi6i9cqS5E9/uIDoNbx/jjM qNw7uz6n0pLkil28rvkS22nxB5IR8339R3cWLbyZeWiSGPFbBauiUtt3JyBeyMBdppKPjZOUlSybr GVN48j1U9jiQaOC1VMNXNBA38Qhqf5w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cdJLy-0002wK-C6; Mon, 13 Feb 2017 16:19:50 +0000 Received: from dukecmmtar04.coxmail.com ([68.99.120.47]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cdJLS-0002dg-NT for linux-arm-kernel@lists.infradead.org; Mon, 13 Feb 2017 16:19:48 +0000 Received: from dukecmimpo02.coxmail.com ([68.99.120.135]) by dukecmmtar04.coxmail.com (InterMail vM.8.01.05.06 201-2260-151-112-20120208) with ESMTP id <20170213161702.KSRG27628.dukecmmtar04.coxmail.com@dukecmimpo02.coxmail.com>; Mon, 13 Feb 2017 11:17:02 -0500 Received: from wheezy.visionengravers.com ([184.183.19.121]) by dukecmimpo02.coxmail.com with bizsmtp id kGGA1u0012ckKpC01GGC4m; Mon, 13 Feb 2017 11:16:16 -0500 Received: from bigguiness by wheezy.visionengravers.com with local (Exim 4.80) (envelope-from ) id 1cdJIA-0001T3-2e; Mon, 13 Feb 2017 09:15:54 -0700 From: H Hartley Sweeten To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: ep93xx: switch to SPARSEMEM Date: Mon, 13 Feb 2017 09:15:32 -0700 Message-Id: <20170213161532.5602-1-hsweeten@visionengravers.com> X-Mailer: git-send-email 2.10.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170213_081946_039462_227463A4 X-CRM114-Status: GOOD ( 10.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: H Hartley Sweeten MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The EP93xx has four chip selects that can be used for the SDRAM memory. These chip selects are decoded to specify an address domain: SDCS3 0x00000000-0x0fffffff with Boot Option ASDO=1 SDCS0 0xc0000000-0xcfffffff SDCS1 0xd0000000-0xdfffffff SDCS2 0xe0000000-x0efffffff SDCS3 0xf0000000-0xffffffff with Boot Option ASDO=0 Because of the row/column/bank architecture of SDRAM, the mapping of these memories into the processor's memory space is discontiguous. Most ep93xx systems only use one of the chip selects. For these systems, ARCH_HAS_HOLES_MEMORYMODEL has worked fine to handle the discontiguous memory. But, some boards use multiple chip selects. The TS-7300 in particular uses SDCS3 (with ASDO=1) and SDCS2. On that system with ARCH_HAS_HOLES_MEMORYMODEL the SDCS2 memory does not get handled correctly and results in the system not booting. Change the EP93xx to ARCH_SPARSEMEM_ENABLE. This handles the discontiguous memory for all configurations. This has been tested on the following ep93xx platforms: EDB9307A with 64 MiB on SDCS0 Vision EP9307 with 64 MiB on SDCS0 TS-7300 with 64 MiB on SDCS3 (with ASDO=1) and 64 MiB on SDCS2 sim.one with 64 MiB on SDCS0 Signed-off-by: H Hartley Sweeten Tested-by: Linus Walleij --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 71cea9e..cc8a88f 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -383,7 +383,7 @@ config ARCH_EBSA110 config ARCH_EP93XX bool "EP93xx-based" - select ARCH_HAS_HOLES_MEMORYMODEL + select ARCH_SPARSEMEM_ENABLE select ARM_AMBA select ARM_PATCH_PHYS_VIRT select ARM_VIC