All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] serial/shmobile: Add OF support to SCI
@ 2013-02-19 17:29 Bastian Hecht
  2013-02-20 12:05 ` Paul Mundt
  2013-02-21 15:50 ` Bastian Hecht
  0 siblings, 2 replies; 3+ messages in thread
From: Bastian Hecht @ 2013-02-19 17:29 UTC (permalink / raw)
  To: linux-sh

We add support to probe shmobile SCI devices using device tree.

Here we face the much discussed issue of device tree bindings and driver data
configs. I followed the idea of grouping SoCs into similar hardware blocks.

The naming is:
renesas,shmobile-sci-hwb-1	for sh7372, sh73a0, r8a7740 and
renesas,shmobile-sci-hwb-2	for r8a7779

I looked up the configuration of the prementioned SoCs and came to the
conclusion that
+       .flags          = ...
+       .scscr          = ...
+       .scbrr_algo_id  = ...

are all properties that are SoC dependent and that they currently completely
describe the SoC-related configuration. This is however based on estimation
as the struct plat_sci_port contains more fields that are not used currently
in any board code but might be needed in the future. I don't know that.

Further I'm unsure how to add the DMA descriptors to the bindings. I haven't
found a driver that uses DMA except the flctl, that uses "dmas" and "dma-names",
but I don't know if this is still the way to go.

The patchset is based on topic/all+next

Thanks,

 Bastian



Bastian Hecht (3):
  serial: sh-sci: Add Device Tree probing
  ARM: mach-shmobile: r8a7740: Add DT names to clock list
  ARM: mach-shmobile: r8a7740: Setup the serial devices using DT

 .../bindings/tty/serial/renesas,sh-sci-serial.txt  |   27 +++++
 .../boot/dts/r8a7740-armadillo800eva-reference.dts |   76 +++++++++++++
 arch/arm/mach-shmobile/clock-r8a7740.c             |    9 ++
 arch/arm/mach-shmobile/setup-r8a7740.c             |   15 ++-
 drivers/tty/serial/sh-sci.c                        |  117 +++++++++++++++++++-
 5 files changed, 236 insertions(+), 8 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/tty/serial/renesas,sh-sci-serial.txt

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/3] serial/shmobile: Add OF support to SCI
  2013-02-19 17:29 [PATCH 0/3] serial/shmobile: Add OF support to SCI Bastian Hecht
@ 2013-02-20 12:05 ` Paul Mundt
  2013-02-21 15:50 ` Bastian Hecht
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Mundt @ 2013-02-20 12:05 UTC (permalink / raw)
  To: linux-sh

On Tue, Feb 19, 2013 at 12:29:43PM -0600, Bastian Hecht wrote:
> We add support to probe shmobile SCI devices using device tree.
> 
> Here we face the much discussed issue of device tree bindings and driver data
> configs. I followed the idea of grouping SoCs into similar hardware blocks.
> 
> The naming is:
> renesas,shmobile-sci-hwb-1	for sh7372, sh73a0, r8a7740 and
> renesas,shmobile-sci-hwb-2	for r8a7779
> 
> I looked up the configuration of the prementioned SoCs and came to the
> conclusion that
> +       .flags          = ...
> +       .scscr          = ...
> +       .scbrr_algo_id  = ...
> 
> are all properties that are SoC dependent and that they currently completely
> describe the SoC-related configuration. This is however based on estimation
> as the struct plat_sci_port contains more fields that are not used currently
> in any board code but might be needed in the future. I don't know that.
> 
I think you can probably safely ignore the init_pins and the gpios for
now, as this was more about preserving legacy behaviour and bolting on
crude API utilization when we started to track pins through the GPIO API.
Now that everything is moving towards or supportable via pinctrl/pinconf,
there should be no need to ever have to deal with any of this on new
SoCs.

If you don't want to deal with overrun detection or RTS/CTS that should
be fine, but it should be noted that the binding only implements a
restricted subset of functionality, in that case.

> Further I'm unsure how to add the DMA descriptors to the bindings. I haven't
> found a driver that uses DMA except the flctl, that uses "dmas" and "dma-names",
> but I don't know if this is still the way to go.
> 
There are no users that presently depend on this, so you can probably get
away with adding this as an incremental change at a later state.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/3] serial/shmobile: Add OF support to SCI
  2013-02-19 17:29 [PATCH 0/3] serial/shmobile: Add OF support to SCI Bastian Hecht
  2013-02-20 12:05 ` Paul Mundt
@ 2013-02-21 15:50 ` Bastian Hecht
  1 sibling, 0 replies; 3+ messages in thread
From: Bastian Hecht @ 2013-02-21 15:50 UTC (permalink / raw)
  To: linux-sh

Hi Paul,

2013/2/20 Paul Mundt <lethal@linux-sh.org>:
> On Tue, Feb 19, 2013 at 12:29:43PM -0600, Bastian Hecht wrote:
>> We add support to probe shmobile SCI devices using device tree.
>>
>> Here we face the much discussed issue of device tree bindings and driver data
>> configs. I followed the idea of grouping SoCs into similar hardware blocks.
>>
>> The naming is:
>> renesas,shmobile-sci-hwb-1    for sh7372, sh73a0, r8a7740 and
>> renesas,shmobile-sci-hwb-2    for r8a7779
>>
>> I looked up the configuration of the prementioned SoCs and came to the
>> conclusion that
>> +       .flags          = ...
>> +       .scscr          = ...
>> +       .scbrr_algo_id  = ...
>>
>> are all properties that are SoC dependent and that they currently completely
>> describe the SoC-related configuration. This is however based on estimation
>> as the struct plat_sci_port contains more fields that are not used currently
>> in any board code but might be needed in the future. I don't know that.
>>
> I think you can probably safely ignore the init_pins and the gpios for
> now, as this was more about preserving legacy behaviour and bolting on
> crude API utilization when we started to track pins through the GPIO API.
> Now that everything is moving towards or supportable via pinctrl/pinconf,
> there should be no need to ever have to deal with any of this on new
> SoCs.

Good to hear that.

> If you don't want to deal with overrun detection or RTS/CTS that should
> be fine, but it should be noted that the binding only implements a
> restricted subset of functionality, in that case.

Yes it would be nice to get the general sci DT thing going and deal
with details later.
So it is great that you are OK with it for now.

>> Further I'm unsure how to add the DMA descriptors to the bindings. I haven't
>> found a driver that uses DMA except the flctl, that uses "dmas" and "dma-names",
>> but I don't know if this is still the way to go.
>>
> There are no users that presently depend on this, so you can probably get
> away with adding this as an incremental change at a later state.

Ok let's do this when DMA is a well known use case for the SHMobile drivers.

Thanks,

 Bastian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-21 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-19 17:29 [PATCH 0/3] serial/shmobile: Add OF support to SCI Bastian Hecht
2013-02-20 12:05 ` Paul Mundt
2013-02-21 15:50 ` Bastian Hecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.