diff options
Diffstat (limited to 'arch/powerpc/kernel/legacy_serial.c')
-rw-r--r-- | arch/powerpc/kernel/legacy_serial.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index 325f490a10cc..63dd2c3ad95e 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c | |||
@@ -44,12 +44,12 @@ static int __init add_legacy_port(struct device_node *np, int want_index, | |||
44 | int index; | 44 | int index; |
45 | 45 | ||
46 | /* get clock freq. if present */ | 46 | /* get clock freq. if present */ |
47 | clk = get_property(np, "clock-frequency", NULL); | 47 | clk = of_get_property(np, "clock-frequency", NULL); |
48 | if (clk && *clk) | 48 | if (clk && *clk) |
49 | clock = *clk; | 49 | clock = *clk; |
50 | 50 | ||
51 | /* get default speed if present */ | 51 | /* get default speed if present */ |
52 | spd = get_property(np, "current-speed", NULL); | 52 | spd = of_get_property(np, "current-speed", NULL); |
53 | 53 | ||
54 | /* If we have a location index, then try to use it */ | 54 | /* If we have a location index, then try to use it */ |
55 | if (want_index >= 0 && want_index < MAX_LEGACY_SERIAL_PORTS) | 55 | if (want_index >= 0 && want_index < MAX_LEGACY_SERIAL_PORTS) |
@@ -121,11 +121,11 @@ static int __init add_legacy_soc_port(struct device_node *np, | |||
121 | /* We only support ports that have a clock frequency properly | 121 | /* We only support ports that have a clock frequency properly |
122 | * encoded in the device-tree. | 122 | * encoded in the device-tree. |
123 | */ | 123 | */ |
124 | if (get_property(np, "clock-frequency", NULL) == NULL) | 124 | if (of_get_property(np, "clock-frequency", NULL) == NULL) |
125 | return -1; | 125 | return -1; |
126 | 126 | ||
127 | /* if rtas uses this device, don't try to use it as well */ | 127 | /* if rtas uses this device, don't try to use it as well */ |
128 | if (get_property(np, "used-by-rtas", NULL) != NULL) | 128 | if (of_get_property(np, "used-by-rtas", NULL) != NULL) |
129 | return -1; | 129 | return -1; |
130 | 130 | ||
131 | /* Get the address */ | 131 | /* Get the address */ |
@@ -157,7 +157,7 @@ static int __init add_legacy_isa_port(struct device_node *np, | |||
157 | DBG(" -> add_legacy_isa_port(%s)\n", np->full_name); | 157 | DBG(" -> add_legacy_isa_port(%s)\n", np->full_name); |
158 | 158 | ||
159 | /* Get the ISA port number */ | 159 | /* Get the ISA port number */ |
160 | reg = get_property(np, "reg", NULL); | 160 | reg = of_get_property(np, "reg", NULL); |
161 | if (reg == NULL) | 161 | if (reg == NULL) |
162 | return -1; | 162 | return -1; |
163 | 163 | ||
@@ -168,7 +168,7 @@ static int __init add_legacy_isa_port(struct device_node *np, | |||
168 | /* Now look for an "ibm,aix-loc" property that gives us ordering | 168 | /* Now look for an "ibm,aix-loc" property that gives us ordering |
169 | * if any... | 169 | * if any... |
170 | */ | 170 | */ |
171 | typep = get_property(np, "ibm,aix-loc", NULL); | 171 | typep = of_get_property(np, "ibm,aix-loc", NULL); |
172 | 172 | ||
173 | /* If we have a location index, then use it */ | 173 | /* If we have a location index, then use it */ |
174 | if (typep && *typep == 'S') | 174 | if (typep && *typep == 'S') |
@@ -206,7 +206,7 @@ static int __init add_legacy_pci_port(struct device_node *np, | |||
206 | * compatible UARTs on PCI need all sort of quirks (port offsets | 206 | * compatible UARTs on PCI need all sort of quirks (port offsets |
207 | * etc...) that this code doesn't know about | 207 | * etc...) that this code doesn't know about |
208 | */ | 208 | */ |
209 | if (get_property(np, "clock-frequency", NULL) == NULL) | 209 | if (of_get_property(np, "clock-frequency", NULL) == NULL) |
210 | return -1; | 210 | return -1; |
211 | 211 | ||
212 | /* Get the PCI address. Assume BAR 0 */ | 212 | /* Get the PCI address. Assume BAR 0 */ |
@@ -232,7 +232,7 @@ static int __init add_legacy_pci_port(struct device_node *np, | |||
232 | * we get to their "reg" property | 232 | * we get to their "reg" property |
233 | */ | 233 | */ |
234 | if (np != pci_dev) { | 234 | if (np != pci_dev) { |
235 | const u32 *reg = get_property(np, "reg", NULL); | 235 | const u32 *reg = of_get_property(np, "reg", NULL); |
236 | if (reg && (*reg < 4)) | 236 | if (reg && (*reg < 4)) |
237 | index = lindex = *reg; | 237 | index = lindex = *reg; |
238 | } | 238 | } |
@@ -296,7 +296,7 @@ void __init find_legacy_serial_ports(void) | |||
296 | DBG(" -> find_legacy_serial_port()\n"); | 296 | DBG(" -> find_legacy_serial_port()\n"); |
297 | 297 | ||
298 | /* Now find out if one of these is out firmware console */ | 298 | /* Now find out if one of these is out firmware console */ |
299 | path = get_property(of_chosen, "linux,stdout-path", NULL); | 299 | path = of_get_property(of_chosen, "linux,stdout-path", NULL); |
300 | if (path != NULL) { | 300 | if (path != NULL) { |
301 | stdout = of_find_node_by_path(path); | 301 | stdout = of_find_node_by_path(path); |
302 | if (stdout) | 302 | if (stdout) |
@@ -529,7 +529,7 @@ static int __init check_legacy_serial_console(void) | |||
529 | } | 529 | } |
530 | /* We are getting a weird phandle from OF ... */ | 530 | /* We are getting a weird phandle from OF ... */ |
531 | /* ... So use the full path instead */ | 531 | /* ... So use the full path instead */ |
532 | name = get_property(of_chosen, "linux,stdout-path", NULL); | 532 | name = of_get_property(of_chosen, "linux,stdout-path", NULL); |
533 | if (name == NULL) { | 533 | if (name == NULL) { |
534 | DBG(" no linux,stdout-path !\n"); | 534 | DBG(" no linux,stdout-path !\n"); |
535 | return -ENODEV; | 535 | return -ENODEV; |
@@ -541,12 +541,12 @@ static int __init check_legacy_serial_console(void) | |||
541 | } | 541 | } |
542 | DBG("stdout is %s\n", prom_stdout->full_name); | 542 | DBG("stdout is %s\n", prom_stdout->full_name); |
543 | 543 | ||
544 | name = get_property(prom_stdout, "name", NULL); | 544 | name = of_get_property(prom_stdout, "name", NULL); |
545 | if (!name) { | 545 | if (!name) { |
546 | DBG(" stdout package has no name !\n"); | 546 | DBG(" stdout package has no name !\n"); |
547 | goto not_found; | 547 | goto not_found; |
548 | } | 548 | } |
549 | spd = get_property(prom_stdout, "current-speed", NULL); | 549 | spd = of_get_property(prom_stdout, "current-speed", NULL); |
550 | if (spd) | 550 | if (spd) |
551 | speed = *spd; | 551 | speed = *spd; |
552 | 552 | ||