aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mti-malta/malta-init.c
diff options
context:
space:
mode:
authorSteven J. Hill <Steven.Hill@imgtec.com>2013-03-25 16:05:40 -0400
committerRalf Baechle <ralf@linux-mips.org>2013-05-08 06:30:10 -0400
commit49bffbdc88fdd8f5eac40306a617252625a0fa35 (patch)
treecc08116bbf4f742f0f8f2d4381182c13586bc187 /arch/mips/mti-malta/malta-init.c
parent270690e00cdb034cd945ab597c24e6aff0227f77 (diff)
MIPS: FW: malta: Code formatting clean-ups.
Clean-up code according to the 'checkpatch.pl' script. Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Diffstat (limited to 'arch/mips/mti-malta/malta-init.c')
-rw-r--r--arch/mips/mti-malta/malta-init.c58
1 files changed, 25 insertions, 33 deletions
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
index 71d753a6c97d..ff8caffd3266 100644
--- a/arch/mips/mti-malta/malta-init.c
+++ b/arch/mips/mti-malta/malta-init.c
@@ -1,43 +1,28 @@
1/* 1/*
2 * Copyright (C) 1999, 2000, 2004, 2005 MIPS Technologies, Inc. 2 * This file is subject to the terms and conditions of the GNU General Public
3 * All rights reserved. 3 * License. See the file "COPYING" in the main directory of this archive
4 * Authors: Carsten Langgaard <carstenl@mips.com> 4 * for more details.
5 * Maciej W. Rozycki <macro@mips.com>
6 *
7 * This program is free software; you can distribute it and/or modify it
8 * under the terms of the GNU General Public License (Version 2) as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
19 * 5 *
20 * PROM library initialisation code. 6 * PROM library initialisation code.
7 *
8 * Copyright (C) 1999,2000,2004,2005,2012 MIPS Technologies, Inc.
9 * All rights reserved.
10 * Authors: Carsten Langgaard <carstenl@mips.com>
11 * Maciej W. Rozycki <macro@mips.com>
12 * Steven J. Hill <sjhill@mips.com>
21 */ 13 */
22#include <linux/init.h> 14#include <linux/init.h>
23#include <linux/string.h> 15#include <linux/string.h>
24#include <linux/kernel.h> 16#include <linux/kernel.h>
25 17
26#include <asm/gt64120.h>
27#include <asm/io.h>
28#include <asm/cacheflush.h> 18#include <asm/cacheflush.h>
29#include <asm/smp-ops.h> 19#include <asm/smp-ops.h>
30#include <asm/traps.h> 20#include <asm/traps.h>
31#include <asm/fw/fw.h> 21#include <asm/fw/fw.h>
32#include <asm/gcmpregs.h> 22#include <asm/gcmpregs.h>
33#include <asm/mips-boards/generic.h> 23#include <asm/mips-boards/generic.h>
34#include <asm/mips-boards/bonito64.h>
35#include <asm/mips-boards/msc01_pci.h>
36
37#include <asm/mips-boards/malta.h> 24#include <asm/mips-boards/malta.h>
38 25
39int init_debug;
40
41static int mips_revision_corid; 26static int mips_revision_corid;
42int mips_revision_sconid; 27int mips_revision_sconid;
43 28
@@ -64,12 +49,18 @@ static void __init console_config(void)
64 if (s) { 49 if (s) {
65 while (*s >= '0' && *s <= '9') 50 while (*s >= '0' && *s <= '9')
66 baud = baud*10 + *s++ - '0'; 51 baud = baud*10 + *s++ - '0';
67 if (*s == ',') s++; 52 if (*s == ',')
68 if (*s) parity = *s++; 53 s++;
69 if (*s == ',') s++; 54 if (*s)
70 if (*s) bits = *s++; 55 parity = *s++;
71 if (*s == ',') s++; 56 if (*s == ',')
72 if (*s == 'h') flow = 'r'; 57 s++;
58 if (*s)
59 bits = *s++;
60 if (*s == ',')
61 s++;
62 if (*s == 'h')
63 flow = 'r';
73 } 64 }
74 if (baud == 0) 65 if (baud == 0)
75 baud = 38400; 66 baud = 38400;
@@ -79,7 +70,8 @@ static void __init console_config(void)
79 bits = '8'; 70 bits = '8';
80 if (flow == '\0') 71 if (flow == '\0')
81 flow = 'r'; 72 flow = 'r';
82 sprintf(console_string, " console=ttyS0,%d%c%c%c", baud, parity, bits, flow); 73 sprintf(console_string, " console=ttyS0,%d%c%c%c", baud,
74 parity, bits, flow);
83 strcat(fw_getcmdline(), console_string); 75 strcat(fw_getcmdline(), console_string);
84 pr_info("Config serial console:%s\n", console_string); 76 pr_info("Config serial console:%s\n", console_string);
85 } 77 }
@@ -223,7 +215,7 @@ void __init prom_init(void)
223 case MIPS_REVISION_SCON_SOCIT: 215 case MIPS_REVISION_SCON_SOCIT:
224 case MIPS_REVISION_SCON_ROCIT: 216 case MIPS_REVISION_SCON_ROCIT:
225 _pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000); 217 _pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000);
226 mips_pci_controller: 218mips_pci_controller:
227 mb(); 219 mb();
228 MSC_READ(MSC01_PCI_CFG, data); 220 MSC_READ(MSC01_PCI_CFG, data);
229 MSC_WRITE(MSC01_PCI_CFG, data & ~MSC01_PCI_CFG_EN_BIT); 221 MSC_WRITE(MSC01_PCI_CFG, data & ~MSC01_PCI_CFG_EN_BIT);
@@ -265,7 +257,7 @@ void __init prom_init(void)
265 default: 257 default:
266 /* Unknown system controller */ 258 /* Unknown system controller */
267 mips_display_message("SC Error"); 259 mips_display_message("SC Error");
268 while (1); /* We die here... */ 260 while (1); /* We die here... */
269 } 261 }
270 board_nmi_handler_setup = mips_nmi_setup; 262 board_nmi_handler_setup = mips_nmi_setup;
271 board_ejtag_handler_setup = mips_ejtag_setup; 263 board_ejtag_handler_setup = mips_ejtag_setup;