Skip to contentSkip to conversation

Cleanup firmware support across multiple platforms.

PATCH In review Steven J. Hill 5 participants 45 messages Jun 26, 2012 – Jun 28, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Cleanup firmware support across multiple platforms.

From: "Steven J. Hill" <[email protected]>

This is actually the second version of the firmware cleanup. It is two patches less than first after incorporating all the review comments and changes requested. The original patch set is now rejected.

Steven J. Hill (33):
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: 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: 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                      |   45 ++---
 arch/mips/alchemy/board-mtx1.c                     |   45 ++---
 arch/mips/alchemy/board-xxs1500.c                  |   44 ++---
 arch/mips/alchemy/common/platform.c                |   30 ++-
 arch/mips/alchemy/common/prom.c                    |   73 +------
 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                 |   53 ++---
 arch/mips/ar7/memory.c                             |   21 +-
 arch/mips/ar7/platform.c                           |   63 +++---
 arch/mips/ar7/prom.c                               |   59 ++----
 arch/mips/ar7/setup.c                              |   23 +--
 arch/mips/ath79/prom.c                             |   38 ++--
 arch/mips/cobalt/setup.c                           |   42 ++--
 arch/mips/emma/common/prom.c                       |   42 +---
 arch/mips/fw/lib/Makefile                          |    2 +
 arch/mips/fw/lib/cmdline.c                         |  101 ++++++++++
 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 |   46 +----
 arch/mips/include/asm/txx9/generic.h               |    1 -
 arch/mips/jz4740/prom.c                            |   48 +----
 arch/mips/lantiq/prom.c                            |   31 +--
 arch/mips/lasat/prom.c                             |   20 +-
 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                   |  153 +++------------
 arch/mips/mti-malta/malta-memory.c                 |  106 ++++------
 arch/mips/mti-malta/malta-setup.c                  |   58 ++----
 arch/mips/mti-malta/malta-time.c                   |   66 +++----
 arch/mips/netlogic/xlr/setup.c                     |   48 +----
 arch/mips/pmc-sierra/msp71xx/msp_prom.c            |  205 +++++---------------
 arch/mips/pmc-sierra/msp71xx/msp_serial.c          |   68 +++----
 arch/mips/pmc-sierra/msp71xx/msp_setup.c           |   43 ++--
 arch/mips/pmc-sierra/msp71xx/msp_time.c            |   67 ++-----
 arch/mips/pmc-sierra/msp71xx/msp_usb.c             |   42 +---
 arch/mips/pmc-sierra/yosemite/prom.c               |   45 +----
 arch/mips/pnx833x/common/Makefile                  |    2 +-
 arch/mips/pnx833x/common/prom.c                    |   64 ------
 arch/mips/pnx833x/common/setup.c                   |   36 ++--
 arch/mips/pnx833x/stb22x/board.c                   |   68 +++----
 arch/mips/pnx8550/common/Makefile                  |    2 +-
 arch/mips/pnx8550/common/prom.c                    |  128 ------------
 arch/mips/pnx8550/common/setup.c                   |   66 +++----
 arch/mips/pnx8550/jbs/init.c                       |   43 +---
 arch/mips/pnx8550/stb810/prom_init.c               |   34 +---
 arch/mips/powertv/asic/asic_int.c                  |   43 +---
 arch/mips/powertv/init.c                           |   81 ++------
 arch/mips/powertv/memory.c                         |   36 +---
 arch/mips/powertv/powertv_setup.c                  |   24 +--
 arch/mips/rb532/prom.c                             |   67 +++----
 arch/mips/txx9/generic/setup.c                     |   84 ++------
 arch/mips/vr41xx/common/init.c                     |   36 +---
 drivers/mtd/maps/pmcmsp-flash.c                    |   57 ++----
 drivers/net/ethernet/amd/au1000_eth.c              |    1 -
 68 files changed, 854 insertions(+), 2174 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
Signature · 1 line
1.7.10.3
#1 lore raw

PATCH 1/33 MIPS: Add environment variable processing code to firmware library.

From: "Steven J. Hill" <[email protected]>

---
 arch/mips/fw/lib/Makefile     |    2 +
 arch/mips/fw/lib/cmdline.c    |  101 +++++++++++++++++++++++++++++++++++++++++
 arch/mips/include/asm/fw/fw.h |   47 +++++++++++++++++++
 3 files changed, 150 insertions(+)
 create mode 100644 arch/mips/fw/lib/cmdline.c
 create mode 100644 arch/mips/include/asm/fw/fw.h
arch/mips/fw/lib/Makefile +2 -0
index 84befc9..5291505 100644
@@ -2,4 +2,6 @@
 # Makefile for generic prom monitor library routines under Linux.
 #
 
+lib-y			+= cmdline.o
+
 lib-$(CONFIG_64BIT)	+= call_o32.o
arch/mips/fw/lib/cmdline.c new file +101 -0

101 lines not on this page · raw message

arch/mips/include/asm/fw/fw.h new file +47 -0

47 lines not on this page · raw message

Signature · 1 line
1.7.10.3
#3 lore raw

PATCH 2/33 MIPS: Alchemy: Cleanup firmware support for Alchemy platforms.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 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
arch/mips/alchemy/board-gpr.c +8 -14
index ba32590..1139173 100644
@@ -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)
arch/mips/alchemy/board-mtx1.c +8 -14
index 295f1a9..7d1ea7a 100644
@@ -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)
arch/mips/alchemy/board-xxs1500.c +8 -13
index bd55136..0469f1c 100644
@@ -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)
arch/mips/alchemy/common/platform.c +1 -2
index 95cb911..2c5c014 100644
@@ -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)
 {
arch/mips/alchemy/common/prom.c +2 -40

54 lines not on this page · raw message

arch/mips/alchemy/devboards/db1000.c +0 -1
index 1b81dbf..53ff8a4 100644
@@ -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)
arch/mips/alchemy/devboards/db1300.c +0 -1
index c56e024..8073c86 100644
@@ -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"
 
arch/mips/alchemy/devboards/db1550.c +0 -1
index 9eb7906..7d72509 100644
@@ -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"
 
 
arch/mips/alchemy/devboards/pb1100.c +0 -1
index cff50d0..a9d8904 100644
@@ -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)
arch/mips/alchemy/devboards/pb1500.c +0 -1
index e7b807b..36e1853 100644
@@ -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)
arch/mips/alchemy/devboards/prom.c +7 -12
index 93a2210..59af1d4 100644
@@ -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)
arch/mips/include/asm/mach-au1x00/au1xxx_eth.h +1 -0
index 49dc8d9..3f22d5a 100644
@@ -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 */
arch/mips/include/asm/mach-au1x00/prom.h deleted +0 -12
deleted file mode 100644
index 4c0e09c..0000000
@@ -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
drivers/net/ethernet/amd/au1000_eth.c +0 -1
index 397596b..200ccc2 100644
@@ -67,7 +67,6 @@
 
 #include <au1000.h>
 #include <au1xxx_eth.h>
-#include <prom.h>
 
 #include "au1000_eth.h"
 
Signature · 1 line
1.7.10.3
#4 lore raw

PATCH 3/33 MIPS: Alchemy: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 arch/mips/alchemy/board-gpr.c       |   23 ++++++-----------------
 arch/mips/alchemy/board-mtx1.c      |   23 ++++++-----------------
 arch/mips/alchemy/board-xxs1500.c   |   23 +++++------------------
 arch/mips/alchemy/common/platform.c |   27 +++++++++++++--------------
 arch/mips/alchemy/common/prom.c     |   31 +++++--------------------------
 arch/mips/alchemy/devboards/prom.c  |   34 ++++++++--------------------------
 6 files changed, 43 insertions(+), 118 deletions(-)
arch/mips/alchemy/board-gpr.c +6 -17
index 1139173..51d3598 100644
@@ -1,23 +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.
+ *
  * GPR board platform device registration (Au1550)
  *
  * Copyright (C) 2010 Wolfgang Grandegger <[email protected]>
- *
- * 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
  */
-
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
@@ -65,7 +54,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 +71,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;
arch/mips/alchemy/board-mtx1.c +6 -17
index 7d1ea7a..c59d098 100644
@@ -1,23 +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.
+ *
  * MTX-1 platform devices registration (Au1500)
  *
  * Copyright (C) 2007-2009, Florian Fainelli <[email protected]>
- *
- * 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
  */
-
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
@@ -98,7 +87,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 +285,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;
 	}
arch/mips/alchemy/board-xxs1500.c +5 -18
index 0469f1c..20eafd5 100644
@@ -1,25 +1,12 @@
 /*
- * 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. <[email protected]>
+ * 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. <[email protected]>
  */
-
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
arch/mips/alchemy/common/platform.c +13 -14
index 2c5c014..c7400f8 100644
@@ -1,16 +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.
+ *
  * Platform device support for Au1x00 SoCs.
  *
  * Copyright 2004, Matt Porter <[email protected]>
  *
  * (C) Copyright Embedded Alley Solutions, Inc 2005
  * Author: Pantelis Antoniou <[email protected]>
- *
- * 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/dma-mapping.h>
 #include <linux/etherdevice.h>
 #include <linux/init.h>
@@ -103,7 +102,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 +112,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 +172,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 +191,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 +210,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 +334,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 +347,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 +356,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 +371,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");
 	}
 }
 
arch/mips/alchemy/common/prom.c +5 -26
index a67012d..6d1df07 100644
@@ -1,38 +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.
  *
- * 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. <[email protected]>
  *
- * This file was derived from Carsten Langgaard's
- * arch/mips/mips-boards/xx files.
- *
  * Carsten Langgaard, [email protected]
  * 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.
  */
-
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/string.h>
arch/mips/alchemy/devboards/prom.c +8 -26
index 59af1d4..f3229d0 100644
@@ -1,40 +1,22 @@
 /*
- * 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. <[email protected]>
- *
- *  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.
  */
-
 #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 */
Signature · 1 line
1.7.10.3
#5 lore raw

PATCH 4/33 MIPS: AR7: Cleanup firmware support for the AR7 platform.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 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
arch/mips/ar7/memory.c +1 -2
index 28abfee..3d7133d 100644
@@ -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;
 
arch/mips/ar7/platform.c +5 -5
index 1a24d31..284b86a 100644
@@ -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)
arch/mips/ar7/prom.c +9 -31
index a23adc4..9e5699a 100644
@@ -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();
 
arch/mips/ar7/setup.c +2 -2
index 9a357ff..ec318bb 100644
@@ -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());
arch/mips/include/asm/mach-ar7/prom.h deleted +0 -25
deleted file mode 100644
index 088f61f..0000000
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2006, 2007 Florian Fainelli <[email protected]>
- *
- * 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__ */
Signature · 1 line
1.7.10.3
#6 lore raw

PATCH 5/33 MIPS: AR7: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 arch/mips/ar7/memory.c   |   18 ++++------------
 arch/mips/ar7/platform.c |   53 ++++++++++++++++++----------------------------
 arch/mips/ar7/prom.c     |   19 ++++-------------
 arch/mips/ar7/setup.c    |   19 +++++------------
 4 files changed, 34 insertions(+), 75 deletions(-)
arch/mips/ar7/memory.c +4 -14
index 3d7133d..e685cab 100644
@@ -1,20 +1,10 @@
 /*
+ * 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 <[email protected]>
  * Copyright (C) 2007 Eugene Konev <[email protected]>
- *
- * 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
  */
 #include <linux/bootmem.h>
 #include <linux/init.h>
arch/mips/ar7/platform.c +21 -32

116 lines not on this page · raw message

arch/mips/ar7/prom.c +4 -15
index 9e5699a..eb91fc8 100644
@@ -1,21 +1,10 @@
 /*
+ * 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.
+ *
  * Carsten Langgaard, [email protected]
  * 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.
- *
- * Putting things on the screen/serial line using YAMONs facilities.
  */
 #include <linux/init.h>
 #include <linux/kernel.h>
arch/mips/ar7/setup.c +5 -14
index ec318bb..0257f53 100644
@@ -1,19 +1,10 @@
 /*
+ * 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.
+ *
  * Carsten Langgaard, [email protected]
  * 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.
  */
 #include <linux/init.h>
 #include <linux/ioport.h>
@@ -101,6 +92,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());
 }
