Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1740794imm; Thu, 14 Jun 2018 03:08:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJQW5nzHj4D0iamyF9ZRSyA4QpzlKcsjG5mSvKG3eV6n9Jb2vLDHiDppBi6/32nJKWsWTIp X-Received: by 2002:a62:2394:: with SMTP id q20-v6mr8792540pfj.1.1528970882026; Thu, 14 Jun 2018 03:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528970882; cv=none; d=google.com; s=arc-20160816; b=ppzQCyKRy9eEY8YK5LecgXwQJcI1ue+SZuyFwciyoeeuPcS5XsjeKEOlqn5tHe2Bj2 xc0/51ufBwVNbbyOA8nEdBjRggNxhY3JOUCfv7NjyXzNt3pjGdWXCOIXvdz5Vyc8XVc2 P1Og/YgzUrj7jx0BKM/RGZasWtUURNB8VC52EJOXfSSw3WxjayTPZ4eJ/Ay9h6MBU5aD OtV946DN5FJvgLQThaGuvYpOUuia5Qb1wQJNeQX6jZZeIzqarfu7aiaxhk4YiWq0M9Dy B8e/6YWnmr7+t/xcbPSfJcAiWBbvSFB9TfONqp2dZxA7PpAcpSXCanoZI0KvdiefsLjv oQmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=lah5Gb3LjbyT/v0bjCif2j1q5nF8aHLOdsVULUBXikA=; b=tcJNzW3UvL+goMgQK7Ce7QldDekmjgvT0X3Q0onppcWo75CuKnv12yn5pDzLCqz9Zi KR0X+wW7+XZ7P5W/zV1z/C0ZffzLvPFpTjO2dYk4lLmozUmGLlJNBPPYhJ9jfINKvPud fv86mflUGVQ5LgFZ2It8XQiNeiomrj7dNthITYu4LLRiDhHX3fJamdnuHNp4+LjRqEEK JUP9lsI/o0hMXf/ywZUX8tSGCefwjgFkg0eJHEfqfE7LGGYCrvnEVyyyO5uURKnXVXIv v41pDonD9+NCnArm2kVS7EP2mTRsGoc84yPk11p1blbtxt3ff+05TZlGR7KDl4r+Z8WV oIvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=h7hu8+G2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o128-v6si5303380pfg.5.2018.06.14.03.07.47; Thu, 14 Jun 2018 03:08:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=h7hu8+G2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754871AbeFNKHY (ORCPT + 99 others); Thu, 14 Jun 2018 06:07:24 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:38820 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754709AbeFNKHW (ORCPT ); Thu, 14 Jun 2018 06:07:22 -0400 Received: by mail-lf0-f66.google.com with SMTP id i83-v6so8512880lfh.5; Thu, 14 Jun 2018 03:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=lah5Gb3LjbyT/v0bjCif2j1q5nF8aHLOdsVULUBXikA=; b=h7hu8+G2AWLVDBEteXIZx8fFPuIkgnKUTWbTmbOs+H+QTmIWK/qqzkG6w+kGzi4Ams ebPCyFF/GXV6uLDu+d2L7sVJ6qfEef6Tyfdoa78idXYwxrf4NU6X8wDTIteAJhUOCIfD oZQlzfCw1RFMe2+lo+T+kSeEM9DLe0gfBd6/AxeHPhaCWyZUoEoA2YSll5s+QTzLgVgp LIe4E7l88/H2+uqQdpo26I8WleNACbQQrsHZRB8YAGaAKl9QhUsYluneFbZnmGWgYNzH cbkdmodQBumlVfWFlU4TW1lTVDlk+SONfQuZNxJVqzBxx6idfiesELh1z6Efh9MThhi1 Yk+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=lah5Gb3LjbyT/v0bjCif2j1q5nF8aHLOdsVULUBXikA=; b=dKHp8JD1H6EpeeBWRjS9mSBmsZG5qjcXovQKITjTAHSoVO5HYB27+kyarE7dKUzcml qaf8CR3DRA/XvuCaFXtIadal5HDL4+vIL8dObluYSNyX/xEhww4e8YkEeFSyA7lFlZCe 4mRvnmhn9Y6wjYWvbjVsJqpahs/2LV+7iqcA79UbOB5Pc6MEBQ03qlULNHja6Io7XYSI 11Em5g+ye3Ri9MaIYeYcD+gR3PDOJuLc6J/KebKJd4EBoDGnf8AC374+GG0xtbX/vpep 1Yyc2XXUqDqiYUXK81k40MxHpA3ag9L7fskEu4VuSlWasZrsusv+CA2nuOaYsV0h5jlK NoVg== X-Gm-Message-State: APt69E3gxDVxhGi+RSmfNfRh2zIaGPww9Dp3ddnJiHVXiUtV2B1/rrnN sjqpnsPjFwukVZO6+gC3g7OYazd5HiC9XBBAoBOR0tO4 X-Received: by 2002:a19:c203:: with SMTP id l3-v6mr5828419lfc.55.1528970840104; Thu, 14 Jun 2018 03:07:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:56c8:0:0:0:0:0 with HTTP; Thu, 14 Jun 2018 03:07:19 -0700 (PDT) In-Reply-To: <20180612054034.4969-5-songjun.wu@linux.intel.com> References: <20180612054034.4969-1-songjun.wu@linux.intel.com> <20180612054034.4969-5-songjun.wu@linux.intel.com> From: Arnd Bergmann Date: Thu, 14 Jun 2018 12:07:19 +0200 X-Google-Sender-Auth: _wKB8UeZIwZ5de5NPaloC9YPF9U Message-ID: Subject: Re: [PATCH 4/7] tty: serial: lantiq: Always use readl()/writel() To: Songjun Wu Cc: hua.ma@linux.intel.com, yixin.zhu@linux.intel.com, chuanhua.lei@intel.com, "open list:RALINK MIPS ARCHITECTURE" , qi-ming.wu@intel.com, linux-clk , linux-serial@vger.kernel.org, DTML , James Hogan , Jiri Slaby , Linux Kernel Mailing List , Greg Kroah-Hartman , Ralf Baechle Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 12, 2018 at 7:40 AM, Songjun Wu wrote: > Previous implementation uses platform-dependent functions > ltq_w32()/ltq_r32() to access registers. Those functions are not > available for other SoC which uses the same IP. > Change to OS provided readl()/writel() and readb()/writeb(), so > that different SoCs can use the same driver. > > Signed-off-by: Songjun Wu Are there any big-endian machines using this driver? The original definition of ltq_r32() uses non-byteswapping __raw_readl() etc, which suggests that the registers might be wired up in a way that matches the CPU endianess (this is usally a bad idea in hardware design, but nothing we can influence in the OS). When you change it to readl(), that will breaks all machines that rely on the old behavior on big-endian kernels. Arnd