Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
30be2b69
Commit
30be2b69
authored
Mar 05, 2005
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge pobox.com:/garz/repo/netdev-2.6/smc91x
into pobox.com:/garz/repo/net-drivers-2.6
parents
56ca2948
955bd9bb
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
258 additions
and
100 deletions
+258
-100
arch/arm/mach-pxa/lubbock.c
arch/arm/mach-pxa/lubbock.c
+2
-0
arch/arm/mach-sa1100/neponset.c
arch/arm/mach-sa1100/neponset.c
+2
-0
drivers/net/smc91x.c
drivers/net/smc91x.c
+182
-93
drivers/net/smc91x.h
drivers/net/smc91x.h
+72
-7
No files found.
arch/arm/mach-pxa/lubbock.c
View file @
30be2b69
...
...
@@ -138,6 +138,7 @@ static struct platform_device sa1111_device = {
static
struct
resource
smc91x_resources
[]
=
{
[
0
]
=
{
.
name
=
"smc91x-regs"
,
.
start
=
0x0c000000
,
.
end
=
0x0c0fffff
,
.
flags
=
IORESOURCE_MEM
,
...
...
@@ -148,6 +149,7 @@ static struct resource smc91x_resources[] = {
.
flags
=
IORESOURCE_IRQ
,
},
[
2
]
=
{
.
name
=
"smc91x-attrib"
,
.
start
=
0x0e000000
,
.
end
=
0x0e0fffff
,
.
flags
=
IORESOURCE_MEM
,
...
...
arch/arm/mach-sa1100/neponset.c
View file @
30be2b69
...
...
@@ -266,6 +266,7 @@ static struct platform_device sa1111_device = {
static
struct
resource
smc91x_resources
[]
=
{
[
0
]
=
{
.
name
=
"smc91x-regs"
,
.
start
=
SA1100_CS3_PHYS
,
.
end
=
SA1100_CS3_PHYS
+
0x01ffffff
,
.
flags
=
IORESOURCE_MEM
,
...
...
@@ -276,6 +277,7 @@ static struct resource smc91x_resources[] = {
.
flags
=
IORESOURCE_IRQ
,
},
[
2
]
=
{
.
name
=
"smc91x-attrib"
,
.
start
=
SA1100_CS3_PHYS
+
0x02000000
,
.
end
=
SA1100_CS3_PHYS
+
0x03ffffff
,
.
flags
=
IORESOURCE_MEM
,
...
...
drivers/net/smc91x.c
View file @
30be2b69
This diff is collapsed.
Click to expand it.
drivers/net/smc91x.h
View file @
30be2b69
...
...
@@ -162,6 +162,26 @@ SMC_outw(u16 val, unsigned long ioaddr, int reg)
}
}
#elif defined(CONFIG_ARCH_OMAP)
/* We can only do 16-bit reads and writes in the static memory space. */
#define SMC_CAN_USE_8BIT 0
#define SMC_CAN_USE_16BIT 1
#define SMC_CAN_USE_32BIT 0
#define SMC_IO_SHIFT 0
#define SMC_NOWAIT 1
#define SMC_inb(a, r) readb((a) + (r))
#define SMC_outb(v, a, r) writeb(v, (a) + (r))
#define SMC_inw(a, r) readw((a) + (r))
#define SMC_outw(v, a, r) writew(v, (a) + (r))
#define SMC_insw(a, r, p, l) readsw((a) + (r), p, l)
#define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l)
#define SMC_inl(a, r) readl((a) + (r))
#define SMC_outl(v, a, r) writel(v, (a) + (r))
#define SMC_insl(a, r, p, l) readsl((a) + (r), p, l)
#define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l)
#elif defined(CONFIG_ISA)
#define SMC_CAN_USE_8BIT 1
...
...
@@ -362,7 +382,7 @@ smc_pxa_dma_irq(int dma, void *dummy, struct pt_regs *regs)
#define SMC_IO_SHIFT 0
#endif
#define SMC_IO_EXTENT (16 << SMC_IO_SHIFT)
#define SMC_DATA_EXTENT (4)
/*
. Bank Select Register:
...
...
@@ -883,7 +903,7 @@ static const char * chip_ids[ 16 ] = {
#endif
#if SMC_CAN_USE_32BIT
#define SMC_PUSH_DATA(p, l) \
#define
_
SMC_PUSH_DATA(p, l) \
do { \
char *__ptr = (p); \
int __len = (l); \
...
...
@@ -898,7 +918,7 @@ static const char * chip_ids[ 16 ] = {
SMC_outw( *((u16 *)__ptr), ioaddr, DATA_REG ); \
} \
} while (0)
#define SMC_PULL_DATA(p, l) \
#define
_
SMC_PULL_DATA(p, l) \
do { \
char *__ptr = (p); \
int __len = (l); \
...
...
@@ -918,11 +938,11 @@ static const char * chip_ids[ 16 ] = {
SMC_insl( ioaddr, DATA_REG, __ptr, __len >> 2); \
} while (0)
#elif SMC_CAN_USE_16BIT
#define SMC_PUSH_DATA(p, l) SMC_outsw( ioaddr, DATA_REG, p, (l) >> 1 )
#define SMC_PULL_DATA(p, l) SMC_insw ( ioaddr, DATA_REG, p, (l) >> 1 )
#define
_
SMC_PUSH_DATA(p, l) SMC_outsw( ioaddr, DATA_REG, p, (l) >> 1 )
#define
_
SMC_PULL_DATA(p, l) SMC_insw ( ioaddr, DATA_REG, p, (l) >> 1 )
#elif SMC_CAN_USE_8BIT
#define SMC_PUSH_DATA(p, l) SMC_outsb( ioaddr, DATA_REG, p, l )
#define SMC_PULL_DATA(p, l) SMC_insb ( ioaddr, DATA_REG, p, l )
#define
_
SMC_PUSH_DATA(p, l) SMC_outsb( ioaddr, DATA_REG, p, l )
#define
_
SMC_PULL_DATA(p, l) SMC_insb ( ioaddr, DATA_REG, p, l )
#endif
#if ! SMC_CAN_USE_16BIT
...
...
@@ -941,6 +961,51 @@ static const char * chip_ids[ 16 ] = {
})
#endif
#if SMC_CAN_USE_DATACS
#define SMC_PUSH_DATA(p, l) \
if ( lp->datacs ) { \
unsigned char *__ptr = (p); \
int __len = (l); \
if (__len >= 2 && (unsigned long)__ptr & 2) { \
__len -= 2; \
SMC_outw( *((u16 *)__ptr), ioaddr, DATA_REG ); \
__ptr += 2; \
} \
outsl(lp->datacs, __ptr, __len >> 2); \
if (__len & 2) { \
__ptr += (__len & ~3); \
SMC_outw( *((u16 *)__ptr), ioaddr, DATA_REG ); \
} \
} else { \
_SMC_PUSH_DATA(p, l); \
}
#define SMC_PULL_DATA(p, l) \
if ( lp->datacs ) { \
unsigned char *__ptr = (p); \
int __len = (l); \
if ((unsigned long)__ptr & 2) { \
/* \
* We want 32bit alignment here. \
* Since some buses perform a full 32bit \
* fetch even for 16bit data we can't use \
* SMC_inw() here. Back both source (on chip \
* and destination) pointers of 2 bytes. \
*/
\
__ptr -= 2; \
__len += 2; \
SMC_SET_PTR( 2|PTR_READ|PTR_RCV|PTR_AUTOINC ); \
} \
__len += 2; \
insl( lp->datacs, __ptr, __len >> 2); \
} else { \
_SMC_PULL_DATA(p, l); \
}
#else
#define SMC_PUSH_DATA(p, l) _SMC_PUSH_DATA(p, l)
#define SMC_PULL_DATA(p, l) _SMC_PULL_DATA(p, l)
#endif
#if !defined (SMC_INTERRUPT_PREAMBLE)
# define SMC_INTERRUPT_PREAMBLE
#endif
...
...
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