Re: [PATCH] stmmac: add DMA initialization delay to device tree

From: Alexey Brodkin
Date: Mon Jun 02 2014 - 15:14:19 EST

Dear David,

On Mon, 2014-06-02 at 11:15 -0700, David Miller wrote:
> From: Alexey Brodkin <Alexey.Brodkin@xxxxxxxxxxxx>
> Date: Mon, 2 Jun 2014 18:53:55 +0400
> > On some platforms existing 100 msecond delay is not enough for DMA block to
> > recover after reset.
> > For example MAC DMA waits for all PHY input clocks are present and depending
> > on the board reset bit deassertion may take different amount of time.
> >
> > Having this parameter easily configurable allows each board to have its own
> > value, while all exisiting boards will continue to use current default value of
> > 100 msec.
> >
> > Signed-off-by: Alexey Brodkin <abrodkin@xxxxxxxxxxxx>
> Is there an upper bound for this you can just use?
> It taking too long and timing out is an error condition, so just
> using a limit value of "100" or something should be perfectly fine.
> I don't think it's reasonable to put every conceivable nuance into
> the DT nodes.

I understand that putting everything in DT is not a way to go.
But a rationale for this particular patch is as follows: as I may see up
until now everybody was happy with 100 milliseconds, but on my
particular board connected to Gbit network I see that more than a second
is required for DMA to initialize. If I connect the same board to 100
Mbit network then initialization delay could be up to 2.5 seconds.

So I may definitely bump the delay to say 3 seconds, but what if another
user needs even more?

On the other hand those who are happy now with 100 msec delay may be be
disappointed in case of failure and frozen for N seconds board waiting
for timeout.

If you think that delay for a few seconds in case of initialization
failure is acceptable then I will submit a patch that increases delay to
3 seconds (personally I haven't seen longer init times).

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at