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
e1a4e469
Commit
e1a4e469
authored
Jul 03, 2006
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] Malta: Fix build of certain configs.
parent
6fe725c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
24 deletions
+26
-24
arch/mips/mips-boards/generic/memory.c
arch/mips/mips-boards/generic/memory.c
+26
-24
No files found.
arch/mips/mips-boards/generic/memory.c
View file @
e1a4e469
...
...
@@ -47,43 +47,45 @@ static char *mtypes[3] = {
};
#endif
/* determined physical memory size, not overridden by command line args */
unsigned
long
physical_memsize
=
0L
;
struct
prom_pmemblock
*
__init
prom_getmdesc
(
void
)
{
char
*
memsize_str
;
unsigned
int
memsize
;
char
cmdline
[
CL_SIZE
],
*
ptr
;
/* Check the command line first for a memsize directive */
strcpy
(
cmdline
,
arcs_cmdline
);
ptr
=
strstr
(
cmdline
,
"memsize="
);
if
(
ptr
&&
(
ptr
!=
cmdline
)
&&
(
*
(
ptr
-
1
)
!=
' '
))
ptr
=
strstr
(
ptr
,
" memsize="
);
if
(
ptr
)
{
memsize
=
memparse
(
ptr
+
8
,
&
ptr
);
}
else
{
/* otherwise look in the environment */
memsize_str
=
prom_getenv
(
"memsize"
);
if
(
!
memsize_str
)
{
prom_printf
(
"memsize not set in boot prom, set to default (32Mb)
\n
"
);
memsize
=
0x02000000
;
}
else
{
/* otherwise look in the environment */
memsize_str
=
prom_getenv
(
"memsize"
);
if
(
!
memsize_str
)
{
prom_printf
(
"memsize not set in boot prom, set to default (32Mb)
\n
"
);
physical_memsize
=
0x02000000
;
}
else
{
#ifdef DEBUG
prom_printf
(
"prom_memsize = %s
\n
"
,
memsize_str
);
prom_printf
(
"prom_memsize = %s
\n
"
,
memsize_str
);
#endif
memsize
=
simple_strtol
(
memsize_str
,
NULL
,
0
);
}
physical_memsize
=
simple_strtol
(
memsize_str
,
NULL
,
0
);
}
#ifdef CONFIG_CPU_BIG_ENDIAN
/*
* SOC-it swaps, or perhaps doesn't swap, when DMA'ing the last
* word of physical memory
*/
memsize
-=
PAGE_SIZE
;
/* SOC-it swaps, or perhaps doesn't swap, when DMA'ing the last
word of physical memory */
physical_memsize
-=
PAGE_SIZE
;
#endif
/* Check the command line for a memsize directive that overrides
the physical/default amount */
strcpy
(
cmdline
,
arcs_cmdline
);
ptr
=
strstr
(
cmdline
,
"memsize="
);
if
(
ptr
&&
(
ptr
!=
cmdline
)
&&
(
*
(
ptr
-
1
)
!=
' '
))
ptr
=
strstr
(
ptr
,
" memsize="
);
if
(
ptr
)
memsize
=
memparse
(
ptr
+
8
,
&
ptr
);
else
memsize
=
physical_memsize
;
memset
(
mdesc
,
0
,
sizeof
(
mdesc
));
mdesc
[
0
].
type
=
yamon_dontuse
;
...
...
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