From patchwork Tue Aug 28 08:08:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Barry Song <21cnbao@gmail.com> X-Patchwork-Id: 1379551 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 050423FC71 for ; Tue, 28 Aug 2012 08:11:54 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T6Gr9-0003ld-D8; Tue, 28 Aug 2012 08:09:03 +0000 Received: from mail-lb0-f177.google.com ([209.85.217.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T6Gr6-0003kj-Qy for linux-arm-kernel@lists.infradead.org; Tue, 28 Aug 2012 08:09:01 +0000 Received: by lbbgf7 with SMTP id gf7so2926036lbb.36 for ; Tue, 28 Aug 2012 01:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=rrIc/5ozJKOxn//wmKbfxC9C0jrNiz9mFAPUca2J1wg=; b=GMkIFc9gt5YQ0H0Z9dIu4G5iQznjm73SQ0IgDRl8ktjBIiKNhKKUlCnq0ON9/iMQLA pLpDc0E+dOnqKlXoPKhLdEp0EW5cpAYtdBTFnfdeJL91ehy4u7n25XjZIR/8tBUCsAZ5 RbQGxWpjghO8DbuBkLxDSdlqlrnFW6OUfVhevsgi2UQnGUWNephRVz+CQi+1tFI1kREi VM1CmFt4BEnDVjfbpvimtKD4F2Mc7GcbNrJ+3B/1nyD4VBUsL45LMQwzoc53AOaRUAQv YTXi56TeCMwYOHzsaLTFwVvuaHGW3pn44BuqZaSrOho9CjvE1YrFIXzrGkEo8Qtn+afi LW3w== Received: by 10.152.108.144 with SMTP id hk16mr17505202lab.2.1346141338706; Tue, 28 Aug 2012 01:08:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.82.137 with HTTP; Tue, 28 Aug 2012 01:08:38 -0700 (PDT) In-Reply-To: References: <1345450787-17246-1-git-send-email-Barry.Song@csr.com> <201208210757.32852.arnd@arndb.de> <201208210920.52816.arnd@arndb.de> From: Barry Song <21cnbao@gmail.com> Date: Tue, 28 Aug 2012 16:08:38 +0800 Message-ID: Subject: Re: [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC To: Arnd Bergmann , Stephen Warren X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (21cnbao[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: olof@lixom.net, workgroup.linux@csr.com, linux-arm-kernel@lists.infradead.org, Barry Song , Xianglong Du 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: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 2012/8/28 Barry Song <21cnbao@gmail.com>: > 2012/8/21 Arnd Bergmann : >> On Tuesday 21 August 2012, Barry Song wrote: >>> then i add these to Kconfig.debug as it is a common way >>> >>> config DEBUG_PRIMA2_UART1 >>> bool "Kernel low-level debugging on DaVinci DA8XX using UART1" >>> depends on ARCH_PRIMA2 >>> help >>> Say Y here if you want the debug print routines to direct >>> their output to UART1 serial port on SiRFprimaII devices. >>> >>> config DEBUG_MARCO_UART1 >>> bool "Kernel low-level debugging on DaVinci DA8XX using UART2" >>> depends on ARCH_MARCO >>> help >>> Say Y here if you want the debug print routines to direct >>> their output to UART1 serial port on SiRFmarco devices. >>> >>> and these in mach-prima2/include/mach/uart.h >>> >>> #ifdef CONFIG_DEBUG_PRIMA2_UART1 >>> #define SIRFSOC_UART1_PA_BASE 0xb0060000 >>> #elif defined(CONFIG_DEBUG_MARCO_UART1) >>> #define SIRFSOC_UART1_PA_BASE 0xcc060000 >>> #endif >>> >>> the above codes seem still ugly ? >>> >> >> No, that's fine, about as a good as it gets with today's kernel >> capabilities. Just fix the description to have the correct >> SoC name instead of "DaVinci DA8XX" ;-) > > except the DEBUG_LL uart base address, i missed the zreladdr-y. for > primaii, it is 0x00008000, for marco, it is 0x40008000 as marco's > memory space begins from 0x4000000. > i would to have AUTO_ZRELADDR for the whole SiRF series. > but for uImage load address difference in uImage header, which blocks > multiple SoCs from using same uImage, is "KERNEL_NOLOAD" uImage type > the current generic solution? also add Stephen Warren. i have two verified ways to resolve this problem: 1. use "kernel noload", build uImage by: make uImage UIMAGE_TYPE=kernel_noload and add the following patch in kernel: > >> >> Arnd > > -barry -barry diff --git a/arch/arm/mach-prima2/Makefile.boot b/arch/arm/mach-prima2/Makefile.boot index 53c5225..059bcd7 100644 --- a/arch/arm/mach-prima2/Makefile.boot +++ b/arch/arm/mach-prima2/Makefile.boot @@ -1,12 +1,4 @@ -zreladdr-y += 0x00008000 -params_phys-y := 0x00000100 -initrd_phys-y := 0x00800000 #we use kernel_noload uImage and AUTO_ZRELADDR +zreladdr-y += 0x0 2. don't use kernel's uImage target, mkimage uImage out of kernel by giving mkimage the "-a 0x40008000" and keep kernel unchanged. anyway, i think arm SoC needs a generic way to handle this kind of problem. if we move to 1, i think almost all ARM SoCs don't need Makefile.boot again.