devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Figa <tomasz.figa@gmail.com>
To: Daniel Drake <drake@endlessm.com>, Tomasz Figa <t.figa@samsung.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	devicetree@vger.kernel.org, Kukjin Kim <kgene.kim@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.cz>
Subject: Re: [PATCH 0/3] Deterministic UART numbering on Samsung SoCs
Date: Tue, 08 Jul 2014 10:40:38 +0200	[thread overview]
Message-ID: <53BBAE86.6090500@gmail.com> (raw)
In-Reply-To: <CAD8Lp45MvDLsxehayx8uuGt3w3O0vGskiFjb1vdvtOyOv2nG2w@mail.gmail.com>

On 08.07.2014 10:32, Daniel Drake wrote:
> Hi,
> 
> How can we move forward here?

Greg, Jiri, what do you think?

> 
> On Thu, Jun 26, 2014 at 1:02 PM, Tomasz Figa <t.figa@samsung.com> wrote:
>> - basically Samsung UART already has its own namespace (ttySAC) and the
>> order inside it is well-defined - instance ID shall be the hardware
>> instance number as specified by documentation. The ports vary in certain
>> aspects and the ID is important knowledge of the driver. The problem
>> here was broken implementation of assigning IDs based on probe order,
>> which worked only because on all Exynos platforms all ports have been
>> always registered (which we want to change now and keep unused ones
>> "disabled" in DT),
> 
> Yes, the kernel help text documents this quite well:
> 
> config SERIAL_SAMSUNG
>     tristate "Samsung SoC serial support"
>     depends on PLAT_SAMSUNG
>     select SERIAL_CORE
>     help
>       Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,
>       providing /dev/ttySAC0, 1 and 2 (note, some machines may not
>       provide all of these ports, depending on how the serial port
>       pins are configured.
> 
>> - we already have a lot of userspace depending on the aforementioned
>> ttySAC namespace and proper ordering of instances there. While I believe
>> the proper solution as of today would be to go back to standard ttyS
>> namespace and make userspace use a smarter way of identifying the
>> instances (e.g. by path or id, as you suggested), I don't think this
>> will make anyone's life easier with current assumptions,
> 
> I like the sound of going to the standard ttyS notation and only
> providing ports for ones that exist, but is this userspace-visible
> naming change OK? You could argue that userspace that relies on fixed
> device paths is a bit broken, but that argument would be a bit cloudy
> given the kernel documentation for the ttySAC devices above.

I'd say such argument would be completely invalid as this is most likely
almost all of the userspace for Samsung SoCs and, in addition to this,
quite a lot of firmware which pass console=ttySACx through command line.

> 
>> - correct me if I'm wrong, but I don't think the
>> /dev/serial/by-{path,id} would be handled in kernel's console= parameter.
> 
> That's right, that problem is left to the user, but at least we'd be
> consistent with other SoCs (and open to generic solutions to that
> inconvenience).

And so the point of this series is to make this no longer be left to the
user, making hardware UART 2 always UART 2 (which is supposed to be the
current behavior, but not always due to broken implementation) which is
completely orthogonal to raised issues.

Regardless of whether we stick to ttySAC or move back to ttyS, we still
need a deterministic way to assign the ID (even for internal driver
purposes) and that's why this series adds parsing of aliases. No user
visible behavior should be changed by this series.

Best regards,
Tomasz

  reply	other threads:[~2014-07-08  8:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 11:24 [PATCH 0/3] Deterministic UART numbering on Samsung SoCs Tomasz Figa
2014-06-26 11:24 ` [PATCH 1/3] Documentation: devicetree: Update samsung UART bindings Tomasz Figa
2014-06-26 11:24 ` [PATCH 2/3] serial: samsung: Consider DT alias when probing ports Tomasz Figa
2014-06-26 11:24 ` [PATCH 3/3] ARM: dts: SAMSUNG: Add aliases of UART nodes Tomasz Figa
2014-06-26 11:39 ` [PATCH 0/3] Deterministic UART numbering on Samsung SoCs Russell King - ARM Linux
2014-06-26 12:02   ` Tomasz Figa
2014-07-08  8:32     ` Daniel Drake
2014-07-08  8:40       ` Tomasz Figa [this message]
2014-07-09 13:23       ` One Thousand Gnomes
     [not found]         ` <20140709142333.503a9e39-mUKnrFFms3BCCTY1wZZT65JpZx93mCW/@public.gmane.org>
2014-07-23  6:30           ` Daniel Drake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53BBAE86.6090500@gmail.com \
    --to=tomasz.figa@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=drake@endlessm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.szyprowski@samsung.com \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=t.figa@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).