* [U-Boot-Users] [PATCH v3] QE UEC: Extend number of supported UECs to 4
@ 2008-01-15 8:40 David Saada
2008-01-15 9:05 ` Dave Liu
0 siblings, 1 reply; 7+ messages in thread
From: David Saada @ 2008-01-15 8:40 UTC (permalink / raw)
To: u-boot
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).
Signed-off-by: David Saada <david.saada@ecitele.com>
> diff -purN drivers/qe/uec.c.orig drivers/qe/uec.c
--- drivers/qe/uec.c.orig 2008-01-14 11:48:28.000000000 +0200
+++ drivers/qe/uec.c 2008-01-15 09:42:59.118870000 +0200
@@ -40,8 +40,13 @@ static uec_info_t eth1_uec_info = {
.tx_clock = CFG_UEC1_TX_CLK,
.eth_type = CFG_UEC1_ETH_TYPE,
},
+#if (CFG_UEC1_ETH_TYPE == FAST_ETH)
+ .num_threads_tx = UEC_NUM_OF_THREADS_1,
+ .num_threads_rx = UEC_NUM_OF_THREADS_1,
+#else
.num_threads_tx = UEC_NUM_OF_THREADS_4,
.num_threads_rx = UEC_NUM_OF_THREADS_4,
+#endif
.riscTx = QE_RISC_ALLOCATION_RISC1_AND_RISC2,
.riscRx = QE_RISC_ALLOCATION_RISC1_AND_RISC2,
.tx_bd_ring_len = 16,
@@ -58,8 +63,13 @@ static uec_info_t eth2_uec_info = {
.tx_clock = CFG_UEC2_TX_CLK,
.eth_type = CFG_UEC2_ETH_TYPE,
},
+#if (CFG_UEC2_ETH_TYPE == FAST_ETH)
+ .num_threads_tx = UEC_NUM_OF_THREADS_1,
+ .num_threads_rx = UEC_NUM_OF_THREADS_1,
+#else
.num_threads_tx = UEC_NUM_OF_THREADS_4,
.num_threads_rx = UEC_NUM_OF_THREADS_4,
+#endif
.riscTx = QE_RISC_ALLOCATION_RISC1_AND_RISC2,
.riscRx = QE_RISC_ALLOCATION_RISC1_AND_RISC2,
.tx_bd_ring_len = 16,
@@ -68,7 +78,6 @@ static uec_info_t eth2_uec_info = {
.enet_interface = CFG_UEC2_INTERFACE_MODE,
};
#endif
-
#ifdef CONFIG_UEC_ETH3
static uec_info_t eth3_uec_info = {
.uf_info = {
@@ -77,8 +86,13 @@ static uec_info_t eth3_uec_info = {
.tx_clock = CFG_UEC3_TX_CLK,
.eth_type = CFG_UEC3_ETH_TYPE,
},
+#if (CFG_UEC3_ETH_TYPE == FAST_ETH)
+ .num_threads_tx = UEC_NUM_OF_THREADS_1,
+ .num_threads_rx = UEC_NUM_OF_THREADS_1,
+#else
.num_threads_tx = UEC_NUM_OF_THREADS_4,
.num_threads_rx = UEC_NUM_OF_THREADS_4,
+#endif
.riscTx = QE_RISC_ALLOCATION_RISC1_AND_RISC2,
.riscRx = QE_RISC_ALLOCATION_RISC1_AND_RISC2,
.tx_bd_ring_len = 16,
@@ -87,6 +101,29 @@ static uec_info_t eth3_uec_info = {
.enet_interface = CFG_UEC3_INTERFACE_MODE,
};
#endif
+#ifdef CONFIG_UEC_ETH4
+static uec_info_t eth4_uec_info = {
+ .uf_info = {
+ .ucc_num = CFG_UEC4_UCC_NUM,
+ .rx_clock = CFG_UEC4_RX_CLK,
+ .tx_clock = CFG_UEC4_TX_CLK,
+ .eth_type = CFG_UEC4_ETH_TYPE,
+ },
+#if (CFG_UEC4_ETH_TYPE == FAST_ETH)
+ .num_threads_tx = UEC_NUM_OF_THREADS_1,
+ .num_threads_rx = UEC_NUM_OF_THREADS_1,
+#else
+ .num_threads_tx = UEC_NUM_OF_THREADS_4,
+ .num_threads_rx = UEC_NUM_OF_THREADS_4,
+#endif
+ .riscTx = QE_RISC_ALLOCATION_RISC1_AND_RISC2,
+ .riscRx = QE_RISC_ALLOCATION_RISC1_AND_RISC2,
+ .tx_bd_ring_len = 16,
+ .rx_bd_ring_len = 16,
+ .phy_address = CFG_UEC4_PHY_ADDR,
+ .enet_interface = CFG_UEC4_INTERFACE_MODE,
+};
+#endif
static int uec_mac_enable(uec_private_t *uec, comm_dir_e mode)
{
@@ -1262,6 +1299,10 @@ int uec_initialize(int index)
#ifdef CONFIG_UEC_ETH3
uec_info = ð3_uec_info;
#endif
+ } else if (index == 3) {
+#ifdef CONFIG_UEC_ETH4
+ uec_info = ð4_uec_info;
+#endif
} else {
printf("%s: index is illegal.\n", __FUNCTION__);
return -EINVAL;
> diff -purN net/eth.c.orig net/eth.c
--- net/eth.c.orig 2008-01-14 11:48:28.000000000 +0200
+++ net/eth.c 2008-01-14 18:59:56.708822000 +0200
@@ -217,6 +217,9 @@ int eth_initialize(bd_t *bis)
#if defined(CONFIG_UEC_ETH3)
uec_initialize(2);
#endif
+#if defined(CONFIG_UEC_ETH4)
+ uec_initialize(3);
+#endif
#if defined(FEC_ENET) || defined(CONFIG_ETHER_ON_FCC)
fec_initialize(bis);
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] [PATCH v3] QE UEC: Extend number of supported UECs to 4
2008-01-15 8:40 [U-Boot-Users] [PATCH v3] QE UEC: Extend number of supported UECs to 4 David Saada
@ 2008-01-15 9:05 ` Dave Liu
2008-01-15 10:41 ` David Saada
0 siblings, 1 reply; 7+ messages in thread
From: Dave Liu @ 2008-01-15 9:05 UTC (permalink / raw)
To: u-boot
David,
Sorry, I can not apply it. The patch has problem.
I suggest you manage source code with git,
and generate patch with git.
Thanks,
Dave
On Tue, 2008-01-15 at 10:40 +0200, David Saada wrote:
> 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).
>
> Signed-off-by: David Saada <david.saada@ecitele.com>
>
> > diff -purN drivers/qe/uec.c.orig drivers/qe/uec.c
'>' is added.
I don't know how did you generate the patch.
> --- drivers/qe/uec.c.orig 2008-01-14 11:48:28.000000000 +0200
> +++ drivers/qe/uec.c 2008-01-15 09:42:59.118870000 +0200
> @@ -40,8 +40,13 @@ static uec_info_t eth1_uec_info = {
> .tx_clock = CFG_UEC1_TX_CLK,
> .eth_type = CFG_UEC1_ETH_TYPE,
> },
> > diff -purN net/eth.c.orig net/eth.c
same as below.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] [PATCH v3] QE UEC: Extend number of supported UECs to 4
2008-01-15 9:05 ` Dave Liu
@ 2008-01-15 10:41 ` David Saada
2008-01-15 10:43 ` Liu Dave
0 siblings, 1 reply; 7+ messages in thread
From: David Saada @ 2008-01-15 10:41 UTC (permalink / raw)
To: u-boot
> Sorry, I can not apply it. The patch has problem.
>
> I suggest you manage source code with git,
> and generate patch with git.
>
> Thanks,
> Dave
>
Dave,
We have another source code repository (Synergy), and managing the
source code with git is just not possible. I have posted many patches in
the past using diff -purN, and there was never any problem.
> On Tue, 2008-01-15 at 10:40 +0200, David Saada wrote:
> > 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).
> >
> > Signed-off-by: David Saada <david.saada@ecitele.com>
> >
> > > diff -purN drivers/qe/uec.c.orig drivers/qe/uec.c
>
> '>' is added.
> I don't know how did you generate the patch.
>
> > --- drivers/qe/uec.c.orig 2008-01-14 11:48:28.000000000 +0200
> > +++ drivers/qe/uec.c 2008-01-15 09:42:59.118870000 +0200
> > @@ -40,8 +40,13 @@ static uec_info_t eth1_uec_info = {
> > .tx_clock = CFG_UEC1_TX_CLK,
> > .eth_type = CFG_UEC1_ETH_TYPE,
> > },
>
> > > diff -purN net/eth.c.orig net/eth.c
>
> same as below.
I can't understand the problem. Is it the '>' before the diff? I just
added it manually - I can remove it.
David.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] [PATCH v3] QE UEC: Extend number of supported UECs to 4
2008-01-15 10:41 ` David Saada
@ 2008-01-15 10:43 ` Liu Dave
2008-01-15 12:43 ` David Saada
0 siblings, 1 reply; 7+ messages in thread
From: Liu Dave @ 2008-01-15 10:43 UTC (permalink / raw)
To: u-boot
> We have another source code repository (Synergy), and managing the
> source code with git is just not possible. I have posted many
> patches in
> the past using diff -purN, and there was never any problem.
Ok, maybe problem occur in my site.
If Kim or Ben can apply it successfully, please accept it.
Thanks,
Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] [PATCH v3] QE UEC: Extend number of supported UECs to 4
2008-01-15 10:43 ` Liu Dave
@ 2008-01-15 12:43 ` David Saada
2008-01-16 4:14 ` Ben Warren
0 siblings, 1 reply; 7+ messages in thread
From: David Saada @ 2008-01-15 12:43 UTC (permalink / raw)
To: u-boot
> > We have another source code repository (Synergy), and managing the
> > source code with git is just not possible. I have posted many
> > patches in
> > the past using diff -purN, and there was never any problem.
>
> Ok, maybe problem occur in my site.
>
> If Kim or Ben can apply it successfully, please accept it.
>
> Thanks,
> Dave
Sure. I will wait with the second part of the patch (UEC MII commands)
until this is sorted out.
Thanks,
David.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] [PATCH v3] QE UEC: Extend number of supported UECs to 4
2008-01-15 12:43 ` David Saada
@ 2008-01-16 4:14 ` Ben Warren
2008-01-16 8:14 ` David Saada
0 siblings, 1 reply; 7+ messages in thread
From: Ben Warren @ 2008-01-16 4:14 UTC (permalink / raw)
To: u-boot
David Saada wrote:
>>> We have another source code repository (Synergy), and managing the
>>> source code with git is just not possible. I have posted many
>>> patches in
>>> the past using diff -purN, and there was never any problem.
>>>
>> Ok, maybe problem occur in my site.
>>
>> If Kim or Ben can apply it successfully, please accept it.
>>
>> Thanks,
>> Dave
>>
> Sure. I will wait with the second part of the patch (UEC MII commands)
> until this is sorted out.
> Thanks,
> David.
>
>
>
I was able to apply this with a little manual tweaking. I had to remove the '>' from in front
of each "diff -purN", and change the following patterns:
--- /file.orig
+++ /file
becomes:
--- a/file
+++ b/file
I'll send a pull request tomorrow to pick this up.
thanks,
Ben
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] [PATCH v3] QE UEC: Extend number of supported UECs to 4
2008-01-16 4:14 ` Ben Warren
@ 2008-01-16 8:14 ` David Saada
0 siblings, 0 replies; 7+ messages in thread
From: David Saada @ 2008-01-16 8:14 UTC (permalink / raw)
To: u-boot
> I was able to apply this with a little manual tweaking. I had to
remove
> the '>' from in front
> of each "diff -purN", and change the following patterns:
>
> --- /file.orig
> +++ /file
>
> becomes:
>
> --- a/file
> +++ b/file
>
> I'll send a pull request tomorrow to pick this up.
>
> thanks,
> Ben
Thanks Ben. I'll keep posting my future patches this way (no hassle
here).
David.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-01-16 8:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-15 8:40 [U-Boot-Users] [PATCH v3] QE UEC: Extend number of supported UECs to 4 David Saada
2008-01-15 9:05 ` Dave Liu
2008-01-15 10:41 ` David Saada
2008-01-15 10:43 ` Liu Dave
2008-01-15 12:43 ` David Saada
2008-01-16 4:14 ` Ben Warren
2008-01-16 8:14 ` David Saada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox