@@ -144,12 +144,15 @@ static uint32_t vof_finddevice(const void *fdt, uint32_t nodeaddr)
char fullnode[VOF_MAX_PATH];
uint32_t ret = -1;
int offset;
+ gchar *p;
if (readstr(nodeaddr, fullnode, sizeof(fullnode))) {
return (uint32_t) ret;
}
- offset = fdt_path_offset(fdt, fullnode);
+ p = g_ascii_strdown(fullnode, -1);
+ offset = fdt_path_offset(fdt, p);
+ g_free(p);
if (offset >= 0) {
ret = fdt_get_phandle(fdt, offset);
}
@@ -160,14 +163,14 @@ static uint32_t vof_finddevice(const void *fdt, uint32_t nodeaddr)
static const void *getprop(const void *fdt, int nodeoff, const char *propname,
int *proplen, bool *write0)
{
- const char *unit, *prop;
+ const char *unit, *prop = fdt_getprop(fdt, nodeoff, propname, proplen);
/*
* The "name" property is not actually stored as a property in the FDT,
* we emulate it by returning a pointer to the node's name and adjust
* proplen to include only the name but not the unit.
*/
- if (strcmp(propname, "name") == 0) {
+ if (!prop && strcmp(propname, "name") == 0) {
prop = fdt_get_name(fdt, nodeoff, proplen);
if (!prop) {
*proplen = 0;
@@ -193,7 +196,7 @@ static const void *getprop(const void *fdt, int nodeoff, const char *propname,
if (write0) {
*write0 = false;
}
- return fdt_getprop(fdt, nodeoff, propname, proplen);
+ return prop;
}
static uint32_t vof_getprop(const void *fdt, uint32_t nodeph, uint32_t pname,
GIT binary patch
delta 14
VcmX>hdqQ@D4kKgpW?jbFyZ|U11hoJF
delta 14
VcmX>hdqQ@D4kP31&AN=Uc>yYn1swnY
@@ -30,7 +30,7 @@ ENTRY(_prom_entry)
bl prom_entry
nop
mtlr %r31
- ld %r31,104(%r1)
+ lwz %r31,104(%r1)
addi %r1,%r1,112
blr
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> --- hw/ppc/vof.c | 11 +++++++---- pc-bios/vof.bin | Bin 3784 -> 3784 bytes pc-bios/vof/entry.S | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-)