Signature · 1 line
1.7.10.3
#10 lore raw

PATCH 6/33 MIPS: ath79: Cleanup firmware support for the ath79 platform.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 arch/mips/ath79/prom.c |   38 +++++++++++++++++---------------------
 1 file changed, 17 insertions(+), 21 deletions(-)
arch/mips/ath79/prom.c +17 -21
index e9cbd7c..c891f6b 100644
@@ -1,20 +1,17 @@
 /*
- *  Atheros AR71XX/AR724X/AR913X 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) 2008-2010 Gabor Juhos <[email protected]>
- *  Copyright (C) 2008 Imre Kaloz <[email protected]>
+ * Atheros AR71XX/AR724X/AR913X specific prom routines
  *
- *  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) 2008-2010 Gabor Juhos <[email protected]>
+ * Copyright (C) 2008 Imre Kaloz <[email protected]>
  */
-
-#include <linux/kernel.h>
 #include <linux/init.h>
 #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,25 +29,24 @@ static inline int is_valid_ram_addr(void *addr)
 	return 0;
 }
 
-static __init void ath79_prom_init_cmdline(int argc, char **argv)
+void __init prom_init(void)
 {
 	int i;
 
-	if (!is_valid_ram_addr(argv))
+	fw_argc = (fw_arg0 & 0x0000ffff);
+	_fw_argv = (int *)fw_arg1;
+	_fw_envp = (int *)fw_arg2;
+
+	if (!is_valid_ram_addr((void *)_fw_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));
+	for (i = 1; i < fw_argc; i++)
+		if (is_valid_ram_addr(fw_argv(i))) {
+			strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
+			strlcat(arcs_cmdline, fw_argv(i), COMMAND_LINE_SIZE);
 		}
 }
 
-void __init prom_init(void)
-{
-	ath79_prom_init_cmdline(fw_arg0, (char **)fw_arg1);
-}
-
 void __init prom_free_prom_memory(void)
 {
 	/* We do not have to prom memory to free */
Signature · 1 line
1.7.10.3
#11 lore raw

PATCH 7/33 MIPS: Cobalt: Cleanup firmware support for the Cobalt platform.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 arch/mips/cobalt/setup.c |   18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)
arch/mips/cobalt/setup.c +3 -15
index ec3b2c4..3fdd449 100644
@@ -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)
Signature · 1 line
1.7.10.3
#12 lore raw

PATCH 8/33 MIPS: Cobalt: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 arch/mips/cobalt/setup.c |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
arch/mips/cobalt/setup.c +12 -12
index 3fdd449..d7ecf18 100644
@@ -1,13 +1,12 @@
 /*
- * 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 ([email protected])
  * Copyright (C) 2001, 2002, 2003 by Liam Davies ([email protected])
- *
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
@@ -27,14 +26,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 +85,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);
 }
 
 /*
Signature · 1 line
1.7.10.3
#13 lore raw

PATCH 9/33 MIPS: Emma: Cleanup firmware support for the Emma platform.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 arch/mips/emma/common/prom.c |   19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)
arch/mips/emma/common/prom.c +2 -17
index cae4225..5228584 100644
@@ -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)
 /* [[email protected]] 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);
Signature · 1 line
1.7.10.3
#37 lore raw

PATCH 33/33 MIPS: vr41xx: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 arch/mips/vr41xx/common/init.c |   20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)
arch/mips/vr41xx/common/init.c +5 -15
index a4c1f02..6706864 100644
@@ -1,21 +1,11 @@
 /*
- *  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 <[email protected]>
+ * 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 <[email protected]>
  */
 #include <linux/init.h>
 #include <linux/ioport.h>
Signature · 1 line
1.7.10.3
#30 lore raw

PATCH 26/33 MIPS: PowerTV: Cleanup firmware support for PowerTV platform.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 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(-)
arch/mips/powertv/asic/asic_int.c +0 -1
index 99d82e1..8728c3b 100644
@@ -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>
 
arch/mips/powertv/init.c +4 -50

80 lines not on this page · raw message

arch/mips/powertv/memory.c +3 -10
index fb3d296..56f0193 100644
@@ -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);
arch/mips/powertv/powertv_setup.c +0 -2
index 3933c37..55a3fc5 100644
@@ -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>
Signature · 1 line
1.7.10.3
#26 lore raw

PATCH 22/33 MIPS: MSP71xx, Yosemite: Cleanup firmware support for PMC platforms.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 .../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(-)
arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h +0 -25
index 786d82d..b8c34ff 100644
@@ -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 */
arch/mips/pmc-sierra/msp71xx/msp_prom.c +43 -87

247 lines not on this page · raw message

arch/mips/pmc-sierra/msp71xx/msp_serial.c +4 -5
index a1c7c7d..7080bce 100644
@@ -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);
 
arch/mips/pmc-sierra/msp71xx/msp_setup.c +3 -7
index 7a834b2..6fa0d76 100644
@@ -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.
arch/mips/pmc-sierra/msp71xx/msp_time.c +8 -18
index 8b42f30..d76cbdb 100644
@@ -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);
 		}
 	}
 
arch/mips/pmc-sierra/msp71xx/msp_usb.c +6 -11
index 9a1aef8..ee4ed9b 100644
@@ -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"))
arch/mips/pmc-sierra/yosemite/prom.c +4 -28
index 6a2754c..b4ce648 100644
@@ -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();
 
drivers/mtd/maps/pmcmsp-flash.c +5 -4
index 744ca5c..c19d9e4 100644
@@ -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) {
Signature · 1 line
1.7.10.3
#22 lore raw

PATCH 18/33 MIPS: Loongson: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 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, 33 insertions(+), 37 deletions(-)
arch/mips/include/asm/mach-loongson/loongson.h +25 -26
index b19c5b4..332abd0 100644
@@ -1,11 +1,10 @@
 /*
+ * 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 <[email protected]>
- *
- * 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.
  */
 
 #ifndef __ASM_MACH_LOONGSON_LOONGSON_H
@@ -80,13 +79,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 +112,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 +129,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 +170,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 +209,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_* */
 
arch/mips/loongson/common/env.c +4 -5
index 681690a..8b6ccf8 100644
@@ -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: [email protected] or [email protected]
@@ -11,11 +15,6 @@
  *
  * Copyright (C) 2009 Lemote Inc.
  * Author: Wu Zhangjin, [email protected]
- *
- * 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 <linux/module.h>
 
arch/mips/loongson/common/init.c +4 -6
index a40ab27..ebfb1c3 100644
@@ -1,13 +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) 2009 Lemote Inc.
  * Author: Wu Zhangjin, [email protected]
