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
8ae9433c
Commit
8ae9433c
authored
Oct 03, 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
6c654e21
0ba25897
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
618 additions
and
56 deletions
+618
-56
arch/arm/kernel/calls.S
arch/arm/kernel/calls.S
+8
-1
arch/arm/kernel/ecard.c
arch/arm/kernel/ecard.c
+7
-12
arch/arm/kernel/irq.c
arch/arm/kernel/irq.c
+10
-1
arch/arm/kernel/signal.c
arch/arm/kernel/signal.c
+12
-3
arch/arm/mach-imx/time.c
arch/arm/mach-imx/time.c
+3
-3
arch/arm/mach-integrator/clock.c
arch/arm/mach-integrator/clock.c
+6
-3
arch/arm/mach-iop3xx/iop331-pci.c
arch/arm/mach-iop3xx/iop331-pci.c
+4
-6
arch/arm/mach-s3c2410/Makefile
arch/arm/mach-s3c2410/Makefile
+2
-2
arch/arm/mach-s3c2410/gpio.c
arch/arm/mach-s3c2410/gpio.c
+35
-1
arch/arm/mach-s3c2410/mach-bast.c
arch/arm/mach-s3c2410/mach-bast.c
+3
-0
arch/arm/mach-s3c2410/mach-vr1000.c
arch/arm/mach-s3c2410/mach-vr1000.c
+3
-0
arch/arm/mach-s3c2410/usb-simtec.c
arch/arm/mach-s3c2410/usb-simtec.c
+123
-0
arch/arm/mach-s3c2410/usb-simtec.h
arch/arm/mach-s3c2410/usb-simtec.h
+19
-0
arch/arm/mach-versatile/clock.c
arch/arm/mach-versatile/clock.c
+2
-2
arch/arm/mm/consistent.c
arch/arm/mm/consistent.c
+23
-7
arch/arm/tools/mach-types
arch/arm/tools/mach-types
+32
-3
drivers/video/amba-clcd.c
drivers/video/amba-clcd.c
+1
-1
include/asm-arm/arch-s3c2410/hardware.h
include/asm-arm/arch-s3c2410/hardware.h
+15
-0
include/asm-arm/arch-s3c2410/regs-gpio.h
include/asm-arm/arch-s3c2410/regs-gpio.h
+9
-4
include/asm-arm/arch-s3c2410/regs-iic.h
include/asm-arm/arch-s3c2410/regs-iic.h
+50
-0
include/asm-arm/arch-s3c2410/regs-mem.h
include/asm-arm/arch-s3c2410/regs-mem.h
+190
-0
include/asm-arm/arch-s3c2410/usb-control.h
include/asm-arm/arch-s3c2410/usb-control.h
+45
-0
include/asm-arm/bitops.h
include/asm-arm/bitops.h
+1
-1
include/asm-arm/hardware/clock.h
include/asm-arm/hardware/clock.h
+4
-4
include/asm-arm/system.h
include/asm-arm/system.h
+4
-2
include/asm-arm/unistd.h
include/asm-arm/unistd.h
+7
-0
No files found.
arch/arm/kernel/calls.S
View file @
8ae9433c
/*
*
linux
/
arch
/
arm
/
kernel
/
calls
.
S
*
*
Copyright
(
C
)
1995
-
200
3
Russell
King
*
Copyright
(
C
)
1995
-
200
4
Russell
King
*
*
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
...
...
@@ -288,6 +288,13 @@ __syscall_start:
.
long
sys_pciconfig_iobase
.
long
sys_pciconfig_read
.
long
sys_pciconfig_write
.
long
sys_mq_open
/*
275
*/
.
long
sys_mq_unlink
.
long
sys_mq_timedsend
.
long
sys_mq_timedreceive
.
long
sys_mq_notify
.
long
sys_mq_getsetattr
/*
280
*/
.
long
sys_waitid
__syscall_end
:
.
rept
NR_syscalls
-
(
__syscall_end
-
__syscall_start
)
/
4
...
...
arch/arm/kernel/ecard.c
View file @
8ae9433c
...
...
@@ -224,7 +224,7 @@ static void ecard_do_request(struct ecard_request *req)
static
pid_t
ecard_pid
;
static
wait_queue_head_t
ecard_wait
;
static
struct
ecard_request
*
ecard_req
;
static
DECLARE_MUTEX
(
ecard_sem
);
static
DECLARE_COMPLETION
(
ecard_completion
);
/*
...
...
@@ -282,8 +282,6 @@ static int ecard_init_mm(void)
static
int
ecard_task
(
void
*
unused
)
{
struct
task_struct
*
tsk
=
current
;
daemonize
(
"kecardd"
);
/*
...
...
@@ -298,16 +296,11 @@ ecard_task(void * unused)
while
(
1
)
{
struct
ecard_request
*
req
;
do
{
req
=
xchg
(
&
ecard_req
,
NULL
);
if
(
req
==
NULL
)
{
sigemptyset
(
&
tsk
->
pending
.
signal
);
interruptible_sleep_on
(
&
ecard_wait
);
}
}
while
(
req
==
NULL
);
wait_event_interruptible
(
ecard_wait
,
ecard_req
!=
NULL
);
ecard_do_request
(
req
);
req
=
xchg
(
&
ecard_req
,
NULL
);
if
(
req
!=
NULL
)
ecard_do_request
(
req
);
complete
(
&
ecard_completion
);
}
}
...
...
@@ -330,6 +323,7 @@ ecard_call(struct ecard_request *req)
if
(
ecard_pid
<=
0
)
ecard_pid
=
kernel_thread
(
ecard_task
,
NULL
,
CLONE_KERNEL
);
down
(
&
ecard_sem
);
ecard_req
=
req
;
wake_up
(
&
ecard_wait
);
...
...
@@ -337,6 +331,7 @@ ecard_call(struct ecard_request *req)
* Now wait for kecardd to run.
*/
wait_for_completion
(
&
ecard_completion
);
up
(
&
ecard_sem
);
}
/* ======================= Mid-level card control ===================== */
...
...
arch/arm/kernel/irq.c
View file @
8ae9433c
...
...
@@ -46,6 +46,7 @@
*/
#define MAX_IRQ_CNT 100000
static
int
noirqdebug
;
static
volatile
unsigned
long
irq_err_count
;
static
spinlock_t
irq_controller_lock
=
SPIN_LOCK_UNLOCKED
;
static
LIST_HEAD
(
irq_pending
);
...
...
@@ -235,7 +236,7 @@ report_bad_irq(unsigned int irq, struct pt_regs *regs, struct irqdesc *desc, int
static
int
count
=
100
;
struct
irqaction
*
action
;
if
(
!
count
)
if
(
!
count
||
noirqdebug
)
return
;
count
--
;
...
...
@@ -863,3 +864,11 @@ void __init init_IRQ(void)
init_arch_irq
();
init_dma
();
}
static
int
__init
noirqdebug_setup
(
char
*
str
)
{
noirqdebug
=
1
;
return
1
;
}
__setup
(
"noirqdebug"
,
noirqdebug_setup
);
arch/arm/kernel/signal.c
View file @
8ae9433c
...
...
@@ -409,6 +409,7 @@ static inline void __user *
get_sigframe
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
int
framesize
)
{
unsigned
long
sp
=
regs
->
ARM_sp
;
void
__user
*
frame
;
#ifdef CONFIG_IWMMXT
if
(
test_thread_flag
(
TIF_USING_IWMMXT
))
...
...
@@ -424,7 +425,15 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, int framesize)
/*
* ATPCS B01 mandates 8-byte alignment
*/
return
(
void
__user
*
)((
sp
-
framesize
)
&
~
7
);
frame
=
(
void
__user
*
)((
sp
-
framesize
)
&
~
7
);
/*
* Check that we can actually write to the signal frame.
*/
if
(
!
access_ok
(
VERIFY_WRITE
,
frame
,
framesize
))
frame
=
NULL
;
return
frame
;
}
static
int
...
...
@@ -493,7 +502,7 @@ setup_frame(int usig, struct k_sigaction *ka, sigset_t *set, struct pt_regs *reg
struct
sigframe
__user
*
frame
=
get_sigframe
(
ka
,
regs
,
sizeof
(
*
frame
));
int
err
=
0
;
if
(
!
access_ok
(
VERIFY_WRITE
,
frame
,
sizeof
(
*
frame
))
)
if
(
!
frame
)
return
1
;
err
|=
setup_sigcontext
(
&
frame
->
sc
,
/*&frame->fpstate,*/
regs
,
set
->
sig
[
0
]);
...
...
@@ -522,7 +531,7 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
stack_t
stack
;
int
err
=
0
;
if
(
!
access_ok
(
VERIFY_WRITE
,
frame
,
sizeof
(
*
frame
))
)
if
(
!
frame
)
return
1
;
__put_user_error
(
&
frame
->
info
,
&
frame
->
pinfo
,
err
);
...
...
arch/arm/mach-imx/time.c
View file @
8ae9433c
...
...
@@ -25,7 +25,7 @@
#define TIMER_BASE IMX_TIM1_BASE
/*
* Returns number of
m
s since last clock interrupt. Note that interrupts
* Returns number of
u
s since last clock interrupt. Note that interrupts
* will have been disabled by do_gettimeoffset()
*/
static
unsigned
long
...
...
@@ -39,7 +39,7 @@ imx_gettimeoffset(void)
* an interrupt. We get around this by ensuring that the
* counter has not reloaded between our two reads.
*/
ticks
=
IMX_TC
R
(
TIMER_BASE
);
ticks
=
IMX_TC
N
(
TIMER_BASE
);
/*
* Interrupt pending? If so, we've reloaded once already.
...
...
@@ -84,7 +84,7 @@ imx_init_time(void)
*/
IMX_TCTL
(
TIMER_BASE
)
=
0
;
IMX_TPRER
(
TIMER_BASE
)
=
0
;
IMX_TCMP
(
TIMER_BASE
)
=
LATCH
;
IMX_TCMP
(
TIMER_BASE
)
=
LATCH
-
1
;
IMX_TCTL
(
TIMER_BASE
)
=
TCTL_CLK_32
|
TCTL_IRQEN
|
TCTL_TEN
;
/*
...
...
arch/arm/mach-integrator/clock.c
View file @
8ae9433c
...
...
@@ -76,7 +76,10 @@ EXPORT_SYMBOL(clk_get_rate);
long
clk_round_rate
(
struct
clk
*
clk
,
unsigned
long
rate
)
{
return
rate
;
struct
icst525_vco
vco
;
vco
=
icst525_khz_to_vco
(
clk
->
params
,
rate
/
1000
);
return
icst525_khz
(
clk
->
params
,
vco
)
*
1000
;
}
EXPORT_SYMBOL
(
clk_round_rate
);
...
...
@@ -86,8 +89,8 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
if
(
clk
->
setvco
)
{
struct
icst525_vco
vco
;
vco
=
icst525_khz_to_vco
(
clk
->
params
,
rate
);
clk
->
rate
=
icst525_khz
(
clk
->
params
,
vco
);
vco
=
icst525_khz_to_vco
(
clk
->
params
,
rate
/
1000
);
clk
->
rate
=
icst525_khz
(
clk
->
params
,
vco
)
*
1000
;
printk
(
"Clock %s: setting VCO reg params: S=%d R=%d V=%d
\n
"
,
clk
->
name
,
vco
.
s
,
vco
.
r
,
vco
.
v
);
...
...
arch/arm/mach-iop3xx/iop331-pci.c
View file @
8ae9433c
...
...
@@ -208,12 +208,10 @@ void iop331_init(void)
DBG
(
"
\t
ATU: IOP331_IABAR2=0x%08x IOP331_IALR2=0x%08x IOP331_IATVR2=%08x
\n
"
,
*
IOP331_IABAR2
,
*
IOP331_IALR2
,
*
IOP331_IATVR2
);
DBG
(
"
\t
ATU: IOP331_IABAR3=0x%08x IOP331_IALR3=0x%08x IOP331_IATVR3=%08x
\n
"
,
*
IOP331_IABAR3
,
*
IOP331_IALR3
,
*
IOP331_IATVR3
);
#if 0
hook_fault_code(4, iop331_pci_abort, SIGBUS, "external abort on linefetch");
hook_fault_code(6, iop331_pci_abort, SIGBUS, "external abort on linefetch");
hook_fault_code(8, iop331_pci_abort, SIGBUS, "external abort on non-linefetch");
hook_fault_code(10, iop331_pci_abort, SIGBUS, "external abort on non-linefetch");
#endif
/* redboot changed, reset IABAR0 to something sane */
/* fixes master aborts in plugged in cards */
/* will clean up later and work nicely with redboot */
*
IOP331_IABAR0
=
0x00000004
;
hook_fault_code
(
16
+
6
,
iop331_pci_abort
,
SIGBUS
,
"imprecise external abort"
);
}
arch/arm/mach-s3c2410/Makefile
View file @
8ae9433c
...
...
@@ -21,8 +21,8 @@ obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o
# machine specific support
obj-$(CONFIG_ARCH_BAST)
+=
mach-bast.o
obj-$(CONFIG_ARCH_BAST)
+=
mach-bast.o
usb-simtec.o
obj-$(CONFIG_ARCH_H1940)
+=
mach-h1940.o
obj-$(CONFIG_ARCH_SMDK2410)
+=
mach-smdk2410.o
obj-$(CONFIG_MACH_VR1000)
+=
mach-vr1000.o
obj-$(CONFIG_MACH_VR1000)
+=
mach-vr1000.o
usb-simtec.o
arch/arm/mach-s3c2410/gpio.c
View file @
8ae9433c
...
...
@@ -24,6 +24,9 @@
* 14-Sep-2004 BJD Added getpin call
* 14-Sep-2004 BJD Fixed bug in setpin() call
* 30-Sep-2004 BJD Fixed cfgpin() mask bug
* 01-Oct-2004 BJD Added getcfg() to get pin configuration
* 01-Oct-2004 BJD Fixed mask bug in pullup() call
* 01-Oct-2004 BJD Added getoirq() to turn pin into irqno
*/
...
...
@@ -62,6 +65,20 @@ void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function)
local_irq_restore
(
flags
);
}
unsigned
int
s3c2410_gpio_getcfg
(
unsigned
int
pin
)
{
unsigned
long
base
=
S3C2410_GPIO_BASE
(
pin
);
unsigned
long
mask
;
if
(
pin
<
S3C2410_GPIO_BANKB
)
{
mask
=
1
<<
S3C2410_GPIO_OFFSET
(
pin
);
}
else
{
mask
=
3
<<
S3C2410_GPIO_OFFSET
(
pin
)
*
2
;
}
return
__raw_readl
(
base
)
&
mask
;
}
void
s3c2410_gpio_pullup
(
unsigned
int
pin
,
unsigned
int
to
)
{
unsigned
long
base
=
S3C2410_GPIO_BASE
(
pin
);
...
...
@@ -75,7 +92,7 @@ void s3c2410_gpio_pullup(unsigned int pin, unsigned int to)
local_irq_save
(
flags
);
up
=
__raw_readl
(
base
+
0x08
);
up
&=
1
<<
offs
;
up
&=
~
(
1L
<<
offs
)
;
up
|=
to
<<
offs
;
__raw_writel
(
up
,
base
+
0x08
);
...
...
@@ -121,3 +138,20 @@ unsigned int s3c2410_modify_misccr(unsigned int clear, unsigned int change)
return
misccr
;
}
int
s3c2410_gpio_getirq
(
unsigned
int
pin
)
{
if
(
pin
<
S3C2410_GPF0
||
pin
>
S3C2410_GPG15_EINT23
)
return
-
1
;
/* not valid interrupts */
if
(
pin
<
S3C2410_GPG0
&&
pin
>
S3C2410_GPF7
)
return
-
1
;
/* not valid pin */
if
(
pin
<
S3C2410_GPF4
)
return
(
pin
-
S3C2410_GPF0
)
+
IRQ_EINT0
;
if
(
pin
<
S3C2410_GPG0
)
return
(
pin
-
S3C2410_GPF4
)
+
IRQ_EINT4
;
return
(
pin
-
S3C2410_GPG0
)
+
IRQ_EINT8
;
}
arch/arm/mach-s3c2410/mach-bast.c
View file @
8ae9433c
...
...
@@ -10,6 +10,7 @@
* published by the Free Software Foundation.
*
* Modifications:
* 14-Sep-2004 BJD USB power control
* 20-Aug-2004 BJD Added s3c2410_board struct
* 18-Aug-2004 BJD Added platform devices from default set
* 16-May-2003 BJD Created initial version
...
...
@@ -44,6 +45,7 @@
#include "s3c2410.h"
#include "devs.h"
#include "cpu.h"
#include "usb-simtec.h"
/* macros for virtual address mods for the io space entries */
#define VA_C5(item) ((item) + BAST_VAM_CS5)
...
...
@@ -215,6 +217,7 @@ void __init bast_map_io(void)
s3c24xx_init_io
(
bast_iodesc
,
ARRAY_SIZE
(
bast_iodesc
));
s3c2410_init_uarts
(
bast_uartcfgs
,
ARRAY_SIZE
(
bast_uartcfgs
));
s3c2410_set_board
(
&
bast_board
);
usb_simtec_init
();
}
void
__init
bast_init_irq
(
void
)
...
...
arch/arm/mach-s3c2410/mach-vr1000.c
View file @
8ae9433c
...
...
@@ -11,6 +11,7 @@
* published by the Free Software Foundation.
*
* Modifications:
* 14-Sep-2004 BJD USB Power control
* 04-Sep-2004 BJD Added new uart init, and io init
* 21-Aug-2004 BJD Added struct s3c2410_board
* 06-Aug-2004 BJD Fixed call to time initialisation
...
...
@@ -42,6 +43,7 @@
#include "s3c2410.h"
#include "devs.h"
#include "cpu.h"
#include "usb-simtec.h"
/* macros for virtual address mods for the io space entries */
#define VA_C5(item) ((item) + BAST_VAM_CS5)
...
...
@@ -160,6 +162,7 @@ void __init vr1000_map_io(void)
s3c24xx_init_io
(
vr1000_iodesc
,
ARRAY_SIZE
(
vr1000_iodesc
));
s3c2410_init_uarts
(
vr1000_uartcfgs
,
ARRAY_SIZE
(
vr1000_uartcfgs
));
s3c2410_set_board
(
&
vr1000_board
);
usb_simtec_init
();
}
void
__init
vr1000_init_irq
(
void
)
...
...
arch/arm/mach-s3c2410/usb-simtec.c
0 → 100644
View file @
8ae9433c
/* linux/arch/arm/mach-s3c2410/usb-simtec.c
*
* Copyright (c) 2004 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* http://www.simtec.co.uk/products/EB2410ITX/
*
* Simtec BAST and Thorcom VR1000 USB port support functions
*
* 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.
*
* Modifications:
* 14-Sep-2004 BJD Created
*/
#define DEBUG
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/list.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/device.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <asm/arch/bast-map.h>
#include <asm/arch/bast-irq.h>
#include <asm/arch/usb-control.h>
#include <asm/arch/regs-gpio.h>
#include <asm/hardware.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include "devs.h"
#include "usb-simtec.h"
/* control power and monitor over-current events on various Simtec
* designed boards.
*/
static
void
usb_simtec_powercontrol
(
int
port
,
int
to
)
{
pr_debug
(
"usb_simtec_powercontrol(%d,%d)
\n
"
,
port
,
to
);
if
(
port
==
1
)
{
s3c2410_gpio_setpin
(
S3C2410_GPB4
,
to
?
0
:
1
);
pr_debug
(
"GPBDAT now %08x
\n
"
,
__raw_readl
(
S3C2410_GPBDAT
));
}
}
static
irqreturn_t
usb_simtec_ocirq
(
int
irq
,
void
*
pw
,
struct
pt_regs
*
regs
)
{
struct
s3c2410_hcd_info
*
info
=
(
struct
s3c2410_hcd_info
*
)
pw
;
if
(
s3c2410_gpio_getpin
(
S3C2410_GPG10
)
==
0
)
{
pr_debug
(
"usb_simtec: over-current irq (oc detected)
\n
"
);
s3c2410_report_oc
(
info
,
3
);
}
else
{
pr_debug
(
"usb_simtec: over-current irq (oc cleared)
\n
"
);
}
return
IRQ_HANDLED
;
}
static
void
usb_simtec_enableoc
(
struct
s3c2410_hcd_info
*
info
,
int
on
)
{
int
ret
;
if
(
on
)
{
pr_debug
(
"claiming usb overccurent
\n
"
);
ret
=
request_irq
(
IRQ_USBOC
,
usb_simtec_ocirq
,
SA_INTERRUPT
,
"usb-oc"
,
info
);
if
(
ret
!=
0
)
{
printk
(
KERN_ERR
"failed to request usb oc irq
\n
"
);
}
set_irq_type
(
IRQ_USBOC
,
IRQT_BOTHEDGE
);
}
else
{
free_irq
(
IRQ_USBOC
,
NULL
);
}
}
static
struct
s3c2410_hcd_info
usb_simtec_info
=
{
.
port
[
0
]
=
{
.
flags
=
S3C_HCDFLG_USED
},
.
port
[
1
]
=
{
.
flags
=
S3C_HCDFLG_USED
},
.
power_control
=
usb_simtec_powercontrol
,
.
enable_oc
=
usb_simtec_enableoc
,
};
int
usb_simtec_init
(
void
)
{
printk
(
"USB Power Control, (c) 2004 Simtec Electronics
\n
"
);
s3c_device_usb
.
dev
.
platform_data
=
&
usb_simtec_info
;
s3c2410_gpio_cfgpin
(
S3C2410_GPB4
,
S3C2410_GPB4_OUTP
);
s3c2410_gpio_setpin
(
S3C2410_GPB4
,
1
);
pr_debug
(
"GPB: CON=%08x, DAT=%08x
\n
"
,
__raw_readl
(
S3C2410_GPBCON
),
__raw_readl
(
S3C2410_GPBDAT
));
if
(
0
)
{
s3c2410_modify_misccr
(
S3C2410_MISCCR_USBHOST
,
S3C2410_MISCCR_USBDEV
);
}
return
0
;
}
arch/arm/mach-s3c2410/usb-simtec.h
0 → 100644
View file @
8ae9433c
/* linux/arch/arm/mach-s3c2410/usb-simtec.c
*
* Copyright (c) 2004 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* http://www.simtec.co.uk/products/EB2410ITX/
*
* Simtec BAST and Thorcom VR1000 USB port support functions
*
* 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.
*
* Modifications:
* 20-Aug-2004 BJD Created
*/
extern
int
usb_simtec_init
(
void
);
arch/arm/mach-versatile/clock.c
View file @
8ae9433c
...
...
@@ -87,8 +87,8 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
if (clk->setvco) {
struct icst525_vco vco;
vco = icst525_khz_to_vco(clk->params, rate);
clk->rate = icst525_khz(clk->params, vco);
vco = icst525_khz_to_vco(clk->params, rate
/ 1000
);
clk->rate = icst525_khz(clk->params, vco)
* 1000
;
printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n",
clk->name, vco.s, vco.r, vco.v);
...
...
arch/arm/mm/consistent.c
View file @
8ae9433c
...
...
@@ -138,7 +138,7 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, int gfp,
struct
page
*
page
;
struct
vm_region
*
c
;
unsigned
long
order
;
u64
mask
=
0x00ffffff
,
limit
;
/* ISA default */
u64
mask
=
ISA_DMA_THRESHOLD
,
limit
;
if
(
!
consistent_pte
)
{
printk
(
KERN_ERR
"%s: not initialised
\n
"
,
__func__
);
...
...
@@ -148,19 +148,34 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, int gfp,
if
(
dev
)
{
mask
=
dev
->
coherent_dma_mask
;
/*
* Sanity check the DMA mask - it must be non-zero, and
* must be able to be satisfied by a DMA allocation.
*/
if
(
mask
==
0
)
{
dev_warn
(
dev
,
"coherent DMA mask is unset
\n
"
);
return
NULL
;
goto
no_page
;
}
if
((
~
mask
)
&
ISA_DMA_THRESHOLD
)
{
dev_warn
(
dev
,
"coherent DMA mask %#llx is smaller "
"than system GFP_DMA mask %#llx
\n
"
,
mask
,
(
unsigned
long
long
)
ISA_DMA_THRESHOLD
);
goto
no_page
;
}
}
/*
* Sanity check the allocation size.
*/
size
=
PAGE_ALIGN
(
size
);
limit
=
(
mask
+
1
)
&
~
mask
;
if
((
limit
&&
size
>=
limit
)
||
size
>=
(
CONSISTENT_END
-
CONSISTENT_BASE
))
{
printk
(
KERN_WARNING
"coherent allocation too big (requested %#x mask %#Lx)
\n
"
,
size
,
mask
);
*
handle
=
~
0
;
return
NULL
;
if
((
limit
&&
size
>=
limit
)
||
size
>=
(
CONSISTENT_END
-
CONSISTENT_BASE
))
{
printk
(
KERN_WARNING
"coherent allocation too big "
"(requested %#x mask %#llx)
\n
"
,
size
,
mask
)
;
goto
no_page
;
}
order
=
get_order
(
size
);
...
...
@@ -221,6 +236,7 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, int gfp,
if
(
page
)
__free_pages
(
page
,
order
);
no_page:
*
handle
=
~
0
;
return
NULL
;
}
...
...
arch/arm/tools/mach-types
View file @
8ae9433c
...
...
@@ -6,7 +6,7 @@
# To add an entry into this database, please see Documentation/arm/README,
# or contact rmk@arm.linux.org.uk
#
# Last update:
Mon Aug 16 19:22:37
2004
# Last update:
Thu Sep 30 15:23:21
2004
#
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
#
...
...
@@ -519,7 +519,7 @@ scb9328 MACH_SCB9328 SCB9328 508
omap_h3 MACH_OMAP_H3 OMAP_H3 509
omap_h4 MACH_OMAP_H4 OMAP_H4 510
n10 MACH_N10 N10 511
mont
a
jade MACH_MONTAJADE MONTAJADE 512
mont
e
jade MACH_MONTAJADE MONTAJADE 512
sg560 MACH_SG560 SG560 513
dp1000 MACH_DP1000 DP1000 514
omap_osk MACH_OMAP_OSK OMAP_OSK 515
...
...
@@ -582,7 +582,36 @@ cx2351x MACH_CX2351X CX2351X 571
computime MACH_COMPUTIME COMPUTIME 572
izarus MACH_IZARUS IZARUS 573
pxa_rts MACH_RTS RTS 574
netgate5100 MACH_NETGATE5100 NETGATE5100
575
se5100 MACH_SE5100 SE5100
575
s3c2510 MACH_S3C2510 S3C2510 576
csb437tl MACH_CSB437TL CSB437TL 577
slauson MACH_SLAUSON SLAUSON 578
pearlriver MACH_PEARLRIVER PEARLRIVER 579
tdc_p210 MACH_TDC_P210 TDC_P210 580
sg580 MACH_SG580 SG580 581
wrsbcarm7 MACH_WRSBCARM7 WRSBCARM7 582
ipd MACH_IPD IPD 583
pxa_dnp2110 MACH_PXA_DNP2110 PXA_DNP2110 584
xaeniax MACH_XAENIAX XAENIAX 585
somn4250 MACH_SOMN4250 SOMN4250 586
pleb2 MACH_PLEB2 PLEB2 587
cwl MACH_CWL CWL 588
gd MACH_GD GD 589
chaffee MACH_CHAFFEE CHAFFEE 590
rms101 MACH_RMS101 RMS101 591
rx3715 MACH_RX3715 RX3715 592
swift MACH_SWIFT SWIFT 593
roverp7 MACH_ROVERP7 ROVERP7 594
pr818s MACH_PR818S PR818S 595
trxpro MACH_TRXPRO TRXPRO 596
nslu2 MACH_NSLU2 NSLU2 597
e400 MACH_E400 E400 598
trab MACH_TRAB TRAB 599
cmc_pu2 MACH_CMC_PU2 CMC_PU2 600
fulcrum MACH_FULCRUM FULCRUM 601
netgate42x MACH_NETGATE42X NETGATE42X 602
str710 MACH_STR710 STR710 603
ixdpg425 MACH_IXDPG425 IXDPG425 604
tomtomgo MACH_TOMTOMGO TOMTOMGO 605
versatile_ab MACH_VERSATILE_AB VERSATILE_AB 606
edb9307 MACH_EDB9307 EDB9307 607
drivers/video/amba-clcd.c
View file @
8ae9433c
...
...
@@ -207,7 +207,7 @@ static int clcdfb_set_par(struct fb_info *info)
clcdfb_set_start
(
fb
);
clk_set_rate
(
fb
->
clk
,
1000000000
/
regs
.
pixclock
);
clk_set_rate
(
fb
->
clk
,
(
1000000000
/
regs
.
pixclock
)
*
1000
);
fb
->
clcd_cntl
=
regs
.
cntl
;
...
...
include/asm-arm/arch-s3c2410/hardware.h
View file @
8ae9433c
...
...
@@ -15,6 +15,7 @@
* 03-Sep-2003 BJD Linux v2.6 support
* 12-Mar-2004 BJD Fixed include protection, fixed type of clock vars
* 14-Sep-2004 BJD Added misccr and getpin to gpio
* 01-Oct-2004 BJD Added the new gpio functions
*/
#ifndef __ASM_ARCH_HARDWARE_H
...
...
@@ -45,6 +46,20 @@ extern unsigned long s3c2410_fclk;
extern
void
s3c2410_gpio_cfgpin
(
unsigned
int
pin
,
unsigned
int
function
);
extern
unsigned
int
s3c2410_gpio_getcfg
(
unsigned
int
pin
);
/* s3c2410_gpio_getirq
*
* turn the given pin number into the corresponding IRQ number
*
* returns:
* < 0 = no interrupt for this pin
* >=0 = interrupt number for the pin
*/
extern
int
s3c2410_gpio_getirq
(
unsigned
int
pin
);
/* s3c2410_gpio_pullup
*
* configure the pull-up control on the given pin
...
...
include/asm-arm/arch-s3c2410/regs-gpio.h
View file @
8ae9433c
...
...
@@ -623,25 +623,25 @@
#define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10)
#define S3C2410_GPG12_INP (0x00 << 24)
#define S3C2410_GPG12_OUTP (0x01 << 24)
#define S3C2410_GPG12_EINT
18
(0x02 << 24)
#define S3C2410_GPG12_EINT
20
(0x02 << 24)
#define S3C2410_GPG12_XMON (0x03 << 24)
#define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10)
#define S3C2410_GPG13_INP (0x00 << 26)
#define S3C2410_GPG13_OUTP (0x01 << 26)
#define S3C2410_GPG13_EINT
18
(0x02 << 26)
#define S3C2410_GPG13_EINT
21
(0x02 << 26)
#define S3C2410_GPG13_nXPON (0x03 << 26)
#define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10)
#define S3C2410_GPG14_INP (0x00 << 28)
#define S3C2410_GPG14_OUTP (0x01 << 28)
#define S3C2410_GPG14_EINT
18
(0x02 << 28)
#define S3C2410_GPG14_EINT
22
(0x02 << 28)
#define S3C2410_GPG14_YMON (0x03 << 28)
#define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10)
#define S3C2410_GPG15_INP (0x00 << 30)
#define S3C2410_GPG15_OUTP (0x01 << 30)
#define S3C2410_GPG15_EINT
18
(0x02 << 30)
#define S3C2410_GPG15_EINT
23
(0x02 << 30)
#define S3C2410_GPG15_nYPON (0x03 << 30)
...
...
@@ -751,6 +751,11 @@
#define S3C2410_MISCCR_nRSTCON (1<<16)
#define S3C2410_MISCCR_nEN_SCLK0 (1<<17)
#define S3C2410_MISCCR_nEN_SCLK1 (1<<18)
#define S3C2410_MISCCR_nEN_SCLKE (1<<19)
#define S3C2410_MISCCR_SDSLEEP (7<<17)
/* external interrupt control... */
/* S3C2410_EXTINT0 -> irq sense control for EINT0..EINT7
* S3C2410_EXTINT1 -> irq sense control for EINT8..EINT15
...
...
include/asm-arm/arch-s3c2410/regs-iic.h
0 → 100644
View file @
8ae9433c
/* linux/include/asm-arm/arch-s3c2410/regs-iic.h
*
* Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
* http://www.simtec.co.uk/products/SWLINUX/
*
* 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.
*
* S3C2410 I2C Controller
*
* Changelog:
* 03-Oct-2004 BJD Initial include for Linux
*/
#ifndef __ASM_ARCH_IIC_H
#define __ASM_ARCH_IIC_H __FILE__
/* see s3c2410x user guide, v1.1, section 9 (p447) for more info */
#define S3C2410_IICREG(x) (x)
#define S3C2410_IICCON S3C2410_IICREG(0x00)
#define S3C2410_IICSTAT S3C2410_IICREG(0x04)
#define S3C2410_IICADD S3C2410_IICREG(0x08)
#define S3C2410_IICDS S3C2410_IICREG(0x0C)
#define S3C2410_IICCON_ACKEN (1<<7)
#define S3C2410_IICCON_TXDIV_16 (0<<6)
#define S3C2410_IICCON_TXDIV_512 (1<<6)
#define S3C2410_IICCON_IRQEN (1<<5)
#define S3C2410_IICCON_IRQPEND (1<<4)
#define S3C2410_IICCON_SCALE(x) ((x)&15)
#define S3C2410_IICCON_SCALEMASK (0xf)
#define S3C2410_IICSTAT_MASTER_RX (2<<6)
#define S3C2410_IICSTAT_MASTER_TX (3<<6)
#define S3C2410_IICSTAT_SLAVE_RX (0<<6)
#define S3C2410_IICSTAT_SLAVE_TX (1<<6)
#define S3C2410_IICSTAT_MODEMASK (3<<6)
#define S3C2410_IICSTAT_START (1<<5)
#define S3C2410_IICSTAT_BUSBUSY (1<<5)
#define S3C2410_IICSTAT_TXRXEN (1<<4)
#define S3C2410_IICSTAT_ARBITR (1<<3)
#define S3C2410_IICSTAT_ASSLAVE (1<<2)
#define S3C2410_IICSTAT_ADDR0 (1<<1)
#define S3C2410_IICSTAT_LASTBIT (1<<0)
#endif
/* __ASM_ARCH_IIC_H */
include/asm-arm/arch-s3c2410/regs-mem.h
0 → 100644
View file @
8ae9433c
/* linux/include/asm-arm/arch-s3c2410/regs-mem.h
*
* Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
* http://www.simtec.co.uk/products/SWLINUX/
*
* 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.
*
* S3C2410 Memory Control register definitions
*
* Changelog:
* 29-Sep-2004 BJD Initial include for Linux
*
*/
#ifndef __ASM_ARM_MEMREGS_H
#define __ASM_ARM_MEMREGS_H "$Id: regs.h,v 1.8 2003/05/01 15:55:41 ben Exp $"
#ifndef S3C2410_MEMREG
#define S3C2410_MEMREG(x) (S3C2410_VA_MEMCTRL + (x))
#endif
/* bus width, and wait state control */
#define S3C2410_BWSCON S3C2410_MEMREG(0x0000)
/* bank zero config - note, pinstrapped from OM pins! */
#define S3C2410_BWSCON_DW0_16 (1<<1)
#define S3C2410_BWSCON_DW0_32 (2<<1)
/* bank one configs */
#define S3C2410_BWSCON_DW1_8 (0<<4)
#define S3C2410_BWSCON_DW1_16 (1<<4)
#define S3C2410_BWSCON_DW1_32 (2<<4)
#define S3C2410_BWSCON_WS1 (1<<6)
#define S3C2410_BWSCON_ST1 (1<<7)
/* bank 2 configurations */
#define S3C2410_BWSCON_DW2_8 (0<<8)
#define S3C2410_BWSCON_DW2_16 (1<<8)
#define S3C2410_BWSCON_DW2_32 (2<<8)
#define S3C2410_BWSCON_WS2 (1<<10)
#define S3C2410_BWSCON_ST2 (1<<11)
/* bank 3 configurations */
#define S3C2410_BWSCON_DW3_8 (0<<12)
#define S3C2410_BWSCON_DW3_16 (1<<12)
#define S3C2410_BWSCON_DW3_32 (2<<12)
#define S3C2410_BWSCON_WS3 (1<<14)
#define S3C2410_BWSCON_ST3 (1<<15)
/* bank 4 configurations */
#define S3C2410_BWSCON_DW4_8 (0<<16)
#define S3C2410_BWSCON_DW4_16 (1<<16)
#define S3C2410_BWSCON_DW4_32 (2<<16)
#define S3C2410_BWSCON_WS4 (1<<18)
#define S3C2410_BWSCON_ST4 (1<<19)
/* bank 5 configurations */
#define S3C2410_BWSCON_DW5_8 (0<<20)
#define S3C2410_BWSCON_DW5_16 (1<<20)
#define S3C2410_BWSCON_DW5_32 (2<<20)
#define S3C2410_BWSCON_WS5 (1<<22)
#define S3C2410_BWSCON_ST5 (1<<23)
/* bank 6 configurations */
#define S3C2410_BWSCON_DW6_8 (0<<24)
#define S3C2410_BWSCON_DW6_16 (1<<24)
#define S3C2410_BWSCON_DW6_32 (2<<24)
#define S3C2410_BWSCON_WS6 (1<<26)
#define S3C2410_BWSCON_ST6 (1<<27)
/* bank 7 configurations */
#define S3C2410_BWSCON_DW7_8 (0<<28)
#define S3C2410_BWSCON_DW7_16 (1<<28)
#define S3C2410_BWSCON_DW7_32 (2<<28)
#define S3C2410_BWSCON_WS7 (1<<30)
#define S3C2410_BWSCON_ST7 (1<<31)
/* memory set (rom, ram) */
#define S3C2410_BANKCON0 S3C2410_MEMREG(0x0004)
#define S3C2410_BANKCON1 S3C2410_MEMREG(0x0008)
#define S3C2410_BANKCON2 S3C2410_MEMREG(0x000C)
#define S3C2410_BANKCON3 S3C2410_MEMREG(0x0010)
#define S3C2410_BANKCON4 S3C2410_MEMREG(0x0014)
#define S3C2410_BANKCON5 S3C2410_MEMREG(0x0018)
#define S3C2410_BANKCON6 S3C2410_MEMREG(0x001C)
#define S3C2410_BANKCON7 S3C2410_MEMREG(0x0020)
/* bank configuration registers */
#define S3C2410_BANKCON_PMCnorm (0x00)
#define S3C2410_BANKCON_PMC4 (0x01)
#define S3C2410_BANKCON_PMC8 (0x02)
#define S3C2410_BANKCON_PMC16 (0x03)
/* bank configurations for banks 0..7, note banks
* 6 and 7 have differnt configurations depending on
* the memory type bits */
#define S3C2410_BANKCON_Tacp2 (0x0 << 2)
#define S3C2410_BANKCON_Tacp3 (0x1 << 2)
#define S3C2410_BANKCON_Tacp4 (0x2 << 2)
#define S3C2410_BANKCON_Tacp6 (0x3 << 2)
#define S3C2410_BANKCON_Tcah0 (0x0 << 4)
#define S3C2410_BANKCON_Tcah1 (0x1 << 4)
#define S3C2410_BANKCON_Tcah2 (0x2 << 4)
#define S3C2410_BANKCON_Tcah4 (0x3 << 4)
#define S3C2410_BANKCON_Tcoh0 (0x0 << 6)
#define S3C2410_BANKCON_Tcoh1 (0x1 << 6)
#define S3C2410_BANKCON_Tcoh2 (0x2 << 6)
#define S3C2410_BANKCON_Tcoh4 (0x3 << 6)
#define S3C2410_BANKCON_Tacc1 (0x0 << 8)
#define S3C2410_BANKCON_Tacc2 (0x1 << 8)
#define S3C2410_BANKCON_Tacc3 (0x2 << 8)
#define S3C2410_BANKCON_Tacc4 (0x3 << 8)
#define S3C2410_BANKCON_Tacc6 (0x4 << 8)
#define S3C2410_BANKCON_Tacc8 (0x5 << 8)
#define S3C2410_BANKCON_Tacc10 (0x6 << 8)
#define S3C2410_BANKCON_Tacc14 (0x7 << 8)
#define S3C2410_BANKCON_Tcos0 (0x0 << 11)
#define S3C2410_BANKCON_Tcos1 (0x1 << 11)
#define S3C2410_BANKCON_Tcos2 (0x2 << 11)
#define S3C2410_BANKCON_Tcos4 (0x3 << 11)
#define S3C2410_BANKCON_Tacs0 (0x0 << 13)
#define S3C2410_BANKCON_Tacs1 (0x1 << 13)
#define S3C2410_BANKCON_Tacs2 (0x2 << 13)
#define S3C2410_BANKCON_Tacs4 (0x3 << 13)
#define S3C2410_BANKCON_SRAM (0x0 << 15)
#define S3C2410_BANKCON_SDRAM (0x3 << 15)
/* next bits only for SDRAM in 6,7 */
#define S3C2410_BANKCON_Trdc2 (0x00 << 2)
#define S3C2410_BANKCON_Trdc3 (0x01 << 2)
#define S3C2410_BANKCON_Trdc4 (0x02 << 2)
/* control column address select */
#define S3C2410_BANKCON_SCANb8 (0x00 << 0)
#define S3C2410_BANKCON_SCANb9 (0x01 << 0)
#define S3C2410_BANKCON_SCANb10 (0x02 << 0)
#define S3C2410_REFRESH S3C2410_MEMREG(0x0024)
#define S3C2410_BANKSIZE S3C2410_MEMREG(0x0028)
#define S3C2410_MRSRB6 S3C2410_MEMREG(0x002C)
#define S3C2410_MRSRB7 S3C2410_MEMREG(0x0030)
/* refresh control */
#define S3C2410_REFRESH_REFEN (1<<23)
#define S3C2410_REFRESH_SELF (1<<22)
#define S3C2410_REFRESH_REFCOUNTER ((1<<11)-1)
#define S3C2410_REFRESH_TRP_MASK (3<<20)
#define S3C2410_REFRESH_TRP_2clk (0<<20)
#define S3C2410_REFRESH_TRP_3clk (1<<20)
#define S3C2410_REFRESH_TRP_4clk (2<<20)
#define S3C2410_REFRESH_TSRC_MASK (3<<18)
#define S3C2410_REFRESH_TSRC_4clk (0<<18)
#define S3C2410_REFRESH_TSRC_5clk (1<<18)
#define S3C2410_REFRESH_TSRC_6clk (2<<18)
#define S3C2410_REFRESH_TSRC_7clk (3<<18)
/* mode select register(s) */
#define S3C2410_MRSRB_CL1 (0x00 << 4)
#define S3C2410_MRSRB_CL2 (0x02 << 4)
#define S3C2410_MRSRB_CL3 (0x03 << 4)
/* bank size register */
#define S3C2410_BANKSIZE_128M (0x2 << 0)
#define S3C2410_BANKSIZE_64M (0x1 << 0)
#define S3C2410_BANKSIZE_32M (0x0 << 0)
#define S3C2410_BANKSIZE_16M (0x7 << 0)
#define S3C2410_BANKSIZE_8M (0x6 << 0)
#define S3C2410_BANKSIZE_4M (0x5 << 0)
#define S3C2410_BANKSIZE_2M (0x4 << 0)
#define S3C2410_BANKSIZE_MASK (0x7 << 0)
#define S3C2410_BANKSIZE_SCLK_EN (1<<4)
#define S3C2410_BANKSIZE_SCKE_EN (1<<5)
#define S3C2410_BANKSIZE_BURST (1<<7)
#endif
/* __ASM_ARM_MEMREGS_H */
include/asm-arm/arch-s3c2410/usb-control.h
0 → 100644
View file @
8ae9433c
/* linux/include/asm-arm/arch-s3c2410/usb-control.h
*
* (c) 2004 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* S3C2410 - usb port information
*
* 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.
*
* Changelog:
* 11-Sep-2004 BJD Created file
* 21-Sep-2004 BJD Updated port info
*/
#ifndef __ASM_ARCH_USBCONTROL_H
#define __ASM_ARCH_USBCONTROL_H "include/asm-arm/arch-s3c2410/usb-control.h"
#define S3C_HCDFLG_USED (1)
struct
s3c2410_hcd_port
{
unsigned
char
flags
;
unsigned
char
power
;
unsigned
char
oc_status
;
unsigned
char
oc_changed
;
};
struct
s3c2410_hcd_info
{
struct
usb_hcd
*
hcd
;
struct
s3c2410_hcd_port
port
[
2
];
void
(
*
power_control
)(
int
port
,
int
to
);
void
(
*
enable_oc
)(
struct
s3c2410_hcd_info
*
,
int
on
);
void
(
*
report_oc
)(
struct
s3c2410_hcd_info
*
,
int
ports
);
};
static
void
inline
s3c2410_report_oc
(
struct
s3c2410_hcd_info
*
info
,
int
ports
)
{
if
(
info
->
report_oc
!=
NULL
)
{
(
info
->
report_oc
)(
info
,
ports
);
}
}
#endif
/*__ASM_ARCH_USBCONTROL_H */
include/asm-arm/bitops.h
View file @
8ae9433c
...
...
@@ -345,7 +345,7 @@ static inline unsigned long __ffs(unsigned long word)
extern
__inline__
int
generic_fls
(
int
x
);
#define fls(x) \
( __builtin_constant_p(x) ? generic_fls(x) : \
({ int __r; asm("clz
%?\t%0, %1" : "=r"(__r) : "r"(x)
); 32-__r; }) )
({ int __r; asm("clz
\t%0, %1" : "=r"(__r) : "r"(x) : "cc"
); 32-__r; }) )
#define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); })
#define __ffs(x) (ffs(x) - 1)
#define ffz(x) __ffs( ~(x) )
...
...
include/asm-arm/hardware/clock.h
View file @
8ae9433c
...
...
@@ -64,7 +64,7 @@ int clk_use(struct clk *clk);
void
clk_unuse
(
struct
clk
*
clk
);
/**
* clk_get_rate - obtain the current clock rate for a clock source.
* clk_get_rate - obtain the current clock rate
(in Hz)
for a clock source.
* This is only valid once the clock source has been enabled.
* @clk: clock source
*/
...
...
@@ -85,16 +85,16 @@ void clk_put(struct clk *clk);
/**
* clk_round_rate - adjust a rate to the exact rate a clock can provide
* @clk: clock source
* @rate: desired clock rate in
k
Hz
* @rate: desired clock rate in Hz
*
* Returns rounded clock rate, or negative errno.
* Returns rounded clock rate
in Hz
, or negative errno.
*/
long
clk_round_rate
(
struct
clk
*
clk
,
unsigned
long
rate
);
/**
* clk_set_rate - set the clock rate for a clock source
* @clk: clock source
* @rate: desired clock rate in
k
Hz
* @rate: desired clock rate in Hz
*
* Returns success (0) or negative errno.
*/
...
...
include/asm-arm/system.h
View file @
8ae9433c
...
...
@@ -50,8 +50,10 @@
#define read_cpuid(reg) \
({ \
unsigned int __val; \
asm("mrc%? p15, 0, %0, c0, c0, " __stringify(reg) \
: "=r" (__val)); \
asm("mrc p15, 0, %0, c0, c0, " __stringify(reg) \
: "=r" (__val) \
: \
: "cc"); \
__val; \
})
...
...
include/asm-arm/unistd.h
View file @
8ae9433c
...
...
@@ -299,6 +299,13 @@
#define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271)
#define __NR_pciconfig_read (__NR_SYSCALL_BASE+272)
#define __NR_pciconfig_write (__NR_SYSCALL_BASE+273)
#define __NR_mq_open (__NR_SYSCALL_BASE+274)
#define __NR_mq_unlink (__NR_SYSCALL_BASE+275)
#define __NR_mq_timedsend (__NR_SYSCALL_BASE+276)
#define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277)
#define __NR_mq_notify (__NR_SYSCALL_BASE+278)
#define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279)
#define __NR_waitid (__NR_SYSCALL_BASE+280)
/*
* The following SWIs are ARM private.
...
...
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