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
Kirill Smelkov
linux
Commits
66ac283c
Commit
66ac283c
authored
Jan 18, 2004
by
Andrew Morton
Committed by
Linus Torvalds
Jan 18, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sn: Support for the LCD
From: Pat Gefre <pfg@sgi.com> Support for the LCD
parent
fb7c5f7b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletion
+35
-1
arch/ia64/sn/io/sn2/klconflib.c
arch/ia64/sn/io/sn2/klconflib.c
+34
-1
include/asm-ia64/sn/module.h
include/asm-ia64/sn/module.h
+1
-0
No files found.
arch/ia64/sn/io/sn2/klconflib.c
View file @
66ac283c
...
...
@@ -484,6 +484,23 @@ board_serial_number_get(lboard_t *board,char *serial_number)
/*
* Format a module id for printing.
*
* There are three possible formats:
*
* MODULE_FORMAT_BRIEF is the brief 6-character format, including
* the actual brick-type as recorded in the
* moduleid_t, eg. 002c15 for a C-brick, or
* 101#17 for a PX-brick.
*
* MODULE_FORMAT_LONG is the hwgraph format, eg. rack/002/bay/15
* of rack/101/bay/17 (note that the brick
* type does not appear in this format).
*
* MODULE_FORMAT_LCD is like MODULE_FORMAT_BRIEF, except that it
* ensures that the module id provided appears
* exactly as it would on the LCD display of
* the corresponding brick, eg. still 002c15
* for a C-brick, but 101p17 for a PX-brick.
*/
void
format_module_id
(
char
*
buffer
,
moduleid_t
m
,
int
fmt
)
...
...
@@ -495,9 +512,25 @@ format_module_id(char *buffer, moduleid_t m, int fmt)
ASSERT
(
MODULE_GET_BTYPE
(
m
)
<
MAX_BRICK_TYPES
);
brickchar
=
MODULE_GET_BTCHAR
(
m
);
if
(
fmt
==
MODULE_FORMAT_LCD
)
{
/* Be sure we use the same brick type character as displayed
* on the brick's LCD
*/
switch
(
brickchar
)
{
case
L1_BRICKTYPE_PX
:
brickchar
=
L1_BRICKTYPE_P
;
break
;
case
L1_BRICKTYPE_IX
:
brickchar
=
L1_BRICKTYPE_I
;
break
;
}
}
position
=
MODULE_GET_BPOS
(
m
);
if
(
fmt
==
MODULE_FORMAT_BRIEF
)
{
if
(
(
fmt
==
MODULE_FORMAT_BRIEF
)
||
(
fmt
==
MODULE_FORMAT_LCD
)
)
{
/* Brief module number format, eg. 002c15 */
/* Decompress the rack number */
...
...
include/asm-ia64/sn/module.h
View file @
66ac283c
...
...
@@ -30,6 +30,7 @@ extern "C" {
/* parameter for format_module_id() */
#define MODULE_FORMAT_BRIEF 1
#define MODULE_FORMAT_LONG 2
#define MODULE_FORMAT_LCD 3
/*
* Module id format
...
...
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