Skip to contentSkip to conversation

m68k bootinfo updates

PATCH In review Geert Uytterhoeven 1 participant 29 messages Oct 16, 2013 – Oct 20, 2013

Subsystems (8)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

cover m68k bootinfo updates

This patch series cleans up various definitions used in the Linux/m68k bootinfo API, and exports the public definitions in
- <asm/bootinfo.h>, for generic definitions,
- <asm/bootinfo-<mach>>, for machine-specific definitions.
Hence those are the only header files needed by bootstraps (Amiga bootstraps also need <linux/zorro.h> and <linux/zorro_id.h>).

This will add more compile-breakage to bootstraps that do not have a private copy of the bootinfo definitions. But given those bootstrap sources already rely on header files that are currently not exported, they need fixes anyway.

- [01/16] block/z2ram: Remove duplicate external declarations
- [02/16] m68k: The bootinfo is located right after the kernel
- [03/16] m68k: head.S - Correct date and spelling
- [04/16] m68k: Drop remainings and API of BOOTINFO_COMPAT_1_0
- [05/16] m68k/mac: Move struct mac_booter_data to <asm/macintosh.h>
- [06/16] m68k/mac: Remove unused hardware profile tags
- [07/16] m68k/vme: Remove unused mvme_bdid_ptr
- [08/16] m68k/UAPI: Disintegrate arch/m68k/include/asm/bootinfo.h
- [09/16] m68k/UAPI: Move generic definitions to <asm/bootinfo.h>
- [10/16] m68k/UAPI: Move Amiga model/chipset definitions to <asm/bootinfo-amiga.h>
- [11/16] m68k/UAPI: Move Apollo model definitions to <asm/bootinfo-apollo.h>
- [12/16] m68k/UAPI: Move HP300 model definitions to <asm/bootinfo-hp300.h>
- [13/16] m68k/UAPI: Move Macintosh model definitions to <asm/bootinfo-mac.h>
- [14/16] m68k/UAPI: Move VME Board ID definition to <asm/bootinfo-vme.h>
- [15/16] m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h>
- [16/16] m68k: Remove superfluous inclusions of <asm/bootinfo.h>

All comments are welcome!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author maintainer
#1 lore raw

PATCH 1/16 block/z2ram: Remove duplicate external declarations

Remove the external declarations for m68k_realnum_memory and m68k_memory, which are already provided by <asm/setup.h>, to avoid conflicts later.

---
 drivers/block/z2ram.c |    3 ---
 1 file changed, 3 deletions(-)
drivers/block/z2ram.c +0 -3
index 8b2a60cee3a0..27de5046708a 100644
@@ -43,9 +43,6 @@
 #include <linux/zorro.h>
 
 
-extern int m68k_realnum_memory;
-extern struct mem_info m68k_memory[NUM_MEMINFO];
-
 #define Z2MINOR_COMBINED      (0)
 #define Z2MINOR_Z2ONLY        (1)
 #define Z2MINOR_CHIPONLY      (2)
Signature · 1 line
1.7.9.5
author maintainer
#2 lore raw

PATCH 1/16 block/z2ram: Remove duplicate external declarations

In reply to Geert Uytterhoeven

Remove the external declarations for m68k_realnum_memory and m68k_memory, which are already provided by <asm/setup.h>, to avoid conflicts later.

---
 drivers/block/z2ram.c |    3 ---
 1 file changed, 3 deletions(-)
drivers/block/z2ram.c +0 -3
index 8b2a60cee3a0..27de5046708a 100644
@@ -43,9 +43,6 @@
 #include <linux/zorro.h>
 
 
-extern int m68k_realnum_memory;
-extern struct mem_info m68k_memory[NUM_MEMINFO];
-
 #define Z2MINOR_COMBINED      (0)
 #define Z2MINOR_Z2ONLY        (1)
 #define Z2MINOR_CHIPONLY      (2)
Signature · 1 line
1.7.9.5
author maintainer
#3 lore raw

PATCH 2/16 m68k: The bootinfo is located right after the kernel

In reply to Geert Uytterhoeven

Since the introduction of init sections (which are located after BSS), the bootinfo is no longer located right after the BSS, but after all kernel sections.

---
 arch/m68k/include/asm/bootinfo.h |    2 +-
 arch/m68k/kernel/head.S          |    2 +-
 arch/m68k/kernel/setup_mm.c      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/m68k/include/asm/bootinfo.h +1 -1
index 3c2da7bd057f..a66a7f9200f7 100644
@@ -34,7 +34,7 @@
      *  This way I hope to keep all future changes back/forewards compatible.
      *  Thus, keep your fingers crossed...
      *
-     *  This structure is copied right after the kernel bss by the bootstrap
+     *  This structure is copied right after the kernel by the bootstrap
      *  routine.
      */
 
arch/m68k/kernel/head.S +1 -1
index ac85f16534af..fb348caa734e 100644
@@ -1532,7 +1532,7 @@ L(cache_done):
 
 /*
  * Find a tag record in the bootinfo structure
- * The bootinfo structure is located right after the kernel bss
+ * The bootinfo structure is located right after the kernel
  * Returns: d0: size (-1 if not found)
  *          a0: data pointer (end-of-records if not found)
  */
arch/m68k/kernel/setup_mm.c +1 -1
index 2299080d77f2..b979a3781dcb 100644
@@ -222,7 +222,7 @@ void __init setup_arch(char **cmdline_p)
 	int i;
 #endif
 
-	/* The bootinfo is located right after the kernel bss */
+	/* The bootinfo is located right after the kernel */
 	if (!CPU_IS_COLDFIRE)
 		m68k_parse_bootinfo((const struct bi_record *)_end);
 
Signature · 1 line
1.7.9.5
author maintainer
#4 lore raw

PATCH 2/16 m68k: The bootinfo is located right after the kernel

In reply to Geert Uytterhoeven

Since the introduction of init sections (which are located after BSS), the bootinfo is no longer located right after the BSS, but after all kernel sections.

---
 arch/m68k/include/asm/bootinfo.h |    2 +-
 arch/m68k/kernel/head.S          |    2 +-
 arch/m68k/kernel/setup_mm.c      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/m68k/include/asm/bootinfo.h +1 -1
index 3c2da7bd057f..a66a7f9200f7 100644
@@ -34,7 +34,7 @@
      *  This way I hope to keep all future changes back/forewards compatible.
      *  Thus, keep your fingers crossed...
      *
-     *  This structure is copied right after the kernel bss by the bootstrap
+     *  This structure is copied right after the kernel by the bootstrap
      *  routine.
      */
 
arch/m68k/kernel/head.S +1 -1
index ac85f16534af..fb348caa734e 100644
@@ -1532,7 +1532,7 @@ L(cache_done):
 
 /*
  * Find a tag record in the bootinfo structure
- * The bootinfo structure is located right after the kernel bss
+ * The bootinfo structure is located right after the kernel
  * Returns: d0: size (-1 if not found)
  *          a0: data pointer (end-of-records if not found)
  */
arch/m68k/kernel/setup_mm.c +1 -1
index 2299080d77f2..b979a3781dcb 100644
@@ -222,7 +222,7 @@ void __init setup_arch(char **cmdline_p)
 	int i;
 #endif
 
-	/* The bootinfo is located right after the kernel bss */
+	/* The bootinfo is located right after the kernel */
 	if (!CPU_IS_COLDFIRE)
 		m68k_parse_bootinfo((const struct bi_record *)_end);
 
Signature · 1 line
1.7.9.5
author maintainer
#5 lore raw

PATCH 3/16 m68k: head.S - Correct date and spelling

In reply to Geert Uytterhoeven
---
 arch/m68k/kernel/head.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/m68k/kernel/head.S +1 -1
index fb348caa734e..8d14b0f9a36f 100644
@@ -23,7 +23,7 @@
 ** 98/04/25 Phil Blundell: added HP300 support
 ** 1998/08/30 David Kilzer: Added support for font_desc structures
 **            for linux-2.1.115
-** 9/02/11  Richard Zidlicky: added Q40 support (initial vesion 99/01/01)
+** 1999/02/11  Richard Zidlicky: added Q40 support (initial version 99/01/01)
 ** 2004/05/13 Kars de Jong: Finalised HP300 support
 **
 ** This file is subject to the terms and conditions of the GNU General Public
Signature · 1 line
1.7.9.5
author maintainer
#6 lore raw

PATCH 4/16 m68k: Drop remainings and API of BOOTINFO_COMPAT_1_0

In reply to Geert Uytterhoeven

Drop remainings and API for backwards compatibility with bootinfo interface version 1.0. This was used when booting a 2.1.x or newer kernel on Amiga, Atari, or Mac using a bootstrap for kernel 2.0.x.

Everybody upgraded his bootstrap a long time ago, so this can go.

---
 arch/m68k/include/asm/bootinfo.h |  112 --------------------------------------
 arch/m68k/mac/config.c           |    1 -
 arch/m68k/mac/misc.c             |    1 -
 3 files changed, 114 deletions(-)
arch/m68k/include/asm/bootinfo.h +0 -112
index a66a7f9200f7..b992aa726082 100644
@@ -269,116 +269,4 @@ struct bootversion {
 #define Q40_BOOTI_VERSION      MK_BI_VERSION( 2, 0 )
 #define HP300_BOOTI_VERSION    MK_BI_VERSION( 2, 0 )
 
-#ifdef BOOTINFO_COMPAT_1_0
-
-    /*
-     *  Backwards compatibility with bootinfo interface version 1.0
-     */
-
-#define COMPAT_AMIGA_BOOTI_VERSION    MK_BI_VERSION( 1, 0 )
-#define COMPAT_ATARI_BOOTI_VERSION    MK_BI_VERSION( 1, 0 )
-#define COMPAT_MAC_BOOTI_VERSION      MK_BI_VERSION( 1, 0 )
-
-#include <linux/zorro.h>
-
-#define COMPAT_NUM_AUTO    16
-
-struct compat_bi_Amiga {
-    int model;
-    int num_autocon;
-    struct ConfigDev autocon[COMPAT_NUM_AUTO];
-    unsigned long chip_size;
-    unsigned char vblank;
-    unsigned char psfreq;
-    unsigned long eclock;
-    unsigned long chipset;
-    unsigned long hw_present;
-};
-
-struct compat_bi_Atari {
-    unsigned long hw_present;
-    unsigned long mch_cookie;
-};
-
-#ifndef __ASSEMBLY__
-
-struct compat_bi_Macintosh
-{
-	unsigned long videoaddr;
-	unsigned long videorow;
-	unsigned long videodepth;
-	unsigned long dimensions;
-	unsigned long args;
-	unsigned long boottime;
-	unsigned long gmtbias;
-	unsigned long bootver;
-	unsigned long videological;
-	unsigned long sccbase;
-	unsigned long id;
-	unsigned long memsize;
-	unsigned long serialmf;
-	unsigned long serialhsk;
-	unsigned long serialgpi;
-	unsigned long printmf;
-	unsigned long printhsk;
-	unsigned long printgpi;
-	unsigned long cpuid;
-	unsigned long rombase;
-	unsigned long adbdelay;
-	unsigned long timedbra;
-};
-
-#endif
-
-struct compat_mem_info {
-    unsigned long addr;
-    unsigned long size;
-};
-
-#define COMPAT_NUM_MEMINFO  4
-
-#define COMPAT_CPUB_68020 0
-#define COMPAT_CPUB_68030 1
-#define COMPAT_CPUB_68040 2
-#define COMPAT_CPUB_68060 3
-#define COMPAT_FPUB_68881 5
-#define COMPAT_FPUB_68882 6
-#define COMPAT_FPUB_68040 7
-#define COMPAT_FPUB_68060 8
-
-#define COMPAT_CPU_68020    (1<<COMPAT_CPUB_68020)
-#define COMPAT_CPU_68030    (1<<COMPAT_CPUB_68030)
-#define COMPAT_CPU_68040    (1<<COMPAT_CPUB_68040)
-#define COMPAT_CPU_68060    (1<<COMPAT_CPUB_68060)
-#define COMPAT_CPU_MASK     (31)
-#define COMPAT_FPU_68881    (1<<COMPAT_FPUB_68881)
-#define COMPAT_FPU_68882    (1<<COMPAT_FPUB_68882)
-#define COMPAT_FPU_68040    (1<<COMPAT_FPUB_68040)
-#define COMPAT_FPU_68060    (1<<COMPAT_FPUB_68060)
-#define COMPAT_FPU_MASK     (0xfe0)
-
-#define COMPAT_CL_SIZE      (256)
-
-struct compat_bootinfo {
-    unsigned long machtype;
-    unsigned long cputype;
-    struct compat_mem_info memory[COMPAT_NUM_MEMINFO];
-    int num_memory;
-    unsigned long ramdisk_size;
-    unsigned long ramdisk_addr;
-    char command_line[COMPAT_CL_SIZE];
-    union {
-	struct compat_bi_Amiga     bi_ami;
-	struct compat_bi_Atari     bi_ata;
-	struct compat_bi_Macintosh bi_mac;
-    } bi_un;
-};
-
-#define bi_amiga	bi_un.bi_ami
-#define bi_atari	bi_un.bi_ata
-#define bi_mac		bi_un.bi_mac
-
-#endif /* BOOTINFO_COMPAT_1_0 */
-
-
 #endif /* _M68K_BOOTINFO_H */
arch/m68k/mac/config.c +0 -1
index afb95d5fb26b..677244e0371c 100644
@@ -26,7 +26,6 @@
 #include <linux/adb.h>
 #include <linux/cuda.h>
 
-#define BOOTINFO_COMPAT_1_0
 #include <asm/setup.h>
 #include <asm/bootinfo.h>
 
arch/m68k/mac/misc.c +0 -1
index 5e085554ac7f..3d02a3c3a93a 100644
@@ -25,7 +25,6 @@
 #include <asm/mac_via.h>
 #include <asm/mac_oss.h>
 
-#define BOOTINFO_COMPAT_1_0
 #include <asm/bootinfo.h>
 #include <asm/machdep.h>
 
Signature · 1 line
1.7.9.5
author maintainer
#7 lore raw

PATCH 4/16 m68k: Drop remainings and API of BOOTINFO_COMPAT_1_0

In reply to Geert Uytterhoeven

Drop remainings and API for backwards compatibility with bootinfo interface version 1.0. This was used when booting a 2.1.x or newer kernel on Amiga, Atari, or Mac using a bootstrap for kernel 2.0.x.

Everybody upgraded his bootstrap a long time ago, so this can go.

---
 arch/m68k/include/asm/bootinfo.h |  112 --------------------------------------
 arch/m68k/mac/config.c           |    1 -
 arch/m68k/mac/misc.c             |    1 -
 3 files changed, 114 deletions(-)
arch/m68k/include/asm/bootinfo.h +0 -112
index a66a7f9200f7..b992aa726082 100644
@@ -269,116 +269,4 @@ struct bootversion {
 #define Q40_BOOTI_VERSION      MK_BI_VERSION( 2, 0 )
 #define HP300_BOOTI_VERSION    MK_BI_VERSION( 2, 0 )
 
-#ifdef BOOTINFO_COMPAT_1_0
-
-    /*
-     *  Backwards compatibility with bootinfo interface version 1.0
-     */
-
-#define COMPAT_AMIGA_BOOTI_VERSION    MK_BI_VERSION( 1, 0 )
-#define COMPAT_ATARI_BOOTI_VERSION    MK_BI_VERSION( 1, 0 )
-#define COMPAT_MAC_BOOTI_VERSION      MK_BI_VERSION( 1, 0 )
-
-#include <linux/zorro.h>
-
-#define COMPAT_NUM_AUTO    16
-
-struct compat_bi_Amiga {
-    int model;
-    int num_autocon;
-    struct ConfigDev autocon[COMPAT_NUM_AUTO];
-    unsigned long chip_size;
-    unsigned char vblank;
-    unsigned char psfreq;
-    unsigned long eclock;
-    unsigned long chipset;
-    unsigned long hw_present;
-};
-
-struct compat_bi_Atari {
-    unsigned long hw_present;
-    unsigned long mch_cookie;
-};
-
-#ifndef __ASSEMBLY__
-
-struct compat_bi_Macintosh
-{
-	unsigned long videoaddr;
-	unsigned long videorow;
-	unsigned long videodepth;
-	unsigned long dimensions;
-	unsigned long args;
-	unsigned long boottime;
-	unsigned long gmtbias;
-	unsigned long bootver;
-	unsigned long videological;
-	unsigned long sccbase;
-	unsigned long id;
-	unsigned long memsize;
-	unsigned long serialmf;
-	unsigned long serialhsk;
-	unsigned long serialgpi;
-	unsigned long printmf;
-	unsigned long printhsk;
-	unsigned long printgpi;
-	unsigned long cpuid;
-	unsigned long rombase;
-	unsigned long adbdelay;
-	unsigned long timedbra;
-};
-
-#endif
-
-struct compat_mem_info {
-    unsigned long addr;
-    unsigned long size;
-};
-
-#define COMPAT_NUM_MEMINFO  4
-
-#define COMPAT_CPUB_68020 0
-#define COMPAT_CPUB_68030 1
-#define COMPAT_CPUB_68040 2
-#define COMPAT_CPUB_68060 3
-#define COMPAT_FPUB_68881 5
-#define COMPAT_FPUB_68882 6
-#define COMPAT_FPUB_68040 7
-#define COMPAT_FPUB_68060 8
-
-#define COMPAT_CPU_68020    (1<<COMPAT_CPUB_68020)
-#define COMPAT_CPU_68030    (1<<COMPAT_CPUB_68030)
-#define COMPAT_CPU_68040    (1<<COMPAT_CPUB_68040)
-#define COMPAT_CPU_68060    (1<<COMPAT_CPUB_68060)
-#define COMPAT_CPU_MASK     (31)
-#define COMPAT_FPU_68881    (1<<COMPAT_FPUB_68881)
-#define COMPAT_FPU_68882    (1<<COMPAT_FPUB_68882)
-#define COMPAT_FPU_68040    (1<<COMPAT_FPUB_68040)
-#define COMPAT_FPU_68060    (1<<COMPAT_FPUB_68060)
-#define COMPAT_FPU_MASK     (0xfe0)
-
-#define COMPAT_CL_SIZE      (256)
-
-struct compat_bootinfo {
-    unsigned long machtype;
-    unsigned long cputype;
-    struct compat_mem_info memory[COMPAT_NUM_MEMINFO];
-    int num_memory;
-    unsigned long ramdisk_size;
-    unsigned long ramdisk_addr;
-    char command_line[COMPAT_CL_SIZE];
-    union {
-	struct compat_bi_Amiga     bi_ami;
-	struct compat_bi_Atari     bi_ata;
-	struct compat_bi_Macintosh bi_mac;
-    } bi_un;
-};
-
-#define bi_amiga	bi_un.bi_ami
-#define bi_atari	bi_un.bi_ata
-#define bi_mac		bi_un.bi_mac
-
-#endif /* BOOTINFO_COMPAT_1_0 */
-
-
 #endif /* _M68K_BOOTINFO_H */
arch/m68k/mac/config.c +0 -1
index afb95d5fb26b..677244e0371c 100644
@@ -26,7 +26,6 @@
 #include <linux/adb.h>
 #include <linux/cuda.h>
 
-#define BOOTINFO_COMPAT_1_0
 #include <asm/setup.h>
 #include <asm/bootinfo.h>
 
arch/m68k/mac/misc.c +0 -1
index 5e085554ac7f..3d02a3c3a93a 100644
@@ -25,7 +25,6 @@
 #include <asm/mac_via.h>
 #include <asm/mac_oss.h>
 
-#define BOOTINFO_COMPAT_1_0
 #include <asm/bootinfo.h>
 #include <asm/machdep.h>
 
Signature · 1 line
1.7.9.5
author maintainer
#8 lore raw

PATCH 5/16 m68k/mac: Move struct mac_booter_data to <asm/macintosh.h>

In reply to Geert Uytterhoeven

struct mac_booter_data is no longer part of the bootinfo API, hence move it from <asm/bootinfo.h> to <asm/macintosh.h>, dropping all unused fields in the process.

Also remove the no longer used mac_booter_data pointer from head.S.

---
 arch/m68k/include/asm/bootinfo.h  |   39 -------------------------------------
 arch/m68k/include/asm/macintosh.h |   23 ++++++++++++++++++++++
 arch/m68k/kernel/head.S           |    2 --
 3 files changed, 23 insertions(+), 41 deletions(-)
arch/m68k/include/asm/bootinfo.h +0 -39
index b992aa726082..ef888d4af4e6 100644
@@ -173,45 +173,6 @@ static inline void save_bootinfo(const struct bi_record *bi) {}
 #define BI_MAC_IOP_SWIM		0x8020	/* Mac SWIM floppy IOP */
 #define BI_MAC_IOP_ADB		0x8021	/* Mac ADB IOP */
 
-    /*
-     * Mac: compatibility with old booter data format (temporarily)
-     * Fields unused with the new bootinfo can be deleted now; instead of
-     * adding new fields the struct might be splitted into a hardware address
-     * part and a hardware type part
-     */
-
-#ifndef __ASSEMBLY__
-
-struct mac_booter_data
-{
-	unsigned long videoaddr;
-	unsigned long videorow;
-	unsigned long videodepth;
-	unsigned long dimensions;
-	unsigned long args;
-	unsigned long boottime;
-	unsigned long gmtbias;
-	unsigned long bootver;
-	unsigned long videological;
-	unsigned long sccbase;
-	unsigned long id;
-	unsigned long memsize;
-	unsigned long serialmf;
-	unsigned long serialhsk;
-	unsigned long serialgpi;
-	unsigned long printmf;
-	unsigned long printhsk;
-	unsigned long printgpi;
-	unsigned long cpuid;
-	unsigned long rombase;
-	unsigned long adbdelay;
-	unsigned long timedbra;
-};
-
-extern struct mac_booter_data
-	mac_bi_data;
-
-#endif
 
     /*
      *  Apollo-specific tags
arch/m68k/include/asm/macintosh.h +23 -0
index 682a1a2ff55f..6a633eb64331 100644
@@ -135,4 +135,27 @@ struct mac_model
 
 extern struct mac_model *macintosh_config;
 
+
+    /*
+     * Internal representation of the Mac hardware, filled in from bootinfo
+     */
+
+struct mac_booter_data
+{
+	unsigned long videoaddr;
+	unsigned long videorow;
+	unsigned long videodepth;
+	unsigned long dimensions;
+	unsigned long boottime;
+	unsigned long gmtbias;
+	unsigned long videological;
+	unsigned long sccbase;
+	unsigned long id;
+	unsigned long memsize;
+	unsigned long cpuid;
+	unsigned long rombase;
+};
+
+extern struct mac_booter_data mac_bi_data;
+
 #endif
arch/m68k/kernel/head.S +0 -2
index 8d14b0f9a36f..28f817481f3b 100644
@@ -3896,8 +3896,6 @@ BVME_SCC_DATA_A	= 0xffb0000f
 #endif
 
 #if defined(CONFIG_MAC)
-L(mac_booter_data):
-	.long	0
 L(mac_videobase):
 	.long	0
 L(mac_videodepth):
Signature · 1 line
1.7.9.5
author maintainer
#9 lore raw

PATCH 5/16 m68k/mac: Move struct mac_booter_data to <asm/macintosh.h>

In reply to Geert Uytterhoeven

struct mac_booter_data is no longer part of the bootinfo API, hence move it from <asm/bootinfo.h> to <asm/macintosh.h>, dropping all unused fields in the process.

Also remove the no longer used mac_booter_data pointer from head.S.

---
 arch/m68k/include/asm/bootinfo.h  |   39 -------------------------------------
 arch/m68k/include/asm/macintosh.h |   23 ++++++++++++++++++++++
 arch/m68k/kernel/head.S           |    2 --
 3 files changed, 23 insertions(+), 41 deletions(-)
arch/m68k/include/asm/bootinfo.h +0 -39
index b992aa726082..ef888d4af4e6 100644
@@ -173,45 +173,6 @@ static inline void save_bootinfo(const struct bi_record *bi) {}
 #define BI_MAC_IOP_SWIM		0x8020	/* Mac SWIM floppy IOP */
 #define BI_MAC_IOP_ADB		0x8021	/* Mac ADB IOP */
 
-    /*
-     * Mac: compatibility with old booter data format (temporarily)
-     * Fields unused with the new bootinfo can be deleted now; instead of
-     * adding new fields the struct might be splitted into a hardware address
-     * part and a hardware type part
-     */
-
-#ifndef __ASSEMBLY__
-
-struct mac_booter_data
-{
-	unsigned long videoaddr;
-	unsigned long videorow;
-	unsigned long videodepth;
-	unsigned long dimensions;
-	unsigned long args;
-	unsigned long boottime;
-	unsigned long gmtbias;
-	unsigned long bootver;
-	unsigned long videological;
-	unsigned long sccbase;
-	unsigned long id;
-	unsigned long memsize;
-	unsigned long serialmf;
-	unsigned long serialhsk;
-	unsigned long serialgpi;
-	unsigned long printmf;
-	unsigned long printhsk;
-	unsigned long printgpi;
-	unsigned long cpuid;
-	unsigned long rombase;
-	unsigned long adbdelay;
-	unsigned long timedbra;
-};
-
-extern struct mac_booter_data
-	mac_bi_data;
-
-#endif
 
     /*
      *  Apollo-specific tags
arch/m68k/include/asm/macintosh.h +23 -0
index 682a1a2ff55f..6a633eb64331 100644
@@ -135,4 +135,27 @@ struct mac_model
 
 extern struct mac_model *macintosh_config;
 
+
+    /*
+     * Internal representation of the Mac hardware, filled in from bootinfo
+     */
+
+struct mac_booter_data
+{
+	unsigned long videoaddr;
+	unsigned long videorow;
+	unsigned long videodepth;
+	unsigned long dimensions;
+	unsigned long boottime;
+	unsigned long gmtbias;
+	unsigned long videological;
+	unsigned long sccbase;
+	unsigned long id;
+	unsigned long memsize;
+	unsigned long cpuid;
+	unsigned long rombase;
+};
+
+extern struct mac_booter_data mac_bi_data;
+
 #endif
arch/m68k/kernel/head.S +0 -2
index 8d14b0f9a36f..28f817481f3b 100644
@@ -3896,8 +3896,6 @@ BVME_SCC_DATA_A	= 0xffb0000f
 #endif
 
 #if defined(CONFIG_MAC)
-L(mac_booter_data):
-	.long	0
 L(mac_videobase):
 	.long	0
 L(mac_videodepth):
Signature · 1 line
1.7.9.5
author maintainer
#10 lore raw

PATCH 6/16 m68k/mac: Remove unused hardware profile tags

In reply to Geert Uytterhoeven
---
 arch/m68k/include/asm/bootinfo.h |   24 ------------------------
 1 file changed, 24 deletions(-)
arch/m68k/include/asm/bootinfo.h +0 -24
index ef888d4af4e6..007c95759e6b 100644
@@ -149,30 +149,6 @@ static inline void save_bootinfo(const struct bi_record *bi) {}
 #define BI_MAC_CPUID		0x800a	/* Mac CPU type (sanity check) */
 #define BI_MAC_ROMBASE		0x800b	/* Mac system ROM base address */
 
-    /*
-     *  Macintosh hardware profile data - unused, see macintosh.h for
-     *  reasonable type values
-     */
-
-#define BI_MAC_VIA1BASE		0x8010	/* Mac VIA1 base address (always present) */
-#define BI_MAC_VIA2BASE		0x8011	/* Mac VIA2 base address (type varies) */
-#define BI_MAC_VIA2TYPE		0x8012	/* Mac VIA2 type (VIA, RBV, OSS) */
-#define BI_MAC_ADBTYPE		0x8013	/* Mac ADB interface type */
-#define BI_MAC_ASCBASE		0x8014	/* Mac Apple Sound Chip base address */
-#define BI_MAC_SCSI5380		0x8015	/* Mac NCR 5380 SCSI (base address, multi) */
-#define BI_MAC_SCSIDMA		0x8016	/* Mac SCSI DMA (base address) */
-#define BI_MAC_SCSI5396		0x8017	/* Mac NCR 53C96 SCSI (base address, multi) */
-#define BI_MAC_IDETYPE		0x8018	/* Mac IDE interface type */
-#define BI_MAC_IDEBASE		0x8019	/* Mac IDE interface base address */
-#define BI_MAC_NUBUS		0x801a	/* Mac Nubus type (none, regular, pseudo) */
-#define BI_MAC_SLOTMASK		0x801b	/* Mac Nubus slots present */
-#define BI_MAC_SCCTYPE		0x801c	/* Mac SCC serial type (normal, IOP) */
-#define BI_MAC_ETHTYPE		0x801d	/* Mac builtin ethernet type (Sonic, MACE */
-#define BI_MAC_ETHBASE		0x801e	/* Mac builtin ethernet base address */
-#define BI_MAC_PMU		0x801f	/* Mac power management / poweroff hardware */
-#define BI_MAC_IOP_SWIM		0x8020	/* Mac SWIM floppy IOP */
-#define BI_MAC_IOP_ADB		0x8021	/* Mac ADB IOP */
-
 
     /*
      *  Apollo-specific tags
Signature · 1 line
1.7.9.5
author maintainer
#11 lore raw

PATCH 6/16 m68k/mac: Remove unused hardware profile tags

In reply to Geert Uytterhoeven
---
 arch/m68k/include/asm/bootinfo.h |   24 ------------------------
 1 file changed, 24 deletions(-)
arch/m68k/include/asm/bootinfo.h +0 -24
index ef888d4af4e6..007c95759e6b 100644
@@ -149,30 +149,6 @@ static inline void save_bootinfo(const struct bi_record *bi) {}
 #define BI_MAC_CPUID		0x800a	/* Mac CPU type (sanity check) */
 #define BI_MAC_ROMBASE		0x800b	/* Mac system ROM base address */
 
-    /*
-     *  Macintosh hardware profile data - unused, see macintosh.h for
-     *  reasonable type values
-     */
-
-#define BI_MAC_VIA1BASE		0x8010	/* Mac VIA1 base address (always present) */
-#define BI_MAC_VIA2BASE		0x8011	/* Mac VIA2 base address (type varies) */
-#define BI_MAC_VIA2TYPE		0x8012	/* Mac VIA2 type (VIA, RBV, OSS) */
-#define BI_MAC_ADBTYPE		0x8013	/* Mac ADB interface type */
-#define BI_MAC_ASCBASE		0x8014	/* Mac Apple Sound Chip base address */
-#define BI_MAC_SCSI5380		0x8015	/* Mac NCR 5380 SCSI (base address, multi) */
-#define BI_MAC_SCSIDMA		0x8016	/* Mac SCSI DMA (base address) */
-#define BI_MAC_SCSI5396		0x8017	/* Mac NCR 53C96 SCSI (base address, multi) */
-#define BI_MAC_IDETYPE		0x8018	/* Mac IDE interface type */
-#define BI_MAC_IDEBASE		0x8019	/* Mac IDE interface base address */
-#define BI_MAC_NUBUS		0x801a	/* Mac Nubus type (none, regular, pseudo) */
-#define BI_MAC_SLOTMASK		0x801b	/* Mac Nubus slots present */
-#define BI_MAC_SCCTYPE		0x801c	/* Mac SCC serial type (normal, IOP) */
-#define BI_MAC_ETHTYPE		0x801d	/* Mac builtin ethernet type (Sonic, MACE */
-#define BI_MAC_ETHBASE		0x801e	/* Mac builtin ethernet base address */
-#define BI_MAC_PMU		0x801f	/* Mac power management / poweroff hardware */
-#define BI_MAC_IOP_SWIM		0x8020	/* Mac SWIM floppy IOP */
-#define BI_MAC_IOP_ADB		0x8021	/* Mac ADB IOP */
-
 
     /*
      *  Apollo-specific tags
Signature · 1 line
1.7.9.5
author maintainer
#12 lore raw

Re: [PATCH 06/16] m68k/mac: Remove unused hardware profile tags

Quoted 1 line · Geert Uytterhoeven

I'm gonna drop this one, to avoid reusing the old values for new tags, and to allow them to be used by bootinfo tools.

Quoted 25 lines
---
 arch/m68k/include/asm/bootinfo.h |   24 ------------------------
 1 file changed, 24 deletions(-)
arch/m68k/include/asm/bootinfo.h +0 -13
index ef888d4af4e6..007c95759e6b 100644
@@ -149,30 +149,6 @@ static inline void save_bootinfo(const struct bi_record *bi) {}
 #define BI_MAC_CPUID           0x800a  /* Mac CPU type (sanity check) */
 #define BI_MAC_ROMBASE         0x800b  /* Mac system ROM base address */
 
-    /*
-     *  Macintosh hardware profile data - unused, see macintosh.h for
-     *  reasonable type values
-     */
-
-#define BI_MAC_VIA1BASE                0x8010  /* Mac VIA1 base address (always present) */
-#define BI_MAC_VIA2BASE                0x8011  /* Mac VIA2 base address (type varies) */
-#define BI_MAC_VIA2TYPE                0x8012  /* Mac VIA2 type (VIA, RBV, OSS) */
-#define BI_MAC_ADBTYPE         0x8013  /* Mac ADB interface type */
-#define BI_MAC_ASCBASE         0x8014  /* Mac Apple Sound Chip base address */
-#define BI_MAC_SCSI5380                0x8015  /* Mac NCR 5380 SCSI (base address, multi) */
-#define BI_MAC_SCSIDMA         0x8016  /* Mac SCSI DMA (base address) */
-#define BI_MAC_SCSI5396                0x8017  /* Mac NCR 53C96 SCSI (base address, multi) */

arch/m68k/include/asm/bootinfo.h static inline void save_bootinfo(const struct bi_record *bi) {} · line 174

Quoted 10 lines
arch/m68k/include/asm/bootinfo.h +0 -10
-#define BI_MAC_IDETYPE         0x8018  /* Mac IDE interface type */
-#define BI_MAC_IDEBASE         0x8019  /* Mac IDE interface base address */
-#define BI_MAC_NUBUS           0x801a  /* Mac Nubus type (none, regular, pseudo) */
-#define BI_MAC_SLOTMASK                0x801b  /* Mac Nubus slots present */
-#define BI_MAC_SCCTYPE         0x801c  /* Mac SCC serial type (normal, IOP) */
-#define BI_MAC_ETHTYPE         0x801d  /* Mac builtin ethernet type (Sonic, MACE */
-#define BI_MAC_ETHBASE         0x801e  /* Mac builtin ethernet base address */
-#define BI_MAC_PMU             0x801f  /* Mac power management / poweroff hardware */
-#define BI_MAC_IOP_SWIM                0x8020  /* Mac SWIM floppy IOP */
-#define BI_MAC_IOP_ADB         0x8021  /* Mac ADB IOP */

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author maintainer
#13 lore raw

PATCH 7/16 m68k/vme: Remove unused mvme_bdid_ptr

In reply to Geert Uytterhoeven
---
 arch/m68k/include/asm/mvme16xhw.h |    2 --
 1 file changed, 2 deletions(-)
arch/m68k/include/asm/mvme16xhw.h +0 -2
index 6117f56653d2..87fa84ad252e 100644
@@ -7,8 +7,6 @@
 
 /* Note, bytes 12 and 13 are board no in BCD (0162,0166,0167,0177,etc) */
 
-extern long mvme_bdid_ptr;
-
 typedef struct {
 	char	bdid[4];
 	u_char	rev, mth, day, yr;
Signature · 1 line
1.7.9.5
author maintainer
#14 lore raw

PATCH 7/16 m68k/vme: Remove unused mvme_bdid_ptr

In reply to Geert Uytterhoeven
---
 arch/m68k/include/asm/mvme16xhw.h |    2 --
 1 file changed, 2 deletions(-)
arch/m68k/include/asm/mvme16xhw.h +0 -2
index 6117f56653d2..87fa84ad252e 100644
@@ -7,8 +7,6 @@
 
 /* Note, bytes 12 and 13 are board no in BCD (0162,0166,0167,0177,etc) */
 
-extern long mvme_bdid_ptr;
-
 typedef struct {
 	char	bdid[4];
 	u_char	rev, mth, day, yr;
Signature · 1 line
1.7.9.5
author maintainer
#15 lore raw

PATCH 8/16 m68k/UAPI: Disintegrate arch/m68k/include/asm/bootinfo.h

In reply to Geert Uytterhoeven

Export the bootinfo definitions that are used by bootstrap loaders, and split them up in generic and platform-specific parts.

---
 arch/m68k/amiga/config.c                     |    1 +
 arch/m68k/apollo/config.c                    |    1 +
 arch/m68k/atari/config.c                     |    1 +
 arch/m68k/bvme6000/config.c                  |    1 +
 arch/m68k/hp300/config.c                     |    1 +
 arch/m68k/include/asm/atarihw.h              |    2 +-
 arch/m68k/include/asm/bootinfo.h             |  183 +-------------------------
 arch/m68k/include/uapi/asm/Kbuild            |    8 ++
 arch/m68k/include/uapi/asm/bootinfo-amiga.h  |   31 +++++
 arch/m68k/include/uapi/asm/bootinfo-apollo.h |   16 +++
 arch/m68k/include/uapi/asm/bootinfo-atari.h  |   44 +++++++
 arch/m68k/include/uapi/asm/bootinfo-hp300.h  |   25 ++++
 arch/m68k/include/uapi/asm/bootinfo-mac.h    |   34 +++++
 arch/m68k/include/uapi/asm/bootinfo-q40.h    |   16 +++
 arch/m68k/include/uapi/asm/bootinfo-vme.h    |   46 +++++++
 arch/m68k/include/uapi/asm/bootinfo.h        |   95 +++++++++++++
 arch/m68k/kernel/head.S                      |    6 +
 arch/m68k/mac/config.c                       |    1 +
 arch/m68k/mvme147/config.c                   |    1 +
 arch/m68k/mvme16x/config.c                   |    1 +
 20 files changed, 331 insertions(+), 183 deletions(-)
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-amiga.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-apollo.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-atari.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-hp300.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-mac.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-q40.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-vme.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo.h
arch/m68k/amiga/config.c +1 -0
index 65b5e937ebba..0c92c1baf9bf 100644
@@ -28,6 +28,7 @@
 #include <linux/keyboard.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-amiga.h>
 #include <asm/byteorder.h>
 #include <asm/setup.h>
 #include <asm/pgtable.h>
arch/m68k/apollo/config.c +1 -0
index 2bdde9685a29..c90c19e904bc 100644
@@ -10,6 +10,7 @@
 
 #include <asm/setup.h>
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-apollo.h>
 #include <asm/pgtable.h>
 #include <asm/apollohw.h>
 #include <asm/irq.h>
arch/m68k/atari/config.c +1 -0
index fb2d0bd9b3ad..9159195505d5 100644
@@ -37,6 +37,7 @@
 #include <linux/module.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-atari.h>
 #include <asm/setup.h>
 #include <asm/atarihw.h>
 #include <asm/atariints.h>
arch/m68k/bvme6000/config.c +1 -0
index 1b9e31e0130f..4d1b403822fa 100644
@@ -28,6 +28,7 @@
 #include <linux/bcd.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-vme.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
arch/m68k/hp300/config.c +1 -0
index b7609f791522..892d0794fc0b 100644
@@ -14,6 +14,7 @@
 #include <linux/console.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-hp300.h>
 #include <asm/machdep.h>
 #include <asm/blinken.h>
 #include <asm/io.h>                               /* readb() and writeb() */
arch/m68k/include/asm/atarihw.h +1 -1
index d887050e6da6..972c8f33f055 100644
@@ -21,7 +21,7 @@
 #define _LINUX_ATARIHW_H_
 
 #include <linux/types.h>
-#include <asm/bootinfo.h>
+#include <asm/bootinfo-atari.h>
 #include <asm/raw_io.h>
 
 extern u_long atari_mch_cookie;
arch/m68k/include/asm/bootinfo.h +1 -182

202 lines not on this page · raw message

arch/m68k/include/uapi/asm/Kbuild +8 -0
index 1fef45ada097..6a2d257bdfb2 100644
@@ -11,6 +11,14 @@ generic-y += termbits.h
 generic-y += termios.h
 
 header-y += a.out.h
+header-y += bootinfo.h
+header-y += bootinfo-amiga.h
+header-y += bootinfo-apollo.h
+header-y += bootinfo-atari.h
+header-y += bootinfo-hp300.h
+header-y += bootinfo-mac.h
+header-y += bootinfo-q40.h
+header-y += bootinfo-vme.h
 header-y += byteorder.h
 header-y += cachectl.h
 header-y += fcntl.h
arch/m68k/include/uapi/asm/bootinfo-amiga.h new file +31 -0
new file mode 100644
index 000000000000..2c32d671f232
@@ -0,0 +1,31 @@
+/*
+** asm/bootinfo-amiga.h -- Amiga-specific boot information definitions
+*/
+
+#ifndef _UAPI_ASM_M68K_BOOTINFO_AMIGA_H
+#define _UAPI_ASM_M68K_BOOTINFO_AMIGA_H
+
+
+    /*
+     *  Amiga-specific tags
+     */
+
+#define BI_AMIGA_MODEL		0x8000	/* model (u_long) */
+#define BI_AMIGA_AUTOCON	0x8001	/* AutoConfig device */
+					/* (AmigaOS struct ConfigDev) */
+#define BI_AMIGA_CHIP_SIZE	0x8002	/* size of Chip RAM (u_long) */
+#define BI_AMIGA_VBLANK		0x8003	/* VBLANK frequency (u_char) */
+#define BI_AMIGA_PSFREQ		0x8004	/* power supply frequency (u_char) */
+#define BI_AMIGA_ECLOCK		0x8005	/* EClock frequency (u_long) */
+#define BI_AMIGA_CHIPSET	0x8006	/* native chipset present (u_long) */
+#define BI_AMIGA_SERPER		0x8007	/* serial port period (u_short) */
+
+
+    /*
+     *  Latest Amiga bootinfo version
+     */
+
+#define AMIGA_BOOTI_VERSION	MK_BI_VERSION(2, 0)
+
+
+#endif /* _UAPI_ASM_M68K_BOOTINFO_AMIGA_H */
arch/m68k/include/uapi/asm/bootinfo-apollo.h new file +16 -0
new file mode 100644
index 000000000000..3a2051e822b0
@@ -0,0 +1,16 @@
+/*
+** asm/bootinfo-apollo.h -- Apollo-specific boot information definitions
+*/
+
+#ifndef _UAPI_ASM_M68K_BOOTINFO_APOLLO_H
+#define _UAPI_ASM_M68K_BOOTINFO_APOLLO_H
+
+
+    /*
+     *  Apollo-specific tags
+     */
+
+#define BI_APOLLO_MODEL		0x8000	/* model (u_long) */
+
+
+#endif /* _UAPI_ASM_M68K_BOOTINFO_APOLLO_H */
arch/m68k/include/uapi/asm/bootinfo-atari.h new file +44 -0

44 lines not on this page · raw message

arch/m68k/include/uapi/asm/bootinfo-hp300.h new file +25 -0
new file mode 100644
index 000000000000..e7ed19cdafe5
@@ -0,0 +1,25 @@
+/*
+** asm/bootinfo-hp300.h -- HP9000/300-specific boot information definitions
+*/
+
+#ifndef _UAPI_ASM_M68K_BOOTINFO_HP300_H
+#define _UAPI_ASM_M68K_BOOTINFO_HP300_H
+
+
+    /*
+     *  HP9000/300-specific tags
+     */
+
+#define BI_HP300_MODEL		0x8000	/* model (u_long) */
+#define BI_HP300_UART_SCODE	0x8001	/* UART select code (u_long) */
+#define BI_HP300_UART_ADDR	0x8002	/* phys. addr of UART (u_long) */
+
+
+    /*
+     *  Latest HP9000/300 bootinfo version
+     */
+
+#define HP300_BOOTI_VERSION	MK_BI_VERSION(2, 0)
+
+
+#endif /* _UAPI_ASM_M68K_BOOTINFO_HP300_H */
arch/m68k/include/uapi/asm/bootinfo-mac.h new file +34 -0
new file mode 100644
index 000000000000..29a4109ab089
@@ -0,0 +1,34 @@
+/*
+** asm/bootinfo-mac.h -- Macintosh-specific boot information definitions
+*/
+
+#ifndef _UAPI_ASM_M68K_BOOTINFO_MAC_H
+#define _UAPI_ASM_M68K_BOOTINFO_MAC_H
+
+
+    /*
+     *  Macintosh-specific tags (all u_long)
+     */
+
+#define BI_MAC_MODEL		0x8000	/* Mac Gestalt ID (model type) */
+#define BI_MAC_VADDR		0x8001	/* Mac video base address */
+#define BI_MAC_VDEPTH		0x8002	/* Mac video depth */
+#define BI_MAC_VROW		0x8003	/* Mac video rowbytes */
+#define BI_MAC_VDIM		0x8004	/* Mac video dimensions */
+#define BI_MAC_VLOGICAL		0x8005	/* Mac video logical base */
+#define BI_MAC_SCCBASE		0x8006	/* Mac SCC base address */
+#define BI_MAC_BTIME		0x8007	/* Mac boot time */
+#define BI_MAC_GMTBIAS		0x8008	/* Mac GMT timezone offset */
+#define BI_MAC_MEMSIZE		0x8009	/* Mac RAM size (sanity check) */
+#define BI_MAC_CPUID		0x800a	/* Mac CPU type (sanity check) */
+#define BI_MAC_ROMBASE		0x800b	/* Mac system ROM base address */
+
+
+    /*
+     *  Latest Macintosh bootinfo version
+     */
+
+#define MAC_BOOTI_VERSION	MK_BI_VERSION(2, 0)
+
+
+#endif /* _UAPI_ASM_M68K_BOOTINFO_MAC_H */
arch/m68k/include/uapi/asm/bootinfo-q40.h new file +16 -0
new file mode 100644
index 000000000000..c79fea7e555b
@@ -0,0 +1,16 @@
+/*
+** asm/bootinfo-q40.h -- Q40-specific boot information definitions
+*/
+
+#ifndef _UAPI_ASM_M68K_BOOTINFO_Q40_H
+#define _UAPI_ASM_M68K_BOOTINFO_Q40_H
+
+
+    /*
+     *  Latest Q40 bootinfo version
+     */
+
+#define Q40_BOOTI_VERSION	MK_BI_VERSION(2, 0)
+
+
+#endif /* _UAPI_ASM_M68K_BOOTINFO_Q40_H */
arch/m68k/include/uapi/asm/bootinfo-vme.h new file +46 -0

46 lines not on this page · raw message

arch/m68k/include/uapi/asm/bootinfo.h new file +95 -0

95 lines not on this page · raw message

arch/m68k/kernel/head.S +6 -0
index 28f817481f3b..7d7913f5dce3 100644
@@ -257,6 +257,12 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-amiga.h>
+#include <asm/bootinfo-atari.h>
+#include <asm/bootinfo-hp300.h>
+#include <asm/bootinfo-mac.h>
+#include <asm/bootinfo-q40.h>
+#include <asm/bootinfo-vme.h>
 #include <asm/setup.h>
 #include <asm/entry.h>
 #include <asm/pgtable.h>
arch/m68k/mac/config.c +1 -0
index 677244e0371c..e48069da04ed 100644
@@ -28,6 +28,7 @@
 
 #include <asm/setup.h>
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-mac.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
arch/m68k/mvme147/config.c +1 -0
index 5c99154c67c8..3a1d47564e52 100644
@@ -26,6 +26,7 @@
 #include <linux/interrupt.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-vme.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
arch/m68k/mvme16x/config.c +1 -0
index 60d8a1bc837d..e05994fd048c 100644
@@ -29,6 +29,7 @@
 #include <linux/module.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-vme.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
Signature · 1 line
1.7.9.5
author maintainer
#16 lore raw

PATCH 8/16 m68k/UAPI: Disintegrate arch/m68k/include/asm/bootinfo.h

In reply to Geert Uytterhoeven

Export the bootinfo definitions that are used by bootstrap loaders, and split them up in generic and platform-specific parts.

---
 arch/m68k/amiga/config.c                     |    1 +
 arch/m68k/apollo/config.c                    |    1 +
 arch/m68k/atari/config.c                     |    1 +
 arch/m68k/bvme6000/config.c                  |    1 +
 arch/m68k/hp300/config.c                     |    1 +
 arch/m68k/include/asm/atarihw.h              |    2 +-
 arch/m68k/include/asm/bootinfo.h             |  183 +-------------------------
 arch/m68k/include/uapi/asm/Kbuild            |    8 ++
 arch/m68k/include/uapi/asm/bootinfo-amiga.h  |   31 +++++
 arch/m68k/include/uapi/asm/bootinfo-apollo.h |   16 +++
 arch/m68k/include/uapi/asm/bootinfo-atari.h  |   44 +++++++
 arch/m68k/include/uapi/asm/bootinfo-hp300.h  |   25 ++++
 arch/m68k/include/uapi/asm/bootinfo-mac.h    |   34 +++++
 arch/m68k/include/uapi/asm/bootinfo-q40.h    |   16 +++
 arch/m68k/include/uapi/asm/bootinfo-vme.h    |   46 +++++++
 arch/m68k/include/uapi/asm/bootinfo.h        |   95 +++++++++++++
 arch/m68k/kernel/head.S                      |    6 +
 arch/m68k/mac/config.c                       |    1 +
 arch/m68k/mvme147/config.c                   |    1 +
 arch/m68k/mvme16x/config.c                   |    1 +
 20 files changed, 331 insertions(+), 183 deletions(-)
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-amiga.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-apollo.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-atari.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-hp300.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-mac.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-q40.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo-vme.h
 create mode 100644 arch/m68k/include/uapi/asm/bootinfo.h
arch/m68k/amiga/config.c +1 -0
index 65b5e937ebba..0c92c1baf9bf 100644
@@ -28,6 +28,7 @@
 #include <linux/keyboard.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-amiga.h>
 #include <asm/byteorder.h>
 #include <asm/setup.h>
 #include <asm/pgtable.h>
arch/m68k/apollo/config.c +1 -0
index 2bdde9685a29..c90c19e904bc 100644
@@ -10,6 +10,7 @@
 
 #include <asm/setup.h>
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-apollo.h>
 #include <asm/pgtable.h>
 #include <asm/apollohw.h>
 #include <asm/irq.h>
arch/m68k/atari/config.c +1 -0
index fb2d0bd9b3ad..9159195505d5 100644
@@ -37,6 +37,7 @@
 #include <linux/module.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-atari.h>
 #include <asm/setup.h>
 #include <asm/atarihw.h>
 #include <asm/atariints.h>
arch/m68k/bvme6000/config.c +1 -0
index 1b9e31e0130f..4d1b403822fa 100644
@@ -28,6 +28,7 @@
 #include <linux/bcd.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-vme.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
arch/m68k/hp300/config.c +1 -0
index b7609f791522..892d0794fc0b 100644
@@ -14,6 +14,7 @@
 #include <linux/console.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-hp300.h>
 #include <asm/machdep.h>
 #include <asm/blinken.h>
 #include <asm/io.h>                               /* readb() and writeb() */
arch/m68k/include/asm/atarihw.h +1 -1
index d887050e6da6..972c8f33f055 100644
@@ -21,7 +21,7 @@
 #define _LINUX_ATARIHW_H_
 
 #include <linux/types.h>
-#include <asm/bootinfo.h>
+#include <asm/bootinfo-atari.h>
 #include <asm/raw_io.h>
 
 extern u_long atari_mch_cookie;
arch/m68k/include/asm/bootinfo.h +1 -182

202 lines not on this page · raw message

arch/m68k/include/uapi/asm/Kbuild +8 -0
index 1fef45ada097..6a2d257bdfb2 100644
@@ -11,6 +11,14 @@ generic-y += termbits.h
 generic-y += termios.h
 
 header-y += a.out.h
+header-y += bootinfo.h
+header-y += bootinfo-amiga.h
+header-y += bootinfo-apollo.h
+header-y += bootinfo-atari.h
+header-y += bootinfo-hp300.h
+header-y += bootinfo-mac.h
+header-y += bootinfo-q40.h
+header-y += bootinfo-vme.h
 header-y += byteorder.h
 header-y += cachectl.h
 header-y += fcntl.h
arch/m68k/include/uapi/asm/bootinfo-amiga.h new file +31 -0
new file mode 100644
index 000000000000..2c32d671f232
@@ -0,0 +1,31 @@
+/*
+** asm/bootinfo-amiga.h -- Amiga-specific boot information definitions
+*/
+
+#ifndef _UAPI_ASM_M68K_BOOTINFO_AMIGA_H
+#define _UAPI_ASM_M68K_BOOTINFO_AMIGA_H
+
+
+    /*
+     *  Amiga-specific tags
+     */
+
+#define BI_AMIGA_MODEL		0x8000	/* model (u_long) */
+#define BI_AMIGA_AUTOCON	0x8001	/* AutoConfig device */
+					/* (AmigaOS struct ConfigDev) */
+#define BI_AMIGA_CHIP_SIZE	0x8002	/* size of Chip RAM (u_long) */
+#define BI_AMIGA_VBLANK		0x8003	/* VBLANK frequency (u_char) */
+#define BI_AMIGA_PSFREQ		0x8004	/* power supply frequency (u_char) */
+#define BI_AMIGA_ECLOCK		0x8005	/* EClock frequency (u_long) */
+#define BI_AMIGA_CHIPSET	0x8006	/* native chipset present (u_long) */
+#define BI_AMIGA_SERPER		0x8007	/* serial port period (u_short) */
+
+
+    /*
+     *  Latest Amiga bootinfo version
+     */
+
+#define AMIGA_BOOTI_VERSION	MK_BI_VERSION(2, 0)
+
+
+#endif /* _UAPI_ASM_M68K_BOOTINFO_AMIGA_H */
arch/m68k/include/uapi/asm/bootinfo-apollo.h new file +16 -0
new file mode 100644
index 000000000000..3a2051e822b0
@@ -0,0 +1,16 @@
+/*
+** asm/bootinfo-apollo.h -- Apollo-specific boot information definitions
+*/
+
+#ifndef _UAPI_ASM_M68K_BOOTINFO_APOLLO_H
+#define _UAPI_ASM_M68K_BOOTINFO_APOLLO_H
+
+
+    /*
+     *  Apollo-specific tags
+     */
+
+#define BI_APOLLO_MODEL		0x8000	/* model (u_long) */
+
+
+#endif /* _UAPI_ASM_M68K_BOOTINFO_APOLLO_H */
arch/m68k/include/uapi/asm/bootinfo-atari.h new file +44 -0

44 lines not on this page · raw message

arch/m68k/include/uapi/asm/bootinfo-hp300.h new file +25 -0
new file mode 100644
index 000000000000..e7ed19cdafe5
@@ -0,0 +1,25 @@
+/*
+** asm/bootinfo-hp300.h -- HP9000/300-specific boot information definitions
+*/
+
+#ifndef _UAPI_ASM_M68K_BOOTINFO_HP300_H
+#define _UAPI_ASM_M68K_BOOTINFO_HP300_H
+
+
+    /*
+     *  HP9000/300-specific tags
+     */
+
+#define BI_HP300_MODEL		0x8000	/* model (u_long) */
+#define BI_HP300_UART_SCODE	0x8001	/* UART select code (u_long) */
+#define BI_HP300_UART_ADDR	0x8002	/* phys. addr of UART (u_long) */
+
+
+    /*
+     *  Latest HP9000/300 bootinfo version
+     */
+
+#define HP300_BOOTI_VERSION	MK_BI_VERSION(2, 0)
+
+
+#endif /* _UAPI_ASM_M68K_BOOTINFO_HP300_H */
arch/m68k/include/uapi/asm/bootinfo-mac.h new file +34 -0
new file mode 100644
index 000000000000..29a4109ab089
@@ -0,0 +1,34 @@
+/*
+** asm/bootinfo-mac.h -- Macintosh-specific boot information definitions
+*/
+
+#ifndef _UAPI_ASM_M68K_BOOTINFO_MAC_H
+#define _UAPI_ASM_M68K_BOOTINFO_MAC_H
+
+
+    /*
+     *  Macintosh-specific tags (all u_long)
+     */
+
+#define BI_MAC_MODEL		0x8000	/* Mac Gestalt ID (model type) */
+#define BI_MAC_VADDR		0x8001	/* Mac video base address */
+#define BI_MAC_VDEPTH		0x8002	/* Mac video depth */
+#define BI_MAC_VROW		0x8003	/* Mac video rowbytes */
+#define BI_MAC_VDIM		0x8004	/* Mac video dimensions */
+#define BI_MAC_VLOGICAL		0x8005	/* Mac video logical base */
+#define BI_MAC_SCCBASE		0x8006	/* Mac SCC base address */
+#define BI_MAC_BTIME		0x8007	/* Mac boot time */
+#define BI_MAC_GMTBIAS		0x8008	/* Mac GMT timezone offset */
+#define BI_MAC_MEMSIZE		0x8009	/* Mac RAM size (sanity check) */
+#define BI_MAC_CPUID		0x800a	/* Mac CPU type (sanity check) */
+#define BI_MAC_ROMBASE		0x800b	/* Mac system ROM base address */
+
+
+    /*
+     *  Latest Macintosh bootinfo version
+     */
+
+#define MAC_BOOTI_VERSION	MK_BI_VERSION(2, 0)
+
+
+#endif /* _UAPI_ASM_M68K_BOOTINFO_MAC_H */
arch/m68k/include/uapi/asm/bootinfo-q40.h new file +16 -0
new file mode 100644
index 000000000000..c79fea7e555b
@@ -0,0 +1,16 @@
+/*
+** asm/bootinfo-q40.h -- Q40-specific boot information definitions
+*/
+
+#ifndef _UAPI_ASM_M68K_BOOTINFO_Q40_H
+#define _UAPI_ASM_M68K_BOOTINFO_Q40_H
+
+
+    /*
+     *  Latest Q40 bootinfo version
+     */
+
+#define Q40_BOOTI_VERSION	MK_BI_VERSION(2, 0)
+
+
+#endif /* _UAPI_ASM_M68K_BOOTINFO_Q40_H */
arch/m68k/include/uapi/asm/bootinfo-vme.h new file +46 -0

46 lines not on this page · raw message

arch/m68k/include/uapi/asm/bootinfo.h new file +95 -0

95 lines not on this page · raw message

arch/m68k/kernel/head.S +6 -0
index 28f817481f3b..7d7913f5dce3 100644
@@ -257,6 +257,12 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-amiga.h>
+#include <asm/bootinfo-atari.h>
+#include <asm/bootinfo-hp300.h>
+#include <asm/bootinfo-mac.h>
+#include <asm/bootinfo-q40.h>
+#include <asm/bootinfo-vme.h>
 #include <asm/setup.h>
 #include <asm/entry.h>
 #include <asm/pgtable.h>
arch/m68k/mac/config.c +1 -0
index 677244e0371c..e48069da04ed 100644
@@ -28,6 +28,7 @@
 
 #include <asm/setup.h>
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-mac.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
arch/m68k/mvme147/config.c +1 -0
index 5c99154c67c8..3a1d47564e52 100644
@@ -26,6 +26,7 @@
 #include <linux/interrupt.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-vme.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
arch/m68k/mvme16x/config.c +1 -0
index 60d8a1bc837d..e05994fd048c 100644
@@ -29,6 +29,7 @@
 #include <linux/module.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bootinfo-vme.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
Signature · 1 line
1.7.9.5
author maintainer
#17 lore raw

PATCH 9/16 m68k/UAPI: Move generic definitions to <asm/bootinfo.h>

In reply to Geert Uytterhoeven

Move generic definitions used by bootstraps to uapi/asm/bootinfo.h:
- Machine types,
- CPU, FPU, and MMU types,
- struct mem_info.

Keep a copy of struct mem_info for in-kernel use, and rename it to struct m68k_mem_info, as the exported one will be modified later.

---
 arch/m68k/include/asm/setup.h         |    5 +-
 arch/m68k/include/uapi/asm/bootinfo.h |   80 +++++++++++++++++++++++++++++-
 arch/m68k/include/uapi/asm/setup.h    |   87 ---------------------------------
 arch/m68k/kernel/setup_mm.c           |    4 +-
 arch/m68k/mm/init.c                   |    2 +-
 arch/m68k/mm/motorola.c               |    2 +-
 6 files changed, 85 insertions(+), 95 deletions(-)
arch/m68k/include/asm/setup.h +3 -2
index 65e78a2dad64..8f2023f8c1c4 100644
@@ -22,6 +22,7 @@
 #ifndef _M68K_SETUP_H
 #define _M68K_SETUP_H
 
+#include <uapi/asm/bootinfo.h>
 #include <uapi/asm/setup.h>
 
 
@@ -297,14 +298,14 @@ extern int m68k_is040or060;
 #define NUM_MEMINFO	4
 
 #ifndef __ASSEMBLY__
-struct mem_info {
+struct m68k_mem_info {
 	unsigned long addr;		/* physical address of memory chunk */
 	unsigned long size;		/* length of memory chunk (in bytes) */
 };
 
 extern int m68k_num_memory;		/* # of memory blocks found (and used) */
 extern int m68k_realnum_memory;		/* real # of memory blocks found */
-extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
+extern struct m68k_mem_info m68k_memory[NUM_MEMINFO];/* memory description */
 #endif
 
 #endif /* _M68K_SETUP_H */
arch/m68k/include/uapi/asm/bootinfo.h +78 -2

98 lines not on this page · raw message

arch/m68k/include/uapi/asm/setup.h +0 -87

98 lines not on this page · raw message

arch/m68k/kernel/setup_mm.c +2 -2
index b979a3781dcb..d3f3fe6374c6 100644
@@ -71,10 +71,10 @@ EXPORT_SYMBOL(m68k_num_memory);
 int m68k_realnum_memory;
 EXPORT_SYMBOL(m68k_realnum_memory);
 unsigned long m68k_memoffset;
-struct mem_info m68k_memory[NUM_MEMINFO];
+struct m68k_mem_info m68k_memory[NUM_MEMINFO];
 EXPORT_SYMBOL(m68k_memory);
 
-static struct mem_info m68k_ramdisk __initdata;
+static struct m68k_mem_info m68k_ramdisk __initdata;
 
 static char m68k_command_line[CL_SIZE] __initdata;
 
arch/m68k/mm/init.c +1 -1
index 6b4baa6e4d31..acaff6a49e35 100644
@@ -59,7 +59,7 @@ EXPORT_SYMBOL(pg_data_table);
 void __init m68k_setup_node(int node)
 {
 #ifndef CONFIG_SINGLE_MEMORY_CHUNK
-	struct mem_info *info = m68k_memory + node;
+	struct m68k_mem_info *info = m68k_memory + node;
 	int i, end;
 
 	i = (unsigned long)phys_to_virt(info->addr) >> __virt_to_node_shift();
arch/m68k/mm/motorola.c +1 -1
index 251c5437787b..7d4024432163 100644
@@ -233,7 +233,7 @@ void __init paging_init(void)
 			printk("Fix your bootloader or use a memfile to make use of this area!\n");
 			m68k_num_memory--;
 			memmove(m68k_memory + i, m68k_memory + i + 1,
-				(m68k_num_memory - i) * sizeof(struct mem_info));
+				(m68k_num_memory - i) * sizeof(struct m68k_mem_info));
 			continue;
 		}
 		addr = m68k_memory[i].addr + m68k_memory[i].size;
Signature · 1 line
1.7.9.5
author maintainer
#18 lore raw

PATCH 10/16 m68k/UAPI: Move Amiga model/chipset definitions to <asm/bootinfo-amiga.h>

In reply to Geert Uytterhoeven
---
 arch/m68k/include/asm/amigahw.h             |   26 +---------------------
 arch/m68k/include/uapi/asm/bootinfo-amiga.h |   32 +++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 25 deletions(-)
arch/m68k/include/asm/amigahw.h +1 -25
index 3bef0b2ad945..5ad568110f17 100644
@@ -18,26 +18,7 @@
 
 #include <linux/ioport.h>
 
-    /*
-     *  Different Amiga models
-     */
-
-#define AMI_UNKNOWN	(0)
-#define AMI_500		(1)
-#define AMI_500PLUS	(2)
-#define AMI_600		(3)
-#define AMI_1000	(4)
-#define AMI_1200	(5)
-#define AMI_2000	(6)
-#define AMI_2500	(7)
-#define AMI_3000	(8)
-#define AMI_3000T	(9)
-#define AMI_3000PLUS	(10)
-#define AMI_4000	(11)
-#define AMI_4000T	(12)
-#define AMI_CDTV	(13)
-#define AMI_CD32	(14)
-#define AMI_DRACO	(15)
+#include <asm/bootinfo-amiga.h>
 
 
     /*
@@ -46,11 +27,6 @@
 
 extern unsigned long amiga_chipset;
 
-#define CS_STONEAGE	(0)
-#define CS_OCS		(1)
-#define CS_ECS		(2)
-#define CS_AGA		(3)
-
 
     /*
      *  Miscellaneous
arch/m68k/include/uapi/asm/bootinfo-amiga.h +32 -0
index 2c32d671f232..28b6da07874a 100644
@@ -22,6 +22,38 @@
 
 
     /*
+     *  Amiga models (BI_AMIGA_MODEL)
+     */
+
+#define AMI_UNKNOWN		0
+#define AMI_500			1
+#define AMI_500PLUS		2
+#define AMI_600			3
+#define AMI_1000		4
+#define AMI_1200		5
+#define AMI_2000		6
+#define AMI_2500		7
+#define AMI_3000		8
+#define AMI_3000T		9
+#define AMI_3000PLUS		10
+#define AMI_4000		11
+#define AMI_4000T		12
+#define AMI_CDTV		13
+#define AMI_CD32		14
+#define AMI_DRACO		15
+
+
+    /*
+     *  Amiga chipsets (BI_AMIGA_CHIPSET)
+     */
+
+#define CS_STONEAGE		0
+#define CS_OCS			1
+#define CS_ECS			2
+#define CS_AGA			3
+
+
+    /*
      *  Latest Amiga bootinfo version
      */
 
Signature · 1 line
1.7.9.5
author maintainer
#19 lore raw

PATCH 11/16 m68k/UAPI: Move Apollo model definitions to <asm/bootinfo-apollo.h>

In reply to Geert Uytterhoeven
---
 arch/m68k/include/asm/apollohw.h             |   11 ++---------
 arch/m68k/include/uapi/asm/bootinfo-apollo.h |   12 ++++++++++++
 2 files changed, 14 insertions(+), 9 deletions(-)
arch/m68k/include/asm/apollohw.h +2 -9
index 6c19e0c22411..87fc899d32ee 100644
@@ -5,18 +5,11 @@
 
 #include <linux/types.h>
 
-/*
-   apollo models
-*/
+#include <asm/bootinfo-apollo.h>
+
 
 extern u_long apollo_model;
 
-#define APOLLO_UNKNOWN (0)
-#define APOLLO_DN3000 (1)
-#define APOLLO_DN3010 (2)
-#define APOLLO_DN3500 (3)
-#define APOLLO_DN4000 (4)
-#define APOLLO_DN4500 (5)
 
 /*
    see scn2681 data sheet for more info.
arch/m68k/include/uapi/asm/bootinfo-apollo.h +12 -0
index 3a2051e822b0..69923697e131 100644
@@ -13,4 +13,16 @@
 #define BI_APOLLO_MODEL		0x8000	/* model (u_long) */
 
 
+    /*
+     *  Apollo models (BI_APOLLO_MODEL)
+     */
+
+#define APOLLO_UNKNOWN		0
+#define APOLLO_DN3000		1
+#define APOLLO_DN3010		2
+#define APOLLO_DN3500		3
+#define APOLLO_DN4000		4
+#define APOLLO_DN4500		5
+
+
 #endif /* _UAPI_ASM_M68K_BOOTINFO_APOLLO_H */
Signature · 1 line
1.7.9.5
author maintainer
#20 lore raw

PATCH 11/16 m68k/UAPI: Move Apollo model definitions to <asm/bootinfo-apollo.h>

In reply to Geert Uytterhoeven
---
 arch/m68k/include/asm/apollohw.h             |   11 ++---------
 arch/m68k/include/uapi/asm/bootinfo-apollo.h |   12 ++++++++++++
 2 files changed, 14 insertions(+), 9 deletions(-)
arch/m68k/include/asm/apollohw.h +2 -9
index 6c19e0c22411..87fc899d32ee 100644
@@ -5,18 +5,11 @@
 
 #include <linux/types.h>
 
-/*
-   apollo models
-*/
+#include <asm/bootinfo-apollo.h>
+
 
 extern u_long apollo_model;
 
-#define APOLLO_UNKNOWN (0)
-#define APOLLO_DN3000 (1)
-#define APOLLO_DN3010 (2)
-#define APOLLO_DN3500 (3)
-#define APOLLO_DN4000 (4)
-#define APOLLO_DN4500 (5)
 
 /*
    see scn2681 data sheet for more info.
arch/m68k/include/uapi/asm/bootinfo-apollo.h +12 -0
index 3a2051e822b0..69923697e131 100644
@@ -13,4 +13,16 @@
 #define BI_APOLLO_MODEL		0x8000	/* model (u_long) */
 
 
+    /*
+     *  Apollo models (BI_APOLLO_MODEL)
+     */
+
+#define APOLLO_UNKNOWN		0
+#define APOLLO_DN3000		1
+#define APOLLO_DN3010		2
+#define APOLLO_DN3500		3
+#define APOLLO_DN4000		4
+#define APOLLO_DN4500		5
+
+
 #endif /* _UAPI_ASM_M68K_BOOTINFO_APOLLO_H */
Signature · 1 line
1.7.9.5
author maintainer
#21 lore raw

PATCH 12/16 m68k/UAPI: Move HP300 model definitions to <asm/bootinfo-hp300.h>

In reply to Geert Uytterhoeven
---
 arch/m68k/include/asm/hp300hw.h             |   20 ++------------------
 arch/m68k/include/uapi/asm/bootinfo-hp300.h |   25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 18 deletions(-)
arch/m68k/include/asm/hp300hw.h +2 -18
index d998ea67c19c..64f5271dd7be 100644
@@ -1,25 +1,9 @@
 #ifndef _M68K_HP300HW_H
 #define _M68K_HP300HW_H
 
-extern unsigned long hp300_model;
+#include <asm/bootinfo-hp300.h>
 
-/* This information was taken from NetBSD */
-#define	HP_320		(0)	/* 16MHz 68020+HP MMU+16K external cache */
-#define	HP_330		(1)	/* 16MHz 68020+68851 MMU */
-#define	HP_340		(2)	/* 16MHz 68030 */
-#define	HP_345		(3)	/* 50MHz 68030+32K external cache */
-#define	HP_350		(4)	/* 25MHz 68020+HP MMU+32K external cache */
-#define	HP_360		(5)	/* 25MHz 68030 */
-#define	HP_370		(6)	/* 33MHz 68030+64K external cache */
-#define	HP_375		(7)	/* 50MHz 68030+32K external cache */
-#define	HP_380		(8)	/* 25MHz 68040 */
-#define	HP_385		(9)	/* 33MHz 68040 */
 
-#define	HP_400		(10)	/* 50MHz 68030+32K external cache */
-#define	HP_425T		(11)	/* 25MHz 68040 - model 425t */
-#define	HP_425S		(12)	/* 25MHz 68040 - model 425s */
-#define HP_425E		(13)	/* 25MHz 68040 - model 425e */
-#define HP_433T		(14)	/* 33MHz 68040 - model 433t */
-#define HP_433S		(15)	/* 33MHz 68040 - model 433s */
+extern unsigned long hp300_model;
 
 #endif /* _M68K_HP300HW_H */
arch/m68k/include/uapi/asm/bootinfo-hp300.h +25 -0
index e7ed19cdafe5..08530e12d4c3 100644
@@ -16,6 +16,31 @@
 
 
     /*
+     *  HP9000/300 and /400 models (BI_HP300_MODEL)
+     *
+     * This information was taken from NetBSD
+     */
+
+#define HP_320		0	/* 16MHz 68020+HP MMU+16K external cache */
+#define HP_330		1	/* 16MHz 68020+68851 MMU */
+#define HP_340		2	/* 16MHz 68030 */
+#define HP_345		3	/* 50MHz 68030+32K external cache */
+#define HP_350		4	/* 25MHz 68020+HP MMU+32K external cache */
+#define HP_360		5	/* 25MHz 68030 */
+#define HP_370		6	/* 33MHz 68030+64K external cache */
+#define HP_375		7	/* 50MHz 68030+32K external cache */
+#define HP_380		8	/* 25MHz 68040 */
+#define HP_385		9	/* 33MHz 68040 */
+
+#define HP_400		10	/* 50MHz 68030+32K external cache */
+#define HP_425T		11	/* 25MHz 68040 - model 425t */
+#define HP_425S		12	/* 25MHz 68040 - model 425s */
+#define HP_425E		13	/* 25MHz 68040 - model 425e */
+#define HP_433T		14	/* 33MHz 68040 - model 433t */
+#define HP_433S		15	/* 33MHz 68040 - model 433s */
+
+
+    /*
      *  Latest HP9000/300 bootinfo version
      */
 
Signature · 1 line
1.7.9.5
author maintainer
#22 lore raw

PATCH 12/16 m68k/UAPI: Move HP300 model definitions to <asm/bootinfo-hp300.h>

In reply to Geert Uytterhoeven
---
 arch/m68k/include/asm/hp300hw.h             |   20 ++------------------
 arch/m68k/include/uapi/asm/bootinfo-hp300.h |   25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 18 deletions(-)
arch/m68k/include/asm/hp300hw.h +2 -18
index d998ea67c19c..64f5271dd7be 100644
@@ -1,25 +1,9 @@
 #ifndef _M68K_HP300HW_H
 #define _M68K_HP300HW_H
 
-extern unsigned long hp300_model;
+#include <asm/bootinfo-hp300.h>
 
-/* This information was taken from NetBSD */
-#define	HP_320		(0)	/* 16MHz 68020+HP MMU+16K external cache */
-#define	HP_330		(1)	/* 16MHz 68020+68851 MMU */
-#define	HP_340		(2)	/* 16MHz 68030 */
-#define	HP_345		(3)	/* 50MHz 68030+32K external cache */
-#define	HP_350		(4)	/* 25MHz 68020+HP MMU+32K external cache */
-#define	HP_360		(5)	/* 25MHz 68030 */
-#define	HP_370		(6)	/* 33MHz 68030+64K external cache */
-#define	HP_375		(7)	/* 50MHz 68030+32K external cache */
-#define	HP_380		(8)	/* 25MHz 68040 */
-#define	HP_385		(9)	/* 33MHz 68040 */
 
-#define	HP_400		(10)	/* 50MHz 68030+32K external cache */
-#define	HP_425T		(11)	/* 25MHz 68040 - model 425t */
-#define	HP_425S		(12)	/* 25MHz 68040 - model 425s */
-#define HP_425E		(13)	/* 25MHz 68040 - model 425e */
-#define HP_433T		(14)	/* 33MHz 68040 - model 433t */
-#define HP_433S		(15)	/* 33MHz 68040 - model 433s */
+extern unsigned long hp300_model;
 
 #endif /* _M68K_HP300HW_H */
arch/m68k/include/uapi/asm/bootinfo-hp300.h +25 -0
index e7ed19cdafe5..08530e12d4c3 100644
@@ -16,6 +16,31 @@
 
 
     /*
+     *  HP9000/300 and /400 models (BI_HP300_MODEL)
+     *
+     * This information was taken from NetBSD
+     */
+
+#define HP_320		0	/* 16MHz 68020+HP MMU+16K external cache */
+#define HP_330		1	/* 16MHz 68020+68851 MMU */
+#define HP_340		2	/* 16MHz 68030 */
+#define HP_345		3	/* 50MHz 68030+32K external cache */
+#define HP_350		4	/* 25MHz 68020+HP MMU+32K external cache */
+#define HP_360		5	/* 25MHz 68030 */
+#define HP_370		6	/* 33MHz 68030+64K external cache */
+#define HP_375		7	/* 50MHz 68030+32K external cache */
+#define HP_380		8	/* 25MHz 68040 */
+#define HP_385		9	/* 33MHz 68040 */
+
+#define HP_400		10	/* 50MHz 68030+32K external cache */
+#define HP_425T		11	/* 25MHz 68040 - model 425t */
+#define HP_425S		12	/* 25MHz 68040 - model 425s */
+#define HP_425E		13	/* 25MHz 68040 - model 425e */
+#define HP_433T		14	/* 33MHz 68040 - model 433t */
+#define HP_433S		15	/* 33MHz 68040 - model 433s */
+
+
+    /*
      *  Latest HP9000/300 bootinfo version
      */
 
Signature · 1 line
1.7.9.5
author maintainer
#23 lore raw

PATCH 13/16 m68k/UAPI: Move Macintosh model definitions to <asm/bootinfo-mac.h>

In reply to Geert Uytterhoeven
---
 arch/m68k/include/asm/macintosh.h         |   62 ++---------------------------
 arch/m68k/include/uapi/asm/bootinfo-mac.h |   60 ++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 59 deletions(-)
arch/m68k/include/asm/macintosh.h +3 -59
index 6a633eb64331..d323b2c2d07d 100644
@@ -4,6 +4,9 @@
 #include <linux/seq_file.h>
 #include <linux/interrupt.h>
 
+#include <asm/bootinfo-mac.h>
+
+
 /*
  *	Apple Macintoshisms
  */
@@ -74,65 +77,6 @@ struct mac_model
 #define MAC_FLOPPY_SWIM_IOP	3
 #define MAC_FLOPPY_AV		4
 
-/*
- *	Gestalt numbers
- */
-
-#define MAC_MODEL_II		6
-#define MAC_MODEL_IIX		7
-#define MAC_MODEL_IICX		8
-#define MAC_MODEL_SE30		9
-#define MAC_MODEL_IICI		11
-#define MAC_MODEL_IIFX		13	/* And well numbered it is too */
-#define MAC_MODEL_IISI		18
-#define MAC_MODEL_LC		19
-#define MAC_MODEL_Q900		20
-#define MAC_MODEL_PB170		21
-#define MAC_MODEL_Q700		22
-#define MAC_MODEL_CLII		23	/* aka: P200 */
-#define MAC_MODEL_PB140		25
-#define MAC_MODEL_Q950		26	/* aka: WGS95 */
-#define MAC_MODEL_LCIII		27	/* aka: P450 */
-#define MAC_MODEL_PB210		29
-#define MAC_MODEL_C650		30
-#define MAC_MODEL_PB230		32
-#define MAC_MODEL_PB180		33
-#define MAC_MODEL_PB160		34
-#define MAC_MODEL_Q800		35	/* aka: WGS80 */
-#define MAC_MODEL_Q650		36
-#define MAC_MODEL_LCII		37	/* aka: P400/405/410/430 */
-#define MAC_MODEL_PB250		38
-#define MAC_MODEL_IIVI		44
-#define MAC_MODEL_P600		45	/* aka: P600CD */
-#define MAC_MODEL_IIVX		48
-#define MAC_MODEL_CCL		49	/* aka: P250 */
-#define MAC_MODEL_PB165C	50
-#define MAC_MODEL_C610		52	/* aka: WGS60 */
-#define MAC_MODEL_Q610		53
-#define MAC_MODEL_PB145		54	/* aka: PB145B */
-#define MAC_MODEL_P520		56	/* aka: LC520 */
-#define MAC_MODEL_C660		60
-#define MAC_MODEL_P460		62	/* aka: LCIII+, P466/P467 */
-#define MAC_MODEL_PB180C	71
-#define MAC_MODEL_PB520		72	/* aka: PB520C, PB540, PB540C, PB550C */
-#define MAC_MODEL_PB270C	77
-#define MAC_MODEL_Q840		78
-#define MAC_MODEL_P550		80	/* aka: LC550, P560 */
-#define MAC_MODEL_CCLII		83	/* aka: P275 */
-#define MAC_MODEL_PB165		84
-#define MAC_MODEL_PB190		85	/* aka: PB190CS */
-#define MAC_MODEL_TV		88
-#define MAC_MODEL_P475		89	/* aka: LC475, P476 */
-#define MAC_MODEL_P475F		90	/* aka: P475 w/ FPU (no LC040) */
-#define MAC_MODEL_P575		92	/* aka: LC575, P577/P578 */
-#define MAC_MODEL_Q605		94
-#define MAC_MODEL_Q605_ACC	95	/* Q605 accelerated to 33 MHz */
-#define MAC_MODEL_Q630		98	/* aka: LC630, P630/631/635/636/637/638/640 */
-#define MAC_MODEL_P588		99	/* aka: LC580, P580 */
-#define MAC_MODEL_PB280		102
-#define MAC_MODEL_PB280C	103
-#define MAC_MODEL_PB150		115
-
 extern struct mac_model *macintosh_config;
 
 
arch/m68k/include/uapi/asm/bootinfo-mac.h +60 -0

66 lines not on this page · raw message

Signature · 1 line
1.7.9.5
author maintainer
#24 lore raw

PATCH 14/16 m68k/UAPI: Move VME Board ID definition to <asm/bootinfo-vme.h>

In reply to Geert Uytterhoeven
---
 arch/m68k/include/asm/mvme16xhw.h         |   15 ---------------
 arch/m68k/include/uapi/asm/bootinfo-vme.h |   25 +++++++++++++++++++++++--
 2 files changed, 23 insertions(+), 17 deletions(-)
arch/m68k/include/asm/mvme16xhw.h +0 -15
index 87fa84ad252e..1eb89de631e5 100644
@@ -3,21 +3,6 @@
 
 #include <asm/irq.h>
 
-/* Board ID data structure - pointer to this retrieved from Bug by head.S */
-
-/* Note, bytes 12 and 13 are board no in BCD (0162,0166,0167,0177,etc) */
-
-typedef struct {
-	char	bdid[4];
-	u_char	rev, mth, day, yr;
-	u_short	size, reserved;
-	u_short	brdno;
-	char brdsuffix[2];
-	u_long	options;
-	u_short	clun, dlun, ctype, dnum;
-	u_long	option2;
-} t_bdid, *p_bdid;
-
 
 typedef struct {
 	u_char	ack_icr,
arch/m68k/include/uapi/asm/bootinfo-vme.h +23 -2
index 4643a55ed768..13ba5e19fe24 100644
@@ -28,11 +28,32 @@
 #define VME_TYPE_BVME4000	0x4000	/* BVM Ltd. BVME4000 */
 #define VME_TYPE_BVME6000	0x6000	/* BVM Ltd. BVME6000 */
 
-/* BI_VME_BRDINFO is a 32 byte struct as returned by the Bug code on
+
+#ifndef __ASSEMBLY__
+
+/*
+ * Board ID data structure - pointer to this retrieved from Bug by head.S
+ *
+ * BI_VME_BRDINFO is a 32 byte struct as returned by the Bug code on
  * Motorola VME boards.  Contains board number, Bug version, board
- * configuration options, etc.  See include/asm/mvme16xhw.h for details.
+ * configuration options, etc.
+ *
+ * Note, bytes 12 and 13 are board no in BCD (0162,0166,0167,0177,etc)
  */
 
+typedef struct {
+	char	bdid[4];
+	u_char	rev, mth, day, yr;
+	u_short	size, reserved;
+	u_short	brdno;
+	char	brdsuffix[2];
+	u_long	options;
+	u_short	clun, dlun, ctype, dnum;
+	u_long	option2;
+} t_bdid, *p_bdid;
+
+#endif /* __ASSEMBLY__ */
+
 
     /*
      *  Latest VME bootinfo versions
Signature · 1 line
1.7.9.5
author maintainer
#25 lore raw

PATCH 15/16 m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h>

In reply to Geert Uytterhoeven
---
 arch/m68k/amiga/config.c                     |   18 +++++++--------
 arch/m68k/apollo/config.c                    |   15 ++++++------
 arch/m68k/atari/config.c                     |    9 ++++----
 arch/m68k/bvme6000/config.c                  |    3 ++-
 arch/m68k/hp300/config.c                     |    9 ++++----
 arch/m68k/include/uapi/asm/bootinfo-amiga.h  |   14 +++++------
 arch/m68k/include/uapi/asm/bootinfo-apollo.h |    2 +-
 arch/m68k/include/uapi/asm/bootinfo-atari.h  |    4 ++--
 arch/m68k/include/uapi/asm/bootinfo-hp300.h  |    6 ++---
 arch/m68k/include/uapi/asm/bootinfo-mac.h    |    2 +-
 arch/m68k/include/uapi/asm/bootinfo-vme.h    |   17 ++++++++------
 arch/m68k/include/uapi/asm/bootinfo.h        |   29 ++++++++++++-----------
 arch/m68k/kernel/bootinfo_proc.c             |    8 ++++---
 arch/m68k/kernel/setup_mm.c                  |   31 ++++++++++++++++---------
 arch/m68k/mac/config.c                       |   32 ++++++++++++++------------
 arch/m68k/mvme147/config.c                   |    4 +++-
 arch/m68k/mvme16x/config.c                   |   27 ++++++++++++----------
 17 files changed, 129 insertions(+), 101 deletions(-)
arch/m68k/amiga/config.c +9 -9
index 0c92c1baf9bf..06920e85fac9 100644
@@ -145,37 +145,37 @@ static struct resource ram_resource[NUM_MEMINFO];
 int __init amiga_parse_bootinfo(const struct bi_record *record)
 {
 	int unknown = 0;
-	const unsigned long *data = record->data;
+	const void *data = record->data;
 
-	switch (record->tag) {
+	switch (be16_to_cpu(record->tag)) {
 	case BI_AMIGA_MODEL:
-		amiga_model = *data;
+		amiga_model = be32_to_cpup(data);
 		break;
 
 	case BI_AMIGA_ECLOCK:
-		amiga_eclock = *data;
+		amiga_eclock = be32_to_cpup(data);
 		break;
 
 	case BI_AMIGA_CHIPSET:
-		amiga_chipset = *data;
+		amiga_chipset = be32_to_cpup(data);
 		break;
 
 	case BI_AMIGA_CHIP_SIZE:
-		amiga_chip_size = *(const int *)data;
+		amiga_chip_size = be32_to_cpup(data);
 		break;
 
 	case BI_AMIGA_VBLANK:
-		amiga_vblank = *(const unsigned char *)data;
+		amiga_vblank = *(const __u8 *)data;
 		break;
 
 	case BI_AMIGA_PSFREQ:
-		amiga_psfreq = *(const unsigned char *)data;
+		amiga_psfreq = *(const __u8 *)data;
 		break;
 
 	case BI_AMIGA_AUTOCON:
 #ifdef CONFIG_ZORRO
 		if (zorro_num_autocon < ZORRO_NUM_AUTO) {
-			const struct ConfigDev *cd = (struct ConfigDev *)data;
+			const struct ConfigDev *cd = data;
 			struct zorro_dev_init *dev = &zorro_autocon_init[zorro_num_autocon++];
 			dev->rom = cd->cd_Rom;
 			dev->slotaddr = be16_to_cpu(cd->cd_SlotAddr);
arch/m68k/apollo/config.c +8 -7
index c90c19e904bc..9268c0f96376 100644
@@ -11,6 +11,7 @@
 #include <asm/setup.h>
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-apollo.h>
+#include <asm/byteorder.h>
 #include <asm/pgtable.h>
 #include <asm/apollohw.h>
 #include <asm/irq.h>
@@ -48,15 +49,15 @@ static const char *apollo_models[] = {
 int __init apollo_parse_bootinfo(const struct bi_record *record)
 {
 	int unknown = 0;
-	const unsigned long *data = record->data;
+	const void *data = record->data;
 
-	switch(record->tag) {
-		case BI_APOLLO_MODEL:
-			apollo_model=*data;
-			break;
+	switch (be16_to_cpu(record->tag)) {
+	case BI_APOLLO_MODEL:
+		apollo_model = be32_to_cpup(data);
+		break;
 
-		default:
-			 unknown=1;
+	default:
+		 unknown=1;
 	}
 
 	return unknown;
arch/m68k/atari/config.c +5 -4
index 9159195505d5..01a62161b08a 100644
@@ -38,6 +38,7 @@
 
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-atari.h>
+#include <asm/byteorder.h>
 #include <asm/setup.h>
 #include <asm/atarihw.h>
 #include <asm/atariints.h>
@@ -130,14 +131,14 @@ static int __init scc_test(volatile char *ctla)
 int __init atari_parse_bootinfo(const struct bi_record *record)
 {
 	int unknown = 0;
-	const u_long *data = record->data;
+	const void *data = record->data;
 
-	switch (record->tag) {
+	switch (be16_to_cpu(record->tag)) {
 	case BI_ATARI_MCH_COOKIE:
-		atari_mch_cookie = *data;
+		atari_mch_cookie = be32_to_cpup(data);
 		break;
 	case BI_ATARI_MCH_TYPE:
-		atari_mch_type = *data;
+		atari_mch_type = be32_to_cpup(data);
 		break;
 	default:
 		unknown = 1;
arch/m68k/bvme6000/config.c +2 -1
index 4d1b403822fa..478623dbb209 100644
@@ -29,6 +29,7 @@
 
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-vme.h>
+#include <asm/byteorder.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -53,7 +54,7 @@ static irq_handler_t tick_handler;
 
 int __init bvme6000_parse_bootinfo(const struct bi_record *bi)
 {
-	if (bi->tag == BI_VME_TYPE)
+	if (be16_to_cpu(bi->tag) == BI_VME_TYPE)
 		return 0;
 	else
 		return 1;
arch/m68k/hp300/config.c +5 -4
index 892d0794fc0b..2e5a787ea11b 100644
@@ -15,6 +15,7 @@
 
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-hp300.h>
+#include <asm/byteorder.h>
 #include <asm/machdep.h>
 #include <asm/blinken.h>
 #include <asm/io.h>                               /* readb() and writeb() */
@@ -71,15 +72,15 @@ extern int hp300_setup_serial_console(void) __init;
 int __init hp300_parse_bootinfo(const struct bi_record *record)
 {
 	int unknown = 0;
-	const unsigned long *data = record->data;
+	const void *data = record->data;
 
-	switch (record->tag) {
+	switch (be16_to_cpu(record->tag)) {
 	case BI_HP300_MODEL:
-		hp300_model = *data;
+		hp300_model = be32_to_cpup(data);
 		break;
 
 	case BI_HP300_UART_SCODE:
-		hp300_uart_scode = *data;
+		hp300_uart_scode = be32_to_cpup(data);
 		break;
 
 	case BI_HP300_UART_ADDR:
arch/m68k/include/uapi/asm/bootinfo-amiga.h +7 -7
index 28b6da07874a..daad3c58d2da 100644
@@ -10,15 +10,15 @@
      *  Amiga-specific tags
      */
 
-#define BI_AMIGA_MODEL		0x8000	/* model (u_long) */
+#define BI_AMIGA_MODEL		0x8000	/* model (__be32) */
 #define BI_AMIGA_AUTOCON	0x8001	/* AutoConfig device */
 					/* (AmigaOS struct ConfigDev) */
-#define BI_AMIGA_CHIP_SIZE	0x8002	/* size of Chip RAM (u_long) */
-#define BI_AMIGA_VBLANK		0x8003	/* VBLANK frequency (u_char) */
-#define BI_AMIGA_PSFREQ		0x8004	/* power supply frequency (u_char) */
-#define BI_AMIGA_ECLOCK		0x8005	/* EClock frequency (u_long) */
-#define BI_AMIGA_CHIPSET	0x8006	/* native chipset present (u_long) */
-#define BI_AMIGA_SERPER		0x8007	/* serial port period (u_short) */
+#define BI_AMIGA_CHIP_SIZE	0x8002	/* size of Chip RAM (__be32) */
+#define BI_AMIGA_VBLANK		0x8003	/* VBLANK frequency (__u8) */
+#define BI_AMIGA_PSFREQ		0x8004	/* power supply frequency (__u8) */
+#define BI_AMIGA_ECLOCK		0x8005	/* EClock frequency (__be32) */
+#define BI_AMIGA_CHIPSET	0x8006	/* native chipset present (__be32) */
+#define BI_AMIGA_SERPER		0x8007	/* serial port period (__be16) */
 
 
     /*
arch/m68k/include/uapi/asm/bootinfo-apollo.h +1 -1
index 69923697e131..a93e0af1c6fe 100644
@@ -10,7 +10,7 @@
      *  Apollo-specific tags
      */
 
-#define BI_APOLLO_MODEL		0x8000	/* model (u_long) */
+#define BI_APOLLO_MODEL		0x8000	/* model (__be32) */
 
 
     /*
arch/m68k/include/uapi/asm/bootinfo-atari.h +2 -2
index cca0a83fc0e5..a817854049bb 100644
@@ -10,8 +10,8 @@
      *  Atari-specific tags
      */
 
-#define BI_ATARI_MCH_COOKIE	0x8000	/* _MCH cookie from TOS (u_long) */
-#define BI_ATARI_MCH_TYPE	0x8001	/* special machine type (u_long) */
+#define BI_ATARI_MCH_COOKIE	0x8000	/* _MCH cookie from TOS (__be32) */
+#define BI_ATARI_MCH_TYPE	0x8001	/* special machine type (__be32) */
 
 
     /*
arch/m68k/include/uapi/asm/bootinfo-hp300.h +3 -3
index 08530e12d4c3..c90cb71ed89a 100644
@@ -10,9 +10,9 @@
      *  HP9000/300-specific tags
      */
 
-#define BI_HP300_MODEL		0x8000	/* model (u_long) */
-#define BI_HP300_UART_SCODE	0x8001	/* UART select code (u_long) */
-#define BI_HP300_UART_ADDR	0x8002	/* phys. addr of UART (u_long) */
+#define BI_HP300_MODEL		0x8000	/* model (__be32) */
+#define BI_HP300_UART_SCODE	0x8001	/* UART select code (__be32) */
+#define BI_HP300_UART_ADDR	0x8002	/* phys. addr of UART (__be32) */
 
 
     /*
arch/m68k/include/uapi/asm/bootinfo-mac.h +1 -1
index 0667c041d1a7..cc97ea0a6731 100644
@@ -7,7 +7,7 @@
 
 
     /*
-     *  Macintosh-specific tags (all u_long)
+     *  Macintosh-specific tags (all __be32)
      */
 
 #define BI_MAC_MODEL		0x8000	/* Mac Gestalt ID (model type) */
arch/m68k/include/uapi/asm/bootinfo-vme.h +10 -7
index 13ba5e19fe24..a135eb41d672 100644
@@ -6,11 +6,14 @@
 #define _UAPI_ASM_M68K_BOOTINFO_VME_H
 
 
+#include <linux/types.h>
+
+
     /*
      *  VME-specific tags
      */
 
-#define BI_VME_TYPE		0x8000	/* VME sub-architecture (u_long) */
+#define BI_VME_TYPE		0x8000	/* VME sub-architecture (__be32) */
 #define BI_VME_BRDINFO		0x8001	/* VME board information (struct) */
 
 
@@ -43,13 +46,13 @@
 
 typedef struct {
 	char	bdid[4];
-	u_char	rev, mth, day, yr;
-	u_short	size, reserved;
-	u_short	brdno;
+	__u8	rev, mth, day, yr;
+	__be16	size, reserved;
+	__be16	brdno;
 	char	brdsuffix[2];
-	u_long	options;
-	u_short	clun, dlun, ctype, dnum;
-	u_long	option2;
+	__be32	options;
+	__be16	clun, dlun, ctype, dnum;
+	__be32	option2;
 } t_bdid, *p_bdid;
 
 #endif /* __ASSEMBLY__ */
arch/m68k/include/uapi/asm/bootinfo.h +16 -13
index 9d64599d7bf5..cdeb26a015b0 100644
@@ -12,6 +12,9 @@
 #define _UAPI_ASM_M68K_BOOTINFO_H
 
 
+#include <linux/types.h>
+
+
 #ifndef __ASSEMBLY__
 
     /*
@@ -28,15 +31,15 @@
      */
 
 struct bi_record {
-	unsigned short tag;		/* tag ID */
-	unsigned short size;		/* size of record (in bytes) */
-	unsigned long data[0];		/* data */
+	__be16 tag;			/* tag ID */
+	__be16 size;			/* size of record (in bytes) */
+	__be32 data[0];			/* data */
 };
 
 
 struct mem_info {
-	unsigned long addr;		/* physical address of memory chunk */
-	unsigned long size;		/* length of memory chunk (in bytes) */
+	__be32 addr;			/* physical address of memory chunk */
+	__be32 size;			/* length of memory chunk (in bytes) */
 };
 
 #endif /* __ASSEMBLY__ */
@@ -50,10 +53,10 @@ struct mem_info {
      */
 
 #define BI_LAST			0x0000	/* last record (sentinel) */
-#define BI_MACHTYPE		0x0001	/* machine type (u_long) */
-#define BI_CPUTYPE		0x0002	/* cpu type (u_long) */
-#define BI_FPUTYPE		0x0003	/* fpu type (u_long) */
-#define BI_MMUTYPE		0x0004	/* mmu type (u_long) */
+#define BI_MACHTYPE		0x0001	/* machine type (__be32) */
+#define BI_CPUTYPE		0x0002	/* cpu type (__be32) */
+#define BI_FPUTYPE		0x0003	/* fpu type (__be32) */
+#define BI_MMUTYPE		0x0004	/* mmu type (__be32) */
 #define BI_MEMCHUNK		0x0005	/* memory chunk address and size */
 					/* (struct mem_info) */
 #define BI_RAMDISK		0x0006	/* ramdisk address and size */
@@ -157,11 +160,11 @@ struct mem_info {
 #ifndef __ASSEMBLY__
 
 struct bootversion {
-	unsigned short branch;
-	unsigned long magic;
+	__be16 branch;
+	__be32 magic;
 	struct {
-		unsigned long machtype;
-		unsigned long version;
+		__be32 machtype;
+		__be32 version;
 	} machversions[0];
 } __packed;
 
arch/m68k/kernel/bootinfo_proc.c +5 -3
index a22eac1dfdd1..7ee853e1432b 100644
@@ -10,6 +10,7 @@
 #include <linux/string.h>
 
 #include <asm/bootinfo.h>
+#include <asm/byteorder.h>
 
 
 static char bootinfo_tmp[1536] __initdata;
@@ -34,9 +35,10 @@ void __init save_bootinfo(const struct bi_record *bi)
 	const void *start = bi;
 	size_t size = sizeof(bi->tag);
 
-	while (bi->tag != BI_LAST) {
-		size += bi->size;
-		bi = (struct bi_record *)((unsigned long)bi + bi->size);
+	while (be16_to_cpu(bi->tag) != BI_LAST) {
+		uint16_t n = be16_to_cpu(bi->size);
+		size += n;
+		bi = (struct bi_record *)((unsigned long)bi + n);
 	}
 
 	if (size > sizeof(bootinfo_tmp)) {
arch/m68k/kernel/setup_mm.c +20 -11
index d3f3fe6374c6..99cfe0577ad0 100644
@@ -26,6 +26,7 @@
 #include <linux/initrd.h>
 
 #include <asm/bootinfo.h>
+#include <asm/byteorder.h>
 #include <asm/sections.h>
 #include <asm/setup.h>
 #include <asm/fpu.h>
@@ -143,13 +144,16 @@ extern void paging_init(void);
 
 static void __init m68k_parse_bootinfo(const struct bi_record *record)
 {
+	uint16_t tag;
+
 	save_bootinfo(record);
 
-	while (record->tag != BI_LAST) {
+	while ((tag = be16_to_cpu(record->tag)) != BI_LAST) {
 		int unknown = 0;
-		const unsigned long *data = record->data;
+		const void *data = record->data;
+		uint16_t size = be16_to_cpu(record->size);
 
-		switch (record->tag) {
+		switch (tag) {
 		case BI_MACHTYPE:
 		case BI_CPUTYPE:
 		case BI_FPUTYPE:
@@ -159,8 +163,11 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
 
 		case BI_MEMCHUNK:
 			if (m68k_num_memory < NUM_MEMINFO) {
-				m68k_memory[m68k_num_memory].addr = data[0];
-				m68k_memory[m68k_num_memory].size = data[1];
+				const struct mem_info *m = data;
+				m68k_memory[m68k_num_memory].addr =
+					be32_to_cpu(m->addr);
+				m68k_memory[m68k_num_memory].size =
+					be32_to_cpu(m->size);
 				m68k_num_memory++;
 			} else
 				pr_warn("%s: too many memory chunks\n",
@@ -168,12 +175,15 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
 			break;
 
 		case BI_RAMDISK:
-			m68k_ramdisk.addr = data[0];
-			m68k_ramdisk.size = data[1];
+			{
+				const struct mem_info *m = data;
+				m68k_ramdisk.addr = be32_to_cpu(m->addr);
+				m68k_ramdisk.size = be32_to_cpu(m->size);
+			}
 			break;
 
 		case BI_COMMAND_LINE:
-			strlcpy(m68k_command_line, (const char *)data,
+			strlcpy(m68k_command_line, data,
 				sizeof(m68k_command_line));
 			break;
 
@@ -201,9 +211,8 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
 		}
 		if (unknown)
 			pr_warn("%s: unknown tag 0x%04x ignored\n", __func__,
-				   record->tag);
-		record = (struct bi_record *)((unsigned long)record +
-					      record->size);
+				tag);
+		record = (struct bi_record *)((unsigned long)record + size);
 	}
 
 	m68k_realnum_memory = m68k_num_memory;
arch/m68k/mac/config.c +17 -15
index e48069da04ed..982c3fe73c4a 100644
@@ -29,6 +29,7 @@
 #include <asm/setup.h>
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-mac.h>
+#include <asm/byteorder.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -107,45 +108,46 @@ static void __init mac_sched_init(irq_handler_t vector)
 int __init mac_parse_bootinfo(const struct bi_record *record)
 {
 	int unknown = 0;
-	const u_long *data = record->data;
+	const void *data = record->data;
 
-	switch (record->tag) {
+	switch (be16_to_cpu(record->tag)) {
 	case BI_MAC_MODEL:
-		mac_bi_data.id = *data;
+		mac_bi_data.id = be32_to_cpup(data);
 		break;
 	case BI_MAC_VADDR:
-		mac_bi_data.videoaddr = *data;
+		mac_bi_data.videoaddr = be32_to_cpup(data);
 		break;
 	case BI_MAC_VDEPTH:
-		mac_bi_data.videodepth = *data;
+		mac_bi_data.videodepth = be32_to_cpup(data);
 		break;
 	case BI_MAC_VROW:
-		mac_bi_data.videorow = *data;
+		mac_bi_data.videorow = be32_to_cpup(data);
 		break;
 	case BI_MAC_VDIM:
-		mac_bi_data.dimensions = *data;
+		mac_bi_data.dimensions = be32_to_cpup(data);
 		break;
 	case BI_MAC_VLOGICAL:
-		mac_bi_data.videological = VIDEOMEMBASE + (*data & ~VIDEOMEMMASK);
-		mac_orig_videoaddr = *data;
+		mac_orig_videoaddr = be32_to_cpup(data);
+		mac_bi_data.videological =
+			VIDEOMEMBASE + (mac_orig_videoaddr & ~VIDEOMEMMASK);
 		break;
 	case BI_MAC_SCCBASE:
-		mac_bi_data.sccbase = *data;
+		mac_bi_data.sccbase = be32_to_cpup(data);
 		break;
 	case BI_MAC_BTIME:
-		mac_bi_data.boottime = *data;
+		mac_bi_data.boottime = be32_to_cpup(data);
 		break;
 	case BI_MAC_GMTBIAS:
-		mac_bi_data.gmtbias = *data;
+		mac_bi_data.gmtbias = be32_to_cpup(data);
 		break;
 	case BI_MAC_MEMSIZE:
-		mac_bi_data.memsize = *data;
+		mac_bi_data.memsize = be32_to_cpup(data);
 		break;
 	case BI_MAC_CPUID:
-		mac_bi_data.cpuid = *data;
+		mac_bi_data.cpuid = be32_to_cpup(data);
 		break;
 	case BI_MAC_ROMBASE:
-		mac_bi_data.rombase = *data;
+		mac_bi_data.rombase = be32_to_cpup(data);
 		break;
 	default:
 		unknown = 1;
arch/m68k/mvme147/config.c +3 -1
index 3a1d47564e52..1bb3ce6634d3 100644
@@ -27,6 +27,7 @@
 
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-vme.h>
+#include <asm/byteorder.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -54,7 +55,8 @@ irq_handler_t tick_handler;
 
 int __init mvme147_parse_bootinfo(const struct bi_record *bi)
 {
-	if (bi->tag == BI_VME_TYPE || bi->tag == BI_VME_BRDINFO)
+	uint16_t tag = be16_to_cpu(bi->tag);
+	if (tag == BI_VME_TYPE || tag == BI_VME_BRDINFO)
 		return 0;
 	else
 		return 1;
arch/m68k/mvme16x/config.c +15 -12
index e05994fd048c..eab7d342757e 100644
@@ -30,6 +30,7 @@
 
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-vme.h>
+#include <asm/byteorder.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -63,7 +64,8 @@ EXPORT_SYMBOL(mvme16x_config);
 
 int __init mvme16x_parse_bootinfo(const struct bi_record *bi)
 {
-	if (bi->tag == BI_VME_TYPE || bi->tag == BI_VME_BRDINFO)
+	uint16_t tag = be16_to_cpu(bi->tag);
+	if (tag == BI_VME_TYPE || tag == BI_VME_BRDINFO)
 		return 0;
 	else
 		return 1;
@@ -88,15 +90,15 @@ static void mvme16x_get_model(char *model)
     suf[3] = '\0';
     suf[0] = suf[1] ? '-' : '\0';
 
-    sprintf(model, "Motorola MVME%x%s", p->brdno, suf);
+    sprintf(model, "Motorola MVME%x%s", be16_to_cpu(p->brdno), suf);
 }
 
 
 static void mvme16x_get_hardware_list(struct seq_file *m)
 {
-    p_bdid p = &mvme_bdid;
+    uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
 
-    if (p->brdno == 0x0162 || p->brdno == 0x0172)
+    if (brdno == 0x0162 || brdno == 0x0172)
     {
 	unsigned char rev = *(unsigned char *)MVME162_VERSION_REG;
 
@@ -286,6 +288,7 @@ void __init config_mvme16x(void)
 {
     p_bdid p = &mvme_bdid;
     char id[40];
+    uint16_t brdno = be16_to_cpu(p->brdno);
 
     mach_max_dma_address = 0xffffffff;
     mach_sched_init      = mvme16x_sched_init;
@@ -307,18 +310,18 @@ void __init config_mvme16x(void)
     }
     /* Board type is only set by newer versions of vmelilo/tftplilo */
     if (vme_brdtype == 0)
-	vme_brdtype = p->brdno;
+	vme_brdtype = brdno;
 
     mvme16x_get_model(id);
     printk ("\nBRD_ID: %s   BUG %x.%x %02x/%02x/%02x\n", id, p->rev>>4,
 					p->rev&0xf, p->yr, p->mth, p->day);
-    if (p->brdno == 0x0162 || p->brdno == 0x172)
+    if (brdno == 0x0162 || brdno == 0x172)
     {
 	unsigned char rev = *(unsigned char *)MVME162_VERSION_REG;
 
 	mvme16x_config = rev | MVME16x_CONFIG_GOT_SCCA;
 
-	printk ("MVME%x Hardware status:\n", p->brdno);
+	printk ("MVME%x Hardware status:\n", brdno);
 	printk ("    CPU Type           68%s040\n",
 			rev & MVME16x_CONFIG_GOT_FPU ? "" : "LC");
 	printk ("    CPU clock          %dMHz\n",
@@ -348,12 +351,12 @@ void __init config_mvme16x(void)
 
 static irqreturn_t mvme16x_abort_int (int irq, void *dev_id)
 {
-	p_bdid p = &mvme_bdid;
 	unsigned long *new = (unsigned long *)vectors;
 	unsigned long *old = (unsigned long *)0xffe00000;
 	volatile unsigned char uc, *ucp;
+	uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
 
-	if (p->brdno == 0x0162 || p->brdno == 0x172)
+	if (brdno == 0x0162 || brdno == 0x172)
 	{
 		ucp = (volatile unsigned char *)0xfff42043;
 		uc = *ucp | 8;
@@ -367,7 +370,7 @@ static irqreturn_t mvme16x_abort_int (int irq, void *dev_id)
 	*(new+9) = *(old+9);		/* Trace */
 	*(new+47) = *(old+47);		/* Trap #15 */
 
-	if (p->brdno == 0x0162 || p->brdno == 0x172)
+	if (brdno == 0x0162 || brdno == 0x172)
 		*(new+0x5e) = *(old+0x5e);	/* ABORT switch */
 	else
 		*(new+0x6e) = *(old+0x6e);	/* ABORT switch */
@@ -382,7 +385,7 @@ static irqreturn_t mvme16x_timer_int (int irq, void *dev_id)
 
 void mvme16x_sched_init (irq_handler_t timer_routine)
 {
-    p_bdid p = &mvme_bdid;
+    uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
     int irq;
 
     tick_handler = timer_routine;
@@ -395,7 +398,7 @@ void mvme16x_sched_init (irq_handler_t timer_routine)
 				"timer", mvme16x_timer_int))
 	panic ("Couldn't register timer int");
 
-    if (p->brdno == 0x0162 || p->brdno == 0x172)
+    if (brdno == 0x0162 || brdno == 0x172)
 	irq = MVME162_IRQ_ABORT;
     else
         irq = MVME167_IRQ_ABORT;
Signature · 1 line
1.7.9.5
author maintainer
#26 lore raw

PATCH 15/16 m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h>

In reply to Geert Uytterhoeven
---
 arch/m68k/amiga/config.c                     |   18 +++++++--------
 arch/m68k/apollo/config.c                    |   15 ++++++------
 arch/m68k/atari/config.c                     |    9 ++++----
 arch/m68k/bvme6000/config.c                  |    3 ++-
 arch/m68k/hp300/config.c                     |    9 ++++----
 arch/m68k/include/uapi/asm/bootinfo-amiga.h  |   14 +++++------
 arch/m68k/include/uapi/asm/bootinfo-apollo.h |    2 +-
 arch/m68k/include/uapi/asm/bootinfo-atari.h  |    4 ++--
 arch/m68k/include/uapi/asm/bootinfo-hp300.h  |    6 ++---
 arch/m68k/include/uapi/asm/bootinfo-mac.h    |    2 +-
 arch/m68k/include/uapi/asm/bootinfo-vme.h    |   17 ++++++++------
 arch/m68k/include/uapi/asm/bootinfo.h        |   29 ++++++++++++-----------
 arch/m68k/kernel/bootinfo_proc.c             |    8 ++++---
 arch/m68k/kernel/setup_mm.c                  |   31 ++++++++++++++++---------
 arch/m68k/mac/config.c                       |   32 ++++++++++++++------------
 arch/m68k/mvme147/config.c                   |    4 +++-
 arch/m68k/mvme16x/config.c                   |   27 ++++++++++++----------
 17 files changed, 129 insertions(+), 101 deletions(-)
arch/m68k/amiga/config.c +9 -9
index 0c92c1baf9bf..06920e85fac9 100644
@@ -145,37 +145,37 @@ static struct resource ram_resource[NUM_MEMINFO];
 int __init amiga_parse_bootinfo(const struct bi_record *record)
 {
 	int unknown = 0;
-	const unsigned long *data = record->data;
+	const void *data = record->data;
 
-	switch (record->tag) {
+	switch (be16_to_cpu(record->tag)) {
 	case BI_AMIGA_MODEL:
-		amiga_model = *data;
+		amiga_model = be32_to_cpup(data);
 		break;
 
 	case BI_AMIGA_ECLOCK:
-		amiga_eclock = *data;
+		amiga_eclock = be32_to_cpup(data);
 		break;
 
 	case BI_AMIGA_CHIPSET:
-		amiga_chipset = *data;
+		amiga_chipset = be32_to_cpup(data);
 		break;
 
 	case BI_AMIGA_CHIP_SIZE:
-		amiga_chip_size = *(const int *)data;
+		amiga_chip_size = be32_to_cpup(data);
 		break;
 
 	case BI_AMIGA_VBLANK:
-		amiga_vblank = *(const unsigned char *)data;
+		amiga_vblank = *(const __u8 *)data;
 		break;
 
 	case BI_AMIGA_PSFREQ:
-		amiga_psfreq = *(const unsigned char *)data;
+		amiga_psfreq = *(const __u8 *)data;
 		break;
 
 	case BI_AMIGA_AUTOCON:
 #ifdef CONFIG_ZORRO
 		if (zorro_num_autocon < ZORRO_NUM_AUTO) {
-			const struct ConfigDev *cd = (struct ConfigDev *)data;
+			const struct ConfigDev *cd = data;
 			struct zorro_dev_init *dev = &zorro_autocon_init[zorro_num_autocon++];
 			dev->rom = cd->cd_Rom;
 			dev->slotaddr = be16_to_cpu(cd->cd_SlotAddr);
arch/m68k/apollo/config.c +8 -7
index c90c19e904bc..9268c0f96376 100644
@@ -11,6 +11,7 @@
 #include <asm/setup.h>
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-apollo.h>
+#include <asm/byteorder.h>
 #include <asm/pgtable.h>
 #include <asm/apollohw.h>
 #include <asm/irq.h>
@@ -48,15 +49,15 @@ static const char *apollo_models[] = {
 int __init apollo_parse_bootinfo(const struct bi_record *record)
 {
 	int unknown = 0;
-	const unsigned long *data = record->data;
+	const void *data = record->data;
 
-	switch(record->tag) {
-		case BI_APOLLO_MODEL:
-			apollo_model=*data;
-			break;
+	switch (be16_to_cpu(record->tag)) {
+	case BI_APOLLO_MODEL:
+		apollo_model = be32_to_cpup(data);
+		break;
 
-		default:
-			 unknown=1;
+	default:
+		 unknown=1;
 	}
 
 	return unknown;
arch/m68k/atari/config.c +5 -4
index 9159195505d5..01a62161b08a 100644
@@ -38,6 +38,7 @@
 
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-atari.h>
+#include <asm/byteorder.h>
 #include <asm/setup.h>
 #include <asm/atarihw.h>
 #include <asm/atariints.h>
@@ -130,14 +131,14 @@ static int __init scc_test(volatile char *ctla)
 int __init atari_parse_bootinfo(const struct bi_record *record)
 {
 	int unknown = 0;
-	const u_long *data = record->data;
+	const void *data = record->data;
 
-	switch (record->tag) {
+	switch (be16_to_cpu(record->tag)) {
 	case BI_ATARI_MCH_COOKIE:
-		atari_mch_cookie = *data;
+		atari_mch_cookie = be32_to_cpup(data);
 		break;
 	case BI_ATARI_MCH_TYPE:
-		atari_mch_type = *data;
+		atari_mch_type = be32_to_cpup(data);
 		break;
 	default:
 		unknown = 1;
arch/m68k/bvme6000/config.c +2 -1
index 4d1b403822fa..478623dbb209 100644
@@ -29,6 +29,7 @@
 
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-vme.h>
+#include <asm/byteorder.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -53,7 +54,7 @@ static irq_handler_t tick_handler;
 
 int __init bvme6000_parse_bootinfo(const struct bi_record *bi)
 {
-	if (bi->tag == BI_VME_TYPE)
+	if (be16_to_cpu(bi->tag) == BI_VME_TYPE)
 		return 0;
 	else
 		return 1;
arch/m68k/hp300/config.c +5 -4
index 892d0794fc0b..2e5a787ea11b 100644
@@ -15,6 +15,7 @@
 
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-hp300.h>
+#include <asm/byteorder.h>
 #include <asm/machdep.h>
 #include <asm/blinken.h>
 #include <asm/io.h>                               /* readb() and writeb() */
@@ -71,15 +72,15 @@ extern int hp300_setup_serial_console(void) __init;
 int __init hp300_parse_bootinfo(const struct bi_record *record)
 {
 	int unknown = 0;
-	const unsigned long *data = record->data;
+	const void *data = record->data;
 
-	switch (record->tag) {
+	switch (be16_to_cpu(record->tag)) {
 	case BI_HP300_MODEL:
-		hp300_model = *data;
+		hp300_model = be32_to_cpup(data);
 		break;
 
 	case BI_HP300_UART_SCODE:
-		hp300_uart_scode = *data;
+		hp300_uart_scode = be32_to_cpup(data);
 		break;
 
 	case BI_HP300_UART_ADDR:
arch/m68k/include/uapi/asm/bootinfo-amiga.h +7 -7
index 28b6da07874a..daad3c58d2da 100644
@@ -10,15 +10,15 @@
      *  Amiga-specific tags
      */
 
-#define BI_AMIGA_MODEL		0x8000	/* model (u_long) */
+#define BI_AMIGA_MODEL		0x8000	/* model (__be32) */
 #define BI_AMIGA_AUTOCON	0x8001	/* AutoConfig device */
 					/* (AmigaOS struct ConfigDev) */
-#define BI_AMIGA_CHIP_SIZE	0x8002	/* size of Chip RAM (u_long) */
-#define BI_AMIGA_VBLANK		0x8003	/* VBLANK frequency (u_char) */
-#define BI_AMIGA_PSFREQ		0x8004	/* power supply frequency (u_char) */
-#define BI_AMIGA_ECLOCK		0x8005	/* EClock frequency (u_long) */
-#define BI_AMIGA_CHIPSET	0x8006	/* native chipset present (u_long) */
-#define BI_AMIGA_SERPER		0x8007	/* serial port period (u_short) */
+#define BI_AMIGA_CHIP_SIZE	0x8002	/* size of Chip RAM (__be32) */
+#define BI_AMIGA_VBLANK		0x8003	/* VBLANK frequency (__u8) */
+#define BI_AMIGA_PSFREQ		0x8004	/* power supply frequency (__u8) */
+#define BI_AMIGA_ECLOCK		0x8005	/* EClock frequency (__be32) */
+#define BI_AMIGA_CHIPSET	0x8006	/* native chipset present (__be32) */
+#define BI_AMIGA_SERPER		0x8007	/* serial port period (__be16) */
 
 
     /*
arch/m68k/include/uapi/asm/bootinfo-apollo.h +1 -1
index 69923697e131..a93e0af1c6fe 100644
@@ -10,7 +10,7 @@
      *  Apollo-specific tags
      */
 
-#define BI_APOLLO_MODEL		0x8000	/* model (u_long) */
+#define BI_APOLLO_MODEL		0x8000	/* model (__be32) */
 
 
     /*
arch/m68k/include/uapi/asm/bootinfo-atari.h +2 -2
index cca0a83fc0e5..a817854049bb 100644
@@ -10,8 +10,8 @@
      *  Atari-specific tags
      */
 
-#define BI_ATARI_MCH_COOKIE	0x8000	/* _MCH cookie from TOS (u_long) */
-#define BI_ATARI_MCH_TYPE	0x8001	/* special machine type (u_long) */
+#define BI_ATARI_MCH_COOKIE	0x8000	/* _MCH cookie from TOS (__be32) */
+#define BI_ATARI_MCH_TYPE	0x8001	/* special machine type (__be32) */
 
 
     /*
arch/m68k/include/uapi/asm/bootinfo-hp300.h +3 -3
index 08530e12d4c3..c90cb71ed89a 100644
@@ -10,9 +10,9 @@
      *  HP9000/300-specific tags
      */
 
-#define BI_HP300_MODEL		0x8000	/* model (u_long) */
-#define BI_HP300_UART_SCODE	0x8001	/* UART select code (u_long) */
-#define BI_HP300_UART_ADDR	0x8002	/* phys. addr of UART (u_long) */
+#define BI_HP300_MODEL		0x8000	/* model (__be32) */
+#define BI_HP300_UART_SCODE	0x8001	/* UART select code (__be32) */
+#define BI_HP300_UART_ADDR	0x8002	/* phys. addr of UART (__be32) */
 
 
     /*
arch/m68k/include/uapi/asm/bootinfo-mac.h +1 -1
index 0667c041d1a7..cc97ea0a6731 100644
@@ -7,7 +7,7 @@
 
 
     /*
-     *  Macintosh-specific tags (all u_long)
+     *  Macintosh-specific tags (all __be32)
      */
 
 #define BI_MAC_MODEL		0x8000	/* Mac Gestalt ID (model type) */
arch/m68k/include/uapi/asm/bootinfo-vme.h +10 -7
index 13ba5e19fe24..a135eb41d672 100644
@@ -6,11 +6,14 @@
 #define _UAPI_ASM_M68K_BOOTINFO_VME_H
 
 
+#include <linux/types.h>
+
+
     /*
      *  VME-specific tags
      */
 
-#define BI_VME_TYPE		0x8000	/* VME sub-architecture (u_long) */
+#define BI_VME_TYPE		0x8000	/* VME sub-architecture (__be32) */
 #define BI_VME_BRDINFO		0x8001	/* VME board information (struct) */
 
 
@@ -43,13 +46,13 @@
 
 typedef struct {
 	char	bdid[4];
-	u_char	rev, mth, day, yr;
-	u_short	size, reserved;
-	u_short	brdno;
+	__u8	rev, mth, day, yr;
+	__be16	size, reserved;
+	__be16	brdno;
 	char	brdsuffix[2];
-	u_long	options;
-	u_short	clun, dlun, ctype, dnum;
-	u_long	option2;
+	__be32	options;
+	__be16	clun, dlun, ctype, dnum;
+	__be32	option2;
 } t_bdid, *p_bdid;
 
 #endif /* __ASSEMBLY__ */
arch/m68k/include/uapi/asm/bootinfo.h +16 -13
index 9d64599d7bf5..cdeb26a015b0 100644
@@ -12,6 +12,9 @@
 #define _UAPI_ASM_M68K_BOOTINFO_H
 
 
+#include <linux/types.h>
+
+
 #ifndef __ASSEMBLY__
 
     /*
@@ -28,15 +31,15 @@
      */
 
 struct bi_record {
-	unsigned short tag;		/* tag ID */
-	unsigned short size;		/* size of record (in bytes) */
-	unsigned long data[0];		/* data */
+	__be16 tag;			/* tag ID */
+	__be16 size;			/* size of record (in bytes) */
+	__be32 data[0];			/* data */
 };
 
 
 struct mem_info {
-	unsigned long addr;		/* physical address of memory chunk */
-	unsigned long size;		/* length of memory chunk (in bytes) */
+	__be32 addr;			/* physical address of memory chunk */
+	__be32 size;			/* length of memory chunk (in bytes) */
 };
 
 #endif /* __ASSEMBLY__ */
@@ -50,10 +53,10 @@ struct mem_info {
      */
 
 #define BI_LAST			0x0000	/* last record (sentinel) */
-#define BI_MACHTYPE		0x0001	/* machine type (u_long) */
-#define BI_CPUTYPE		0x0002	/* cpu type (u_long) */
-#define BI_FPUTYPE		0x0003	/* fpu type (u_long) */
-#define BI_MMUTYPE		0x0004	/* mmu type (u_long) */
+#define BI_MACHTYPE		0x0001	/* machine type (__be32) */
+#define BI_CPUTYPE		0x0002	/* cpu type (__be32) */
+#define BI_FPUTYPE		0x0003	/* fpu type (__be32) */
+#define BI_MMUTYPE		0x0004	/* mmu type (__be32) */
 #define BI_MEMCHUNK		0x0005	/* memory chunk address and size */
 					/* (struct mem_info) */
 #define BI_RAMDISK		0x0006	/* ramdisk address and size */
@@ -157,11 +160,11 @@ struct mem_info {
 #ifndef __ASSEMBLY__
 
 struct bootversion {
-	unsigned short branch;
-	unsigned long magic;
+	__be16 branch;
+	__be32 magic;
 	struct {
-		unsigned long machtype;
-		unsigned long version;
+		__be32 machtype;
+		__be32 version;
 	} machversions[0];
 } __packed;
 
arch/m68k/kernel/bootinfo_proc.c +5 -3
index a22eac1dfdd1..7ee853e1432b 100644
@@ -10,6 +10,7 @@
 #include <linux/string.h>
 
 #include <asm/bootinfo.h>
+#include <asm/byteorder.h>
 
 
 static char bootinfo_tmp[1536] __initdata;
@@ -34,9 +35,10 @@ void __init save_bootinfo(const struct bi_record *bi)
 	const void *start = bi;
 	size_t size = sizeof(bi->tag);
 
-	while (bi->tag != BI_LAST) {
-		size += bi->size;
-		bi = (struct bi_record *)((unsigned long)bi + bi->size);
+	while (be16_to_cpu(bi->tag) != BI_LAST) {
+		uint16_t n = be16_to_cpu(bi->size);
+		size += n;
+		bi = (struct bi_record *)((unsigned long)bi + n);
 	}
 
 	if (size > sizeof(bootinfo_tmp)) {
arch/m68k/kernel/setup_mm.c +20 -11
index d3f3fe6374c6..99cfe0577ad0 100644
@@ -26,6 +26,7 @@
 #include <linux/initrd.h>
 
 #include <asm/bootinfo.h>
+#include <asm/byteorder.h>
 #include <asm/sections.h>
 #include <asm/setup.h>
 #include <asm/fpu.h>
@@ -143,13 +144,16 @@ extern void paging_init(void);
 
 static void __init m68k_parse_bootinfo(const struct bi_record *record)
 {
+	uint16_t tag;
+
 	save_bootinfo(record);
 
-	while (record->tag != BI_LAST) {
+	while ((tag = be16_to_cpu(record->tag)) != BI_LAST) {
 		int unknown = 0;
-		const unsigned long *data = record->data;
+		const void *data = record->data;
+		uint16_t size = be16_to_cpu(record->size);
 
-		switch (record->tag) {
+		switch (tag) {
 		case BI_MACHTYPE:
 		case BI_CPUTYPE:
 		case BI_FPUTYPE:
@@ -159,8 +163,11 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
 
 		case BI_MEMCHUNK:
 			if (m68k_num_memory < NUM_MEMINFO) {
-				m68k_memory[m68k_num_memory].addr = data[0];
-				m68k_memory[m68k_num_memory].size = data[1];
+				const struct mem_info *m = data;
+				m68k_memory[m68k_num_memory].addr =
+					be32_to_cpu(m->addr);
+				m68k_memory[m68k_num_memory].size =
+					be32_to_cpu(m->size);
 				m68k_num_memory++;
 			} else
 				pr_warn("%s: too many memory chunks\n",
@@ -168,12 +175,15 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
 			break;
 
 		case BI_RAMDISK:
-			m68k_ramdisk.addr = data[0];
-			m68k_ramdisk.size = data[1];
+			{
+				const struct mem_info *m = data;
+				m68k_ramdisk.addr = be32_to_cpu(m->addr);
+				m68k_ramdisk.size = be32_to_cpu(m->size);
+			}
 			break;
 
 		case BI_COMMAND_LINE:
-			strlcpy(m68k_command_line, (const char *)data,
+			strlcpy(m68k_command_line, data,
 				sizeof(m68k_command_line));
 			break;
 
@@ -201,9 +211,8 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
 		}
 		if (unknown)
 			pr_warn("%s: unknown tag 0x%04x ignored\n", __func__,
-				   record->tag);
-		record = (struct bi_record *)((unsigned long)record +
-					      record->size);
+				tag);
+		record = (struct bi_record *)((unsigned long)record + size);
 	}
 
 	m68k_realnum_memory = m68k_num_memory;
arch/m68k/mac/config.c +17 -15
index e48069da04ed..982c3fe73c4a 100644
@@ -29,6 +29,7 @@
 #include <asm/setup.h>
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-mac.h>
+#include <asm/byteorder.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -107,45 +108,46 @@ static void __init mac_sched_init(irq_handler_t vector)
 int __init mac_parse_bootinfo(const struct bi_record *record)
 {
 	int unknown = 0;
-	const u_long *data = record->data;
+	const void *data = record->data;
 
-	switch (record->tag) {
+	switch (be16_to_cpu(record->tag)) {
 	case BI_MAC_MODEL:
-		mac_bi_data.id = *data;
+		mac_bi_data.id = be32_to_cpup(data);
 		break;
 	case BI_MAC_VADDR:
-		mac_bi_data.videoaddr = *data;
+		mac_bi_data.videoaddr = be32_to_cpup(data);
 		break;
 	case BI_MAC_VDEPTH:
-		mac_bi_data.videodepth = *data;
+		mac_bi_data.videodepth = be32_to_cpup(data);
 		break;
 	case BI_MAC_VROW:
-		mac_bi_data.videorow = *data;
+		mac_bi_data.videorow = be32_to_cpup(data);
 		break;
 	case BI_MAC_VDIM:
-		mac_bi_data.dimensions = *data;
+		mac_bi_data.dimensions = be32_to_cpup(data);
 		break;
 	case BI_MAC_VLOGICAL:
-		mac_bi_data.videological = VIDEOMEMBASE + (*data & ~VIDEOMEMMASK);
-		mac_orig_videoaddr = *data;
+		mac_orig_videoaddr = be32_to_cpup(data);
+		mac_bi_data.videological =
+			VIDEOMEMBASE + (mac_orig_videoaddr & ~VIDEOMEMMASK);
 		break;
 	case BI_MAC_SCCBASE:
-		mac_bi_data.sccbase = *data;
+		mac_bi_data.sccbase = be32_to_cpup(data);
 		break;
 	case BI_MAC_BTIME:
-		mac_bi_data.boottime = *data;
+		mac_bi_data.boottime = be32_to_cpup(data);
 		break;
 	case BI_MAC_GMTBIAS:
-		mac_bi_data.gmtbias = *data;
+		mac_bi_data.gmtbias = be32_to_cpup(data);
 		break;
 	case BI_MAC_MEMSIZE:
-		mac_bi_data.memsize = *data;
+		mac_bi_data.memsize = be32_to_cpup(data);
 		break;
 	case BI_MAC_CPUID:
-		mac_bi_data.cpuid = *data;
+		mac_bi_data.cpuid = be32_to_cpup(data);
 		break;
 	case BI_MAC_ROMBASE:
-		mac_bi_data.rombase = *data;
+		mac_bi_data.rombase = be32_to_cpup(data);
 		break;
 	default:
 		unknown = 1;
arch/m68k/mvme147/config.c +3 -1
index 3a1d47564e52..1bb3ce6634d3 100644
@@ -27,6 +27,7 @@
 
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-vme.h>
+#include <asm/byteorder.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -54,7 +55,8 @@ irq_handler_t tick_handler;
 
 int __init mvme147_parse_bootinfo(const struct bi_record *bi)
 {
-	if (bi->tag == BI_VME_TYPE || bi->tag == BI_VME_BRDINFO)
+	uint16_t tag = be16_to_cpu(bi->tag);
+	if (tag == BI_VME_TYPE || tag == BI_VME_BRDINFO)
 		return 0;
 	else
 		return 1;
arch/m68k/mvme16x/config.c +15 -12
index e05994fd048c..eab7d342757e 100644
@@ -30,6 +30,7 @@
 
 #include <asm/bootinfo.h>
 #include <asm/bootinfo-vme.h>
+#include <asm/byteorder.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -63,7 +64,8 @@ EXPORT_SYMBOL(mvme16x_config);
 
 int __init mvme16x_parse_bootinfo(const struct bi_record *bi)
 {
-	if (bi->tag == BI_VME_TYPE || bi->tag == BI_VME_BRDINFO)
+	uint16_t tag = be16_to_cpu(bi->tag);
+	if (tag == BI_VME_TYPE || tag == BI_VME_BRDINFO)
 		return 0;
 	else
 		return 1;
@@ -88,15 +90,15 @@ static void mvme16x_get_model(char *model)
     suf[3] = '\0';
     suf[0] = suf[1] ? '-' : '\0';
 
-    sprintf(model, "Motorola MVME%x%s", p->brdno, suf);
+    sprintf(model, "Motorola MVME%x%s", be16_to_cpu(p->brdno), suf);
 }
 
 
 static void mvme16x_get_hardware_list(struct seq_file *m)
 {
-    p_bdid p = &mvme_bdid;
+    uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
 
-    if (p->brdno == 0x0162 || p->brdno == 0x0172)
+    if (brdno == 0x0162 || brdno == 0x0172)
     {
 	unsigned char rev = *(unsigned char *)MVME162_VERSION_REG;
 
@@ -286,6 +288,7 @@ void __init config_mvme16x(void)
 {
     p_bdid p = &mvme_bdid;
     char id[40];
+    uint16_t brdno = be16_to_cpu(p->brdno);
 
     mach_max_dma_address = 0xffffffff;
     mach_sched_init      = mvme16x_sched_init;
@@ -307,18 +310,18 @@ void __init config_mvme16x(void)
     }
     /* Board type is only set by newer versions of vmelilo/tftplilo */
     if (vme_brdtype == 0)
-	vme_brdtype = p->brdno;
+	vme_brdtype = brdno;
 
     mvme16x_get_model(id);
     printk ("\nBRD_ID: %s   BUG %x.%x %02x/%02x/%02x\n", id, p->rev>>4,
 					p->rev&0xf, p->yr, p->mth, p->day);
-    if (p->brdno == 0x0162 || p->brdno == 0x172)
+    if (brdno == 0x0162 || brdno == 0x172)
     {
 	unsigned char rev = *(unsigned char *)MVME162_VERSION_REG;
 
 	mvme16x_config = rev | MVME16x_CONFIG_GOT_SCCA;
 
-	printk ("MVME%x Hardware status:\n", p->brdno);
+	printk ("MVME%x Hardware status:\n", brdno);
 	printk ("    CPU Type           68%s040\n",
 			rev & MVME16x_CONFIG_GOT_FPU ? "" : "LC");
 	printk ("    CPU clock          %dMHz\n",
@@ -348,12 +351,12 @@ void __init config_mvme16x(void)
 
 static irqreturn_t mvme16x_abort_int (int irq, void *dev_id)
 {
-	p_bdid p = &mvme_bdid;
 	unsigned long *new = (unsigned long *)vectors;
 	unsigned long *old = (unsigned long *)0xffe00000;
 	volatile unsigned char uc, *ucp;
+	uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
 
-	if (p->brdno == 0x0162 || p->brdno == 0x172)
+	if (brdno == 0x0162 || brdno == 0x172)
 	{
 		ucp = (volatile unsigned char *)0xfff42043;
 		uc = *ucp | 8;
@@ -367,7 +370,7 @@ static irqreturn_t mvme16x_abort_int (int irq, void *dev_id)
 	*(new+9) = *(old+9);		/* Trace */
 	*(new+47) = *(old+47);		/* Trap #15 */
 
-	if (p->brdno == 0x0162 || p->brdno == 0x172)
+	if (brdno == 0x0162 || brdno == 0x172)
 		*(new+0x5e) = *(old+0x5e);	/* ABORT switch */
 	else
 		*(new+0x6e) = *(old+0x6e);	/* ABORT switch */
@@ -382,7 +385,7 @@ static irqreturn_t mvme16x_timer_int (int irq, void *dev_id)
 
 void mvme16x_sched_init (irq_handler_t timer_routine)
 {
-    p_bdid p = &mvme_bdid;
+    uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
     int irq;
 
     tick_handler = timer_routine;
@@ -395,7 +398,7 @@ void mvme16x_sched_init (irq_handler_t timer_routine)
 				"timer", mvme16x_timer_int))
 	panic ("Couldn't register timer int");
 
-    if (p->brdno == 0x0162 || p->brdno == 0x172)
+    if (brdno == 0x0162 || brdno == 0x172)
 	irq = MVME162_IRQ_ABORT;
     else
         irq = MVME167_IRQ_ABORT;
Signature · 1 line
1.7.9.5
author maintainer
#27 lore raw

PATCH 16/16 m68k: Remove superfluous inclusions of <asm/bootinfo.h>

In reply to Geert Uytterhoeven
---
 arch/m68k/mac/iop.c                     |    1 -
 arch/m68k/mac/misc.c                    |    1 -
 arch/m68k/mac/oss.c                     |    1 -
 arch/m68k/mac/psc.c                     |    1 -
 arch/m68k/mac/via.c                     |    1 -
 arch/m68k/sun3x/prom.c                  |    1 -
 drivers/net/ethernet/natsemi/macsonic.c |    1 -
 drivers/video/macfb.c                   |    1 -
 drivers/video/valkyriefb.c              |    1 -
 9 files changed, 9 deletions(-)
arch/m68k/mac/iop.c +0 -1
index ed0d9b0473ea..4d2adfb32a2a 100644
@@ -111,7 +111,6 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 
-#include <asm/bootinfo.h>
 #include <asm/macintosh.h>
 #include <asm/macints.h>
 #include <asm/mac_iop.h>
arch/m68k/mac/misc.c +0 -1
index 3d02a3c3a93a..707b61aea203 100644
@@ -25,7 +25,6 @@
 #include <asm/mac_via.h>
 #include <asm/mac_oss.h>
 
-#include <asm/bootinfo.h>
 #include <asm/machdep.h>
 
 /* Offset between Unix time (1970-based) and Mac time (1904-based) */
arch/m68k/mac/oss.c +0 -1
index 6c4c882c126e..54037125ebf8 100644
@@ -21,7 +21,6 @@
 #include <linux/init.h>
 #include <linux/irq.h>
 
-#include <asm/bootinfo.h>
 #include <asm/macintosh.h>
 #include <asm/macints.h>
 #include <asm/mac_via.h>
arch/m68k/mac/psc.c +0 -1
index cc9f3f097be7..835fa04511c8 100644
@@ -21,7 +21,6 @@
 #include <linux/irq.h>
 
 #include <asm/traps.h>
-#include <asm/bootinfo.h>
 #include <asm/macintosh.h>
 #include <asm/macints.h>
 #include <asm/mac_psc.h>
arch/m68k/mac/via.c +0 -1
index 5d1458bb871b..e198dec868e4 100644
@@ -30,7 +30,6 @@
 #include <linux/module.h>
 #include <linux/irq.h>
 
-#include <asm/bootinfo.h>
 #include <asm/macintosh.h>
 #include <asm/macints.h>
 #include <asm/mac_via.h>
arch/m68k/sun3x/prom.c +0 -1
index a7b7e818d627..0898c3f81508 100644
@@ -10,7 +10,6 @@
 
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <asm/bootinfo.h>
 #include <asm/setup.h>
 #include <asm/traps.h>
 #include <asm/sun3xprom.h>
drivers/net/ethernet/natsemi/macsonic.c +0 -1
index 346a4e025c34..04b3ec1352f1 100644
@@ -52,7 +52,6 @@
 #include <linux/bitrev.h>
 #include <linux/slab.h>
 
-#include <asm/bootinfo.h>
 #include <asm/pgtable.h>
 #include <asm/io.h>
 #include <asm/hwtest.h>
drivers/video/macfb.c +0 -1
index fe01add3700e..945779cc7672 100644
@@ -34,7 +34,6 @@
 #include <linux/fb.h>
 
 #include <asm/setup.h>
-#include <asm/bootinfo.h>
 #include <asm/macintosh.h>
 #include <asm/io.h>
 
drivers/video/valkyriefb.c +0 -1
index 3f5a041601da..88f911e9e612 100644
@@ -56,7 +56,6 @@
 #include <linux/cuda.h>
 #include <asm/io.h>
 #ifdef CONFIG_MAC
-#include <asm/bootinfo.h>
 #include <asm/macintosh.h>
 #else
 #include <asm/prom.h>
Signature · 1 line
1.7.9.5
author maintainer
#28 lore raw

PATCH 16/16 m68k: Remove superfluous inclusions of <asm/bootinfo.h>

In reply to Geert Uytterhoeven
---
 arch/m68k/mac/iop.c                     |    1 -
 arch/m68k/mac/misc.c                    |    1 -
 arch/m68k/mac/oss.c                     |    1 -
 arch/m68k/mac/psc.c                     |    1 -
 arch/m68k/mac/via.c                     |    1 -
 arch/m68k/sun3x/prom.c                  |    1 -
 drivers/net/ethernet/natsemi/macsonic.c |    1 -
 drivers/video/macfb.c                   |    1 -
 drivers/video/valkyriefb.c              |    1 -
 9 files changed, 9 deletions(-)
arch/m68k/mac/iop.c +0 -1
index ed0d9b0473ea..4d2adfb32a2a 100644
@@ -111,7 +111,6 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 
-#include <asm/bootinfo.h>
 #include <asm/macintosh.h>
 #include <asm/macints.h>
 #include <asm/mac_iop.h>
arch/m68k/mac/misc.c +0 -1
index 3d02a3c3a93a..707b61aea203 100644
@@ -25,7 +25,6 @@
 #include <asm/mac_via.h>
 #include <asm/mac_oss.h>
 
-#include <asm/bootinfo.h>
 #include <asm/machdep.h>
 
 /* Offset between Unix time (1970-based) and Mac time (1904-based) */
arch/m68k/mac/oss.c +0 -1
index 6c4c882c126e..54037125ebf8 100644
@@ -21,7 +21,6 @@
 #include <linux/init.h>
 #include <linux/irq.h>
 
-#include <asm/bootinfo.h>
 #include <asm/macintosh.h>
 #include <asm/macints.h>
 #include <asm/mac_via.h>
arch/m68k/mac/psc.c +0 -1
index cc9f3f097be7..835fa04511c8 100644
@@ -21,7 +21,6 @@
 #include <linux/irq.h>
 
 #include <asm/traps.h>
-#include <asm/bootinfo.h>
 #include <asm/macintosh.h>
 #include <asm/macints.h>
 #include <asm/mac_psc.h>
arch/m68k/mac/via.c +0 -1
index 5d1458bb871b..e198dec868e4 100644
@@ -30,7 +30,6 @@
 #include <linux/module.h>
 #include <linux/irq.h>
 
-#include <asm/bootinfo.h>
 #include <asm/macintosh.h>
 #include <asm/macints.h>
 #include <asm/mac_via.h>
arch/m68k/sun3x/prom.c +0 -1
index a7b7e818d627..0898c3f81508 100644
@@ -10,7 +10,6 @@
 
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <asm/bootinfo.h>
 #include <asm/setup.h>
 #include <asm/traps.h>
 #include <asm/sun3xprom.h>
drivers/net/ethernet/natsemi/macsonic.c +0 -1
index 346a4e025c34..04b3ec1352f1 100644
@@ -52,7 +52,6 @@
 #include <linux/bitrev.h>
 #include <linux/slab.h>
 
-#include <asm/bootinfo.h>
 #include <asm/pgtable.h>
 #include <asm/io.h>
 #include <asm/hwtest.h>
drivers/video/macfb.c +0 -1
index fe01add3700e..945779cc7672 100644
@@ -34,7 +34,6 @@
 #include <linux/fb.h>
 
 #include <asm/setup.h>
-#include <asm/bootinfo.h>
 #include <asm/macintosh.h>
 #include <asm/io.h>
 
drivers/video/valkyriefb.c +0 -1
index 3f5a041601da..88f911e9e612 100644
@@ -56,7 +56,6 @@
 #include <linux/cuda.h>
 #include <asm/io.h>
 #ifdef CONFIG_MAC
-#include <asm/bootinfo.h>
 #include <asm/macintosh.h>
 #else
 #include <asm/prom.h>
Signature · 1 line
1.7.9.5