From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Date: Mon, 06 Aug 2018 14:38:36 +0000 Subject: Re: [PATCH/RFC 4/4] sh-sci: Derive regshift value from DT compatible value Message-Id: List-Id: References: <20180806140755.24087-1-geert+renesas@glider.be> <20180806140755.24087-5-geert+renesas@glider.be> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Chris Brandt Cc: Geert Uytterhoeven , Laurent Pinchart , uli@fpond.eu, Yoshinori Sato , Greg KH , Jiri Slaby , Linux-Renesas , Linux-sh list , "open list:SERIAL DRIVERS" Hi Chris, On Mon, Aug 6, 2018 at 4:18 PM Chris Brandt wrote: > On Monday, August 06, 2018 1, linux-sh-owner@vger.kernel.org wrote: > > Deriving the proper regshift value from the register block size is > > fragile (it may have been rounded up in DT, and the mapping granularity > > is usually PAGE_SIZE anyway), and turned out to be inappropriate for > > earlycon support (the size is not easily available). > > > > On DT systems, derive it from the compatible value instead. > > This requires adding an entry for RZ/A2 serial ports, which use an > > atypical regshift value. > > I had a simple patch to add support for CONFIG_DEBUG_LL for RZ/A2 > because earlycon never worked because of RZ/A2's different register locations. Yeah, sci_probe_regmap() assumed the wrong regtype for your TYPE_SCIF port. You needed an OF_EARLYCON_DECLARE() line that also filled in the correct regtype. BTW, it would have been very valuable to know that earlycon didn't work, as that would have helped in avoiding the earlycon breakage on other parts. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua0-f195.google.com ([209.85.217.195]:38643 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728626AbeHFQsN (ORCPT ); Mon, 6 Aug 2018 12:48:13 -0400 MIME-Version: 1.0 References: <20180806140755.24087-1-geert+renesas@glider.be> <20180806140755.24087-5-geert+renesas@glider.be> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 6 Aug 2018 16:38:36 +0200 Message-ID: Subject: Re: [PATCH/RFC 4/4] sh-sci: Derive regshift value from DT compatible value To: Chris Brandt Cc: Geert Uytterhoeven , Laurent Pinchart , uli@fpond.eu, Yoshinori Sato , Greg KH , Jiri Slaby , Linux-Renesas , Linux-sh list , "open list:SERIAL DRIVERS" Content-Type: text/plain; charset="UTF-8" Sender: linux-renesas-soc-owner@vger.kernel.org List-ID: Hi Chris, On Mon, Aug 6, 2018 at 4:18 PM Chris Brandt wrote: > On Monday, August 06, 2018 1, linux-sh-owner@vger.kernel.org wrote: > > Deriving the proper regshift value from the register block size is > > fragile (it may have been rounded up in DT, and the mapping granularity > > is usually PAGE_SIZE anyway), and turned out to be inappropriate for > > earlycon support (the size is not easily available). > > > > On DT systems, derive it from the compatible value instead. > > This requires adding an entry for RZ/A2 serial ports, which use an > > atypical regshift value. > > I had a simple patch to add support for CONFIG_DEBUG_LL for RZ/A2 > because earlycon never worked because of RZ/A2's different register locations. Yeah, sci_probe_regmap() assumed the wrong regtype for your TYPE_SCIF port. You needed an OF_EARLYCON_DECLARE() line that also filled in the correct regtype. BTW, it would have been very valuable to know that earlycon didn't work, as that would have helped in avoiding the earlycon breakage on other parts. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds