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
1443a2ec
Commit
1443a2ec
authored
Jun 24, 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
7fd6ea2b
fc7b6e9e
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
243 additions
and
401 deletions
+243
-401
arch/arm/common/Makefile
arch/arm/common/Makefile
+0
-1
arch/arm/common/platform.c
arch/arm/common/platform.c
+0
-35
arch/arm/configs/mainstone_defconfig
arch/arm/configs/mainstone_defconfig
+27
-56
arch/arm/mach-ebsa110/core.c
arch/arm/mach-ebsa110/core.c
+2
-1
arch/arm/mach-ebsa110/time.c
arch/arm/mach-ebsa110/time.c
+0
-118
arch/arm/mach-footbridge/time.c
arch/arm/mach-footbridge/time.c
+3
-3
arch/arm/mach-integrator/core.c
arch/arm/mach-integrator/core.c
+139
-0
arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-integrator/integrator_ap.c
+1
-1
arch/arm/mach-integrator/integrator_cp.c
arch/arm/mach-integrator/integrator_cp.c
+2
-0
arch/arm/mach-integrator/time.c
arch/arm/mach-integrator/time.c
+0
-144
arch/arm/mach-omap/bus.c
arch/arm/mach-omap/bus.c
+0
-39
arch/arm/mach-omap/time.c
arch/arm/mach-omap/time.c
+5
-0
arch/arm/mach-pxa/mainstone.c
arch/arm/mach-pxa/mainstone.c
+59
-0
arch/arm/mach-versatile/core.c
arch/arm/mach-versatile/core.c
+2
-2
drivers/video/acornfb.c
drivers/video/acornfb.c
+3
-1
No files found.
arch/arm/common/Makefile
View file @
1443a2ec
...
...
@@ -2,7 +2,6 @@
# Makefile for the linux kernel.
#
obj-y
+=
platform.o
obj-$(CONFIG_ARM_AMBA)
+=
amba.o
obj-$(CONFIG_ICST525)
+=
icst525.o
obj-$(CONFIG_SA1111)
+=
sa1111.o
...
...
arch/arm/common/platform.c
deleted
100644 → 0
View file @
7fd6ea2b
#include <linux/ioport.h>
#include <linux/device.h>
#include <linux/init.h>
int
__init
platform_add_device
(
struct
platform_device
*
dev
)
{
int
i
;
for
(
i
=
0
;
i
<
dev
->
num_resources
;
i
++
)
{
struct
resource
*
r
=
&
dev
->
resource
[
i
];
r
->
name
=
dev
->
dev
.
bus_id
;
if
(
r
->
flags
&
IORESOURCE_MEM
&&
request_resource
(
&
iomem_resource
,
r
))
{
printk
(
KERN_ERR
"%s%d: failed to claim resource %d
\n
"
,
dev
->
name
,
dev
->
id
,
i
);
break
;
}
}
if
(
i
==
dev
->
num_resources
)
platform_device_register
(
dev
);
return
0
;
}
int
__init
platform_add_devices
(
struct
platform_device
**
devs
,
int
num
)
{
int
i
;
for
(
i
=
0
;
i
<
num
;
i
++
)
platform_add_device
(
devs
[
i
]);
return
0
;
}
arch/arm/configs/mainstone_defconfig
View file @
1443a2ec
...
...
@@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y
# CONFIG_IKCONFIG is not set
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
...
...
@@ -52,43 +53,22 @@ CONFIG_OBSOLETE_MODPARM=y
# CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set
CONFIG_ARCH_PXA=y
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_CAMELOT is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_IOP3XX is not set
# CONFIG_ARCH_IXP4XX is not set
# CONFIG_ARCH_L7200 is not set
CONFIG_ARCH_PXA=y
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_SHARK is not set
# CONFIG_ARCH_S3C2410 is not set
# CONFIG_ARCH_
OMAP
is not set
# CONFIG_ARCH_
SHARK
is not set
# CONFIG_ARCH_LH7A40X is not set
# CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_VERSATILE_PB is not set
#
# CLPS711X/EP721X Implementations
#
#
# Epxa10db
#
#
# Footbridge Implementations
#
#
# IOP3xx Implementation Options
#
# CONFIG_ARCH_IOP310 is not set
# CONFIG_ARCH_IOP321 is not set
#
# IOP3xx Chipset Features
#
#
# Intel PXA2xx Implementations
#
...
...
@@ -98,34 +78,6 @@ CONFIG_MACH_MAINSTONE=y
CONFIG_PXA27x=y
CONFIG_IWMMXT=y
#
# SA11x0 Implementations
#
#
# TI OMAP Implementations
#
#
# OMAP Core Type
#
#
# OMAP Board Type
#
#
# OMAP Feature Selections
#
#
# S3C2410 Implementations
#
#
# LH7A40X Implementations
#
#
# Processor Type
#
...
...
@@ -163,6 +115,7 @@ CONFIG_PCMCIA_PXA2XX=y
CONFIG_FPE_NWFPE=y
# CONFIG_FPE_NWFPE_XP is not set
# CONFIG_FPE_FASTFPE is not set
# CONFIG_VFP is not set
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_AOUT is not set
# CONFIG_BINFMT_MISC is not set
...
...
@@ -170,6 +123,7 @@ CONFIG_BINFMT_ELF=y
#
# Generic Driver Options
#
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_PM is not set
...
...
@@ -394,7 +348,6 @@ CONFIG_BLK_DEV_IDE=y
#
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
# CONFIG_IDEDISK_STROKE is not set
CONFIG_BLK_DEV_IDECS=y
# CONFIG_BLK_DEV_IDECD is not set
# CONFIG_BLK_DEV_IDETAPE is not set
...
...
@@ -406,6 +359,7 @@ CONFIG_BLK_DEV_IDECS=y
# IDE chipset support/bugfixes
#
# CONFIG_IDE_GENERIC is not set
# CONFIG_IDE_ARM is not set
# CONFIG_BLK_DEV_IDEDMA is not set
# CONFIG_IDEDMA_AUTO is not set
# CONFIG_BLK_DEV_HD is not set
...
...
@@ -571,6 +525,7 @@ CONFIG_EXT2_FS=y
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
# CONFIG_VFAT_FS is not set
CONFIG_FAT_DEFAULT_CODEPAGE=437
# CONFIG_NTFS_FS is not set
#
...
...
@@ -622,7 +577,6 @@ CONFIG_SUNRPC=y
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_AFS_FS is not set
#
...
...
@@ -658,6 +612,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
...
...
@@ -681,7 +636,10 @@ CONFIG_NLS_ISO8859_1=y
#
# Graphics support
#
# CONFIG_FB is not set
CONFIG_FB=y
CONFIG_FB_PXA=y
# CONFIG_FB_PXA_PARAMETERS is not set
# CONFIG_FB_VIRTUAL is not set
#
# Console display driver support
...
...
@@ -689,6 +647,19 @@ CONFIG_NLS_ISO8859_1=y
# CONFIG_VGA_CONSOLE is not set
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_PCI_CONSOLE=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
#
# Logo configuration
#
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
#
# Sound
...
...
arch/arm/mach-ebsa110/core.c
View file @
1443a2ec
...
...
@@ -11,6 +11,7 @@
*/
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <asm/hardware.h>
...
...
@@ -174,7 +175,7 @@ static struct irqaction ebsa110_timer_irq = {
/*
* Set up timer interrupt.
*/
void
__init
ebsa110_time_init
(
void
)
static
void
__init
ebsa110_init_time
(
void
)
{
/*
* Timer 1, mode 2, LSB/MSB
...
...
arch/arm/mach-ebsa110/time.c
deleted
100644 → 0
View file @
7fd6ea2b
/*
* linux/include/asm-arm/arch-ebsa110/time.h
*
* Copyright (C) 1996,1997,1998 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
* published by the Free Software Foundation.
*
* No real time clock on the evalulation board!
*
* Changelog:
* 10-Oct-1996 RMK Created
* 04-Dec-1997 RMK Updated for new arch/arm/kernel/time.c
* 07-Aug-1998 RMK Updated for arch/arm/kernel/leds.c
* 28-Dec-1998 APH Made leds code optional
*/
#include <asm/leds.h>
#include <asm/io.h>
extern
unsigned
long
(
*
gettimeoffset
)(
void
);
#define PIT_CTRL (PIT_BASE + 0x0d)
#define PIT_T2 (PIT_BASE + 0x09)
#define PIT_T1 (PIT_BASE + 0x05)
#define PIT_T0 (PIT_BASE + 0x01)
/*
* This is the rate at which your MCLK signal toggles (in Hz)
* This was measured on a 10 digit frequency counter sampling
* over 1 second.
*/
#define MCLK 47894000
/*
* This is the rate at which the PIT timers get clocked
*/
#define CLKBY7 (MCLK / 7)
/*
* This is the counter value. We tick at 200Hz on this platform.
*/
#define COUNT ((CLKBY7 + (HZ / 2)) / HZ)
/*
* Get the time offset from the system PIT. Note that if we have missed an
* interrupt, then the PIT counter will roll over (ie, be negative).
* This actually works out to be convenient.
*/
static
unsigned
long
ebsa110_gettimeoffset
(
void
)
{
unsigned
long
offset
,
count
;
__raw_writeb
(
0x40
,
PIT_CTRL
);
count
=
__raw_readb
(
PIT_T1
);
count
|=
__raw_readb
(
PIT_T1
)
<<
8
;
/*
* If count > COUNT, make the number negative.
*/
if
(
count
>
COUNT
)
count
|=
0xffff0000
;
offset
=
COUNT
;
offset
-=
count
;
/*
* `offset' is in units of timer counts. Convert
* offset to units of microseconds.
*/
offset
=
offset
*
(
1000000
/
HZ
)
/
COUNT
;
return
offset
;
}
static
irqreturn_t
timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
u32
count
;
/* latch and read timer 1 */
__raw_writeb
(
0x40
,
PIT_CTRL
);
count
=
__raw_readb
(
PIT_T1
);
count
|=
__raw_readb
(
PIT_T1
)
<<
8
;
count
+=
COUNT
;
__raw_writeb
(
count
&
0xff
,
PIT_T1
);
__raw_writeb
(
count
>>
8
,
PIT_T1
);
do_leds
();
do_timer
(
regs
);
do_profile
(
regs
);
return
IRQ_HANDLED
;
}
/*
* Set up timer interrupt.
*/
void
__init
time_init
(
void
)
{
/*
* Timer 1, mode 2, LSB/MSB
*/
__raw_writeb
(
0x70
,
PIT_CTRL
);
__raw_writeb
(
COUNT
&
0xff
,
PIT_T1
);
__raw_writeb
(
COUNT
>>
8
,
PIT_T1
);
gettimeoffset
=
ebsa110_gettimeoffset
;
timer_irq
.
handler
=
timer_interrupt
;
setup_irq
(
IRQ_EBSA110_TIMER0
,
&
timer_irq
);
}
arch/arm/mach-footbridge/time.c
View file @
1443a2ec
...
...
@@ -275,7 +275,7 @@ void __init footbridge_init_time(void)
*
CSR_TIMER1_CNTL
=
TIMER_CNTL_ENABLE
|
TIMER_CNTL_AUTORELOAD
|
TIMER_CNTL_DIV16
;
footbridge_timer_irq
.
name
=
"Timer1 Timer Tick"
;
footbr
di
ge_timer_irq
.
handler
=
timer1_interrupt
;
footbr
id
ge_timer_irq
.
handler
=
timer1_interrupt
;
setup_irq
(
IRQ_TIMER1
,
&
footbridge_timer_irq
);
...
...
@@ -289,8 +289,8 @@ void __init footbridge_init_time(void)
gettimeoffset
=
isa_gettimeoffset
;
footbridge_timer_irq
.
name
=
"ISA Timer Tick"
;
footbr
di
ge_timer_irq
.
handler
=
isa_timer_interrupt
;
footbr
id
ge_timer_irq
.
handler
=
isa_timer_interrupt
;
setup_irq
(
IRQ_ISA
,
&
footbridge_timer_irq
);
setup_irq
(
IRQ_ISA
_TIMER
,
&
footbridge_timer_irq
);
}
}
arch/arm/mach-integrator/core.c
View file @
1443a2ec
...
...
@@ -12,12 +12,17 @@
#include <linux/init.h>
#include <linux/device.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/hardware/amba.h>
#include <asm/arch/cm.h>
#include <asm/system.h>
#include <asm/leds.h>
#include <asm/mach/time.h>
static
struct
amba_device
rtc_device
=
{
.
dev
=
{
...
...
@@ -127,3 +132,137 @@ void cm_control(u32 mask, u32 set)
}
EXPORT_SYMBOL
(
cm_control
);
/*
* Where is the timer (VA)?
*/
#define TIMER0_VA_BASE (IO_ADDRESS(INTEGRATOR_CT_BASE)+0x00000000)
#define TIMER1_VA_BASE (IO_ADDRESS(INTEGRATOR_CT_BASE)+0x00000100)
#define TIMER2_VA_BASE (IO_ADDRESS(INTEGRATOR_CT_BASE)+0x00000200)
#define VA_IC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE)
/*
* How long is the timer interval?
*/
#define TIMER_INTERVAL (TICKS_PER_uSEC * mSEC_10)
#if TIMER_INTERVAL >= 0x100000
#define TICKS2USECS(x) (256 * (x) / TICKS_PER_uSEC)
#elif TIMER_INTERVAL >= 0x10000
#define TICKS2USECS(x) (16 * (x) / TICKS_PER_uSEC)
#else
#define TICKS2USECS(x) ((x) / TICKS_PER_uSEC)
#endif
/*
* What does it look like?
*/
typedef
struct
TimerStruct
{
unsigned
long
TimerLoad
;
unsigned
long
TimerValue
;
unsigned
long
TimerControl
;
unsigned
long
TimerClear
;
}
TimerStruct_t
;
extern
unsigned
long
(
*
gettimeoffset
)(
void
);
static
unsigned
long
timer_reload
;
/*
* Returns number of ms since last clock interrupt. Note that interrupts
* will have been disabled by do_gettimeoffset()
*/
static
unsigned
long
integrator_gettimeoffset
(
void
)
{
volatile
TimerStruct_t
*
timer1
=
(
TimerStruct_t
*
)
TIMER1_VA_BASE
;
unsigned
long
ticks1
,
ticks2
,
status
;
/*
* Get the current number of ticks. Note that there is a race
* condition between us reading the timer and checking for
* an interrupt. We get around this by ensuring that the
* counter has not reloaded between our two reads.
*/
ticks2
=
timer1
->
TimerValue
&
0xffff
;
do
{
ticks1
=
ticks2
;
status
=
__raw_readl
(
VA_IC_BASE
+
IRQ_RAW_STATUS
);
ticks2
=
timer1
->
TimerValue
&
0xffff
;
}
while
(
ticks2
>
ticks1
);
/*
* Number of ticks since last interrupt.
*/
ticks1
=
timer_reload
-
ticks2
;
/*
* Interrupt pending? If so, we've reloaded once already.
*/
if
(
status
&
(
1
<<
IRQ_TIMERINT1
))
ticks1
+=
timer_reload
;
/*
* Convert the ticks to usecs
*/
return
TICKS2USECS
(
ticks1
);
}
/*
* IRQ handler for the timer
*/
static
irqreturn_t
integrator_timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
volatile
TimerStruct_t
*
timer1
=
(
volatile
TimerStruct_t
*
)
TIMER1_VA_BASE
;
// ...clear the interrupt
timer1
->
TimerClear
=
1
;
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
static
struct
irqaction
integrator_timer_irq
=
{
.
name
=
"Integrator Timer Tick"
,
.
flags
=
SA_INTERRUPT
,
.
handler
=
integrator_timer_interrupt
};
/*
* Set up timer interrupt, and return the current time in seconds.
*/
void
__init
integrator_time_init
(
unsigned
long
reload
,
unsigned
int
ctrl
)
{
volatile
TimerStruct_t
*
timer0
=
(
volatile
TimerStruct_t
*
)
TIMER0_VA_BASE
;
volatile
TimerStruct_t
*
timer1
=
(
volatile
TimerStruct_t
*
)
TIMER1_VA_BASE
;
volatile
TimerStruct_t
*
timer2
=
(
volatile
TimerStruct_t
*
)
TIMER2_VA_BASE
;
unsigned
int
timer_ctrl
=
0x80
|
0x40
;
/* periodic */
timer_reload
=
reload
;
timer_ctrl
|=
ctrl
;
if
(
timer_reload
>
0x100000
)
{
timer_reload
>>=
8
;
timer_ctrl
|=
0x08
;
/* /256 */
}
else
if
(
timer_reload
>
0x010000
)
{
timer_reload
>>=
4
;
timer_ctrl
|=
0x04
;
/* /16 */
}
/*
* Initialise to a known state (all timers off)
*/
timer0
->
TimerControl
=
0
;
timer1
->
TimerControl
=
0
;
timer2
->
TimerControl
=
0
;
timer1
->
TimerLoad
=
timer_reload
;
timer1
->
TimerValue
=
timer_reload
;
timer1
->
TimerControl
=
timer_ctrl
;
/*
* Make irqs happen for the system timer
*/
setup_irq
(
IRQ_TIMERINT1
,
&
integrator_timer_irq
);
gettimeoffset
=
integrator_gettimeoffset
;
}
arch/arm/mach-integrator/integrator_ap.c
View file @
1443a2ec
...
...
@@ -256,7 +256,7 @@ static void __init ap_init(void)
unsigned
long
sc_dec
;
int
i
;
platform_
add_device
(
&
cfi_flash_device
);
platform_
device_register
(
&
cfi_flash_device
);
sc_dec
=
readl
(
VA_SC_BASE
+
INTEGRATOR_SC_DEC_OFFSET
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
...
...
arch/arm/mach-integrator/integrator_cp.c
View file @
1443a2ec
...
...
@@ -419,6 +419,8 @@ static void __init intcp_init(void)
}
}
#define TIMER_CTRL_IE (1 << 5)
/* Interrupt Enable */
static
void
__init
intcp_init_time
(
void
)
{
integrator_time_init
(
1000000
/
HZ
,
TIMER_CTRL_IE
);
...
...
arch/arm/mach-integrator/time.c
View file @
1443a2ec
...
...
@@ -10,16 +10,9 @@
#include <linux/kernel.h>
#include <linux/time.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <asm/hardware.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/leds.h>
#include <asm/mach-types.h>
#include <asm/mach/time.h>
#define RTC_DR (IO_ADDRESS(INTEGRATOR_RTC_BASE) + 0)
#define RTC_MR (IO_ADDRESS(INTEGRATOR_RTC_BASE) + 4)
...
...
@@ -51,140 +44,3 @@ static int integrator_rtc_init(void)
}
__initcall
(
integrator_rtc_init
);
/*
* Where is the timer (VA)?
*/
#define TIMER0_VA_BASE (IO_ADDRESS(INTEGRATOR_CT_BASE)+0x00000000)
#define TIMER1_VA_BASE (IO_ADDRESS(INTEGRATOR_CT_BASE)+0x00000100)
#define TIMER2_VA_BASE (IO_ADDRESS(INTEGRATOR_CT_BASE)+0x00000200)
#define VA_IC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE)
/*
* How long is the timer interval?
*/
#define TIMER_INTERVAL (TICKS_PER_uSEC * mSEC_10)
#if TIMER_INTERVAL >= 0x100000
#define TICKS2USECS(x) (256 * (x) / TICKS_PER_uSEC)
#elif TIMER_INTERVAL >= 0x10000
#define TICKS2USECS(x) (16 * (x) / TICKS_PER_uSEC)
#else
#define TICKS2USECS(x) ((x) / TICKS_PER_uSEC)
#endif
#define TIMER_CTRL_IE (1 << 5)
/* Interrupt Enable */
/*
* What does it look like?
*/
typedef
struct
TimerStruct
{
unsigned
long
TimerLoad
;
unsigned
long
TimerValue
;
unsigned
long
TimerControl
;
unsigned
long
TimerClear
;
}
TimerStruct_t
;
extern
unsigned
long
(
*
gettimeoffset
)(
void
);
static
unsigned
long
timer_reload
;
/*
* Returns number of ms since last clock interrupt. Note that interrupts
* will have been disabled by do_gettimeoffset()
*/
static
unsigned
long
integrator_gettimeoffset
(
void
)
{
volatile
TimerStruct_t
*
timer1
=
(
TimerStruct_t
*
)
TIMER1_VA_BASE
;
unsigned
long
ticks1
,
ticks2
,
status
;
/*
* Get the current number of ticks. Note that there is a race
* condition between us reading the timer and checking for
* an interrupt. We get around this by ensuring that the
* counter has not reloaded between our two reads.
*/
ticks2
=
timer1
->
TimerValue
&
0xffff
;
do
{
ticks1
=
ticks2
;
status
=
__raw_readl
(
VA_IC_BASE
+
IRQ_RAW_STATUS
);
ticks2
=
timer1
->
TimerValue
&
0xffff
;
}
while
(
ticks2
>
ticks1
);
/*
* Number of ticks since last interrupt.
*/
ticks1
=
timer_reload
-
ticks2
;
/*
* Interrupt pending? If so, we've reloaded once already.
*/
if
(
status
&
(
1
<<
IRQ_TIMERINT1
))
ticks1
+=
timer_reload
;
/*
* Convert the ticks to usecs
*/
return
TICKS2USECS
(
ticks1
);
}
/*
* IRQ handler for the timer
*/
static
irqreturn_t
integrator_timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
volatile
TimerStruct_t
*
timer1
=
(
volatile
TimerStruct_t
*
)
TIMER1_VA_BASE
;
// ...clear the interrupt
timer1
->
TimerClear
=
1
;
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
static
struct
irqaction
integrator_timer_irq
=
{
.
name
=
"Integrator Timer Tick"
,
.
flags
=
SA_INTERRUPT
,
.
handler
=
integrator_timer_interrupt
};
/*
* Set up timer interrupt, and return the current time in seconds.
*/
void
__init
integrator_time_init
(
unsigned
long
reload
,
unsigned
int
ctrl
)
{
volatile
TimerStruct_t
*
timer0
=
(
volatile
TimerStruct_t
*
)
TIMER0_VA_BASE
;
volatile
TimerStruct_t
*
timer1
=
(
volatile
TimerStruct_t
*
)
TIMER1_VA_BASE
;
volatile
TimerStruct_t
*
timer2
=
(
volatile
TimerStruct_t
*
)
TIMER2_VA_BASE
;
unsigned
int
timer_ctrl
=
0x80
|
0x40
;
/* periodic */
timer_reload
=
reload
;
timer_ctrl
|=
ctrl
;
if
(
timer_reload
>
0x100000
)
{
timer_reload
>>=
8
;
timer_ctrl
|=
0x08
;
/* /256 */
}
else
if
(
timer_reload
>
0x010000
)
{
timer_reload
>>=
4
;
timer_ctrl
|=
0x04
;
/* /16 */
}
/*
* Initialise to a known state (all timers off)
*/
timer0
->
TimerControl
=
0
;
timer1
->
TimerControl
=
0
;
timer2
->
TimerControl
=
0
;
timer1
->
TimerLoad
=
timer_reload
;
timer1
->
TimerValue
=
timer_reload
;
timer1
->
TimerControl
=
timer_ctrl
;
/*
* Make irqs happen for the system timer
*/
setup_irq
(
IRQ_TIMERINT1
,
&
integrator_timer_irq
);
gettimeoffset
=
integrator_gettimeoffset
;
}
arch/arm/mach-omap/bus.c
View file @
1443a2ec
...
...
@@ -81,40 +81,6 @@ static struct bus_type omap_bus_types[OMAP_NR_BUSES] = {
},
};
#ifdef CONFIG_ARCH_OMAP1510
/*
* NOTE: This code _should_ go somewhere else. But let's wait for the
* dma-mapping code to settle down first.
*/
/*
* Test for Local Bus device in order to do address translation between
* dma_handle and Local Bus address.
*/
inline
int
dmadev_uses_omap_lbus
(
struct
device
*
dev
)
{
if
(
dev
==
NULL
||
!
cpu_is_omap1510
())
return
0
;
return
dev
->
bus
==
&
omap_bus_types
[
OMAP_BUS_LBUS
]
?
1
:
0
;
}
/*
* Translate bus address to Local Bus address for dma-mapping
*/
inline
int
dmadev_to_lbus
(
dma_addr_t
addr
)
{
return
bus_to_lbus
(
addr
);
}
/*
* Translate Local Bus address to bus address for dma-mapping
*/
inline
int
lbus_to_dmadev
(
dma_addr_t
addr
)
{
return
lbus_to_bus
(
addr
);
}
#endif
static
int
omap_bus_match
(
struct
device
*
dev
,
struct
device_driver
*
drv
)
{
struct
omap_dev
*
omapdev
=
OMAP_DEV
(
dev
);
...
...
@@ -278,8 +244,3 @@ EXPORT_SYMBOL(omap_driver_unregister);
EXPORT_SYMBOL
(
omap_device_register
);
EXPORT_SYMBOL
(
omap_device_unregister
);
#ifdef CONFIG_ARCH_OMAP1510
EXPORT_SYMBOL
(
dmadev_uses_omap_lbus
);
EXPORT_SYMBOL
(
dmadev_to_lbus
);
EXPORT_SYMBOL
(
lbus_to_dmadev
);
#endif
arch/arm/mach-omap/time.c
View file @
1443a2ec
...
...
@@ -28,7 +28,12 @@
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <asm/system.h>
#include <asm/hardware.h>
#include <asm/io.h>
...
...
arch/arm/mach-pxa/mainstone.c
View file @
1443a2ec
...
...
@@ -18,6 +18,7 @@
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/bitops.h>
#include <linux/fb.h>
#include <asm/types.h>
#include <asm/setup.h>
...
...
@@ -31,6 +32,7 @@
#include <asm/mach/irq.h>
#include <asm/arch/mainstone.h>
#include <asm/arch/pxafb.h>
#include "generic.h"
...
...
@@ -116,9 +118,66 @@ static struct platform_device smc91x_device = {
.
resource
=
smc91x_resources
,
};
static
void
mainstone_backlight_power
(
int
on
)
{
if
(
on
)
{
pxa_gpio_mode
(
GPIO16_PWM0_MD
);
pxa_set_cken
(
CKEN0_PWM0
,
1
);
PWM_CTRL0
=
0
;
PWM_PWDUTY0
=
0x3ff
;
PWM_PERVAL0
=
0x3ff
;
}
else
{
PWM_CTRL0
=
0
;
PWM_PWDUTY0
=
0x0
;
PWM_PERVAL0
=
0x3FF
;
pxa_set_cken
(
CKEN0_PWM0
,
0
);
}
}
static
struct
pxafb_mach_info
toshiba_ltm04c380k
__initdata
=
{
.
pixclock
=
50000
,
.
xres
=
640
,
.
yres
=
480
,
.
bpp
=
16
,
.
hsync_len
=
1
,
.
left_margin
=
0x9f
,
.
right_margin
=
1
,
.
vsync_len
=
44
,
.
upper_margin
=
0
,
.
lower_margin
=
0
,
.
sync
=
FB_SYNC_HOR_HIGH_ACT
|
FB_SYNC_VERT_HIGH_ACT
,
.
lccr0
=
LCCR0_Act
,
.
lccr3
=
LCCR3_PCP
,
.
pxafb_backlight_power
=
mainstone_backlight_power
,
};
static
struct
pxafb_mach_info
toshiba_ltm035a776c
__initdata
=
{
.
pixclock
=
110000
,
.
xres
=
240
,
.
yres
=
320
,
.
bpp
=
16
,
.
hsync_len
=
4
,
.
left_margin
=
8
,
.
right_margin
=
20
,
.
vsync_len
=
3
,
.
upper_margin
=
1
,
.
lower_margin
=
10
,
.
sync
=
FB_SYNC_HOR_HIGH_ACT
|
FB_SYNC_VERT_HIGH_ACT
,
.
lccr0
=
LCCR0_Act
,
.
lccr3
=
LCCR3_PCP
,
.
pxafb_backlight_power
=
mainstone_backlight_power
,
};
static
void
__init
mainstone_init
(
void
)
{
platform_add_device
(
&
smc91x_device
);
/* reading the BSR might be handy to select LCD type here */
if
(
0
)
set_pxa_fb_info
(
&
toshiba_ltm04c380k
);
else
set_pxa_fb_info
(
&
toshiba_ltm035a776c
);
}
...
...
arch/arm/mach-versatile/core.c
View file @
1443a2ec
...
...
@@ -503,8 +503,8 @@ static void __init versatile_init(void)
{
int
i
;
platform_
add_device
(
&
versatile_flash_device
);
platform_
add_device
(
&
smc91x_device
);
platform_
device_register
(
&
versatile_flash_device
);
platform_
device_register
(
&
smc91x_device
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
amba_devs
);
i
++
)
{
struct
amba_device
*
d
=
amba_devs
[
i
];
...
...
drivers/video/acornfb.c
View file @
1443a2ec
...
...
@@ -1246,6 +1246,8 @@ acornfb_detect_monitortype(void)
/*
* This enables the unused memory to be freed on older Acorn machines.
* We are freeing memory on behalf of the architecture initialisation
* code here.
*/
static
inline
void
free_unused_pages
(
unsigned
int
virtual_start
,
unsigned
int
virtual_end
)
...
...
@@ -1268,7 +1270,7 @@ free_unused_pages(unsigned int virtual_start, unsigned int virtual_end)
*/
page
=
virt_to_page
(
virtual_start
);
ClearPageReserved
(
page
);
atomic_set
(
&
page
->
count
,
1
);
set_page_count
(
page
,
1
);
free_page
(
virtual_start
);
virtual_start
+=
PAGE_SIZE
;
...
...
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