* [PATCH 01/35] MIPS: Add environment variable processing code to firmware library.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 02/35] MIPS: Alchemy: Cleanup firmware support for Alchemy platforms Steven J. Hill
` (35 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/fw/lib/Makefile | 2 +
arch/mips/fw/lib/cmdline.c | 86 +++++++++++++++++++++++++++++++++++++++++
arch/mips/include/asm/fw/fw.h | 47 ++++++++++++++++++++++
3 files changed, 135 insertions(+)
create mode 100644 arch/mips/fw/lib/cmdline.c
create mode 100644 arch/mips/include/asm/fw/fw.h
diff --git a/arch/mips/fw/lib/Makefile b/arch/mips/fw/lib/Makefile
index 84befc9..5291505 100644
--- a/arch/mips/fw/lib/Makefile
+++ b/arch/mips/fw/lib/Makefile
@@ -2,4 +2,6 @@
# Makefile for generic prom monitor library routines under Linux.
#
+lib-y += cmdline.o
+
lib-$(CONFIG_64BIT) += call_o32.o
diff --git a/arch/mips/fw/lib/cmdline.c b/arch/mips/fw/lib/cmdline.c
new file mode 100644
index 0000000..b05b8130
--- /dev/null
+++ b/arch/mips/fw/lib/cmdline.c
@@ -0,0 +1,86 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
+ */
+#include <linux/kernel.h>
+#include <asm/fw/fw.h>
+
+int fw_argc;
+int *_fw_argv;
+int *_fw_envp;
+
+void __init fw_init_cmdline(void)
+{
+ int i;
+
+ fw_argc = (fw_arg0 & 0x0000ffff);
+ _fw_argv = (int *)fw_arg1;
+ _fw_envp = (int *)fw_arg2;
+
+ for (i = 1; i < fw_argc; i++) {
+ strlcat(arcs_cmdline, fw_argv(i), COMMAND_LINE_SIZE);
+ if (i < (fw_argc - 1))
+ strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
+ }
+}
+
+char * __init fw_getcmdline(void)
+{
+ return &(arcs_cmdline[0]);
+}
+
+char *fw_getenv(char *envname)
+{
+ char *result = NULL;
+
+ if (_fw_envp != NULL) {
+ /*
+ * Return a pointer to the given environment variable.
+ * YAMON uses "name", "value" pairs, while U-Boot uses
+ * "name=value".
+ */
+ int i, yamon, index = 0;
+
+ yamon = (strchr(fw_envp(index), '=') == NULL);
+ i = strlen(envname);
+
+ while (fw_envp(index)) {
+ if (strncmp(envname, fw_envp(index), i) == 0) {
+ if (yamon) {
+ result = fw_envp(index + 1);
+ break;
+ } else if (fw_envp(index)[i] == '=') {
+ result = (fw_envp(index + 1) + i);
+ break;
+ }
+ }
+
+ /* Increment array index. */
+ if (yamon)
+ index += 2;
+ else
+ index += 1;
+ }
+ }
+
+ return result;
+}
+
+unsigned long fw_getenvl(char *envname)
+{
+ unsigned long envl = 0UL;
+ char *str;
+ long val;
+ int tmp;
+
+ str = fw_getenv(envname);
+ if (str) {
+ tmp = kstrtol(str, 0, &val);
+ envl = (unsigned long)val;
+ }
+
+ return envl;
+}
diff --git a/arch/mips/include/asm/fw/fw.h b/arch/mips/include/asm/fw/fw.h
new file mode 100644
index 0000000..d6c50a7
--- /dev/null
+++ b/arch/mips/include/asm/fw/fw.h
@@ -0,0 +1,47 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2012 MIPS Technologies, Inc.
+ */
+#ifndef __ASM_FW_H_
+#define __ASM_FW_H_
+
+#include <asm/bootinfo.h> /* For cleaner code... */
+
+enum fw_memtypes {
+ fw_dontuse,
+ fw_code,
+ fw_free,
+};
+
+typedef struct {
+ unsigned long base; /* Within KSEG0 */
+ unsigned int size; /* bytes */
+ enum fw_memtypes type; /* fw_memtypes */
+} fw_memblock_t;
+
+/* Maximum number of memory block descriptors. */
+#define FW_MAX_MEMBLOCKS 32
+
+extern int fw_argc;
+extern int *_fw_argv;
+extern int *_fw_envp;
+
+/*
+ * Most firmware like YAMON, PMON, etc. pass arguments and environment
+ * variables as 32-bit pointers. These take care of sign extension.
+ */
+#define fw_argv(index) ((char *)(long)_fw_argv[(index)])
+#define fw_envp(index) ((char *)(long)_fw_envp[(index)])
+
+extern void fw_init_cmdline(void);
+extern char *fw_getcmdline(void);
+extern fw_memblock_t *fw_getmdesc(void);
+extern void fw_meminit(void);
+extern char *fw_getenv(char *name);
+extern unsigned long fw_getenvl(char *name);
+extern void fw_init_early_console(char port);
+
+#endif /* __ASM_FW_H_ */
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 02/35] MIPS: Alchemy: Cleanup firmware support for Alchemy platforms.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
2012-06-05 21:19 ` [PATCH 01/35] MIPS: Add environment variable processing code to firmware library Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 03/35] MIPS: Alchemy: Cleanup files effected by firmware changes Steven J. Hill
` (34 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/alchemy/board-gpr.c | 22 +++++--------
arch/mips/alchemy/board-mtx1.c | 22 +++++--------
arch/mips/alchemy/board-xxs1500.c | 21 +++++-------
arch/mips/alchemy/common/platform.c | 3 +-
arch/mips/alchemy/common/prom.c | 42 ++----------------------
arch/mips/alchemy/devboards/db1000.c | 1 -
arch/mips/alchemy/devboards/db1300.c | 1 -
arch/mips/alchemy/devboards/db1550.c | 1 -
arch/mips/alchemy/devboards/pb1100.c | 1 -
arch/mips/alchemy/devboards/pb1500.c | 1 -
arch/mips/alchemy/devboards/prom.c | 19 ++++-------
arch/mips/include/asm/mach-au1x00/au1xxx_eth.h | 1 +
arch/mips/include/asm/mach-au1x00/prom.h | 12 -------
drivers/net/ethernet/amd/au1000_eth.c | 1 -
14 files changed, 35 insertions(+), 113 deletions(-)
delete mode 100644 arch/mips/include/asm/mach-au1x00/prom.h
diff --git a/arch/mips/alchemy/board-gpr.c b/arch/mips/alchemy/board-gpr.c
index ba32590..1139173 100644
--- a/arch/mips/alchemy/board-gpr.c
+++ b/arch/mips/alchemy/board-gpr.c
@@ -30,10 +30,10 @@
#include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/i2c-gpio.h>
-#include <asm/bootinfo.h>
+
#include <asm/reboot.h>
+#include <asm/fw/fw.h>
#include <asm/mach-au1x00/au1000.h>
-#include <prom.h>
const char *get_system_type(void)
{
@@ -42,21 +42,15 @@ const char *get_system_type(void)
void __init prom_init(void)
{
- unsigned char *memsize_str;
- unsigned long memsize;
+ unsigned long physical_memsize;
- prom_argc = fw_arg0;
- prom_argv = (char **)fw_arg1;
- prom_envp = (char **)fw_arg2;
+ fw_init_cmdline();
- prom_init_cmdline();
+ physical_memsize = fw_getenvl("memsize");
+ if (!physical_memsize)
+ physical_memsize = 0x04000000;
- memsize_str = prom_getenv("memsize");
- if (!memsize_str)
- memsize = 0x04000000;
- else
- strict_strtoul(memsize_str, 0, &memsize);
- add_memory_region(0, memsize, BOOT_MEM_RAM);
+ add_memory_region(0, physical_memsize, BOOT_MEM_RAM);
}
void prom_putchar(unsigned char c)
diff --git a/arch/mips/alchemy/board-mtx1.c b/arch/mips/alchemy/board-mtx1.c
index 295f1a9..7d1ea7a 100644
--- a/arch/mips/alchemy/board-mtx1.c
+++ b/arch/mips/alchemy/board-mtx1.c
@@ -29,11 +29,11 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <mtd/mtd-abi.h>
-#include <asm/bootinfo.h>
+
#include <asm/reboot.h>
+#include <asm/fw/fw.h>
#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-au1x00/au1xxx_eth.h>
-#include <prom.h>
const char *get_system_type(void)
{
@@ -42,21 +42,15 @@ const char *get_system_type(void)
void __init prom_init(void)
{
- unsigned char *memsize_str;
- unsigned long memsize;
+ unsigned long physical_memsize;
- prom_argc = fw_arg0;
- prom_argv = (char **)fw_arg1;
- prom_envp = (char **)fw_arg2;
+ fw_init_cmdline();
- prom_init_cmdline();
+ physical_memsize = fw_getenvl("memsize");
+ if (!physical_memsize)
+ physical_memsize = 0x04000000;
- memsize_str = prom_getenv("memsize");
- if (!memsize_str)
- memsize = 0x04000000;
- else
- strict_strtoul(memsize_str, 0, &memsize);
- add_memory_region(0, memsize, BOOT_MEM_RAM);
+ add_memory_region(0, physical_memsize, BOOT_MEM_RAM);
}
void prom_putchar(unsigned char c)
diff --git a/arch/mips/alchemy/board-xxs1500.c b/arch/mips/alchemy/board-xxs1500.c
index bd55136..0469f1c 100644
--- a/arch/mips/alchemy/board-xxs1500.c
+++ b/arch/mips/alchemy/board-xxs1500.c
@@ -27,10 +27,10 @@
#include <linux/gpio.h>
#include <linux/delay.h>
#include <linux/pm.h>
-#include <asm/bootinfo.h>
+
#include <asm/reboot.h>
+#include <asm/fw/fw.h>
#include <asm/mach-au1x00/au1000.h>
-#include <prom.h>
const char *get_system_type(void)
{
@@ -39,20 +39,15 @@ const char *get_system_type(void)
void __init prom_init(void)
{
- unsigned char *memsize_str;
- unsigned long memsize;
-
- prom_argc = fw_arg0;
- prom_argv = (char **)fw_arg1;
- prom_envp = (char **)fw_arg2;
+ unsigned long physical_memsize;
- prom_init_cmdline();
+ fw_init_cmdline();
- memsize_str = prom_getenv("memsize");
- if (!memsize_str || strict_strtoul(memsize_str, 0, &memsize))
- memsize = 0x04000000;
+ physical_memsize = fw_getenvl("memsize");
+ if (!physical_memsize)
+ physical_memsize = 0x04000000;
- add_memory_region(0, memsize, BOOT_MEM_RAM);
+ add_memory_region(0, physical_memsize, BOOT_MEM_RAM);
}
void prom_putchar(unsigned char c)
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c
index 95cb911..2c5c014 100644
--- a/arch/mips/alchemy/common/platform.c
+++ b/arch/mips/alchemy/common/platform.c
@@ -18,13 +18,12 @@
#include <linux/serial_8250.h>
#include <linux/slab.h>
+#include <asm/fw/fw.h>
#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-au1x00/au1xxx_dbdma.h>
#include <asm/mach-au1x00/au1100_mmc.h>
#include <asm/mach-au1x00/au1xxx_eth.h>
-#include <prom.h>
-
static void alchemy_8250_pm(struct uart_port *port, unsigned int state,
unsigned int old_state)
{
diff --git a/arch/mips/alchemy/common/prom.c b/arch/mips/alchemy/common/prom.c
index 5340210..a67012d 100644
--- a/arch/mips/alchemy/common/prom.c
+++ b/arch/mips/alchemy/common/prom.c
@@ -37,45 +37,7 @@
#include <linux/init.h>
#include <linux/string.h>
-#include <asm/bootinfo.h>
-
-int prom_argc;
-char **prom_argv;
-char **prom_envp;
-
-void __init prom_init_cmdline(void)
-{
- int i;
-
- for (i = 1; i < prom_argc; i++) {
- strlcat(arcs_cmdline, prom_argv[i], COMMAND_LINE_SIZE);
- if (i < (prom_argc - 1))
- strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
- }
-}
-
-char *prom_getenv(char *envname)
-{
- /*
- * Return a pointer to the given environment variable.
- * YAMON uses "name", "value" pairs, while U-Boot uses "name=value".
- */
-
- char **env = prom_envp;
- int i = strlen(envname);
- int yamon = (*env && strchr(*env, '=') == NULL);
-
- while (*env) {
- if (yamon) {
- if (strcmp(envname, *env++) == 0)
- return *env;
- } else if (strncmp(envname, *env, i) == 0 && (*env)[i] == '=')
- return *env + i + 1;
- env++;
- }
-
- return NULL;
-}
+#include <asm/fw/fw.h>
static inline unsigned char str2hexnum(unsigned char c)
{
@@ -109,7 +71,7 @@ int __init prom_get_ethernet_addr(char *ethernet_addr)
char *ethaddr_str;
/* Check the environment variables first */
- ethaddr_str = prom_getenv("ethaddr");
+ ethaddr_str = fw_getenv("ethaddr");
if (!ethaddr_str) {
/* Check command line */
ethaddr_str = strstr(arcs_cmdline, "ethaddr=");
diff --git a/arch/mips/alchemy/devboards/db1000.c b/arch/mips/alchemy/devboards/db1000.c
index 1b81dbf..53ff8a4 100644
--- a/arch/mips/alchemy/devboards/db1000.c
+++ b/arch/mips/alchemy/devboards/db1000.c
@@ -36,7 +36,6 @@
#include <asm/mach-au1x00/au1100_mmc.h>
#include <asm/mach-db1x00/bcsr.h>
#include <asm/reboot.h>
-#include <prom.h>
#include "platform.h"
#define F_SWAPPED (bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT)
diff --git a/arch/mips/alchemy/devboards/db1300.c b/arch/mips/alchemy/devboards/db1300.c
index c56e024..8073c86 100644
--- a/arch/mips/alchemy/devboards/db1300.c
+++ b/arch/mips/alchemy/devboards/db1300.c
@@ -28,7 +28,6 @@
#include <asm/mach-au1x00/au1xxx_psc.h>
#include <asm/mach-db1x00/db1300.h>
#include <asm/mach-db1x00/bcsr.h>
-#include <asm/mach-au1x00/prom.h>
#include "platform.h"
diff --git a/arch/mips/alchemy/devboards/db1550.c b/arch/mips/alchemy/devboards/db1550.c
index 9eb7906..7d72509 100644
--- a/arch/mips/alchemy/devboards/db1550.c
+++ b/arch/mips/alchemy/devboards/db1550.c
@@ -23,7 +23,6 @@
#include <asm/mach-au1x00/au1xxx_psc.h>
#include <asm/mach-au1x00/au1550_spi.h>
#include <asm/mach-db1x00/bcsr.h>
-#include <prom.h>
#include "platform.h"
diff --git a/arch/mips/alchemy/devboards/pb1100.c b/arch/mips/alchemy/devboards/pb1100.c
index cff50d0..a9d8904 100644
--- a/arch/mips/alchemy/devboards/pb1100.c
+++ b/arch/mips/alchemy/devboards/pb1100.c
@@ -26,7 +26,6 @@
#include <linux/platform_device.h>
#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-db1x00/bcsr.h>
-#include <prom.h>
#include "platform.h"
const char *get_system_type(void)
diff --git a/arch/mips/alchemy/devboards/pb1500.c b/arch/mips/alchemy/devboards/pb1500.c
index e7b807b..36e1853 100644
--- a/arch/mips/alchemy/devboards/pb1500.c
+++ b/arch/mips/alchemy/devboards/pb1500.c
@@ -26,7 +26,6 @@
#include <linux/platform_device.h>
#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-db1x00/bcsr.h>
-#include <prom.h>
#include "platform.h"
const char *get_system_type(void)
diff --git a/arch/mips/alchemy/devboards/prom.c b/arch/mips/alchemy/devboards/prom.c
index 93a2210..59af1d4 100644
--- a/arch/mips/alchemy/devboards/prom.c
+++ b/arch/mips/alchemy/devboards/prom.c
@@ -29,9 +29,8 @@
#include <linux/init.h>
#include <linux/kernel.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <asm/mach-au1x00/au1000.h>
-#include <prom.h>
#if defined(CONFIG_MIPS_DB1000) || \
defined(CONFIG_MIPS_PB1100) || \
@@ -44,19 +43,15 @@
void __init prom_init(void)
{
- unsigned char *memsize_str;
- unsigned long memsize;
+ unsigned long physical_memsize;
- prom_argc = (int)fw_arg0;
- prom_argv = (char **)fw_arg1;
- prom_envp = (char **)fw_arg2;
+ fw_init_cmdline();
- prom_init_cmdline();
- memsize_str = prom_getenv("memsize");
- if (!memsize_str || strict_strtoul(memsize_str, 0, &memsize))
- memsize = ALCHEMY_BOARD_DEFAULT_MEMSIZE;
+ physical_memsize = fw_getenvl("memsize");
+ if (!physical_memsize)
+ physical_memsize = ALCHEMY_BOARD_DEFAULT_MEMSIZE;
- add_memory_region(0, memsize, BOOT_MEM_RAM);
+ add_memory_region(0, physical_memsize, BOOT_MEM_RAM);
}
void prom_putchar(unsigned char c)
diff --git a/arch/mips/include/asm/mach-au1x00/au1xxx_eth.h b/arch/mips/include/asm/mach-au1x00/au1xxx_eth.h
index 49dc8d9..3f22d5a 100644
--- a/arch/mips/include/asm/mach-au1x00/au1xxx_eth.h
+++ b/arch/mips/include/asm/mach-au1x00/au1xxx_eth.h
@@ -14,5 +14,6 @@ struct au1000_eth_platform_data {
void __init au1xxx_override_eth_cfg(unsigned port,
struct au1000_eth_platform_data *eth_data);
+int __init prom_get_ethernet_addr(char *ethernet_addr);
#endif /* __AU1X00_ETH_DATA_H */
diff --git a/arch/mips/include/asm/mach-au1x00/prom.h b/arch/mips/include/asm/mach-au1x00/prom.h
deleted file mode 100644
index 4c0e09c..0000000
--- a/arch/mips/include/asm/mach-au1x00/prom.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __AU1X00_PROM_H
-#define __AU1X00_PROM_H
-
-extern int prom_argc;
-extern char **prom_argv;
-extern char **prom_envp;
-
-extern void prom_init_cmdline(void);
-extern char *prom_getenv(char *envname);
-extern int prom_get_ethernet_addr(char *ethernet_addr);
-
-#endif
diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c
index 397596b..200ccc2 100644
--- a/drivers/net/ethernet/amd/au1000_eth.c
+++ b/drivers/net/ethernet/amd/au1000_eth.c
@@ -67,7 +67,6 @@
#include <au1000.h>
#include <au1xxx_eth.h>
-#include <prom.h>
#include "au1000_eth.h"
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 03/35] MIPS: Alchemy: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
2012-06-05 21:19 ` [PATCH 01/35] MIPS: Add environment variable processing code to firmware library Steven J. Hill
2012-06-05 21:19 ` [PATCH 02/35] MIPS: Alchemy: Cleanup firmware support for Alchemy platforms Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 04/35] MIPS: AR7: Cleanup firmware support for the AR7 platform Steven J. Hill
` (33 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/alchemy/board-gpr.c | 26 +++++++-----------------
arch/mips/alchemy/board-mtx1.c | 26 +++++++-----------------
arch/mips/alchemy/board-xxs1500.c | 24 ++++++-----------------
arch/mips/alchemy/common/platform.c | 27 +++++++++++++------------
arch/mips/alchemy/common/prom.c | 37 +++++++++--------------------------
arch/mips/alchemy/devboards/prom.c | 35 ++++++++-------------------------
6 files changed, 51 insertions(+), 124 deletions(-)
diff --git a/arch/mips/alchemy/board-gpr.c b/arch/mips/alchemy/board-gpr.c
index 1139173..8ad454a 100644
--- a/arch/mips/alchemy/board-gpr.c
+++ b/arch/mips/alchemy/board-gpr.c
@@ -1,27 +1,15 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* GPR board platform device registration (Au1550)
*
* Copyright (C) 2010 Wolfgang Grandegger <wg@denx.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
#include <linux/delay.h>
-#include <linux/init.h>
#include <linux/interrupt.h>
-#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/mtd/partitions.h>
@@ -65,7 +53,7 @@ static void gpr_reset(char *c)
alchemy_gpio_direction_output(5, 0);
/* trigger watchdog to reset board in 200ms */
- printk(KERN_EMERG "Triggering watchdog soft reset...\n");
+ pr_emerg("Triggering watchdog soft reset...\n");
raw_local_irq_disable();
alchemy_gpio_direction_output(1, 0);
udelay(1);
@@ -82,7 +70,7 @@ static void gpr_power_off(void)
void __init board_setup(void)
{
- printk(KERN_INFO "Trapeze ITS GPR board\n");
+ pr_info("Trapeze ITS GPR board\n");
pm_power_off = gpr_power_off;
_machine_halt = gpr_power_off;
diff --git a/arch/mips/alchemy/board-mtx1.c b/arch/mips/alchemy/board-mtx1.c
index 7d1ea7a..6d5e56c 100644
--- a/arch/mips/alchemy/board-mtx1.c
+++ b/arch/mips/alchemy/board-mtx1.c
@@ -1,26 +1,14 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* MTX-1 platform devices registration (Au1500)
*
* Copyright (C) 2007-2009, Florian Fainelli <florian@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
-#include <linux/init.h>
#include <linux/interrupt.h>
-#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/leds.h>
#include <linux/gpio.h>
@@ -98,7 +86,7 @@ void __init board_setup(void)
_machine_halt = mtx1_power_off;
_machine_restart = mtx1_reset;
- printk(KERN_INFO "4G Systems MTX-1 Board\n");
+ pr_info("4G Systems MTX-1 Board\n");
}
/******************************************************************************/
@@ -296,7 +284,7 @@ static int __init mtx1_register_devices(void)
rc = gpio_request(mtx1_gpio_button[0].gpio,
mtx1_gpio_button[0].desc);
if (rc < 0) {
- printk(KERN_INFO "mtx1: failed to request %d\n",
+ pr_info("mtx1: failed to request %d\n",
mtx1_gpio_button[0].gpio);
goto out;
}
diff --git a/arch/mips/alchemy/board-xxs1500.c b/arch/mips/alchemy/board-xxs1500.c
index 0469f1c..e7a3745 100644
--- a/arch/mips/alchemy/board-xxs1500.c
+++ b/arch/mips/alchemy/board-xxs1500.c
@@ -1,25 +1,13 @@
/*
- * BRIEF MODULE DESCRIPTION
- * MyCable XXS1500 board support
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * Copyright 2003, 2008 MontaVista Software Inc.
- * Author: MontaVista Software, Inc. <source@mvista.com>
+ * MyCable XXS1500 board support
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright 2003, 2008 MontaVista Software Inc. <source@mvista.com>
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/interrupt.h>
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c
index 2c5c014..6a870a9 100644
--- a/arch/mips/alchemy/common/platform.c
+++ b/arch/mips/alchemy/common/platform.c
@@ -1,4 +1,8 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* Platform device support for Au1x00 SoCs.
*
* Copyright 2004, Matt Porter <mporter@kernel.crashing.org>
@@ -6,11 +10,8 @@
* (C) Copyright Embedded Alley Solutions, Inc 2005
* Author: Pantelis Antoniou <pantelis@embeddedalley.com>
*
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
#include <linux/dma-mapping.h>
#include <linux/etherdevice.h>
#include <linux/init.h>
@@ -103,7 +104,7 @@ static void __init alchemy_setup_uarts(int ctype)
ports = kzalloc(s * (c + 1), GFP_KERNEL);
if (!ports) {
- printk(KERN_INFO "Alchemy: no memory for UART data\n");
+ pr_info("Alchemy: no memory for UART data\n");
return;
}
memcpy(ports, au1x00_uart_data[ctype], s * c);
@@ -113,7 +114,7 @@ static void __init alchemy_setup_uarts(int ctype)
for (s = 0; s < c; s++)
ports[s].uartclk = uartclk;
if (platform_device_register(&au1xx0_uart_device))
- printk(KERN_INFO "Alchemy: failed to register UARTs\n");
+ pr_info("Alchemy: failed to register UARTs\n");
}
@@ -173,7 +174,7 @@ static void __init alchemy_setup_usb(int ctype)
pdev->dev.dma_mask = &alchemy_ohci_dmamask;
if (platform_device_register(pdev))
- printk(KERN_INFO "Alchemy USB: cannot add OHCI0\n");
+ pr_info("Alchemy USB: cannot add OHCI0\n");
/* setup EHCI0: Au1200/Au1300 */
@@ -192,7 +193,7 @@ static void __init alchemy_setup_usb(int ctype)
pdev->dev.dma_mask = &alchemy_ehci_dmamask;
if (platform_device_register(pdev))
- printk(KERN_INFO "Alchemy USB: cannot add EHCI0\n");
+ pr_info("Alchemy USB: cannot add EHCI0\n");
}
/* Au1300: OHCI1 */
@@ -211,7 +212,7 @@ static void __init alchemy_setup_usb(int ctype)
pdev->dev.dma_mask = &alchemy_ohci_dmamask;
if (platform_device_register(pdev))
- printk(KERN_INFO "Alchemy USB: cannot add OHCI1\n");
+ pr_info("Alchemy USB: cannot add OHCI1\n");
}
}
@@ -335,7 +336,7 @@ static void __init alchemy_setup_macs(int ctype)
macres = kmalloc(sizeof(struct resource) * MAC_RES_COUNT, GFP_KERNEL);
if (!macres) {
- printk(KERN_INFO "Alchemy: no memory for MAC0 resources\n");
+ pr_info("Alchemy: no memory for MAC0 resources\n");
return;
}
memcpy(macres, au1xxx_eth0_resources[ctype],
@@ -348,7 +349,7 @@ static void __init alchemy_setup_macs(int ctype)
ret = platform_device_register(&au1xxx_eth0_device);
if (ret)
- printk(KERN_INFO "Alchemy: failed to register MAC0\n");
+ pr_info("Alchemy: failed to register MAC0\n");
/* Handle 2nd MAC */
@@ -357,7 +358,7 @@ static void __init alchemy_setup_macs(int ctype)
macres = kmalloc(sizeof(struct resource) * MAC_RES_COUNT, GFP_KERNEL);
if (!macres) {
- printk(KERN_INFO "Alchemy: no memory for MAC1 resources\n");
+ pr_info("Alchemy: no memory for MAC1 resources\n");
return;
}
memcpy(macres, au1xxx_eth1_resources[ctype],
@@ -372,7 +373,7 @@ static void __init alchemy_setup_macs(int ctype)
if (!(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2)) {
ret = platform_device_register(&au1xxx_eth1_device);
if (ret)
- printk(KERN_INFO "Alchemy: failed to register MAC1\n");
+ pr_info("Alchemy: failed to register MAC1\n");
}
}
diff --git a/arch/mips/alchemy/common/prom.c b/arch/mips/alchemy/common/prom.c
index a67012d..57e754d 100644
--- a/arch/mips/alchemy/common/prom.c
+++ b/arch/mips/alchemy/common/prom.c
@@ -1,38 +1,19 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * BRIEF MODULE DESCRIPTION
- * PROM library initialisation code, supports YAMON and U-Boot.
+ * PROM library initialisation code, supports YAMON and U-Boot. This file
+ * was derived from Carsten Langgaard's arch/mips/mips-boards/xx files.
*
* Copyright 2000-2001, 2006, 2008 MontaVista Software Inc.
* Author: MontaVista Software, Inc. <source@mvista.com>
*
- * This file was derived from Carsten Langgaard's
- * arch/mips/mips-boards/xx files.
- *
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 1999,2000 MIPS Technologies, Inc. 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 as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Copyright (C) 1999,2000,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
*/
-
#include <linux/module.h>
#include <linux/init.h>
#include <linux/string.h>
diff --git a/arch/mips/alchemy/devboards/prom.c b/arch/mips/alchemy/devboards/prom.c
index 59af1d4..a48f9ae 100644
--- a/arch/mips/alchemy/devboards/prom.c
+++ b/arch/mips/alchemy/devboards/prom.c
@@ -1,40 +1,21 @@
/*
- * Common code used by all Alchemy develboards.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * Extracted from files which had this to say:
+ * Common code used by all Alchemy development boards.
+ * GPR board platform device registration (Au1550)
*
* Copyright 2000, 2008 MontaVista Software Inc.
* Author: MontaVista Software, Inc. <source@mvista.com>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved
*/
-
-#include <linux/init.h>
-#include <linux/kernel.h>
#include <asm/fw/fw.h>
#include <asm/mach-au1x00/au1000.h>
-#if defined(CONFIG_MIPS_DB1000) || \
- defined(CONFIG_MIPS_PB1100) || \
- defined(CONFIG_MIPS_PB1500)
+#if defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_PB1100) || \
+ defined(CONFIG_MIPS_PB1500)
#define ALCHEMY_BOARD_DEFAULT_MEMSIZE 0x04000000
#else /* Au1550/Au1200-based develboards */
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 04/35] MIPS: AR7: Cleanup firmware support for the AR7 platform.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (2 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 03/35] MIPS: Alchemy: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 05/35] MIPS: AR7: Cleanup files effected by firmware changes Steven J. Hill
` (32 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/ar7/memory.c | 3 +--
arch/mips/ar7/platform.c | 10 ++++-----
arch/mips/ar7/prom.c | 40 ++++++++-------------------------
arch/mips/ar7/setup.c | 4 ++--
arch/mips/include/asm/mach-ar7/prom.h | 25 ---------------------
5 files changed, 17 insertions(+), 65 deletions(-)
delete mode 100644 arch/mips/include/asm/mach-ar7/prom.h
diff --git a/arch/mips/ar7/memory.c b/arch/mips/ar7/memory.c
index 28abfee..3d7133d 100644
--- a/arch/mips/ar7/memory.c
+++ b/arch/mips/ar7/memory.c
@@ -30,7 +30,6 @@
#include <asm/sections.h>
#include <asm/mach-ar7/ar7.h>
-#include <asm/mips-boards/prom.h>
static int __init memsize(void)
{
@@ -57,7 +56,7 @@ static int __init memsize(void)
return size;
}
-void __init prom_meminit(void)
+void __init fw_meminit(void)
{
unsigned long pages;
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c
index 1a24d31..284b86a 100644
--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -38,9 +38,9 @@
#include <linux/clk.h>
#include <asm/addrspace.h>
+#include <asm/fw/fw.h>
#include <asm/mach-ar7/ar7.h>
#include <asm/mach-ar7/gpio.h>
-#include <asm/mach-ar7/prom.h>
/*****************************************************************************
* VLYNQ Bus
@@ -297,10 +297,10 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr)
char name[5], *mac;
sprintf(name, "mac%c", 'a' + instance);
- mac = prom_getenv(name);
+ mac = fw_getenv(name);
if (!mac && instance) {
sprintf(name, "mac%c", 'a');
- mac = prom_getenv(name);
+ mac = fw_getenv(name);
}
if (mac) {
@@ -514,8 +514,8 @@ static void __init detect_leds(void)
ar7_led_data.leds = default_leds;
/* FIXME: the whole thing is unreliable */
- prid = prom_getenv("ProductID");
- usb_prod = prom_getenv("usb_prod");
+ prid = fw_getenv("ProductID");
+ usb_prod = fw_getenv("usb_prod");
/* If we can't get the product id from PROM, use the default LEDs */
if (!prid)
diff --git a/arch/mips/ar7/prom.c b/arch/mips/ar7/prom.c
index a23adc4..9e5699a 100644
--- a/arch/mips/ar7/prom.c
+++ b/arch/mips/ar7/prom.c
@@ -24,10 +24,9 @@
#include <linux/module.h>
#include <linux/string.h>
#include <linux/io.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <asm/mach-ar7/ar7.h>
-#include <asm/mach-ar7/prom.h>
#define MAX_ENTRY 80
@@ -38,29 +37,6 @@ struct env_var {
static struct env_var adam2_env[MAX_ENTRY];
-char *prom_getenv(const char *name)
-{
- int i;
-
- for (i = 0; (i < MAX_ENTRY) && adam2_env[i].name; i++)
- if (!strcmp(name, adam2_env[i].name))
- return adam2_env[i].value;
-
- return NULL;
-}
-EXPORT_SYMBOL(prom_getenv);
-
-static void __init ar7_init_cmdline(int argc, char *argv[])
-{
- int i;
-
- for (i = 1; i < argc; i++) {
- strlcat(arcs_cmdline, argv[i], COMMAND_LINE_SIZE);
- if (i < (argc - 1))
- strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
- }
-}
-
struct psbl_rec {
u32 psbl_size;
u32 env_base;
@@ -199,17 +175,19 @@ static void __init console_config(void)
{
#ifdef CONFIG_SERIAL_8250_CONSOLE
char console_string[40];
- int baud = 0;
+ long val;
+ int tmp, baud = 0;
char parity = '\0', bits = '\0', flow = '\0';
- char *s, *p;
+ char *s;
if (strstr(arcs_cmdline, "console="))
return;
- s = prom_getenv("modetty0");
+ s = fw_getenv("modetty0");
if (s) {
- baud = simple_strtoul(s, &p, 10);
- s = p;
+ tmp = kstrtol(s, 0, &val);
+ baud = (int)val;
+ while (*s++ != ',');
if (*s == ',')
s++;
if (*s)
@@ -243,7 +221,7 @@ static void __init console_config(void)
void __init prom_init(void)
{
- ar7_init_cmdline(fw_arg0, (char **)fw_arg1);
+ fw_init_cmdline();
ar7_init_env((struct env_var *)fw_arg2);
console_config();
diff --git a/arch/mips/ar7/setup.c b/arch/mips/ar7/setup.c
index 9a357ff..ec318bb 100644
--- a/arch/mips/ar7/setup.c
+++ b/arch/mips/ar7/setup.c
@@ -21,8 +21,8 @@
#include <linux/time.h>
#include <asm/reboot.h>
+#include <asm/fw/fw.h>
#include <asm/mach-ar7/ar7.h>
-#include <asm/mach-ar7/prom.h>
#include <asm/mach-ar7/gpio.h>
static void ar7_machine_restart(char *command)
@@ -99,7 +99,7 @@ void __init plat_mem_setup(void)
panic("Can't remap IO base!");
set_io_port_base(io_base);
- prom_meminit();
+ fw_meminit();
printk(KERN_INFO "%s, ID: 0x%04x, Revision: 0x%02x\n",
get_system_type(), ar7_chip_id(), ar7_chip_rev());
diff --git a/arch/mips/include/asm/mach-ar7/prom.h b/arch/mips/include/asm/mach-ar7/prom.h
deleted file mode 100644
index 088f61f..0000000
--- a/arch/mips/include/asm/mach-ar7/prom.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2006, 2007 Florian Fainelli <florian@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __PROM_H__
-#define __PROM_H__
-
-extern char *prom_getenv(const char *name);
-extern void prom_meminit(void);
-
-#endif /* __PROM_H__ */
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 05/35] MIPS: AR7: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (3 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 04/35] MIPS: AR7: Cleanup firmware support for the AR7 platform Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 06/35] MIPS: ath79: Cleanup firmware support for the ath79 platform Steven J. Hill
` (31 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/ar7/memory.c | 19 +++++------------
arch/mips/ar7/platform.c | 53 ++++++++++++++++++----------------------------
arch/mips/ar7/prom.c | 22 ++++++-------------
arch/mips/ar7/setup.c | 22 ++++++-------------
4 files changed, 39 insertions(+), 77 deletions(-)
diff --git a/arch/mips/ar7/memory.c b/arch/mips/ar7/memory.c
index 3d7133d..f3009a8 100644
--- a/arch/mips/ar7/memory.c
+++ b/arch/mips/ar7/memory.c
@@ -1,20 +1,11 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* Copyright (C) 2007 Felix Fietkau <nbd@openwrt.org>
* Copyright (C) 2007 Eugene Konev <ejka@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
#include <linux/bootmem.h>
#include <linux/init.h>
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c
index 284b86a..921e42c 100644
--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -1,22 +1,12 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* Copyright (C) 2006,2007 Felix Fietkau <nbd@openwrt.org>
* Copyright (C) 2006,2007 Eugene Konev <ejka@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
#include <linux/init.h>
#include <linux/types.h>
#include <linux/module.h>
@@ -308,8 +298,7 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr)
&dev_addr[0], &dev_addr[1],
&dev_addr[2], &dev_addr[3],
&dev_addr[4], &dev_addr[5]) != 6) {
- pr_warning("cannot parse mac address, "
- "using random address\n");
+ pr_warn("cannot parse mac address, using random address\n");
random_ether_addr(dev_addr);
}
} else
@@ -489,11 +478,11 @@ static struct gpio_led gt701_leds[] = {
.active_low = 1,
.default_trigger = "default-on",
},
- {
- .name = "ethernet",
- .gpio = 10,
- .active_low = 1,
- },
+ {
+ .name = "ethernet",
+ .gpio = 10,
+ .active_low = 1,
+ },
};
static struct gpio_led_platform_data ar7_led_data;
@@ -662,7 +651,7 @@ static int __init ar7_register_devices(void)
res = platform_device_register(&physmap_flash);
if (res)
- pr_warning("unable to register physmap-flash: %d\n", res);
+ pr_warn("unable to register physmap-flash: %d\n", res);
if (ar7_is_titan())
titan_fixup_devices();
@@ -670,13 +659,13 @@ static int __init ar7_register_devices(void)
ar7_device_disable(vlynq_low_data.reset_bit);
res = platform_device_register(&vlynq_low);
if (res)
- pr_warning("unable to register vlynq-low: %d\n", res);
+ pr_warn("unable to register vlynq-low: %d\n", res);
if (ar7_has_high_vlynq()) {
ar7_device_disable(vlynq_high_data.reset_bit);
res = platform_device_register(&vlynq_high);
if (res)
- pr_warning("unable to register vlynq-high: %d\n", res);
+ pr_warn("unable to register vlynq-high: %d\n", res);
}
if (ar7_has_high_cpmac()) {
@@ -686,9 +675,9 @@ static int __init ar7_register_devices(void)
res = platform_device_register(&cpmac_high);
if (res)
- pr_warning("unable to register cpmac-high: %d\n", res);
+ pr_warn("unable to register cpmac-high: %d\n", res);
} else
- pr_warning("unable to add cpmac-high phy: %d\n", res);
+ pr_warn("unable to add cpmac-high phy: %d\n", res);
} else
cpmac_low_data.phy_mask = 0xffffffff;
@@ -697,18 +686,18 @@ static int __init ar7_register_devices(void)
cpmac_get_mac(0, cpmac_low_data.dev_addr);
res = platform_device_register(&cpmac_low);
if (res)
- pr_warning("unable to register cpmac-low: %d\n", res);
+ pr_warn("unable to register cpmac-low: %d\n", res);
} else
- pr_warning("unable to add cpmac-low phy: %d\n", res);
+ pr_warn("unable to add cpmac-low phy: %d\n", res);
detect_leds();
res = platform_device_register(&ar7_gpio_leds);
if (res)
- pr_warning("unable to register leds: %d\n", res);
+ pr_warn("unable to register leds: %d\n", res);
res = platform_device_register(&ar7_udc);
if (res)
- pr_warning("unable to register usb slave: %d\n", res);
+ pr_warn("unable to register usb slave: %d\n", res);
/* Register watchdog only if enabled in hardware */
bootcr = ioremap_nocache(AR7_REGS_DCL, 4);
@@ -723,7 +712,7 @@ static int __init ar7_register_devices(void)
ar7_wdt_res.end = ar7_wdt_res.start + 0x20;
res = platform_device_register(&ar7_wdt);
if (res)
- pr_warning("unable to register watchdog: %d\n", res);
+ pr_warn("unable to register watchdog: %d\n", res);
}
return 0;
diff --git a/arch/mips/ar7/prom.c b/arch/mips/ar7/prom.c
index 9e5699a..64ef6de 100644
--- a/arch/mips/ar7/prom.c
+++ b/arch/mips/ar7/prom.c
@@ -1,21 +1,11 @@
/*
- * 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.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * 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.
- *
- * Putting things on the screen/serial line using YAMONs facilities.
+ * Carsten Langgaard, carstenl@mips.com
+ * Steven J. Hill, sjhill@mips.com
+ * Copyright (C) 1999,2000,2012 MIPS Technologies, Inc. All rights reserved.
*/
#include <linux/init.h>
#include <linux/kernel.h>
diff --git a/arch/mips/ar7/setup.c b/arch/mips/ar7/setup.c
index ec318bb..0195cf1 100644
--- a/arch/mips/ar7/setup.c
+++ b/arch/mips/ar7/setup.c
@@ -1,19 +1,11 @@
/*
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 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 file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * 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.
+ * Carsten Langgaard, carstenl@mips.com
+ * Steven J. Hill, sjhill@mips.com
+ * Copyright (C) 2000,2012 MIPS Technologies, Inc. All rights reserved.
*/
#include <linux/init.h>
#include <linux/ioport.h>
@@ -101,6 +93,6 @@ void __init plat_mem_setup(void)
fw_meminit();
- printk(KERN_INFO "%s, ID: 0x%04x, Revision: 0x%02x\n",
+ pr_info("%s, ID: 0x%04x, Revision: 0x%02x\n",
get_system_type(), ar7_chip_id(), ar7_chip_rev());
}
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 06/35] MIPS: ath79: Cleanup firmware support for the ath79 platform.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (4 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 05/35] MIPS: AR7: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-06 13:04 ` Gabor Juhos
2012-06-05 21:19 ` [PATCH 07/35] MIPS: ath79: Cleanup files effected by firmware changes Steven J. Hill
` (30 subsequent siblings)
36 siblings, 1 reply; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/ath79/prom.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/arch/mips/ath79/prom.c b/arch/mips/ath79/prom.c
index e9cbd7c..adbe614 100644
--- a/arch/mips/ath79/prom.c
+++ b/arch/mips/ath79/prom.c
@@ -14,7 +14,7 @@
#include <linux/io.h>
#include <linux/string.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <asm/addrspace.h>
#include "common.h"
@@ -32,23 +32,11 @@ static inline int is_valid_ram_addr(void *addr)
return 0;
}
-static __init void ath79_prom_init_cmdline(int argc, char **argv)
-{
- int i;
-
- if (!is_valid_ram_addr(argv))
- return;
-
- for (i = 0; i < argc; i++)
- if (is_valid_ram_addr(argv[i])) {
- strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
- strlcat(arcs_cmdline, argv[i], sizeof(arcs_cmdline));
- }
-}
-
void __init prom_init(void)
{
- ath79_prom_init_cmdline(fw_arg0, (char **)fw_arg1);
+ if (!is_valid_ram_addr((int *)fw_arg1))
+ return;
+ fw_init_cmdline();
}
void __init prom_free_prom_memory(void)
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* Re: [PATCH 06/35] MIPS: ath79: Cleanup firmware support for the ath79 platform.
2012-06-05 21:19 ` [PATCH 06/35] MIPS: ath79: Cleanup firmware support for the ath79 platform Steven J. Hill
@ 2012-06-06 13:04 ` Gabor Juhos
0 siblings, 0 replies; 57+ messages in thread
From: Gabor Juhos @ 2012-06-06 13:04 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf
Hi Steven,
2012.06.05. 23:19 keltezéssel, Steven J. Hill írta:
> From: "Steven J. Hill" <sjhill@mips.com>
>
> Signed-off-by: Steven J. Hill <sjhill@mips.com>
> ---
> arch/mips/ath79/prom.c | 20 ++++----------------
> 1 file changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/arch/mips/ath79/prom.c b/arch/mips/ath79/prom.c
> index e9cbd7c..adbe614 100644
> --- a/arch/mips/ath79/prom.c
> +++ b/arch/mips/ath79/prom.c
> @@ -14,7 +14,7 @@
> #include <linux/io.h>
> #include <linux/string.h>
>
> -#include <asm/bootinfo.h>
> +#include <asm/fw/fw.h>
> #include <asm/addrspace.h>
>
> #include "common.h"
> @@ -32,23 +32,11 @@ static inline int is_valid_ram_addr(void *addr)
> return 0;
> }
>
> -static __init void ath79_prom_init_cmdline(int argc, char **argv)
> -{
> - int i;
> -
> - if (!is_valid_ram_addr(argv))
> - return;
> -
> - for (i = 0; i < argc; i++)
> - if (is_valid_ram_addr(argv[i])) {
Please don't remove this validation. The Atheros AR7xxx/AR9xxx based boards are
using various bootloaders. Some of them puts insane values in argv, and this
validation ensures that the kernel will not crash with them.
> - strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
> - strlcat(arcs_cmdline, argv[i], sizeof(arcs_cmdline));
> - }
> -}
> -
> void __init prom_init(void)
> {
> - ath79_prom_init_cmdline(fw_arg0, (char **)fw_arg1);
> + if (!is_valid_ram_addr((int *)fw_arg1))
The 'is_valid_ram_addr' function requires a 'void *' argument, so it would be
more precise to use that instead of 'int *' in the cast.
> + return;
> + fw_init_cmdline();
> }
>
> void __init prom_free_prom_memory(void)
-Gabor
^ permalink raw reply [flat|nested] 57+ messages in thread
* [PATCH 07/35] MIPS: ath79: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (5 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 06/35] MIPS: ath79: Cleanup firmware support for the ath79 platform Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-06 11:16 ` Sergei Shtylyov
2012-06-05 21:19 ` [PATCH 08/35] MIPS: Cobalt: Cleanup firmware support for the Cobalt platform Steven J. Hill
` (29 subsequent siblings)
36 siblings, 1 reply; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/ath79/prom.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/arch/mips/ath79/prom.c b/arch/mips/ath79/prom.c
index adbe614..9ead18a 100644
--- a/arch/mips/ath79/prom.c
+++ b/arch/mips/ath79/prom.c
@@ -1,18 +1,15 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* Atheros AR71XX/AR724X/AR913X specific prom routines
*
* Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
- *
- * 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.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
-#include <linux/kernel.h>
-#include <linux/init.h>
#include <linux/io.h>
-#include <linux/string.h>
#include <asm/fw/fw.h>
#include <asm/addrspace.h>
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* Re: [PATCH 07/35] MIPS: ath79: Cleanup files effected by firmware changes.
2012-06-05 21:19 ` [PATCH 07/35] MIPS: ath79: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-06 11:16 ` Sergei Shtylyov
0 siblings, 0 replies; 57+ messages in thread
From: Sergei Shtylyov @ 2012-06-06 11:16 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf
Hello.
On 06-06-2012 1:19, Steven J. Hill wrote:
> From: "Steven J. Hill"<sjhill@mips.com>
> Make headers consistent across the files and make changes based on
> running the checkpatch script.
> Signed-off-by: Steven J. Hill<sjhill@mips.com>
> ---
> arch/mips/ath79/prom.c | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/arch/mips/ath79/prom.c b/arch/mips/ath79/prom.c
> index adbe614..9ead18a 100644
> --- a/arch/mips/ath79/prom.c
> +++ b/arch/mips/ath79/prom.c
> @@ -1,18 +1,15 @@
> /*
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> + *
Why move/change this text at all?
> * Atheros AR71XX/AR724X/AR913X specific prom routines
> *
> * Copyright (C) 2008-2010 Gabor Juhos<juhosg@openwrt.org>
> * Copyright (C) 2008 Imre Kaloz<kaloz@openwrt.org>
> - *
> - * 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.
> + * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
> */
> -
> -#include<linux/kernel.h>
> -#include<linux/init.h>
> #include<linux/io.h>
> -#include<linux/string.h>
Removing a few #include's doesn't justify copyrighting the file. You
generally need to do some substantial change (some people say about 1/3) to
the file to claim the copyright.
WBR, Sergei
^ permalink raw reply [flat|nested] 57+ messages in thread
* [PATCH 08/35] MIPS: Cobalt: Cleanup firmware support for the Cobalt platform.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (6 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 07/35] MIPS: ath79: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 09/35] MIPS: Cobalt: Cleanup files effected by firmware changes Steven J. Hill
` (28 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/cobalt/setup.c | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c
index ec3b2c4..3fdd449 100644
--- a/arch/mips/cobalt/setup.c
+++ b/arch/mips/cobalt/setup.c
@@ -15,9 +15,9 @@
#include <linux/ioport.h>
#include <linux/pm.h>
-#include <asm/bootinfo.h>
#include <asm/reboot.h>
#include <asm/gt64120.h>
+#include <asm/fw/fw.h>
#include <cobalt.h>
@@ -97,21 +97,9 @@ void __init plat_mem_setup(void)
void __init prom_init(void)
{
- unsigned long memsz;
- int argc, i;
- char **argv;
+ fw_init_cmdline();
- memsz = fw_arg0 & 0x7fff0000;
- argc = fw_arg0 & 0x0000ffff;
- argv = (char **)fw_arg1;
-
- for (i = 1; i < argc; i++) {
- strlcat(arcs_cmdline, argv[i], COMMAND_LINE_SIZE);
- if (i < (argc - 1))
- strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
- }
-
- add_memory_region(0x0, memsz, BOOT_MEM_RAM);
+ add_memory_region(0x0, (fw_arg0 & 0x7fff0000), BOOT_MEM_RAM);
}
void __init prom_free_prom_memory(void)
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 09/35] MIPS: Cobalt: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (7 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 08/35] MIPS: Cobalt: Cleanup firmware support for the Cobalt platform Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-06 2:09 ` Yuasa Yoichi
2012-06-05 21:19 ` [PATCH 10/35] MIPS: Emma: Cleanup firmware support for the Emma platform Steven J. Hill
` (27 subsequent siblings)
36 siblings, 1 reply; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/cobalt/setup.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c
index 3fdd449..2565965 100644
--- a/arch/mips/cobalt/setup.c
+++ b/arch/mips/cobalt/setup.c
@@ -1,12 +1,13 @@
/*
- * Setup pointers to hardware dependent routines.
- *
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
+ * Setup pointers to hardware dependent routines.
+ *
* Copyright (C) 1996, 1997, 2004, 05 by Ralf Baechle (ralf@linux-mips.org)
* Copyright (C) 2001, 2002, 2003 by Liam Davies (ldavies@agile.tv)
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*
*/
#include <linux/init.h>
@@ -27,14 +28,14 @@ extern void cobalt_machine_halt(void);
const char *get_system_type(void)
{
switch (cobalt_board_id) {
- case COBALT_BRD_ID_QUBE1:
- return "Cobalt Qube";
- case COBALT_BRD_ID_RAQ1:
- return "Cobalt RaQ";
- case COBALT_BRD_ID_QUBE2:
- return "Cobalt Qube2";
- case COBALT_BRD_ID_RAQ2:
- return "Cobalt RaQ2";
+ case COBALT_BRD_ID_QUBE1:
+ return "Cobalt Qube";
+ case COBALT_BRD_ID_RAQ1:
+ return "Cobalt RaQ";
+ case COBALT_BRD_ID_QUBE2:
+ return "Cobalt Qube2";
+ case COBALT_BRD_ID_RAQ2:
+ return "Cobalt RaQ2";
}
return "MIPS Cobalt";
}
@@ -86,7 +87,8 @@ void __init plat_mem_setup(void)
/* These resources have been reserved by VIA SuperI/O chip. */
for (i = 0; i < ARRAY_SIZE(cobalt_reserved_resources); i++)
- request_resource(&ioport_resource, cobalt_reserved_resources + i);
+ request_resource(&ioport_resource,
+ cobalt_reserved_resources + i);
}
/*
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 10/35] MIPS: Emma: Cleanup firmware support for the Emma platform.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (8 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 09/35] MIPS: Cobalt: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 11/35] MIPS: Emma: Cleanup files effected by firmware changes Steven J. Hill
` (26 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/emma/common/prom.c | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/arch/mips/emma/common/prom.c b/arch/mips/emma/common/prom.c
index cae4225..5228584 100644
--- a/arch/mips/emma/common/prom.c
+++ b/arch/mips/emma/common/prom.c
@@ -25,7 +25,7 @@
#include <linux/bootmem.h>
#include <asm/addrspace.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <asm/emma/emma2rh.h>
const char *get_system_type(void)
@@ -40,22 +40,7 @@ const char *get_system_type(void)
/* [jsun@junsun.net] PMON passes arguments in C main() style */
void __init prom_init(void)
{
- int argc = fw_arg0;
- char **arg = (char **)fw_arg1;
- int i;
-
- /* if user passes kernel args, ignore the default one */
- if (argc > 1)
- arcs_cmdline[0] = '\0';
-
- /* arg[0] is "g", the rest is boot parameters */
- for (i = 1; i < argc; i++) {
- if (strlen(arcs_cmdline) + strlen(arg[i]) + 1
- >= sizeof(arcs_cmdline))
- break;
- strcat(arcs_cmdline, arg[i]);
- strcat(arcs_cmdline, " ");
- }
+ fw_init_cmdline();
#ifdef CONFIG_NEC_MARKEINS
add_memory_region(0, EMMA2RH_RAM_SIZE, BOOT_MEM_RAM);
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 11/35] MIPS: Emma: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (9 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 10/35] MIPS: Emma: Cleanup firmware support for the Emma platform Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-06 11:29 ` Sergei Shtylyov
2012-06-05 21:19 ` [PATCH 12/35] MIPS: jz4740: Cleanup firmware support for the JZ4740 platform Steven J. Hill
` (25 subsequent siblings)
36 siblings, 1 reply; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/emma/common/prom.c | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/arch/mips/emma/common/prom.c b/arch/mips/emma/common/prom.c
index 5228584..9a70c4e 100644
--- a/arch/mips/emma/common/prom.c
+++ b/arch/mips/emma/common/prom.c
@@ -1,23 +1,14 @@
/*
- * Copyright (C) NEC Electronics Corporation 2004-2006
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * This file is based on the arch/mips/ddb5xxx/common/prom.c
+ * This is based on the arch/mips/ddb5xxx/common/prom.c file.
+ * GPR board platform device registration (Au1550)
*
- * Copyright 2001 MontaVista Software Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that 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
+ * Copyright 2001 MontaVista Software Inc.
+ * Copyright (C) NEC Electronics Corporation 2004-2006
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
#include <linux/init.h>
#include <linux/mm.h>
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* Re: [PATCH 11/35] MIPS: Emma: Cleanup files effected by firmware changes.
2012-06-05 21:19 ` [PATCH 11/35] MIPS: Emma: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-06 11:29 ` Sergei Shtylyov
0 siblings, 0 replies; 57+ messages in thread
From: Sergei Shtylyov @ 2012-06-06 11:29 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf
Hello.
On 06-06-2012 1:19, Steven J. Hill wrote:
> From: "Steven J. Hill"<sjhill@mips.com>
> Make headers consistent across the files and make changes based on
> running the checkpatch script.
I don't see any checkpatch.pl-related changes.
> Signed-off-by: Steven J. Hill<sjhill@mips.com>
> ---
> arch/mips/emma/common/prom.c | 25 ++++++++-----------------
> 1 file changed, 8 insertions(+), 17 deletions(-)
> diff --git a/arch/mips/emma/common/prom.c b/arch/mips/emma/common/prom.c
> index 5228584..9a70c4e 100644
> --- a/arch/mips/emma/common/prom.c
> +++ b/arch/mips/emma/common/prom.c
> @@ -1,23 +1,14 @@
> /*
> - * Copyright (C) NEC Electronics Corporation 2004-2006
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> *
> - * This file is based on the arch/mips/ddb5xxx/common/prom.c
> + * This is based on the arch/mips/ddb5xxx/common/prom.c file.
> + * GPR board platform device registration (Au1550)
> *
> - * Copyright 2001 MontaVista Software Inc.
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that 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
> + * Copyright 2001 MontaVista Software Inc.
> + * Copyright (C) NEC Electronics Corporation 2004-2006
> + * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
Reshuffling the header again hardly qualifies for adding a copyright.
WBR, Sergei
^ permalink raw reply [flat|nested] 57+ messages in thread
* [PATCH 12/35] MIPS: jz4740: Cleanup firmware support for the JZ4740 platform.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (10 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 11/35] MIPS: Emma: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-06 12:13 ` Lars-Peter Clausen
2012-06-05 21:19 ` [PATCH 13/35] MIPS: jz4740: Cleanup files effected by firmware changes Steven J. Hill
` (24 subsequent siblings)
36 siblings, 1 reply; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/jz4740/prom.c | 25 ++-----------------------
1 file changed, 2 insertions(+), 23 deletions(-)
diff --git a/arch/mips/jz4740/prom.c b/arch/mips/jz4740/prom.c
index 4a70407..c5071ab 100644
--- a/arch/mips/jz4740/prom.c
+++ b/arch/mips/jz4740/prom.c
@@ -20,33 +20,12 @@
#include <linux/serial_reg.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <asm/mach-jz4740/base.h>
-static __init void jz4740_init_cmdline(int argc, char *argv[])
-{
- unsigned int count = COMMAND_LINE_SIZE - 1;
- int i;
- char *dst = &(arcs_cmdline[0]);
- char *src;
-
- for (i = 1; i < argc && count; ++i) {
- src = argv[i];
- while (*src && count) {
- *dst++ = *src++;
- --count;
- }
- *dst++ = ' ';
- }
- if (i > 1)
- --dst;
-
- *dst = 0;
-}
-
void __init prom_init(void)
{
- jz4740_init_cmdline((int)fw_arg0, (char **)fw_arg1);
+ fw_init_cmdline();
mips_machtype = MACH_INGENIC_JZ4740;
}
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* Re: [PATCH 12/35] MIPS: jz4740: Cleanup firmware support for the JZ4740 platform.
2012-06-05 21:19 ` [PATCH 12/35] MIPS: jz4740: Cleanup firmware support for the JZ4740 platform Steven J. Hill
@ 2012-06-06 12:13 ` Lars-Peter Clausen
0 siblings, 0 replies; 57+ messages in thread
From: Lars-Peter Clausen @ 2012-06-06 12:13 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf
On 06/05/2012 11:19 PM, Steven J. Hill wrote:
> From: "Steven J. Hill" <sjhill@mips.com>
>
> Signed-off-by: Steven J. Hill <sjhill@mips.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> arch/mips/jz4740/prom.c | 25 ++-----------------------
> 1 file changed, 2 insertions(+), 23 deletions(-)
>
> diff --git a/arch/mips/jz4740/prom.c b/arch/mips/jz4740/prom.c
> index 4a70407..c5071ab 100644
> --- a/arch/mips/jz4740/prom.c
> +++ b/arch/mips/jz4740/prom.c
> @@ -20,33 +20,12 @@
>
> #include <linux/serial_reg.h>
>
> -#include <asm/bootinfo.h>
> +#include <asm/fw/fw.h>
> #include <asm/mach-jz4740/base.h>
>
> -static __init void jz4740_init_cmdline(int argc, char *argv[])
> -{
> - unsigned int count = COMMAND_LINE_SIZE - 1;
> - int i;
> - char *dst = &(arcs_cmdline[0]);
> - char *src;
> -
> - for (i = 1; i < argc && count; ++i) {
> - src = argv[i];
> - while (*src && count) {
> - *dst++ = *src++;
> - --count;
> - }
> - *dst++ = ' ';
> - }
> - if (i > 1)
> - --dst;
> -
> - *dst = 0;
> -}
> -
> void __init prom_init(void)
> {
> - jz4740_init_cmdline((int)fw_arg0, (char **)fw_arg1);
> + fw_init_cmdline();
> mips_machtype = MACH_INGENIC_JZ4740;
> }
>
^ permalink raw reply [flat|nested] 57+ messages in thread
* [PATCH 13/35] MIPS: jz4740: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (11 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 12/35] MIPS: jz4740: Cleanup firmware support for the JZ4740 platform Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-06 11:38 ` Sergei Shtylyov
2012-06-06 12:18 ` Lars-Peter Clausen
2012-06-05 21:19 ` [PATCH 14/35] MIPS: lantiq: Cleanup firmware support for the lantiq platform Steven J. Hill
` (23 subsequent siblings)
36 siblings, 2 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/jz4740/prom.c | 25 +++++++++----------------
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/arch/mips/jz4740/prom.c b/arch/mips/jz4740/prom.c
index c5071ab..ea86605 100644
--- a/arch/mips/jz4740/prom.c
+++ b/arch/mips/jz4740/prom.c
@@ -1,23 +1,14 @@
/*
- * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
- * JZ4740 SoC prom code
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
+ * JZ4740 SoC prom code
*
+ * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/string.h>
-
#include <linux/serial_reg.h>
#include <asm/fw/fw.h>
@@ -33,7 +24,9 @@ void __init prom_free_prom_memory(void)
{
}
-#define UART_REG(_reg) ((void __iomem *)CKSEG1ADDR(JZ4740_UART0_BASE_ADDR + (_reg << 2)))
+#define UART_REG(_reg) \
+ ((volatile void __iomem *)CKSEG1ADDR(JZ4740_UART0_BASE_ADDR + \
+ (_reg << 2)))
void prom_putchar(char c)
{
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* Re: [PATCH 13/35] MIPS: jz4740: Cleanup files effected by firmware changes.
2012-06-05 21:19 ` [PATCH 13/35] MIPS: jz4740: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-06 11:38 ` Sergei Shtylyov
2012-06-06 12:18 ` Lars-Peter Clausen
1 sibling, 0 replies; 57+ messages in thread
From: Sergei Shtylyov @ 2012-06-06 11:38 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf
Hello.
On 06-06-2012 1:19, Steven J. Hill wrote:
> From: "Steven J. Hill"<sjhill@mips.com>
> Make headers consistent across the files and make changes based on
> running the checkpatch script.
> Signed-off-by: Steven J. Hill<sjhill@mips.com>
> ---
> arch/mips/jz4740/prom.c | 25 +++++++++----------------
> 1 file changed, 9 insertions(+), 16 deletions(-)
> diff --git a/arch/mips/jz4740/prom.c b/arch/mips/jz4740/prom.c
> index c5071ab..ea86605 100644
> --- a/arch/mips/jz4740/prom.c
> +++ b/arch/mips/jz4740/prom.c
> @@ -1,23 +1,14 @@
> /*
> - * Copyright (C) 2010, Lars-Peter Clausen<lars@metafoo.de>
> - * JZ4740 SoC prom code
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by the
> - * Free Software Foundation; either version 2 of the License, or (at your
> - * option) any later version.
> - *
> - * 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.,
> - * 675 Mass Ave, Cambridge, MA 02139, USA.
> + * JZ4740 SoC prom code
> *
> + * Copyright (C) 2010, Lars-Peter Clausen<lars@metafoo.de>
> + * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
> */
> -
> #include<linux/module.h>
> -#include<linux/kernel.h>
> -#include<linux/init.h>
This header is needed explicitly because '__init' qualifier is used.
Documentation/SubmitChecklist says:
1: If you use a facility then #include the file that defines/declares
that facility. Don't depend on other header files pulling in ones
that you use.
WBR, Sergei
^ permalink raw reply [flat|nested] 57+ messages in thread* Re: [PATCH 13/35] MIPS: jz4740: Cleanup files effected by firmware changes.
2012-06-05 21:19 ` [PATCH 13/35] MIPS: jz4740: Cleanup files effected by firmware changes Steven J. Hill
2012-06-06 11:38 ` Sergei Shtylyov
@ 2012-06-06 12:18 ` Lars-Peter Clausen
1 sibling, 0 replies; 57+ messages in thread
From: Lars-Peter Clausen @ 2012-06-06 12:18 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf
On 06/05/2012 11:19 PM, Steven J. Hill wrote:
> From: "Steven J. Hill" <sjhill@mips.com>
>
> Make headers consistent across the files and make changes based on
> running the checkpatch script.
Why is the cleanup not in the inital patch?
>
> Signed-off-by: Steven J. Hill <sjhill@mips.com>
> ---
> arch/mips/jz4740/prom.c | 25 +++++++++----------------
> 1 file changed, 9 insertions(+), 16 deletions(-)
>
> diff --git a/arch/mips/jz4740/prom.c b/arch/mips/jz4740/prom.c
> index c5071ab..ea86605 100644
> --- a/arch/mips/jz4740/prom.c
> +++ b/arch/mips/jz4740/prom.c
> @@ -1,23 +1,14 @@
> /*
> - * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
> - * JZ4740 SoC prom code
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by the
> - * Free Software Foundation; either version 2 of the License, or (at your
> - * option) any later version.
> - *
> - * 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.,
> - * 675 Mass Ave, Cambridge, MA 02139, USA.
> + * JZ4740 SoC prom code
> *
> + * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
> + * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
> */
Please don't randomly change the license of files.
> -
> #include <linux/module.h>
> -#include <linux/kernel.h>
> -#include <linux/init.h>
> -#include <linux/string.h>
> -
Why can't this be in the previous patch which removed the custom fw args parser?
> #include <linux/serial_reg.h>
>
> #include <asm/fw/fw.h>
> @@ -33,7 +24,9 @@ void __init prom_free_prom_memory(void)
> {
> }
>
> -#define UART_REG(_reg) ((void __iomem *)CKSEG1ADDR(JZ4740_UART0_BASE_ADDR + (_reg << 2)))
> +#define UART_REG(_reg) \
> + ((volatile void __iomem *)CKSEG1ADDR(JZ4740_UART0_BASE_ADDR + \
> + (_reg << 2)))
>
Why did you add volatile here?
> void prom_putchar(char c)
> {
^ permalink raw reply [flat|nested] 57+ messages in thread
* [PATCH 14/35] MIPS: lantiq: Cleanup firmware support for the lantiq platform.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (12 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 13/35] MIPS: jz4740: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 15/35] MIPS: lantiq: Cleanup files effected by firmware changes Steven J. Hill
` (22 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/lantiq/prom.c | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c
index d185e84..aa9da9e 100644
--- a/arch/mips/lantiq/prom.c
+++ b/arch/mips/lantiq/prom.c
@@ -9,9 +9,9 @@
#include <linux/export.h>
#include <linux/clk.h>
#include <linux/of_platform.h>
-#include <asm/bootinfo.h>
#include <asm/time.h>
+#include <asm/fw/fw.h>
#include <lantiq.h>
#include "prom.h"
@@ -36,24 +36,6 @@ void prom_free_prom_memory(void)
{
}
-static void __init prom_init_cmdline(void)
-{
- int argc = fw_arg0;
- char **argv = (char **) KSEG1ADDR(fw_arg1);
- int i;
-
- arcs_cmdline[0] = '\0';
-
- for (i = 0; i < argc; i++) {
- char *p = (char *) KSEG1ADDR(argv[i]);
-
- if (CPHYSADDR(p) && *p) {
- strlcat(arcs_cmdline, p, sizeof(arcs_cmdline));
- strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
- }
- }
-}
-
void __init plat_mem_setup(void)
{
ioport_resource.start = IOPORT_RESOURCE_START;
@@ -78,7 +60,7 @@ void __init prom_init(void)
soc_info.name, soc_info.rev_type);
soc_info.sys_type[LTQ_SYS_TYPE_LEN - 1] = '\0';
pr_info("SoC: %s\n", soc_info.sys_type);
- prom_init_cmdline();
+ fw_init_cmdline();
#if defined(CONFIG_MIPS_MT_SMP)
if (register_vsmp_smp_ops())
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 15/35] MIPS: lantiq: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (13 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 14/35] MIPS: lantiq: Cleanup firmware support for the lantiq platform Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-06 5:38 ` John Crispin
2012-06-05 21:19 ` [PATCH 16/35] MIPS: Lasat: Cleanup firmware support for the Lasat platform Steven J. Hill
` (21 subsequent siblings)
36 siblings, 1 reply; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/lantiq/prom.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c
index aa9da9e..56470c6 100644
--- a/arch/mips/lantiq/prom.c
+++ b/arch/mips/lantiq/prom.c
@@ -1,15 +1,15 @@
/*
- * 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.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
* Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
#include <linux/export.h>
#include <linux/clk.h>
#include <linux/of_platform.h>
-#include <asm/time.h>
+#include <linux/time.h>
#include <asm/fw/fw.h>
#include <lantiq.h>
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* Re: [PATCH 15/35] MIPS: lantiq: Cleanup files effected by firmware changes.
2012-06-05 21:19 ` [PATCH 15/35] MIPS: lantiq: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-06 5:38 ` John Crispin
0 siblings, 0 replies; 57+ messages in thread
From: John Crispin @ 2012-06-06 5:38 UTC (permalink / raw)
To: linux-mips
On 05/06/12 23:19, Steven J. Hill wrote:
> From: "Steven J. Hill" <sjhill@mips.com>
>
> Make headers consistent across the files and make changes based on
> running the checkpatch script.
i dont see any checkpatch related changes
>
> Signed-off-by: Steven J. Hill <sjhill@mips.com>
> ---
> arch/mips/lantiq/prom.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c
> index aa9da9e..56470c6 100644
> --- a/arch/mips/lantiq/prom.c
> +++ b/arch/mips/lantiq/prom.c
> @@ -1,15 +1,15 @@
> /*
> - * 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.
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> *
The change in License is not related to the Subject / commit message.
Why do you change the license in the first place ? the code was GPLv2
and after your change it only GPL ?
NAK on this one ...
> * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
> + * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
Does a include fixup justify a Copyright holder change ?
> */
> -
> #include <linux/export.h>
> #include <linux/clk.h>
> #include <linux/of_platform.h>
> -#include <asm/time.h>
> +#include <linux/time.h>
>
> #include <asm/fw/fw.h>
> #include <lantiq.h>
^ permalink raw reply [flat|nested] 57+ messages in thread
* [PATCH 16/35] MIPS: Lasat: Cleanup firmware support for the Lasat platform.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (14 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 15/35] MIPS: lantiq: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 17/35] MIPS: Lasat: Cleanup files effected by firmware changes Steven J. Hill
` (20 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/lasat/prom.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/arch/mips/lasat/prom.c b/arch/mips/lasat/prom.c
index 20fde19..8bd3994 100644
--- a/arch/mips/lasat/prom.c
+++ b/arch/mips/lasat/prom.c
@@ -9,7 +9,7 @@
#include <linux/mm.h>
#include <linux/bootmem.h>
#include <linux/ioport.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <asm/lasat/lasat.h>
#include <asm/cpu.h>
@@ -81,9 +81,6 @@ static struct at93c_defs at93c_defs[N_MACHTYPES] = {
void __init prom_init(void)
{
- int argc = fw_arg0;
- char **argv = (char **) fw_arg1;
-
setup_prom_vectors();
if (IS_LASAT_200()) {
@@ -98,11 +95,7 @@ void __init prom_init(void)
lasat_init_board_info(); /* Read info from EEPROM */
- /* Get the command line */
- if (argc > 0) {
- strncpy(arcs_cmdline, argv[0], COMMAND_LINE_SIZE-1);
- arcs_cmdline[COMMAND_LINE_SIZE-1] = '\0';
- }
+ fw_init_cmdline();
/* Set the I/O base address */
set_io_port_base(KSEG1);
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 17/35] MIPS: Lasat: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (15 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 16/35] MIPS: Lasat: Cleanup firmware support for the Lasat platform Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-06 11:54 ` Sergei Shtylyov
2012-06-05 21:19 ` [PATCH 18/35] MIPS: Loongson: Cleanup firmware support for the Loongson platform Steven J. Hill
` (19 subsequent siblings)
36 siblings, 1 reply; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/lasat/prom.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/arch/mips/lasat/prom.c b/arch/mips/lasat/prom.c
index 8bd3994..0091351 100644
--- a/arch/mips/lasat/prom.c
+++ b/arch/mips/lasat/prom.c
@@ -2,19 +2,18 @@
* PROM interface routines.
*/
#include <linux/types.h>
-#include <linux/init.h>
#include <linux/string.h>
#include <linux/ctype.h>
-#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/bootmem.h>
#include <linux/ioport.h>
+#include <linux/cpu.h>
+
#include <asm/fw/fw.h>
#include <asm/lasat/lasat.h>
-#include <asm/cpu.h>
+#include <asm/lasat/eeprom.h>
#include "at93c.h"
-#include <asm/lasat/eeprom.h>
#include "prom.h"
#define RESET_VECTOR 0xbfc00000
@@ -58,7 +57,7 @@ static void setup_prom_vectors(void)
__prom_putc = (void *)PROM_PUTC_ADDR;
prom_monitor = (void *)PROM_MONITOR_ADDR;
}
- printk(KERN_DEBUG "prom vectors set up\n");
+ pr_debug("prom vectors set up\n");
}
static struct at93c_defs at93c_defs[N_MACHTYPES] = {
@@ -84,11 +83,11 @@ void __init prom_init(void)
setup_prom_vectors();
if (IS_LASAT_200()) {
- printk(KERN_INFO "LASAT 200 board\n");
+ pr_info("LASAT 200 board\n");
lasat_ndelay_divider = LASAT_200_DIVIDER;
at93c = &at93c_defs[1];
} else {
- printk(KERN_INFO "LASAT 100 board\n");
+ pr_info("LASAT 100 board\n");
lasat_ndelay_divider = LASAT_100_DIVIDER;
at93c = &at93c_defs[0];
}
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* Re: [PATCH 17/35] MIPS: Lasat: Cleanup files effected by firmware changes.
2012-06-05 21:19 ` [PATCH 17/35] MIPS: Lasat: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-06 11:54 ` Sergei Shtylyov
0 siblings, 0 replies; 57+ messages in thread
From: Sergei Shtylyov @ 2012-06-06 11:54 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf
Hello.
On 06-06-2012 1:19, Steven J. Hill wrote:
> From: "Steven J. Hill"<sjhill@mips.com>
> Make headers consistent across the files
It's the case where you don't do it (forgot? :-).
> and make changes based on running the checkpatch script.
> Signed-off-by: Steven J. Hill<sjhill@mips.com>
> ---
> arch/mips/lasat/prom.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/arch/mips/lasat/prom.c b/arch/mips/lasat/prom.c
> index 8bd3994..0091351 100644
> --- a/arch/mips/lasat/prom.c
> +++ b/arch/mips/lasat/prom.c
> @@ -2,19 +2,18 @@
> * PROM interface routines.
> */
> #include<linux/types.h>
> -#include<linux/init.h>
No, it should be left intact because '__init' is used.
> #include<linux/string.h>
> #include<linux/ctype.h>
> -#include<linux/kernel.h>
Doesn't the code use printk()?
> @@ -58,7 +57,7 @@ static void setup_prom_vectors(void)
> __prom_putc = (void *)PROM_PUTC_ADDR;
> prom_monitor = (void *)PROM_MONITOR_ADDR;
> }
> - printk(KERN_DEBUG "prom vectors set up\n");
> + pr_debug("prom vectors set up\n");
Changes behavior: now you need to #define DEBUG at the start of file for
anything to be printed here.
WBR, Sergei
^ permalink raw reply [flat|nested] 57+ messages in thread
* [PATCH 18/35] MIPS: Loongson: Cleanup firmware support for the Loongson platform.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (16 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 17/35] MIPS: Lasat: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 19/35] MIPS: Loongson: Cleanup files effected by firmware changes Steven J. Hill
` (18 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/include/asm/mach-loongson/loongson.h | 3 +-
arch/mips/loongson/common/Makefile | 2 +-
arch/mips/loongson/common/cmdline.c | 48 ------------------------
arch/mips/loongson/common/env.c | 31 ++++-----------
arch/mips/loongson/common/init.c | 6 ++-
5 files changed, 13 insertions(+), 77 deletions(-)
delete mode 100644 arch/mips/loongson/common/cmdline.c
diff --git a/arch/mips/include/asm/mach-loongson/loongson.h b/arch/mips/include/asm/mach-loongson/loongson.h
index 1e29b9d..b19c5b4 100644
--- a/arch/mips/include/asm/mach-loongson/loongson.h
+++ b/arch/mips/include/asm/mach-loongson/loongson.h
@@ -28,9 +28,8 @@ extern unsigned long memsize, highmemsize;
/* loongson-specific command line, env and memory initialization */
extern void __init prom_init_memory(void);
-extern void __init prom_init_cmdline(void);
extern void __init prom_init_machtype(void);
-extern void __init prom_init_env(void);
+extern void __init fw_init_env(void);
#ifdef CONFIG_LOONGSON_UART_BASE
extern unsigned long _loongson_uart_base, loongson_uart_base;
extern void prom_init_loongson_uart_base(void);
diff --git a/arch/mips/loongson/common/Makefile b/arch/mips/loongson/common/Makefile
index e526488..5267e33 100644
--- a/arch/mips/loongson/common/Makefile
+++ b/arch/mips/loongson/common/Makefile
@@ -2,7 +2,7 @@
# Makefile for loongson based machines.
#
-obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \
+obj-y += setup.o init.o env.o time.o reset.o irq.o \
pci.o bonito-irq.o mem.o machtype.o platform.o
obj-$(CONFIG_GENERIC_GPIO) += gpio.o
diff --git a/arch/mips/loongson/common/cmdline.c b/arch/mips/loongson/common/cmdline.c
deleted file mode 100644
index 353e1d2..0000000
--- a/arch/mips/loongson/common/cmdline.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Based on Ocelot Linux port, which is
- * Copyright 2001 MontaVista Software Inc.
- * Author: jsun@mvista.com or jsun@junsun.net
- *
- * Copyright 2003 ICT CAS
- * Author: Michael Guo <guoyi@ict.ac.cn>
- *
- * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
- * Author: Fuxin Zhang, zhangfx@lemote.com
- *
- * Copyright (C) 2009 Lemote Inc.
- * Author: Wu Zhangjin, wuzhangjin@gmail.com
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- */
-#include <asm/bootinfo.h>
-
-#include <loongson.h>
-
-void __init prom_init_cmdline(void)
-{
- int prom_argc;
- /* pmon passes arguments in 32bit pointers */
- int *_prom_argv;
- int i;
- long l;
-
- /* firmware arguments are initialized in head.S */
- prom_argc = fw_arg0;
- _prom_argv = (int *)fw_arg1;
-
- /* arg[0] is "g", the rest is boot parameters */
- arcs_cmdline[0] = '\0';
- for (i = 1; i < prom_argc; i++) {
- l = (long)_prom_argv[i];
- if (strlen(arcs_cmdline) + strlen(((char *)l) + 1)
- >= sizeof(arcs_cmdline))
- break;
- strcat(arcs_cmdline, ((char *)l));
- strcat(arcs_cmdline, " ");
- }
-
- prom_init_machtype();
-}
diff --git a/arch/mips/loongson/common/env.c b/arch/mips/loongson/common/env.c
index d93830a..681690a 100644
--- a/arch/mips/loongson/common/env.c
+++ b/arch/mips/loongson/common/env.c
@@ -19,7 +19,7 @@
*/
#include <linux/module.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <loongson.h>
@@ -27,34 +27,17 @@ unsigned long cpu_clock_freq;
EXPORT_SYMBOL(cpu_clock_freq);
unsigned long memsize, highmemsize;
-#define parse_even_earlier(res, option, p) \
-do { \
- unsigned int tmp __maybe_unused; \
- \
- if (strncmp(option, (char *)p, strlen(option)) == 0) \
- tmp = strict_strtol((char *)p + strlen(option"="), 10, &res); \
-} while (0)
-
-void __init prom_init_env(void)
+void __init fw_init_env(void)
{
- /* pmon passes arguments in 32bit pointers */
- int *_prom_envp;
+ /* PMON passes arguments in 32bit pointers */
unsigned long bus_clock;
unsigned int processor_id;
- long l;
- /* firmware arguments are initialized in head.S */
- _prom_envp = (int *)fw_arg2;
+ bus_clock = fw_getenvl("busclock");
+ cpu_clock_freq = fw_getenvl("cpuclock");
+ memsize = fw_getenvl("memsize");
+ highmemsize = fw_getenvl("highmemsize");
- l = (long)*_prom_envp;
- while (l != 0) {
- parse_even_earlier(bus_clock, "busclock", l);
- parse_even_earlier(cpu_clock_freq, "cpuclock", l);
- parse_even_earlier(memsize, "memsize", l);
- parse_even_earlier(highmemsize, "highmemsize", l);
- _prom_envp++;
- l = (long)*_prom_envp;
- }
if (memsize == 0)
memsize = 256;
if (bus_clock == 0)
diff --git a/arch/mips/loongson/common/init.c b/arch/mips/loongson/common/init.c
index 19d3415..a40ab27 100644
--- a/arch/mips/loongson/common/init.c
+++ b/arch/mips/loongson/common/init.c
@@ -10,6 +10,8 @@
#include <linux/bootmem.h>
+#include <asm/fw/fw.h>
+
#include <loongson.h>
/* Loongson CPU address windows config space base address */
@@ -26,8 +28,8 @@ void __init prom_init(void)
ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE);
#endif
- prom_init_cmdline();
- prom_init_env();
+ fw_init_cmdline();
+ fw_init_env();
prom_init_memory();
/*init the uart base address */
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 19/35] MIPS: Loongson: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (17 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 18/35] MIPS: Loongson: Cleanup firmware support for the Loongson platform Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 20/35] MIPS: Malta: Cleanup firmware support for the Malta platform Steven J. Hill
` (17 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/include/asm/mach-loongson/loongson.h | 51 ++++++++++++------------
arch/mips/loongson/common/env.c | 9 +++--
arch/mips/loongson/common/init.c | 10 ++---
3 files changed, 36 insertions(+), 34 deletions(-)
diff --git a/arch/mips/include/asm/mach-loongson/loongson.h b/arch/mips/include/asm/mach-loongson/loongson.h
index b19c5b4..57537e6 100644
--- a/arch/mips/include/asm/mach-loongson/loongson.h
+++ b/arch/mips/include/asm/mach-loongson/loongson.h
@@ -1,11 +1,12 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* Copyright (C) 2009 Lemote, Inc.
* Author: Wu Zhangjin <wuzhangjin@gmail.com>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
#ifndef __ASM_MACH_LOONGSON_LOONGSON_H
@@ -80,13 +81,13 @@ static inline void do_perfcnt_IRQ(void)
#define LOONGSON_BOOT_BASE 0x1fc00000
#define LOONGSON_BOOT_SIZE 0x00100000 /* 1M */
-#define LOONGSON_BOOT_TOP (LOONGSON_BOOT_BASE+LOONGSON_BOOT_SIZE-1)
-#define LOONGSON_REG_BASE 0x1fe00000
-#define LOONGSON_REG_SIZE 0x00100000 /* 256Bytes + 256Bytes + ??? */
+#define LOONGSON_BOOT_TOP (LOONGSON_BOOT_BASE+LOONGSON_BOOT_SIZE-1)
+#define LOONGSON_REG_BASE 0x1fe00000
+#define LOONGSON_REG_SIZE 0x00100000 /* 256Bytes + 256Bytes + ??? */
#define LOONGSON_REG_TOP (LOONGSON_REG_BASE+LOONGSON_REG_SIZE-1)
-#define LOONGSON_LIO1_BASE 0x1ff00000
-#define LOONGSON_LIO1_SIZE 0x00100000 /* 1M */
+#define LOONGSON_LIO1_BASE 0x1ff00000
+#define LOONGSON_LIO1_SIZE 0x00100000 /* 1M */
#define LOONGSON_LIO1_TOP (LOONGSON_LIO1_BASE+LOONGSON_LIO1_SIZE-1)
#define LOONGSON_PCILO0_BASE 0x10000000
@@ -113,13 +114,13 @@ static inline void do_perfcnt_IRQ(void)
#define LOONGSON_PCI_REG(x) LOONGSON_REG(LOONGSON_PCICONFIGBASE + (x))
#define LOONGSON_PCIDID LOONGSON_PCI_REG(0x00)
#define LOONGSON_PCICMD LOONGSON_PCI_REG(0x04)
-#define LOONGSON_PCICLASS LOONGSON_PCI_REG(0x08)
+#define LOONGSON_PCICLASS LOONGSON_PCI_REG(0x08)
#define LOONGSON_PCILTIMER LOONGSON_PCI_REG(0x0c)
-#define LOONGSON_PCIBASE0 LOONGSON_PCI_REG(0x10)
-#define LOONGSON_PCIBASE1 LOONGSON_PCI_REG(0x14)
-#define LOONGSON_PCIBASE2 LOONGSON_PCI_REG(0x18)
-#define LOONGSON_PCIBASE3 LOONGSON_PCI_REG(0x1c)
-#define LOONGSON_PCIBASE4 LOONGSON_PCI_REG(0x20)
+#define LOONGSON_PCIBASE0 LOONGSON_PCI_REG(0x10)
+#define LOONGSON_PCIBASE1 LOONGSON_PCI_REG(0x14)
+#define LOONGSON_PCIBASE2 LOONGSON_PCI_REG(0x18)
+#define LOONGSON_PCIBASE3 LOONGSON_PCI_REG(0x1c)
+#define LOONGSON_PCIBASE4 LOONGSON_PCI_REG(0x20)
#define LOONGSON_PCIEXPRBASE LOONGSON_PCI_REG(0x30)
#define LOONGSON_PCIINT LOONGSON_PCI_REG(0x3c)
@@ -130,7 +131,7 @@ static inline void do_perfcnt_IRQ(void)
#define LOONGSON_PCICMD_MABORT_CLR 0x20000000
#define LOONGSON_PCICMD_MTABORT_CLR 0x10000000
#define LOONGSON_PCICMD_TABORT_CLR 0x08000000
-#define LOONGSON_PCICMD_MPERR_CLR 0x01000000
+#define LOONGSON_PCICMD_MPERR_CLR 0x01000000
#define LOONGSON_PCICMD_PERRRESPEN 0x00000040
#define LOONGSON_PCICMD_ASTEPEN 0x00000080
#define LOONGSON_PCICMD_SERREN 0x00000100
@@ -171,25 +172,25 @@ static inline void do_perfcnt_IRQ(void)
/* GPIO Regs - r/w */
-#define LOONGSON_GPIODATA LOONGSON_REG(LOONGSON_REGBASE + 0x1c)
+#define LOONGSON_GPIODATA LOONGSON_REG(LOONGSON_REGBASE + 0x1c)
#define LOONGSON_GPIOIE LOONGSON_REG(LOONGSON_REGBASE + 0x20)
/* ICU Configuration Regs - r/w */
#define LOONGSON_INTEDGE LOONGSON_REG(LOONGSON_REGBASE + 0x24)
-#define LOONGSON_INTSTEER LOONGSON_REG(LOONGSON_REGBASE + 0x28)
+#define LOONGSON_INTSTEER LOONGSON_REG(LOONGSON_REGBASE + 0x28)
#define LOONGSON_INTPOL LOONGSON_REG(LOONGSON_REGBASE + 0x2c)
/* ICU Enable Regs - IntEn & IntISR are r/o. */
-#define LOONGSON_INTENSET LOONGSON_REG(LOONGSON_REGBASE + 0x30)
-#define LOONGSON_INTENCLR LOONGSON_REG(LOONGSON_REGBASE + 0x34)
+#define LOONGSON_INTENSET LOONGSON_REG(LOONGSON_REGBASE + 0x30)
+#define LOONGSON_INTENCLR LOONGSON_REG(LOONGSON_REGBASE + 0x34)
#define LOONGSON_INTEN LOONGSON_REG(LOONGSON_REGBASE + 0x38)
#define LOONGSON_INTISR LOONGSON_REG(LOONGSON_REGBASE + 0x3c)
/* ICU */
#define LOONGSON_ICU_MBOXES 0x0000000f
-#define LOONGSON_ICU_MBOXES_SHIFT 0
+#define LOONGSON_ICU_MBOXES_SHIFT 0
#define LOONGSON_ICU_DMARDY 0x00000010
#define LOONGSON_ICU_DMAEMPTY 0x00000020
#define LOONGSON_ICU_COPYRDY 0x00000040
@@ -210,10 +211,10 @@ static inline void do_perfcnt_IRQ(void)
/* PCI prefetch window base & mask */
-#define LOONGSON_MEM_WIN_BASE_L LOONGSON_REG(LOONGSON_REGBASE + 0x40)
-#define LOONGSON_MEM_WIN_BASE_H LOONGSON_REG(LOONGSON_REGBASE + 0x44)
-#define LOONGSON_MEM_WIN_MASK_L LOONGSON_REG(LOONGSON_REGBASE + 0x48)
-#define LOONGSON_MEM_WIN_MASK_H LOONGSON_REG(LOONGSON_REGBASE + 0x4c)
+#define LOONGSON_MEM_WIN_BASE_L LOONGSON_REG(LOONGSON_REGBASE + 0x40)
+#define LOONGSON_MEM_WIN_BASE_H LOONGSON_REG(LOONGSON_REGBASE + 0x44)
+#define LOONGSON_MEM_WIN_MASK_L LOONGSON_REG(LOONGSON_REGBASE + 0x48)
+#define LOONGSON_MEM_WIN_MASK_H LOONGSON_REG(LOONGSON_REGBASE + 0x4c)
/* PCI_Hit*_Sel_* */
diff --git a/arch/mips/loongson/common/env.c b/arch/mips/loongson/common/env.c
index 681690a..b2cd683 100644
--- a/arch/mips/loongson/common/env.c
+++ b/arch/mips/loongson/common/env.c
@@ -1,4 +1,8 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* Based on Ocelot Linux port, which is
* Copyright 2001 MontaVista Software Inc.
* Author: jsun@mvista.com or jsun@junsun.net
@@ -12,10 +16,7 @@
* Copyright (C) 2009 Lemote Inc.
* Author: Wu Zhangjin, wuzhangjin@gmail.com
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
#include <linux/module.h>
diff --git a/arch/mips/loongson/common/init.c b/arch/mips/loongson/common/init.c
index a40ab27..818ace6 100644
--- a/arch/mips/loongson/common/init.c
+++ b/arch/mips/loongson/common/init.c
@@ -1,13 +1,13 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* Copyright (C) 2009 Lemote Inc.
* Author: Wu Zhangjin, wuzhangjin@gmail.com
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
#include <linux/bootmem.h>
#include <asm/fw/fw.h>
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 20/35] MIPS: Malta: Cleanup firmware support for the Malta platform.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (18 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 19/35] MIPS: Loongson: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 21/35] MIPS: Malta: Cleanup files effected by firmware changes Steven J. Hill
` (16 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/include/asm/mips-boards/generic.h | 9 +---
arch/mips/include/asm/mips-boards/prom.h | 47 -----------------
arch/mips/mti-malta/Makefile | 2 +-
arch/mips/mti-malta/malta-cmdline.c | 59 ---------------------
arch/mips/mti-malta/malta-display.c | 1 -
arch/mips/mti-malta/malta-init.c | 51 +++---------------
arch/mips/mti-malta/malta-memory.c | 76 ++++++++-------------------
arch/mips/mti-malta/malta-setup.c | 9 ++--
arch/mips/mti-malta/malta-time.c | 1 -
9 files changed, 38 insertions(+), 217 deletions(-)
delete mode 100644 arch/mips/include/asm/mips-boards/prom.h
delete mode 100644 arch/mips/mti-malta/malta-cmdline.c
diff --git a/arch/mips/include/asm/mips-boards/generic.h b/arch/mips/include/asm/mips-boards/generic.h
index 6e23ceb..cf20a30 100644
--- a/arch/mips/include/asm/mips-boards/generic.h
+++ b/arch/mips/include/asm/mips-boards/generic.h
@@ -30,13 +30,6 @@
#define ASCII_DISPLAY_WORD_BASE 0x1f000410
#define ASCII_DISPLAY_POS_BASE 0x1f000418
-
-/*
- * Yamon Prom print address.
- */
-#define YAMON_PROM_PRINT_ADDR 0x1fc00504
-
-
/*
* Reset register.
*/
@@ -93,4 +86,6 @@ extern void mips_pcibios_init(void);
#define mips_pcibios_init() do { } while (0)
#endif
+extern void mips_scroll_message(void);
+
#endif /* __ASM_MIPS_BOARDS_GENERIC_H */
diff --git a/arch/mips/include/asm/mips-boards/prom.h b/arch/mips/include/asm/mips-boards/prom.h
deleted file mode 100644
index a9db576..0000000
--- a/arch/mips/include/asm/mips-boards/prom.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 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.
- *
- * ########################################################################
- *
- * MIPS boards bootprom interface for the Linux kernel.
- *
- */
-
-#ifndef _MIPS_PROM_H
-#define _MIPS_PROM_H
-
-extern char *prom_getcmdline(void);
-extern char *prom_getenv(char *name);
-extern void prom_init_cmdline(void);
-extern void prom_meminit(void);
-extern void prom_fixup_mem_map(unsigned long start_mem, unsigned long end_mem);
-extern void mips_display_message(const char *str);
-extern void mips_display_word(unsigned int num);
-extern void mips_scroll_message(void);
-extern int get_ethernet_addr(char *ethernet_addr);
-
-/* Memory descriptor management. */
-#define PROM_MAX_PMEMBLOCKS 32
-struct prom_pmemblock {
- unsigned long base; /* Within KSEG0. */
- unsigned int size; /* In bytes. */
- unsigned int type; /* free or prom memory */
-};
-
-#endif /* !(_MIPS_PROM_H) */
diff --git a/arch/mips/mti-malta/Makefile b/arch/mips/mti-malta/Makefile
index 6079ef3..8d64bd4 100644
--- a/arch/mips/mti-malta/Makefile
+++ b/arch/mips/mti-malta/Makefile
@@ -5,7 +5,7 @@
# Copyright (C) 2008 Wind River Systems, Inc.
# written by Ralf Baechle <ralf@linux-mips.org>
#
-obj-y := malta-amon.o malta-cmdline.o \
+obj-y := malta-amon.o \
malta-display.o malta-init.o malta-int.o \
malta-memory.o malta-platform.o \
malta-reset.o malta-setup.o malta-time.o
diff --git a/arch/mips/mti-malta/malta-cmdline.c b/arch/mips/mti-malta/malta-cmdline.c
deleted file mode 100644
index 1871c30..0000000
--- a/arch/mips/mti-malta/malta-cmdline.c
+++ /dev/null
@@ -1,59 +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.
- *
- * Kernel command line creation using the prom monitor (YAMON) argc/argv.
- */
-#include <linux/init.h>
-#include <linux/string.h>
-
-#include <asm/bootinfo.h>
-
-extern int prom_argc;
-extern int *_prom_argv;
-
-/*
- * YAMON (32-bit PROM) pass arguments and environment as 32-bit pointer.
- * This macro take care of sign extension.
- */
-#define prom_argv(index) ((char *)(long)_prom_argv[(index)])
-
-char * __init prom_getcmdline(void)
-{
- return &(arcs_cmdline[0]);
-}
-
-
-void __init prom_init_cmdline(void)
-{
- char *cp;
- int actr;
-
- actr = 1; /* Always ignore argv[0] */
-
- cp = &(arcs_cmdline[0]);
- while(actr < prom_argc) {
- strcpy(cp, prom_argv(actr));
- cp += strlen(prom_argv(actr));
- *cp++ = ' ';
- actr++;
- }
- if (cp != &(arcs_cmdline[0])) {
- /* get rid of trailing space */
- --cp;
- *cp = '\0';
- }
-}
diff --git a/arch/mips/mti-malta/malta-display.c b/arch/mips/mti-malta/malta-display.c
index 7c8828f..2a0057c 100644
--- a/arch/mips/mti-malta/malta-display.c
+++ b/arch/mips/mti-malta/malta-display.c
@@ -22,7 +22,6 @@
#include <linux/timer.h>
#include <asm/io.h>
#include <asm/mips-boards/generic.h>
-#include <asm/mips-boards/prom.h>
extern const char display_string[];
static unsigned int display_count;
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
index 27a6cdb..9844f31 100644
--- a/arch/mips/mti-malta/malta-init.c
+++ b/arch/mips/mti-malta/malta-init.c
@@ -23,31 +23,21 @@
#include <linux/string.h>
#include <linux/kernel.h>
-#include <asm/bootinfo.h>
#include <asm/gt64120.h>
#include <asm/io.h>
#include <asm/cacheflush.h>
#include <asm/smp-ops.h>
#include <asm/traps.h>
+#include <asm/fw/fw.h>
#include <asm/gcmpregs.h>
-#include <asm/mips-boards/prom.h>
#include <asm/mips-boards/generic.h>
#include <asm/mips-boards/bonito64.h>
#include <asm/mips-boards/msc01_pci.h>
#include <asm/mips-boards/malta.h>
-int prom_argc;
-int *_prom_argv, *_prom_envp;
-
-/*
- * YAMON (32-bit PROM) pass arguments and environment as 32-bit pointer.
- * This macro take care of sign extension, if running in 64-bit mode.
- */
-#define prom_envp(index) ((char *)(long)_prom_envp[(index)])
-
-int init_debug;
+extern void mips_display_message(const char *str);
static int mips_revision_corid;
int mips_revision_sconid;
@@ -62,28 +52,6 @@ unsigned long _pcictrl_gt64120;
/* MIPS System controller register base */
unsigned long _pcictrl_msc;
-char *prom_getenv(char *envname)
-{
- /*
- * Return a pointer to the given environment variable.
- * In 64-bit mode: we're using 64-bit pointers, but all pointers
- * in the PROM structures are only 32-bit, so we need some
- * workarounds, if we are running in 64-bit mode.
- */
- int i, index=0;
-
- i = strlen(envname);
-
- while (prom_envp(index)) {
- if(strncmp(envname, prom_envp(index), i) == 0) {
- return(prom_envp(index+1));
- }
- index += 2;
- }
-
- return NULL;
-}
-
static inline unsigned char str2hexnum(unsigned char c)
{
if (c >= '0' && c <= '9')
@@ -138,8 +106,8 @@ static void __init console_config(void)
char parity = '\0', bits = '\0', flow = '\0';
char *s;
- if ((strstr(prom_getcmdline(), "console=")) == NULL) {
- s = prom_getenv("modetty0");
+ if ((strstr(fw_getcmdline(), "console=")) == NULL) {
+ s = fw_getenv("modetty0");
if (s) {
while (*s >= '0' && *s <= '9')
baud = baud*10 + *s++ - '0';
@@ -159,7 +127,7 @@ static void __init console_config(void)
if (flow == '\0')
flow = 'r';
sprintf(console_string, " console=ttyS0,%d%c%c%c", baud, parity, bits, flow);
- strcat(prom_getcmdline(), console_string);
+ strcat(fw_getcmdline(), console_string);
pr_info("Config serial console:%s\n", console_string);
}
}
@@ -193,10 +161,6 @@ extern struct plat_smp_ops msmtc_smp_ops;
void __init prom_init(void)
{
- prom_argc = fw_arg0;
- _prom_argv = (int *) fw_arg1;
- _prom_envp = (int *) fw_arg2;
-
mips_display_message("LINUX");
/*
@@ -353,8 +317,9 @@ void __init prom_init(void)
board_nmi_handler_setup = mips_nmi_setup;
board_ejtag_handler_setup = mips_ejtag_setup;
- prom_init_cmdline();
- prom_meminit();
+ fw_init_cmdline();
+ fw_meminit();
+
#ifdef CONFIG_SERIAL_8250_CONSOLE
console_config();
#endif
diff --git a/arch/mips/mti-malta/malta-memory.c b/arch/mips/mti-malta/malta-memory.c
index a96d281..cddcd46 100644
--- a/arch/mips/mti-malta/malta-memory.c
+++ b/arch/mips/mti-malta/malta-memory.c
@@ -24,50 +24,31 @@
#include <linux/pfn.h>
#include <linux/string.h>
-#include <asm/bootinfo.h>
#include <asm/page.h>
#include <asm/sections.h>
+#include <asm/fw/fw.h>
-#include <asm/mips-boards/prom.h>
-
-/*#define DEBUG*/
-
-enum yamon_memtypes {
- yamon_dontuse,
- yamon_prom,
- yamon_free,
-};
-static struct prom_pmemblock mdesc[PROM_MAX_PMEMBLOCKS];
-
-#ifdef DEBUG
-static char *mtypes[3] = {
- "Dont use memory",
- "YAMON PROM memory",
- "Free memory",
-};
-#endif
+static fw_memblock_t mdesc[FW_MAX_MEMBLOCKS];
/* determined physical memory size, not overridden by command line args */
unsigned long physical_memsize = 0L;
-static struct prom_pmemblock * __init prom_getmdesc(void)
+fw_memblock_t * __init fw_getmdesc(void)
{
- char *memsize_str;
+ char *memsize_str, *ptr;
unsigned int memsize;
- char *ptr;
static char cmdline[COMMAND_LINE_SIZE] __initdata;
+ long val;
+ int tmp;
/* otherwise look in the environment */
- memsize_str = prom_getenv("memsize");
+ memsize_str = fw_getenv("memsize");
if (!memsize_str) {
- printk(KERN_WARNING
- "memsize not set in boot prom, set to default (32Mb)\n");
+ pr_warn("memsize not set in YAMON, set to default (32Mb)\n");
physical_memsize = 0x02000000;
} else {
-#ifdef DEBUG
- pr_debug("prom_memsize = %s\n", memsize_str);
-#endif
- physical_memsize = simple_strtol(memsize_str, NULL, 0);
+ tmp = kstrtol(memsize_str, 0, &val);
+ physical_memsize = (unsigned long)val;
}
#ifdef CONFIG_CPU_BIG_ENDIAN
@@ -90,11 +71,11 @@ static struct prom_pmemblock * __init prom_getmdesc(void)
memset(mdesc, 0, sizeof(mdesc));
- mdesc[0].type = yamon_dontuse;
+ mdesc[0].type = fw_dontuse;
mdesc[0].base = 0x00000000;
mdesc[0].size = 0x00001000;
- mdesc[1].type = yamon_prom;
+ mdesc[1].type = fw_code;
mdesc[1].base = 0x00001000;
mdesc[1].size = 0x000ef000;
@@ -105,55 +86,44 @@ static struct prom_pmemblock * __init prom_getmdesc(void)
* This mean that this area can't be used as DMA memory for PCI
* devices.
*/
- mdesc[2].type = yamon_dontuse;
+ mdesc[2].type = fw_dontuse;
mdesc[2].base = 0x000f0000;
mdesc[2].size = 0x00010000;
- mdesc[3].type = yamon_dontuse;
+ mdesc[3].type = fw_dontuse;
mdesc[3].base = 0x00100000;
mdesc[3].size = CPHYSADDR(PFN_ALIGN((unsigned long)&_end)) - mdesc[3].base;
- mdesc[4].type = yamon_free;
+ mdesc[4].type = fw_free;
mdesc[4].base = CPHYSADDR(PFN_ALIGN(&_end));
mdesc[4].size = memsize - mdesc[4].base;
return &mdesc[0];
}
-static int __init prom_memtype_classify(unsigned int type)
+static int __init fw_memtype_classify(unsigned int type)
{
switch (type) {
- case yamon_free:
+ case fw_free:
return BOOT_MEM_RAM;
- case yamon_prom:
+ case fw_code:
return BOOT_MEM_ROM_DATA;
default:
return BOOT_MEM_RESERVED;
}
}
-void __init prom_meminit(void)
+void __init fw_meminit(void)
{
- struct prom_pmemblock *p;
+ fw_memblock_t *p;
-#ifdef DEBUG
- pr_debug("YAMON MEMORY DESCRIPTOR dump:\n");
- p = prom_getmdesc();
- while (p->size) {
- int i = 0;
- pr_debug("[%d,%p]: base<%08lx> size<%08lx> type<%s>\n",
- i, p, p->base, p->size, mtypes[p->type]);
- p++;
- i++;
- }
-#endif
- p = prom_getmdesc();
+ p = fw_getmdesc();
while (p->size) {
long type;
unsigned long base, size;
- type = prom_memtype_classify(p->type);
+ type = fw_memtype_classify(p->type);
base = p->base;
size = p->size;
@@ -172,7 +142,7 @@ void __init prom_free_prom_memory(void)
continue;
addr = boot_mem_map.map[i].addr;
- free_init_pages("prom memory",
+ free_init_pages("YAMON memory",
addr, addr + boot_mem_map.map[i].size);
}
}
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
index 2e28f65..08cdf8f 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c
@@ -25,9 +25,8 @@
#include <linux/screen_info.h>
#include <linux/time.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.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>
@@ -115,7 +114,7 @@ static void __init pci_clock_check(void)
33, 20, 25, 30, 12, 16, 37, 10
};
int pciclock = pciclocks[jmpr];
- char *argptr = prom_getcmdline();
+ char *argptr = fw_getcmdline();
if (pciclock != 33 && !strstr(argptr, "idebus=")) {
printk(KERN_WARNING "WARNING: PCI clock is %dMHz, "
@@ -153,7 +152,7 @@ static void __init bonito_quirks_setup(void)
{
char *argptr;
- argptr = prom_getcmdline();
+ argptr = fw_getcmdline();
if (strstr(argptr, "debug")) {
BONITO_BONGENCFG |= BONITO_BONGENCFG_DEBUGMODE;
printk(KERN_INFO "Enabled Bonito debug mode\n");
@@ -165,7 +164,7 @@ static void __init bonito_quirks_setup(void)
BONITO_PCICACHECTRL |= BONITO_PCICACHECTRL_CPUCOH_EN;
printk(KERN_INFO "Enabled Bonito CPU coherency\n");
- argptr = prom_getcmdline();
+ argptr = fw_getcmdline();
if (strstr(argptr, "iobcuncached")) {
BONITO_PCICACHECTRL &= ~BONITO_PCICACHECTRL_IOBCCOH_EN;
BONITO_PCIMEMBASECFG = BONITO_PCIMEMBASECFG &
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c
index 115f5bc..8a5d589 100644
--- a/arch/mips/mti-malta/malta-time.c
+++ b/arch/mips/mti-malta/malta-time.c
@@ -41,7 +41,6 @@
#include <asm/msc01_ic.h>
#include <asm/mips-boards/generic.h>
-#include <asm/mips-boards/prom.h>
#include <asm/mips-boards/maltaint.h>
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 21/35] MIPS: Malta: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (19 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 20/35] MIPS: Malta: Cleanup firmware support for the Malta platform Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 22/35] MIPS: Netlogic: Cleanup firmware support for the XLR platform Steven J. Hill
` (15 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/include/asm/mips-boards/generic.h | 21 ++----
arch/mips/mti-malta/malta-display.c | 39 ++++------
arch/mips/mti-malta/malta-init.c | 108 +++++++--------------------
arch/mips/mti-malta/malta-memory.c | 34 +++------
arch/mips/mti-malta/malta-setup.c | 52 +++++--------
arch/mips/mti-malta/malta-time.c | 64 ++++++----------
6 files changed, 98 insertions(+), 220 deletions(-)
diff --git a/arch/mips/include/asm/mips-boards/generic.h b/arch/mips/include/asm/mips-boards/generic.h
index cf20a30..d99f5b6 100644
--- a/arch/mips/include/asm/mips-boards/generic.h
+++ b/arch/mips/include/asm/mips-boards/generic.h
@@ -1,21 +1,14 @@
/*
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 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
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
* 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.
- *
* Defines of the MIPS boards specific address-MAP, registers, etc.
+ *
+ * Copyright (C) 2000,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
*/
#ifndef __ASM_MIPS_BOARDS_GENERIC_H
#define __ASM_MIPS_BOARDS_GENERIC_H
diff --git a/arch/mips/mti-malta/malta-display.c b/arch/mips/mti-malta/malta-display.c
index 2a0057c..04826d7 100644
--- a/arch/mips/mti-malta/malta-display.c
+++ b/arch/mips/mti-malta/malta-display.c
@@ -1,26 +1,19 @@
/*
- * 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.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
* Display routines for display messages in MIPS boards ascii display.
+ *
+ * Copyright (C) 1999,2000,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
*/
-
#include <linux/compiler.h>
#include <linux/timer.h>
-#include <asm/io.h>
+#include <linux/io.h>
+
#include <asm/mips-boards/generic.h>
extern const char display_string[];
@@ -29,17 +22,17 @@ static unsigned int max_display_count;
void mips_display_message(const char *str)
{
- static unsigned int __iomem *display = NULL;
+ static unsigned int __iomem *display;
int i;
if (unlikely(display == NULL))
display = ioremap(ASCII_DISPLAY_POS_BASE, 16*sizeof(int));
- for (i = 0; i <= 14; i=i+2) {
- if (*str)
- __raw_writel(*str++, display + i);
- else
- __raw_writel(' ', display + i);
+ for (i = 0; i <= 14; i += 2) {
+ if (*str)
+ __raw_writel(*str++, display + i);
+ else
+ __raw_writel(' ', display + i);
}
}
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
index 9844f31..8e7dfcd 100644
--- a/arch/mips/mti-malta/malta-init.c
+++ b/arch/mips/mti-malta/malta-init.c
@@ -1,40 +1,22 @@
/*
- * Copyright (C) 1999, 2000, 2004, 2005 MIPS Technologies, Inc.
- * All rights reserved.
- * Authors: Carsten Langgaard <carstenl@mips.com>
- * Maciej W. Rozycki <macro@mips.com>
- *
- * 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.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
* PROM library initialisation code.
+ *
+ * Copyright (C) 1999,2000,2004,2005,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Maciej W. Rozycki <macro@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
*/
-#include <linux/init.h>
-#include <linux/string.h>
-#include <linux/kernel.h>
-
-#include <asm/gt64120.h>
-#include <asm/io.h>
#include <asm/cacheflush.h>
#include <asm/smp-ops.h>
#include <asm/traps.h>
-
#include <asm/fw/fw.h>
#include <asm/gcmpregs.h>
#include <asm/mips-boards/generic.h>
-#include <asm/mips-boards/bonito64.h>
-#include <asm/mips-boards/msc01_pci.h>
-
#include <asm/mips-boards/malta.h>
extern void mips_display_message(const char *str);
@@ -52,52 +34,6 @@ unsigned long _pcictrl_gt64120;
/* MIPS System controller register base */
unsigned long _pcictrl_msc;
-static inline unsigned char str2hexnum(unsigned char c)
-{
- if (c >= '0' && c <= '9')
- return c - '0';
- if (c >= 'a' && c <= 'f')
- return c - 'a' + 10;
- return 0; /* foo */
-}
-
-static inline void str2eaddr(unsigned char *ea, unsigned char *str)
-{
- int i;
-
- for (i = 0; i < 6; i++) {
- unsigned char num;
-
- if((*str == '.') || (*str == ':'))
- str++;
- num = str2hexnum(*str++) << 4;
- num |= (str2hexnum(*str++));
- ea[i] = num;
- }
-}
-
-int get_ethernet_addr(char *ethernet_addr)
-{
- char *ethaddr_str;
-
- ethaddr_str = prom_getenv("ethaddr");
- if (!ethaddr_str) {
- printk("ethaddr not set in boot prom\n");
- return -1;
- }
- str2eaddr(ethernet_addr, ethaddr_str);
-
- if (init_debug > 1) {
- int i;
- printk("get_ethernet_addr: ");
- for (i=0; i<5; i++)
- printk("%02x:", (unsigned char)*(ethernet_addr+i));
- printk("%02x\n", *(ethernet_addr+i));
- }
-
- return 0;
-}
-
#ifdef CONFIG_SERIAL_8250_CONSOLE
static void __init console_config(void)
{
@@ -111,12 +47,18 @@ static void __init console_config(void)
if (s) {
while (*s >= '0' && *s <= '9')
baud = baud*10 + *s++ - '0';
- if (*s == ',') s++;
- if (*s) parity = *s++;
- if (*s == ',') s++;
- if (*s) bits = *s++;
- if (*s == ',') s++;
- if (*s == 'h') flow = 'r';
+ if (*s == ',')
+ s++;
+ if (*s)
+ parity = *s++;
+ if (*s == ',')
+ s++;
+ if (*s)
+ bits = *s++;
+ if (*s == ',')
+ s++;
+ if (*s == 'h')
+ flow = 'r';
}
if (baud == 0)
baud = 38400;
@@ -126,7 +68,8 @@ static void __init console_config(void)
bits = '8';
if (flow == '\0')
flow = 'r';
- sprintf(console_string, " console=ttyS0,%d%c%c%c", baud, parity, bits, flow);
+ sprintf(console_string, " console=ttyS0,%d%c%c%c", baud,
+ parity, bits, flow);
strcat(fw_getcmdline(), console_string);
pr_info("Config serial console:%s\n", console_string);
}
@@ -270,7 +213,7 @@ void __init prom_init(void)
case MIPS_REVISION_SCON_SOCIT:
case MIPS_REVISION_SCON_ROCIT:
_pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000);
- mips_pci_controller:
+mips_pci_controller:
mb();
MSC_READ(MSC01_PCI_CFG, data);
MSC_WRITE(MSC01_PCI_CFG, data & ~MSC01_PCI_CFG_EN_BIT);
@@ -312,14 +255,13 @@ void __init prom_init(void)
default:
/* Unknown system controller */
mips_display_message("SC Error");
- while (1); /* We die here... */
+ while (1); /* We die here... */
}
board_nmi_handler_setup = mips_nmi_setup;
board_ejtag_handler_setup = mips_ejtag_setup;
fw_init_cmdline();
fw_meminit();
-
#ifdef CONFIG_SERIAL_8250_CONSOLE
console_config();
#endif
diff --git a/arch/mips/mti-malta/malta-memory.c b/arch/mips/mti-malta/malta-memory.c
index cddcd46..4cdcc88 100644
--- a/arch/mips/mti-malta/malta-memory.c
+++ b/arch/mips/mti-malta/malta-memory.c
@@ -1,30 +1,19 @@
/*
- * 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.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
* PROM library functions for acquiring/using memory descriptors given to
* us from the YAMON.
+ *
+ * Copyright (C) 1999,2000,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
*/
-#include <linux/init.h>
-#include <linux/mm.h>
#include <linux/bootmem.h>
-#include <linux/pfn.h>
-#include <linux/string.h>
-#include <asm/page.h>
+#include <asm/bootinfo.h>
#include <asm/sections.h>
#include <asm/fw/fw.h>
@@ -92,7 +81,8 @@ fw_memblock_t * __init fw_getmdesc(void)
mdesc[3].type = fw_dontuse;
mdesc[3].base = 0x00100000;
- mdesc[3].size = CPHYSADDR(PFN_ALIGN((unsigned long)&_end)) - mdesc[3].base;
+ mdesc[3].size = CPHYSADDR(PFN_ALIGN((unsigned long)&_end)) -
+ mdesc[3].base;
mdesc[4].type = fw_free;
mdesc[4].base = CPHYSADDR(PFN_ALIGN(&_end));
@@ -128,7 +118,7 @@ void __init fw_meminit(void)
size = p->size;
add_memory_region(base, size, type);
- p++;
+ p++;
}
}
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
index 08cdf8f..f50f053 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c
@@ -1,39 +1,22 @@
/*
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
- * Copyright (C) 2008 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
- * published by the Free Software Foundation.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * 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.
+ * Copyright (C) 2000,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
*
- * 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.
+ * Copyright (C) 2008 Dmitri Vorobiev
*/
-#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/fw/fw.h>
-#include <asm/mips-boards/generic.h>
-#include <asm/mips-boards/malta.h>
-#include <asm/mips-boards/maltaint.h>
#include <asm/dma.h>
#include <asm/traps.h>
-#ifdef CONFIG_VT
-#include <linux/console.h>
-#endif
+#include <asm/fw/fw.h>
+#include <asm/mips-boards/generic.h>
extern void malta_be_init(void);
extern int malta_be_handler(struct pt_regs *regs, int is_fixup);
@@ -117,13 +100,12 @@ static void __init pci_clock_check(void)
char *argptr = fw_getcmdline();
if (pciclock != 33 && !strstr(argptr, "idebus=")) {
- printk(KERN_WARNING "WARNING: PCI clock is %dMHz, "
- "setting idebus\n", pciclock);
+ pr_warn("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");
+ pr_warn("WARNING: IDE timing calculations will be incorrect\n");
}
}
#endif
@@ -155,14 +137,14 @@ static void __init bonito_quirks_setup(void)
argptr = fw_getcmdline();
if (strstr(argptr, "debug")) {
BONITO_BONGENCFG |= BONITO_BONGENCFG_DEBUGMODE;
- printk(KERN_INFO "Enabled Bonito debug mode\n");
+ pr_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");
+ pr_info("Enabled Bonito CPU coherency\n");
argptr = fw_getcmdline();
if (strstr(argptr, "iobcuncached")) {
@@ -170,13 +152,13 @@ static void __init bonito_quirks_setup(void)
BONITO_PCIMEMBASECFG = BONITO_PCIMEMBASECFG &
~(BONITO_PCIMEMBASECFG_MEMBASE0_CACHED |
BONITO_PCIMEMBASECFG_MEMBASE1_CACHED);
- printk(KERN_INFO "Disabled Bonito IOBC coherency\n");
+ pr_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");
+ pr_info("Enabled Bonito IOBC coherency\n");
}
} else
panic("Hardware DMA cache coherency not supported");
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c
index 8a5d589..4574730 100644
--- a/arch/mips/mti-malta/malta-time.c
+++ b/arch/mips/mti-malta/malta-time.c
@@ -1,47 +1,21 @@
/*
- * 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.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
* Setting up the clock on the MIPS boards.
+ *
+ * Copyright (C) 1999,2000,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
*/
-
-#include <linux/types.h>
#include <linux/i8253.h>
-#include <linux/init.h>
-#include <linux/kernel_stat.h>
-#include <linux/sched.h>
-#include <linux/spinlock.h>
-#include <linux/interrupt.h>
-#include <linux/time.h>
-#include <linux/timex.h>
-#include <linux/mc146818rtc.h>
-
-#include <asm/mipsregs.h>
-#include <asm/mipsmtregs.h>
-#include <asm/hardirq.h>
-#include <asm/irq.h>
-#include <asm/div64.h>
-#include <asm/cpu.h>
+
#include <asm/setup.h>
#include <asm/time.h>
#include <asm/mc146818-time.h>
-#include <asm/msc01_ic.h>
-
#include <asm/mips-boards/generic.h>
-
#include <asm/mips-boards/maltaint.h>
unsigned long cpu_khz;
@@ -74,15 +48,19 @@ static unsigned int __init estimate_cpu_frequency(void)
local_irq_save(flags);
/* Start counter exactly on falling edge of update flag */
- while (CMOS_READ(RTC_REG_A) & RTC_UIP);
- while (!(CMOS_READ(RTC_REG_A) & RTC_UIP));
+ while (CMOS_READ(RTC_REG_A) & RTC_UIP)
+ ;
+ while (!(CMOS_READ(RTC_REG_A) & RTC_UIP))
+ ;
/* Start r4k counter. */
start = read_c0_count();
/* Read counter exactly on falling edge of update flag */
- while (CMOS_READ(RTC_REG_A) & RTC_UIP);
- while (!(CMOS_READ(RTC_REG_A) & RTC_UIP));
+ while (CMOS_READ(RTC_REG_A) & RTC_UIP)
+ ;
+ while (!(CMOS_READ(RTC_REG_A) & RTC_UIP))
+ ;
count = read_c0_count() - start;
@@ -145,15 +123,15 @@ void __init plat_time_init(void)
{
unsigned int est_freq;
- /* Set Data mode - binary. */
- CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL);
+ /* Set Data mode - binary. */
+ CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL);
est_freq = estimate_cpu_frequency();
- printk("CPU frequency %d.%02d MHz\n", est_freq/1000000,
+ pr_info("CPU frequency %d.%02d MHz\n", est_freq/1000000,
(est_freq%1000000)*100/1000000);
- cpu_khz = est_freq / 1000;
+ cpu_khz = est_freq / 1000;
mips_scroll_message();
#ifdef CONFIG_I8253 /* Only Malta has a PIT */
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 22/35] MIPS: Netlogic: Cleanup firmware support for the XLR platform.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (20 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 21/35] MIPS: Malta: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 23/35] MIPS: Netlogic: Cleanup files effected by firmware changes Steven J. Hill
` (14 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/netlogic/xlr/setup.c | 47 +++++++++-------------------------------
1 file changed, 10 insertions(+), 37 deletions(-)
diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c
index c9d066d..113a402 100644
--- a/arch/mips/netlogic/xlr/setup.c
+++ b/arch/mips/netlogic/xlr/setup.c
@@ -38,7 +38,7 @@
#include <asm/reboot.h>
#include <asm/time.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <asm/netlogic/interrupt.h>
#include <asm/netlogic/psb-bootinfo.h>
@@ -113,45 +113,21 @@ void __init prom_free_prom_memory(void)
/* Nothing yet */
}
-static void __init build_arcs_cmdline(int *argv)
+static void __init build_arcs_cmdline(void)
{
- int i, remain, len;
- char *arg;
-
- remain = sizeof(arcs_cmdline) - 1;
- arcs_cmdline[0] = '\0';
- for (i = 0; argv[i] != 0; i++) {
- arg = (char *)(long)argv[i];
- len = strlen(arg);
- if (len + 1 > remain)
- break;
- strcat(arcs_cmdline, arg);
- strcat(arcs_cmdline, " ");
- remain -= len + 1;
- }
+ fw_init_cmdline();
/* Add the default options here */
- if ((strstr(arcs_cmdline, "console=")) == NULL) {
- arg = "console=ttyS0,38400 ";
- len = strlen(arg);
- if (len > remain)
- goto fail;
- strcat(arcs_cmdline, arg);
- remain -= len;
+ if ((strstr(fw_getcmdline(), "console=")) == NULL) {
+ strlcat(fw_getcmdline(), "console=ttyS0,38400 ",
+ COMMAND_LINE_SIZE);
}
#ifdef CONFIG_BLK_DEV_INITRD
- if ((strstr(arcs_cmdline, "rdinit=")) == NULL) {
- arg = "rdinit=/sbin/init ";
- len = strlen(arg);
- if (len > remain)
- goto fail;
- strcat(arcs_cmdline, arg);
- remain -= len;
+ if ((strstr(fw_getcmdline(), "rdinit=")) == NULL) {
+ strlcat(fw_getcmdline(), "rdinit=/sbin/init ",
+ COMMAND_LINE_SIZE);
}
#endif
- return;
-fail:
- panic("Cannot add %s, command line too big!", arg);
}
static void prom_add_memory(void)
@@ -178,19 +154,16 @@ static void prom_add_memory(void)
void __init prom_init(void)
{
- int *argv, *envp; /* passed as 32 bit ptrs */
struct psb_info *prom_infop;
/* truncate to 32 bit and sign extend all args */
- argv = (int *)(long)(int)fw_arg1;
- envp = (int *)(long)(int)fw_arg2;
prom_infop = (struct psb_info *)(long)(int)fw_arg3;
nlm_prom_info = *prom_infop;
nlm_pic_base = nlm_mmio_base(NETLOGIC_IO_PIC_OFFSET);
nlm_early_serial_setup();
- build_arcs_cmdline(argv);
+ build_arcs_cmdline();
nlm_common_ebase = read_c0_ebase() & (~((1 << 12) - 1));
prom_add_memory();
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 23/35] MIPS: Netlogic: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (21 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 22/35] MIPS: Netlogic: Cleanup firmware support for the XLR platform Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-06 8:42 ` Jayachandran C.
2012-06-06 12:00 ` Sergei Shtylyov
2012-06-05 21:19 ` [PATCH 24/35] MIPS: MSP71xx, Yosemite: Cleanup firmware support for PMC platforms Steven J. Hill
` (13 subsequent siblings)
36 siblings, 2 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/netlogic/xlr/setup.c | 35 +++++------------------------------
1 file changed, 5 insertions(+), 30 deletions(-)
diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c
index 113a402..324c071 100644
--- a/arch/mips/netlogic/xlr/setup.c
+++ b/arch/mips/netlogic/xlr/setup.c
@@ -1,37 +1,12 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* Copyright 2003-2011 NetLogic Microsystems, Inc. (NetLogic). All rights
* reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the NetLogic
- * license below:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY NETLOGIC ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL NETLOGIC OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
#include <linux/kernel.h>
#include <linux/serial_8250.h>
#include <linux/pm.h>
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* Re: [PATCH 23/35] MIPS: Netlogic: Cleanup files effected by firmware changes.
2012-06-05 21:19 ` [PATCH 23/35] MIPS: Netlogic: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-06 8:42 ` Jayachandran C.
2012-06-06 12:00 ` Sergei Shtylyov
1 sibling, 0 replies; 57+ messages in thread
From: Jayachandran C. @ 2012-06-06 8:42 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf
On Wed, Jun 6, 2012 at 2:49 AM, Steven J. Hill <sjhill@mips.com> wrote:
> From: "Steven J. Hill" <sjhill@mips.com>
>
> Make headers consistent across the files and make changes based on
> running the checkpatch script.
>
> Signed-off-by: Steven J. Hill <sjhill@mips.com>
> ---
> arch/mips/netlogic/xlr/setup.c | 35 +++++------------------------------
> 1 file changed, 5 insertions(+), 30 deletions(-)
>
> diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c
> index 113a402..324c071 100644
> --- a/arch/mips/netlogic/xlr/setup.c
> +++ b/arch/mips/netlogic/xlr/setup.c
> @@ -1,37 +1,12 @@
> /*
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> + *
> * Copyright 2003-2011 NetLogic Microsystems, Inc. (NetLogic). All rights
> * reserved.
> - *
> - * This software is available to you under a choice of one of two
> - * licenses. You may choose to be licensed under the terms of the GNU
> - * General Public License (GPL) Version 2, available from the file
> - * COPYING in the main directory of this source tree, or the NetLogic
> - * license below:
> - *
[....]
> - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
> */
Can you drop this? This patch changes the existing license on the file.
Thanks,
JC.
^ permalink raw reply [flat|nested] 57+ messages in thread
* Re: [PATCH 23/35] MIPS: Netlogic: Cleanup files effected by firmware changes.
2012-06-05 21:19 ` [PATCH 23/35] MIPS: Netlogic: Cleanup files effected by firmware changes Steven J. Hill
2012-06-06 8:42 ` Jayachandran C.
@ 2012-06-06 12:00 ` Sergei Shtylyov
1 sibling, 0 replies; 57+ messages in thread
From: Sergei Shtylyov @ 2012-06-06 12:00 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf
Hello.
On 06-06-2012 1:19, Steven J. Hill wrote:
> From: "Steven J. Hill"<sjhill@mips.com>
> Make headers consistent across the files and make changes based on
> running the checkpatch script.
I don't see any checkpatch.pl induced changes.
> Signed-off-by: Steven J. Hill<sjhill@mips.com>
> ---
> arch/mips/netlogic/xlr/setup.c | 35 +++++------------------------------
> 1 file changed, 5 insertions(+), 30 deletions(-)
>
> diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c
> index 113a402..324c071 100644
> --- a/arch/mips/netlogic/xlr/setup.c
> +++ b/arch/mips/netlogic/xlr/setup.c
> @@ -1,37 +1,12 @@
> /*
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> + *
You removed the NetLogic license.
> * Copyright 2003-2011 NetLogic Microsystems, Inc. (NetLogic). All rights
> * reserved.
> - *
> - * This software is available to you under a choice of one of two
> - * licenses. You may choose to be licensed under the terms of the GNU
> - * General Public License (GPL) Version 2, available from the file
> - * COPYING in the main directory of this source tree, or the NetLogic
> - * license below:
> - *
> - * Redistribution and use in source and binary forms, with or without
> - * modification, are permitted provided that the following conditions
> - * are met:
> - *
> - * 1. Redistributions of source code must retain the above copyright
> - * notice, this list of conditions and the following disclaimer.
> - * 2. Redistributions in binary form must reproduce the above copyright
> - * notice, this list of conditions and the following disclaimer in
> - * the documentation and/or other materials provided with the
> - * distribution.
> - *
> - * THIS SOFTWARE IS PROVIDED BY NETLOGIC ``AS IS'' AND ANY EXPRESS OR
> - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
> - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> - * ARE DISCLAIMED. IN NO EVENT SHALL NETLOGIC OR CONTRIBUTORS BE LIABLE
> - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
> - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
> - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
> - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
> - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
Reshuffling the header is not really a good reason for adding your copyright.
WBR, Sergei
^ permalink raw reply [flat|nested] 57+ messages in thread
* [PATCH 24/35] MIPS: MSP71xx, Yosemite: Cleanup firmware support for PMC platforms.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (22 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 23/35] MIPS: Netlogic: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 25/35] MIPS: MSP71xx, Yosemite: Cleanup files effected by firmware changes Steven J. Hill
` (12 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
.../mips/include/asm/pmc-sierra/msp71xx/msp_prom.h | 25 ----
arch/mips/pmc-sierra/msp71xx/msp_prom.c | 130 +++++++-------------
arch/mips/pmc-sierra/msp71xx/msp_serial.c | 9 +-
arch/mips/pmc-sierra/msp71xx/msp_setup.c | 10 +-
arch/mips/pmc-sierra/msp71xx/msp_time.c | 26 ++--
arch/mips/pmc-sierra/msp71xx/msp_usb.c | 17 +--
arch/mips/pmc-sierra/yosemite/prom.c | 32 +----
drivers/mtd/maps/pmcmsp-flash.c | 9 +-
8 files changed, 73 insertions(+), 185 deletions(-)
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h
index 786d82d..b8c34ff 100644
--- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h
+++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h
@@ -118,13 +118,9 @@
#define ZSP_DUET 'D' /* one DUET zsp engine */
#define ZSP_TRIAD 'T' /* two TRIAD zsp engines */
-extern char *prom_getenv(char *name);
-extern void prom_init_cmdline(void);
-extern void prom_meminit(void);
extern void prom_fixup_mem_map(unsigned long start_mem,
unsigned long end_mem);
-extern int get_ethernet_addr(char *ethaddr_name, char *ethernet_addr);
extern unsigned long get_deviceid(void);
extern char identify_enet(unsigned long interface_num);
extern char identify_enetTxD(unsigned long interface_num);
@@ -147,25 +143,4 @@ extern unsigned long identify_revision(void);
printk(_f, ## x); \
} while (0)
-/* Memory descriptor management. */
-#define PROM_MAX_PMEMBLOCKS 7 /* 6 used */
-
-enum yamon_memtypes {
- yamon_dontuse,
- yamon_prom,
- yamon_free,
-};
-
-struct prom_pmemblock {
- unsigned long base; /* Within KSEG0. */
- unsigned int size; /* In bytes. */
- unsigned int type; /* free or prom memory */
-};
-
-extern int prom_argc;
-extern char **prom_argv;
-extern char **prom_envp;
-extern int *prom_vec;
-extern struct prom_pmemblock *prom_getmdesc(void);
-
#endif /* !_ASM_MSP_PROM_H */
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_prom.c b/arch/mips/pmc-sierra/msp71xx/msp_prom.c
index db00deb..885256f 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_prom.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_prom.c
@@ -43,23 +43,18 @@
#include <linux/slab.h>
#include <asm/addrspace.h>
-#include <asm/bootinfo.h>
#include <asm-generic/sections.h>
#include <asm/page.h>
+#include <asm/fw/fw.h>
#include <msp_prom.h>
#include <msp_regs.h>
-/* global PROM environment variables and pointers */
-int prom_argc;
-char **prom_argv, **prom_envp;
-int *prom_vec;
-
-/* debug flag */
-int init_debug = 1;
+/* Global PROM vector */
+int *fw_vec;
/* memory blocks */
-struct prom_pmemblock mdesc[PROM_MAX_PMEMBLOCKS];
+fw_memblock_t mdesc[7];
/* default feature sets */
static char msp_default_features[] =
@@ -141,7 +136,7 @@ int get_ethernet_addr(char *ethaddr_name, char *ethernet_addr)
{
char *ethaddr_str;
- ethaddr_str = prom_getenv(ethaddr_name);
+ ethaddr_str = fw_getenv(ethaddr_name);
if (!ethaddr_str) {
printk(KERN_WARNING "%s not set in boot prom\n", ethaddr_name);
return -1;
@@ -168,7 +163,7 @@ EXPORT_SYMBOL(get_ethernet_addr);
static char *get_features(void)
{
- char *feature = prom_getenv(FEATURES);
+ char *feature = fw_getenv(FEATURES);
if (feature == NULL) {
/* default features based on MACHINE_TYPE */
@@ -193,7 +188,7 @@ static char test_feature(char c)
unsigned long get_deviceid(void)
{
- char *deviceid = prom_getenv(DEVICEID);
+ char *deviceid = fw_getenv(DEVICEID);
if (deviceid == NULL)
return *DEV_ID_REG;
@@ -281,72 +276,30 @@ unsigned long identify_revision(void)
}
EXPORT_SYMBOL(identify_revision);
-/* PROM environment functions */
-char *prom_getenv(char *env_name)
-{
- /*
- * Return a pointer to the given environment variable. prom_envp
- * points to a null terminated array of pointers to variables.
- * Environment variables are stored in the form of "memsize=64"
- */
-
- char **var = prom_envp;
- int i = strlen(env_name);
-
- while (*var) {
- if (strncmp(env_name, *var, i) == 0) {
- return (*var + strlen(env_name) + 1);
- }
- var++;
- }
-
- return NULL;
-}
-
-/* PROM commandline functions */
-void __init prom_init_cmdline(void)
-{
- char *cp;
- int actr;
-
- actr = 1; /* Always ignore argv[0] */
-
- cp = &(arcs_cmdline[0]);
- while (actr < prom_argc) {
- strcpy(cp, prom_argv[actr]);
- cp += strlen(prom_argv[actr]);
- *cp++ = ' ';
- actr++;
- }
- if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
- --cp;
- *cp = '\0';
-}
-
/* memory allocation functions */
-static int __init prom_memtype_classify(unsigned int type)
+static int __init fw_memtype_classify(unsigned int type)
{
switch (type) {
- case yamon_free:
+ case fw_free:
return BOOT_MEM_RAM;
- case yamon_prom:
+ case fw_code:
return BOOT_MEM_ROM_DATA;
default:
return BOOT_MEM_RESERVED;
}
}
-void __init prom_meminit(void)
+void __init fw_meminit(void)
{
- struct prom_pmemblock *p;
+ fw_memblock_t *p;
- p = prom_getmdesc();
+ p = fw_getmdesc();
while (p->size) {
long type;
unsigned long base, size;
- type = prom_memtype_classify(p->type);
+ type = fw_memtype_classify(p->type);
base = p->base;
size = p->size;
@@ -369,43 +322,43 @@ void __init prom_free_prom_memory(void)
* preserve environment variables and command line from pmon/bbload
* first preserve the command line
*/
- for (argc = 0; argc < prom_argc; argc++) {
- len += sizeof(char *); /* length of pointer */
- len += strlen(prom_argv[argc]) + 1; /* length of string */
+ for (argc = 0; argc < fw_argc; argc++) {
+ len += sizeof(int *); /* length of pointer */
+ len += strlen(fw_argv(argc)) + 1; /* length of string */
}
len += sizeof(char *); /* plus length of null pointer */
argv = kmalloc(len, GFP_KERNEL);
- ptr = (char *) &argv[prom_argc + 1]; /* strings follow array */
+ ptr = (char *) &argv[fw_argc + 1]; /* strings follow array */
- for (argc = 0; argc < prom_argc; argc++) {
+ for (argc = 0; argc < fw_argc; argc++) {
argv[argc] = ptr;
- strcpy(ptr, prom_argv[argc]);
- ptr += strlen(prom_argv[argc]) + 1;
+ strcpy(ptr, fw_argv(argc));
+ ptr += strlen(fw_argv(argc)) + 1;
}
- argv[prom_argc] = NULL; /* end array with null pointer */
- prom_argv = argv;
+ argv[fw_argc] = NULL; /* end array with null pointer */
+ _fw_argv = (int *)argv;
/* next preserve the environment variables */
len = 0;
i = 0;
- for (envp = prom_envp; *envp != NULL; envp++) {
+ while (fw_envp(i) != NULL) {
+ len += sizeof(int *); /* length of pointer */
+ len += strlen(fw_envp(i)) + 1; /* length of string */
i++; /* count number of environment variables */
- len += sizeof(char *); /* length of pointer */
- len += strlen(*envp) + 1; /* length of string */
}
len += sizeof(char *); /* plus length of null pointer */
envp = kmalloc(len, GFP_KERNEL);
- ptr = (char *) &envp[i+1];
+ ptr = (char *) &envp[i + 1];
for (argc = 0; argc < i; argc++) {
envp[argc] = ptr;
- strcpy(ptr, prom_envp[argc]);
- ptr += strlen(prom_envp[argc]) + 1;
+ strcpy(ptr, fw_envp(argc));
+ ptr += strlen(fw_envp(argc)) + 1;
}
envp[i] = NULL; /* end array with null pointer */
- prom_envp = envp;
+ _fw_envp = (int *)envp;
for (i = 0; i < boot_mem_map.nr_map; i++) {
if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
@@ -417,22 +370,23 @@ void __init prom_free_prom_memory(void)
}
}
-struct prom_pmemblock *__init prom_getmdesc(void)
+fw_memblock_t *__init fw_getmdesc(void)
{
static char memsz_env[] __initdata = "memsize";
static char heaptop_env[] __initdata = "heaptop";
char *str;
unsigned int memsize;
unsigned int heaptop;
- int i;
+ int i, tmp;
+ long val;
- str = prom_getenv(memsz_env);
+ str = fw_getenv(memsz_env);
if (!str) {
- ppfinit("memsize not set in boot prom, "
- "set to default (32Mb)\n");
+ ppfinit("memsize not set in firmware, set to default (32Mb)\n");
memsize = 0x02000000;
} else {
- memsize = simple_strtol(str, NULL, 0);
+ tmp = kstrtol(str, 0, &val);
+ memsize = (unsigned int)val;
if (memsize == 0) {
/* if memsize is a bad size, use reasonable default */
@@ -443,16 +397,18 @@ struct prom_pmemblock *__init prom_getmdesc(void)
memsize = CPHYSADDR(memsize);
}
- str = prom_getenv(heaptop_env);
+ str = fw_getenv(heaptop_env);
if (!str) {
heaptop = CPHYSADDR((u32)&_text);
ppfinit("heaptop not set in boot prom, "
"set to default 0x%08x\n", heaptop);
} else {
- heaptop = simple_strtol(str, NULL, 16);
+ tmp = kstrtol(str, 16, &val);
+ heaptop = (unsigned int)val;
if (heaptop == 0) {
/* heaptop conversion bad, might have 0xValue */
- heaptop = simple_strtol(str, NULL, 0);
+ tmp = kstrtol(str, 0, &val);
+ heaptop = (unsigned int)val;
if (heaptop == 0) {
/* heaptop still bad, use reasonable default */
@@ -495,7 +451,7 @@ struct prom_pmemblock *__init prom_getmdesc(void)
/* Remainder of RAM -- under memsize */
i++; /* 5 */
- mdesc[i].type = yamon_free;
+ mdesc[i].type = fw_free;
mdesc[i].base = mdesc[i-1].base + mdesc[i-1].size;
mdesc[i].size = memsize - mdesc[i].base;
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_serial.c b/arch/mips/pmc-sierra/msp71xx/msp_serial.c
index a1c7c7d..7080bce 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_serial.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_serial.c
@@ -29,12 +29,13 @@
#include <linux/serial_reg.h>
#include <linux/slab.h>
-#include <asm/bootinfo.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/serial.h>
#include <linux/serial_8250.h>
+#include <asm/fw/fw.h>
+
#include <msp_prom.h>
#include <msp_int.h>
#include <msp_regs.h>
@@ -90,16 +91,14 @@ static int msp_serial_handle_irq(struct uart_port *p)
void __init msp_serial_setup(void)
{
- char *s;
- char *endp;
struct uart_port up;
unsigned int uartclk;
memset(&up, 0, sizeof(up));
/* Check if clock was specified in environment */
- s = prom_getenv("uartfreqhz");
- if(!(s && *s && (uartclk = simple_strtoul(s, &endp, 10)) && *endp == 0))
+ uartclk = (unsigned int) fw_getenvl("uartfreqhz");
+ if (uartclk == 0)
uartclk = MSP_BASE_BAUD;
ppfinit("UART clock set to %d\n", uartclk);
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_setup.c b/arch/mips/pmc-sierra/msp71xx/msp_setup.c
index 7a834b2..6fa0d76 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_setup.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_setup.c
@@ -10,12 +10,12 @@
* option) any later version.
*/
-#include <asm/bootinfo.h>
#include <asm/cacheflush.h>
#include <asm/r4kcache.h>
#include <asm/reboot.h>
#include <asm/smp-ops.h>
#include <asm/time.h>
+#include <asm/fw/fw.h>
#include <msp_prom.h>
#include <msp_regs.h>
@@ -154,10 +154,6 @@ void __init prom_init(void)
unsigned long family;
unsigned long revision;
- prom_argc = fw_arg0;
- prom_argv = (char **)fw_arg1;
- prom_envp = (char **)fw_arg2;
-
/*
* Someday we can use this with PMON2000 to get a
* platform call prom routines for output etc. without
@@ -213,9 +209,9 @@ void __init prom_init(void)
break;
}
- prom_init_cmdline();
+ fw_init_cmdline();
- prom_meminit();
+ fw_meminit();
/*
* Sub-system setup follows.
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_time.c b/arch/mips/pmc-sierra/msp71xx/msp_time.c
index 8b42f30..d76cbdb 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_time.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_time.c
@@ -32,8 +32,8 @@
#include <asm/cevt-r4k.h>
#include <asm/mipsregs.h>
#include <asm/time.h>
+#include <asm/fw/fw.h>
-#include <msp_prom.h>
#include <msp_int.h>
#include <msp_regs.h>
@@ -45,26 +45,16 @@ static int tim_installed;
void __init plat_time_init(void)
{
- char *endp, *s;
- unsigned long cpu_rate = 0;
+ unsigned long cpu_rate;
- if (cpu_rate == 0) {
- s = prom_getenv("clkfreqhz");
- cpu_rate = simple_strtoul(s, &endp, 10);
- if (endp != NULL && *endp != 0) {
- printk(KERN_ERR
- "Clock rate in Hz parse error: %s\n", s);
- cpu_rate = 0;
- }
- }
+ cpu_rate = fw_getenvl("clkfreqhz");
+ if (cpu_rate == 0)
+ printk(KERN_ERR "Clock rate in Hz parse error: %s\n", s);
if (cpu_rate == 0) {
- s = prom_getenv("clkfreq");
- cpu_rate = 1000 * simple_strtoul(s, &endp, 10);
- if (endp != NULL && *endp != 0) {
- printk(KERN_ERR
- "Clock rate in MHz parse error: %s\n", s);
- cpu_rate = 0;
+ cpu_rate = 1000 * fw_getenvl("clkfreq");
+ if (cpu_rate == 0)
+ printk(KERN_ERR "Clock rate in MHz parse error: %s\n", s);
}
}
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_usb.c b/arch/mips/pmc-sierra/msp71xx/msp_usb.c
index 9a1aef8..ee4ed9b 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_usb.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_usb.c
@@ -30,6 +30,7 @@
#include <linux/platform_device.h>
#include <asm/mipsregs.h>
+#include <asm/fw/fw.h>
#include <msp_regs.h>
#include <msp_int.h>
@@ -201,26 +202,20 @@ static struct mspusb_device msp_usbdev1_device = {
static int __init msp_usb_setup(void)
{
- char *strp;
- char envstr[32];
struct platform_device *msp_devs[NUM_USB_DEVS];
+ char *strp;
unsigned int val;
- /* construct environment name usbmode */
- /* set usbmode <host/device> as pmon environment var */
+ /* set default host mode */
+ val = 1;
+
/*
* Could this perhaps be integrated into the "features" env var?
* Use the features key "U", and follow with "H" for host-mode,
* "D" for device-mode. If it works for Ethernet, why not USB...
* -- hammtrev, 2007/03/22
*/
- snprintf((char *)&envstr[0], sizeof(envstr), "usbmode");
-
- /* set default host mode */
- val = 1;
-
- /* get environment string */
- strp = prom_getenv((char *)&envstr[0]);
+ strp = fw_getenv("usbmode");
if (strp) {
/* compare string */
if (!strcmp(strp, "device"))
diff --git a/arch/mips/pmc-sierra/yosemite/prom.c b/arch/mips/pmc-sierra/yosemite/prom.c
index 6a2754c..b4ce648 100644
--- a/arch/mips/pmc-sierra/yosemite/prom.c
+++ b/arch/mips/pmc-sierra/yosemite/prom.c
@@ -20,7 +20,7 @@
#include <asm/processor.h>
#include <asm/reboot.h>
#include <asm/smp-ops.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <asm/pmon.h>
#ifdef CONFIG_SMP
@@ -85,11 +85,7 @@ extern struct plat_smp_ops yos_smp_ops;
*/
void __init prom_init(void)
{
- int argc = fw_arg0;
- char **arg = (char **) fw_arg1;
- char **env = (char **) fw_arg2;
struct callvectors *cv = (struct callvectors *) fw_arg3;
- int i = 0;
/* Callbacks for halt, restart */
_machine_restart = (void (*)(char *)) prom_exit;
@@ -97,36 +93,16 @@ void __init prom_init(void)
pm_power_off = prom_halt;
debug_vectors = cv;
- arcs_cmdline[0] = '\0';
- /* Get the boot parameters */
- for (i = 1; i < argc; i++) {
- if (strlen(arcs_cmdline) + strlen(arg[i]) + 1 >=
- sizeof(arcs_cmdline))
- break;
-
- strcat(arcs_cmdline, arg[i]);
- strcat(arcs_cmdline, " ");
- }
+ fw_init_cmdline();
#ifdef CONFIG_SERIAL_8250_CONSOLE
if ((strstr(arcs_cmdline, "console=ttyS")) == NULL)
strcat(arcs_cmdline, "console=ttyS0,115200");
#endif
- while (*env) {
- if (strncmp("ocd_base", *env, strlen("ocd_base")) == 0)
- yosemite_base =
- simple_strtol(*env + strlen("ocd_base="), NULL,
- 16);
-
- if (strncmp("cpuclock", *env, strlen("cpuclock")) == 0)
- cpu_clock_freq =
- simple_strtol(*env + strlen("cpuclock="), NULL,
- 10);
-
- env++;
- }
+ yosemite_base = fw_getenvl("ocd_base");
+ cpu_clock_freq = fw_getenvl("cpuclock");
prom_grab_secondary();
diff --git a/drivers/mtd/maps/pmcmsp-flash.c b/drivers/mtd/maps/pmcmsp-flash.c
index 744ca5c..c19d9e4 100644
--- a/drivers/mtd/maps/pmcmsp-flash.c
+++ b/drivers/mtd/maps/pmcmsp-flash.c
@@ -37,6 +37,7 @@
#include <linux/mtd/partitions.h>
#include <asm/io.h>
+#include <asm/fw/fw.h>
#include <msp_prom.h>
#include <msp_regs.h>
@@ -67,7 +68,7 @@ static int __init init_msp_flash(void)
}
/* examine the prom environment for flash devices */
- for (fcnt = 0; (env = prom_getenv(flash_name)); fcnt++)
+ for (fcnt = 0; (env = fw_getenv(flash_name)); fcnt++)
flash_name[5] = '0' + fcnt + 1;
if (fcnt < 1)
@@ -92,7 +93,7 @@ static int __init init_msp_flash(void)
/* examine the prom environment for flash partititions */
part_name[5] = '0' + i;
part_name[7] = '0';
- for (pcnt = 0; (env = prom_getenv(part_name)); pcnt++)
+ for (pcnt = 0; (env = fw_getenv(part_name)); pcnt++)
part_name[7] = '0' + pcnt + 1;
if (pcnt == 0) {
@@ -108,7 +109,7 @@ static int __init init_msp_flash(void)
/* now initialize the devices proper */
flash_name[5] = '0' + i;
- env = prom_getenv(flash_name);
+ env = fw_getenv(flash_name);
if (sscanf(env, "%x:%x", &addr, &size) < 2) {
ret = -ENXIO;
@@ -152,7 +153,7 @@ static int __init init_msp_flash(void)
part_name[5] = '0' + i;
part_name[7] = '0' + j;
- env = prom_getenv(part_name);
+ env = fw_getenv(part_name);
if (sscanf(env, "%x:%x:%n", &offset, &size,
&coff) < 2) {
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 25/35] MIPS: MSP71xx, Yosemite: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (23 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 24/35] MIPS: MSP71xx, Yosemite: Cleanup firmware support for PMC platforms Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 26/35] MIPS: PNX83xx, PNX8550: Cleanup firmware support for PNX platforms Steven J. Hill
` (11 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
.../mips/include/asm/pmc-sierra/msp71xx/msp_prom.h | 27 ++-----
arch/mips/pmc-sierra/msp71xx/msp_prom.c | 79 +++-----------------
arch/mips/pmc-sierra/msp71xx/msp_serial.c | 60 +++++----------
arch/mips/pmc-sierra/msp71xx/msp_setup.c | 33 ++++----
arch/mips/pmc-sierra/msp71xx/msp_time.c | 53 ++++---------
arch/mips/pmc-sierra/msp71xx/msp_usb.c | 28 ++-----
arch/mips/pmc-sierra/yosemite/prom.c | 14 ++--
drivers/mtd/maps/pmcmsp-flash.c | 49 ++++--------
8 files changed, 98 insertions(+), 245 deletions(-)
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h
index b8c34ff..ceacb7e 100644
--- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h
+++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h
@@ -1,25 +1,14 @@
/*
- * MIPS boards bootprom interface for the Linux kernel.
- *
- * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
- * Author: Carsten Langgaard, carstenl@mips.com
- *
- * ########################################################################
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * 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.
+ * MIPS boards bootprom interface for the Linux kernel.
*
- * ########################################################################
+ * Copyright (C) 2000,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
*/
#ifndef _ASM_MSP_PROM_H
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_prom.c b/arch/mips/pmc-sierra/msp71xx/msp_prom.c
index 885256f..39eddff 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_prom.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_prom.c
@@ -1,42 +1,18 @@
/*
- * BRIEF MODULE DESCRIPTION
- * PROM library initialisation code, assuming a version of
- * pmon is the boot code.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * PROM library initialisation code, assuming a version of PMON is
+ * the boot code.
*
* Copyright 2000,2001 MontaVista Software Inc.
* Author: MontaVista Software, Inc.
- * ppopov@mvista.com or source@mvista.com
- *
- * This file was derived from Carsten Langgaard's
- * arch/mips/mips-boards/xx files.
- *
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 1999,2000 MIPS Technologies, Inc. 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 as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Pete Popov <ppopov@mvista.com> or <source@mvista.com>
*
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/mm.h>
@@ -58,11 +34,9 @@ fw_memblock_t mdesc[7];
/* default feature sets */
static char msp_default_features[] =
-#if defined(CONFIG_PMC_MSP4200_EVAL) \
- || defined(CONFIG_PMC_MSP4200_GW)
+#if defined(CONFIG_PMC_MSP4200_EVAL) || defined(CONFIG_PMC_MSP4200_GW)
"ERER";
-#elif defined(CONFIG_PMC_MSP7120_EVAL) \
- || defined(CONFIG_PMC_MSP7120_GW)
+#elif defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW)
"EMEMSP";
#elif defined(CONFIG_PMC_MSP7120_FPGA)
"EMEM";
@@ -132,35 +106,6 @@ const char *get_system_type(void)
#endif
}
-int get_ethernet_addr(char *ethaddr_name, char *ethernet_addr)
-{
- char *ethaddr_str;
-
- ethaddr_str = fw_getenv(ethaddr_name);
- if (!ethaddr_str) {
- printk(KERN_WARNING "%s not set in boot prom\n", ethaddr_name);
- return -1;
- }
-
- if (str2eaddr(ethernet_addr, ethaddr_str) == -1) {
- printk(KERN_WARNING "%s badly formatted-<%s>\n",
- ethaddr_name, ethaddr_str);
- return -1;
- }
-
- if (init_debug > 1) {
- int i;
- printk(KERN_DEBUG "get_ethernet_addr: for %s ", ethaddr_name);
- for (i = 0; i < 5; i++)
- printk(KERN_DEBUG "%02x:",
- (unsigned char)*(ethernet_addr+i));
- printk(KERN_DEBUG "%02x\n", *(ethernet_addr+i));
- }
-
- return 0;
-}
-EXPORT_SYMBOL(get_ethernet_addr);
-
static char *get_features(void)
{
char *feature = fw_getenv(FEATURES);
@@ -400,8 +345,8 @@ fw_memblock_t *__init fw_getmdesc(void)
str = fw_getenv(heaptop_env);
if (!str) {
heaptop = CPHYSADDR((u32)&_text);
- ppfinit("heaptop not set in boot prom, "
- "set to default 0x%08x\n", heaptop);
+ ppfinit("heaptop not set in boot prom, set to default 0x%08x\n",
+ heaptop);
} else {
tmp = kstrtol(str, 16, &val);
heaptop = (unsigned int)val;
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_serial.c b/arch/mips/pmc-sierra/msp71xx/msp_serial.c
index 7080bce..041b53b 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_serial.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_serial.c
@@ -1,37 +1,15 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* The setup file for serial related hardware on PMC-Sierra MSP processors.
*
* Copyright 2005 PMC-Sierra, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
-#include <linux/serial.h>
-#include <linux/serial_core.h>
-#include <linux/serial_reg.h>
#include <linux/slab.h>
-
-#include <asm/io.h>
-#include <asm/processor.h>
-#include <asm/serial.h>
+#include <linux/serial_reg.h>
#include <linux/serial_8250.h>
#include <asm/fw/fw.h>
@@ -127,25 +105,25 @@ void __init msp_serial_setup(void)
/* Initialize the second serial port, if one exists */
switch (mips_machtype) {
- case MACH_MSP4200_EVAL:
- case MACH_MSP4200_GW:
- case MACH_MSP4200_FPGA:
- case MACH_MSP7120_EVAL:
- case MACH_MSP7120_GW:
- case MACH_MSP7120_FPGA:
- /* Enable UART1 on MSP4200 and MSP7120 */
- *GPIO_CFG2_REG = 0x00002299;
- break;
-
- default:
- return; /* No second serial port, good-bye. */
+ case MACH_MSP4200_EVAL:
+ case MACH_MSP4200_GW:
+ case MACH_MSP4200_FPGA:
+ case MACH_MSP7120_EVAL:
+ case MACH_MSP7120_GW:
+ case MACH_MSP7120_FPGA:
+ /* Enable UART1 on MSP4200 and MSP7120 */
+ *GPIO_CFG2_REG = 0x00002299;
+ break;
+
+ default:
+ return; /* No second serial port, good-bye. */
}
up.mapbase = MSP_UART1_BASE;
up.membase = ioremap_nocache(up.mapbase, MSP_UART_REG_LEN);
up.irq = MSP_INT_UART1;
up.line = 1;
- up.private_data = (void*)UART1_STATUS_REG;
+ up.private_data = (void *)UART1_STATUS_REG;
if (early_serial_setup(&up)) {
kfree(up.private_data);
pr_err("Early serial init of port 1 failed\n");
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_setup.c b/arch/mips/pmc-sierra/msp71xx/msp_setup.c
index 6fa0d76..c3adca6 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_setup.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_setup.c
@@ -1,15 +1,15 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* The generic setup file for PMC-Sierra MSP processors
*
* Copyright 2005-2007 PMC-Sierra, Inc,
* Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
#include <asm/cacheflush.h>
#include <asm/r4kcache.h>
#include <asm/reboot.h>
@@ -28,9 +28,8 @@
extern void msp_serial_setup(void);
extern void pmctwiled_setup(void);
-#if defined(CONFIG_PMC_MSP7120_EVAL) || \
- defined(CONFIG_PMC_MSP7120_GW) || \
- defined(CONFIG_PMC_MSP7120_FPGA)
+#if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \
+ defined(CONFIG_PMC_MSP7120_FPGA)
/*
* Performs the reset for MSP7120-based boards
*/
@@ -77,7 +76,8 @@ void msp7120_reset(void)
*/
/* Wait a bit for the DDRC to settle */
- for (i = 0; i < 100000000; i++);
+ for (i = 0; i < 100000000; i++)
+ ;
#if defined(CONFIG_PMC_MSP7120_GW)
/*
@@ -107,11 +107,10 @@ void msp7120_reset(void)
void msp_restart(char *command)
{
- printk(KERN_WARNING "Now rebooting .......\n");
+ pr_warn("Now rebooting .......\n");
-#if defined(CONFIG_PMC_MSP7120_EVAL) || \
- defined(CONFIG_PMC_MSP7120_GW) || \
- defined(CONFIG_PMC_MSP7120_FPGA)
+#if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \
+ defined(CONFIG_PMC_MSP7120_FPGA)
msp7120_reset();
#else
/* No chip-specific reset code, just jump to the ROM reset vector */
@@ -120,13 +119,17 @@ void msp_restart(char *command)
flush_cache_all();
write_c0_wired(0);
- __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
+ __asm__ __volatile__ (
+ " jr %0 \n"
+ :
+ : "r" (0xbfc00000)
+ );
#endif
}
void msp_halt(void)
{
- printk(KERN_WARNING "\n** You can safely turn off the power\n");
+ pr_warn("\n** You can safely turn off the power\n");
while (1)
/* If possible call official function to get CPU WARs */
if (cpu_wait)
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_time.c b/arch/mips/pmc-sierra/msp71xx/msp_time.c
index d76cbdb..e24c1c5 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_time.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_time.c
@@ -1,41 +1,21 @@
/*
- * Setting up the clock on MSP SOCs. No RTC typically.
- *
- * 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 file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * 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.
+ * Setting up the clock on MSP SOCs. No RTC typically.
*
- * ########################################################################
+ * Copyright (C) 1999,2000,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
*/
-
-#include <linux/init.h>
-#include <linux/kernel_stat.h>
-#include <linux/sched.h>
-#include <linux/spinlock.h>
-#include <linux/module.h>
-#include <linux/ptrace.h>
-
#include <asm/cevt-r4k.h>
#include <asm/mipsregs.h>
#include <asm/time.h>
#include <asm/fw/fw.h>
#include <msp_int.h>
-#include <msp_regs.h>
#define get_current_vpe() \
((read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE)
@@ -49,33 +29,30 @@ void __init plat_time_init(void)
cpu_rate = fw_getenvl("clkfreqhz");
if (cpu_rate == 0)
- printk(KERN_ERR "Clock rate in Hz parse error: %s\n", s);
+ pr_err("Clock rate in Hz parse error\n");
if (cpu_rate == 0) {
cpu_rate = 1000 * fw_getenvl("clkfreq");
if (cpu_rate == 0)
- printk(KERN_ERR "Clock rate in MHz parse error: %s\n", s);
- }
+ pr_err("Clock rate in MHz parse error\n");
}
if (cpu_rate == 0) {
-#if defined(CONFIG_PMC_MSP7120_EVAL) \
- || defined(CONFIG_PMC_MSP7120_GW)
+#if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW)
cpu_rate = 400000000;
#elif defined(CONFIG_PMC_MSP7120_FPGA)
cpu_rate = 25000000;
#else
cpu_rate = 150000000;
#endif
- printk(KERN_ERR
- "Failed to determine CPU clock rate, "
- "assuming %ld hz ...\n", cpu_rate);
+ pr_err("Failed to determine CPU clock rate, assuming %ld Hz\n",
+ cpu_rate);
}
- printk(KERN_WARNING "Clock rate set to %ld\n", cpu_rate);
+ pr_warn("Clock rate set to %ld\n", cpu_rate);
/* timer frequency is 1/2 clock rate */
- mips_hpt_frequency = cpu_rate/2;
+ mips_hpt_frequency = (cpu_rate / 2);
}
unsigned int __cpuinit get_c0_compare_int(void)
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_usb.c b/arch/mips/pmc-sierra/msp71xx/msp_usb.c
index ee4ed9b..3ba9da0 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_usb.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_usb.c
@@ -1,35 +1,17 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* The setup file for USB related hardware on PMC-Sierra MSP processors.
*
* Copyright 2006 PMC-Sierra, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_GADGET)
-#include <linux/init.h>
-#include <linux/ioport.h>
#include <linux/platform_device.h>
-#include <asm/mipsregs.h>
#include <asm/fw/fw.h>
#include <msp_regs.h>
diff --git a/arch/mips/pmc-sierra/yosemite/prom.c b/arch/mips/pmc-sierra/yosemite/prom.c
index b4ce648..945911d 100644
--- a/arch/mips/pmc-sierra/yosemite/prom.c
+++ b/arch/mips/pmc-sierra/yosemite/prom.c
@@ -1,12 +1,12 @@
/*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
* Copyright (C) 2003, 2004 PMC-Sierra Inc.
* Author: Manish Lachwani (lachwani@pmc-sierra.com)
* Copyright (C) 2004 Ralf Baechle
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
#include <linux/init.h>
#include <linux/sched.h>
@@ -14,8 +14,8 @@
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/smp.h>
+#include <linux/io.h>
-#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/reboot.h>
@@ -52,7 +52,7 @@ static void prom_cpu0_exit(void *arg)
mdelay(100 + (1000 / 16));
/* if the watchdog fails for some reason, let people know */
- printk(KERN_NOTICE "Watchdog reset failed\n");
+ pr_notice("Watchdog reset failed\n");
}
/*
@@ -73,7 +73,7 @@ static void prom_exit(void)
*/
static void prom_halt(void)
{
- printk(KERN_NOTICE "\n** You can safely turn off the power\n");
+ pr_notice("\n** You can safely turn off the power\n");
while (1)
__asm__(".set\tmips3\n\t" "wait\n\t" ".set\tmips0");
}
diff --git a/drivers/mtd/maps/pmcmsp-flash.c b/drivers/mtd/maps/pmcmsp-flash.c
index c19d9e4..896a76c 100644
--- a/drivers/mtd/maps/pmcmsp-flash.c
+++ b/drivers/mtd/maps/pmcmsp-flash.c
@@ -1,42 +1,25 @@
/*
- * Mapping of a custom board with both AMD CFI and JEDEC flash in partitions.
- * Config with both CFI and JEDEC device support.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * Basically physmap.c with the addition of partitions and
- * an array of mapping info to accommodate more than one flash type per board.
+ * Mapping of a custom board with both AMD CFI and JEDEC flash in partitions.
+ * Config with both CFI and JEDEC device support. Basically physmap.c with
+ * the addition of partitions and an array of mapping info to accommodate more
+ * than one flash type per board.
*
* Copyright 2005-2007 PMC-Sierra, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
+#include <linux/io.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/mtd/partitions.h>
-#include <asm/io.h>
#include <asm/fw/fw.h>
#include <msp_prom.h>
@@ -48,8 +31,6 @@ static struct mtd_partition **msp_parts;
static struct map_info *msp_maps;
static int fcnt;
-#define DEBUG_MARKER printk(KERN_NOTICE "%s[%d]\n", __func__, __LINE__)
-
static int __init init_msp_flash(void)
{
int i, j, ret = -ENOMEM;
@@ -63,7 +44,7 @@ static int __init init_msp_flash(void)
/* If ELB is disabled by "ful-mux" mode, we can't get at flash */
if ((*DEV_ID_REG & DEV_ID_SINGLE_PC) &&
(*ELB_1PC_EN_REG & SINGLE_PCCARD)) {
- printk(KERN_NOTICE "Single PC Card mode: no flash access\n");
+ pr_notice("Single PC Card mode: no flash access\n");
return -ENXIO;
}
@@ -74,7 +55,7 @@ static int __init init_msp_flash(void)
if (fcnt < 1)
return -ENXIO;
- printk(KERN_NOTICE "Found %d PMC flash devices\n", fcnt);
+ pr_notice("Found %d PMC flash devices\n", fcnt);
msp_flash = kmalloc(fcnt * sizeof(struct map_info *), GFP_KERNEL);
if (!msp_flash)
@@ -97,8 +78,7 @@ static int __init init_msp_flash(void)
part_name[7] = '0' + pcnt + 1;
if (pcnt == 0) {
- printk(KERN_NOTICE "Skipping flash device %d "
- "(no partitions defined)\n", i);
+ pr_notice("Skipping flash device %d (no partitions defined)\n", i);
continue;
}
@@ -118,8 +98,7 @@ static int __init init_msp_flash(void)
}
addr = CPHYSADDR(addr);
- printk(KERN_NOTICE
- "MSP flash device \"%s\": 0x%08x at 0x%08x\n",
+ pr_notice("MSP flash device \"%s\": 0x%08x at 0x%08x\n",
flash_name, size, addr);
/* This must matchs the actual size of the flash chip */
msp_maps[i].size = size;
@@ -176,7 +155,7 @@ static int __init init_msp_flash(void)
msp_flash[i]->owner = THIS_MODULE;
mtd_device_register(msp_flash[i], msp_parts[i], pcnt);
} else {
- printk(KERN_ERR "map probe failed for flash\n");
+ pr_err("map probe failed for flash\n");
ret = -ENXIO;
kfree(msp_maps[i].name);
iounmap(msp_maps[i].virt);
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 26/35] MIPS: PNX83xx, PNX8550: Cleanup firmware support for PNX platforms.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (24 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 25/35] MIPS: MSP71xx, Yosemite: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 27/35] MIPS: PNX83xx, PNX8550: Cleanup files effected by firmware changes Steven J. Hill
` (10 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/pnx833x/common/Makefile | 2 +-
arch/mips/pnx833x/common/prom.c | 64 -----------------
arch/mips/pnx833x/common/setup.c | 4 ++
arch/mips/pnx833x/stb22x/board.c | 25 ++-----
arch/mips/pnx8550/common/Makefile | 2 +-
arch/mips/pnx8550/common/prom.c | 128 ----------------------------------
arch/mips/pnx8550/common/setup.c | 7 +-
arch/mips/pnx8550/jbs/init.c | 9 +--
arch/mips/pnx8550/stb810/prom_init.c | 13 +---
9 files changed, 21 insertions(+), 233 deletions(-)
delete mode 100644 arch/mips/pnx833x/common/prom.c
delete mode 100644 arch/mips/pnx8550/common/prom.c
diff --git a/arch/mips/pnx833x/common/Makefile b/arch/mips/pnx833x/common/Makefile
index 1a46dd2..abda463 100644
--- a/arch/mips/pnx833x/common/Makefile
+++ b/arch/mips/pnx833x/common/Makefile
@@ -1 +1 @@
-obj-y := interrupts.o platform.o prom.o setup.o reset.o
+obj-y := interrupts.o platform.o setup.o reset.o
diff --git a/arch/mips/pnx833x/common/prom.c b/arch/mips/pnx833x/common/prom.c
deleted file mode 100644
index 29969f9..0000000
--- a/arch/mips/pnx833x/common/prom.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * prom.c:
- *
- * Copyright 2008 NXP Semiconductors
- * Chris Steel <chris.steel@nxp.com>
- * Daniel Laird <daniel.j.laird@nxp.com>
- *
- * Based on software written by:
- * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that 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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#include <linux/init.h>
-#include <asm/bootinfo.h>
-#include <linux/string.h>
-
-void __init prom_init_cmdline(void)
-{
- int argc = fw_arg0;
- char **argv = (char **)fw_arg1;
- char *c = &(arcs_cmdline[0]);
- int i;
-
- for (i = 1; i < argc; i++) {
- strcpy(c, argv[i]);
- c += strlen(argv[i]);
- if (i < argc-1)
- *c++ = ' ';
- }
- *c = 0;
-}
-
-char __init *prom_getenv(char *envname)
-{
- extern char **prom_envp;
- char **env = prom_envp;
- int i;
-
- i = strlen(envname);
-
- while (*env) {
- if (strncmp(envname, *env, i) == 0 && *(*env+i) == '=')
- return *env + i + 1;
- env++;
- }
-
- return 0;
-}
-
-void __init prom_free_prom_memory(void)
-{
-}
diff --git a/arch/mips/pnx833x/common/setup.c b/arch/mips/pnx833x/common/setup.c
index e51fbc4..3ea4926 100644
--- a/arch/mips/pnx833x/common/setup.c
+++ b/arch/mips/pnx833x/common/setup.c
@@ -36,6 +36,10 @@ extern void pnx833x_machine_restart(char *);
extern void pnx833x_machine_halt(void);
extern void pnx833x_machine_power_off(void);
+void __init prom_free_prom_memory(void)
+{
+}
+
int __init plat_mem_setup(void)
{
/* fake pci bus to avoid bounce buffers */
diff --git a/arch/mips/pnx833x/stb22x/board.c b/arch/mips/pnx833x/stb22x/board.c
index 644eb7c..cdf1a3b 100644
--- a/arch/mips/pnx833x/stb22x/board.c
+++ b/arch/mips/pnx833x/stb22x/board.c
@@ -23,8 +23,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/init.h>
-#include <asm/bootinfo.h>
#include <linux/mm.h>
+#include <asm/fw/fw.h>
#include <pnx833x.h>
#include <gpio.h>
@@ -38,34 +38,23 @@
#define PNX8335_DEBUG6 0x4418
#define PNX8335_DEBUG7 0x441c
-int prom_argc;
-char **prom_argv, **prom_envp;
-
-extern void prom_init_cmdline(void);
-extern char *prom_getenv(char *envname);
-
const char *get_system_type(void)
{
return "NXP STB22x";
}
-static inline unsigned long env_or_default(char *env, unsigned long dfl)
-{
- char *str = prom_getenv(env);
- return str ? simple_strtol(str, 0, 0) : dfl;
-}
-
void __init prom_init(void)
{
unsigned long memsize;
- prom_argc = fw_arg0;
- prom_argv = (char **)fw_arg1;
- prom_envp = (char **)fw_arg2;
+ fw_init_cmdline();
- prom_init_cmdline();
+ memsize = fw_getenvl("memsize");
+ if (!memsize) {
+ pr_warn("memsize not set by firmware, setting to 32MB\n");
+ memsize = 0x02000000;
+ }
- memsize = env_or_default("memsize", 0x02000000);
add_memory_region(0, memsize, BOOT_MEM_RAM);
}
diff --git a/arch/mips/pnx8550/common/Makefile b/arch/mips/pnx8550/common/Makefile
index f8ce695..32f5399 100644
--- a/arch/mips/pnx8550/common/Makefile
+++ b/arch/mips/pnx8550/common/Makefile
@@ -22,5 +22,5 @@
# under Linux.
#
-obj-y := setup.o prom.o int.o reset.o time.o proc.o platform.o
+obj-y := setup.o int.o reset.o time.o proc.o platform.o
obj-$(CONFIG_PCI) += pci.o
diff --git a/arch/mips/pnx8550/common/prom.c b/arch/mips/pnx8550/common/prom.c
deleted file mode 100644
index 49639e8..0000000
--- a/arch/mips/pnx8550/common/prom.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- *
- * Per Hallsmark, per.hallsmark@mvista.com
- *
- * Based on jmr3927/common/prom.c
- *
- * 2004 (c) MontaVista Software, Inc. This file is licensed under the
- * terms of the GNU General Public License version 2. This program is
- * licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/string.h>
-#include <linux/serial_pnx8xxx.h>
-
-#include <asm/bootinfo.h>
-#include <uart.h>
-
-/* #define DEBUG_CMDLINE */
-
-extern int prom_argc;
-extern char **prom_argv, **prom_envp;
-
-typedef struct
-{
- char *name;
-/* char *val; */
-}t_env_var;
-
-
-char * __init prom_getcmdline(void)
-{
- return &(arcs_cmdline[0]);
-}
-
-void __init prom_init_cmdline(void)
-{
- int i;
-
- arcs_cmdline[0] = '\0';
- for (i = 0; i < prom_argc; i++) {
- strcat(arcs_cmdline, prom_argv[i]);
- strcat(arcs_cmdline, " ");
- }
-}
-
-char *prom_getenv(char *envname)
-{
- /*
- * Return a pointer to the given environment variable.
- * Environment variables are stored in the form of "memsize=64".
- */
-
- t_env_var *env = (t_env_var *)prom_envp;
- int i;
-
- i = strlen(envname);
-
- while(env->name) {
- if(strncmp(envname, env->name, i) == 0) {
- return(env->name + strlen(envname) + 1);
- }
- env++;
- }
- return(NULL);
-}
-
-inline unsigned char str2hexnum(unsigned char c)
-{
- if(c >= '0' && c <= '9')
- return c - '0';
- if(c >= 'a' && c <= 'f')
- return c - 'a' + 10;
- if(c >= 'A' && c <= 'F')
- return c - 'A' + 10;
- return 0; /* foo */
-}
-
-inline void str2eaddr(unsigned char *ea, unsigned char *str)
-{
- int i;
-
- for(i = 0; i < 6; i++) {
- unsigned char num;
-
- if((*str == '.') || (*str == ':'))
- str++;
- num = str2hexnum(*str++) << 4;
- num |= (str2hexnum(*str++));
- ea[i] = num;
- }
-}
-
-int get_ethernet_addr(char *ethernet_addr)
-{
- char *ethaddr_str;
-
- ethaddr_str = prom_getenv("ethaddr");
- if (!ethaddr_str) {
- printk("ethaddr not set in boot prom\n");
- return -1;
- }
- str2eaddr(ethernet_addr, ethaddr_str);
- return 0;
-}
-
-void __init prom_free_prom_memory(void)
-{
-}
-
-extern int pnx8550_console_port;
-
-/* used by early printk */
-void prom_putchar(char c)
-{
- if (pnx8550_console_port != -1) {
- /* Wait until FIFO not full */
- while( ((ip3106_fifo(UART_BASE, pnx8550_console_port) & PNX8XXX_UART_FIFO_TXFIFO) >> 16) >= 16)
- ;
- /* Send one char */
- ip3106_fifo(UART_BASE, pnx8550_console_port) = c;
- }
-}
-
-EXPORT_SYMBOL(get_ethernet_addr);
-EXPORT_SYMBOL(str2eaddr);
diff --git a/arch/mips/pnx8550/common/setup.c b/arch/mips/pnx8550/common/setup.c
index fccd6b0..b8ae54c 100644
--- a/arch/mips/pnx8550/common/setup.c
+++ b/arch/mips/pnx8550/common/setup.c
@@ -28,10 +28,10 @@
#include <linux/pm.h>
#include <asm/cpu.h>
-#include <asm/bootinfo.h>
#include <asm/irq.h>
#include <asm/mipsregs.h>
#include <asm/reboot.h>
+#include <asm/fw/fw.h>
#include <asm/pgtable.h>
#include <asm/time.h>
@@ -46,7 +46,6 @@ extern void pnx8550_machine_restart(char *);
extern void pnx8550_machine_halt(void);
extern struct resource ioport_resource;
extern struct resource iomem_resource;
-extern char *prom_getcmdline(void);
struct resource standard_io_resources[] = {
{
@@ -128,8 +127,8 @@ void __init plat_mem_setup(void)
(PNX8550_GPIO_MODE_PRIMOP << PNX8550_GPIO_MC_17_BIT),
PNX8550_GPIO_MC1);
- argptr = prom_getcmdline();
- if ((argptr = strstr(argptr, "console=ttyS")) != NULL) {
+ argptr = strstr(fw_getcmdline(), "console=ttyS");
+ if (argptr != NULL) {
argptr += strlen("console=ttyS");
pnx8550_console_port = *argptr == '0' ? 0 : 1;
diff --git a/arch/mips/pnx8550/jbs/init.c b/arch/mips/pnx8550/jbs/init.c
index d59b4a4..e682446 100644
--- a/arch/mips/pnx8550/jbs/init.c
+++ b/arch/mips/pnx8550/jbs/init.c
@@ -29,15 +29,10 @@
#include <linux/sched.h>
#include <linux/bootmem.h>
#include <asm/addrspace.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <linux/string.h>
#include <linux/kernel.h>
-int prom_argc;
-char **prom_argv, **prom_envp;
-extern void __init prom_init_cmdline(void);
-extern char *prom_getenv(char *envname);
-
const char *get_system_type(void)
{
return "NXP PNX8550/JBS";
@@ -47,6 +42,8 @@ void __init prom_init(void)
{
unsigned long memsize;
+ fw_init_cmdline();
+
//memsize = 0x02800000; /* Trimedia uses memory above */
memsize = 0x08000000; /* Trimedia uses memory above */
add_memory_region(0, memsize, BOOT_MEM_RAM);
diff --git a/arch/mips/pnx8550/stb810/prom_init.c b/arch/mips/pnx8550/stb810/prom_init.c
index ca7f4ad..cb1b052 100644
--- a/arch/mips/pnx8550/stb810/prom_init.c
+++ b/arch/mips/pnx8550/stb810/prom_init.c
@@ -17,15 +17,10 @@
#include <linux/sched.h>
#include <linux/bootmem.h>
#include <asm/addrspace.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <linux/string.h>
#include <linux/kernel.h>
-int prom_argc;
-char **prom_argv, **prom_envp;
-extern void __init prom_init_cmdline(void);
-extern char *prom_getenv(char *envname);
-
const char *get_system_type(void)
{
return "NXP PNX8950/STB810";
@@ -35,11 +30,7 @@ void __init prom_init(void)
{
unsigned long memsize;
- prom_argc = (int) fw_arg0;
- prom_argv = (char **) fw_arg1;
- prom_envp = (char **) fw_arg2;
-
- prom_init_cmdline();
+ fw_init_cmdline();
memsize = 0x08000000; /* Trimedia uses memory above */
add_memory_region(0, memsize, BOOT_MEM_RAM);
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 27/35] MIPS: PNX83xx, PNX8550: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (25 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 26/35] MIPS: PNX83xx, PNX8550: Cleanup firmware support for PNX platforms Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 28/35] MIPS: PowerTV: Cleanup firmware support for PowerTV platform Steven J. Hill
` (9 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/pnx833x/common/setup.c | 35 ++++++-------------
arch/mips/pnx833x/stb22x/board.c | 45 ++++++++++--------------
arch/mips/pnx8550/common/setup.c | 62 +++++++++++++++-------------------
arch/mips/pnx8550/jbs/init.c | 38 ++++-----------------
arch/mips/pnx8550/stb810/prom_init.c | 25 +++++---------
5 files changed, 71 insertions(+), 134 deletions(-)
diff --git a/arch/mips/pnx833x/common/setup.c b/arch/mips/pnx833x/common/setup.c
index 3ea4926..f744b80 100644
--- a/arch/mips/pnx833x/common/setup.c
+++ b/arch/mips/pnx833x/common/setup.c
@@ -1,33 +1,20 @@
/*
- * setup.c: Setup PNX833X Soc.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * Copyright 2008 NXP Semiconductors
- * Chris Steel <chris.steel@nxp.com>
- * Daniel Laird <daniel.j.laird@nxp.com>
+ * Setup PNX833X SOC. Based on software written by
+ * Nikita Youshchenko <yoush@debian.org> from PNX8550 code.
*
- * Based on software written by:
- * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Copyright 2008 NXP Semiconductors
+ * Authors: Chris Steel <chris.steel@nxp.com>
+ * Daniel Laird <daniel.j.laird@nxp.com>
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/ioport.h>
-#include <linux/io.h>
#include <linux/pci.h>
+
#include <asm/reboot.h>
+
#include <pnx833x.h>
#include <gpio.h>
diff --git a/arch/mips/pnx833x/stb22x/board.c b/arch/mips/pnx833x/stb22x/board.c
index cdf1a3b..80e12ee 100644
--- a/arch/mips/pnx833x/stb22x/board.c
+++ b/arch/mips/pnx833x/stb22x/board.c
@@ -1,31 +1,20 @@
/*
- * board.c: STB225 board support.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * Copyright 2008 NXP Semiconductors
- * Chris Steel <chris.steel@nxp.com>
- * Daniel Laird <daniel.j.laird@nxp.com>
+ * STB225 board support based on software written by
+ * Nikita Youshchenko <yoush@debian.org> from PNX8550 code.
*
- * Based on software written by:
- * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Copyright 2008 NXP Semiconductors
+ * Authors: Chris Steel <chris.steel@nxp.com>
+ * Daniel Laird <daniel.j.laird@nxp.com>
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-#include <linux/init.h>
-#include <linux/mm.h>
+#include <linux/bootmem.h>
+
#include <asm/fw/fw.h>
-#include <pnx833x.h>
+
#include <gpio.h>
/* endianess twiddlers */
@@ -94,9 +83,6 @@ void __init pnx833x_board_setup(void)
PNX833X_MIU_SEL0_TIMING = 0x50003081;
PNX833X_MIU_SEL1_TIMING = 0x50003081;
- /* Setup GPIO 00 for use as MIU CS1 (CS0 is not multiplexed, so does not need this) */
- pnx833x_gpio_select_function_alt(0);
-
/* Setup GPIO 04 to input NAND read/busy signal */
pnx833x_gpio_select_function_io(4);
pnx833x_gpio_select_input(4);
@@ -115,8 +101,11 @@ void __init pnx833x_board_setup(void)
PNX833X_MIU_SEL1 = 1;
PNX833X_MIU_SEL0_TIMING = 0x6A08D082;
PNX833X_MIU_SEL1_TIMING = 0x6A08D082;
+#endif
- /* Setup GPIO 00 for use as MIU CS1 (CS0 is not multiplexed, so does not need this) */
+ /*
+ * Setup GPIO 00 for use as MIU CS1 (CS0 is not multiplexed,
+ * so does not need this)
+ */
pnx833x_gpio_select_function_alt(0);
-#endif
}
diff --git a/arch/mips/pnx8550/common/setup.c b/arch/mips/pnx8550/common/setup.c
index b8ae54c..abe585e 100644
--- a/arch/mips/pnx8550/common/setup.c
+++ b/arch/mips/pnx8550/common/setup.c
@@ -1,45 +1,21 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * 2.6 port, Embedded Alley Solutions, Inc
+ * Setup based on Per Hallsmark, per.hallsmark@mvista.com
*
- * Based on Per Hallsmark, per.hallsmark@mvista.com
- *
- * 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.
+ * Copyright 2005 Embedded Alley Solutions, Inc <source@embeddedalley.com>
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-#include <linux/init.h>
-#include <linux/sched.h>
-#include <linux/ioport.h>
-#include <linux/irq.h>
-#include <linux/mm.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
#include <linux/serial_pnx8xxx.h>
-#include <linux/pm.h>
-#include <asm/cpu.h>
-#include <asm/irq.h>
-#include <asm/mipsregs.h>
#include <asm/reboot.h>
#include <asm/fw/fw.h>
-#include <asm/pgtable.h>
-#include <asm/time.h>
#include <glb.h>
-#include <int.h>
#include <pci.h>
#include <uart.h>
-#include <nand.h>
extern void __init board_setup(void);
extern void pnx8550_machine_restart(char *);
@@ -89,16 +65,34 @@ unsigned long get_system_mem_size(void)
int pnx8550_console_port = -1;
+/* used by early printk */
+void prom_putchar(char c)
+{
+ if (pnx8550_console_port != -1) {
+ /* Wait until FIFO not full */
+ while (((ip3106_fifo(UART_BASE, pnx8550_console_port) &
+ PNX8XXX_UART_FIFO_TXFIFO) >> 16) >= 16)
+ ;
+
+ /* Send one char */
+ ip3106_fifo(UART_BASE, pnx8550_console_port) = c;
+ }
+}
+
+void __init prom_free_prom_memory(void)
+{
+}
+
void __init plat_mem_setup(void)
{
int i;
- char* argptr;
+ char *argptr;
board_setup(); /* board specific setup */
- _machine_restart = pnx8550_machine_restart;
- _machine_halt = pnx8550_machine_halt;
- pm_power_off = pnx8550_machine_halt;
+ _machine_restart = pnx8550_machine_restart;
+ _machine_halt = pnx8550_machine_halt;
+ pm_power_off = pnx8550_machine_halt;
/* Clear the Global 2 Register, PCI Inta Output Enable Registers
Bit 1:Enable DAC Powerdown
diff --git a/arch/mips/pnx8550/jbs/init.c b/arch/mips/pnx8550/jbs/init.c
index e682446..cc69bac 100644
--- a/arch/mips/pnx8550/jbs/init.c
+++ b/arch/mips/pnx8550/jbs/init.c
@@ -1,37 +1,14 @@
/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * Copyright 2005 Embedded Alley Solutions, Inc
- * source@embeddedalley.com
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Copyright 2005 Embedded Alley Solutions, Inc <source@embeddedalley.com>
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
-#include <linux/init.h>
-#include <linux/mm.h>
-#include <linux/sched.h>
#include <linux/bootmem.h>
-#include <asm/addrspace.h>
+
#include <asm/fw/fw.h>
-#include <linux/string.h>
-#include <linux/kernel.h>
const char *get_system_type(void)
{
@@ -44,7 +21,6 @@ void __init prom_init(void)
fw_init_cmdline();
- //memsize = 0x02800000; /* Trimedia uses memory above */
- memsize = 0x08000000; /* Trimedia uses memory above */
+ memsize = 0x08000000; /* Trimedia uses memory above */
add_memory_region(0, memsize, BOOT_MEM_RAM);
}
diff --git a/arch/mips/pnx8550/stb810/prom_init.c b/arch/mips/pnx8550/stb810/prom_init.c
index cb1b052..58d2765 100644
--- a/arch/mips/pnx8550/stb810/prom_init.c
+++ b/arch/mips/pnx8550/stb810/prom_init.c
@@ -1,25 +1,16 @@
/*
- * STB810 specific prom routines
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * Author: MontaVista Software, Inc.
- * source@mvista.com
+ * STB810 specific prom routines.
*
- * Copyright 2005 MontaVista Software Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * Copyright 2005 MontaVista Software Inc. <source@mvista.com>
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
-#include <linux/init.h>
-#include <linux/mm.h>
-#include <linux/sched.h>
#include <linux/bootmem.h>
-#include <asm/addrspace.h>
+
#include <asm/fw/fw.h>
-#include <linux/string.h>
-#include <linux/kernel.h>
const char *get_system_type(void)
{
@@ -32,6 +23,6 @@ void __init prom_init(void)
fw_init_cmdline();
- memsize = 0x08000000; /* Trimedia uses memory above */
+ memsize = 0x08000000; /* Trimedia uses memory above */
add_memory_region(0, memsize, BOOT_MEM_RAM);
}
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 28/35] MIPS: PowerTV: Cleanup firmware support for PowerTV platform.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (26 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 27/35] MIPS: PNX83xx, PNX8550: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 29/35] MIPS: PowerTV: Cleanup files effected by firmware changes Steven J. Hill
` (8 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/powertv/asic/asic_int.c | 1 -
arch/mips/powertv/init.c | 54 +++----------------------------------
arch/mips/powertv/memory.c | 13 +++------
arch/mips/powertv/powertv_setup.c | 2 --
4 files changed, 7 insertions(+), 63 deletions(-)
diff --git a/arch/mips/powertv/asic/asic_int.c b/arch/mips/powertv/asic/asic_int.c
index 99d82e1..8728c3b 100644
--- a/arch/mips/powertv/asic/asic_int.c
+++ b/arch/mips/powertv/asic/asic_int.c
@@ -35,7 +35,6 @@
#include <linux/io.h>
#include <asm/irq_regs.h>
#include <asm/setup.h>
-#include <asm/mips-boards/generic.h>
#include <asm/mach-powertv/asic_regs.h>
diff --git a/arch/mips/powertv/init.c b/arch/mips/powertv/init.c
index 1cf5abb..14cdf19 100644
--- a/arch/mips/powertv/init.c
+++ b/arch/mips/powertv/init.c
@@ -23,52 +23,15 @@
#include <linux/init.h>
#include <linux/string.h>
#include <linux/kernel.h>
-
-#include <asm/bootinfo.h>
#include <linux/io.h>
+
#include <asm/cacheflush.h>
#include <asm/traps.h>
-
-#include <asm/mips-boards/prom.h>
-#include <asm/mips-boards/generic.h>
+#include <asm/fw/fw.h>
#include <asm/mach-powertv/asic.h>
-static int *_prom_envp;
unsigned long _prom_memsize;
-/*
- * YAMON (32-bit PROM) pass arguments and environment as 32-bit pointer.
- * This macro take care of sign extension, if running in 64-bit mode.
- */
-#define prom_envp(index) ((char *)(long)_prom_envp[(index)])
-
-char *prom_getenv(char *envname)
-{
- char *result = NULL;
-
- if (_prom_envp != NULL) {
- /*
- * Return a pointer to the given environment variable.
- * In 64-bit mode: we're using 64-bit pointers, but all pointers
- * in the PROM structures are only 32-bit, so we need some
- * workarounds, if we are running in 64-bit mode.
- */
- int i, index = 0;
-
- i = strlen(envname);
-
- while (prom_envp(index)) {
- if (strncmp(envname, prom_envp(index), i) == 0) {
- result = prom_envp(index + 1);
- break;
- }
- index += 2;
- }
- }
-
- return result;
-}
-
/* TODO: Verify on linux-mips mailing list that the following two */
/* functions are correct */
/* TODO: Copy NMI and EJTAG exception vectors to memory from the */
@@ -105,24 +68,15 @@ static void __init mips_ejtag_setup(void)
void __init prom_init(void)
{
- int prom_argc;
- char *prom_argv;
-
- prom_argc = fw_arg0;
- prom_argv = (char *) fw_arg1;
- _prom_envp = (int *) fw_arg2;
_prom_memsize = (unsigned long) fw_arg3;
board_nmi_handler_setup = mips_nmi_setup;
board_ejtag_handler_setup = mips_ejtag_setup;
- if (prom_argc == 1) {
- strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
- strlcat(arcs_cmdline, prom_argv, COMMAND_LINE_SIZE);
- }
+ fw_init_cmdline();
configure_platform();
- prom_meminit();
+ fw_meminit();
#ifndef CONFIG_BOOTLOADER_DRIVER
pr_info("\nBootloader driver isn't loaded...\n");
diff --git a/arch/mips/powertv/memory.c b/arch/mips/powertv/memory.c
index fb3d296..56f0193 100644
--- a/arch/mips/powertv/memory.c
+++ b/arch/mips/powertv/memory.c
@@ -28,8 +28,8 @@
#include <asm/bootinfo.h>
#include <asm/page.h>
#include <asm/sections.h>
+#include <asm/fw/fw.h>
-#include <asm/mips-boards/prom.h>
#include <asm/mach-powertv/asic.h>
#include <asm/mach-powertv/ioremap.h>
@@ -163,7 +163,6 @@ static phys_addr_t get_memsize(void)
{
static char cmdline[COMMAND_LINE_SIZE] __initdata;
phys_addr_t memsize = 0;
- char *memsize_str;
char *ptr;
/* Check the command line first for a memsize directive */
@@ -176,13 +175,7 @@ static phys_addr_t get_memsize(void)
memsize = memparse(ptr + 8, &ptr);
} else {
/* otherwise look in the environment */
- memsize_str = prom_getenv("memsize");
-
- if (memsize_str != NULL) {
- pr_info("prom memsize = %s\n", memsize_str);
- memsize = simple_strtol(memsize_str, NULL, 0);
- }
-
+ memsize = (phys_addr_t) fw_getenvl("memsize");
if (memsize == 0) {
if (_prom_memsize != 0) {
memsize = _prom_memsize;
@@ -332,7 +325,7 @@ static __init void register_address_space(phys_addr_t memsize)
}
}
-void __init prom_meminit(void)
+void __init fw_meminit(void)
{
ptv_memsize = get_memsize();
register_address_space(ptv_memsize);
diff --git a/arch/mips/powertv/powertv_setup.c b/arch/mips/powertv/powertv_setup.c
index 3933c37..55a3fc5 100644
--- a/arch/mips/powertv/powertv_setup.c
+++ b/arch/mips/powertv/powertv_setup.c
@@ -30,8 +30,6 @@
#include <asm/bootinfo.h>
#include <asm/irq.h>
-#include <asm/mips-boards/generic.h>
-#include <asm/mips-boards/prom.h>
#include <asm/dma.h>
#include <asm/asm.h>
#include <asm/traps.h>
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 29/35] MIPS: PowerTV: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (27 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 28/35] MIPS: PowerTV: Cleanup firmware support for PowerTV platform Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 30/35] MIPS: RB532: Cleanup firmware support for RB532 platform Steven J. Hill
` (7 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/powertv/asic/asic_int.c | 44 ++++++++++---------------------------
arch/mips/powertv/init.c | 27 +++++++++--------------
arch/mips/powertv/memory.c | 26 +++++++++-------------
arch/mips/powertv/powertv_setup.c | 27 +++++++++--------------
4 files changed, 42 insertions(+), 82 deletions(-)
diff --git a/arch/mips/powertv/asic/asic_int.c b/arch/mips/powertv/asic/asic_int.c
index 8728c3b..3cd9f65 100644
--- a/arch/mips/powertv/asic/asic_int.c
+++ b/arch/mips/powertv/asic/asic_int.c
@@ -1,27 +1,20 @@
/*
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 2000, 2001, 2004 MIPS Technologies, Inc.
- * Copyright (C) 2001 Ralf Baechle
- * Portions copyright (C) 2009 Cisco Systems, Inc.
- *
- * 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 file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * 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.
+ * Routines for generic manipulation of the interrupts found on the PowerTV
+ * platform. The interrupt controller is located in the South Bridge a PIIX4
+ * device with two internal 82C95 interrupt controllers.
*
- * 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.
+ * Copyright (C) 2000,2001,2004,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
*
- * Routines for generic manipulation of the interrupts found on the PowerTV
- * platform.
+ * Copyright (C) 2001 Ralf Baechle
*
- * The interrupt controller is located in the South Bridge a PIIX4 device
- * with two internal 82C95 interrupt controllers.
+ * Portions copyright (C) 2009 Cisco Systems, Inc.
*/
#include <linux/init.h>
#include <linux/irq.h>
@@ -68,19 +61,6 @@ static void asic_irqdispatch(void)
do_IRQ(irq);
}
-static inline int clz(unsigned long x)
-{
- __asm__(
- " .set push \n"
- " .set mips32 \n"
- " clz %0, %1 \n"
- " .set pop \n"
- : "=r" (x)
- : "r" (x));
-
- return x;
-}
-
/*
* Version of ffs that only looks at bits 12..15.
*/
diff --git a/arch/mips/powertv/init.c b/arch/mips/powertv/init.c
index 14cdf19..d9be671 100644
--- a/arch/mips/powertv/init.c
+++ b/arch/mips/powertv/init.c
@@ -1,24 +1,17 @@
/*
- * Copyright (C) 1999, 2000, 2004, 2005 MIPS Technologies, Inc.
- * All rights reserved.
- * Authors: Carsten Langgaard <carstenl@mips.com>
- * Maciej W. Rozycki <macro@mips.com>
- * Portions copyright (C) 2009 Cisco Systems, Inc.
- *
- * 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 file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * 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.
+ * PROM library initialisation code.
*
- * 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.
+ * Copyright (C) 1999,2000,2004,2005,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Maciej W. Rozycki <macro@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
*
- * PROM library initialisation code.
+ * Portions copyright (C) 2009 Cisco Systems, Inc.
*/
#include <linux/init.h>
#include <linux/string.h>
diff --git a/arch/mips/powertv/memory.c b/arch/mips/powertv/memory.c
index 56f0193..be70d51 100644
--- a/arch/mips/powertv/memory.c
+++ b/arch/mips/powertv/memory.c
@@ -1,23 +1,17 @@
/*
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
- * Portions copyright (C) 2009 Cisco Systems, Inc.
- *
- * 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.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
* Apparently originally from arch/mips/malta-memory.c. Modified to work
* with the PowerTV bootloader.
+ *
+ * Copyright (C) 1999,2000,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
+ *
+ * Portions copyright (C) 2009 Cisco Systems, Inc.
*/
#include <linux/init.h>
#include <linux/mm.h>
diff --git a/arch/mips/powertv/powertv_setup.c b/arch/mips/powertv/powertv_setup.c
index 55a3fc5..beec158 100644
--- a/arch/mips/powertv/powertv_setup.c
+++ b/arch/mips/powertv/powertv_setup.c
@@ -1,20 +1,14 @@
/*
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
- * Portions copyright (C) 2009 Cisco Systems, Inc.
- *
- * 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 file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * 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.
+ * Copyright (C) 2000,2012 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Steven J. Hill <sjhill@mips.com>
*
- * 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.
+ * Portions copyright (C) 2009 Cisco Systems, Inc.
*/
#include <linux/init.h>
#include <linux/sched.h>
@@ -197,8 +191,7 @@ static int panic_handler(struct notifier_block *notifier_block,
my_regs.cp0_status = read_c0_status();
}
- pr_crit("I'm feeling a bit sleepy. hmmmmm... perhaps a nap would... "
- "zzzz... \n");
+ pr_crit("I'm feeling a bit sleepy. Perhaps a nap would...zzzz...\n");
return NOTIFY_DONE;
}
@@ -295,7 +288,7 @@ void platform_random_ether_addr(u8 addr[ETH_ALEN])
const unsigned char mac_addr_locally_managed = (1 << 1);
if (!have_rfmac) {
- pr_warning("rfmac not available on command line; "
+ pr_warn("rfmac not available on command line; "
"generating random MAC address\n");
random_ether_addr(addr);
}
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 30/35] MIPS: RB532: Cleanup firmware support for RB532 platform.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (28 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 29/35] MIPS: PowerTV: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 31/35] MIPS: RB532: Cleanup files effected by firmware changes Steven J. Hill
` (6 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/rb532/prom.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/arch/mips/rb532/prom.c b/arch/mips/rb532/prom.c
index d7c26d0..54f5399 100644
--- a/arch/mips/rb532/prom.c
+++ b/arch/mips/rb532/prom.c
@@ -33,7 +33,7 @@
#include <linux/ioport.h>
#include <linux/blkdev.h>
-#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <asm/mach-rc32434/ddr.h>
#include <asm/mach-rc32434/prom.h>
@@ -62,41 +62,40 @@ static inline int match_tag(char *arg, const char *tag)
static inline unsigned long tag2ul(char *arg, const char *tag)
{
char *num;
+ long val;
+ int tmp;
num = arg + strlen(tag);
- return simple_strtoul(num, 0, 10);
+ tmp = kstrtol(num, 0, &val);
+ return (unsigned long)val;
}
void __init prom_setup_cmdline(void)
{
static char cmd_line[COMMAND_LINE_SIZE] __initdata;
char *cp, *board;
- int prom_argc;
- char **prom_argv, **prom_envp;
int i;
- prom_argc = fw_arg0;
- prom_argv = (char **) fw_arg1;
- prom_envp = (char **) fw_arg2;
+ fw_init_cmdline();
cp = cmd_line;
/* Note: it is common that parameters start
* at argv[1] and not argv[0],
* however, our elf loader starts at [0] */
- for (i = 0; i < prom_argc; i++) {
- if (match_tag(prom_argv[i], FREQ_TAG)) {
- idt_cpu_freq = tag2ul(prom_argv[i], FREQ_TAG);
+ for (i = 0; i < fw_argc; i++) {
+ if (match_tag(fw_argv(i), FREQ_TAG)) {
+ idt_cpu_freq = tag2ul(fw_argv(i), FREQ_TAG);
continue;
}
#ifdef IGNORE_CMDLINE_MEM
/* parses out the "mem=xx" arg */
- if (match_tag(prom_argv[i], MEM_TAG))
+ if (match_tag(fw_argv(i), MEM_TAG))
continue;
#endif
if (i > 0)
*(cp++) = ' ';
- if (match_tag(prom_argv[i], BOARD_TAG)) {
- board = prom_argv[i] + strlen(BOARD_TAG);
+ if (match_tag(fw_argv(i), BOARD_TAG)) {
+ board = fw_argv(i) + strlen(BOARD_TAG);
if (match_tag(board, BOARD_RB532A))
mips_machtype = MACH_MIKROTIK_RB532A;
@@ -104,8 +103,8 @@ void __init prom_setup_cmdline(void)
mips_machtype = MACH_MIKROTIK_RB532;
}
- strcpy(cp, prom_argv[i]);
- cp += strlen(prom_argv[i]);
+ strcpy(cp, fw_argv(i));
+ cp += strlen(fw_argv(i));
}
*(cp++) = ' ';
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 31/35] MIPS: RB532: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (29 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 30/35] MIPS: RB532: Cleanup firmware support for RB532 platform Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 32/35] MIPS: txx9: Cleanup firmware support for txx9 platforms Steven J. Hill
` (5 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/rb532/prom.c | 40 +++++++++++-----------------------------
1 file changed, 11 insertions(+), 29 deletions(-)
diff --git a/arch/mips/rb532/prom.c b/arch/mips/rb532/prom.c
index 54f5399..5bddd0b 100644
--- a/arch/mips/rb532/prom.c
+++ b/arch/mips/rb532/prom.c
@@ -1,37 +1,19 @@
/*
- * RouterBoard 500 specific prom routines
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * Copyright (C) 2003, Peter Sadik <peter.sadik@idt.com>
- * Copyright (C) 2005-2006, P.Christeas <p_christ@hol.gr>
- * Copyright (C) 2007, Gabor Juhos <juhosg@openwrt.org>
- * Felix Fietkau <nbd@openwrt.org>
- * Florian Fainelli <florian@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that 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., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
+ * RouterBoard 500 specific prom routines
*
+ * Copyright (C) 2003, Peter Sadik <peter.sadik@idt.com>
+ * Copyright (C) 2005-2006, P.Christeas <p_christ@hol.gr>
+ * Copyright (C) 2007, Gabor Juhos <juhosg@openwrt.org>
+ * Felix Fietkau <nbd@openwrt.org>
+ * Florian Fainelli <florian@openwrt.org>
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-
-#include <linux/init.h>
-#include <linux/mm.h>
#include <linux/module.h>
#include <linux/string.h>
-#include <linux/console.h>
-#include <linux/bootmem.h>
-#include <linux/ioport.h>
-#include <linux/blkdev.h>
#include <asm/fw/fw.h>
#include <asm/mach-rc32434/ddr.h>
@@ -129,7 +111,7 @@ void __init prom_init(void)
ddr_reg[0].end - ddr_reg[0].start);
if (!ddr) {
- printk(KERN_ERR "Unable to remap DDR register\n");
+ pr_err("Unable to remap DDR register\n");
return;
}
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 32/35] MIPS: txx9: Cleanup firmware support for txx9 platforms.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (30 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 31/35] MIPS: RB532: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-06 13:27 ` Geert Uytterhoeven
2012-06-05 21:19 ` [PATCH 33/35] MIPS: txx9: Cleanup files effected by firmware changes Steven J. Hill
` (4 subsequent siblings)
36 siblings, 1 reply; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/include/asm/txx9/generic.h | 1 -
arch/mips/txx9/generic/setup.c | 56 ++--------------------------------
2 files changed, 3 insertions(+), 54 deletions(-)
diff --git a/arch/mips/include/asm/txx9/generic.h b/arch/mips/include/asm/txx9/generic.h
index 64887d3..4127a38 100644
--- a/arch/mips/include/asm/txx9/generic.h
+++ b/arch/mips/include/asm/txx9/generic.h
@@ -42,7 +42,6 @@ struct txx9_board_vec {
};
extern struct txx9_board_vec *txx9_board_vec;
extern int (*txx9_irq_dispatch)(int pending);
-const char *prom_getenv(const char *name);
void txx9_wdt_init(unsigned long base);
void txx9_wdt_now(unsigned long base);
void txx9_spi_init(int busid, unsigned long base, int irq);
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index ae77a79..8a053d6 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -25,11 +25,11 @@
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/irq.h>
-#include <asm/bootinfo.h>
#include <asm/time.h>
#include <asm/reboot.h>
#include <asm/r4kcache.h>
#include <asm/sections.h>
+#include <asm/fw/fw.h>
#include <asm/txx9/generic.h>
#include <asm/txx9/pci.h>
#include <asm/txx9tmr.h>
@@ -157,39 +157,6 @@ static struct txx9_board_vec *__init find_board_byname(const char *name)
return NULL;
}
-static void __init prom_init_cmdline(void)
-{
- int argc;
- int *argv32;
- int i; /* Always ignore the "-c" at argv[0] */
-
- if (fw_arg0 >= CKSEG0 || fw_arg1 < CKSEG0) {
- /*
- * argc is not a valid number, or argv32 is not a valid
- * pointer
- */
- argc = 0;
- argv32 = NULL;
- } else {
- argc = (int)fw_arg0;
- argv32 = (int *)fw_arg1;
- }
-
- arcs_cmdline[0] = '\0';
-
- for (i = 1; i < argc; i++) {
- char *str = (char *)(long)argv32[i];
- if (i != 1)
- strcat(arcs_cmdline, " ");
- if (strchr(str, ' ')) {
- strcat(arcs_cmdline, "\"");
- strcat(arcs_cmdline, str);
- strcat(arcs_cmdline, "\"");
- } else
- strcat(arcs_cmdline, str);
- }
-}
-
static int txx9_ic_disable __initdata;
static int txx9_dc_disable __initdata;
@@ -341,7 +308,7 @@ static void __init select_board(void)
if (txx9_board_vec)
return;
/* next, determine by "board" envvar */
- envstr = prom_getenv("board");
+ envstr = fw_getenv("board");
if (envstr) {
txx9_board_vec = find_board_byname(envstr);
if (txx9_board_vec)
@@ -378,7 +345,7 @@ static void __init select_board(void)
void __init prom_init(void)
{
- prom_init_cmdline();
+ fw_init_cmdline();
preprocess_cmdline();
select_board();
@@ -401,23 +368,6 @@ const char *get_system_type(void)
return txx9_system_type;
}
-const char *__init prom_getenv(const char *name)
-{
- const s32 *str;
-
- if (fw_arg2 < CKSEG0)
- return NULL;
-
- str = (const s32 *)fw_arg2;
- /* YAMON style ("name", "value" pairs) */
- while (str[0] && str[1]) {
- if (!strcmp((const char *)(unsigned long)str[0], name))
- return (const char *)(unsigned long)str[1];
- str += 2;
- }
- return NULL;
-}
-
static void __noreturn txx9_machine_halt(void)
{
local_irq_disable();
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* Re: [PATCH 32/35] MIPS: txx9: Cleanup firmware support for txx9 platforms.
2012-06-05 21:19 ` [PATCH 32/35] MIPS: txx9: Cleanup firmware support for txx9 platforms Steven J. Hill
@ 2012-06-06 13:27 ` Geert Uytterhoeven
0 siblings, 0 replies; 57+ messages in thread
From: Geert Uytterhoeven @ 2012-06-06 13:27 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf
Hi Steven,
On Tue, Jun 5, 2012 at 11:19 PM, Steven J. Hill <sjhill@mips.com> wrote:
> --- a/arch/mips/txx9/generic/setup.c
> +++ b/arch/mips/txx9/generic/setup.c
> @@ -25,11 +25,11 @@
> #include <linux/device.h>
> #include <linux/slab.h>
> #include <linux/irq.h>
> -#include <asm/bootinfo.h>
> #include <asm/time.h>
> #include <asm/reboot.h>
> #include <asm/r4kcache.h>
> #include <asm/sections.h>
> +#include <asm/fw/fw.h>
> #include <asm/txx9/generic.h>
> #include <asm/txx9/pci.h>
> #include <asm/txx9tmr.h>
> @@ -157,39 +157,6 @@ static struct txx9_board_vec *__init find_board_byname(const char *name)
> return NULL;
> }
>
> -static void __init prom_init_cmdline(void)
> -{
> - int argc;
> - int *argv32;
> - int i; /* Always ignore the "-c" at argv[0] */
> -
> - if (fw_arg0 >= CKSEG0 || fw_arg1 < CKSEG0) {
> - /*
> - * argc is not a valid number, or argv32 is not a valid
> - * pointer
> - */
> - argc = 0;
> - argv32 = NULL;
> - } else {
> - argc = (int)fw_arg0;
> - argv32 = (int *)fw_arg1;
> - }
> -
> @@ -378,7 +345,7 @@ static void __init select_board(void)
>
> void __init prom_init(void)
> {
> - prom_init_cmdline();
> + fw_init_cmdline();
This basically reverts commit 97b0511ce125b0cb95d73b198c1bdbb3cebc4de2
("MIPS: TXx9: Make firmware parameter passing more robust"), so it's gonna
die horribly on RBTX4927 with VxWorks bootloader.
Can you add the checks to fw_init_cmdline()? I guess they don't harm on other
boards anyway.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 57+ messages in thread
* [PATCH 33/35] MIPS: txx9: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (31 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 32/35] MIPS: txx9: Cleanup firmware support for txx9 platforms Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-05 21:19 ` [PATCH 34/35] MIPS: vr41xx: Cleanup firmware support for vr41xx platforms Steven J. Hill
` (3 subsequent siblings)
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/txx9/generic/setup.c | 29 ++++++++++++-----------------
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 8a053d6..00fc82b 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -1,34 +1,29 @@
/*
- * Based on linux/arch/mips/txx9/rbtx4938/setup.c,
- * and RBTX49xx patch from CELF patch archive.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Based on linux/arch/mips/txx9/rbtx4938/setup.c and RBTX49xx patch
+ * from CELF patch archive.
*
* 2003-2005 (c) MontaVista Software, Inc.
* (C) Copyright TOSHIBA CORPORATION 2000-2001, 2004-2007
*
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/interrupt.h>
#include <linux/string.h>
#include <linux/module.h>
-#include <linux/clk.h>
-#include <linux/err.h>
+#include <linux/slab.h>
#include <linux/gpio.h>
+#include <linux/leds.h>
#include <linux/platform_device.h>
-#include <linux/serial_core.h>
#include <linux/mtd/physmap.h>
-#include <linux/leds.h>
-#include <linux/device.h>
-#include <linux/slab.h>
-#include <linux/irq.h>
-#include <asm/time.h>
+#include <linux/serial_core.h>
+
#include <asm/reboot.h>
#include <asm/r4kcache.h>
#include <asm/sections.h>
+#include <asm/time.h>
#include <asm/fw/fw.h>
#include <asm/txx9/generic.h>
#include <asm/txx9/pci.h>
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* [PATCH 34/35] MIPS: vr41xx: Cleanup firmware support for vr41xx platforms.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (32 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 33/35] MIPS: txx9: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-06 2:20 ` Yuasa Yoichi
2012-06-05 21:19 ` [PATCH 35/35] MIPS: vr41xx: Cleanup files effected by firmware changes Steven J. Hill
` (2 subsequent siblings)
36 siblings, 1 reply; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/vr41xx/common/init.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c
index 2391632..a2fa7f0 100644
--- a/arch/mips/vr41xx/common/init.c
+++ b/arch/mips/vr41xx/common/init.c
@@ -22,8 +22,8 @@
#include <linux/irq.h>
#include <linux/string.h>
-#include <asm/bootinfo.h>
#include <asm/time.h>
+#include <asm/fw/fw.h>
#include <asm/vr41xx/irq.h>
#include <asm/vr41xx/vr41xx.h>
@@ -59,17 +59,7 @@ void __init plat_mem_setup(void)
void __init prom_init(void)
{
- int argc, i;
- char **argv;
-
- argc = fw_arg0;
- argv = (char **)fw_arg1;
-
- for (i = 1; i < argc; i++) {
- strlcat(arcs_cmdline, argv[i], COMMAND_LINE_SIZE);
- if (i < (argc - 1))
- strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
- }
+ fw_init_cmdline();
}
void __init prom_free_prom_memory(void)
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* Re: [PATCH 34/35] MIPS: vr41xx: Cleanup firmware support for vr41xx platforms.
2012-06-05 21:19 ` [PATCH 34/35] MIPS: vr41xx: Cleanup firmware support for vr41xx platforms Steven J. Hill
@ 2012-06-06 2:20 ` Yuasa Yoichi
2012-06-06 2:27 ` Hill, Steven
0 siblings, 1 reply; 57+ messages in thread
From: Yuasa Yoichi @ 2012-06-06 2:20 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf
Hi,
2012/6/6 Steven J. Hill <sjhill@mips.com>:
> From: "Steven J. Hill" <sjhill@mips.com>
>
> Signed-off-by: Steven J. Hill <sjhill@mips.com>
> ---
> arch/mips/vr41xx/common/init.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c
> index 2391632..a2fa7f0 100644
> --- a/arch/mips/vr41xx/common/init.c
> +++ b/arch/mips/vr41xx/common/init.c
> @@ -22,8 +22,8 @@
> #include <linux/irq.h>
> #include <linux/string.h>
You can remove #include <linux/string.h> too.
Yoichi
^ permalink raw reply [flat|nested] 57+ messages in thread
* [PATCH 35/35] MIPS: vr41xx: Cleanup files effected by firmware changes.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (33 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 34/35] MIPS: vr41xx: Cleanup firmware support for vr41xx platforms Steven J. Hill
@ 2012-06-05 21:19 ` Steven J. Hill
2012-06-06 2:14 ` Yuasa Yoichi
2012-06-06 12:16 ` [PATCH 00/35] Cleanup firmware support across multiple platforms Florian Fainelli
2012-06-07 14:46 ` Steven J. Hill
36 siblings, 1 reply; 57+ messages in thread
From: Steven J. Hill @ 2012-06-05 21:19 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill
From: "Steven J. Hill" <sjhill@mips.com>
Make headers consistent across the files and make changes based on
running the checkpatch script.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/vr41xx/common/init.c | 27 ++++++---------------------
1 file changed, 6 insertions(+), 21 deletions(-)
diff --git a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c
index a2fa7f0..783b7f8 100644
--- a/arch/mips/vr41xx/common/init.c
+++ b/arch/mips/vr41xx/common/init.c
@@ -1,30 +1,15 @@
/*
- * init.c, Common initialization routines for NEC VR4100 series.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
- * Copyright (C) 2003-2009 Yoichi Yuasa <yuasa@linux-mips.org>
+ * init.c, Common initialization routines for NEC VR4100 series.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that 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
+ * Copyright (C) 2003-2009 Yoichi Yuasa <yuasa@linux-mips.org>
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
-#include <linux/init.h>
-#include <linux/ioport.h>
-#include <linux/irq.h>
-#include <linux/string.h>
-
#include <asm/time.h>
#include <asm/fw/fw.h>
-#include <asm/vr41xx/irq.h>
#include <asm/vr41xx/vr41xx.h>
#define IO_MEM_RESOURCE_START 0UL
--
1.7.10.3
^ permalink raw reply related [flat|nested] 57+ messages in thread* Re: [PATCH 35/35] MIPS: vr41xx: Cleanup files effected by firmware changes.
2012-06-05 21:19 ` [PATCH 35/35] MIPS: vr41xx: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-06 2:14 ` Yuasa Yoichi
2012-06-06 2:18 ` Hill, Steven
0 siblings, 1 reply; 57+ messages in thread
From: Yuasa Yoichi @ 2012-06-06 2:14 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf
Hi,
2012/6/6 Steven J. Hill <sjhill@mips.com>:
> From: "Steven J. Hill" <sjhill@mips.com>
>
> Make headers consistent across the files and make changes based on
> running the checkpatch script.
>
> Signed-off-by: Steven J. Hill <sjhill@mips.com>
> ---
> arch/mips/vr41xx/common/init.c | 27 ++++++---------------------
> 1 file changed, 6 insertions(+), 21 deletions(-)
>
> diff --git a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c
> index a2fa7f0..783b7f8 100644
> --- a/arch/mips/vr41xx/common/init.c
> +++ b/arch/mips/vr41xx/common/init.c
> @@ -1,30 +1,15 @@
> /*
> - * init.c, Common initialization routines for NEC VR4100 series.
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> *
> - * Copyright (C) 2003-2009 Yoichi Yuasa <yuasa@linux-mips.org>
> + * init.c, Common initialization routines for NEC VR4100 series.
> *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that 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
> + * Copyright (C) 2003-2009 Yoichi Yuasa <yuasa@linux-mips.org>
> + * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
> */
> -#include <linux/init.h>
> -#include <linux/ioport.h>
...
> -#include <linux/string.h>
These are required include files.
Please remove only <linux/irq.h> and <asm/vr41xx/irq.h>
Yoichi
^ permalink raw reply [flat|nested] 57+ messages in thread
* RE: [PATCH 35/35] MIPS: vr41xx: Cleanup files effected by firmware changes.
2012-06-06 2:14 ` Yuasa Yoichi
@ 2012-06-06 2:18 ` Hill, Steven
2012-06-06 2:33 ` Yuasa Yoichi
0 siblings, 1 reply; 57+ messages in thread
From: Hill, Steven @ 2012-06-06 2:18 UTC (permalink / raw)
To: Yuasa Yoichi; +Cc: linux-mips@linux-mips.org
Yoichi,
How are those include files required? I built a complete vr41xx kernel and that file did not produce any errors when being compiled with those headers removed. Did you try building a kernel with this patch?
-Steve
^ permalink raw reply [flat|nested] 57+ messages in thread
* Re: [PATCH 35/35] MIPS: vr41xx: Cleanup files effected by firmware changes.
2012-06-06 2:18 ` Hill, Steven
@ 2012-06-06 2:33 ` Yuasa Yoichi
0 siblings, 0 replies; 57+ messages in thread
From: Yuasa Yoichi @ 2012-06-06 2:33 UTC (permalink / raw)
To: Hill, Steven; +Cc: linux-mips@linux-mips.org
Hi,
2012/6/6 Hill, Steven <sjhill@mips.com>:
> Yoichi,
>
> How are those include files required? I built a complete vr41xx kernel and that file did not produce any errors when being compiled with those headers removed. Did you try building a kernel with this patch?
>
It is not only build problem.
We would like to include <linux/init.h> and <linux/ioport.h>
explicitly because of __init and iomem_resource.
Yoichi
^ permalink raw reply [flat|nested] 57+ messages in thread
* Re: [PATCH 00/35] Cleanup firmware support across multiple platforms.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (34 preceding siblings ...)
2012-06-05 21:19 ` [PATCH 35/35] MIPS: vr41xx: Cleanup files effected by firmware changes Steven J. Hill
@ 2012-06-06 12:16 ` Florian Fainelli
2012-06-07 14:46 ` Steven J. Hill
36 siblings, 0 replies; 57+ messages in thread
From: Florian Fainelli @ 2012-06-06 12:16 UTC (permalink / raw)
To: linux-mips; +Cc: Steven J. Hill, ralf
Hi Steven,
On Tuesday 05 June 2012 16:19:04 Steven J. Hill wrote:
> From: "Steven J. Hill" <sjhill@mips.com>
>
> The firmware/bootloader support code has been duplicated across a lot
> of platforms and continues to self-replicate. These patches move the
> support code into the common 'arch/mips/fw/lib' directory. All affected
> platforms have been built and produce a linked kernel. Any files that
> were modified also had their headers cleaned up and the checkpatch
> script ran on them.
The rationale for your patches look good to me, as well as the impressive
diffstat. You seem to be mixing fixes with cleanups however. Otherwise, for the
AR7 and RB532 bits, you have my ack.
>
> Steven J. Hill (35):
> MIPS: Add environment variable processing code to firmware library.
> MIPS: Alchemy: Cleanup firmware support for Alchemy platforms.
> MIPS: Alchemy: Cleanup files effected by firmware changes.
> MIPS: AR7: Cleanup firmware support for the AR7 platform.
> MIPS: AR7: Cleanup files effected by firmware changes.
> MIPS: ath79: Cleanup firmware support for the ath79 platform.
> MIPS: ath79: Cleanup files effected by firmware changes.
> MIPS: Cobalt: Cleanup firmware support for the Cobalt platform.
> MIPS: Cobalt: Cleanup files effected by firmware changes.
> MIPS: Emma: Cleanup firmware support for the Emma platform.
> MIPS: Emma: Cleanup files effected by firmware changes.
> MIPS: jz4740: Cleanup firmware support for the JZ4740 platform.
> MIPS: jz4740: Cleanup files effected by firmware changes.
> MIPS: lantiq: Cleanup firmware support for the lantiq platform.
> MIPS: lantiq: Cleanup files effected by firmware changes.
> MIPS: Lasat: Cleanup firmware support for the Lasat platform.
> MIPS: Lasat: Cleanup files effected by firmware changes.
> MIPS: Loongson: Cleanup firmware support for the Loongson platform.
> MIPS: Loongson: Cleanup files effected by firmware changes.
> MIPS: Malta: Cleanup firmware support for the Malta platform.
> MIPS: Malta: Cleanup files effected by firmware changes.
> MIPS: Netlogic: Cleanup firmware support for the XLR platform.
> MIPS: Netlogic: Cleanup files effected by firmware changes.
> MIPS: MSP71xx, Yosemite: Cleanup firmware support for PMC platforms.
> MIPS: MSP71xx, Yosemite: Cleanup files effected by firmware changes.
> MIPS: PNX83xx, PNX8550: Cleanup firmware support for PNX platforms.
> MIPS: PNX83xx, PNX8550: Cleanup files effected by firmware changes.
> MIPS: PowerTV: Cleanup firmware support for PowerTV platform.
> MIPS: PowerTV: Cleanup files effected by firmware changes.
> MIPS: RB532: Cleanup firmware support for RB532 platform.
> MIPS: RB532: Cleanup files effected by firmware changes.
> MIPS: txx9: Cleanup firmware support for txx9 platforms.
> MIPS: txx9: Cleanup files effected by firmware changes.
> MIPS: vr41xx: Cleanup firmware support for vr41xx platforms.
> MIPS: vr41xx: Cleanup files effected by firmware changes.
>
> arch/mips/alchemy/board-gpr.c | 48 ++---
> arch/mips/alchemy/board-mtx1.c | 48 ++---
> arch/mips/alchemy/board-xxs1500.c | 45 ++---
> arch/mips/alchemy/common/platform.c | 30 +--
> arch/mips/alchemy/common/prom.c | 79 ++------
> arch/mips/alchemy/devboards/db1000.c | 1 -
> arch/mips/alchemy/devboards/db1300.c | 1 -
> arch/mips/alchemy/devboards/db1550.c | 1 -
> arch/mips/alchemy/devboards/pb1100.c | 1 -
> arch/mips/alchemy/devboards/pb1500.c | 1 -
> arch/mips/alchemy/devboards/prom.c | 54 ++---
> arch/mips/ar7/memory.c | 22 +--
> arch/mips/ar7/platform.c | 63 +++---
> arch/mips/ar7/prom.c | 62 ++----
> arch/mips/ar7/setup.c | 26 +--
> arch/mips/ath79/prom.c | 33 +---
> arch/mips/cobalt/setup.c | 42 ++--
> arch/mips/emma/common/prom.c | 44 +----
> arch/mips/fw/lib/Makefile | 2 +
> arch/mips/fw/lib/cmdline.c | 86 ++++++++
> arch/mips/include/asm/fw/fw.h | 47 +++++
> arch/mips/include/asm/mach-ar7/prom.h | 25 ---
> arch/mips/include/asm/mach-au1x00/au1xxx_eth.h | 1 +
> arch/mips/include/asm/mach-au1x00/prom.h | 12 --
> arch/mips/include/asm/mach-loongson/loongson.h | 54 ++---
> arch/mips/include/asm/mips-boards/generic.h | 30 +--
> arch/mips/include/asm/mips-boards/prom.h | 47 -----
> .../mips/include/asm/pmc-sierra/msp71xx/msp_prom.h | 52 +----
> arch/mips/include/asm/txx9/generic.h | 1 -
> arch/mips/jz4740/prom.c | 50 ++---
> arch/mips/lantiq/prom.c | 32 +--
> arch/mips/lasat/prom.c | 24 +--
> arch/mips/loongson/common/Makefile | 2 +-
> arch/mips/loongson/common/cmdline.c | 48 -----
> arch/mips/loongson/common/env.c | 40 ++--
> arch/mips/loongson/common/init.c | 16 +-
> arch/mips/mti-malta/Makefile | 2 +-
> arch/mips/mti-malta/malta-cmdline.c | 59 ------
> arch/mips/mti-malta/malta-display.c | 40 ++--
> arch/mips/mti-malta/malta-init.c | 157 +++------------
> arch/mips/mti-malta/malta-memory.c | 108 ++++------
> arch/mips/mti-malta/malta-setup.c | 59 ++----
> arch/mips/mti-malta/malta-time.c | 65 ++----
> arch/mips/netlogic/xlr/setup.c | 82 ++------
> arch/mips/pmc-sierra/msp71xx/msp_prom.c | 207
+++++---------------
> arch/mips/pmc-sierra/msp71xx/msp_serial.c | 69 +++----
> arch/mips/pmc-sierra/msp71xx/msp_setup.c | 43 ++--
> arch/mips/pmc-sierra/msp71xx/msp_time.c | 75 ++-----
> arch/mips/pmc-sierra/msp71xx/msp_usb.c | 45 ++---
> arch/mips/pmc-sierra/yosemite/prom.c | 46 ++---
> arch/mips/pnx833x/common/Makefile | 2 +-
> arch/mips/pnx833x/common/prom.c | 64 ------
> arch/mips/pnx833x/common/setup.c | 39 ++--
> arch/mips/pnx833x/stb22x/board.c | 70 +++----
> arch/mips/pnx8550/common/Makefile | 2 +-
> arch/mips/pnx8550/common/prom.c | 128 ------------
> arch/mips/pnx8550/common/setup.c | 69 +++----
> arch/mips/pnx8550/jbs/init.c | 45 +----
> arch/mips/pnx8550/stb810/prom_init.c | 36 +---
> arch/mips/powertv/asic/asic_int.c | 45 ++---
> arch/mips/powertv/init.c | 81 ++------
> arch/mips/powertv/memory.c | 39 ++--
> arch/mips/powertv/powertv_setup.c | 29 +--
> arch/mips/rb532/prom.c | 69 +++----
> arch/mips/txx9/generic/setup.c | 85 ++------
> arch/mips/vr41xx/common/init.c | 41 +---
> drivers/mtd/maps/pmcmsp-flash.c | 58 ++----
> drivers/net/ethernet/amd/au1000_eth.c | 1 -
> 68 files changed, 890 insertions(+), 2240 deletions(-)
> create mode 100644 arch/mips/fw/lib/cmdline.c
> create mode 100644 arch/mips/include/asm/fw/fw.h
> delete mode 100644 arch/mips/include/asm/mach-ar7/prom.h
> delete mode 100644 arch/mips/include/asm/mach-au1x00/prom.h
> delete mode 100644 arch/mips/include/asm/mips-boards/prom.h
> delete mode 100644 arch/mips/loongson/common/cmdline.c
> delete mode 100644 arch/mips/mti-malta/malta-cmdline.c
> delete mode 100644 arch/mips/pnx833x/common/prom.c
> delete mode 100644 arch/mips/pnx8550/common/prom.c
>
> --
> 1.7.10.3
>
>
--
Florian
^ permalink raw reply [flat|nested] 57+ messages in thread* Re: [PATCH 00/35] Cleanup firmware support across multiple platforms.
2012-06-05 21:19 [PATCH 00/35] Cleanup firmware support across multiple platforms Steven J. Hill
` (35 preceding siblings ...)
2012-06-06 12:16 ` [PATCH 00/35] Cleanup firmware support across multiple platforms Florian Fainelli
@ 2012-06-07 14:46 ` Steven J. Hill
36 siblings, 0 replies; 57+ messages in thread
From: Steven J. Hill @ 2012-06-07 14:46 UTC (permalink / raw)
To: linux-mips
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello.
Are there any further comments or concerns on these patches before I submit a
second version with the changes below? Thank you.
- -Steve
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk/Qvr8ACgkQgyK5H2Ic36feogCfZkynMUs49+b6SrkYAum9izHw
+QYAn1TT55Xmtd4oiG4nXazaT8qqN0oR
=dv7K
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 57+ messages in thread