-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
398 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* arch/arm/include/asm/localtimer.h | ||
* | ||
* Copyright (C) 2004-2005 ARM Ltd. | ||
* | ||
* 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. | ||
*/ | ||
#ifndef __ASM_ARM_LOCALTIMER_H | ||
#define __ASM_ARM_LOCALTIMER_H | ||
|
||
struct clock_event_device; | ||
|
||
/* | ||
* Setup a per-cpu timer, whether it be a local timer or dummy broadcast | ||
*/ | ||
void percpu_timer_setup(void); | ||
|
||
/* | ||
* Called from assembly, this is the local timer IRQ handler | ||
*/ | ||
asmlinkage void do_local_timer(struct pt_regs *); | ||
|
||
|
||
#ifdef CONFIG_LOCAL_TIMERS | ||
|
||
#ifdef CONFIG_HAVE_ARM_TWD | ||
|
||
#include "smp_twd.h" | ||
|
||
#define local_timer_ack() twd_timer_ack() | ||
#define local_timer_stop() twd_timer_stop() | ||
|
||
#else | ||
|
||
/* | ||
* Platform provides this to acknowledge a local timer IRQ. | ||
* Returns true if the local timer IRQ is to be processed. | ||
*/ | ||
int local_timer_ack(void); | ||
|
||
/* | ||
* Stop a local timer interrupt. | ||
*/ | ||
void local_timer_stop(void); | ||
|
||
#endif | ||
|
||
/* | ||
* Setup a local timer interrupt for a CPU. | ||
*/ | ||
void local_timer_setup(struct clock_event_device *); | ||
|
||
#else | ||
|
||
static inline void local_timer_stop(void) | ||
{ | ||
} | ||
|
||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#ifndef __ASMARM_ARCH_SCU_H | ||
#define __ASMARM_ARCH_SCU_H | ||
|
||
unsigned int scu_get_core_count(void __iomem *); | ||
void scu_enable(void __iomem *); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef __ASMARM_SMP_TWD_H | ||
#define __ASMARM_SMP_TWD_H | ||
|
||
struct clock_event_device; | ||
|
||
extern void __iomem *twd_base; | ||
|
||
void twd_timer_stop(void); | ||
int twd_timer_ack(void); | ||
void twd_timer_setup(struct clock_event_device *); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* linux/arch/arm/kernel/smp_scu.c | ||
* | ||
* Copyright (C) 2002 ARM Ltd. | ||
* All Rights Reserved | ||
* | ||
* 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. | ||
*/ | ||
#include <linux/init.h> | ||
#include <linux/io.h> | ||
|
||
#include <asm/smp_scu.h> | ||
#include <asm/cacheflush.h> | ||
|
||
#define SCU_CTRL 0x00 | ||
#define SCU_CONFIG 0x04 | ||
#define SCU_CPU_STATUS 0x08 | ||
#define SCU_INVALIDATE 0x0c | ||
#define SCU_FPGA_REVISION 0x10 | ||
|
||
/* | ||
* Get the number of CPU cores from the SCU configuration | ||
*/ | ||
unsigned int __init scu_get_core_count(void __iomem *scu_base) | ||
{ | ||
unsigned int ncores = __raw_readl(scu_base + SCU_CONFIG); | ||
return (ncores & 0x03) + 1; | ||
} | ||
|
||
/* | ||
* Enable the SCU | ||
*/ | ||
void __init scu_enable(void __iomem *scu_base) | ||
{ | ||
u32 scu_ctrl; | ||
|
||
scu_ctrl = __raw_readl(scu_base + SCU_CTRL); | ||
scu_ctrl |= 1; | ||
__raw_writel(scu_ctrl, scu_base + SCU_CTRL); | ||
|
||
/* | ||
* Ensure that the data accessed by CPU0 before the SCU was | ||
* initialised is visible to the other CPUs. | ||
*/ | ||
flush_cache_all(); | ||
} |
Oops, something went wrong.