Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3145994yba; Mon, 8 Apr 2019 12:10:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbW0V61BBoA8jFB8uig2HUyqg2KlNc1t/BteGZpfLLgOqTuypxICckzRm3x7vc+/tFhCd0 X-Received: by 2002:a17:902:b94a:: with SMTP id h10mr32277537pls.82.1554750616389; Mon, 08 Apr 2019 12:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554750616; cv=none; d=google.com; s=arc-20160816; b=UJ7de7WhX3AWUUeOBidWPkncztNaDU6ETCIRAKg4NMZQE5VSIwpHOdn5dIz1VU78PS XYMVcDQ4C74BxsvVE/MuilcGy8HB1UGds8mHHkimnLIc2TnLZR0v1zjE87gznoPlK6Jl JHRQhye2XWNu5qXixsgvHKqyAIFfF3qbJ5U1k3VmoWQUJ9vY220E5+yuvM4/Vabss8VN wiQ2/4p0BHfefXnDW4P9neESaZQEr2KKdlaYwaZcZkvJAidK4MEYQEcAIrX8vp6jxEKM Ej9fsyTR8mYKHhehUnahJwFX9h5E6MJ0otSTJlhL1ptbLyxmZHL0IBOS9/BQxFousFe8 xp3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=22fWd9GvaaNjoDAx6c4SCg5LgJvgKShn1CuZVTjN8aA=; b=b7SQIq3+UCq/Y8IwbU4sQUld7AjfqQrAugcR0qhn4q6oRc7T6PUdv0M1RWujbsS063 zvmih1//bgUTLaIZ4OoFpeOBoxaZ2Y3WGZpps5VVm3JpQmca6G0/9PKmRHdxwkq9b+Dw fB/3YVuxgWfMU1EQ3x+mvKNi0NDVlrwHdHoBf9P+HQhY7MbmTGuwTzl3quRKafwHGTUe 71WvbMLDQDdi9KxMKiDhFnDdr5vhchWzIo3+fuCHfbgclHBdQWNQyXbjkqaTpUR+kjVK MNX3FW7QqbmZ6AGtNuHiEmSj8eGWKzPQRTAuw4g7yq0lpzxOczFlD/ay/eKQzmS6Z7/2 c9gg== ARC-Authentication-Results: i=1; mx.google.com; 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 u10si20986992pga.205.2019.04.08.12.10.01; Mon, 08 Apr 2019 12:10:16 -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; 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 S1728760AbfDHSxb convert rfc822-to-8bit (ORCPT + 99 others); Mon, 8 Apr 2019 14:53:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:50548 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726349AbfDHSxb (ORCPT ); Mon, 8 Apr 2019 14:53:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 63189AF93; Mon, 8 Apr 2019 18:53:29 +0000 (UTC) Date: Mon, 8 Apr 2019 20:53:28 +0200 From: Thomas Bogendoerfer To: Alexandre Belloni Cc: Ralf Baechle , Paul Burton , James Hogan , Dmitry Torokhov , Lee Jones , "David S. Miller" , Alessandro Zummo , Greg Kroah-Hartman , Jiri Slaby , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org, linux-rtc@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH 4/6] MIPS: SGI-IP27: fix readb/writeb addressing Message-Id: <20190408205328.062042a4f6e12f750bd4c05e@suse.de> In-Reply-To: <20190408145834.GO7480@piout.net> References: <20190408142100.27618-1-tbogendoerfer@suse.de> <20190408142100.27618-5-tbogendoerfer@suse.de> <20190408145834.GO7480@piout.net> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 8 Apr 2019 16:58:34 +0200 Alexandre Belloni wrote: > On 08/04/2019 16:20:56+0200, Thomas Bogendoerfer wrote: > > diff --git a/drivers/rtc/rtc-m48t35.c b/drivers/rtc/rtc-m48t35.c > > index 0cf6507de3c7..05f0d91366af 100644 > > --- a/drivers/rtc/rtc-m48t35.c > > +++ b/drivers/rtc/rtc-m48t35.c > > @@ -24,6 +24,16 @@ > > > > struct m48t35_rtc { > > u8 pad[0x7ff8]; /* starts at 0x7ff8 */ > > +#ifdef CONFIG_SGI_IP27 > > + u8 hour; > > + u8 min; > > + u8 sec; > > + u8 control; > > + u8 year; > > + u8 month; > > + u8 date; > > + u8 day; > > +#else > > I'm not sure why the RTC driver has to know about that. Shouldn't your > accessors be fixing that? no, because the hardware is weird. RTC is connected to IOC3 byte bus and IOC3 is connected to PCI. With a correct readb for PCI bus access to RTC behind IOC3 is byte swapped. Thomas. -- SUSE Linux GmbH GF: Felix Imend?rffer, Mary Higgins, Sri Rasiah HRB 21284 (AG N?rnberg)