- *
- * 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 <linux/bootmem.h>
 
 #include <asm/fw/fw.h>
Signature · 1 line
1.7.10.3
#31 lore raw

PATCH 27/33 MIPS: PowerTV: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files.

---
 arch/mips/powertv/asic/asic_int.c |   42 ++++++++-----------------------------
 arch/mips/powertv/init.c          |   27 ++++++++----------------
 arch/mips/powertv/memory.c        |   23 +++++++-------------
 arch/mips/powertv/powertv_setup.c |   22 ++++++-------------
 4 files changed, 31 insertions(+), 83 deletions(-)
arch/mips/powertv/asic/asic_int.c +9 -33
index 8728c3b..400ffb2 100644
@@ -1,27 +1,16 @@
 /*
- * Carsten Langgaard, [email protected]
- * 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 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.
  *
  * Routines for generic manipulation of the interrupts found on the PowerTV
- * platform.
+ * platform. The interrupt controller is located in the South Bridge a PIIX4
+ * device with two internal 82C95 interrupt controllers.
  *
- * The interrupt controller is located in the South Bridge a PIIX4 device
- * with two internal 82C95 interrupt controllers.
+ * Carsten Langgaard, [email protected]
+ * Copyright (C) 2000,2001,2004 MIPS Technologies, Inc.
+ * Copyright (C) 2001 Ralf Baechle
+ * Portions copyright (C) 2009  Cisco Systems, Inc.
  */
 #include <linux/init.h>
 #include <linux/irq.h>
@@ -68,19 +57,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.
  */
arch/mips/powertv/init.c +9 -18
index 14cdf19..0f1be8f 100644
@@ -1,24 +1,15 @@
 /*
- * Copyright (C) 1999, 2000, 2004, 2005  MIPS Technologies, Inc.
- *	All rights reserved.
- *	Authors: Carsten Langgaard <[email protected]>
- *		 Maciej W. Rozycki <[email protected]>
- * 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.
  *
  * PROM library initialisation code.
+ *
+ * Copyright (C) 1999, 2000, 2004, 2005  MIPS Technologies, Inc.
+ *     All rights reserved.
+ *     Authors: Carsten Langgaard <[email protected]>
+ *              Maciej W. Rozycki <[email protected]>
+ * Portions copyright (C) 2009 Cisco Systems, Inc.
  */
 #include <linux/init.h>
 #include <linux/string.h>
arch/mips/powertv/memory.c +7 -16
index 56f0193..7c70327 100644
@@ -1,23 +1,14 @@
 /*
- * Carsten Langgaard, [email protected]
- * 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.
+ *
+ * Carsten Langgaard, [email protected]
+ * Copyright (C) 1999,2000 MIPS Technologies, Inc.  All rights reserved.
+ * Portions copyright (C) 2009 Cisco Systems, Inc.
  */
 #include <linux/init.h>
 #include <linux/mm.h>
arch/mips/powertv/powertv_setup.c +6 -16
index 55a3fc5..ad8b9a0 100644
@@ -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.
+ *
  * Carsten Langgaard, [email protected]
  * 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 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.
  */
 #include <linux/init.h>
 #include <linux/sched.h>
@@ -197,8 +188,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 +285,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);
 	}
Signature · 1 line
1.7.10.3
#17 lore raw

PATCH 13/33 MIPS: lantiq: Cleanup firmware support for the lantiq platform.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 arch/mips/lantiq/prom.c |   22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)
arch/mips/lantiq/prom.c +2 -20
index d185e84..aa9da9e 100644
@@ -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())
Signature · 1 line
1.7.10.3
#14 lore raw

PATCH 10/33 MIPS: Emma: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files.

---
 arch/mips/emma/common/prom.c |   23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)
arch/mips/emma/common/prom.c +6 -17
index 5228584..2e62a56 100644
@@ -1,23 +1,12 @@
 /*
- *  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 file is based on the arch/mips/ddb5xxx/common/prom.c
  *
- *	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
  */
 #include <linux/init.h>
 #include <linux/mm.h>
Signature · 1 line
1.7.10.3
#36 lore raw

PATCH 32/33 MIPS: vr41xx: Cleanup firmware support for vr41xx platforms.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 arch/mips/vr41xx/common/init.c |   16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
arch/mips/vr41xx/common/init.c +2 -14
index 2391632..a4c1f02 100644
@@ -19,11 +19,9 @@
  */
 #include <linux/init.h>
 #include <linux/ioport.h>
-#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 +57,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)
Signature · 1 line
1.7.10.3
#18 lore raw

PATCH 14/33 MIPS: lantiq: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 arch/mips/lantiq/prom.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
arch/mips/lantiq/prom.c +4 -5
index aa9da9e..708f91e 100644
@@ -1,15 +1,14 @@
 /*
- *  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 <[email protected]>
  */
-
 #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>
Signature · 1 line
1.7.10.3
#33 lore raw

PATCH 29/33 MIPS: RB532: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 arch/mips/rb532/prom.c |   38 ++++++++++----------------------------
 1 file changed, 10 insertions(+), 28 deletions(-)
arch/mips/rb532/prom.c +10 -28
index 54f5399..c2c08c0 100644
@@ -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 <[email protected]>
- *  Copyright (C) 2005-2006, P.Christeas <[email protected]>
- *  Copyright (C) 2007, Gabor Juhos <[email protected]>
- *			Felix Fietkau <[email protected]>
- *			Florian Fainelli <[email protected]>
- *
- *  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 <[email protected]>
+ * Copyright (C) 2005-2006, P.Christeas <[email protected]>
+ * Copyright (C) 2007, Gabor Juhos <[email protected]>
+ *                     Felix Fietkau <[email protected]>
+ *                     Florian Fainelli <[email protected]>
  */
-
 #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;
 	}
 
Signature · 1 line
1.7.10.3
#24 lore raw

PATCH 20/33 MIPS: Malta: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 arch/mips/include/asm/mips-boards/generic.h |   21 ++----
 arch/mips/mti-malta/malta-display.c         |   39 +++++-----
 arch/mips/mti-malta/malta-init.c            |  104 +++++++--------------------
 arch/mips/mti-malta/malta-memory.c          |   32 ++++-----
 arch/mips/mti-malta/malta-setup.c           |   51 +++++--------
 arch/mips/mti-malta/malta-time.c            |   65 ++++++-----------
 6 files changed, 99 insertions(+), 213 deletions(-)
arch/mips/include/asm/mips-boards/generic.h +7 -14
index cf20a30..d99f5b6 100644
@@ -1,21 +1,14 @@
 /*
- * Carsten Langgaard, [email protected]
- * 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 <[email protected]>
+ *          Steven J. Hill <[email protected]>
  */
 #ifndef __ASM_MIPS_BOARDS_GENERIC_H
 #define __ASM_MIPS_BOARDS_GENERIC_H
arch/mips/mti-malta/malta-display.c +16 -23
index 2a0057c..04826d7 100644
@@ -1,26 +1,19 @@
 /*
- * Carsten Langgaard, [email protected]
- * 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 <[email protected]>
+ *          Steven J. Hill <[email protected]>
  */
-
 #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);
 	}
 }
 
arch/mips/mti-malta/malta-init.c +25 -79

157 lines not on this page · raw message

arch/mips/mti-malta/malta-memory.c +12 -20
index cddcd46..cfea067 100644
@@ -1,30 +1,21 @@
 /*
- * Carsten Langgaard, [email protected]
- * 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 <[email protected]>
+ *          Steven J. Hill <[email protected]>
  */
 #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 +83,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 +120,7 @@ void __init fw_meminit(void)
 		size = p->size;
 
 		add_memory_region(base, size, type);
-                p++;
+		p++;
 	}
 }
 
arch/mips/mti-malta/malta-setup.c +17 -34

96 lines not on this page · raw message

arch/mips/mti-malta/malta-time.c +22 -43

99 lines not on this page · raw message

Signature · 1 line
1.7.10.3
#28 lore raw

PATCH 24/33 MIPS: PNX83xx, PNX8550: Cleanup firmware support for PNX platforms.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 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
arch/mips/pnx833x/common/Makefile +1 -1
index 1a46dd2..abda463 100644
@@ -1 +1 @@
-obj-y := interrupts.o platform.o prom.o setup.o reset.o
+obj-y := interrupts.o platform.o setup.o reset.o
arch/mips/pnx833x/common/prom.c deleted +0 -64

64 lines not on this page · raw message

arch/mips/pnx833x/common/setup.c +4 -0
index e51fbc4..3ea4926 100644
@@ -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 */
arch/mips/pnx833x/stb22x/board.c +7 -18
index 644eb7c..cdf1a3b 100644
@@ -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);
 }
 
arch/mips/pnx8550/common/Makefile +1 -1
index f8ce695..32f5399 100644
@@ -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
arch/mips/pnx8550/common/prom.c deleted +0 -128

128 lines not on this page · raw message

arch/mips/pnx8550/common/setup.c +3 -4
index fccd6b0..b8ae54c 100644
@@ -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;
 
arch/mips/pnx8550/jbs/init.c +3 -6
index d59b4a4..e682446 100644
@@ -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);
arch/mips/pnx8550/stb810/prom_init.c +2 -11
index ca7f4ad..cb1b052 100644
@@ -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);
Signature · 1 line
1.7.10.3
#27 lore raw

PATCH 23/33 MIPS: MSP71xx, Yosemite: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 .../mips/include/asm/pmc-sierra/msp71xx/msp_prom.h |   21 +-----
 arch/mips/pmc-sierra/msp71xx/msp_prom.c            |   77 +++-----------------
 arch/mips/pmc-sierra/msp71xx/msp_serial.c          |   59 +++++----------
 arch/mips/pmc-sierra/msp71xx/msp_setup.c           |   33 +++++----
 arch/mips/pmc-sierra/msp71xx/msp_time.c            |   45 +++---------
 arch/mips/pmc-sierra/msp71xx/msp_usb.c             |   25 +------
 arch/mips/pmc-sierra/yosemite/prom.c               |   13 ++--
 drivers/mtd/maps/pmcmsp-flash.c                    |   48 ++++--------
 8 files changed, 84 insertions(+), 237 deletions(-)
arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h +4 -17
index b8c34ff..b6fae12 100644
@@ -1,25 +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.
+ *
  * MIPS boards bootprom interface for the Linux kernel.
  *
  * Copyright (C) 2000 MIPS Technologies, Inc.  All rights reserved.
  * Author: Carsten Langgaard, [email protected]
- *
- * ########################################################################
- *
- *  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.
- *
- * ########################################################################
  */
 
 #ifndef _ASM_MSP_PROM_H
arch/mips/pmc-sierra/msp71xx/msp_prom.c +11 -66

104 lines not on this page · raw message

arch/mips/pmc-sierra/msp71xx/msp_serial.c +18 -41

80 lines not on this page · raw message

arch/mips/pmc-sierra/msp71xx/msp_setup.c +17 -16
index 6fa0d76..0e03048 100644
@@ -1,15 +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.
+ *
  * The generic setup file for PMC-Sierra MSP processors
  *
  * Copyright 2005-2007 PMC-Sierra, Inc,
  * Author: Jun Sun, [email protected] or [email protected]
- *
- * 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/cacheflush.h>
 #include <asm/r4kcache.h>
 #include <asm/reboot.h>
@@ -28,9 +26,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 +74,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 +105,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 +117,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)
arch/mips/pmc-sierra/msp71xx/msp_time.c +11 -34

84 lines not on this page · raw message

arch/mips/pmc-sierra/msp71xx/msp_usb.c +4 -21
index ee4ed9b..999253e 100644
@@ -1,27 +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.
+ *
  * 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.
  */
 #if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_GADGET)
 
@@ -29,7 +13,6 @@
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
 
-#include <asm/mipsregs.h>
 #include <asm/fw/fw.h>
 
 #include <msp_regs.h>
arch/mips/pmc-sierra/yosemite/prom.c +6 -7
index b4ce648..7215bd2 100644
@@ -1,8 +1,7 @@
 /*
- * 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 ([email protected])
@@ -14,8 +13,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 +51,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 +72,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");
 }
drivers/mtd/maps/pmcmsp-flash.c +13 -35

100 lines not on this page · raw message

Signature · 1 line
1.7.10.3
#29 lore raw

PATCH 25/33 MIPS: PNX83xx, PNX8550: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 arch/mips/pnx833x/common/setup.c     |   32 ++++++------------
 arch/mips/pnx833x/stb22x/board.c     |   43 +++++++++----------------
 arch/mips/pnx8550/common/setup.c     |   59 ++++++++++++++++------------------
 arch/mips/pnx8550/jbs/init.c         |   36 ++++-----------------
 arch/mips/pnx8550/stb810/prom_init.c |   23 ++++---------
 5 files changed, 66 insertions(+), 127 deletions(-)
arch/mips/pnx833x/common/setup.c +10 -22
index 3ea4926..5b56f23 100644
@@ -1,33 +1,21 @@
 /*
- *  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 <[email protected]>
- *    Daniel Laird <[email protected]>
+ * Setup PNX833X SOC. Based on software written by
+ * Nikita Youshchenko <[email protected]> from PNX8550 code.
  *
- *  Based on software written by:
- *      Nikita Youshchenko <[email protected]>, 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 <[email protected]>
+ *          Daniel Laird <[email protected]>
  */
 #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>
 
arch/mips/pnx833x/stb22x/board.c +16 -27

64 lines not on this page · raw message

arch/mips/pnx8550/common/setup.c +27 -32

88 lines not on this page · raw message

arch/mips/pnx8550/jbs/init.c +6 -30
index e682446..15f071d 100644
@@ -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
- *  [email protected]
- *
- *  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 <[email protected]>
  */
-
 #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);
 }
arch/mips/pnx8550/stb810/prom_init.c +7 -16
index cb1b052..3beefc2 100644
@@ -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.
- *          [email protected]
+ * 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. <[email protected]>
  */
-
 #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);
 }
Signature · 1 line
1.7.10.3
#23 lore raw

PATCH 19/33 MIPS: Malta: Cleanup firmware support for the Malta platform.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 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
arch/mips/include/asm/mips-boards/generic.h +2 -7
index 6e23ceb..cf20a30 100644
@@ -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 */
arch/mips/include/asm/mips-boards/prom.h deleted +0 -47

47 lines not on this page · raw message

arch/mips/mti-malta/Makefile +1 -1
index 6079ef3..8d64bd4 100644
@@ -5,7 +5,7 @@
 # Copyright (C) 2008 Wind River Systems, Inc.
 #   written by Ralf Baechle <[email protected]>
 #
-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
arch/mips/mti-malta/malta-cmdline.c deleted +0 -59

59 lines not on this page · raw message

arch/mips/mti-malta/malta-display.c +0 -1
index 7c8828f..2a0057c 100644
@@ -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;
arch/mips/mti-malta/malta-init.c +8 -43

100 lines not on this page · raw message

arch/mips/mti-malta/malta-memory.c +23 -53

146 lines not on this page · raw message

arch/mips/mti-malta/malta-setup.c +4 -5
index 2e28f65..08cdf8f 100644
@@ -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 &
arch/mips/mti-malta/malta-time.c +0 -1
index 115f5bc..8a5d589 100644
@@ -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>
 
Signature · 1 line
1.7.10.3
#21 lore raw

PATCH 17/33 MIPS: Loongson: Cleanup firmware support for the Loongson platform.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 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
arch/mips/include/asm/mach-loongson/loongson.h +1 -2
index 1e29b9d..b19c5b4 100644
@@ -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);
arch/mips/loongson/common/Makefile +1 -1
index e526488..5267e33 100644
@@ -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
 
arch/mips/loongson/common/cmdline.c deleted +0 -48

48 lines not on this page · raw message

arch/mips/loongson/common/env.c +7 -24
index d93830a..681690a 100644
@@ -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)
arch/mips/loongson/common/init.c +4 -2
index 19d3415..a40ab27 100644
@@ -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 */
Signature · 1 line
1.7.10.3
#34 lore raw

PATCH 30/33 MIPS: txx9: Cleanup firmware support for txx9 platforms.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 arch/mips/include/asm/txx9/generic.h |    1 -
 arch/mips/txx9/generic/setup.c       |   56 ++--------------------------------
 2 files changed, 3 insertions(+), 54 deletions(-)
arch/mips/include/asm/txx9/generic.h +0 -1
index 64887d3..4127a38 100644
@@ -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);
arch/mips/txx9/generic/setup.c +3 -53

90 lines not on this page · raw message

Signature · 1 line
1.7.10.3
#20 lore raw

PATCH 16/33 MIPS: Lasat: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make changes based on running the checkpatch script.

---
 arch/mips/lasat/prom.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
arch/mips/lasat/prom.c +5 -4
index 8bd3994..a2dbb04 100644
@@ -9,12 +9,13 @@
 #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
@@ -84,11 +85,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];
 	}
Signature · 1 line
1.7.10.3
#32 lore raw

PATCH 28/33 MIPS: RB532: Cleanup firmware support for RB532 platform.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 arch/mips/rb532/prom.c |   29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)
arch/mips/rb532/prom.c +14 -15
index d7c26d0..54f5399 100644
@@ -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++) = ' ';
 
Signature · 1 line
1.7.10.3
#15 lore raw

PATCH 11/33 MIPS: jz4740: Cleanup firmware support for the JZ4740 platform.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 arch/mips/jz4740/prom.c |   25 ++-----------------------
 1 file changed, 2 insertions(+), 23 deletions(-)
arch/mips/jz4740/prom.c +2 -23
index 4a70407..c5071ab 100644
@@ -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;
 }
 
Signature · 1 line
1.7.10.3
#16 lore raw

PATCH 12/33 MIPS: jz4740: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 arch/mips/jz4740/prom.c |   23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)
arch/mips/jz4740/prom.c +8 -15
index c5071ab..076b661 100644
@@ -1,23 +1,14 @@
 /*
- *  Copyright (C) 2010, Lars-Peter Clausen <[email protected]>
- *  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 <[email protected]>
  */
-
 #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)							\
+	((void __iomem *)CKSEG1ADDR(JZ4740_UART0_BASE_ADDR +		\
+	(_reg << 2)))
 
 void prom_putchar(char c)
 {
Signature · 1 line
1.7.10.3
#35 lore raw

PATCH 31/33 MIPS: txx9: Cleanup files effected by firmware changes.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 arch/mips/txx9/generic/setup.c |   28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)
arch/mips/txx9/generic/setup.c +11 -17
index 8a053d6..8867888 100644
@@ -1,34 +1,28 @@
 /*
- * 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.
+ *
+ * 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
  */
 #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>
Signature · 1 line
1.7.10.3
#19 lore raw

PATCH 15/33 MIPS: Lasat: Cleanup firmware support for the Lasat platform.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 arch/mips/lasat/prom.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
arch/mips/lasat/prom.c +2 -9
index 20fde19..8bd3994 100644
@@ -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);
Signature · 1 line
1.7.10.3
#25 lore raw

PATCH 21/33 MIPS: Netlogic: Cleanup firmware support for the XLR platform.

In reply to Steven J. Hill

From: "Steven J. Hill" <[email protected]>

---
 arch/mips/netlogic/xlr/setup.c |   48 +++++++++-------------------------------
 1 file changed, 10 insertions(+), 38 deletions(-)
arch/mips/netlogic/xlr/setup.c +10 -38
index c9d066d..54ca3fc 100644
@@ -31,14 +31,13 @@
  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-
 #include <linux/kernel.h>
 #include <linux/serial_8250.h>
 #include <linux/pm.h>
 
 #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 +112,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 +153,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();
 
Signature · 1 line
1.7.10.3
#38 lore raw
In reply to Steven J. Hill

Hi Steven,

Quoted 5 lines · On Monday 25 June 2012 23:41:15 Steven J. Hill wrote:

From: "Steven J. Hill" <[email protected]>

This is actually the second version of the firmware cleanup. It is two patches less than first after incorporating all the review comments and changes requested. The original patch set is now rejected.

One of the comment to your initial serie was to make sure the cleanups and functionnal changes were splitted in two separate patch series.

Sergei also expressed concerned about your checkpatch changes adding MTI copyright to the concerned files. I share that concern and do not think that it is worth adding it for such minor changes, or if you do, better do it in the "Cleanup firmware" patch instead.

Quoted 73 lines

Steven J. Hill (33):
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: 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: 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                      |   45 ++---
 arch/mips/alchemy/board-mtx1.c                     |   45 ++---
 arch/mips/alchemy/board-xxs1500.c                  |   44 ++---
 arch/mips/alchemy/common/platform.c                |   30 ++-
 arch/mips/alchemy/common/prom.c                    |   73 +------
 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                 |   53 ++---
 arch/mips/ar7/memory.c                             |   21 +-
 arch/mips/ar7/platform.c                           |   63 +++---
 arch/mips/ar7/prom.c                               |   59 ++----
 arch/mips/ar7/setup.c                              |   23 +--
 arch/mips/ath79/prom.c                             |   38 ++--
 arch/mips/cobalt/setup.c                           |   42 ++--
 arch/mips/emma/common/prom.c                       |   42 +---
 arch/mips/fw/lib/Makefile                          |    2 +
 arch/mips/fw/lib/cmdline.c                         |  101 ++++++++++
 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 |   46 +----
 arch/mips/include/asm/txx9/generic.h               |    1 -
 arch/mips/jz4740/prom.c                            |   48 +----
 arch/mips/lantiq/prom.c                            |   31 +--
 arch/mips/lasat/prom.c                             |   20 +-
 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 +-
Quoted 8 lines
 arch/mips/mti-malta/malta-cmdline.c                |   59 ------
 arch/mips/mti-malta/malta-display.c                |   40 ++--
 arch/mips/mti-malta/malta-init.c                   |  153 +++------------
 arch/mips/mti-malta/malta-memory.c                 |  106 ++++------
 arch/mips/mti-malta/malta-setup.c                  |   58 ++----
 arch/mips/mti-malta/malta-time.c                   |   66 +++----
 arch/mips/netlogic/xlr/setup.c                     |   48 +----
 arch/mips/pmc-sierra/msp71xx/msp_prom.c            |  205 

+++++---------------

Quoted 38 lines
 arch/mips/pmc-sierra/msp71xx/msp_serial.c          |   68 +++----
 arch/mips/pmc-sierra/msp71xx/msp_setup.c           |   43 ++--
 arch/mips/pmc-sierra/msp71xx/msp_time.c            |   67 ++-----
 arch/mips/pmc-sierra/msp71xx/msp_usb.c             |   42 +---
 arch/mips/pmc-sierra/yosemite/prom.c               |   45 +----
 arch/mips/pnx833x/common/Makefile                  |    2 +-
 arch/mips/pnx833x/common/prom.c                    |   64 ------
 arch/mips/pnx833x/common/setup.c                   |   36 ++--
 arch/mips/pnx833x/stb22x/board.c                   |   68 +++----
 arch/mips/pnx8550/common/Makefile                  |    2 +-
 arch/mips/pnx8550/common/prom.c                    |  128 ------------
 arch/mips/pnx8550/common/setup.c                   |   66 +++----
 arch/mips/pnx8550/jbs/init.c                       |   43 +---
 arch/mips/pnx8550/stb810/prom_init.c               |   34 +---
 arch/mips/powertv/asic/asic_int.c                  |   43 +---
 arch/mips/powertv/init.c                           |   81 ++------
 arch/mips/powertv/memory.c                         |   36 +---
 arch/mips/powertv/powertv_setup.c                  |   24 +--
 arch/mips/rb532/prom.c                             |   67 +++----
 arch/mips/txx9/generic/setup.c                     |   84 ++------
 arch/mips/vr41xx/common/init.c                     |   36 +---
 drivers/mtd/maps/pmcmsp-flash.c                    |   57 ++----
 drivers/net/ethernet/amd/au1000_eth.c              |    1 -
 68 files changed, 854 insertions(+), 2174 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
