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
5ca328d2
Commit
5ca328d2
authored
Mar 13, 2009
by
Krzysztof Hałasa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IXP4xx: add Ethernet and NPE support for IXP43x CPU.
Signed-off-by:
Krzysztof Hałasa
<
khc@pm.waw.pl
>
parent
0a07232f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
arch/arm/mach-ixp4xx/ixp4xx_npe.c
arch/arm/mach-ixp4xx/ixp4xx_npe.c
+3
-3
drivers/net/arm/ixp4xx_eth.c
drivers/net/arm/ixp4xx_eth.c
+13
-7
No files found.
arch/arm/mach-ixp4xx/ixp4xx_npe.c
View file @
5ca328d2
...
...
@@ -575,8 +575,8 @@ int npe_load_firmware(struct npe *npe, const char *name, struct device *dev)
for
(
i
=
0
;
i
<
image
->
size
;
i
++
)
image
->
data
[
i
]
=
swab32
(
image
->
data
[
i
]);
if
(
!
cpu_is_ixp46
x
()
&&
((
image
->
id
>>
28
)
&
0xF
/* device ID */
))
{
print_npe
(
KERN_INFO
,
npe
,
"IXP46x firmware ignored on "
if
(
cpu_is_ixp42
x
()
&&
((
image
->
id
>>
28
)
&
0xF
/* device ID */
))
{
print_npe
(
KERN_INFO
,
npe
,
"IXP4
3x/IXP4
6x firmware ignored on "
"IXP42x
\n
"
);
goto
err
;
}
...
...
@@ -596,7 +596,7 @@ int npe_load_firmware(struct npe *npe, const char *name, struct device *dev)
"revision 0x%X:%X
\n
"
,
(
image
->
id
>>
16
)
&
0xFF
,
(
image
->
id
>>
8
)
&
0xFF
,
image
->
id
&
0xFF
);
if
(
!
cpu_is_ixp46
x
())
{
if
(
cpu_is_ixp42
x
())
{
if
(
!
npe
->
id
)
instr_size
=
NPE_A_42X_INSTR_SIZE
;
else
...
...
drivers/net/arm/ixp4xx_eth.c
View file @
5ca328d2
...
...
@@ -335,11 +335,20 @@ static int ixp4xx_mdio_register(void)
if
(
!
(
mdio_bus
=
mdiobus_alloc
()))
return
-
ENOMEM
;
/* All MII PHY accesses use NPE-B Ethernet registers */
spin_lock_init
(
&
mdio_lock
);
mdio_regs
=
(
struct
eth_regs
__iomem
*
)
IXP4XX_EthB_BASE_VIRT
;
__raw_writel
(
DEFAULT_CORE_CNTRL
,
&
mdio_regs
->
core_control
);
if
(
cpu_is_ixp43x
())
{
/* IXP43x lacks NPE-B and uses NPE-C for MII PHY access */
if
(
!
(
ixp4xx_read_feature_bits
()
&
IXP4XX_FEATURE_NPEC_ETH
))
return
-
ENOSYS
;
mdio_regs
=
(
struct
eth_regs
__iomem
*
)
IXP4XX_EthC_BASE_VIRT
;
}
else
{
/* All MII PHY accesses use NPE-B Ethernet registers */
if
(
!
(
ixp4xx_read_feature_bits
()
&
IXP4XX_FEATURE_NPEB_ETH0
))
return
-
ENOSYS
;
mdio_regs
=
(
struct
eth_regs
__iomem
*
)
IXP4XX_EthB_BASE_VIRT
;
}
__raw_writel
(
DEFAULT_CORE_CNTRL
,
&
mdio_regs
->
core_control
);
spin_lock_init
(
&
mdio_lock
);
mdio_bus
->
name
=
"IXP4xx MII Bus"
;
mdio_bus
->
read
=
&
ixp4xx_mdio_read
;
mdio_bus
->
write
=
&
ixp4xx_mdio_write
;
...
...
@@ -1250,9 +1259,6 @@ static struct platform_driver ixp4xx_eth_driver = {
static
int
__init
eth_init_module
(
void
)
{
int
err
;
if
(
!
(
ixp4xx_read_feature_bits
()
&
IXP4XX_FEATURE_NPEB_ETH0
))
return
-
ENOSYS
;
if
((
err
=
ixp4xx_mdio_register
()))
return
err
;
return
platform_driver_register
(
&
ixp4xx_eth_driver
);
...
...
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