public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] QE UEC: MII command support and adding UECs
@ 2008-07-16 19:17 richardretanubun
  2008-07-16 21:16 ` Andy Fleming
  0 siblings, 1 reply; 8+ messages in thread
From: richardretanubun @ 2008-07-16 19:17 UTC (permalink / raw)
  To: u-boot

Hi,

I am wondering if the miiphy command support for QE UEC is already 
merged into u-boot on some tree.

The last info I have on this patch is on this posting:

http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/38965

It looked like it was about to make it into 1.3.3

I have checked both the main u.boot.git as well as the 83xx and 85xx 
tree and can't find the changes there.

Also, is there a blob written anywhere about the limitations and 
considerations for adding (even) more
QE UEC interfaces? I was about to naively add two more UECs before 
reading this:

commit:     2465665b73ac2f688af945b1ed510752afa816a4

QE UEC: Extend number of supported UECs to 4

This patch extends the number of supported UECs to 4. Note that the
problem of QE thread resources exhaustion is resolved by setting the
correct number of QE threads according to Ethernet type (GBE or FE).

So that this mean one can safely add more UECs so long as there is 
enough memory to support it?

Thank you for all your help.

Richard Retanubun

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] QE UEC: MII command support and adding UECs
  2008-07-16 19:17 [U-Boot-Users] QE UEC: MII command support and adding UECs richardretanubun
@ 2008-07-16 21:16 ` Andy Fleming
  2008-07-22 15:11   ` Ben Warren
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Fleming @ 2008-07-16 21:16 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 16, 2008 at 2:17 PM, richardretanubun
<richardretanubun@ruggedcom.com> wrote:
> Hi,
>
> I am wondering if the miiphy command support for QE UEC is already
> merged into u-boot on some tree.
>
> The last info I have on this patch is on this posting:
>
> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/38965

Hm... I vaguely recall seeing that, but it's more in Ben Warren's
domain.  He probably wasn't copied on the patch, either.

Andy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] QE UEC: MII command support and adding UECs
  2008-07-16 21:16 ` Andy Fleming
@ 2008-07-22 15:11   ` Ben Warren
  2008-07-29 14:43     ` Wolfgang Denk
  0 siblings, 1 reply; 8+ messages in thread
From: Ben Warren @ 2008-07-22 15:11 UTC (permalink / raw)
  To: u-boot

Andy Fleming wrote:
> On Wed, Jul 16, 2008 at 2:17 PM, richardretanubun
> <richardretanubun@ruggedcom.com> wrote:
>   
>> Hi,
>>
>> I am wondering if the miiphy command support for QE UEC is already
>> merged into u-boot on some tree.
>>
>> The last info I have on this patch is on this posting:
>>
>> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/38965
>>     
>
> Hm... I vaguely recall seeing that, but it's more in Ben Warren's
> domain.  He probably wasn't copied on the patch, either.
>   
Yeah, looks like I missed that one.  To answer your question, no.  I 
won't be able to apply it until the weekend at the earliest, so for now 
please just apply the patch yourself.

regards,
Ben

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] QE UEC: MII command support and adding UECs
  2008-07-22 15:11   ` Ben Warren
@ 2008-07-29 14:43     ` Wolfgang Denk
  2008-07-29 15:10       ` [U-Boot-Users] [Patch 1/1] Re-Submit: QE UEC: Add MII Commands richardretanubun
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2008-07-29 14:43 UTC (permalink / raw)
  To: u-boot

Dear Richard,

in message <4885F8BE.6010503@gmail.com> Ben Warren wrote:
>
> >> The last info I have on this patch is on this posting:
> >>
> >> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/38965
> >
> > Hm... I vaguely recall seeing that, but it's more in Ben Warren's
> > domain.  He probably wasn't copied on the patch, either.
> >   
> Yeah, looks like I missed that one.  To answer your question, no.  I 
> won't be able to apply it until the weekend at the earliest, so for now 
> please just apply the patch yourself.

Can you please post updated patches?

Thanks in advance.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The more complex the mind, the greater the need for the simplicity of
play.
	-- Kirk, "Shore Leave", stardate 3025.8

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] [Patch 1/1] Re-Submit: QE UEC: Add MII Commands
  2008-07-29 14:43     ` Wolfgang Denk
@ 2008-07-29 15:10       ` richardretanubun
  2008-07-29 15:48         ` Kim Phillips
  2008-07-29 21:35         ` [U-Boot-Users] unassigned-patches/15: " u-boot at bugs.denx.de
  0 siblings, 2 replies; 8+ messages in thread
From: richardretanubun @ 2008-07-29 15:10 UTC (permalink / raw)
  To: u-boot

Patch originally submitted by David Saada

http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/38946

Shamelessly copy-pasted below.

Richard
===========================================================================

Add MII commands to the UEC driver. Note that once a UEC device is selected,
any device on its MDIO bus can be addressed.

Signed-off-by: David Saada <david.saada <at> ecitele.com>

 uec.c |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

--- a/drivers/qe/uec.c	2008-03-30 16:30:16.342061000 +0300
+++ b/drivers/qe/uec.c	2008-03-31 12:30:13.862288000 +0300
@@ -29,6 +29,7 @@
 #include "uccf.h"
 #include "uec.h"
 #include "uec_phy.h"
+#include "miiphy.h"

 #if defined(CONFIG_QE)

@@ -125,6 +126,17 @@ static uec_info_t eth4_uec_info = {
 };
 #endif

+#define MAXCONTROLLERS	(4)
+
+static struct eth_device *devlist[MAXCONTROLLERS];
+
+static int uec_miiphy_read(char *devname, unsigned char addr,
+			    unsigned char reg, unsigned short *value);
+static int uec_miiphy_write(char *devname, unsigned char addr,
+			     unsigned char reg, unsigned short value);
+u16 phy_read (struct uec_mii_info *mii_info, u16 regnum);
+void phy_write (struct uec_mii_info *mii_info, u16 regnum, u16 val);
+
 static int uec_mac_enable(uec_private_t *uec, comm_dir_e mode)
 {
 	uec_t		*uec_regs;
@@ -1334,6 +1346,8 @@ int uec_initialize(int index)
 		return -EINVAL;
 	}

+	devlist[index] = dev;
+
 	uec->uec_info = uec_info;

 	sprintf(dev->name, "FSL UEC%d", index);
@@ -1356,6 +1370,45 @@ int uec_initialize(int index)
 		return err;
 	}

+#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \
+	&& !defined(BITBANGMII)
+	miiphy_register(dev->name, uec_miiphy_read, uec_miiphy_write);
+#endif
+
 	return 1;
 }
+
+#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \
+	&& !defined(BITBANGMII)
+
+/*
+ * Read a MII PHY register.
+ *
+ * Returns:
+ *  0 on success
+ */
+static int uec_miiphy_read(char *devname, unsigned char addr,
+			    unsigned char reg, unsigned short *value)
+{
+	*value = uec_read_phy_reg(devlist[0], addr, reg);
+
+	return 0;
+}
+
+/*
+ * Write a MII PHY register.
+ *
+ * Returns:
+ *  0 on success
+ */
+static int uec_miiphy_write(char *devname, unsigned char addr,
+			     unsigned char reg, unsigned short value)
+{
+	uec_write_phy_reg(devlist[0], addr, reg, value);
+
+	return 0;
+}
+
+#endif
+
 #endif /* CONFIG_QE */




Wolfgang Denk wrote:
> Dear Richard,
>
> in message <4885F8BE.6010503@gmail.com> Ben Warren wrote:
>   
>>>> The last info I have on this patch is on this posting:
>>>>
>>>> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/38965
>>>>         
>>> Hm... I vaguely recall seeing that, but it's more in Ben Warren's
>>> domain.  He probably wasn't copied on the patch, either.
>>>   
>>>       
>> Yeah, looks like I missed that one.  To answer your question, no.  I 
>> won't be able to apply it until the weekend at the earliest, so for now 
>> please just apply the patch yourself.
>>     
>
> Can you please post updated patches?
>
> Thanks in advance.
>
> Best regards,
>
> Wolfgang Denk
>
>   

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] [Patch 1/1] Re-Submit: QE UEC: Add MII Commands
  2008-07-29 15:10       ` [U-Boot-Users] [Patch 1/1] Re-Submit: QE UEC: Add MII Commands richardretanubun
@ 2008-07-29 15:48         ` Kim Phillips
  2008-07-29 21:35         ` [U-Boot-Users] unassigned-patches/15: " u-boot at bugs.denx.de
  1 sibling, 0 replies; 8+ messages in thread
From: Kim Phillips @ 2008-07-29 15:48 UTC (permalink / raw)
  To: u-boot

On Tue, 29 Jul 2008 11:10:09 -0400
richardretanubun <richardretanubun@ruggedcom.com> wrote:

> Patch originally submitted by David Saada
> 
> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/38946
> 
> Shamelessly copy-pasted below.
> 
> Richard
> ===========================================================================

the proper way to maintain correct attributions in this case is to
replace all the above with a simple:

From: David Saada <david.saada@ecitele.com>

as the first line in the email body.  git-am will now assign the
correct author when applying it to the tree.

> Add MII commands to the UEC driver. Note that once a UEC device is selected,
> any device on its MDIO bus can be addressed.
> 
> Signed-off-by: David Saada <david.saada <at> ecitele.com>

please feel free to be a part of the community and add your Tested-by,
Reviewed-by, Acked-by, and/or signoff.  See
linux-2.6/Documentation/SubmittingPatches for further details.

Kim

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] unassigned-patches/15: [Patch 1/1] Re-Submit: QE UEC: Add MII Commands
  2008-07-29 15:10       ` [U-Boot-Users] [Patch 1/1] Re-Submit: QE UEC: Add MII Commands richardretanubun
  2008-07-29 15:48         ` Kim Phillips
@ 2008-07-29 21:35         ` u-boot at bugs.denx.de
  2008-07-29 21:43           ` Wolfgang Denk
  1 sibling, 1 reply; 8+ messages in thread
From: u-boot at bugs.denx.de @ 2008-07-29 21:35 UTC (permalink / raw)
  To: u-boot

Patch originally submitted by David Saada

http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/38946

Shamelessly copy-pasted below.

Richard
===========================================================================

Add MII commands to the UEC driver. Note that once a UEC device is selected,
any device on its MDIO bus can be addressed.

Signed-off-by: David Saada <david.saada <at> ecitele.com>

 uec.c |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

---
Added to GNATS database as unassigned-patches/15
>Responsible:    patch-coord
>Message-Id:     <488F32D1.2080704@ruggedcom.com>
>In-Reply-To:    <20080729144312.D998B248B9@gemini.denx.de>
>References:     <20080729144312.D998B248B9@gemini.denx.de>
>Patch-Date:     Tue Jul 29 17:10:09 +0200 2008
--- a/drivers/qe/uec.c	2008-03-30 16:30:16.342061000 +0300
+++ b/drivers/qe/uec.c	2008-03-31 12:30:13.862288000 +0300
@@ -29,6 +29,7 @@
 #include "uccf.h"
 #include "uec.h"
 #include "uec_phy.h"
+#include "miiphy.h"

 #if defined(CONFIG_QE)

@@ -125,6 +126,17 @@ static uec_info_t eth4_uec_info = {
 };
 #endif

