Message ID | 1e66851fa0a7c137afbb39a27c77d5a585b466f6.1375457714.git.jason@lakedaemon.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 08/02/2013 09:51 AM, Jason Cooper wrote: > Signed-off-by: Jason Cooper <jason@lakedaemon.net> > diff --git a/board-raumfeld.c b/board-raumfeld.c > @@ -21,19 +21,19 @@ static struct board boards[] = { > .machid = 2413, > .system_rev = 0, > .dtb = &_binary_input_raumfeld_controller_0_dtb_start, > - .name = "Raumfeld Controller, revision 0", > + .compatible = "Raumfeld Controller, revision 0", This looks a little unfortunate; those values don't look like they're the contents of the DT compatible property.
On Fri, Aug 02, 2013 at 03:52:52PM -0600, Stephen Warren wrote: > On 08/02/2013 09:51 AM, Jason Cooper wrote: > > Signed-off-by: Jason Cooper <jason@lakedaemon.net> > > > diff --git a/board-raumfeld.c b/board-raumfeld.c > > > @@ -21,19 +21,19 @@ static struct board boards[] = { > > .machid = 2413, > > .system_rev = 0, > > .dtb = &_binary_input_raumfeld_controller_0_dtb_start, > > - .name = "Raumfeld Controller, revision 0", > > + .compatible = "Raumfeld Controller, revision 0", > > This looks a little unfortunate; those values don't look like they're > the contents of the DT compatible property. Yes, this project is a week old. I figured a little volatility was allowed :-) Please see: cb0088e board-raumfeld: tweak compatible strings in: https://github.com/zonque/pxa-impedance-matcher.git I changed the api so that the user could link in a random number of dtbs _without_ hardcoding the addresses. Searching by the compatible string was the easiest way to accomplish this. Unfortunately, I didn't know his compatible strings when I made the change. For the curious, the code that does this is here: https://github.com/zonque/pxa-impedance-matcher/blob/master/dtbs.c We plan to add dtb parsing in the future so that we can change the dtb based on the atags passed by the legacy bootloader. thx, Jason.
On 03.08.2013 16:07, Jason Cooper wrote: > I changed the api so that the user could link in a random number of dtbs > _without_ hardcoding the addresses. Searching by the compatible string > was the easiest way to accomplish this. Unfortunately, I didn't know > his compatible strings when I made the change. > > For the curious, the code that does this is here: > > https://github.com/zonque/pxa-impedance-matcher/blob/master/dtbs.c > > We plan to add dtb parsing in the future so that we can change the dtb > based on the atags passed by the legacy bootloader. ... and then we can also specifically look into the compatible node of the dtb, and not just do a string search over the entire binary. But for now, it's good enough. Daniel
diff --git a/board-raumfeld.c b/board-raumfeld.c index fe51bcb..e5d4702 100644 --- a/board-raumfeld.c +++ b/board-raumfeld.c @@ -21,19 +21,19 @@ static struct board boards[] = { .machid = 2413, .system_rev = 0, .dtb = &_binary_input_raumfeld_controller_0_dtb_start, - .name = "Raumfeld Controller, revision 0", + .compatible = "Raumfeld Controller, revision 0", }, { .machid = 2413, .system_rev = 1, .dtb = &_binary_input_raumfeld_controller_1_dtb_start, - .name = "Raumfeld Controller, revision 1", + .compatible = "Raumfeld Controller, revision 1", }, { .machid = 2413, .system_rev = 2, .dtb = &_binary_input_raumfeld_controller_2_dtb_start, - .name = "Raumfeld Controller, revision 2", + .compatible = "Raumfeld Controller, revision 2", }, /* Controller */ @@ -41,19 +41,19 @@ static struct board boards[] = { .machid = 2414, .system_rev = 0, .dtb = &_binary_input_raumfeld_connector_0_dtb_start, - .name = "Raumfeld Connector, revision 0", + .compatible = "Raumfeld Connector, revision 0", }, { .machid = 2414, .system_rev = 1, .dtb = &_binary_input_raumfeld_connector_1_dtb_start, - .name = "Raumfeld Connector, revision 1", + .compatible = "Raumfeld Connector, revision 1", }, { .machid = 2414, .system_rev = 2, .dtb = &_binary_input_raumfeld_connector_2_dtb_start, - .name = "Raumfeld Connector, revision 2", + .compatible = "Raumfeld Connector, revision 2", }, /* Speaker */ @@ -61,19 +61,19 @@ static struct board boards[] = { .machid = 2415, .system_rev = 0, .dtb = &_binary_input_raumfeld_speaker_0_dtb_start, - .name = "Raumfeld Speaker, revision 0", + .compatible = "Raumfeld Speaker, revision 0", }, { .machid = 2415, .system_rev = 1, .dtb = &_binary_input_raumfeld_speaker_1_dtb_start, - .name = "Raumfeld Speaker, revision 1", + .compatible = "Raumfeld Speaker, revision 1", }, { .machid = 2415, .system_rev = 2, .dtb = &_binary_input_raumfeld_speaker_2_dtb_start, - .name = "Raumfeld Speaker, revision 2", + .compatible = "Raumfeld Speaker, revision 2", }, { 0, 0, NULL, NULL } /* sentinel */ }; diff --git a/board.h b/board.h index ec2b79e..5146db0 100644 --- a/board.h +++ b/board.h @@ -5,7 +5,7 @@ struct board { __u32 machid; __u32 system_rev; void *dtb; - const char *name; + const char *compatible; }; struct board *match_board(__u32 machid, const struct tag *); diff --git a/main.c b/main.c index 65ec9a7..8673703 100644 --- a/main.c +++ b/main.c @@ -20,7 +20,7 @@ void main(__u32 dummy, __u32 machid, const struct tag *tags) board = match_board(machid, tags); putstr("Detected board: "); - putstr(board->name); + putstr(board->compatible); putstr("\n"); putstr("Booting into Linux kernel ...\n");
Signed-off-by: Jason Cooper <jason@lakedaemon.net> --- board-raumfeld.c | 18 +++++++++--------- board.h | 2 +- main.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-)