Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
25330c60
Commit
25330c60
authored
Jul 21, 2002
by
Tom Rini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PPC32: Allow Motorola machines with PPCBUG to get their boot args from NVRAM.
parent
4872eacc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
7 deletions
+51
-7
arch/ppc/config.in
arch/ppc/config.in
+4
-0
arch/ppc/kernel/Makefile
arch/ppc/kernel/Makefile
+1
-0
arch/ppc/kernel/prep_nvram.c
arch/ppc/kernel/prep_nvram.c
+7
-2
arch/ppc/platforms/Makefile
arch/ppc/platforms/Makefile
+2
-2
arch/ppc/platforms/lopec_setup.c
arch/ppc/platforms/lopec_setup.c
+17
-0
arch/ppc/platforms/pplus_setup.c
arch/ppc/platforms/pplus_setup.c
+20
-3
No files found.
arch/ppc/config.in
View file @
25330c60
...
...
@@ -366,6 +366,10 @@ if [ "$CONFIG_ALL_PPC" = "y" ]; then
bool 'Support for RTAS (RunTime Abstraction Services) in /proc' CONFIG_PPC_RTAS
bool 'Support for PReP Residual Data' CONFIG_PREP_RESIDUAL
dep_bool ' Support for reading of PReP Residual Data in /proc' CONFIG_PROC_PREPRESIDUAL $CONFIG_PREP_RESIDUAL
define_bool CONFIG_PPCBUG_NVRAM y
fi
if [ "$CONFIG_PPLUS" = "y" -o "$CONFIG_LOPEC" = "y" ]; then
bool 'Enable reading PPCBUG NVRAM during boot' CONFIG_PPCBUG_NVRAM
fi
bool 'Default bootloader kernel arguments' CONFIG_CMDLINE_BOOL
...
...
arch/ppc/kernel/Makefile
View file @
25330c60
...
...
@@ -35,6 +35,7 @@ obj-$(CONFIG_PCI) += pci.o
ifneq
($(CONFIG_PPC_ISERIES),y)
obj-$(CONFIG_PCI)
+=
pci-dma.o
endif
obj-$(CONFIG_PPCBUG_NVRAM)
+=
prep_nvram.o
obj-$(CONFIG_KGDB)
+=
ppc-stub.o
obj-$(CONFIG_SMP)
+=
smp.o
obj-$(CONFIG_TAU)
+=
temp.o
...
...
arch/ppc/
platforms
/prep_nvram.c
→
arch/ppc/
kernel
/prep_nvram.c
View file @
25330c60
...
...
@@ -2,9 +2,14 @@
* BK Id: %F% %I% %G% %U% %#%
*/
/*
*
arch/ppc/platforms
/prep_nvram.c
*
arch/ppc/kernel
/prep_nvram.c
*
* Copyright (C) 1998 Corey Minyard
* Copyright (C) 1998 Corey Minyard
*
* This reads the NvRAM on PReP compliant machines (generally from IBM or
* Motorola). Motorola kept the format of NvRAM in their ROM, PPCBUG, the
* same, long after they had stopped producing PReP compliant machines. So
* this code is useful in those cases as well.
*
*/
#include <linux/init.h>
...
...
arch/ppc/platforms/Makefile
View file @
25330c60
...
...
@@ -32,7 +32,7 @@ endif
obj-$(CONFIG_ALL_PPC)
+=
pmac_pic.o pmac_setup.o pmac_time.o
\
pmac_feature.o pmac_pci.o chrp_setup.o
\
chrp_time.o chrp_pci.o prep_pci.o
\
prep_time.o prep_
nvram.o prep_
setup.o
prep_time.o prep_setup.o
ifeq
($(CONFIG_ALL_PPC),y)
obj-$(CONFIG_NVRAM)
+=
pmac_nvram.o
endif
...
...
@@ -50,7 +50,7 @@ obj-$(CONFIG_MENF1) += menf1_setup.o menf1_pci.o
obj-$(CONFIG_MVME5100)
+=
mvme5100_setup.o mvme5100_pci.o
obj-$(CONFIG_PCORE)
+=
pcore_setup.o pcore_pci.o
obj-$(CONFIG_POWERPMC250)
+=
powerpmc250.o
obj-$(CONFIG_PPLUS)
+=
pplus_pci.o pplus_setup.o
prep_nvram.o
obj-$(CONFIG_PPLUS)
+=
pplus_pci.o pplus_setup.o
obj-$(CONFIG_PRPMC750)
+=
prpmc750_setup.o prpmc750_pci.o
obj-$(CONFIG_PRPMC800)
+=
prpmc800_setup.o prpmc800_pci.o
obj-$(CONFIG_SANDPOINT)
+=
sandpoint_setup.o sandpoint_pci.o
...
...
arch/ppc/platforms/lopec_setup.c
View file @
25330c60
...
...
@@ -33,7 +33,9 @@
#include <asm/bootinfo.h>
#include <asm/mpc10x.h>
#include <asm/hw_irq.h>
#include <asm/prep_nvram.h>
extern
char
saved_command_line
[];
extern
void
lopec_find_bridges
(
void
);
/*
...
...
@@ -333,6 +335,21 @@ lopec_setup_arch(void)
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp
=
&
dummy_con
;
#endif
#ifdef CONFIG_PPCBUG_NVRAM
/* Read in NVRAM data */
init_prep_nvram
();
/* if no bootargs, look in NVRAM */
if
(
cmd_line
[
0
]
==
'\0'
)
{
char
*
bootargs
;
bootargs
=
prep_nvram_get_var
(
"bootargs"
);
if
(
bootargs
!=
NULL
)
{
strcpy
(
cmd_line
,
bootargs
);
/* again.. */
strcpy
(
saved_command_line
,
cmd_line
);
}
}
#endif
}
void
__init
...
...
arch/ppc/platforms/pplus_setup.c
View file @
25330c60
...
...
@@ -9,7 +9,7 @@
* Cort Dougan, Johnnie Peters, Matt Porter, and
* Troy Benjegerdes.
*
* Copyright 2001 MontaVista Software Inc.
* Copyright 2001
-2002
MontaVista Software Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
...
...
@@ -77,8 +77,9 @@
TODC_ALLOC
();
extern
void
pplus_setup_hose
(
void
)
;
extern
char
saved_command_line
[]
;
extern
void
pplus_setup_hose
(
void
);
extern
void
pplus_set_VIA_IDE_native
(
void
);
extern
unsigned
long
loops_per_jiffy
;
...
...
@@ -132,7 +133,8 @@ pplus_setup_arch(void)
ROOT_DEV
=
Root_SDA2
;
#endif
printk
(
"PowerPlus port (C) 2001 MontaVista Software, Inc. (source@mvista.com)
\n
"
);
printk
(
KERN_INFO
"Motorola PowerPlus Platform
\n
"
);
printk
(
KERN_INFO
"Port by MontaVista Software, Inc. (source@mvista.com)
\n
"
);
if
(
ppc_md
.
progress
)
ppc_md
.
progress
(
"pplus_setup_arch: raven_init
\n
"
,
0
);
...
...
@@ -145,6 +147,21 @@ pplus_setup_arch(void)
conswitchp
=
&
vga_con
;
#elif defined(CONFIG_DUMMY_CONSOLE)
conswitchp
=
&
dummy_con
;
#endif
#ifdef CONFIG_PPCBUG_NVRAM
/* Read in NVRAM data */
init_prep_nvram
();
/* if no bootargs, look in NVRAM */
if
(
cmd_line
[
0
]
==
'\0'
)
{
char
*
bootargs
;
bootargs
=
prep_nvram_get_var
(
"bootargs"
);
if
(
bootargs
!=
NULL
)
{
strcpy
(
cmd_line
,
bootargs
);
/* again.. */
strcpy
(
saved_command_line
,
cmd_line
);
}
}
#endif
if
(
ppc_md
.
progress
)
ppc_md
.
progress
(
"pplus_setup_arch: exit
\n
"
,
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment