Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
ccf21c31
Commit
ccf21c31
authored
17 years ago
by
Joakim Tjernlund
Committed by
Kim Phillips
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add support CONFIG_UEC_ETH3 in MPC83xx
Signed-off-by:
Joakim Tjernlund
<
Joakim.Tjernlund@transmode.se
>
parent
e6af9932
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cpu/mpc83xx/cpu.c
+115
-1
115 additions, 1 deletion
cpu/mpc83xx/cpu.c
drivers/qe/uec.c
+23
-0
23 additions, 0 deletions
drivers/qe/uec.c
net/eth.c
+3
-0
3 additions, 0 deletions
net/eth.c
with
141 additions
and
1 deletion
cpu/mpc83xx/cpu.c
+
115
−
1
View file @
ccf21c31
...
...
@@ -520,6 +520,15 @@ static const struct {
"local-mac-address"
,
fdt_set_eth0
},
#elif CFG_UEC1_UCC_NUM == 1
/* UCC2 */
{
"/"
OF_QE
"/ucc@3000"
,
"mac-address"
,
fdt_set_eth0
},
{
"/"
OF_QE
"/ucc@3000"
,
"local-mac-address"
,
fdt_set_eth0
},
#elif CFG_UEC1_UCC_NUM == 2
/* UCC3 */
{
"/"
OF_QE
"/ucc@2200"
,
"mac-address"
,
...
...
@@ -529,10 +538,28 @@ static const struct {
"local-mac-address"
,
fdt_set_eth0
},
#elif CFG_UEC1_UCC_NUM == 3
/* UCC4 */
{
"/"
OF_QE
"/ucc@3200"
,
"mac-address"
,
fdt_set_eth0
},
{
"/"
OF_QE
"/ucc@3200"
,
"local-mac-address"
,
fdt_set_eth0
},
#endif
#endif
/* CONFIG_UEC_ETH1 */
#ifdef CONFIG_UEC_ETH2
#if CFG_UEC2_UCC_NUM == 1
/* UCC2 */
#if CFG_UEC2_UCC_NUM == 0
/* UCC1 */
{
"/"
OF_QE
"/ucc@2000"
,
"mac-address"
,
fdt_set_eth1
},
{
"/"
OF_QE
"/ucc@2000"
,
"local-mac-address"
,
fdt_set_eth1
},
#elif CFG_UEC2_UCC_NUM == 1
/* UCC2 */
{
"/"
OF_QE
"/ucc@3000"
,
"mac-address"
,
fdt_set_eth1
...
...
@@ -541,6 +568,15 @@ static const struct {
"local-mac-address"
,
fdt_set_eth1
},
#elif CFG_UEC2_UCC_NUM == 2
/* UCC3 */
{
"/"
OF_QE
"/ucc@2200"
,
"mac-address"
,
fdt_set_eth1
},
{
"/"
OF_QE
"/ucc@2200"
,
"local-mac-address"
,
fdt_set_eth1
},
#elif CFG_UEC2_UCC_NUM == 3
/* UCC4 */
{
"/"
OF_QE
"/ucc@3200"
,
"mac-address"
,
...
...
@@ -552,6 +588,84 @@ static const struct {
},
#endif
#endif
/* CONFIG_UEC_ETH2 */
#ifdef CONFIG_UEC_ETH3
#if CFG_UEC3_UCC_NUM == 0
/* UCC1 */
{
"/"
OF_QE
"/ucc@2000"
,
"mac-address"
,
fdt_set_eth2
},
{
"/"
OF_QE
"/ucc@2000"
,
"local-mac-address"
,
fdt_set_eth2
},
#elif CFG_UEC3_UCC_NUM == 1
/* UCC2 */
{
"/"
OF_QE
"/ucc@3000"
,
"mac-address"
,
fdt_set_eth2
},
{
"/"
OF_QE
"/ucc@3000"
,
"local-mac-address"
,
fdt_set_eth2
},
#elif CFG_UEC3_UCC_NUM == 2
/* UCC3 */
{
"/"
OF_QE
"/ucc@2200"
,
"mac-address"
,
fdt_set_eth2
},
{
"/"
OF_QE
"/ucc@2200"
,
"local-mac-address"
,
fdt_set_eth2
},
#elif CFG_UEC3_UCC_NUM == 3
/* UCC4 */
{
"/"
OF_QE
"/ucc@3200"
,
"mac-address"
,
fdt_set_eth2
},
{
"/"
OF_QE
"/ucc@3200"
,
"local-mac-address"
,
fdt_set_eth2
},
#endif
#endif
/* CONFIG_UEC_ETH3 */
#ifdef CONFIG_UEC_ETH4
#if CFG_UEC4_UCC_NUM == 0
/* UCC1 */
{
"/"
OF_QE
"/ucc@2000"
,
"mac-address"
,
fdt_set_eth3
},
{
"/"
OF_QE
"/ucc@2000"
,
"local-mac-address"
,
fdt_set_eth3
},
#elif CFG_UEC4_UCC_NUM == 1
/* UCC2 */
{
"/"
OF_QE
"/ucc@3000"
,
"mac-address"
,
fdt_set_eth3
},
{
"/"
OF_QE
"/ucc@3000"
,
"local-mac-address"
,
fdt_set_eth3
},
#elif CFG_UEC4_UCC_NUM == 2
/* UCC3 */
{
"/"
OF_QE
"/ucc@2200"
,
"mac-address"
,
fdt_set_eth3
},
{
"/"
OF_QE
"/ucc@2200"
,
"local-mac-address"
,
fdt_set_eth3
},
#elif CFG_UEC4_UCC_NUM == 3
/* UCC4 */
{
"/"
OF_QE
"/ucc@3200"
,
"mac-address"
,
fdt_set_eth3
},
{
"/"
OF_QE
"/ucc@3200"
,
"local-mac-address"
,
fdt_set_eth3
},
#endif
#endif
/* CONFIG_UEC_ETH4 */
#endif
/* CONFIG_QE */
};
...
...
This diff is collapsed.
Click to expand it.
drivers/qe/uec.c
+
23
−
0
View file @
ccf21c31
...
...
@@ -69,6 +69,25 @@ static uec_info_t eth2_uec_info = {
};
#endif
#ifdef CONFIG_UEC_ETH3
static
uec_info_t
eth3_uec_info
=
{
.
uf_info
=
{
.
ucc_num
=
CFG_UEC3_UCC_NUM
,
.
rx_clock
=
CFG_UEC3_RX_CLK
,
.
tx_clock
=
CFG_UEC3_TX_CLK
,
.
eth_type
=
CFG_UEC3_ETH_TYPE
,
},
.
num_threads_tx
=
UEC_NUM_OF_THREADS_4
,
.
num_threads_rx
=
UEC_NUM_OF_THREADS_4
,
.
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_UEC3_PHY_ADDR
,
.
enet_interface
=
CFG_UEC3_INTERFACE_MODE
,
};
#endif
static
int
uec_mac_enable
(
uec_private_t
*
uec
,
comm_dir_e
mode
)
{
uec_t
*
uec_regs
;
...
...
@@ -1237,6 +1256,10 @@ int uec_initialize(int index)
}
else
if
(
index
==
1
)
{
#ifdef CONFIG_UEC_ETH2
uec_info
=
&
eth2_uec_info
;
#endif
}
else
if
(
index
==
2
)
{
#ifdef CONFIG_UEC_ETH3
uec_info
=
&
eth3_uec_info
;
#endif
}
else
{
printf
(
"%s: index is illegal.
\n
"
,
__FUNCTION__
);
...
...
This diff is collapsed.
Click to expand it.
net/eth.c
+
3
−
0
View file @
ccf21c31
...
...
@@ -214,6 +214,9 @@ int eth_initialize(bd_t *bis)
#if defined(CONFIG_UEC_ETH2)
uec_initialize
(
1
);
#endif
#if defined(CONFIG_UEC_ETH3)
uec_initialize
(
2
);
#endif
#if defined(FEC_ENET) || defined(CONFIG_ETHER_ON_FCC)
fec_initialize
(
bis
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment