-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
145 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
*.bin | ||
matcher | ||
uImage | ||
input/zImage | ||
input/*.dtb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#include "types.h" | ||
#include "board.h" | ||
|
||
extern __u32 _binary_input_zImage_start; | ||
extern __u32 _binary_input_raumfeld_controller_0_dtb_start; | ||
extern __u32 _binary_input_raumfeld_controller_1_dtb_start; | ||
extern __u32 _binary_input_raumfeld_controller_2_dtb_start; | ||
extern __u32 _binary_input_raumfeld_connector_0_dtb_start; | ||
extern __u32 _binary_input_raumfeld_connector_1_dtb_start; | ||
extern __u32 _binary_input_raumfeld_connector_2_dtb_start; | ||
extern __u32 _binary_input_raumfeld_speaker_0_dtb_start; | ||
extern __u32 _binary_input_raumfeld_speaker_1_dtb_start; | ||
extern __u32 _binary_input_raumfeld_speaker_2_dtb_start; | ||
|
||
static struct board boards[] = { | ||
/* Controller */ | ||
{ | ||
.machid = 2413, | ||
.system_rev = 0, | ||
.dtb = &_binary_input_raumfeld_controller_0_dtb_start, | ||
.name = "Raumfeld Controller, revision 0", | ||
}, | ||
{ | ||
.machid = 2413, | ||
.system_rev = 1, | ||
.dtb = &_binary_input_raumfeld_controller_1_dtb_start, | ||
.name = "Raumfeld Controller, revision 1", | ||
}, | ||
{ | ||
.machid = 2413, | ||
.system_rev = 2, | ||
.dtb = &_binary_input_raumfeld_controller_2_dtb_start, | ||
.name = "Raumfeld Controller, revision 2", | ||
}, | ||
|
||
/* Controller */ | ||
{ | ||
.machid = 2414, | ||
.system_rev = 0, | ||
.dtb = &_binary_input_raumfeld_connector_0_dtb_start, | ||
.name = "Raumfeld Connector, revision 0", | ||
}, | ||
{ | ||
.machid = 2414, | ||
.system_rev = 1, | ||
.dtb = &_binary_input_raumfeld_connector_1_dtb_start, | ||
.name = "Raumfeld Connector, revision 1", | ||
}, | ||
{ | ||
.machid = 2414, | ||
.system_rev = 2, | ||
.dtb = &_binary_input_raumfeld_connector_2_dtb_start, | ||
.name = "Raumfeld Connector, revision 2", | ||
}, | ||
|
||
/* Speaker */ | ||
{ | ||
.machid = 2415, | ||
.system_rev = 0, | ||
.dtb = &_binary_input_raumfeld_speaker_0_dtb_start, | ||
.name = "Raumfeld Speaker, revision 0", | ||
}, | ||
{ | ||
.machid = 2415, | ||
.system_rev = 1, | ||
.dtb = &_binary_input_raumfeld_speaker_1_dtb_start, | ||
.name = "Raumfeld Speaker, revision 1", | ||
}, | ||
{ | ||
.machid = 2415, | ||
.system_rev = 2, | ||
.dtb = &_binary_input_raumfeld_speaker_2_dtb_start, | ||
.name = "Raumfeld Speaker, revision 2", | ||
}, | ||
{ 0, 0, NULL, NULL } /* sentinel */ | ||
}; | ||
|
||
struct board *match_board(__u32 machid, __u32 revision) | ||
{ | ||
struct board *board; | ||
|
||
for (board = boards; board->machid; board++) | ||
if (board->machid == machid && board->system_rev == revision) | ||
return board; | ||
|
||
return NULL; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef _BOARD_H | ||
#define _BOARD_H | ||
|
||
struct board { | ||
__u32 machid; | ||
__u32 system_rev; | ||
void *dtb; | ||
const char *name; | ||
}; | ||
|
||
struct board *match_board(__u32 machid, __u32 revision); | ||
|
||
#endif |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
#define _TYPES_H | ||
|
||
typedef unsigned int __u32; | ||
#define NULL ((void *) 0) | ||
|
||
#endif /* _TYPES_H */ |