From patchwork Fri Jan 20 16:44:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 9528987 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 AEB35601AE for ; Fri, 20 Jan 2017 16:45:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA79D2868F for ; Fri, 20 Jan 2017 16:45:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABD7E28698; Fri, 20 Jan 2017 16:45:57 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no 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 586CD2868F for ; Fri, 20 Jan 2017 16:45:57 +0000 (UTC) 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 1cUcK4-0002NA-42; Fri, 20 Jan 2017 16:45:56 +0000 Received: from mail-it0-f67.google.com ([209.85.214.67]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cUcK0-0002GW-H7 for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2017 16:45:54 +0000 Received: by mail-it0-f67.google.com with SMTP id e137so3500421itc.0 for ; Fri, 20 Jan 2017 08:45:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=99t30LIlWxDZzbqRsk6W7CvtoG8V+u6EKcJW0b29nxg=; b=K9iYzG67coqFwLB8uyRhuY+ASpwX0WjqQzhW8edjzlj5RerXjw45YZN88w9D11afCu PGPCgA5+mG3tgQo9DTb6/hBOYbpdumwEeh6iCAVsl2CW3ZQTNMKyA4hD+4740EgeV1qg X20KZPTiIGZzOXXNWuXSnVzoj4xGL8lYLjtFyPMnFW6IN9Ww7VkXxBp5JQmYP2jFwrJz dzqf7tDcuyV8KjRYkSYkSpJgroHciE2HOfUjbHOHRROQO61ekwp7Ei1OUHxLRHU4uOkX Oy7kRY4cMbPSNjx8s6KVcgecf9H3fc0jAqUXktMSpxEaXsggqztprwFf+6gHvZ2n5bCb aMJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=99t30LIlWxDZzbqRsk6W7CvtoG8V+u6EKcJW0b29nxg=; b=bIKLgSxusS3NSdDCofSc4y4fcu27Ke7/W+peJoMeP+XxxOyhUB8DuBqM+NDqGgccm1 gxOrQbETjapJnVGwINTlaktlJsfujHpZsPrU81G8ONgNZZfSYR9motJTL4jSHVL3N6Eu x2oErOrWCw5ylkK+50Rh8lVAqijouTCwmWpu5+yVT4vdQc0jJUkXOPR8GSrIiXjVqBh/ 9hkPiimNJUJb+vk0GKH0qy+wAMcv+/ijKYxxaELY8INxLy9l5jePq4BUG6LkaityTN58 LX/tDdX+txQQ0u7oLxZ9cY8Lv6Qzy0o0JPoO2qGGm8ooRtngrp9Ixp+yyma58TxnPKgk cQqg== X-Gm-Message-State: AIkVDXLTrdDL9OxedUOfZeDOl3N/FnoAmsKDnGhPPGOcjtjrGmCPDbdQ/+3OTNhRL7GjAw== X-Received: by 10.36.69.79 with SMTP id y76mr4310085ita.20.1484930670614; Fri, 20 Jan 2017 08:44:30 -0800 (PST) Received: from logic-VirtualBox.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id a129sm4768410ioe.15.2017.01.20.08.44.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 08:44:29 -0800 (PST) From: aford173@gmail.com To: tony@atomide.com, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: [PATCH] ARM: OMAP3: Fix SoC detection of OMAP36/37 Family Date: Fri, 20 Jan 2017 10:44:01 -0600 Message-Id: <1484930641-18566-1-git-send-email-aford173@gmail.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170120_084552_614293_FA1B8B61 X-CRM114-Status: GOOD ( 11.52 ) 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: Adam Ford 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 From: Adam Ford The OMAP36/37 families are similar, but there are a few features sections that can help identify some of them. Let's add checks for 3630/3730, OMAP3621, DM3725, OMAP3615/DM3715, OMAP3611, and AM3703 all based on features similar to what was done for the OMAP34xx/35xx series The checkpatch flags some warnings for braces, but I kept the coding style to match the adjacent code for consistency. I don't have an OMAP36xx to test, but this was tested on both a DM3730 and AM3703. Signed-off-by: Adam Ford diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index cc6d9fa..e2274a1 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -223,7 +223,15 @@ static void __init omap3_cpuinfo(void) * and CPU class bits. */ if (soc_is_omap3630()) { - cpu_name = "OMAP3630"; + if (omap3_has_iva() && omap3_has_sgx()) { + cpu_name = (omap3_has_isp()) ? "OMAP3630/DM3730" : "OMAP3621"; + } else if (omap3_has_iva()) { + cpu_name = "DM3725"; + } else if (omap3_has_sgx()) { + cpu_name = "OMAP3615/AM3715"; + } else { + cpu_name = (omap3_has_isp()) ? "AM3703" : "OMAP3611"; + } } else if (soc_is_am35xx()) { cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505"; } else if (soc_is_ti816x()) {