Subject: [PATCH 2.6] make the bcm1250 work

From: Peter Buckingham <[email-masked]>
Date: Thu, 09 Sep 2004 13:50:13 -0700

Hi Ralf,

I have been playing with a bcm1250 from broadcom. These are patches I 
needed to get things to compile correctly. After applying the to patches 
above I can build fine.

thanks,

peter

Signed-off-by: Peter Buckingham <[email-masked]>
Index: arch/mips/sibyte/sb1250/prom.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sibyte/sb1250/prom.c,v
retrieving revision 1.9
diff -p -u -r1.9 prom.c
--- arch/mips/sibyte/sb1250/prom.c	28 Jan 2004 22:16:39 -0000	1.9
+++ arch/mips/sibyte/sb1250/prom.c	9 Sep 2004 18:42:13 -0000
@@ -29,6 +29,7 @@
 
 #ifdef CONFIG_EMBEDDED_RAMDISK
 /* These are symbols defined by the ramdisk linker script */
+extern unsigned long initrd_start, initrd_end;
 extern unsigned char __rd_start;
 extern unsigned char __rd_end;
 #endif
Index: arch/mips/sibyte/swarm/setup.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sibyte/swarm/setup.c,v
retrieving revision 1.31
diff -p -u -r1.31 setup.c
--- arch/mips/sibyte/swarm/setup.c	26 Aug 2004 20:18:00 -0000	1.31
+++ arch/mips/sibyte/swarm/setup.c	9 Sep 2004 18:42:13 -0000
@@ -27,6 +27,7 @@
 #include <linux/bootmem.h>
 #include <linux/blkdev.h>
 #include <linux/init.h>
+#include <linux/tty.h>
 
 #include <asm/irq.h>
 #include <asm/io.h>
@@ -50,6 +51,11 @@ extern int m41t81_probe(void);
 extern int m41t81_set_time(unsigned long);
 extern unsigned long m41t81_get_time(void);
 
+#ifdef CONFIG_BLK_DEV_INITRD
+extern unsigned long initrd_start, initrd_end;
+extern void * __rd_start, * __rd_end;
+#endif
+
 const char *get_system_type(void)
 {
 	return "SiByte " SIBYTE_BOARD_NAME;
Index: arch/mips/pci/pci-sb1250.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/pci/pci-sb1250.c,v
retrieving revision 1.9
diff -p -u -r1.9 pci-sb1250.c
--- arch/mips/pci/pci-sb1250.c	26 Aug 2004 20:18:00 -0000	1.9
+++ arch/mips/pci/pci-sb1250.c	9 Sep 2004 18:45:11 -0000
@@ -37,6 +37,7 @@
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/console.h>
+#include <linux/tty.h> //pmb 20040824
 
 #include <asm/io.h>

---

From: Peter Buckingham <[email-masked]>
Date: Thu, 09 Sep 2004 13:56:56 -0700

Hi Ralf,

the second patch has some cruft in it. could you apply the
following instead.

thanks,

peter

+++ arch/mips/pci/pci-sb1250.c	9 Sep 2004 20:55:20 -0000
 
 #include <asm/io.h>

---

From: Christoph Hellwig <[email-masked]>
Date: Fri, 10 Sep 2004 09:56:44 +0200

>  extern unsigned char __rd_end;

Please use the appropinquate header for these.

> +extern void * __rd_start, * __rd_end;

dito.

---

From: Peter Buckingham <[email-masked]>
Date: Fri, 10 Sep 2004 09:48:22 -0700

Hi Christoph,

> Please use the appropinquate header for these.

I'd love to use the appropriate header for these, but can't find one. 
cscope doesn't seem to show that these are defined usefully in a header 
file.

Can you point me to where these are defined?

thanks,

peter

---

From: Ralf Baechle <[email-masked]>
Date: Fri, 10 Sep 2004 19:52:13 +0200

> cscope doesn't seem to show that these are defined usefully in a header 

Winners use grep(1) ;-)

> Can you point me to where these are defined?

Include/linux/initrd.h.

  Ralf

---

From: Peter Buckingham <[email-masked]>
Date: Fri, 10 Sep 2004 11:04:28 -0700

> Winners use grep(1) ;-)

guess the old tools still work the best ;-)

> Include/linux/initrd.h.

okay, i've attached a new version of the patch. just a few questions. 
would it make sense to lift __rd_start, __rd_end into initrd.h? also 
would it make sense to add:

#ifdef __INITRD_H

etc stuff to the initrd.h?

peter
Index: arch/mips/pci/pci-sb1250.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/pci/pci-sb1250.c,v
retrieving revision 1.9
diff -u -r1.9 pci-sb1250.c
--- arch/mips/pci/pci-sb1250.c	26 Aug 2004 20:18:00 -0000	1.9
+++ arch/mips/pci/pci-sb1250.c	10 Sep 2004 18:01:29 -0000
@@ -37,6 +37,7 @@
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/console.h>
+#include <linux/tty.h>
 
 #include <asm/io.h>
 
Index: arch/mips/sibyte/sb1250/prom.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sibyte/sb1250/prom.c,v
retrieving revision 1.9
diff -u -r1.9 prom.c
--- arch/mips/sibyte/sb1250/prom.c	28 Jan 2004 22:16:39 -0000	1.9
+++ arch/mips/sibyte/sb1250/prom.c	10 Sep 2004 18:01:29 -0000
@@ -23,6 +23,7 @@
 #include <linux/blkdev.h>
 #include <linux/bootmem.h>
 #include <linux/smp.h>
+#include <linux/initrd.h>
 
 #include <asm/bootinfo.h>
 #include <asm/reboot.h>
Index: arch/mips/sibyte/swarm/setup.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sibyte/swarm/setup.c,v
retrieving revision 1.31
diff -u -r1.31 setup.c
--- arch/mips/sibyte/swarm/setup.c	26 Aug 2004 20:18:00 -0000	1.31
+++ arch/mips/sibyte/swarm/setup.c	10 Sep 2004 18:01:29 -0000
@@ -27,6 +27,8 @@
 #include <linux/bootmem.h>
 #include <linux/blkdev.h>
 #include <linux/init.h>
+#include <linux/tty.h>
+#include <linux/initrd.h>
 
 #include <asm/irq.h>
 #include <asm/io.h>
@@ -50,6 +52,10 @@

---

From: David Daney <[email-masked]>
Date: Fri, 10 Sep 2004 11:15:45 -0700

> would it make sense to add:
Those are architecture dependent, and must be coordinated with the
linker script.  They probably should not be in linux/initrd.h.

David Daney.