Skip to contentSkip to conversation

make the bcm1250 work

PATCH In review Peter Buckingham 4 participants 7 messages Sep 9, 2004 – Sep 10, 2004 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make the bcm1250 work

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

Index: arch/mips/sibyte/sb1250/prom.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sibyte/sb1250/prom.c,v retrieving revision 1.9

mips/sibyte/sb1250/prom.c +1 -0
diff -p -u -r1.9 prom.c
@@ -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

mips/sibyte/swarm/setup.c +6 -0
diff -p -u -r1.31 setup.c
@@ -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

mips/pci/pci-sb1250.c +1 -0
diff -p -u -r1.9 pci-sb1250.c
@@ -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>
 
#1 lore raw

Hi Ralf,

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

thanks,

peter

Index: arch/mips/pci/pci-sb1250.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/pci/pci-sb1250.c,v retrieving revision 1.9

mips/pci/pci-sb1250.c +1 -0
diff -p -u -r1.9 pci-sb1250.c
@@ -37,6 +37,7 @@
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/console.h>
+#include <linux/tty.h>
 
 #include <asm/io.h>
 
#2 lore raw
In reply to Peter Buckingham
Quoted 5 lines

#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;

Please use the appropinquate header for these.

mips/sibyte/swarm/setup.c extern int m41t81_probe(void); · line 57

Quoted 4 lines
mips/sibyte/swarm/setup.c +4 -0
+#ifdef CONFIG_BLK_DEV_INITRD
+extern unsigned long initrd_start, initrd_end;
+extern void * __rd_start, * __rd_end;
+#endif

dito.

#3 lore raw

Hi Christoph,

Quoted 8 lines · Christoph Hellwig
Quoted 5 lines

#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;

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

#4 lore raw
Quoted 11 lines · Peter Buckingham
Quoted 7 lines
Quoted 4 lines

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

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.

Winners use grep(1) ;-)

Quoted 1 line

Can you point me to where these are defined?

Include/linux/initrd.h.

Ralf

#5 lore raw
Quoted 1 line · Ralf Baechle

Winners use grep(1) ;-)

guess the old tools still work the best ;-)

Quoted 1 line

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

mips/pci/pci-sb1250.c +1 -0
diff -u -r1.9 pci-sb1250.c
@@ -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

mips/sibyte/sb1250/prom.c +1 -0
diff -u -r1.9 prom.c
@@ -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

mips/sibyte/swarm/setup.c +6 -0
diff -u -r1.31 setup.c
@@ -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 @@
 extern int m41t81_set_time(unsigned long);
 extern unsigned long m41t81_get_time(void);
 
+#ifdef CONFIG_BLK_DEV_INITRD
+extern void * __rd_start, * __rd_end;
+#endif
+
 const char *get_system_type(void)
 {
 	return "SiByte " SIBYTE_BOARD_NAME;
#6 lore raw
Quoted 8 lines · Peter Buckingham
Quoted 1 line · Ralf Baechle

Winners use grep(1) ;-)

guess the old tools still work the best ;-)

Quoted 7 lines
Quoted 1 line

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:

Those are architecture dependent, and must be coordinated with the linker script. They probably should not be in linux/initrd.h.

David Daney.