From patchwork Thu Oct 11 19:43:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Shugov X-Patchwork-Id: 1586801 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 13CC5DFF71 for ; Fri, 12 Oct 2012 13:42:13 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TMfT4-0004BQ-Jw; Fri, 12 Oct 2012 13:39:58 +0000 Received: from mail-qc0-f177.google.com ([209.85.216.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TMOey-0006mq-Ke for linux-arm-kernel@lists.infradead.org; Thu, 11 Oct 2012 19:43:09 +0000 Received: by mail-qc0-f177.google.com with SMTP id u28so1766545qcs.36 for ; Thu, 11 Oct 2012 12:43:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=8a9s8MbM7qyRoap4BeK2H+WBS5rqJr6ZD+9gQbR4Yg8=; b=KL4pDoYC7ypQCyq42yjd3LnWLT2k3km/+vi6Mp66u/2H3+zviBBIzSLnE6+btaExUr ikPqC79QovfM3J7XPtH+FwUDvrq0DUgqP1y9b5cD+FnsD/CVno2XCm+oAtVca6KUhyiY mVNuwDWBVrRjwjKIIBjCVCgRGgaj1isxdDZUaITcQVW904NMudFxWNT8oFZBgyVAUVPK uG6Y9rg53l7F/Ary1zjSQ/ku01Kcwbfn7P/1+wBxGzCW6/aZ1xP0A2THaLZsyQZSqk9t 6K7qdEICdJdIvWIEgHcGeiuqvdr2h3LbKvnjGjEuXcb7b5Dc+0xPM3yw+q5ZQRo+UdI9 Eskw== MIME-Version: 1.0 Received: by 10.224.203.193 with SMTP id fj1mr3659829qab.13.1349984585475; Thu, 11 Oct 2012 12:43:05 -0700 (PDT) Received: by 10.49.38.36 with HTTP; Thu, 11 Oct 2012 12:43:05 -0700 (PDT) Date: Thu, 11 Oct 2012 22:43:05 +0300 Message-ID: Subject: [PATCH] SoC: AT91: at91sam9g10ek: Impossible to detect the SOC type From: Ivan Shugov To: linux-arm-kernel@lists.infradead.org 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.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ivan.shugov[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.216.177 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] 0.0 HTML_MESSAGE BODY: HTML included in message -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 X-Mailman-Approved-At: Fri, 12 Oct 2012 09:39:44 -0400 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 Hi! I'm working on a custom board based on at91sam9g10ek, so the same port of linux kernel is used. Linux kernel version: 3.6.1 Problem: SoC for at91sam9g10 device can't be detected, so the kernel can't boot. Reason: 'cidr' register in 'static void __init soc_detect(u32 dbgu_base)' from 'arch/arm/mach-at91/setup.c' at line '154' is checked for ARCH_ID_AT91SAM9G10 coincidence, before masking AT91_CIDR_VERSION bit. So the console output with earlyprintk enabled is: //================================================ Linux version 3.6.1 (user-0@debian-OS) (gcc version 4.5.2 (Sourcery G++ Lite 2011.03-42) ) #10 Wed Oct 10 15:02:35 EDT 2012 CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177 CPU: VIVT data cache, VIVT instruction cache Machine: Atmel AT91SAM9G10-EK Ignoring tag cmdline (using the default kernel command line) bootconsole [earlycon0] enabled Memory policy: ECC disabled, Data cache writeback Kernel panic - not syncing: AT91: Impossible to detect the SOC type [] (unwind_backtrace+0x0/0xe0) from [] (panic+0x78/0x1cc) [] (panic+0x78/0x1cc) from [] (at91_map_io+0x90/0xc8) [] (at91_map_io+0x90/0xc8) from [] (paging_init+0x564/0x6d0) [] (paging_init+0x564/0x6d0) from [] (setup_arch+0x464/0x704) [] (setup_arch+0x464/0x704) from [] (start_kernel+0x6c/0x2d4) [] (start_kernel+0x6c/0x2d4) from [<20008040>] (0x20008040) //================================================ Solution: replace 'cidr' with 'socid' //================================================ //================================================ Best regards, Ivan Shugov --- a/arch/arm/mach-at91/setup.c 2012-10-07 11:41:28.000000000 -0400 +++ b/arch/arm/mach-at91/setup.c 2012-10-11 15:41:48.000000000 -0400 @@ -151,7 +151,7 @@ static void __init soc_detect(u32 dbgu_b } /* at91sam9g10 */ - if ((cidr & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) { + if ((socid & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) { at91_soc_initdata.type = AT91_SOC_SAM9G10; at91_boot_soc = at91sam9261_soc; }