Signature · 1 line
1.7.10.3
#7 lore raw

Re: [PATCH 05/33] MIPS: AR7: Cleanup files effected by firmware changes.

In reply to Steven J. Hill
Quoted 9 lines · On Monday 25 June 2012 23:41:20 Steven J. Hill wrote:

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 arch/mips/ar7/memory.c   |   18 ++++------------
 arch/mips/ar7/platform.c |   53 

++++++++++++++++++----------------------------
[snip]

arch/mips/ar7/platform.c line 2

Quoted 10 lines

*/
#include <linux/bootmem.h>
#include <linux/init.h>

arch/mips/ar7/platform.c +1 -0
index 284b86a..921e42c 100644
@@ -1,22 +1,12 @@
 /*
+ * This file is subject to the terms and conditions of the GNU General 

Public

Quoted 9 lines
arch/mips/ar7/platform.c +3 -4
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
  * Copyright (C) 2006,2007 Felix Fietkau <[email protected]>
  * Copyright (C) 2006,2007 Eugene Konev <[email protected]>
- *
- * 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

arch/mips/ar7/platform.c

Quoted 10 lines
arch/mips/ar7/platform.c +0 -10
- * (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

arch/mips/ar7/platform.c line 8

Quoted 1 line
arch/mips/ar7/platform.c +1 -0
+ * Copyright (C) 2012 MIPS Technologies, Inc.  All rights reserved.

You are adding MTI's Copyright back here, which I assume is a left-over from your first submission.
--
Florian

#39 lore raw
In reply to Steven J. Hill

Hi Steven,

Quoted 3 lines · Steven J. Hill

From: "Steven J. Hill" <[email protected]>

This is actually the second version of the firmware cleanup.

Maybe name it V2 then? Or V3, if you send another one ;-)

Quoted 3 lines

It is two
patches less than first after incorporating all the review comments and changes requested. The original patch set is now rejected.

You are changing licenses from GPLv2+ to GPLv2 for many files - "any later" gives me hits for 13 of your patches (but I didn't verify them all).

Regards
Jonas

#40 lore raw

Jonas,

Did you read the COPYING file of the kernel source tree? I'm pretty sure it states "or later" in the text. Therefore, I believe that my changes to the headers are alright.

-Steve

#41 lore raw
Quoted 4 lines · Steven

Jonas,

Did you read the COPYING file of the kernel source tree? I'm pretty sure it states "or later" in the text. Therefore, I believe that my changes to the headers are alright.

Steve,

Why subject yourself to all these questions about changing the copyright messages that the original authors put in there?

Would it be a problem for you to leave them intact?

I think you would have better luck splitting you patches like this:

1) A set that changes the code and only adds your own copyright for files where you do major work.

2) A set that removes other people's copyright text.

Applying #1 should then be a no-brainer.

#2 might be more difficult, but if you were persistent, you might eventually get it merged.

David Daney

#2 lore raw

RE: [PATCH 01/33] MIPS: Add environment variable processing code to firmware library.

In reply to Steven J. Hill

Ralf,

Would you be willing to accept this single patch? I'll drop the rest of them. I'm tired of wasting my time on this cleanup.

-Steve

#43 lore raw
In reply to Hill, Steven
Quoted 1 line · Steven

Did you read the COPYING file of the kernel source tree? I'm pretty sure it states "or later" in the text. Therefore, I believe that my changes to the headers are alright.

To quote the top-level COPYING:

Quoted 3 lines

Also note that the only valid version of the GPL as far as the kernel is concerned is _this_ particular version of the license (ie v2, not v2.2 or v3.x or whatever), unless explicitly otherwise stated.

...

Quoted 2 lines

GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

So no "or later" here.

Jonas

#44 lore raw

I've asked Ralf if he will take 01/33 which is adds the new functions to the firmware library. I'll then drop all the other patches and if people want to use the common code, they're welcome to. Thanks for all the comments.

-Steve

#42 lore raw
In reply to David Daney

At this point I have rejected all of the patches where I changed the copyright headers incorrectly. Please have a look at the remaining patches where I believe the license is GPLv2 and thus reference the COPYING file. Thank you.

-Steve

#8 lore raw

Re: [PATCH 05/33] MIPS: AR7: Cleanup files effected by firmware changes.

In reply to Florian Fainelli
Quoted 44 lines · Florian Fainelli
Quoted 9 lines · On Monday 25 June 2012 23:41:20 Steven J. Hill wrote:

From: "Steven J. Hill" <[email protected]>

Make headers consistent across the files and make changes based on running the checkpatch script.

---
 arch/mips/ar7/memory.c   |   18 ++++------------
 arch/mips/ar7/platform.c |   53

++++++++++++++++++----------------------------
[snip]

arch/mips/ar7/platform.c line 2

Quoted 10 lines

*/
#include <linux/bootmem.h>
#include <linux/init.h>

arch/mips/ar7/platform.c +1 -0
index 284b86a..921e42c 100644
@@ -1,22 +1,12 @@
 /*
+ * This file is subject to the terms and conditions of the GNU General

Public

Quoted 13 lines
arch/mips/ar7/platform.c +1 -0
+ * License.  See the file "COPYING" in the main directory of this  

archive
+ * for more details.
+ *
* Copyright (C) 2006,2007 Felix Fietkau <[email protected]>
* Copyright (C) 2006,2007 Eugene Konev <[email protected]>
- *
- * 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,

Quoted 8 lines

- * 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

Quoted 5 lines

USA

Quoted 1 line

+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.

You are adding MTI's Copyright back here, which I assume is a left-over from your first submission.

I don't even see a reason to touch said headers. Specially because with some files you are actually changing the license (in this case, GPLv2+ -> GPLv2), which is leagally wrong. In other cases your change "only" removes the GPL version number, which can cause issues if the file will be moved out.

So in files under my copyright, NAK.

Imre

#9 lore raw

RE: [PATCH 05/33] MIPS: AR7: Cleanup files effected by firmware changes.

Imre,

If you have a look in patchworks, I have already rejected all of the patches related to the copyrights and header changes. Please review the actual changes associated with the firmware cleanup in 04/33 and ACK or provide comments. Thank you.

-Steve