* Re: Tester with IP27/IP30 needed
From: Thomas Bogendoerfer @ 2008-01-26 14:39 UTC (permalink / raw)
To: Kumba; +Cc: Ralf Baechle, Florian Lohoff, linux-mips, debian-mips
In-Reply-To: <479AA532.5040603@gentoo.org>
On Fri, Jan 25, 2008 at 10:12:50PM -0500, Kumba wrote:
> f - cache barriers on load and stores (-mr10k-cache-barrier=2)
> f2 - cache barriers on loads only (-mr10k-cache-barrier=1)
> f3 - no cache barriers (flag omitted from gcc)
>
> Running 'f' and 'f2' generates an "Illegal instruction" error, then drops
> back to the command line, while 'f3' hangs the box. This is an IP28
no suprise here. As Ralf already noted cache barrier is a restricted
instruction, it will always cause a illegal instruction when used
in user space. Nevertheless it looks like all IP28 are affected
by the simple exploit. Flo built glibc 2.7 with LLSC war workaround
and this avoids triggering the hang.
> FYI, CPU rev in this machine is R10000 v2.5. I think that's the same for
> all IP28 systems.
Flo and mine also have rev 2.5 cpus.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply
* Re: Toshiba JMR 3927 working setup?
From: Atsushi Nemoto @ 2008-01-26 5:08 UTC (permalink / raw)
To: okumoto; +Cc: linux-mips, ralf
In-Reply-To: <479A134D.7090206@ucsd.edu>
On Fri, 25 Jan 2008 08:50:21 -0800, Max Okumoto <okumoto@ucsd.edu> wrote:
> I have a JMR3927 based system and I got it to work with the 2.6.23.14 kernel, but
> used 0xff0000 instead of 0xff000. The offset passed in was 0xfffec000 which isn't
> within the 0xff000000 - 0xff0ff000.
Thank you for good news. (and excuse my double fault...)
Ralf, please apply this to 2.6.23-stable and 2.6.24-stable.
Subject: [MIPS] Fix plat_ioremap for JMR3927 (take 2)
TX39XX's "reserved" segment in CKSEG3 area is 0xff000000-0xfffeffff.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/include/asm-mips/mach-jmr3927/ioremap.h b/include/asm-mips/mach-jmr3927/ioremap.h
index aa131ad..29989ff 100644
--- a/include/asm-mips/mach-jmr3927/ioremap.h
+++ b/include/asm-mips/mach-jmr3927/ioremap.h
@@ -25,7 +25,7 @@ static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size,
{
#define TXX9_DIRECTMAP_BASE 0xff000000ul
if (offset >= TXX9_DIRECTMAP_BASE &&
- offset < TXX9_DIRECTMAP_BASE + 0xf0000)
+ offset < TXX9_DIRECTMAP_BASE + 0xff0000)
return (void __iomem *)offset;
return NULL;
}
^ permalink raw reply related
* Re: Tester with IP27/IP30 needed
From: Kumba @ 2008-01-26 3:12 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Thomas Bogendoerfer, Florian Lohoff, linux-mips, debian-mips
In-Reply-To: <20080122154958.GA29108@linux-mips.org>
Ralf Baechle wrote:
>
> It's a cache instruction so priviledged which means userspace can't execute
> it. It's also entirely unclear if a cache barrier instruction would make a
> difference at all.
The cache barrier has an interesting effect. I built three binaries: f, f2, and
f3 (I'm cheap on the names):
f - cache barriers on load and stores (-mr10k-cache-barrier=2)
f2 - cache barriers on loads only (-mr10k-cache-barrier=1)
f3 - no cache barriers (flag omitted from gcc)
Running 'f' and 'f2' generates an "Illegal instruction" error, then drops back
to the command line, while 'f3' hangs the box. This is an IP28 running on
2.6.23.9, using Thomas' patches backported to fit (plus Peter's Impact code and
two sgiseeq patches from upstream).
This is similar to using a gentoo stage3 in a chroot environment that was built
back in May of 2007, so I think this hang up pre-dates glibc-2.7 by some degree,
as that chroot uses glibc-2.5. Chroot into this userland, and run our
"env-update" script, and you'll hang the box.
FYI, CPU rev in this machine is R10000 v2.5. I think that's the same for all
IP28 systems.
--Kumba
--
Gentoo/MIPS Team Lead
"Such is oft the course of deeds that move the wheels of the world: small hands
do them because they must, while the eyes of the great are elsewhere." --Elrond
^ permalink raw reply
* Re: Toshiba JMR 3927 working setup?
From: Max Okumoto @ 2008-01-25 16:50 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips
[-- Attachment #1: Type: text/plain, Size: 992 bytes --]
Hi,
I have a JMR3927 based system and I got it to work with the 2.6.23.14 kernel, but
used 0xff0000 instead of 0xff000. The offset passed in was 0xfffec000 which isn't
within the 0xff000000 - 0xff0ff000.
Max
Subject: [MIPS] Fix plat_ioremap for JMR3927
TX39XX's "reserved" segment in CKSEG3 area is 0xff000000-0xfffeffff.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/include/asm-mips/mach-jmr3927/ioremap.h
b/include/asm-mips/mach-jmr3927/ioremap.h
index aa131ad..ac3be35 100644
--- a/include/asm-mips/mach-jmr3927/ioremap.h
+++ b/include/asm-mips/mach-jmr3927/ioremap.h
@@ -25,7 +25,7 @@ static inline void __iomem *plat_ioremap(phys_t
offset,
unsigned long size,
{
#define TXX9_DIRECTMAP_BASE 0xff000000ul
if (offset >= TXX9_DIRECTMAP_BASE &&
- offset < TXX9_DIRECTMAP_BASE + 0xf0000)
+ offset < TXX9_DIRECTMAP_BASE + 0xff000)
return (void __iomem *)offset;
return NULL;
}
[-- Attachment #2: Type: text/html, Size: 1292 bytes --]
^ permalink raw reply
* Re: last post
From: Ralf Baechle @ 2008-01-25 11:56 UTC (permalink / raw)
To: Matteo Croce; +Cc: linux-mips
In-Reply-To: <200801242138.23693.rootkit85@yahoo.it>
On Thu, Jan 24, 2008 at 09:38:23PM +0100, Matteo Croce wrote:
> PS. AR7 is still in development, i'm just waiting the 2.6.24 kernel for the new PHY API
Delivered as asked for, 2.6.24 is out ;-)
Ralf
^ permalink raw reply
* last post
From: Matteo Croce @ 2008-01-24 20:38 UTC (permalink / raw)
To: linux-mips
sorry, used a broken mail client
Cheers,
Matteo
PS. AR7 is still in development, i'm just waiting the 2.6.24 kernel for the new PHY API
^ permalink raw reply
* Re: study concerning firms contribution in the linux kernel
From: Matteo Croce @ 2008-01-24 18:13 UTC (permalink / raw)
To: linux-mips
In-Reply-To: <1201163388.6115.69.camel@urs-laptop>
Il Thursday 24 January 2008 09:29:48 Urs Lerch ha scritto:
> Hi,
>
> As a PhD student at the Technical University of Berlin (Germany) I'm
> analyzing the logs of the linux kernel traffic. As I'm focusing on the
> firms contribution, I'm very much interested in who's employed by whom.
> As a matter of fact it is not that easy to do the matching and I would
> appreciate it a lot if you could help me with my study. You would do me
> a great favour if you could respond to the following questions:
>
> (1) Are you doing your contributions to the linux kernel
> [ ] paid by a for-profit-organization
> [ ] paid by a non-profit-organization
> [ ] unpaid as academic
> [ ] unpaid (non-academic)
> (2) What's the name of your organization?
> (3) Do I have to keep the data private?
>
> I won't analyze the contributions by person but by the companies as a
> whole and will do some comparisons. So you're name or mailaddress won't
> be written in my study.
>
> Thanks a lot!
>
> Kind regards,
> Urs
>
>
(1) Are you doing your contributions to the linux kernel
[ ] paid by a for-profit-organization
[ ] paid by a non-profit-organization
[X] unpaid as academic
[ ] unpaid (non-academic)
(2) What's the name of your organization?
Nothing
(3) Do I have to keep the data private?
No
Cheers,
Matteo Croce
^ permalink raw reply
* [PATCH 17/17] [MIPS] remove Documentation/mips/GT64120.README
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
Based upon the 2.4 kernel, the information presented in the
Documentation/mips/GT64120.README file is outdated. Worse,
the document contents are plain misleading nowadays because
the text mentions files and directories, which have been
deleted, moved or restructured for 2.6.
This patch removes the documentation, which is no more valid.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
Documentation/mips/00-INDEX | 2 -
Documentation/mips/GT64120.README | 65 -------------------------------------
2 files changed, 0 insertions(+), 67 deletions(-)
delete mode 100644 Documentation/mips/GT64120.README
diff --git a/Documentation/mips/00-INDEX b/Documentation/mips/00-INDEX
index 3f13bf8..8ae9cff 100644
--- a/Documentation/mips/00-INDEX
+++ b/Documentation/mips/00-INDEX
@@ -2,5 +2,3 @@
- this file.
AU1xxx_IDE.README
- README for MIPS AU1XXX IDE driver.
-GT64120.README
- - README for dir with info on MIPS boards using GT-64120 or GT-64120A.
diff --git a/Documentation/mips/GT64120.README b/Documentation/mips/GT64120.README
deleted file mode 100644
index 2d0eec9..0000000
--- a/Documentation/mips/GT64120.README
+++ /dev/null
@@ -1,65 +0,0 @@
-README for arch/mips/gt64120 directory and subdirectories
-
-Jun Sun, jsun@mvista.com or jsun@junsun.net
-01/27, 2001
-
-MOTIVATION
-----------
-
-Many MIPS boards share the same system controller (or CPU companian chip),
-such as GT-64120. It is highly desirable to let these boards share
-the same controller code instead of duplicating them.
-
-This directory is meant to hold all MIPS boards that use GT-64120 or GT-64120A.
-
-
-HOW TO ADD A BOARD
-------------------
-
-. Create a subdirectory include/asm/gt64120/<board>.
-
-. Create a file called gt64120_dep.h under that directory.
-
-. Modify include/asm/gt64120/gt64120.h file to include the new gt64120_dep.h
- based on config options. The board-dep section is at the end of
- include/asm/gt64120/gt64120.h file. There you can find all required
- definitions include/asm/gt64120/<board>/gt64120_dep.h file must supply.
-
-. Create a subdirectory arch/mips/gt64120/<board> directory to hold
- board specific routines.
-
-. The GT-64120 common code is supplied under arch/mips/gt64120/common directory.
- It includes:
- 1) arch/mips/gt64120/pci.c -
- common PCI routine, include the top-level pcibios_init()
- 2) arch/mips/gt64120/irq.c -
- common IRQ routine, include the top-level do_IRQ()
- [This part really belongs to arch/mips/kernel. jsun]
- 3) arch/mips/gt64120/gt_irq.c -
- common IRQ routines for GT-64120 chip. Currently it only handles
- the timer interrupt.
-
-. Board-specific routines are supplied under arch/mips/gt64120/<board> dir.
- 1) arch/mips/gt64120/<board>/pci.c - it provides bus fixup routine
- 2) arch/mips/gt64120/<board>/irq.c - it provides enable/disable irqs
- and board irq setup routine (irq_setup)
- 3) arch/mips/gt64120/<board>/int-handler.S -
- The first-level interrupt dispatching routine.
- 4) a bunch of other "normal" stuff (setup, prom, dbg_io, reset, etc)
-
-. Follow other "normal" procedure to modify configuration files, etc.
-
-
-TO-DO LIST
-----------
-
-. Expand arch/mips/gt64120/gt_irq.c to handle all GT-64120 interrupts.
- We probably need to introduce GT_IRQ_BASE in board-dep header file,
- which is used the starting irq_nr for all GT irqs.
-
- A function, gt64120_handle_irq(), will be added so that the first-level
- irq dispatcher will call this function if it detects an interrupt
- from GT-64120.
-
-. More support for GT-64120 PCI features (2nd PCI bus, perhaps)
-
--
1.5.3
^ permalink raw reply related
* [PATCH 13/17] [MIPS] Malta, Atlas: move an extern function declaration to the header file
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
This was compile-tested using default configs for the boards
affected by this change.
This patch does not introduce any functional changes.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/atlas/atlas_setup.c | 4 ----
arch/mips/mips-boards/malta/malta_setup.c | 4 ----
include/asm-mips/mips-boards/generic.h | 4 ++++
3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c
index 5ce8004..5c50080 100644
--- a/arch/mips/mips-boards/atlas/atlas_setup.c
+++ b/arch/mips/mips-boards/atlas/atlas_setup.c
@@ -34,10 +34,6 @@
#include <asm/time.h>
#include <asm/traps.h>
-#ifdef CONFIG_KGDB
-extern void kgdb_config(void);
-#endif
-
static void __init serial_init(void);
const char *get_system_type(void)
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index 3e2de0b..8dacb6a 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -35,10 +35,6 @@
#include <linux/console.h>
#endif
-#ifdef CONFIG_KGDB
-extern void kgdb_config(void);
-#endif
-
struct resource standard_io_resources[] = {
{
.name = "dma1",
diff --git a/include/asm-mips/mips-boards/generic.h b/include/asm-mips/mips-boards/generic.h
index 2ca6bda..1c39d33 100644
--- a/include/asm-mips/mips-boards/generic.h
+++ b/include/asm-mips/mips-boards/generic.h
@@ -105,4 +105,8 @@ extern void mips_pcibios_init(void);
#define mips_pcibios_init() do { } while (0)
#endif
+#ifdef CONFIG_KGDB
+extern void kgdb_config(void);
+#endif
+
#endif /* __ASM_MIPS_BOARDS_GENERIC_H */
--
1.5.3
^ permalink raw reply related
* [PATCH 14/17] [MIPS] Malta: fix braces at single statement blocks
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
This patch fixes a couple of warnings reported by checkpatch.pl.
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_int.c | 3 ++-
arch/mips/mips-boards/malta/malta_setup.c | 3 +--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 92e6e2d..dbe60eb 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -114,7 +114,8 @@ static void malta_hw0_irqdispatch(void)
irq = get_int();
if (irq < 0) {
- return; /* interrupt has already been cleared */
+ /* interrupt has already been cleared */
+ return;
}
do_IRQ(MALTA_INT_BASE + irq);
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index 8dacb6a..8d62966 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -202,9 +202,8 @@ void __init plat_mem_setup(void)
#endif
}
#ifdef CONFIG_DMA_COHERENT
- else {
+ else
panic("Hardware DMA cache coherency not supported");
- }
#endif
#ifdef CONFIG_BLK_DEV_IDE
--
1.5.3
^ permalink raw reply related
* [PATCH 12/17] [MIPS] Malta: Use C89 style for comments
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
Remove comments in C99 style and make checkpatch.pl happy.
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_int.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 2473a77..92e6e2d 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -214,9 +214,9 @@ static inline unsigned int irq_ffs(unsigned int pending)
t0 = pending & 0x8000;
t0 = t0 < 1;
- //t0 = t0 << 2;
+ /* t0 = t0 << 2; */
a0 = a0 - t0;
- //pending = pending << t0;
+ /* pending = pending << t0; */
return a0;
#endif
--
1.5.3
^ permalink raw reply related
* [PATCH 16/17] [MIPS] Malta: remaining bits of the board support code cleanup
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
This patch factors out the code, which handles the Bonito system
controller. The case of not supporting the DMA coherency is handled
separately to make the logic obvious. Besides, a couple of empty
lines added to beautify the code even further.
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_setup.c | 80 +++++++++++++++--------------
1 files changed, 42 insertions(+), 38 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index 541f4e7..2cd8f57 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -1,6 +1,7 @@
/*
* Carsten Langgaard, carstenl@mips.com
* Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
+ * Copyright (C) Dmitri Vorobiev
*
* 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
@@ -145,6 +146,41 @@ static void __init screen_info_setup(void)
}
#endif
+static void __init bonito_quirks_setup(void)
+{
+ char *argptr;
+
+ argptr = prom_getcmdline();
+ if (strstr(argptr, "debug")) {
+ BONITO_BONGENCFG |= BONITO_BONGENCFG_DEBUGMODE;
+ printk(KERN_INFO "Enabled Bonito debug mode\n");
+ } else
+ BONITO_BONGENCFG &= ~BONITO_BONGENCFG_DEBUGMODE;
+
+#ifdef CONFIG_DMA_COHERENT
+ if (BONITO_PCICACHECTRL & BONITO_PCICACHECTRL_CPUCOH_PRES) {
+ BONITO_PCICACHECTRL |= BONITO_PCICACHECTRL_CPUCOH_EN;
+ printk(KERN_INFO "Enabled Bonito CPU coherency\n");
+
+ argptr = prom_getcmdline();
+ if (strstr(argptr, "iobcuncached")) {
+ BONITO_PCICACHECTRL &= ~BONITO_PCICACHECTRL_IOBCCOH_EN;
+ BONITO_PCIMEMBASECFG = BONITO_PCIMEMBASECFG &
+ ~(BONITO_PCIMEMBASECFG_MEMBASE0_CACHED |
+ BONITO_PCIMEMBASECFG_MEMBASE1_CACHED);
+ printk(KERN_INFO "Disabled Bonito IOBC coherency\n");
+ } else {
+ BONITO_PCICACHECTRL |= BONITO_PCICACHECTRL_IOBCCOH_EN;
+ BONITO_PCIMEMBASECFG |=
+ (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED |
+ BONITO_PCIMEMBASECFG_MEMBASE1_CACHED);
+ printk(KERN_INFO "Enabled Bonito IOBC coherency\n");
+ }
+ } else
+ panic("Hardware DMA cache coherency not supported");
+#endif
+}
+
void __init plat_mem_setup(void)
{
unsigned int i;
@@ -164,54 +200,22 @@ void __init plat_mem_setup(void)
kgdb_config();
#endif
- if (mips_revision_sconid == MIPS_REVISION_SCON_BONITO) {
- char *argptr;
-
- argptr = prom_getcmdline();
- if (strstr(argptr, "debug")) {
- BONITO_BONGENCFG |= BONITO_BONGENCFG_DEBUGMODE;
- printk("Enabled Bonito debug mode\n");
- }
- else
- BONITO_BONGENCFG &= ~BONITO_BONGENCFG_DEBUGMODE;
-
#ifdef CONFIG_DMA_COHERENT
- if (BONITO_PCICACHECTRL & BONITO_PCICACHECTRL_CPUCOH_PRES) {
- BONITO_PCICACHECTRL |= BONITO_PCICACHECTRL_CPUCOH_EN;
- printk("Enabled Bonito CPU coherency\n");
-
- argptr = prom_getcmdline();
- if (strstr(argptr, "iobcuncached")) {
- BONITO_PCICACHECTRL &= ~BONITO_PCICACHECTRL_IOBCCOH_EN;
- BONITO_PCIMEMBASECFG = BONITO_PCIMEMBASECFG &
- ~(BONITO_PCIMEMBASECFG_MEMBASE0_CACHED |
- BONITO_PCIMEMBASECFG_MEMBASE1_CACHED);
- printk("Disabled Bonito IOBC coherency\n");
- }
- else {
- BONITO_PCICACHECTRL |= BONITO_PCICACHECTRL_IOBCCOH_EN;
- BONITO_PCIMEMBASECFG |=
- (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED |
- BONITO_PCIMEMBASECFG_MEMBASE1_CACHED);
- printk("Enabled Bonito IOBC coherency\n");
- }
- }
- else
- panic("Hardware DMA cache coherency not supported");
-
-#endif
- }
-#ifdef CONFIG_DMA_COHERENT
- else
+ if (mips_revision_sconid != MIPS_REVISION_SCON_BONITO)
panic("Hardware DMA cache coherency not supported");
#endif
+ if (mips_revision_sconid == MIPS_REVISION_SCON_BONITO)
+ bonito_quirks_setup();
+
#ifdef CONFIG_BLK_DEV_IDE
pci_clock_check();
#endif
+
#ifdef CONFIG_BLK_DEV_FD
fd_activate();
#endif
+
#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
screen_info_setup();
#endif
--
1.5.3
^ permalink raw reply related
* [PATCH 11/17] [MIPS] Malta: else should follow close brace in malta_int.c
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
This patch fixes two errors reported by checkpatch.pl.
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_int.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index a268912..2473a77 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -329,8 +329,7 @@ void __init arch_init_irq(void)
set_vi_handler(MSC01E_INT_COREHI, corehi_irqdispatch);
setup_irq(MSC01E_INT_BASE+MSC01E_INT_I8259A, &i8259irq);
setup_irq(MSC01E_INT_BASE+MSC01E_INT_COREHI, &corehi_irqaction);
- }
- else if (cpu_has_vint) {
+ } else if (cpu_has_vint) {
set_vi_handler(MIPSCPU_INT_I8259A, malta_hw0_irqdispatch);
set_vi_handler(MIPSCPU_INT_COREHI, corehi_irqdispatch);
#ifdef CONFIG_MIPS_MT_SMTC
@@ -355,8 +354,7 @@ void __init arch_init_irq(void)
setup_irq(MIPS_CPU_IRQ_BASE+MIPSCPU_INT_COREHI,
&corehi_irqaction);
#endif /* CONFIG_MIPS_MT_SMTC */
- }
- else {
+ } else {
setup_irq(MIPS_CPU_IRQ_BASE+MIPSCPU_INT_I8259A, &i8259irq);
setup_irq(MIPS_CPU_IRQ_BASE+MIPSCPU_INT_COREHI,
&corehi_irqaction);
--
1.5.3
^ permalink raw reply related
* [PATCH 15/17] [MIPS] Malta: make the helper function static
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
One helper function can become static. This patch adds the needed
keyword.
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_setup.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index 8d62966..541f4e7 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -80,7 +80,7 @@ const char display_string[] = " LINUX ON MALTA ";
#endif /* CONFIG_MIPS_MT_SMTC */
#ifdef CONFIG_BLK_DEV_FD
-void __init fd_activate(void)
+static void __init fd_activate(void)
{
/*
* Activate Floppy Controller in the SMSC FDC37M817 Super I/O
--
1.5.3
^ permalink raw reply related
* [PATCH 09/17] [MIPS] Malta: include <linux/cpu.h> instead of <asm/cpu.h>
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
The checkpatch.pl script reported a few warnings about header files.
This patch fixes these warnings.
Compile-tested using the default Malta config.
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_int.c | 2 +-
arch/mips/mips-boards/malta/malta_setup.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 1b4b9c5..41eb232 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -26,13 +26,13 @@
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
+#include <linux/io.h>
#include <linux/kernel_stat.h>
#include <linux/kernel.h>
#include <linux/random.h>
#include <asm/i8259.h>
#include <asm/irq_cpu.h>
-#include <asm/io.h>
#include <asm/irq_regs.h>
#include <asm/mips-boards/malta.h>
#include <asm/mips-boards/maltaint.h>
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index e5ac079..3e2de0b 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -15,21 +15,21 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
*/
+#include <linux/cpu.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/ioport.h>
+#include <linux/irq.h>
#include <linux/pci.h>
#include <linux/screen_info.h>
+#include <linux/time.h>
-#include <asm/cpu.h>
#include <asm/bootinfo.h>
-#include <asm/irq.h>
#include <asm/mips-boards/generic.h>
#include <asm/mips-boards/prom.h>
#include <asm/mips-boards/malta.h>
#include <asm/mips-boards/maltaint.h>
#include <asm/dma.h>
-#include <asm/time.h>
#include <asm/traps.h>
#ifdef CONFIG_VT
#include <linux/console.h>
--
1.5.3
^ permalink raw reply related
* [PATCH 10/17] [MIPS] Malta: remove a superfluous comment
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
Using the "We die here" comment right before calling the die()
function is an extremely vivid example of overcommenting.
Remove the redundant comment and save one line.
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_int.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 41eb232..a268912 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -173,7 +173,6 @@ static void corehi_irqdispatch(void)
break;
}
- /* We die here*/
die("CoreHi interrupt", regs);
}
--
1.5.3
^ permalink raw reply related
* [PATCH 05/17] [MIPS] Malta: use tabs not spaces
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
This patch fixes all "use tabs not spaces" warnings reported by
the checkpatch.pl script on the board-specific files.
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_int.c | 64 +++++++++++++++---------------
arch/mips/mips-boards/malta/malta_smtc.c | 4 +-
2 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 2483b40..6d371f4 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -47,7 +47,7 @@ static DEFINE_SPINLOCK(mips_irq_lock);
static inline int mips_pcibios_iack(void)
{
int irq;
- u32 dummy;
+ u32 dummy;
/*
* Determine highest priority pending interrupt by performing
@@ -58,7 +58,7 @@ static inline int mips_pcibios_iack(void)
case MIPS_REVISION_SCON_ROCIT:
case MIPS_REVISION_SCON_SOCITSC:
case MIPS_REVISION_SCON_SOCITSCP:
- MSC_READ(MSC01_PCI_IACK, irq);
+ MSC_READ(MSC01_PCI_IACK, irq);
irq &= 0xff;
break;
case MIPS_REVISION_SCON_GT64120:
@@ -123,15 +123,15 @@ static void malta_hw0_irqdispatch(void)
static void corehi_irqdispatch(void)
{
unsigned int intedge, intsteer, pcicmd, pcibadaddr;
- unsigned int pcimstat, intisr, inten, intpol;
+ unsigned int pcimstat, intisr, inten, intpol;
unsigned int intrcause, datalo, datahi;
struct pt_regs *regs = get_irq_regs();
printk(KERN_EMERG "CoreHI interrupt, shouldn't happen, we die here!\n");
printk(KERN_EMERG "epc : %08lx\nStatus: %08lx\n"
- "Cause : %08lx\nbadVaddr : %08lx\n",
- regs->cp0_epc, regs->cp0_status,
- regs->cp0_cause, regs->cp0_badvaddr);
+ "Cause : %08lx\nbadVaddr : %08lx\n",
+ regs->cp0_epc, regs->cp0_status,
+ regs->cp0_cause, regs->cp0_badvaddr);
/* Read all the registers and then print them as there is a
problem with interspersed printk's upsetting the Bonito controller.
@@ -139,29 +139,29 @@ static void corehi_irqdispatch(void)
*/
switch (mips_revision_sconid) {
- case MIPS_REVISION_SCON_SOCIT:
+ case MIPS_REVISION_SCON_SOCIT:
case MIPS_REVISION_SCON_ROCIT:
case MIPS_REVISION_SCON_SOCITSC:
case MIPS_REVISION_SCON_SOCITSCP:
- ll_msc_irq();
- break;
- case MIPS_REVISION_SCON_GT64120:
- intrcause = GT_READ(GT_INTRCAUSE_OFS);
- datalo = GT_READ(GT_CPUERR_ADDRLO_OFS);
- datahi = GT_READ(GT_CPUERR_ADDRHI_OFS);
+ ll_msc_irq();
+ break;
+ case MIPS_REVISION_SCON_GT64120:
+ intrcause = GT_READ(GT_INTRCAUSE_OFS);
+ datalo = GT_READ(GT_CPUERR_ADDRLO_OFS);
+ datahi = GT_READ(GT_CPUERR_ADDRHI_OFS);
printk(KERN_EMERG "GT_INTRCAUSE = %08x\n", intrcause);
printk(KERN_EMERG "GT_CPUERR_ADDR = %02x%08x\n",
datahi, datalo);
- break;
- case MIPS_REVISION_SCON_BONITO:
- pcibadaddr = BONITO_PCIBADADDR;
- pcimstat = BONITO_PCIMSTAT;
- intisr = BONITO_INTISR;
- inten = BONITO_INTEN;
- intpol = BONITO_INTPOL;
- intedge = BONITO_INTEDGE;
- intsteer = BONITO_INTSTEER;
- pcicmd = BONITO_PCICMD;
+ break;
+ case MIPS_REVISION_SCON_BONITO:
+ pcibadaddr = BONITO_PCIBADADDR;
+ pcimstat = BONITO_PCIMSTAT;
+ intisr = BONITO_INTISR;
+ inten = BONITO_INTEN;
+ intpol = BONITO_INTPOL;
+ intedge = BONITO_INTEDGE;
+ intsteer = BONITO_INTSTEER;
+ pcicmd = BONITO_PCICMD;
printk(KERN_EMERG "BONITO_INTISR = %08x\n", intisr);
printk(KERN_EMERG "BONITO_INTEN = %08x\n", inten);
printk(KERN_EMERG "BONITO_INTPOL = %08x\n", intpol);
@@ -170,11 +170,11 @@ static void corehi_irqdispatch(void)
printk(KERN_EMERG "BONITO_PCICMD = %08x\n", pcicmd);
printk(KERN_EMERG "BONITO_PCIBADADDR = %08x\n", pcibadaddr);
printk(KERN_EMERG "BONITO_PCIMSTAT = %08x\n", pcimstat);
- break;
- }
+ break;
+ }
- /* We die here*/
- die("CoreHi interrupt", regs);
+ /* We die here*/
+ die("CoreHi interrupt", regs);
}
static inline int clz(unsigned long x)
@@ -300,17 +300,17 @@ void __init arch_init_irq(void)
if (!cpu_has_veic)
mips_cpu_irq_init();
- switch(mips_revision_sconid) {
- case MIPS_REVISION_SCON_SOCIT:
- case MIPS_REVISION_SCON_ROCIT:
+ switch (mips_revision_sconid) {
+ case MIPS_REVISION_SCON_SOCIT:
+ case MIPS_REVISION_SCON_ROCIT:
if (cpu_has_veic)
init_msc_irqs(MIPS_MSC01_IC_REG_BASE, MSC01E_INT_BASE, msc_eicirqmap, msc_nr_eicirqs);
else
init_msc_irqs(MIPS_MSC01_IC_REG_BASE, MSC01C_INT_BASE, msc_irqmap, msc_nr_irqs);
break;
- case MIPS_REVISION_SCON_SOCITSC:
- case MIPS_REVISION_SCON_SOCITSCP:
+ case MIPS_REVISION_SCON_SOCITSC:
+ case MIPS_REVISION_SCON_SOCITSCP:
if (cpu_has_veic)
init_msc_irqs(MIPS_SOCITSC_IC_REG_BASE, MSC01E_INT_BASE, msc_eicirqmap, msc_nr_eicirqs);
else
diff --git a/arch/mips/mips-boards/malta/malta_smtc.c b/arch/mips/mips-boards/malta/malta_smtc.c
index 5c980f4..0a1a40a 100644
--- a/arch/mips/mips-boards/malta/malta_smtc.c
+++ b/arch/mips/mips-boards/malta/malta_smtc.c
@@ -36,7 +36,7 @@ void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle)
void __cpuinit prom_init_secondary(void)
{
- void smtc_init_secondary(void);
+ void smtc_init_secondary(void);
int myvpe;
/* Don't enable Malta I/O interrupts (IP2) for secondary VPEs */
@@ -50,7 +50,7 @@ void __cpuinit prom_init_secondary(void)
set_c0_status(0x100 << cp0_perfcount_irq);
}
- smtc_init_secondary();
+ smtc_init_secondary();
}
/*
--
1.5.3
^ permalink raw reply related
* [PATCH 08/17] [MIPS] Malta, Atlas, Sead: remove an extern from .c files
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
This patch moves the "extern" declaration for the function
mips_reboot_setup() from the board setup .c files to the
header file include/asm-mips/mips-boards/generic.h.
This fixes a warning produced by the checkpatch.pl script.
No functional changes introduced.
This was compile-tested by building the kernel for all
three boards affected by this change. All builds finished
successfully.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/atlas/atlas_setup.c | 2 --
arch/mips/mips-boards/malta/malta_setup.c | 2 --
arch/mips/mips-boards/sead/sead_setup.c | 2 --
include/asm-mips/mips-boards/generic.h | 2 ++
4 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c
index e405d11..5ce8004 100644
--- a/arch/mips/mips-boards/atlas/atlas_setup.c
+++ b/arch/mips/mips-boards/atlas/atlas_setup.c
@@ -34,8 +34,6 @@
#include <asm/time.h>
#include <asm/traps.h>
-extern void mips_reboot_setup(void);
-
#ifdef CONFIG_KGDB
extern void kgdb_config(void);
#endif
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index 480521f..e5ac079 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -35,8 +35,6 @@
#include <linux/console.h>
#endif
-extern void mips_reboot_setup(void);
-
#ifdef CONFIG_KGDB
extern void kgdb_config(void);
#endif
diff --git a/arch/mips/mips-boards/sead/sead_setup.c b/arch/mips/mips-boards/sead/sead_setup.c
index 1fb61b8..8aa8e5b 100644
--- a/arch/mips/mips-boards/sead/sead_setup.c
+++ b/arch/mips/mips-boards/sead/sead_setup.c
@@ -34,8 +34,6 @@
#include <asm/mips-boards/seadint.h>
#include <asm/time.h>
-extern void mips_reboot_setup(void);
-
static void __init serial_init(void);
const char *get_system_type(void)
diff --git a/include/asm-mips/mips-boards/generic.h b/include/asm-mips/mips-boards/generic.h
index d589774..2ca6bda 100644
--- a/include/asm-mips/mips-boards/generic.h
+++ b/include/asm-mips/mips-boards/generic.h
@@ -97,6 +97,8 @@ extern int mips_revision_corid;
extern int mips_revision_sconid;
+extern void mips_reboot_setup(void);
+
#ifdef CONFIG_PCI
extern void mips_pcibios_init(void);
#else
--
1.5.3
^ permalink raw reply related
* [PATCH 07/17] [MIPS] Malta: fix oversized lines in malta_int.c
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
This patch fixes all "line over 80 characters" warnings found
in arch/mips/mips-boards/malta/malta_int.c by the checkpatch.pl
script.
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_int.c | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 6d371f4..1b4b9c5 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -304,17 +304,25 @@ void __init arch_init_irq(void)
case MIPS_REVISION_SCON_SOCIT:
case MIPS_REVISION_SCON_ROCIT:
if (cpu_has_veic)
- init_msc_irqs(MIPS_MSC01_IC_REG_BASE, MSC01E_INT_BASE, msc_eicirqmap, msc_nr_eicirqs);
+ init_msc_irqs(MIPS_MSC01_IC_REG_BASE,
+ MSC01E_INT_BASE, msc_eicirqmap,
+ msc_nr_eicirqs);
else
- init_msc_irqs(MIPS_MSC01_IC_REG_BASE, MSC01C_INT_BASE, msc_irqmap, msc_nr_irqs);
+ init_msc_irqs(MIPS_MSC01_IC_REG_BASE,
+ MSC01C_INT_BASE, msc_irqmap,
+ msc_nr_irqs);
break;
case MIPS_REVISION_SCON_SOCITSC:
case MIPS_REVISION_SCON_SOCITSCP:
if (cpu_has_veic)
- init_msc_irqs(MIPS_SOCITSC_IC_REG_BASE, MSC01E_INT_BASE, msc_eicirqmap, msc_nr_eicirqs);
+ init_msc_irqs(MIPS_SOCITSC_IC_REG_BASE,
+ MSC01E_INT_BASE, msc_eicirqmap,
+ msc_nr_eicirqs);
else
- init_msc_irqs(MIPS_SOCITSC_IC_REG_BASE, MSC01C_INT_BASE, msc_irqmap, msc_nr_irqs);
+ init_msc_irqs(MIPS_SOCITSC_IC_REG_BASE,
+ MSC01C_INT_BASE, msc_irqmap,
+ msc_nr_irqs);
}
if (cpu_has_veic) {
@@ -345,11 +353,13 @@ void __init arch_init_irq(void)
}
#else /* Not SMTC */
setup_irq(MIPS_CPU_IRQ_BASE+MIPSCPU_INT_I8259A, &i8259irq);
- setup_irq(MIPS_CPU_IRQ_BASE+MIPSCPU_INT_COREHI, &corehi_irqaction);
+ setup_irq(MIPS_CPU_IRQ_BASE+MIPSCPU_INT_COREHI,
+ &corehi_irqaction);
#endif /* CONFIG_MIPS_MT_SMTC */
}
else {
setup_irq(MIPS_CPU_IRQ_BASE+MIPSCPU_INT_I8259A, &i8259irq);
- setup_irq(MIPS_CPU_IRQ_BASE+MIPSCPU_INT_COREHI, &corehi_irqaction);
+ setup_irq(MIPS_CPU_IRQ_BASE+MIPSCPU_INT_COREHI,
+ &corehi_irqaction);
}
}
--
1.5.3
^ permalink raw reply related
* [PATCH 06/17] [MIPS] Malta: remove a dead function declaration
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
Neither is the mips_rtc_get_time() routine defined anywhere in
the MIPS architecture-specific code, nor does anyone call it any
more. This patch removes the extern declaration of this fossil.
This patch does not introduce any functional changes.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_setup.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index 8b391ee..480521f 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -36,7 +36,6 @@
#endif
extern void mips_reboot_setup(void);
-extern unsigned long mips_rtc_get_time(void);
#ifdef CONFIG_KGDB
extern void kgdb_config(void);
--
1.5.3
^ permalink raw reply related
* [PATCH 04/17] [MIPS] Malta: set up the screen info in a separate function
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
This patch adds a separate short and sweet function to initialize
the screen_info global variable.
This improves readability of the Malta board setup code.
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_setup.c | 39 ++++++++++++++++------------
1 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index 79d74ea..8b391ee 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -132,6 +132,26 @@ static void __init pci_clock_check(void)
}
#endif
+#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
+static void __init screen_info_setup(void)
+{
+ screen_info = (struct screen_info) {
+ .orig_x = 0,
+ .orig_y = 25,
+ .ext_mem_k = 0,
+ .orig_video_page = 0,
+ .orig_video_mode = 0,
+ .orig_video_cols = 80,
+ .unused2 = 0,
+ .orig_video_ega_bx = 0,
+ .unused3 = 0,
+ .orig_video_lines = 25,
+ .orig_video_isVGA = VIDEO_TYPE_VGAC,
+ .orig_video_points = 16
+ };
+}
+#endif
+
void __init plat_mem_setup(void)
{
unsigned int i;
@@ -200,23 +220,8 @@ void __init plat_mem_setup(void)
#ifdef CONFIG_BLK_DEV_FD
fd_activate();
#endif
-#ifdef CONFIG_VT
-#if defined(CONFIG_VGA_CONSOLE)
- screen_info = (struct screen_info) {
- .orig_x = 0,
- .orig_y = 25,
- .ext_mem_k = 0,
- .orig_video_page = 0,
- .orig_video_mode = 0,
- .orig_video_cols = 80,
- .unused2 = 0,
- .orig_video_ega_bx = 0,
- .unused3 = 0,
- .orig_video_lines = 25,
- .orig_video_isVGA = VIDEO_TYPE_VGAC,
- .orig_video_points = 16
- };
-#endif
+#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
+ screen_info_setup();
#endif
mips_reboot_setup();
}
--
1.5.3
^ permalink raw reply related
* [PATCH 03/17] [MIPS] Malta: check the PCI clock frequency in a separate function
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
This patch adds a separate short and sweet function to check the
PCI clock frequency. This is to improve readability of the Malta
setup code.
Along the way, a couple of coding style violations are fixed.
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_setup.c | 43 +++++++++++++++++------------
1 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index d051405..79d74ea 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -108,6 +108,30 @@ void __init fd_activate(void)
}
#endif
+#ifdef CONFIG_BLK_DEV_IDE
+static void __init pci_clock_check(void)
+{
+ unsigned int __iomem *jmpr_p =
+ (unsigned int *) ioremap(MALTA_JMPRS_REG, sizeof(unsigned int));
+ int jmpr = (__raw_readl(jmpr_p) >> 2) & 0x07;
+ static const int pciclocks[] __initdata = {
+ 33, 20, 25, 30, 12, 16, 37, 10
+ };
+ int pciclock = pciclocks[jmpr];
+ char *argptr = prom_getcmdline();
+
+ if (pciclock != 33 && !strstr(argptr, "idebus=")) {
+ printk(KERN_WARNING "WARNING: PCI clock is %dMHz, "
+ "setting idebus\n", pciclock);
+ argptr += strlen(argptr);
+ sprintf(argptr, " idebus=%d", pciclock);
+ if (pciclock < 20 || pciclock > 66)
+ printk(KERN_WARNING "WARNING: IDE timing "
+ "calculations will be incorrect\n");
+ }
+}
+#endif
+
void __init plat_mem_setup(void)
{
unsigned int i;
@@ -171,24 +195,7 @@ void __init plat_mem_setup(void)
#endif
#ifdef CONFIG_BLK_DEV_IDE
- /* Check PCI clock */
- {
- unsigned int __iomem *jmpr_p = (unsigned int *) ioremap(MALTA_JMPRS_REG, sizeof(unsigned int));
- int jmpr = (__raw_readl(jmpr_p) >> 2) & 0x07;
- static const int pciclocks[] __initdata = {
- 33, 20, 25, 30, 12, 16, 37, 10
- };
- int pciclock = pciclocks[jmpr];
- char *argptr = prom_getcmdline();
-
- if (pciclock != 33 && !strstr (argptr, "idebus=")) {
- printk("WARNING: PCI clock is %dMHz, setting idebus\n", pciclock);
- argptr += strlen(argptr);
- sprintf(argptr, " idebus=%d", pciclock);
- if (pciclock < 20 || pciclock > 66)
- printk("WARNING: IDE timing calculations will be incorrect\n");
- }
- }
+ pci_clock_check();
#endif
#ifdef CONFIG_BLK_DEV_FD
fd_activate();
--
1.5.3
^ permalink raw reply related
* [PATCH 02/17] [MIPS] Malta: use the KERN_ facility level in printk()
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
This patch adds the KERN_ macros to printk() calls. Where applicable,
spaces are replaced by tabs.
These changes noticeably reduce the number of errors and warnings
reported by the checkpatch.pl script for the malta_int.c file.
Before the patch: total: 47 errors, 20 warnings, 354 lines checked
After the patch: total: 34 errors, 7 warnings, 355 lines checked
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_int.c | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index f010261..2483b40 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -83,7 +83,7 @@ static inline int mips_pcibios_iack(void)
BONITO_PCIMAP_CFG = 0;
break;
default:
- printk("Unknown system controller.\n");
+ printk(KERN_WARNING "Unknown system controller.\n");
return -1;
}
return irq;
@@ -127,8 +127,8 @@ static void corehi_irqdispatch(void)
unsigned int intrcause, datalo, datahi;
struct pt_regs *regs = get_irq_regs();
- printk("CoreHI interrupt, shouldn't happen, so we die here!!!\n");
- printk("epc : %08lx\nStatus: %08lx\n"
+ printk(KERN_EMERG "CoreHI interrupt, shouldn't happen, we die here!\n");
+ printk(KERN_EMERG "epc : %08lx\nStatus: %08lx\n"
"Cause : %08lx\nbadVaddr : %08lx\n",
regs->cp0_epc, regs->cp0_status,
regs->cp0_cause, regs->cp0_badvaddr);
@@ -149,8 +149,9 @@ static void corehi_irqdispatch(void)
intrcause = GT_READ(GT_INTRCAUSE_OFS);
datalo = GT_READ(GT_CPUERR_ADDRLO_OFS);
datahi = GT_READ(GT_CPUERR_ADDRHI_OFS);
- printk("GT_INTRCAUSE = %08x\n", intrcause);
- printk("GT_CPUERR_ADDR = %02x%08x\n", datahi, datalo);
+ printk(KERN_EMERG "GT_INTRCAUSE = %08x\n", intrcause);
+ printk(KERN_EMERG "GT_CPUERR_ADDR = %02x%08x\n",
+ datahi, datalo);
break;
case MIPS_REVISION_SCON_BONITO:
pcibadaddr = BONITO_PCIBADADDR;
@@ -161,14 +162,14 @@ static void corehi_irqdispatch(void)
intedge = BONITO_INTEDGE;
intsteer = BONITO_INTSTEER;
pcicmd = BONITO_PCICMD;
- printk("BONITO_INTISR = %08x\n", intisr);
- printk("BONITO_INTEN = %08x\n", inten);
- printk("BONITO_INTPOL = %08x\n", intpol);
- printk("BONITO_INTEDGE = %08x\n", intedge);
- printk("BONITO_INTSTEER = %08x\n", intsteer);
- printk("BONITO_PCICMD = %08x\n", pcicmd);
- printk("BONITO_PCIBADADDR = %08x\n", pcibadaddr);
- printk("BONITO_PCIMSTAT = %08x\n", pcimstat);
+ printk(KERN_EMERG "BONITO_INTISR = %08x\n", intisr);
+ printk(KERN_EMERG "BONITO_INTEN = %08x\n", inten);
+ printk(KERN_EMERG "BONITO_INTPOL = %08x\n", intpol);
+ printk(KERN_EMERG "BONITO_INTEDGE = %08x\n", intedge);
+ printk(KERN_EMERG "BONITO_INTSTEER = %08x\n", intsteer);
+ printk(KERN_EMERG "BONITO_PCICMD = %08x\n", pcicmd);
+ printk(KERN_EMERG "BONITO_PCIBADADDR = %08x\n", pcibadaddr);
+ printk(KERN_EMERG "BONITO_PCIMSTAT = %08x\n", pcimstat);
break;
}
--
1.5.3
^ permalink raw reply related
* [PATCH 00/17] [MIPS] Malta: massive code cleanup
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
Ralf,
This is the Malta cleanup, which I was talking about some time ago.
The patches should be fairly obvious. They make no functional
changes.
Build tests passed successfully when I used the default configs
for Atlas, Malta and SEAD.
Just in case, I also ran boot tests, which passed successfully with
the default Malta config and a Qemu-emulated Malta board in both BE
and LE modes.
The net effect is that the number of errors, warnings, and checks
reported by checkpatch.pl changes as follows:
Before:
--------------------------------------------
| errors | warnings | checks
--------------------------------------------
malta_int.c | 47 | 20 | 1
--------------------------------------------
malta_setup.c | 3 | 21 | 3
--------------------------------------------
malta_smtc.c | 2 | 0 | 0
--------------------------------------------
After:
--------------------------------------------
| errors | warnings | checks
--------------------------------------------
malta_int.c | 0 | 0 | 0
--------------------------------------------
malta_setup.c | 0 | 0 | 0
--------------------------------------------
malta_smtc.c | 0 | 0 | 0
--------------------------------------------
The last patch in the series removes a very obsolete and misleading
document from Documentation/mips.
Please consider.
Thanks,
Dmitri
^ permalink raw reply
* [PATCH 01/17] [MIPS] Malta: use Linux kernel style for structure initialization
From: Dmitri Vorobiev @ 2008-01-24 16:52 UTC (permalink / raw)
To: ralf, linux-mips, linux-kernel
In-Reply-To: <1201193577-4261-1-git-send-email-dmitri.vorobiev@gmail.com>
This patch reformats the structure initialization code thus
making the latter look idiomatic.
No functional changes introduced.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_setup.c | 56 +++++++++++++++++++++-------
1 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index bc43a5c..d051405 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -43,11 +43,36 @@ extern void kgdb_config(void);
#endif
struct resource standard_io_resources[] = {
- { .name = "dma1", .start = 0x00, .end = 0x1f, .flags = IORESOURCE_BUSY },
- { .name = "timer", .start = 0x40, .end = 0x5f, .flags = IORESOURCE_BUSY },
- { .name = "keyboard", .start = 0x60, .end = 0x6f, .flags = IORESOURCE_BUSY },
- { .name = "dma page reg", .start = 0x80, .end = 0x8f, .flags = IORESOURCE_BUSY },
- { .name = "dma2", .start = 0xc0, .end = 0xdf, .flags = IORESOURCE_BUSY },
+ {
+ .name = "dma1",
+ .start = 0x00,
+ .end = 0x1f,
+ .flags = IORESOURCE_BUSY
+ },
+ {
+ .name = "timer",
+ .start = 0x40,
+ .end = 0x5f,
+ .flags = IORESOURCE_BUSY
+ },
+ {
+ .name = "keyboard",
+ .start = 0x60,
+ .end = 0x6f,
+ .flags = IORESOURCE_BUSY
+ },
+ {
+ .name = "dma page reg",
+ .start = 0x80,
+ .end = 0x8f,
+ .flags = IORESOURCE_BUSY
+ },
+ {
+ .name = "dma2",
+ .start = 0xc0,
+ .end = 0xdf,
+ .flags = IORESOURCE_BUSY
+ },
};
const char *get_system_type(void)
@@ -171,15 +196,18 @@ void __init plat_mem_setup(void)
#ifdef CONFIG_VT
#if defined(CONFIG_VGA_CONSOLE)
screen_info = (struct screen_info) {
- 0, 25, /* orig-x, orig-y */
- 0, /* unused */
- 0, /* orig-video-page */
- 0, /* orig-video-mode */
- 80, /* orig-video-cols */
- 0, 0, 0, /* ega_ax, ega_bx, ega_cx */
- 25, /* orig-video-lines */
- VIDEO_TYPE_VGAC, /* orig-video-isVGA */
- 16 /* orig-video-points */
+ .orig_x = 0,
+ .orig_y = 25,
+ .ext_mem_k = 0,
+ .orig_video_page = 0,
+ .orig_video_mode = 0,
+ .orig_video_cols = 80,
+ .unused2 = 0,
+ .orig_video_ega_bx = 0,
+ .unused3 = 0,
+ .orig_video_lines = 25,
+ .orig_video_isVGA = VIDEO_TYPE_VGAC,
+ .orig_video_points = 16
};
#endif
#endif
--
1.5.3
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox