summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
commit46e045034336a2cc90c1798cd7cc07af744ddfd6 (patch)
tree3b9b51fc482e729f663d25333e77fbed9aaa939a /arch/arm/kernel
parent31dc59d503a02e84c4de98826452acaeb56dc15a (diff)
Merge with Linux 2.3.99-pre4.
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/Makefile4
-rw-r--r--arch/arm/kernel/arch.c11
-rw-r--r--arch/arm/kernel/armksyms.c2
-rw-r--r--arch/arm/kernel/bios32.c4
-rw-r--r--arch/arm/kernel/entry-armv.S72
-rw-r--r--arch/arm/kernel/process.c29
-rw-r--r--arch/arm/kernel/setup.c4
7 files changed, 108 insertions, 18 deletions
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index c454c1350..6cc5652e0 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -59,12 +59,12 @@ MX_OBJS := $(sort $(filter $(export-objs), $(obj-m)))
all: kernel.o $(HEAD_OBJ) init_task.o
$(HEAD_OBJ): $(HEAD_OBJ:.o=.S)
- $(CC) -D__ASSEMBLY__ $(AFLAGS) -DTEXTADDR=$(TEXTADDR) -traditional -c $(HEAD_OBJ:.o=.S) -o $@
+ $(CC) $(AFLAGS) -DTEXTADDR=$(TEXTADDR) -traditional -c $(HEAD_OBJ:.o=.S) -o $@
include $(TOPDIR)/Rules.make
.S.o:
- $(CC) -D__ASSEMBLY__ $(AFLAGS) $(AFLAGS_$@) -c -o $*.o $<
+ $(CC) $(AFLAGS) $(AFLAGS_$@) -c -o $*.o $<
# Spell out some dependencies that `make dep' doesn't spot
entry-armv.o: calls.S ../lib/constants.h
diff --git a/arch/arm/kernel/arch.c b/arch/arm/kernel/arch.c
index 536e614ff..e9cca7748 100644
--- a/arch/arm/kernel/arch.c
+++ b/arch/arm/kernel/arch.c
@@ -23,6 +23,9 @@ unsigned int memc_ctrl_reg;
unsigned int number_mfm_drives;
#endif
+extern void setup_initrd(unsigned int start, unsigned int size);
+extern void setup_ramdisk(int doload, int prompt, int start, unsigned int rd_sz);
+
/*
* Architecture specific fixups. This is where any
* parameters in the params struct are fixed up, or
@@ -157,11 +160,15 @@ fixup_sa1100(struct machine_desc *desc, struct param_struct *params,
#if defined(CONFIG_SA1100_BRUTUS)
ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
setup_ramdisk( 1, 0, 0, 8192 );
- setup_initrd( __phys_to_virt(0xd8000000), 0x00400000 );
+ setup_initrd( __phys_to_virt(0xd8000000), 3*1024*1024 );
#elif defined(CONFIG_SA1100_EMPEG)
ROOT_DEV = MKDEV( 3, 1 ); /* /dev/hda1 */
setup_ramdisk( 1, 0, 0, 4096 );
setup_initrd( 0xd0000000+((1024-320)*1024), (320*1024) );
+#elif defined(CONFIG_SA1100_THINCLIENT)
+ ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
+ setup_ramdisk( 1, 0, 0, 8192 );
+ setup_initrd( __phys_to_virt(0xc0800000), 4*1024*1024 );
#elif defined(CONFIG_SA1100_TIFON)
ROOT_DEV = MKDEV(UNNAMED_MAJOR, 0);
setup_ramdisk(1, 0, 0, 4096);
@@ -198,7 +205,7 @@ static struct machine_desc machine_desc[] __attribute__ ((__section__ (".arch.in
"EBSA110", /* RMK */
0x00000400,
NO_VIDEO,
- 1, 0, 1, 1, 1,
+ 1, 0, 1, 0, 1,
NULL
},
#endif
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
index 5a1b4ed31..02a4f6cf0 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
@@ -190,6 +190,8 @@ EXPORT_SYMBOL(uaccess_kernel);
EXPORT_SYMBOL(uaccess_user);
#endif
+ /* consistent area handling */
+EXPORT_SYMBOL(pci_alloc_consistent);
EXPORT_SYMBOL(consistent_alloc);
EXPORT_SYMBOL(consistent_free);
EXPORT_SYMBOL(consistent_sync);
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 109e2f96d..c4ccd64e3 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -504,6 +504,10 @@ void pcibios_align_resource(void *data, struct resource *res, unsigned long size
{
}
+void pcibios_set_master(struct pci_dev *dev)
+{
+}
+
int pcibios_enable_device(struct pci_dev *dev)
{
u16 cmd, old_cmd;
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index fe3939888..182b1c3b4 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -201,6 +201,38 @@ irq_prio_ebsa110:
.byte 6, 6, 6, 6, 2, 2, 2, 2, 3, 3, 6, 6, 2, 2, 2, 2
.endm
+#elif defined(CONFIG_ARCH_SHARK)
+
+ .macro disable_fiq
+ .endm
+
+ .macro get_irqnr_and_base, irqnr, irqstat, base
+ mov r4, #0xe0000000
+ orr r4, r4, #0x20
+
+ mov \irqstat, #0x0C
+ strb \irqstat, [r4] @outb(0x0C, 0x20) /* Poll command */
+ ldrb \irqnr, [r4] @irq = inb(0x20) & 7
+ and \irqstat, \irqnr, #0x80
+ teq \irqstat, #0
+ beq 43f
+ and \irqnr, \irqnr, #7
+ teq \irqnr, #2
+ bne 44f
+43: mov \irqstat, #0x0C
+ strb \irqstat, [r4, #0x80] @outb(0x0C, 0xA0) /* Poll command */
+ ldrb \irqnr, [r4, #0x80] @irq = (inb(0xA0) & 7) + 8
+ and \irqstat, \irqnr, #0x80
+ teq \irqstat, #0
+ beq 44f
+ and \irqnr, \irqnr, #7
+ add \irqnr, \irqnr, #8
+44: teq \irqstat, #0
+ .endm
+
+ .macro irq_prio_table
+ .endm
+
#elif defined(CONFIG_HOST_FOOTBRIDGE) || defined(CONFIG_ADDIN_FOOTBRIDGE)
#include <asm/dec21285.h>
@@ -295,9 +327,12 @@ irq_prio_ebsa110:
.endm
.macro get_irqnr_and_base, irqnr, irqstat, base
- ldr r4, =0xffe00000
- ldr \irqstat, [r4, #0x180] @ get interrupts
+ ldr \irqstat, =INTCONT_BASE
+ ldr \base, =soft_irq_mask
+ ldr \irqstat, [\irqstat] @ get interrupts
+ ldr \base, [\base]
mov \irqnr, #0
+ and \irqstat, \irqstat, \base @ mask out disabled ones
1001: tst \irqstat, #1
addeq \irqnr, \irqnr, #1
moveq \irqstat, \irqstat, lsr #1
@@ -307,6 +342,39 @@ irq_prio_ebsa110:
.endm
.macro irq_prio_table
+ .ltorg
+ .bss
+ENTRY(soft_irq_mask)
+ .word 0
+ .text
+ .endm
+
+#elif defined(CONFIG_ARCH_TBOX)
+
+ .macro disable_fiq
+ .endm
+
+ .macro get_irqnr_and_base, irqnr, irqstat, base
+ ldr \irqstat, =0xffff7000
+ ldr \irqstat, [\irqstat] @ get interrupts
+ ldr \base, =soft_irq_mask
+ ldr \base, [\base]
+ mov \irqnr, #0
+ and \irqstat, \irqstat, \base @ mask out disabled ones
+1001: tst \irqstat, #1
+ addeq \irqnr, \irqnr, #1
+ moveq \irqstat, \irqstat, lsr #1
+ tsteq \irqnr, #32
+ beq 1001b
+ teq \irqnr, #32
+ .endm
+
+ .macro irq_prio_table
+ .ltorg
+ .bss
+ENTRY(soft_irq_mask)
+ .word 0
+ .text
.endm
#elif defined(CONFIG_ARCH_SA1100)
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 6ea7916ef..c7ace10b5 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -28,15 +28,24 @@
#include <asm/uaccess.h>
#include <asm/system.h>
-#include <asm/arch/system.h>
#include <asm/io.h>
+/*
+ * Values for cpu_do_idle()
+ */
+#define IDLE_WAIT_SLOW 0
+#define IDLE_WAIT_FAST 1
+#define IDLE_CLOCK_SLOW 2
+#define IDLE_CLOCK_FAST 3
+
extern char *processor_modes[];
extern void setup_mm_for_reboot(char mode);
asmlinkage void ret_from_sys_call(void) __asm__("ret_from_sys_call");
-static int hlt_counter;
+static volatile int hlt_counter;
+
+#include <asm/arch/system.h>
void disable_hlt(void)
{
@@ -64,7 +73,9 @@ __setup("nohlt", nohlt_setup);
__setup("hlt", hlt_setup);
/*
- * The idle loop on an ARM...
+ * The idle thread. We try to conserve power, while trying to keep
+ * overall latency low. The architecture specific idle is passed
+ * a value to indicate the level of "idleness" of the system.
*/
void cpu_idle(void)
{
@@ -72,15 +83,13 @@ void cpu_idle(void)
init_idle();
current->priority = 0;
current->counter = -100;
+
while (1) {
- if (!hlt_counter)
- arch_do_idle();
- if (current->need_resched) {
- schedule();
+ arch_idle();
+ schedule();
#ifndef CONFIG_NO_PGT_CACHE
- check_pgt_cache();
+ check_pgt_cache();
#endif
- }
}
}
@@ -89,7 +98,7 @@ static char reboot_mode = 'h';
int __init reboot_setup(char *str)
{
reboot_mode = str[0];
- return 0;
+ return 1;
}
__setup("reboot=", reboot_setup);
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 6a3429bdd..f04b422b4 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -228,7 +228,7 @@ parse_cmdline(struct meminfo *mi, char **cmdline_p, char *from)
*cmdline_p = command_line;
}
-static void __init
+void __init
setup_ramdisk(int doload, int prompt, int image_start, unsigned int rd_sz)
{
#ifdef CONFIG_BLK_DEV_RAM
@@ -246,7 +246,7 @@ setup_ramdisk(int doload, int prompt, int image_start, unsigned int rd_sz)
/*
* initial ram disk
*/
-static void __init setup_initrd(unsigned int start, unsigned int size)
+void __init setup_initrd(unsigned int start, unsigned int size)
{
#ifdef CONFIG_BLK_DEV_INITRD
if (start == 0)