+#define MAXCONTROLLERS	(4)
+
+static struct eth_device *devlist[MAXCONTROLLERS];
+
+static int uec_miiphy_read(char *devname, unsigned char addr,
+			    unsigned char reg, unsigned short *value);
+static int uec_miiphy_write(char *devname, unsigned char addr,
+			     unsigned char reg, unsigned short value);
+u16 phy_read (struct uec_mii_info *mii_info, u16 regnum);
+void phy_write (struct uec_mii_info *mii_info, u16 regnum, u16 val);
+
 static int uec_mac_enable(uec_private_t *uec, comm_dir_e mode)
 {
 	uec_t		*uec_regs;
@@ -1334,6 +1346,8 @@ int uec_initialize(int index)
 		return -EINVAL;
 	}

+	devlist[index] = dev;
+
 	uec->uec_info = uec_info;

 	sprintf(dev->name, "FSL UEC%d", index);
@@ -1356,6 +1370,45 @@ int uec_initialize(int index)
 		return err;
 	}

+#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \
+	&& !defined(BITBANGMII)
+	miiphy_register(dev->name, uec_miiphy_read, uec_miiphy_write);
+#endif
+
 	return 1;
 }
+
+#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \
+	&& !defined(BITBANGMII)
+
+/*
+ * Read a MII PHY register.
+ *
+ * Returns:
+ *  0 on success
+ */
+static int uec_miiphy_read(char *devname, unsigned char addr,
+			    unsigned char reg, unsigned short *value)
+{
+	*value = uec_read_phy_reg(devlist[0], addr, reg);
+
+	return 0;
+}
+
+/*
+ * Write a MII PHY register.
+ *
+ * Returns:
+ *  0 on success
+ */
+static int uec_miiphy_write(char *devname, unsigned char addr,
+			     unsigned char reg, unsigned short value)
+{
+	uec_write_phy_reg(devlist[0], addr, reg, value);
+
+	return 0;
+}
+
+#endif
+
 #endif /* CONFIG_QE */




Wolfgang Denk wrote:
> Dear Richard,
>
> in message <4885F8BE.6010503@gmail.com> Ben Warren wrote:
>   
>>>> The last info I have on this patch is on this posting:
>>>>
>>>> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/38965
>>>>         
>>> Hm... I vaguely recall seeing that, but it's more in Ben Warren's
>>> domain.  He probably wasn't copied on the patch, either.
>>>   
>>>       
>> Yeah, looks like I missed that one.  To answer your question, no.  I 
>> won't be able to apply it until the weekend at the earliest, so for now 
>> please just apply the patch yourself.
>>     
>
> Can you please post updated patches?
>
> Thanks in advance.
>
> Best regards,
>
> Wolfgang Denk
>
>   


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] unassigned-patches/15: [Patch 1/1] Re-Submit: QE UEC: Add MII Commands
  2008-07-29 21:35         ` [U-Boot-Users] unassigned-patches/15: " u-boot at bugs.denx.de
@ 2008-07-29 21:43           ` Wolfgang Denk
  0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2008-07-29 21:43 UTC (permalink / raw)
  To: u-boot

In message <20080729213501.D8D7128071@theia.denx.de> you wrote:
>
> Add MII commands to the UEC driver. Note that once a UEC device is selected,
> any device on its MDIO bus can be addressed.
> 
> Signed-off-by: David Saada <david.saada <at> ecitele.com>

Please provide a working, unmanlged mail address.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It's all Klatchian to me.
        - Terry Pratchett & Stephen Briggs, _The Discworld Companion_

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-07-29 21:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-16 19:17 [U-Boot-Users] QE UEC: MII command support and adding UECs richardretanubun
2008-07-16 21:16 ` Andy Fleming
2008-07-22 15:11   ` Ben Warren
2008-07-29 14:43     ` Wolfgang Denk
2008-07-29 15:10       ` [U-Boot-Users] [Patch 1/1] Re-Submit: QE UEC: Add MII Commands richardretanubun
2008-07-29 15:48         ` Kim Phillips
2008-07-29 21:35         ` [U-Boot-Users] unassigned-patches/15: " u-boot at bugs.denx.de
2008-07-29 21:43           ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox