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
c7141bba
Commit
c7141bba
authored
Dec 06, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://bk.arm.linux.org.uk/linux-2.6-rmk
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
5a530b5a
d97fac8f
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
96 additions
and
23 deletions
+96
-23
Documentation/arm/Sharp-LH/IOBarrier
Documentation/arm/Sharp-LH/IOBarrier
+23
-10
arch/arm/Kconfig
arch/arm/Kconfig
+1
-1
arch/arm/mach-lh7a40x/arch-lpd7a40x.c
arch/arm/mach-lh7a40x/arch-lpd7a40x.c
+2
-2
arch/arm/mach-lh7a40x/common.h
arch/arm/mach-lh7a40x/common.h
+9
-4
arch/arm/mach-lh7a40x/time.c
arch/arm/mach-lh7a40x/time.c
+1
-1
arch/arm/mach-sa1100/lart.c
arch/arm/mach-sa1100/lart.c
+2
-0
drivers/char/watchdog/ixp4xx_wdt.c
drivers/char/watchdog/ixp4xx_wdt.c
+1
-1
drivers/net/smc91x.c
drivers/net/smc91x.c
+5
-0
drivers/net/smc91x.h
drivers/net/smc91x.h
+50
-0
include/asm-arm/arch-sa1100/ide.h
include/asm-arm/arch-sa1100/ide.h
+2
-0
include/asm-arm/ide.h
include/asm-arm/ide.h
+0
-4
No files found.
Documentation/arm/Sharp-LH/IOBarrier
View file @
c7141bba
...
...
@@ -5,7 +5,7 @@ Due to an unfortunate oversight when the Card Engines were designed,
the signals that control access to some peripherals, most notably the
SMC91C9111 ethernet controller, are not properly handled.
The symptom is that back to back IO with the peripheral returns
The symptom is that
some
back to back IO with the peripheral returns
unreliable data. With the SMC chip, you'll see errors about the bank
register being 'screwed'.
...
...
@@ -13,20 +13,33 @@ The cause is that the AEN signal to the SMC chip does not transition
for every memory access. It is driven through the CPLD from the CS7
line of the CPU's static memory controller which is optimized to
eliminate unnecessary transitions. Yet, the SMC requires a transition
for every access. The Sharp website has more information on the
effect of this power conservation feature on peripheral interfacing.
for every write access. The Sharp website has more information about
the effect this power-conserving feature has on peripheral
interfacing.
The solution is to follow every access to the SMC chip with an access
to another memory region that will force the CPU to release the chip
select line. Note that it is important to guarantee that the access
will force the CPU off-chip. We map a page of SDRAM as if it were an
uncacheable IO device and read from it after every SMC IO operation.
The solution is to follow every write access to the SMC chip with an
access to another memory region that will force the CPU to release the
chip select line. It is important to guarantee that this access
forces the CPU off-chip. We map a page of SDRAM as if it were an
uncacheable IO device and read from it after every SMC IO write
operation.
SMC IO
BARRIER IO
You might be tempted to believe that we must access another device
Only this sequence is important. It does not matter that there is no
BARRIER IO before the access to the SMC chip because the AEN latch
only needs occurs after the SMC IO write cycle. The routines that
implement this work-around make an additional concession which is to
disable interrupts during the IO sequence. Other hardware devices
(the LogicPD CPLD) have registers in the same the physical memory
region as the SMC chip. An interrupt might allow an access to one of
those registers while SMC IO is being performed.
You might be tempted to think that we have to access another device
attached to the static memory controller, but the empirical evidence
indicates that this is not so. Mapping 0x00000000 (flash) and
0xc0000000 (SDRAM) appear to have the same effect. Using SDRAM seems
to be faster.
to be faster. Choosing to access an undecoded memory region is not
desirable as there is no way to know how that chip select will be used
in the future.
arch/arm/Kconfig
View file @
c7141bba
...
...
@@ -317,7 +317,7 @@ config ISA_DMA
config FIQ
bool
depends on ARCH_ACORN || ARCH_L7200
|| ARCH_LH7A400
depends on ARCH_ACORN || ARCH_L7200
default y
# Compressed boot loader in ROM. Yes, we really want to ask about
...
...
arch/arm/mach-lh7a40x/arch-lpd7a40x.c
View file @
c7141bba
...
...
@@ -267,7 +267,7 @@ MACHINE_START (LPD7A400, "Logic Product Development LPD7A400-10")
BOOT_PARAMS
(
0xc0000100
)
MAPIO
(
lpd7a400_map_io
)
INITIRQ
(
lh7a400_init_irq
)
.
timer
=
&
l
pd
7a40x_timer
,
.
timer
=
&
l
h
7a40x_timer
,
INIT_MACHINE
(
lpd7a40x_init
)
MACHINE_END
...
...
@@ -281,7 +281,7 @@ MACHINE_START (LPD7A404, "Logic Product Development LPD7A404-10")
BOOT_PARAMS
(
0xc0000100
)
MAPIO
(
lpd7a400_map_io
)
INITIRQ
(
lh7a404_init_irq
)
.
timer
=
&
l
pd
7a40x_timer
,
.
timer
=
&
l
h
7a40x_timer
,
INIT_MACHINE
(
lpd7a40x_init
)
MACHINE_END
...
...
arch/arm/mach-lh7a40x/common.h
View file @
c7141bba
/*
* linux/arch/arm/mach-lh7a40x/common.h
/* arch/arm/mach-lh7a40x/common.h
*
* Copyright (C) 2004 Marc Singer
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* Header file for common stuff.
*/
struct
sys_timer
;
extern
struct
sys_timer
lh7a40x_timer
;
extern
void
lh7a400_init_irq
(
void
);
extern
void
lh7a404_init_irq
(
void
);
arch/arm/mach-lh7a40x/time.c
View file @
c7141bba
...
...
@@ -71,5 +71,5 @@ static void __init lh7a40x_timer_init(void)
}
struct
sys_timer
lh7a40x_timer
=
{
.
init
=
&
lh7a40x_timer
,
.
init
=
&
lh7a40x_timer
_init
,
};
arch/arm/mach-sa1100/lart.c
View file @
c7141bba
...
...
@@ -17,6 +17,8 @@
#include "generic.h"
#warning "include/asm/arch-sa1100/ide.h needs fixing for lart"
static
struct
map_desc
lart_io_desc
[]
__initdata
=
{
/* virtual physical length type */
{
0xe8000000
,
0x00000000
,
0x00400000
,
MT_DEVICE
},
/* main flash memory */
...
...
drivers/char/watchdog/ixp4xx_wdt.c
View file @
c7141bba
...
...
@@ -216,7 +216,7 @@ static void __exit ixp4xx_wdt_exit(void)
module_init
(
ixp4xx_wdt_init
);
module_exit
(
ixp4xx_wdt_exit
);
MODULE_AUTHOR
(
"Deepak Saxena <dsaxena@plexity.net
"
>
);
MODULE_AUTHOR
(
"Deepak Saxena <dsaxena@plexity.net
>"
);
MODULE_DESCRIPTION
(
"IXP4xx Network Processor Watchdog"
);
module_param
(
heartbeat
,
int
,
0
);
...
...
drivers/net/smc91x.c
View file @
c7141bba
...
...
@@ -1244,6 +1244,11 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
spin_lock
(
&
lp
->
lock
);
/* A preamble may be used when there is a potential race
* between the interruptible transmit functions and this
* ISR. */
SMC_INTERRUPT_PREAMBLE
;
saved_pointer
=
SMC_GET_PTR
();
mask
=
SMC_GET_INT_MASK
();
SMC_SET_INT_MASK
(
0
);
...
...
drivers/net/smc91x.h
View file @
c7141bba
...
...
@@ -193,6 +193,53 @@ SMC_outw(u16 val, unsigned long ioaddr, int reg)
#define RPC_LSA_DEFAULT RPC_LED_TX_RX
#define RPC_LSB_DEFAULT RPC_LED_100_10
#elif defined(CONFIG_MACH_LPD7A400) || defined(CONFIG_MACH_LPD7A404)
/* The LPD7A40X_IOBARRIER is necessary to overcome a mismatch between
* the way that the CPU handles chip selects and the way that the SMC
* chip expects the chip select to operate. Refer to
* Documentation/arm/Sharp-LH/IOBarrier for details. The read from
* IOBARRIER is a byte as a least-common denominator of possible
* regions to use as the barrier. It would be wasteful to read 32
* bits from a byte oriented region.
*
* There is no explicit protection against interrupts intervening
* between the writew and the IOBARRIER. In SMC ISR there is a
* preamble that performs an IOBARRIER in the extremely unlikely event
* that the driver interrupts itself between a writew to the chip an
* the IOBARRIER that follows *and* the cache is large enough that the
* first off-chip access while handing the interrupt is to the SMC
* chip. Other devices in the same address space as the SMC chip must
* be aware of the potential for trouble and perform a similar
* IOBARRIER on entry to their ISR.
*/
#include <asm/arch/constants.h>
/* IOBARRIER_VIRT */
#define SMC_CAN_USE_8BIT 0
#define SMC_CAN_USE_16BIT 1
#define SMC_CAN_USE_32BIT 0
#define SMC_NOWAIT 0
#define LPD7A40X_IOBARRIER readb (IOBARRIER_VIRT)
#define SMC_inw(a,r) readw ((void*) ((a) + (r)))
#define SMC_insw(a,r,p,l) readsw ((void*) ((a) + (r)), p, l)
#define SMC_outw(v,a,r) ({ writew ((v), (a) + (r)); LPD7A40X_IOBARRIER; })
static
inline
void
SMC_outsw
(
unsigned
long
a
,
int
r
,
unsigned
char
*
p
,
int
l
)
{
unsigned
short
*
ps
=
(
unsigned
short
*
)
p
;
while
(
l
--
>
0
)
{
writew
(
*
ps
++
,
a
+
r
);
LPD7A40X_IOBARRIER
;
}
}
#define SMC_INTERRUPT_PREAMBLE LPD7A40X_IOBARRIER
#define RPC_LSA_DEFAULT RPC_LED_TX_RX
#define RPC_LSB_DEFAULT RPC_LED_100_10
#else
#define SMC_CAN_USE_8BIT 1
...
...
@@ -894,5 +941,8 @@ static const char * chip_ids[ 16 ] = {
})
#endif
#if !defined (SMC_INTERRUPT_PREAMBLE)
# define SMC_INTERRUPT_PREAMBLE
#endif
#endif
/* _SMC91X_H_ */
include/asm-arm/arch-sa1100/ide.h
View file @
c7141bba
...
...
@@ -14,6 +14,8 @@
#include <asm/hardware.h>
#include <asm/mach-types.h>
#error "This code is broken and needs update to match with current ide support"
/*
* Set up a hw structure for a specified data port, control port and IRQ.
...
...
include/asm-arm/ide.h
View file @
c7141bba
...
...
@@ -17,10 +17,6 @@
#define MAX_HWIFS 4
#endif
#if defined(CONFIG_ARCH_SA1100)
# include <asm/arch/ide.h>
/* obsolete + broken */
#endif
#if !defined(CONFIG_ARCH_L7200)
# define IDE_ARCH_OBSOLETE_INIT
# ifdef CONFIG_ARCH_CLPS7500
...
...
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