From: jbrunet@baylibre.com (Jerome Brunet)
To: linus-amlogic@lists.infradead.org
Subject: [RFT net-next v4 3/5] net: stmmac: dwmac-meson8b: fix internal RGMII clock configuration
Date: Mon, 15 Jan 2018 13:45:33 +0100 [thread overview]
Message-ID: <1516020333.2608.24.camel@baylibre.com> (raw)
In-Reply-To: <CAFBinCDCFAY3Mh7Oo3c-yUeRMBhReRjpqGCCadkWq=yqFFnqtg@mail.gmail.com>
On Mon, 2018-01-15 at 13:08 +0100, Martin Blumenstingl wrote:
> can you share your thoughts how to do this?
> I can devm_kzalloc the memory for struct clk_mux, clk_divider and
> clk_fixed_factor in the function which registers these clocks. but I
> cannot declare them on the stack, because the clk-* implementations
> still need it during runtime
You can declare the init_data on the stack, CCF makes a copy of what it needs.
For clk_mux, clk_gate and friends, yes, use devm functions is the way to go
For the struct *clk, you can also use devm. Just keep a reference on the leaf
clock to be able to call set_rate() and prepare_enable(). You don't need the
rest.
> this would leave us with only the struct clk instances in meson8_dwmac
You may have a look at drivers/mmc/host/meson-gx-mmc.c. The clock scheme of this
IP is actually very clock the ethernet one.
Cheers
WARNING: multiple messages have this Message-ID (diff)
From: Jerome Brunet <jbrunet@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: netdev@vger.kernel.org, ingrassia@epigenesys.com,
linus.luessing@c0d3.blue, khilman@baylibre.com,
linux-amlogic@lists.infradead.org,
Neil Armstrong <narmstrong@baylibre.com>,
peppe.cavallaro@st.com, alexandre.torgue@st.com
Subject: Re: [RFT net-next v4 3/5] net: stmmac: dwmac-meson8b: fix internal RGMII clock configuration
Date: Mon, 15 Jan 2018 13:45:33 +0100 [thread overview]
Message-ID: <1516020333.2608.24.camel@baylibre.com> (raw)
In-Reply-To: <CAFBinCDCFAY3Mh7Oo3c-yUeRMBhReRjpqGCCadkWq=yqFFnqtg@mail.gmail.com>
On Mon, 2018-01-15 at 13:08 +0100, Martin Blumenstingl wrote:
> can you share your thoughts how to do this?
> I can devm_kzalloc the memory for struct clk_mux, clk_divider and
> clk_fixed_factor in the function which registers these clocks. but I
> cannot declare them on the stack, because the clk-* implementations
> still need it during runtime
You can declare the init_data on the stack, CCF makes a copy of what it needs.
For clk_mux, clk_gate and friends, yes, use devm functions is the way to go
For the struct *clk, you can also use devm. Just keep a reference on the leaf
clock to be able to call set_rate() and prepare_enable(). You don't need the
rest.
> this would leave us with only the struct clk instances in meson8_dwmac
You may have a look at drivers/mmc/host/meson-gx-mmc.c. The clock scheme of this
IP is actually very clock the ethernet one.
Cheers
next prev parent reply other threads:[~2018-01-15 12:45 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-14 21:48 [RFT net-next v4 0/5] dwmac-meson8b: clock fixes for Meson8b Martin Blumenstingl
2018-01-14 21:48 ` Martin Blumenstingl
2018-01-14 21:48 ` [RFT net-next v4 1/5] net: stmmac: dwmac-meson8b: only configure the clocks in RGMII mode Martin Blumenstingl
2018-01-14 21:48 ` Martin Blumenstingl
2018-01-15 11:46 ` Jerome Brunet
2018-01-15 11:46 ` Jerome Brunet
2018-01-15 12:04 ` Martin Blumenstingl
2018-01-15 12:04 ` Martin Blumenstingl
2018-01-14 21:48 ` [RFT net-next v4 2/5] net: stmmac: dwmac-meson8b: simplify generating the clock names Martin Blumenstingl
2018-01-14 21:48 ` Martin Blumenstingl
2018-01-15 11:46 ` Jerome Brunet
2018-01-15 11:46 ` Jerome Brunet
2018-01-15 12:02 ` Martin Blumenstingl
2018-01-15 12:02 ` Martin Blumenstingl
2018-01-15 12:36 ` Jerome Brunet
2018-01-15 12:36 ` Jerome Brunet
2018-01-14 21:48 ` [RFT net-next v4 3/5] net: stmmac: dwmac-meson8b: fix internal RGMII clock configuration Martin Blumenstingl
2018-01-14 21:48 ` Martin Blumenstingl
2018-01-15 11:49 ` Jerome Brunet
2018-01-15 11:49 ` Jerome Brunet
2018-01-15 12:08 ` Martin Blumenstingl
2018-01-15 12:08 ` Martin Blumenstingl
2018-01-15 12:45 ` Jerome Brunet [this message]
2018-01-15 12:45 ` Jerome Brunet
2018-01-16 11:20 ` Martin Blumenstingl
2018-01-18 20:05 ` Martin Blumenstingl
2018-01-18 20:05 ` Martin Blumenstingl
2018-01-14 21:48 ` [RFT net-next v4 4/5] net: stmmac: dwmac-meson8b: fix setting the RGMII TX clock on Meson8b Martin Blumenstingl
2018-01-14 21:48 ` Martin Blumenstingl
2018-01-14 21:48 ` [RFT net-next v4 5/5] net: stmmac: dwmac-meson8b: propagate rate changes to the parent clock Martin Blumenstingl
2018-01-14 21:48 ` Martin Blumenstingl
2018-01-15 11:50 ` Jerome Brunet
2018-01-15 11:50 ` Jerome Brunet
2018-01-15 11:45 ` [RFT net-next v4 0/5] dwmac-meson8b: clock fixes for Meson8b Jerome Brunet
2018-01-15 11:45 ` Jerome Brunet
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=1516020333.2608.24.camel@baylibre.com \
--to=jbrunet@baylibre.com \
--cc=linus-amlogic@lists.infradead.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 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.