Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
ae19161e
Commit
ae19161e
authored
Sep 24, 2008
by
Jeff Garzik
Committed by
Jeff Garzik
Sep 24, 2008
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-2.6.28' of
git://git.marvell.com/mv643xx_eth
into upstream-next
parents
152cbcf9
042af53c
Changes
24
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
820 additions
and
777 deletions
+820
-777
arch/arm/mach-kirkwood/db88f6281-bp-setup.c
arch/arm/mach-kirkwood/db88f6281-bp-setup.c
+1
-1
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+1
-1
arch/arm/mach-kirkwood/rd88f6281-setup.c
arch/arm/mach-kirkwood/rd88f6281-setup.c
+1
-1
arch/arm/mach-loki/lb88rc8480-setup.c
arch/arm/mach-loki/lb88rc8480-setup.c
+1
-1
arch/arm/mach-mv78xx0/common.c
arch/arm/mach-mv78xx0/common.c
+3
-3
arch/arm/mach-mv78xx0/db78x00-bp-setup.c
arch/arm/mach-mv78xx0/db78x00-bp-setup.c
+4
-4
arch/arm/mach-orion5x/db88f5281-setup.c
arch/arm/mach-orion5x/db88f5281-setup.c
+1
-1
arch/arm/mach-orion5x/dns323-setup.c
arch/arm/mach-orion5x/dns323-setup.c
+1
-1
arch/arm/mach-orion5x/kurobox_pro-setup.c
arch/arm/mach-orion5x/kurobox_pro-setup.c
+1
-1
arch/arm/mach-orion5x/mss2-setup.c
arch/arm/mach-orion5x/mss2-setup.c
+1
-1
arch/arm/mach-orion5x/mv2120-setup.c
arch/arm/mach-orion5x/mv2120-setup.c
+1
-1
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
+1
-1
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
+1
-1
arch/arm/mach-orion5x/rd88f5182-setup.c
arch/arm/mach-orion5x/rd88f5182-setup.c
+1
-1
arch/arm/mach-orion5x/ts78xx-setup.c
arch/arm/mach-orion5x/ts78xx-setup.c
+1
-2
arch/arm/mach-orion5x/tsx09-common.c
arch/arm/mach-orion5x/tsx09-common.c
+1
-1
arch/arm/mach-orion5x/wnr854t-setup.c
arch/arm/mach-orion5x/wnr854t-setup.c
+1
-1
arch/arm/mach-orion5x/wrt350n-v2-setup.c
arch/arm/mach-orion5x/wrt350n-v2-setup.c
+1
-1
arch/powerpc/sysdev/mv64x60_dev.c
arch/powerpc/sysdev/mv64x60_dev.c
+2
-4
drivers/net/Kconfig
drivers/net/Kconfig
+1
-1
drivers/net/mv643xx_eth.c
drivers/net/mv643xx_eth.c
+736
-702
drivers/net/phy/mdio_bus.c
drivers/net/phy/mdio_bus.c
+48
-41
include/linux/mv643xx_eth.h
include/linux/mv643xx_eth.h
+8
-5
include/linux/phy.h
include/linux/phy.h
+2
-0
No files found.
arch/arm/mach-kirkwood/db88f6281-bp-setup.c
View file @
ae19161e
...
...
@@ -25,7 +25,7 @@
#include "common.h"
static
struct
mv643xx_eth_platform_data
db88f6281_ge00_data
=
{
.
phy_addr
=
8
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
)
,
};
static
struct
mv_sata_platform_data
db88f6281_sata_data
=
{
...
...
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
View file @
ae19161e
...
...
@@ -30,7 +30,7 @@
#define RD88F6192_GPIO_USB_VBUS 10
static
struct
mv643xx_eth_platform_data
rd88f6192_ge00_data
=
{
.
phy_addr
=
8
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
)
,
};
static
struct
mv_sata_platform_data
rd88f6192_sata_data
=
{
...
...
arch/arm/mach-kirkwood/rd88f6281-setup.c
View file @
ae19161e
...
...
@@ -69,7 +69,7 @@ static struct platform_device rd88f6281_nand_flash = {
};
static
struct
mv643xx_eth_platform_data
rd88f6281_ge00_data
=
{
.
phy_addr
=
-
1
,
.
phy_addr
=
MV643XX_ETH_PHY_NONE
,
.
speed
=
SPEED_1000
,
.
duplex
=
DUPLEX_FULL
,
};
...
...
arch/arm/mach-loki/lb88rc8480-setup.c
View file @
ae19161e
...
...
@@ -67,7 +67,7 @@ static struct platform_device lb88rc8480_boot_flash = {
};
static
struct
mv643xx_eth_platform_data
lb88rc8480_ge0_data
=
{
.
phy_addr
=
1
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
1
)
,
.
mac_addr
=
{
0x00
,
0x50
,
0x43
,
0x11
,
0x22
,
0x33
},
};
...
...
arch/arm/mach-mv78xx0/common.c
View file @
ae19161e
...
...
@@ -330,6 +330,7 @@ void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data)
struct
mv643xx_eth_shared_platform_data
mv78xx0_ge01_shared_data
=
{
.
t_clk
=
0
,
.
dram
=
&
mv78xx0_mbus_dram_info
,
.
shared_smi
=
&
mv78xx0_ge00_shared
,
};
static
struct
resource
mv78xx0_ge01_shared_resources
[]
=
{
...
...
@@ -370,7 +371,6 @@ static struct platform_device mv78xx0_ge01 = {
void
__init
mv78xx0_ge01_init
(
struct
mv643xx_eth_platform_data
*
eth_data
)
{
eth_data
->
shared
=
&
mv78xx0_ge01_shared
;
eth_data
->
shared_smi
=
&
mv78xx0_ge00_shared
;
mv78xx0_ge01
.
dev
.
platform_data
=
eth_data
;
platform_device_register
(
&
mv78xx0_ge01_shared
);
...
...
@@ -384,6 +384,7 @@ void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data)
struct
mv643xx_eth_shared_platform_data
mv78xx0_ge10_shared_data
=
{
.
t_clk
=
0
,
.
dram
=
&
mv78xx0_mbus_dram_info
,
.
shared_smi
=
&
mv78xx0_ge00_shared
,
};
static
struct
resource
mv78xx0_ge10_shared_resources
[]
=
{
...
...
@@ -424,7 +425,6 @@ static struct platform_device mv78xx0_ge10 = {
void
__init
mv78xx0_ge10_init
(
struct
mv643xx_eth_platform_data
*
eth_data
)
{
eth_data
->
shared
=
&
mv78xx0_ge10_shared
;
eth_data
->
shared_smi
=
&
mv78xx0_ge00_shared
;
mv78xx0_ge10
.
dev
.
platform_data
=
eth_data
;
platform_device_register
(
&
mv78xx0_ge10_shared
);
...
...
@@ -438,6 +438,7 @@ void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data)
struct
mv643xx_eth_shared_platform_data
mv78xx0_ge11_shared_data
=
{
.
t_clk
=
0
,
.
dram
=
&
mv78xx0_mbus_dram_info
,
.
shared_smi
=
&
mv78xx0_ge00_shared
,
};
static
struct
resource
mv78xx0_ge11_shared_resources
[]
=
{
...
...
@@ -478,7 +479,6 @@ static struct platform_device mv78xx0_ge11 = {
void
__init
mv78xx0_ge11_init
(
struct
mv643xx_eth_platform_data
*
eth_data
)
{
eth_data
->
shared
=
&
mv78xx0_ge11_shared
;
eth_data
->
shared_smi
=
&
mv78xx0_ge00_shared
;
mv78xx0_ge11
.
dev
.
platform_data
=
eth_data
;
platform_device_register
(
&
mv78xx0_ge11_shared
);
...
...
arch/arm/mach-mv78xx0/db78x00-bp-setup.c
View file @
ae19161e
...
...
@@ -19,19 +19,19 @@
#include "common.h"
static
struct
mv643xx_eth_platform_data
db78x00_ge00_data
=
{
.
phy_addr
=
8
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
)
,
};
static
struct
mv643xx_eth_platform_data
db78x00_ge01_data
=
{
.
phy_addr
=
9
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
9
)
,
};
static
struct
mv643xx_eth_platform_data
db78x00_ge10_data
=
{
.
phy_addr
=
-
1
,
.
phy_addr
=
MV643XX_ETH_PHY_NONE
,
};
static
struct
mv643xx_eth_platform_data
db78x00_ge11_data
=
{
.
phy_addr
=
-
1
,
.
phy_addr
=
MV643XX_ETH_PHY_NONE
,
};
static
struct
mv_sata_platform_data
db78x00_sata_data
=
{
...
...
arch/arm/mach-orion5x/db88f5281-setup.c
View file @
ae19161e
...
...
@@ -285,7 +285,7 @@ subsys_initcall(db88f5281_pci_init);
* Ethernet
****************************************************************************/
static
struct
mv643xx_eth_platform_data
db88f5281_eth_data
=
{
.
phy_addr
=
8
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
)
,
};
/*****************************************************************************
...
...
arch/arm/mach-orion5x/dns323-setup.c
View file @
ae19161e
...
...
@@ -79,7 +79,7 @@ subsys_initcall(dns323_pci_init);
*/
static
struct
mv643xx_eth_platform_data
dns323_eth_data
=
{
.
phy_addr
=
8
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
)
,
};
/****************************************************************************
...
...
arch/arm/mach-orion5x/kurobox_pro-setup.c
View file @
ae19161e
...
...
@@ -161,7 +161,7 @@ subsys_initcall(kurobox_pro_pci_init);
****************************************************************************/
static
struct
mv643xx_eth_platform_data
kurobox_pro_eth_data
=
{
.
phy_addr
=
8
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
)
,
};
/*****************************************************************************
...
...
arch/arm/mach-orion5x/mss2-setup.c
View file @
ae19161e
...
...
@@ -109,7 +109,7 @@ subsys_initcall(mss2_pci_init);
****************************************************************************/
static
struct
mv643xx_eth_platform_data
mss2_eth_data
=
{
.
phy_addr
=
8
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
)
,
};
/*****************************************************************************
...
...
arch/arm/mach-orion5x/mv2120-setup.c
View file @
ae19161e
...
...
@@ -39,7 +39,7 @@
* Ethernet
****************************************************************************/
static
struct
mv643xx_eth_platform_data
mv2120_eth_data
=
{
.
phy_addr
=
8
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
)
,
};
static
struct
mv_sata_platform_data
mv2120_sata_data
=
{
...
...
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
View file @
ae19161e
...
...
@@ -88,7 +88,7 @@ static struct orion5x_mpp_mode rd88f5181l_fxo_mpp_modes[] __initdata = {
};
static
struct
mv643xx_eth_platform_data
rd88f5181l_fxo_eth_data
=
{
.
phy_addr
=
-
1
,
.
phy_addr
=
MV643XX_ETH_PHY_NONE
,
.
speed
=
SPEED_1000
,
.
duplex
=
DUPLEX_FULL
,
};
...
...
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
View file @
ae19161e
...
...
@@ -89,7 +89,7 @@ static struct orion5x_mpp_mode rd88f5181l_ge_mpp_modes[] __initdata = {
};
static
struct
mv643xx_eth_platform_data
rd88f5181l_ge_eth_data
=
{
.
phy_addr
=
-
1
,
.
phy_addr
=
MV643XX_ETH_PHY_NONE
,
.
speed
=
SPEED_1000
,
.
duplex
=
DUPLEX_FULL
,
};
...
...
arch/arm/mach-orion5x/rd88f5182-setup.c
View file @
ae19161e
...
...
@@ -221,7 +221,7 @@ subsys_initcall(rd88f5182_pci_init);
****************************************************************************/
static
struct
mv643xx_eth_platform_data
rd88f5182_eth_data
=
{
.
phy_addr
=
8
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
)
,
};
/*****************************************************************************
...
...
arch/arm/mach-orion5x/ts78xx-setup.c
View file @
ae19161e
...
...
@@ -103,8 +103,7 @@ static struct platform_device ts78xx_nor_boot_flash = {
* Ethernet
****************************************************************************/
static
struct
mv643xx_eth_platform_data
ts78xx_eth_data
=
{
.
phy_addr
=
0
,
.
force_phy_addr
=
1
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
0
),
};
/*****************************************************************************
...
...
arch/arm/mach-orion5x/tsx09-common.c
View file @
ae19161e
...
...
@@ -48,7 +48,7 @@ void qnap_tsx09_power_off(void)
****************************************************************************/
struct
mv643xx_eth_platform_data
qnap_tsx09_eth_data
=
{
.
phy_addr
=
8
,
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
)
,
};
static
int
__init
qnap_tsx09_parse_hex_nibble
(
char
n
)
...
...
arch/arm/mach-orion5x/wnr854t-setup.c
View file @
ae19161e
...
...
@@ -92,7 +92,7 @@ static struct platform_device wnr854t_nor_flash = {
};
static
struct
mv643xx_eth_platform_data
wnr854t_eth_data
=
{
.
phy_addr
=
-
1
,
.
phy_addr
=
MV643XX_ETH_PHY_NONE
,
.
speed
=
SPEED_1000
,
.
duplex
=
DUPLEX_FULL
,
};
...
...
arch/arm/mach-orion5x/wrt350n-v2-setup.c
View file @
ae19161e
...
...
@@ -100,7 +100,7 @@ static struct platform_device wrt350n_v2_nor_flash = {
};
static
struct
mv643xx_eth_platform_data
wrt350n_v2_eth_data
=
{
.
phy_addr
=
-
1
,
.
phy_addr
=
MV643XX_ETH_PHY_NONE
,
.
speed
=
SPEED_1000
,
.
duplex
=
DUPLEX_FULL
,
};
...
...
arch/powerpc/sysdev/mv64x60_dev.c
View file @
ae19161e
...
...
@@ -293,10 +293,8 @@ static int __init mv64x60_eth_device_setup(struct device_node *np, int id,
return
-
ENODEV
;
prop
=
of_get_property
(
phy
,
"reg"
,
NULL
);
if
(
prop
)
{
pdata
.
force_phy_addr
=
1
;
pdata
.
phy_addr
=
*
prop
;
}
if
(
prop
)
pdata
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
*
prop
);
of_node_put
(
phy
);
...
...
drivers/net/Kconfig
View file @
ae19161e
...
...
@@ -2274,7 +2274,7 @@ config UGETH_TX_ON_DEMAND
config MV643XX_ETH
tristate "Marvell Discovery (643XX) and Orion ethernet support"
depends on MV64360 || MV64X60 || (PPC_MULTIPLATFORM && PPC32) || PLAT_ORION
select
MII
select
PHYLIB
help
This driver supports the gigabit ethernet MACs in the
Marvell Discovery PPC/MIPS chipset family (MV643XX) and
...
...
drivers/net/mv643xx_eth.c
View file @
ae19161e
This diff is collapsed.
Click to expand it.
drivers/net/phy/mdio_bus.c
View file @
ae19161e
...
...
@@ -60,17 +60,41 @@ int mdiobus_register(struct mii_bus *bus)
bus
->
reset
(
bus
);
for
(
i
=
0
;
i
<
PHY_MAX_ADDR
;
i
++
)
{
bus
->
phy_map
[
i
]
=
NULL
;
if
((
bus
->
phy_mask
&
(
1
<<
i
))
==
0
)
{
struct
phy_device
*
phydev
;
if
(
bus
->
phy_mask
&
(
1
<<
i
))
{
bus
->
phy_map
[
i
]
=
NULL
;
continue
;
phydev
=
mdiobus_scan
(
bus
,
i
);
if
(
IS_ERR
(
phydev
))
err
=
PTR_ERR
(
phydev
);
}
}
phydev
=
get_phy_device
(
bus
,
i
);
pr_info
(
"%s: probed
\n
"
,
bus
->
name
);
if
(
IS_ERR
(
phydev
))
return
PTR_ERR
(
phydev
);
return
err
;
}
EXPORT_SYMBOL
(
mdiobus_register
);
void
mdiobus_unregister
(
struct
mii_bus
*
bus
)
{
int
i
;
for
(
i
=
0
;
i
<
PHY_MAX_ADDR
;
i
++
)
{
if
(
bus
->
phy_map
[
i
])
device_unregister
(
&
bus
->
phy_map
[
i
]
->
dev
);
}
}
EXPORT_SYMBOL
(
mdiobus_unregister
);
struct
phy_device
*
mdiobus_scan
(
struct
mii_bus
*
bus
,
int
addr
)
{
struct
phy_device
*
phydev
;
int
err
;
phydev
=
get_phy_device
(
bus
,
addr
);
if
(
IS_ERR
(
phydev
)
||
phydev
==
NULL
)
return
phydev
;
/* There's a PHY at this address
* We need to set:
...
...
@@ -80,12 +104,12 @@ int mdiobus_register(struct mii_bus *bus)
* 4) bus
* 5) mii_bus
* And, we need to register it */
if
(
phydev
)
{
phydev
->
irq
=
bus
->
irq
[
i
]
;
phydev
->
irq
=
bus
->
irq
!=
NULL
?
bus
->
irq
[
addr
]
:
PHY_POLL
;
phydev
->
dev
.
parent
=
bus
->
dev
;
phydev
->
dev
.
bus
=
&
mdio_bus_type
;
snprintf
(
phydev
->
dev
.
bus_id
,
BUS_ID_SIZE
,
PHY_ID_FMT
,
bus
->
id
,
i
);
snprintf
(
phydev
->
dev
.
bus_id
,
BUS_ID_SIZE
,
PHY_ID_FMT
,
bus
->
id
,
addr
);
phydev
->
bus
=
bus
;
...
...
@@ -93,34 +117,17 @@ int mdiobus_register(struct mii_bus *bus)
phy_scan_fixups
(
phydev
);
err
=
device_register
(
&
phydev
->
dev
);
if
(
err
)
{
printk
(
KERN_ERR
"phy %d failed to register
\n
"
,
i
);
printk
(
KERN_ERR
"phy %d failed to register
\n
"
,
addr
);
phy_device_free
(
phydev
);
phydev
=
NULL
;
}
}
bus
->
phy_map
[
i
]
=
phydev
;
}
bus
->
phy_map
[
addr
]
=
phydev
;
pr_info
(
"%s: probed
\n
"
,
bus
->
name
);
return
err
;
return
phydev
;
}
EXPORT_SYMBOL
(
mdiobus_register
);
void
mdiobus_unregister
(
struct
mii_bus
*
bus
)
{
int
i
;
for
(
i
=
0
;
i
<
PHY_MAX_ADDR
;
i
++
)
{
if
(
bus
->
phy_map
[
i
])
device_unregister
(
&
bus
->
phy_map
[
i
]
->
dev
);
}
}
EXPORT_SYMBOL
(
mdiobus_unregister
);
EXPORT_SYMBOL
(
mdiobus_scan
);
/**
* mdio_bus_match - determine if given PHY driver supports the given PHY device
...
...
include/linux/mv643xx_eth.h
View file @
ae19161e
...
...
@@ -17,9 +17,14 @@
struct
mv643xx_eth_shared_platform_data
{
struct
mbus_dram_target_info
*
dram
;
struct
platform_device
*
shared_smi
;
unsigned
int
t_clk
;
};
#define MV643XX_ETH_PHY_ADDR_DEFAULT 0
#define MV643XX_ETH_PHY_ADDR(x) (0x80 | (x))
#define MV643XX_ETH_PHY_NONE 0xff
struct
mv643xx_eth_platform_data
{
/*
* Pointer back to our parent instance, and our port number.
...
...
@@ -30,8 +35,6 @@ struct mv643xx_eth_platform_data {
/*
* Whether a PHY is present, and if yes, at which address.
*/
struct
platform_device
*
shared_smi
;
int
force_phy_addr
;
int
phy_addr
;
/*
...
...
@@ -49,10 +52,10 @@ struct mv643xx_eth_platform_data {
int
duplex
;
/*
*
Which
RX/TX queues to use.
*
How many
RX/TX queues to use.
*/
int
rx_queue_
mask
;
int
tx_queue_
mask
;
int
rx_queue_
count
;
int
tx_queue_
count
;
/*
* Override default RX/TX queue sizes if nonzero.
...
...
include/linux/phy.h
View file @
ae19161e
...
...
@@ -410,6 +410,8 @@ int phy_start_aneg(struct phy_device *phydev);
int
mdiobus_register
(
struct
mii_bus
*
bus
);
void
mdiobus_unregister
(
struct
mii_bus
*
bus
);
struct
phy_device
*
mdiobus_scan
(
struct
mii_bus
*
bus
,
int
addr
);
void
phy_sanitize_settings
(
struct
phy_device
*
phydev
);
int
phy_stop_interrupts
(
struct
phy_device
*
phydev
);
int
phy_enable_interrupts
(
struct
phy_device
*
phydev
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment