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: 9528985 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 E0521601AE for ; Fri, 20 Jan 2017 16:44:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F13AA28645 for ; Fri, 20 Jan 2017 16:44:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5CE02868F; Fri, 20 Jan 2017 16:44:40 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BBC928645 for ; Fri, 20 Jan 2017 16:44:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752865AbdATQoi (ORCPT ); Fri, 20 Jan 2017 11:44:38 -0500 Received: from mail-it0-f66.google.com ([209.85.214.66]:33583 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752164AbdATQog (ORCPT ); Fri, 20 Jan 2017 11:44:36 -0500 Received: by mail-it0-f66.google.com with SMTP id e137so3500422itc.0 for ; Fri, 20 Jan 2017 08:44:36 -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=kqCrC9F0B4PMtaIegToZA/OoWnX+lNRA9LC0gSzo9DLeAaoybuWcZ2V62P3wI+umrb kizsIj4M83Di3otKNKm4LisP7Ak/srMcIOB9Fg2XLbQoVrGWLnbTasP+LA/ZzPxtyqxM uAvQfeKH7LHxvyjBmL+0Bm1lg3NWiIi9m5dMlzv8H59JF58W0c8+rW6TxE5081ljtAEE ERFOByKh1QG6dK2Ej0ioTtr7L82A4n8/V0bukFwRVMTs78Mo7Nff61/xoxFwxmaw3w41 AjD02OkrUmJ1oWyaxNVtmSH69EHs31IKfplrp4hpTwegigSj0aFXv8N+R1ryW4FUJ+Sz pMuQ== X-Gm-Message-State: AIkVDXIJebmFVo0/zOpU4/LB+BuF5Skl7tk82FLDOjfVTMp99agAp5B1FdF5Lxz8jucrng== 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 Cc: Adam Ford 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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()) {