From 894673ee6122a3ce1958e1fe096901ba5356a96b Mon Sep 17 00:00:00 2001 From: Jon Smirl Date: Mon, 10 Jul 2006 04:44:13 -0700 Subject: [PATCH] tty: Remove include of screen_info.h from tty.h screen_info.h doesn't have anything to do with the tty layer and shouldn't be included by tty.h. This patches removes the include and modifies all users to directly include screen_info.h. struct screen_info is mainly used to communicate with the console drivers in drivers/video/console. Note that this patch touches every arch and I have no way of testing it. If there is a mistake the worst thing that will happen is a compile error. [akpm@osdl.org: fix arm build] [akpm@osdl.org: fix alpha build] Signed-off-by: Jon Smirl Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/mips/mips-boards/malta/malta_setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/mips/mips-boards') diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index bc4ac6f01877..7a54195c78fb 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #ifdef CONFIG_MTD #include -- cgit v1.2.3 From 94dee171df34b7955cd647da4c40ba67d55a7671 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 2 Jul 2006 14:41:42 +0100 Subject: [MIPS] Eleminate interrupt migration helper use. > #define hw_interrupt_type irq_chip > typedef struct irq_chip hw_irq_controller; > #define no_irq_type no_irq_chip > typedef struct irq_desc irq_desc_t; Signed-off-by: Ralf Baechle --- arch/mips/mips-boards/atlas/atlas_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/mips/mips-boards') diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c index 9dd6b8925581..fb25e0377f11 100644 --- a/arch/mips/mips-boards/atlas/atlas_int.c +++ b/arch/mips/mips-boards/atlas/atlas_int.c @@ -73,7 +73,7 @@ static void end_atlas_irq(unsigned int irq) enable_atlas_irq(irq); } -static struct hw_interrupt_type atlas_irq_type = { +static struct irq_chip atlas_irq_type = { .typename = "Atlas", .startup = startup_atlas_irq, .shutdown = shutdown_atlas_irq, -- cgit v1.2.3 From e1a4e469d77297fd006a3cf2b605fc6f782a8d26 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 3 Jul 2006 17:02:35 +0100 Subject: [MIPS] Malta: Fix build of certain configs. --- arch/mips/mips-boards/generic/memory.c | 50 ++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'arch/mips/mips-boards') diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c index c89fcf9e9c22..be80c5dd4a0c 100644 --- a/arch/mips/mips-boards/generic/memory.c +++ b/arch/mips/mips-boards/generic/memory.c @@ -47,43 +47,45 @@ static char *mtypes[3] = { }; #endif +/* determined physical memory size, not overridden by command line args */ +unsigned long physical_memsize = 0L; + struct prom_pmemblock * __init prom_getmdesc(void) { char *memsize_str; unsigned int memsize; char cmdline[CL_SIZE], *ptr; - /* Check the command line first for a memsize directive */ - strcpy(cmdline, arcs_cmdline); - ptr = strstr(cmdline, "memsize="); - if (ptr && (ptr != cmdline) && (*(ptr - 1) != ' ')) - ptr = strstr(ptr, " memsize="); - - if (ptr) { - memsize = memparse(ptr + 8, &ptr); - } - else { - /* otherwise look in the environment */ - memsize_str = prom_getenv("memsize"); - if (!memsize_str) { - prom_printf("memsize not set in boot prom, set to default (32Mb)\n"); - memsize = 0x02000000; - } else { + /* otherwise look in the environment */ + memsize_str = prom_getenv("memsize"); + if (!memsize_str) { + prom_printf("memsize not set in boot prom, set to default (32Mb)\n"); + physical_memsize = 0x02000000; + } else { #ifdef DEBUG - prom_printf("prom_memsize = %s\n", memsize_str); + prom_printf("prom_memsize = %s\n", memsize_str); #endif - memsize = simple_strtol(memsize_str, NULL, 0); - } + physical_memsize = simple_strtol(memsize_str, NULL, 0); } #ifdef CONFIG_CPU_BIG_ENDIAN - /* - * SOC-it swaps, or perhaps doesn't swap, when DMA'ing the last - * word of physical memory - */ - memsize -= PAGE_SIZE; + /* SOC-it swaps, or perhaps doesn't swap, when DMA'ing the last + word of physical memory */ + physical_memsize -= PAGE_SIZE; #endif + /* Check the command line for a memsize directive that overrides + the physical/default amount */ + strcpy(cmdline, arcs_cmdline); + ptr = strstr(cmdline, "memsize="); + if (ptr && (ptr != cmdline) && (*(ptr - 1) != ' ')) + ptr = strstr(ptr, " memsize="); + + if (ptr) + memsize = memparse(ptr + 8, &ptr); + else + memsize = physical_memsize; + memset(mdesc, 0, sizeof(mdesc)); mdesc[0].type = yamon_dontuse; -- cgit v1.2.3 From 783b09dc2806429560d0211564a94d6570b96ee3 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 8 Jul 2006 11:25:38 +0100 Subject: [MIPS] MIPSsim: Delete redeclaration of ll_local_timer_interrupt. Signed-off-by: Ralf Baechle --- arch/mips/mips-boards/sim/sim_time.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/mips/mips-boards') diff --git a/arch/mips/mips-boards/sim/sim_time.c b/arch/mips/mips-boards/sim/sim_time.c index e7f6003357f7..cafa1480817b 100644 --- a/arch/mips/mips-boards/sim/sim_time.c +++ b/arch/mips/mips-boards/sim/sim_time.c @@ -33,8 +33,6 @@ unsigned long cpu_khz; -extern asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs); - irqreturn_t sim_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { #ifdef CONFIG_SMP -- cgit v1.2.3 From 54d0a216f40e060ba4265bb851cc36b3ca55d1a8 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 9 Jul 2006 21:38:56 +0100 Subject: [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. Signed-off-by: Ralf Baechle --- --- arch/mips/mips-boards/atlas/atlas_setup.c | 2 -- arch/mips/mips-boards/generic/time.c | 2 +- arch/mips/mips-boards/malta/malta_setup.c | 2 -- arch/mips/mips-boards/sead/sead_setup.c | 2 -- arch/mips/mips-boards/sim/sim_setup.c | 2 -- 5 files changed, 1 insertion(+), 9 deletions(-) (limited to 'arch/mips/mips-boards') diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c index 3a7c3d28aa0d..9871a91fdb07 100644 --- a/arch/mips/mips-boards/atlas/atlas_setup.c +++ b/arch/mips/mips-boards/atlas/atlas_setup.c @@ -35,7 +35,6 @@ extern void mips_reboot_setup(void); extern void mips_time_init(void); -extern void mips_timer_setup(struct irqaction *irq); extern unsigned long mips_rtc_get_time(void); #ifdef CONFIG_KGDB @@ -63,7 +62,6 @@ void __init plat_mem_setup(void) mips_reboot_setup(); board_time_init = mips_time_init; - board_timer_setup = mips_timer_setup; rtc_mips_get_time = mips_rtc_get_time; } diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index 5e207760826b..8e846d175ee1 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c @@ -245,7 +245,7 @@ void __init mips_time_init(void) local_irq_restore(flags); } -void __init mips_timer_setup(struct irqaction *irq) +void __init plat_timer_setup(struct irqaction *irq) { if (cpu_has_veic) { set_vi_handler (MSC01E_INT_CPUCTR, mips_timer_dispatch); diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index 7a54195c78fb..ab460f805bef 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c @@ -44,7 +44,6 @@ extern void mips_reboot_setup(void); extern void mips_time_init(void); -extern void mips_timer_setup(struct irqaction *irq); extern unsigned long mips_rtc_get_time(void); #ifdef CONFIG_KGDB @@ -223,6 +222,5 @@ void __init plat_mem_setup(void) mips_reboot_setup(); board_time_init = mips_time_init; - board_timer_setup = mips_timer_setup; rtc_mips_get_time = mips_rtc_get_time; } diff --git a/arch/mips/mips-boards/sead/sead_setup.c b/arch/mips/mips-boards/sead/sead_setup.c index a856bd664879..a189dec7c7bc 100644 --- a/arch/mips/mips-boards/sead/sead_setup.c +++ b/arch/mips/mips-boards/sead/sead_setup.c @@ -35,7 +35,6 @@ extern void mips_reboot_setup(void); extern void mips_time_init(void); -extern void mips_timer_setup(struct irqaction *irq); static void __init serial_init(void); @@ -51,7 +50,6 @@ void __init plat_mem_setup(void) serial_init (); board_time_init = mips_time_init; - board_timer_setup = mips_timer_setup; mips_reboot_setup(); } diff --git a/arch/mips/mips-boards/sim/sim_setup.c b/arch/mips/mips-boards/sim/sim_setup.c index 3d4a785b565a..2659c1c3b78d 100644 --- a/arch/mips/mips-boards/sim/sim_setup.c +++ b/arch/mips/mips-boards/sim/sim_setup.c @@ -37,7 +37,6 @@ extern void sim_time_init(void); -extern void sim_timer_setup(struct irqaction *irq); static void __init serial_init(void); unsigned int _isbonito = 0; @@ -56,7 +55,6 @@ void __init plat_mem_setup(void) serial_init(); board_time_init = sim_time_init; - board_timer_setup = sim_timer_setup; prom_printf("Linux started...\n"); #ifdef CONFIG_MT_SMP -- cgit v1.2.3 From ece2246ebda3d86cedb9414e7771862a6c9a054c Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 9 Jul 2006 22:27:23 +0100 Subject: [MIPS] Atlas, Malta, SEAD: Don't disable interrupts in mips_time_init(). By the time it's called from time_init interrupts are still disabled. Signed-off-by: Ralf Baechle --- arch/mips/mips-boards/generic/time.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'arch/mips/mips-boards') diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index 8e846d175ee1..557bf961f36a 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c @@ -228,9 +228,7 @@ unsigned long __init mips_rtc_get_time(void) void __init mips_time_init(void) { - unsigned int est_freq, flags; - - local_irq_save(flags); + unsigned int est_freq; /* Set Data mode - binary. */ CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL); @@ -241,8 +239,6 @@ void __init mips_time_init(void) (est_freq%1000000)*100/1000000); cpu_khz = est_freq / 1000; - - local_irq_restore(flags); } void __init plat_timer_setup(struct irqaction *irq) -- cgit v1.2.3 From 75da124ac0141e463cb2738fdc02dd24fc8b6e95 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 10 Jul 2006 02:27:21 +0100 Subject: [MIPS] Remove unused code. Signed-off-by: Ralf Baechle --- arch/mips/mips-boards/sim/Makefile | 3 +- arch/mips/mips-boards/sim/sim_IRQ.c | 147 ------------------------------------ arch/mips/mips-boards/sim/sim_irq.S | 100 ------------------------ 3 files changed, 1 insertion(+), 249 deletions(-) delete mode 100644 arch/mips/mips-boards/sim/sim_IRQ.c delete mode 100644 arch/mips/mips-boards/sim/sim_irq.S (limited to 'arch/mips/mips-boards') diff --git a/arch/mips/mips-boards/sim/Makefile b/arch/mips/mips-boards/sim/Makefile index 5b977de4ecff..a12e32aafde0 100644 --- a/arch/mips/mips-boards/sim/Makefile +++ b/arch/mips/mips-boards/sim/Makefile @@ -15,6 +15,5 @@ # 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. # -obj-y := sim_setup.o sim_mem.o sim_time.o sim_printf.o sim_int.o sim_irq.o \ - sim_cmdline.o +obj-y := sim_setup.o sim_mem.o sim_time.o sim_printf.o sim_int.o sim_cmdline.o obj-$(CONFIG_SMP) += sim_smp.o diff --git a/arch/mips/mips-boards/sim/sim_IRQ.c b/arch/mips/mips-boards/sim/sim_IRQ.c deleted file mode 100644 index ec549f3e2011..000000000000 --- a/arch/mips/mips-boards/sim/sim_IRQ.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Carsten Langgaard, carstenl@mips.com - * Copyright (C) 1999, 2000 MIPS Technologies, Inc. All rights reserved. - * - * This program is free software; you can distribute it and/or modify it - * under the terms of the GNU General Public License (Version 2) as - * published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Interrupt exception dispatch code. - */ - -#include -#include -#include -#include - -/* A lot of complication here is taken away because: - * - * 1) We handle one interrupt and return, sitting in a loop and moving across - * all the pending IRQ bits in the cause register is _NOT_ the answer, the - * common case is one pending IRQ so optimize in that direction. - * - * 2) We need not check against bits in the status register IRQ mask, that - * would make this routine slow as hell. - * - * 3) Linux only thinks in terms of all IRQs on or all IRQs off, nothing in - * between like BSD spl() brain-damage. - * - * Furthermore, the IRQs on the MIPS board look basically (barring software - * IRQs which we don't use at all and all external interrupt sources are - * combined together on hardware interrupt 0 (MIPS IRQ 2)) like: - * - * MIPS IRQ Source - * -------- ------ - * 0 Software (ignored) - * 1 Software (ignored) - * 2 Combined hardware interrupt (hw0) - * 3 Hardware (ignored) - * 4 Hardware (ignored) - * 5 Hardware (ignored) - * 6 Hardware (ignored) - * 7 R4k timer (what we use) - * - * Note: On the SEAD board thing are a little bit different. - * Here IRQ 2 (hw0) is wired to the UART0 and IRQ 3 (hw1) is wired - * wired to UART1. - * - * We handle the IRQ according to _our_ priority which is: - * - * Highest ---- R4k Timer - * Lowest ---- Combined hardware interrupt - * - * then we just return, if multiple IRQs are pending then we will just take - * another exception, big deal. - */ - - .text - .set noreorder - .set noat - .align 5 - NESTED(mipsIRQ, PT_SIZE, sp) - SAVE_ALL - CLI - .set at - - mfc0 s0, CP0_CAUSE # get irq bits - mfc0 s1, CP0_STATUS # get irq mask - and s0, s1 - - /* First we check for r4k counter/timer IRQ. */ - andi a0, s0, CAUSEF_IP7 - beq a0, zero, 1f - andi a0, s0, CAUSEF_IP2 # delay slot, check hw0 interrupt - - /* Wheee, a timer interrupt. */ - move a0, sp - jal mips_timer_interrupt - nop - - j ret_from_irq - nop - -1: -#if defined(CONFIG_MIPS_SEAD) - beq a0, zero, 1f - andi a0, s0, CAUSEF_IP3 # delay slot, check hw1 interrupt -#else - beq a0, zero, 1f # delay slot, check hw3 interrupt - andi a0, s0, CAUSEF_IP5 -#endif - - /* Wheee, combined hardware level zero interrupt. */ -#if defined(CONFIG_MIPS_ATLAS) - jal atlas_hw0_irqdispatch -#elif defined(CONFIG_MIPS_MALTA) - jal malta_hw0_irqdispatch -#elif defined(CONFIG_MIPS_SEAD) - jal sead_hw0_irqdispatch -#else -#error "MIPS board not supported\n" -#endif - move a0, sp # delay slot - - j ret_from_irq - nop # delay slot - -1: -#if defined(CONFIG_MIPS_SEAD) - beq a0, zero, 1f - andi a0, s0, CAUSEF_IP5 # delay slot, check hw3 interrupt - jal sead_hw1_irqdispatch - move a0, sp # delay slot - j ret_from_irq - nop # delay slot -1: -#endif -#if defined(CONFIG_MIPS_MALTA) - beq a0, zero, 1f # check hw3 (coreHI) interrupt - nop - jal corehi_irqdispatch - move a0, sp - j ret_from_irq - nop -1: -#endif - /* - * Here by mistake? This is possible, what can happen is that by the - * time we take the exception the IRQ pin goes low, so just leave if - * this is the case. - */ - move a1,s0 - PRINT("Got interrupt: c0_cause = %08x\n") - mfc0 a1, CP0_EPC - PRINT("c0_epc = %08x\n") - - j ret_from_irq - nop - END(mipsIRQ) diff --git a/arch/mips/mips-boards/sim/sim_irq.S b/arch/mips/mips-boards/sim/sim_irq.S deleted file mode 100644 index b7444e74a6a1..000000000000 --- a/arch/mips/mips-boards/sim/sim_irq.S +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (C) 1999, 2005 MIPS Technologies, Inc. All rights reserved. - * - * This program is free software; you can distribute it and/or modify it - * under the terms of the GNU General Public License (Version 2) as - * published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Interrupt exception dispatch code. - * - */ - -#include -#include -#include -#include - -#include - - - .text - .set noreorder - .set noat - .align 5 - NESTED(simIRQ, PT_SIZE, sp) - SAVE_ALL - CLI - .set at - - mfc0 s0, CP0_CAUSE # get irq bits - mfc0 s1, CP0_STATUS # get irq mask - andi s0, ST0_IM # CAUSE.CE may be non-zero! - and s0, s1 - -#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) - .set mips32 - clz a0, s0 - .set mips0 - negu a0 - addu a0, 31-CAUSEB_IP - bltz a0, spurious -#else - beqz s0, spurious - li a0, 7 - - and t0, s0, 0xf000 - sltiu t0, t0, 1 - sll t0, 2 - subu a0, t0 - sll s0, t0 - - and t0, s0, 0xc000 - sltiu t0, t0, 1 - sll t0, 1 - subu a0, t0 - sll s0, t0 - - and t0, s0, 0x8000 - sltiu t0, t0, 1 - # sll t0, 0 - subu a0, t0 - # sll s0, t0 -#endif - -#ifdef CASCADE_IRQ - li a1, CASCADE_IRQ - bne a0, a1, 1f - addu a0, MIPSCPU_INT_BASE - - jal CASCADE_DISPATCH - move a0, sp - - j ret_from_irq - nop -1: -#else - addu a0, MIPSCPU_INT_BASE -#endif - - jal do_IRQ - move a1, sp - - j ret_from_irq - nop - - -spurious: - jal spurious_interrupt - nop - j ret_from_irq - nop - END(simIRQ) -- cgit v1.2.3 From 5fd326573876e466c7693cbf06e9c88ecf86135d Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 10 Jul 2006 02:37:21 +0100 Subject: [MIPS] MIPSsim: Build fix, rename sim_timer_setup -> plat_timer_setup. Signed-off-by: Ralf Baechle --- arch/mips/mips-boards/sim/sim_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/mips/mips-boards') diff --git a/arch/mips/mips-boards/sim/sim_time.c b/arch/mips/mips-boards/sim/sim_time.c index cafa1480817b..230929ecd57f 100644 --- a/arch/mips/mips-boards/sim/sim_time.c +++ b/arch/mips/mips-boards/sim/sim_time.c @@ -183,7 +183,7 @@ static void mips_timer_dispatch (struct pt_regs *regs) } -void __init sim_timer_setup(struct irqaction *irq) +void __init plat_timer_setup(struct irqaction *irq) { if (cpu_has_veic) { set_vi_handler(MSC01E_INT_CPUCTR, mips_timer_dispatch); -- cgit v1.2.3