Commit 9a4d5c37 authored by Tom Rini's avatar Tom Rini

PPC32: In the bootwrapper/loader, rename setup_legacy to serial_fixups to

more accurately describe what it does.  Also for netbooting, pass along ip=on and
in general make sure we don't pass along bogus info in r5.
parent 70a882c4
...@@ -67,7 +67,7 @@ extern int CRT_tstc(void); ...@@ -67,7 +67,7 @@ extern int CRT_tstc(void);
extern unsigned long serial_init(int chan, void *ignored); extern unsigned long serial_init(int chan, void *ignored);
extern void serial_close(unsigned long com_port); extern void serial_close(unsigned long com_port);
extern void gunzip(void *, int, unsigned char *, int *); extern void gunzip(void *, int, unsigned char *, int *);
extern void setup_legacy(void); extern void serial_fixups(void);
struct bi_record * struct bi_record *
decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
...@@ -76,7 +76,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) ...@@ -76,7 +76,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
char *cp, ch; char *cp, ch;
struct bi_record *rec, *birecs; struct bi_record *rec, *birecs;
setup_legacy(); serial_fixups();
com_port = serial_init(0, NULL); com_port = serial_init(0, NULL);
/* assume the chunk below 8M is free */ /* assume the chunk below 8M is free */
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* trini@mvista.com * trini@mvista.com
* Derived from arch/ppc/boot/prep/head.S (Cort Dougan, many others). * Derived from arch/ppc/boot/prep/head.S (Cort Dougan, many others).
* *
* Copyright 2001 MontaVista Software Inc. * Copyright 2001-2002 MontaVista Software Inc.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
...@@ -188,10 +188,11 @@ start_ldr: ...@@ -188,10 +188,11 @@ start_ldr:
bl decompress_kernel bl decompress_kernel
/* /*
* Make sure the kernel knows we don't have things set in * Make sure the kernel knows we don't have things set in
* registers. -- Tom * registers. -- Tom
*/ */
li r4,0 li r4,0
li r5,0
li r6,0 li r6,0
/* /*
......
...@@ -75,7 +75,7 @@ extern void gunzip(void *, int, unsigned char *, int *); ...@@ -75,7 +75,7 @@ extern void gunzip(void *, int, unsigned char *, int *);
extern void _put_MSR(unsigned int val); extern void _put_MSR(unsigned int val);
extern unsigned long serial_init(int chan, void *ignored); extern unsigned long serial_init(int chan, void *ignored);
extern void setup_legacy(void); extern void serial_fixups(void);
void void
writel(unsigned int val, unsigned int address) writel(unsigned int val, unsigned int address)
...@@ -134,7 +134,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum, ...@@ -134,7 +134,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum,
int start_multi = 0; int start_multi = 0;
unsigned int pci_viddid, pci_did, tulip_pci_base, tulip_base; unsigned int pci_viddid, pci_did, tulip_pci_base, tulip_base;
setup_legacy(); serial_fixups();
#if defined(CONFIG_SERIAL_CONSOLE) #if defined(CONFIG_SERIAL_CONSOLE)
com_port = serial_init(0, NULL); com_port = serial_init(0, NULL);
#endif /* CONFIG_SERIAL_CONSOLE */ #endif /* CONFIG_SERIAL_CONSOLE */
......
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
* *
* Author: Tom Rini <trini@mvista.com> * Author: Tom Rini <trini@mvista.com>
* *
* This will go and setup ISA_io to 0xFE00000. * This will go and setup ISA_io to 0xFE00000 and return.
*/ */
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
.text .text
.globl setup_legacy .globl serial_fixups
setup_legacy: serial_fixups:
lis r3,ISA_io@h /* Load ISA_io */ lis r3,ISA_io@h /* Load ISA_io */
ori r3,r3,ISA_io@l ori r3,r3,ISA_io@l
lis r4,0xFE00 /* Load the value, 0xFE00000 */ lis r4,0xFE00 /* Load the value, 0xFE00000 */
......
...@@ -4,11 +4,12 @@ ...@@ -4,11 +4,12 @@
* Author: Tom Rini <trini@mvista.com> * Author: Tom Rini <trini@mvista.com>
* *
* This is an empty function for machines which use SERIAL_IO_MEM * This is an empty function for machines which use SERIAL_IO_MEM
* and don't need ISA_io set to anything but 0; * and don't need ISA_io set to anything but 0, or perform any other
* serial fixups.
*/ */
.text .text
.globl setup_legacy .globl serial_fixups
setup_legacy: serial_fixups:
blr blr
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
* *
* Author: Tom Rini <trini@mvista.com> * Author: Tom Rini <trini@mvista.com>
* *
* This will go and setup ISA_io to 0x8000000. * This will go and setup ISA_io to 0x8000000 and return.
*/ */
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
.text .text
.globl setup_legacy .globl serial_fixups
setup_legacy: serial_fixups:
lis r3,ISA_io@h /* Load ISA_io */ lis r3,ISA_io@h /* Load ISA_io */
ori r3,r3,ISA_io@l ori r3,r3,ISA_io@l
lis r4,0x8000 /* Load the value, 0x8000000 */ lis r4,0x8000 /* Load the value, 0x8000000 */
......
...@@ -54,7 +54,7 @@ char *bootrom_cmdline = ""; ...@@ -54,7 +54,7 @@ char *bootrom_cmdline = "";
char compiled_string[] = CONFIG_CMDLINE; char compiled_string[] = CONFIG_CMDLINE;
#endif #endif
char ramroot_string[] = "root=/dev/ram"; char ramroot_string[] = "root=/dev/ram";
char netroot_string[] = "root=/dev/nfs rw ip=auto"; char netroot_string[] = "root=/dev/nfs rw ip=on";
/* Serial port to use. */ /* Serial port to use. */
unsigned long com_port; unsigned long com_port;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment