[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOesGMjcmeiBfc=EOvWazebg-9vnMuQtRC0aeHJy7Q=02RdRPA@mail.gmail.com>
Date: Wed, 11 Dec 2013 23:00:16 -0800
From: Olof Johansson <olof@...om.net>
To: Soren Brinkmann <soren.brinkmann@...inx.com>
Cc: Nicolas Ferre <nicolas.ferre@...el.com>,
David Miller <davem@...emloft.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Network Development <netdev@...r.kernel.org>,
Michal Simek <michal.simek@...inx.com>
Subject: Re: [PATCH v2 0/5] net: macb updates
Hi Soren,
On Tue, Dec 10, 2013 at 4:07 PM, Soren Brinkmann
<soren.brinkmann@...inx.com> wrote:
> Soren Brinkmann (5):
> net: macb: Adjust tx_clk when link speed changes
This patch causes build issues on some at91 platforms, namely
at91sam9263 that lacks programmable clocks. So it doesn't implement
clk_set_rate() and clk_round_rate().
I don't know if there's any reasonable config option to check for
(that wouldn't add at91-specific stuff to the driver which we don't
want). So I suspect the best way would be to implement dummy versions
for at91 when CONFIG_AT91_PROGRAMMABLE_CLOCKS isn't set.
Nicolas, you OK with that? It'd be something like the below
(copy-paste, whitespace damage, just RFC):
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index 6b2630a..17c52a7 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -459,6 +459,22 @@ static void __init init_programmable_clock(struct clk *clk)
clk->rate_hz = parent->rate_hz / pmc_prescaler_divider(pckr);
}
+#else /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */
+
+int clk_set_rate(struct clk *clk, unsigned long rate)
+{
+ if (rate == clk_get_rate(clk))
+ return 0;
+
+ return -EINVAL;
+}
+
+long clk_round_rate(struct clk *clk, unsigned long rate)
+{
+ /* There's really nothing sane to return here. */
+ return clk_get_rate(clk);
+}
+
#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists