Re: [RFC][PATCH] ibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround

2008-03-05 Thread Valentine Barshak
Benjamin Herrenschmidt wrote: > On Tue, 2008-02-26 at 09:02 -0600, Josh Boyer wrote: >> Seems the code will do the right thing since everything is using >> flags. I suppose my question can be withdrawn. It is slightly >> confusing to do it that way though. Perhaps a function to do >> read-modify

Re: [RFC][PATCH] ibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround

2008-02-28 Thread Benjamin Herrenschmidt
On Tue, 2008-02-26 at 09:02 -0600, Josh Boyer wrote: > Seems the code will do the right thing since everything is using > flags. I suppose my question can be withdrawn. It is slightly > confusing to do it that way though. Perhaps a function to do > read-modify-writes on DCRs would be welcome.

Re: [RFC][PATCH] ibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround

2008-02-26 Thread Josh Boyer
On Tue, 26 Feb 2008 09:10:06 -0500 "Steven A. Falco" <[EMAIL PROTECTED]> wrote: > When I saw Josh's question, I thought the irq save/restore was there to > make the read-modify-write atomic; i.e. read SDR0_MFR, "AND" out some > bits, then write it back without the possibility of anything else > to

Re: [RFC][PATCH] ibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround

2008-02-26 Thread Steven A. Falco
>>> +static inline void emac_rx_clk_default(struct emac_instance *dev) >>> +{ >>> + if (emac_has_feature(dev, EMAC_FTR_440EP_PHY_CLK_FIX)) { >>> + unsigned long flags; >>> + >>> + local_irq_save(flags); >>> + mtdcri(SDR0, SDR0_MFR, mfdcri(SDR0, SDR0_MFR) & >>> +

Re: [RFC][PATCH] ibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround

2008-02-26 Thread Valentine Barshak
Josh Boyer wrote: > On Fri, 22 Feb 2008 22:28:17 +0300 > Valentine Barshak <[EMAIL PROTECTED]> wrote: > >> This patch adds ibm_newemac phy clock workaround for 440EP/440GR emacs. >> The code is based on the previous ibm_emac driver stuff. The 440EP/440GR >> allows controlling each EMAC clock spear

Re: [RFC][PATCH] ibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround

2008-02-22 Thread Josh Boyer
On Fri, 22 Feb 2008 22:28:17 +0300 Valentine Barshak <[EMAIL PROTECTED]> wrote: > This patch adds ibm_newemac phy clock workaround for 440EP/440GR emacs. > The code is based on the previous ibm_emac driver stuff. The 440EP/440GR > allows controlling each EMAC clock spearately as opposed to global

[RFC][PATCH] ibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround

2008-02-22 Thread Valentine Barshak
This patch adds ibm_newemac phy clock workaround for 440EP/440GR emacs. The code is based on the previous ibm_emac driver stuff. The 440EP/440GR allows controlling each EMAC clock spearately as opposed to global clock selection for 440GX. Signed-off-by: Valentine Barshak <[EMAIL PROTECTED]> --- d