netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: "Miguel Ángel Álvarez" <gotzoncabanes@gmail.com>
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: ixp4xx_hss MAX_CHAN_DEVICES
Date: Tue, 25 Nov 2008 00:52:42 +0100	[thread overview]
Message-ID: <m3tz9wsmut.fsf@maximus.localdomain> (raw)
In-Reply-To: <b0438a630811240912v16db8ef8v660cb844979fe912@mail.gmail.com> ("Miguel Ángel Álvarez"'s message of "Mon\, 24 Nov 2008 18\:12\:47 +0100")

"Miguel Ángel Álvarez" <gotzoncabanes@gmail.com> writes:

> I am not quite sure about this. If we do not set the clock_rate as
> part of the "physical_mode"... where should it be set? As a separate
> variable?

I think so. In most cases the external clock will be used anyway.

> Is this what you are stating? a separate variable for clock_rate in
> the platform structure?
>
>>> +static const struct physical_modes phmodes[] = {
>>> +     {IXP4XX_HSS_T1, 193, 1544000, CLK42X_SPEED_1544KHZ},
>>> +     {IXP4XX_HSS_E1, 256, 2048000, CLK42X_SPEED_2048KHZ},
>>> +     {IXP4XX_HSS_2_E1, 512, 4096000, CLK42X_SPEED_4096KHZ},
>>> +     {IXP4XX_HSS_4_E1, 1024, 8192000, CLK42X_SPEED_8192KHZ},
>>> +     {0, 256, 2048000, CLK42X_SPEED_2048KHZ}
>>> +};

No. The HSS driver already has code for the clock rate. Unfortunately
it doesn't yet know how to set the register.

There is IMHO one thing missing from the platform struct: the
physical mode, aka topology; a single integer. Possible values:
a) direct connection to HSS, b) HSS connected to a 4 * E1 MVIP framer,
c) 4 * T1 MVIP, d+) other similar variants (perhaps 2 * E1, 2 * T1).

>> T1 and E1 are the same WRT hardware connection to the port.
>>
> I have done the difference for the clock_rates and the needing of a
> framing bit in the case of T1.

Sure, but: clock rate is independent anyway, and the framing bit can be
requested by using 193 bits of frame (IIRC this is how the code
currently works but I'd have to check for sure).

> OK. Thanks... However... shouldn't they be the same value... I mean...
> It could be possible to have a device for each channel in the frame,
> not? So, for example if I had 128 channels (4*E1), it could be
> required to deal with 128 devices, not? (In channelized mode).

Sure (though I don't know how efficient would that be).

The truth is the HSS channelized code is quite experimental. It works,
and I actually use it, but I haven't yet decided about the API and
this is why it isn't still upstream.

HDLC HSS code is IMHO stable and could be submitted upstream, I will
do it sometime.

> Sure... Let me re-do the question. Do you know how MVIP is set if I
> detect it is needed? And... good idea with the registering of four
> devices.

The platform code should provide the "mode" (aka topology) = "4 * E1".
There is nothing to detect. The driver has to handle 4E1, that's all.
-- 
Krzysztof Halasa

  reply	other threads:[~2008-11-24 23:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-19 11:17 ixp4xx_hss MAX_CHAN_DEVICES Miguel Ángel Álvarez
2008-11-21 22:52 ` Krzysztof Halasa
2008-11-24 10:03   ` Miguel Ángel Álvarez
2008-11-24 12:15     ` Miguel Ángel Álvarez
2008-11-24 16:14       ` Krzysztof Halasa
2008-11-24 17:12         ` Miguel Ángel Álvarez
2008-11-24 23:52           ` Krzysztof Halasa [this message]
2008-11-25 16:51             ` Miguel Ángel Álvarez
2008-11-26  0:09               ` Krzysztof Halasa
2008-11-26 10:02                 ` Miguel Ángel Álvarez
2008-11-26 11:19                   ` Krzysztof Halasa
2008-11-26 12:08                     ` Miguel Ángel Álvarez

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=m3tz9wsmut.fsf@maximus.localdomain \
    --to=khc@pm.waw.pl \
    --cc=gotzoncabanes@gmail.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=netdev@vger.kernel.org \
    /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).