forked from luck/tmp_suning_uos_patched
Devicetree fixes for 4.19, part 3:
- Fix DT unittest on Oldworld MAC systems -----BEGIN PGP SIGNATURE----- iQJEBAABCgAuFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAlu95pgQHHJvYmhAa2Vy bmVsLm9yZwAKCRD6+121jbxhwxHjEACgsFN0hQTsM4EKWN2kXRrDH5S5amXLa787 rI+tbdKDUkKTk94Ue+8Gm681Y9Euhecd3rMkZ4D+v0s63hbvxZV6DawuVE0ifhX9 K5x2Ara592rkMs4GT9GLysjWwJ6c7mV1yJdzZnsqzVSXTkMYIBUf1MI8i8nLFet2 8BnOt8sLKE8NJ3VwgDgb4hrF2tSZyl8UD/Bdn2AKPAZ6hKFW1ZL1ef0OZq7EoiLS W3/2XM8Z0Ti7HuONyWxP+GhBkQOcxkuBRui4L1MkFXb4ENyfJEh9uZ+dz/hoXORI y6WtNIGaOFFCGbT0IvFqqPly29JNchIAhG4B6MsLVHtg1wgOJ0z9iL4AZkIQJ+/B GB0+ApcQk6cFvEe0EunqSZgoV6SuVLni5dUlmLAbm6mlUtbHNUjlW9o4DBv7uB0n F6Rh0ruXm5VbLildpHXi6WcP7ijT03mbB4B9PRVC+ve9S8sKU1T3u7V2pUdOIerX Xmh0dIPrCWMPvNSMUeYJr14gYutS9slTUKz50GH9pwHK8IdsOsps8TuIGrIHeiiP 8D3fF+Tn1DHcj6yYWI/vHW8JX2RsVq9AlY3MybU7dk13uSyEPDEu8tkjlpBDn+P2 vvrepGynAm021otLLtfMx1DiuyUdhqt4aK9nc5YhjJkPY0PFjyEb3Jqv48DXKQFD WKRthDIXSg== =bQuC -----END PGP SIGNATURE----- Merge tag 'devicetree-fixes-for-4.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Rob writes: "Devicetree fixes for 4.19, part 3: - Fix DT unittest on Oldworld MAC systems" * tag 'devicetree-fixes-for-4.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: unittest: Disable interrupt node tests for old world MAC systems
This commit is contained in:
commit
f7e59f3895
|
@ -771,6 +771,9 @@ static void __init of_unittest_parse_interrupts(void)
|
|||
struct of_phandle_args args;
|
||||
int i, rc;
|
||||
|
||||
if (of_irq_workarounds & OF_IMAP_OLDWORLD_MAC)
|
||||
return;
|
||||
|
||||
np = of_find_node_by_path("/testcase-data/interrupts/interrupts0");
|
||||
if (!np) {
|
||||
pr_err("missing testcase data\n");
|
||||
|
@ -845,6 +848,9 @@ static void __init of_unittest_parse_interrupts_extended(void)
|
|||
struct of_phandle_args args;
|
||||
int i, rc;
|
||||
|
||||
if (of_irq_workarounds & OF_IMAP_OLDWORLD_MAC)
|
||||
return;
|
||||
|
||||
np = of_find_node_by_path("/testcase-data/interrupts/interrupts-extended0");
|
||||
if (!np) {
|
||||
pr_err("missing testcase data\n");
|
||||
|
@ -1001,15 +1007,19 @@ static void __init of_unittest_platform_populate(void)
|
|||
pdev = of_find_device_by_node(np);
|
||||
unittest(pdev, "device 1 creation failed\n");
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
unittest(irq == -EPROBE_DEFER, "device deferred probe failed - %d\n", irq);
|
||||
if (!(of_irq_workarounds & OF_IMAP_OLDWORLD_MAC)) {
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
unittest(irq == -EPROBE_DEFER,
|
||||
"device deferred probe failed - %d\n", irq);
|
||||
|
||||
/* Test that a parsing failure does not return -EPROBE_DEFER */
|
||||
np = of_find_node_by_path("/testcase-data/testcase-device2");
|
||||
pdev = of_find_device_by_node(np);
|
||||
unittest(pdev, "device 2 creation failed\n");
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
unittest(irq < 0 && irq != -EPROBE_DEFER, "device parsing error failed - %d\n", irq);
|
||||
/* Test that a parsing failure does not return -EPROBE_DEFER */
|
||||
np = of_find_node_by_path("/testcase-data/testcase-device2");
|
||||
pdev = of_find_device_by_node(np);
|
||||
unittest(pdev, "device 2 creation failed\n");
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
unittest(irq < 0 && irq != -EPROBE_DEFER,
|
||||
"device parsing error failed - %d\n", irq);
|
||||
}
|
||||
|
||||
np = of_find_node_by_path("/testcase-data/platform-tests");
|
||||
unittest(np, "No testcase data in device tree\n");
|
||||
|
|
Loading…
Reference in New Issue
Block a user