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
nexedi
linux
Commits
60774082
Commit
60774082
authored
May 07, 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
703074c5
d9e7bd2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
32 deletions
+20
-32
arch/arm/mach-versatile/core.c
arch/arm/mach-versatile/core.c
+14
-1
drivers/serial/amba-pl011.c
drivers/serial/amba-pl011.c
+6
-31
No files found.
arch/arm/mach-versatile/core.c
View file @
60774082
...
...
@@ -18,6 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/sysdev.h>
...
...
@@ -33,7 +34,9 @@
#include <asm/mach/flash.h>
#include <asm/mach/irq.h>
#include <asm/mach/map.h>
#ifdef CONFIG_MMC
#include <asm/mach/mmc.h>
#endif
/*
* All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx
...
...
@@ -294,6 +297,7 @@ static struct platform_device smc91x_device = {
#define VERSATILE_SYSMCI (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_MCI_OFFSET)
#ifdef CONFIG_MMC
static
unsigned
int
mmc_status
(
struct
device
*
dev
)
{
struct
amba_device
*
adev
=
container_of
(
dev
,
struct
amba_device
,
dev
);
...
...
@@ -318,6 +322,7 @@ static struct mmc_platform_data mmc1_plat_data = {
.
ocr_mask
=
MMC_VDD_32_33
|
MMC_VDD_33_34
,
.
status
=
mmc_status
,
};
#endif
#define AMBA_DEVICE(name,busid,base,plat) \
static struct amba_device name##_device = { \
...
...
@@ -332,7 +337,7 @@ static struct amba_device name##_device = { \
.flags = IORESOURCE_MEM, \
}, \
.irq = base##_IRQ, \
.dma = base##_DMA,
\
/* .dma = base##_DMA,*/
\
}
#define AACI_IRQ { IRQ_AACI, NO_IRQ }
...
...
@@ -396,12 +401,16 @@ static struct amba_device name##_device = { \
/* FPGA Primecells */
AMBA_DEVICE
(
aaci
,
"fpga:04"
,
AACI
,
NULL
);
#ifdef CONFIG_MMC
AMBA_DEVICE
(
mmc0
,
"fpga:05"
,
MMCI0
,
&
mmc0_plat_data
);
#endif
AMBA_DEVICE
(
kmi0
,
"fpga:06"
,
KMI0
,
NULL
);
AMBA_DEVICE
(
kmi1
,
"fpga:07"
,
KMI1
,
NULL
);
AMBA_DEVICE
(
uart3
,
"fpga:09"
,
UART3
,
NULL
);
AMBA_DEVICE
(
sci1
,
"fpga:0a"
,
SCI1
,
NULL
);
#ifdef CONFIG_MMC
AMBA_DEVICE
(
mmc1
,
"fpga:0b"
,
MMCI1
,
&
mmc1_plat_data
);
#endif
/* DevChip Primecells */
AMBA_DEVICE
(
smc
,
"dev:00"
,
SMC
,
NULL
);
...
...
@@ -440,11 +449,15 @@ static struct amba_device *amba_devs[] __initdata = {
&
sci0_device
,
&
ssp0_device
,
&
aaci_device
,
#ifdef CONFIG_MMC
&
mmc0_device
,
#endif
&
kmi0_device
,
&
kmi1_device
,
&
sci1_device
,
#ifdef CONFIG_MMC
&
mmc1_device
,
#endif
};
#define VA_LEDS_BASE (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET)
...
...
drivers/serial/amba-pl011.c
View file @
60774082
...
...
@@ -44,7 +44,6 @@
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/clock.h>
#if defined(CONFIG_SERIAL_AMBA_PL011_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
#define SUPPORT_SYSRQ
...
...
@@ -69,7 +68,6 @@
*/
struct
uart_amba_port
{
struct
uart_port
port
;
struct
clk
*
clk
;
unsigned
int
im
;
/* interrupt mask */
unsigned
int
old_status
;
};
...
...
@@ -353,19 +351,12 @@ static int pl011_startup(struct uart_port *port)
unsigned
int
cr
;
int
retval
;
/*
* Try to enable the clock producer.
*/
retval
=
clk_enable
(
uap
->
clk
);
if
(
retval
)
goto
out
;
/*
* Allocate the IRQ
*/
retval
=
request_irq
(
uap
->
port
.
irq
,
pl011_int
,
0
,
"uart-pl011"
,
uap
);
if
(
retval
)
goto
clk_dis
;
goto
out
;
writew
(
UART011_IFLS_RX4_8
|
UART011_IFLS_TX4_8
,
uap
->
port
.
membase
+
UART011_IFLS
);
...
...
@@ -400,8 +391,6 @@ static int pl011_startup(struct uart_port *port)
return
0
;
clk_dis:
clk_disable
(
uap
->
clk
);
out:
return
retval
;
}
...
...
@@ -436,11 +425,6 @@ static void pl011_shutdown(struct uart_port *port)
val
=
readw
(
uap
->
port
.
membase
+
UART011_LCRH
);
val
&=
~
(
UART01x_LCRH_BRK
|
UART01x_LCRH_FEN
);
writew
(
val
,
uap
->
port
.
membase
+
UART011_LCRH
);
/*
* Shut down the clock producer
*/
clk_disable
(
uap
->
clk
);
}
static
void
...
...
@@ -701,10 +685,6 @@ static int __init pl011_console_setup(struct console *co, char *options)
co
->
index
=
0
;
uap
=
amba_ports
[
co
->
index
];
ret
=
clk_enable
(
uap
->
clk
);
if
(
ret
)
return
ret
;
if
(
options
)
uart_parse_options
(
options
,
&
baud
,
&
parity
,
&
bits
,
&
flow
);
else
...
...
@@ -767,18 +747,16 @@ static int pl011_probe(struct amba_device *dev, void *id)
}
memset
(
uap
,
0
,
sizeof
(
struct
uart_amba_port
));
uap
->
clk
=
clk_get
(
&
dev
->
dev
,
"UARTCLK"
);
if
(
IS_ERR
(
uap
->
clk
))
{
ret
=
PTR_ERR
(
uap
->
clk
);
goto
unmap
;
}
uap
->
port
.
dev
=
&
dev
->
dev
;
uap
->
port
.
mapbase
=
dev
->
res
.
start
;
uap
->
port
.
membase
=
base
;
uap
->
port
.
iotype
=
UPIO_MEM
;
uap
->
port
.
irq
=
dev
->
irq
[
0
];
uap
->
port
.
uartclk
=
clk_get_rate
(
uap
->
clk
);
#if 0 /* FIXME */
uap->port.uartclk = 14745600;
#else
uap
->
port
.
uartclk
=
24000000
;
#endif
uap
->
port
.
fifosize
=
16
;
uap
->
port
.
ops
=
&
amba_pl011_pops
;
uap
->
port
.
flags
=
UPF_BOOT_AUTOCONF
;
...
...
@@ -791,8 +769,6 @@ static int pl011_probe(struct amba_device *dev, void *id)
if
(
ret
)
{
amba_set_drvdata
(
dev
,
NULL
);
amba_ports
[
i
]
=
NULL
;
clk_put
(
uap
->
clk
);
unmap:
iounmap
(
base
);
free:
kfree
(
uap
);
...
...
@@ -815,7 +791,6 @@ static int pl011_remove(struct amba_device *dev)
amba_ports
[
i
]
=
NULL
;
iounmap
(
uap
->
port
.
membase
);
clk_put
(
uap
->
clk
);
kfree
(
uap
);
return
0
;
}
...
...
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