Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building a device tree to run a Linux kernel on a Rockchip rk3288 board #130

Open
aicastell opened this issue Nov 9, 2018 · 1 comment

Comments

@aicastell
Copy link

aicastell commented Nov 9, 2018

I am trying to run a Linux kernel on a Rockchip rk3288 board.

This boards runs a native Android kernel. I extracted the Device Tree Source (DTS) from Android to use it as reference to build a custom DTS for the Linux kernel, following this steps:

$ mkdir /tmp/dtb
$ adb pull /proc/device-tree/ /tmp/dtb
$ dtc -I fs -O dts /tmp/dtb/ > /tmp/android.dts

Using android.dts as a basis I am trying to write a custom linux.dts to run Linux kernel 4.4.103 on my board. Linux kernel sources can be downloaded from this repo:

$ git clone git://github.com/rockchip-linux/kernel.git

Using my custom linux.dts the Linux kernel boots, it mounts a root filesystem fine, the login (serial) console appears, and even the ethernet device works as expected.

But I have power problems with the USB-OTG and with the mini-pci-e. Using a multimeter checked the USB-OTG connector receives 0V when running my Linux kernel, but it receives 4.8V when running the Android kernel. Also, the mini-pci-e receives 0V when running the Linux kernel, but it received 3.75V when running the Android kernel.

I don't know what GPIO lines should be managed to enable power on these two devices. My experience working device trees is quite limited, so any advice with this could be really helpful. Thanks a lot in advance! :)

This is the current linux.dts version:

/dts-v1/;
#include <dt-bindings/clock/rockchip,rk808.h>
#include "rk3288.dtsi"
/ {
    model = "Linux RK3288";
    compatible = "rockchip,rk3288-merrii-k2", "rockchip,rk3288";
    memory {
        reg = <0x0 0x0 0x0 0x80000000>;
        device_type = "memory";
    };
    ext_gmac: external-gmac-clock {
        compatible = "fixed-clock";
        #clock-cells = <0>;
        clock-frequency = <125000000>;
        clock-output-names = "ext_gmac";
    };
    sdio_pwrseq: sdio-pwrseq {
        compatible = "mmc-pwrseq-simple";
        clocks = <&rk808 RK808_CLKOUT1>;
        clock-names = "ext_clock";
        pinctrl-names = "default";
        pinctrl-0 = <&wifi_enable_h>;
        reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
    };
    vcc_5v: usb-regulator {
        compatible = "regulator-fixed";
        regulator-name = "vcc_5v";
        regulator-min-microvolt = <5000000>;
        regulator-max-microvolt = <5000000>;
        regulator-always-on;
        regulator-boot-on;
        vin-supply = <&vcc_sys>;
    };
    vcc_host_5v: usb-host-regulator {
        compatible = "regulator-fixed";
        enable-active-high;
        gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&host_vbus_drv>;
        regulator-name = "vcc_host_5v";
        regulator-min-microvolt = <5000000>;
        regulator-max-microvolt = <5000000>;
        regulator-always-on;
        vin-supply = <&vcc_5v>;
    };
    vcc_otg_5v: usb-otg-regulator {
        compatible = "regulator-fixed";
        enable-active-high;
        gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&otg_vbus_drv>;
        regulator-name = "vcc_otg_5v";
        regulator-min-microvolt = <5000000>;
        regulator-max-microvolt = <5000000>;
        regulator-always-on;
        vin-supply = <&vcc_5v>;
    };
    vcc_sys: vsys-regulator {
        compatible = "regulator-fixed";
        regulator-name = "vcc_sys";
        regulator-min-microvolt = <5000000>;
        regulator-max-microvolt = <5000000>;
        regulator-always-on;
        regulator-boot-on;
    };
    usb_control {
        compatible = "rockchip,rk3288-usb-control";
        host_drv_gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
        otg_drv_gpio = <&gpio0 12 GPIO_ACTIVE_LOW>;
        rockchip,remote_wakeup;
        rockchip,usb_irq_wakeup;
    };
};
&hdmi {
    status = "okay";
    rockchip,cec_enable = <0>;
    rockchip,hdcp_enable = <0>;
    rockchip,defaultmode = <16>;
};
&dmc {
    status = "okay";
};
&cpu0 {
    cpu0-supply = <&vdd_cpu>;
    enable-method = "psci";
};
&cpu1 {
    enable-method = "psci";
};
&cpu2 {
    enable-method = "psci";
};
&cpu3 {
    enable-method = "psci";
};
&pwm0 {
    status = "okay";
};
&pwm1 {
    status = "okay";
};
&emmc {
    bus-width = <8>;
    cap-mmc-highspeed;
    disable-wp;
    non-removable;
    num-slots = <1>;
    pinctrl-names = "default";
    pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
    status = "okay";
};
&sdmmc {
    bus-width = <4>;
    cap-mmc-highspeed;
    cap-sd-highspeed;
    card-detect-delay = <200>;
    disable-wp;
    num-slots = <1>;
    pinctrl-names = "default";
    pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
    status = "okay";
    supports-sd;
    vmmc-supply = <&vcc_sd>;
    vqmmc-supply = <&vccio_sd>;
};
&sdio0 {
    status = "okay";
    clock-frequency = <50000000>;
    clock-freq-min-max = <200000 50000000>;
    bus-width = <4>;
    cap-sd-highspeed;
    cap-sdio-irq;
    disable-wp;
    keep-power-in-suspend;
    mmc-pwrseq = <&sdio_pwrseq>;
    non-removable;
    num-slots = <1>;
    pinctrl-names = "default";
    pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
    supports-sdio;
};
&gmac {
    assigned-clocks = <&cru SCLK_MAC>;
    assigned-clock-parents = <&ext_gmac>;
    clock_in_out = "input";
    pinctrl-names = "default";
    pinctrl-0 = <&rmii_pins>;
    phy-supply = <&vcc_lan>;
    phy-mode = "rmii";
    rx_delay = <0x20>;
    tx_delay = <0x30>;
    status = "okay";
    snps,reset-gpio = <&gpio4 7 0>;
};
&gpu {
    mali-supply = <&vdd_gpu>;
    status = "okay";
};
&hevc_service {
    status = "okay";
};
&i2c0 {
    status = "okay";
    clock-frequency = <400000>;
    rk808: pmic@1b {
        compatible = "rockchip,rk808";
        reg = <0x1b>;
        status = "okay";
        interrupt-parent = <&gpio0>;
        interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
        #clock-cells = <1>;
        clock-output-names = "rk808-clkout1", "rk808-clkout2";
        pinctrl-names = "default";
        pinctrl-0 = <&pmic_int &global_pwroff>;
        rockchip,system-power-controller;
        wakeup-source;
        vcc1-supply = <&vcc_sys>;
        vcc2-supply = <&vcc_sys>;
        vcc3-supply = <&vcc_sys>;
        vcc4-supply = <&vcc_sys>;
        vcc6-supply = <&vcc_sys>;
        vcc7-supply = <&vcc_sys>;
        vcc8-supply = <&vcc_io>;
        vcc9-supply = <&vcc_io>;
        vcc10-supply = <&vcc_io>;
        vcc11-supply = <&vcc_io>;
        vcc12-supply = <&vcc_io>;
        vddio-supply = <&vcc_io>;
        regulators {
            vdd_cpu: DCDC_REG1 {
                regulator-always-on;
                regulator-boot-on;
                regulator-min-microvolt = <900000>;
                regulator-max-microvolt = <1500000>;
                regulator-name = "vdd_arm";
                regulator-state-mem {
                    regulator-off-in-suspend;
                };
            };
            vdd_gpu: DCDC_REG2 {
                regulator-always-on;
                regulator-boot-on;
                regulator-min-microvolt = <900000>;
                regulator-max-microvolt = <1500000>;
                regulator-name = "vdd_gpu";
                regulator-ramp-delay = <6000>;
                regulator-state-mem {
                    regulator-on-in-suspend;
                    regulator-suspend-microvolt = <1100000>;
                };
            };
            vcc_ddr: DCDC_REG3 {
                regulator-always-on;
                regulator-boot-on;
                regulator-name = "vcc_ddr";
                regulator-state-mem {
                    regulator-on-in-suspend;
                };
            };
            vcc_io: DCDC_REG4 {
                regulator-always-on;
                regulator-boot-on;
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
                regulator-name = "vcc_io";
                regulator-state-mem {
                    regulator-on-in-suspend;
                    regulator-suspend-microvolt = <3300000>;
                };
            };
            vccio_pmu: LDO_REG1 {
                regulator-always-on;
                regulator-boot-on;
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
                regulator-name = "vccio_pmu";
                regulator-state-mem {
                    regulator-on-in-suspend;
                    regulator-suspend-microvolt = <3300000>;
                };
            };
            vcca_33: LDO_REG2 {
                regulator-always-on;
                regulator-boot-on;
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
                regulator-name = "vcca_33";
                regulator-state-mem {
                    regulator-off-in-suspend;
                };
            };
            vdd_10: LDO_REG3 {
                regulator-always-on;
                regulator-boot-on;
                regulator-min-microvolt = <1000000>;
                regulator-max-microvolt = <1000000>;
                regulator-name = "vdd_10";
                regulator-state-mem {
                    regulator-on-in-suspend;
                    regulator-suspend-microvolt = <1000000>;
                };
            };
            vcc_wl: LDO_REG4 {
                regulator-always-on;
                regulator-boot-on;
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <1800000>;
                regulator-name = "vcc_wl";
                regulator-state-mem {
                    regulator-on-in-suspend;
                    regulator-suspend-microvolt = <1800000>;
                };
            };
            vccio_sd: LDO_REG5 {
                regulator-always-on;
                regulator-boot-on;
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <3300000>;
                regulator-name = "vccio_sd";
                regulator-state-mem {
                    regulator-on-in-suspend;
                    regulator-suspend-microvolt = <3300000>;
                };
            };
            vdd10_lcd: LDO_REG6 {
                regulator-always-on;
                regulator-boot-on;
                regulator-min-microvolt = <1000000>;
                regulator-max-microvolt = <1000000>;
                regulator-name = "vdd10_lcd";
                regulator-state-mem {
                    regulator-on-in-suspend;
                    regulator-suspend-microvolt = <1000000>;
                };
            };
            vcc_18: LDO_REG7 {
                regulator-always-on;
                regulator-boot-on;
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <1800000>;
                regulator-name = "vcc_18";
                regulator-state-mem {
                    regulator-on-in-suspend;
                    regulator-suspend-microvolt = <1800000>;
                };
            };
            vcc18_lcd: LDO_REG8 {
                regulator-always-on;
                regulator-boot-on;
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <1800000>;
                regulator-name = "vcc18_lcd";
                regulator-state-mem {
                    regulator-on-in-suspend;
                    regulator-suspend-microvolt = <1800000>;
                };
            };
            vcc_sd: SWITCH_REG1 {
                regulator-always-on;
                regulator-boot-on;
                regulator-name = "vcc_sd";
                regulator-state-mem {
                    regulator-on-in-suspend;
                };
            };
            vcc_lan: SWITCH_REG2 {
                regulator-always-on;
                regulator-boot-on;
                regulator-name = "vcc_lan";
                regulator-state-mem {
                    regulator-on-in-suspend;
                };
            };
        };
    };
};
&i2c1 {
    status = "okay";
};
&i2c2 {
    status = "okay";
};
&i2c3 {
    status = "okay";
};
&i2c4 {
    status = "okay";
};
&i2c5 {
    status = "disabled";
};
&i2s {
    #sound-dai-cells = <0>;
    status = "okay";
};
&io_domains {
    status = "okay";
};
&uart0 {
    status = "okay";
};
&uart1 {
    status = "okay";
};
&uart2 {
    status = "okay";
};
&uart3 {
    status = "okay";
};
&uart4 {
    status = "okay";
};
&usbphy {
    status = "okay";
};
&usb_host0_ehci {
    status = "okay";
    compatible = "rockchip,rk3288_rk_ehci_host";
};
&usb_host0_ohci {
    status = "okay";
};
&usb_host1 {
    status = "okay";
};
&usb_otg {
    status = "okay";
};
&vopb {
    status = "okay";
};
&vopb_mmu {
    status = "okay";
};
&vopl {
    status = "okay";
};
&vopl_mmu {
    status = "okay";
};
&vpu_service {
    status = "okay";
};
&wdt {
    status = "okay";
};
&pinctrl {
    pcfg_output_high: pcfg-output-high {
        output-high;
    };
    pcfg_output_low: pcfg-output-low {
        output-low;
    };
    pmic {
        pmic_int: pmic-int {
            rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
        };
    };
    sdio-pwrseq {
        wifi_enable_h: wifi-enable-h {
            rockchip,pins = <RK_GPIO4 28 RK_FUNC_GPIO &pcfg_pull_none>;
        };
    };
    usb_host {
        host_vbus_drv: host-vbus-drv {
            rockchip,pins = <RK_GPIO0 14 RK_FUNC_GPIO &pcfg_pull_none>;
        };
    };
    usb_otg {
        otg_vbus_drv: otg-vbus-drv {
            rockchip,pins = <RK_GPIO0 12 RK_FUNC_GPIO &pcfg_pull_none>;
        };
    };
};

StephenInVamrs referenced this issue in radxa/kernel Jun 26, 2019
[ Upstream commit 3de59bb ]

In handle_write_finished(), if r1_bio->bios[m] != NULL, it thinks
the corresponding conf->mirrors[m].rdev is also not NULL. But, it
is not always true.

Even if some io hold replacement rdev(i.e. rdev->nr_pending.count > 0),
raid1_remove_disk() can also set the rdev as NULL. That means,
bios[m] != NULL, but mirrors[m].rdev is NULL, resulting in NULL
pointer dereference in handle_write_finished and sync_request_write.

This patch can fix BUGs as follows:

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000140
 IP: [<ffffffff815bbbbd>] raid1d+0x2bd/0xfc0
 PGD 12ab52067 PUD 12f587067 PMD 0
 Oops: 0000 [#1] SMP
 CPU: 1 PID: 2008 Comm: md3_raid1 Not tainted 4.1.44+ #130
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1.fc26 04/01/2014
 Call Trace:
  ? schedule+0x37/0x90
  ? prepare_to_wait_event+0x83/0xf0
  md_thread+0x144/0x150
  ? wake_atomic_t_function+0x70/0x70
  ? md_start_sync+0xf0/0xf0
  kthread+0xd8/0xf0
  ? kthread_worker_fn+0x160/0x160
  ret_from_fork+0x42/0x70
  ? kthread_worker_fn+0x160/0x160

 BUG: unable to handle kernel NULL pointer dereference at 00000000000000b8
 IP: sync_request_write+0x9e/0x980
 PGD 800000007c518067 P4D 800000007c518067 PUD 8002b067 PMD 0
 Oops: 0000 [#1] SMP PTI
 CPU: 24 PID: 2549 Comm: md3_raid1 Not tainted 4.15.0+ #118
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1.fc26 04/01/2014
 Call Trace:
  ? sched_clock+0x5/0x10
  ? sched_clock_cpu+0xc/0xb0
  ? flush_pending_writes+0x3a/0xd0
  ? pick_next_task_fair+0x4d5/0x5f0
  ? __switch_to+0xa2/0x430
  raid1d+0x65a/0x870
  ? find_pers+0x70/0x70
  ? find_pers+0x70/0x70
  ? md_thread+0x11c/0x160
  md_thread+0x11c/0x160
  ? finish_wait+0x80/0x80
  kthread+0x111/0x130
  ? kthread_create_worker_on_cpu+0x70/0x70
  ? do_syscall_64+0x6f/0x190
  ? SyS_exit_group+0x10/0x10
  ret_from_fork+0x35/0x40

Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Shaohua Li <sh.li@alibaba-inc.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0lvin pushed a commit to free-z4u/roc-rk3328-cc-official that referenced this issue Sep 14, 2019
In handle_write_finished(), if r1_bio->bios[m] != NULL, it thinks
the corresponding conf->mirrors[m].rdev is also not NULL. But, it
is not always true.

Even if some io hold replacement rdev(i.e. rdev->nr_pending.count > 0),
raid1_remove_disk() can also set the rdev as NULL. That means,
bios[m] != NULL, but mirrors[m].rdev is NULL, resulting in NULL
pointer dereference in handle_write_finished and sync_request_write.

This patch can fix BUGs as follows:

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000140
 IP: [<ffffffff815bbbbd>] raid1d+0x2bd/0xfc0
 PGD 12ab52067 PUD 12f587067 PMD 0
 Oops: 0000 [FireflyTeam#1] SMP
 CPU: 1 PID: 2008 Comm: md3_raid1 Not tainted 4.1.44+ rockchip-linux#130
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1.fc26 04/01/2014
 Call Trace:
  ? schedule+0x37/0x90
  ? prepare_to_wait_event+0x83/0xf0
  md_thread+0x144/0x150
  ? wake_atomic_t_function+0x70/0x70
  ? md_start_sync+0xf0/0xf0
  kthread+0xd8/0xf0
  ? kthread_worker_fn+0x160/0x160
  ret_from_fork+0x42/0x70
  ? kthread_worker_fn+0x160/0x160

 BUG: unable to handle kernel NULL pointer dereference at 00000000000000b8
 IP: sync_request_write+0x9e/0x980
 PGD 800000007c518067 P4D 800000007c518067 PUD 8002b067 PMD 0
 Oops: 0000 [FireflyTeam#1] SMP PTI
 CPU: 24 PID: 2549 Comm: md3_raid1 Not tainted 4.15.0+ rockchip-linux#118
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1.fc26 04/01/2014
 Call Trace:
  ? sched_clock+0x5/0x10
  ? sched_clock_cpu+0xc/0xb0
  ? flush_pending_writes+0x3a/0xd0
  ? pick_next_task_fair+0x4d5/0x5f0
  ? __switch_to+0xa2/0x430
  raid1d+0x65a/0x870
  ? find_pers+0x70/0x70
  ? find_pers+0x70/0x70
  ? md_thread+0x11c/0x160
  md_thread+0x11c/0x160
  ? finish_wait+0x80/0x80
  kthread+0x111/0x130
  ? kthread_create_worker_on_cpu+0x70/0x70
  ? do_syscall_64+0x6f/0x190
  ? SyS_exit_group+0x10/0x10
  ret_from_fork+0x35/0x40

Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Shaohua Li <sh.li@alibaba-inc.com>
0lvin pushed a commit to free-z4u/roc-rk3328-cc-official that referenced this issue Oct 5, 2019
Trivial fix to remove the following sparse warnings:

  arch/powerpc/kernel/module_32.c:112:74: warning: Using plain integer as NULL pointer
  arch/powerpc/kernel/module_32.c:117:74: warning: Using plain integer as NULL pointer
  drivers/macintosh/via-pmu.c:1155:28: warning: Using plain integer as NULL pointer
  drivers/macintosh/via-pmu.c:1230:20: warning: Using plain integer as NULL pointer
  drivers/macintosh/via-pmu.c:1385:36: warning: Using plain integer as NULL pointer
  drivers/macintosh/via-pmu.c:1752:23: warning: Using plain integer as NULL pointer
  drivers/macintosh/via-pmu.c:2084:19: warning: Using plain integer as NULL pointer
  drivers/macintosh/via-pmu.c:2110:32: warning: Using plain integer as NULL pointer
  drivers/macintosh/via-pmu.c:2167:19: warning: Using plain integer as NULL pointer
  drivers/macintosh/via-pmu.c:2183:19: warning: Using plain integer as NULL pointer
  drivers/macintosh/via-pmu.c:277:20: warning: Using plain integer as NULL pointer
  arch/powerpc/platforms/powermac/setup.c:155:67: warning: Using plain integer as NULL pointer
  arch/powerpc/platforms/powermac/setup.c:247:27: warning: Using plain integer as NULL pointer
  arch/powerpc/platforms/powermac/setup.c:249:27: warning: Using plain integer as NULL pointer
  arch/powerpc/platforms/powermac/setup.c:252:37: warning: Using plain integer as NULL pointer
  arch/powerpc/mm/tlb_hash32.c:127:21: warning: Using plain integer as NULL pointer
  arch/powerpc/mm/tlb_hash32.c:148:21: warning: Using plain integer as NULL pointer
  arch/powerpc/mm/tlb_hash32.c:44:21: warning: Using plain integer as NULL pointer
  arch/powerpc/mm/tlb_hash32.c:57:21: warning: Using plain integer as NULL pointer
  arch/powerpc/mm/tlb_hash32.c:87:21: warning: Using plain integer as NULL pointer
  arch/powerpc/kernel/btext.c:160:31: warning: Using plain integer as NULL pointer
  arch/powerpc/kernel/btext.c:167:22: warning: Using plain integer as NULL pointer
  arch/powerpc/kernel/btext.c:274:21: warning: Using plain integer as NULL pointer
  arch/powerpc/kernel/btext.c:285:31: warning: Using plain integer as NULL pointer
  arch/powerpc/include/asm/hugetlb.h:204:16: warning: Using plain integer as NULL pointer
  arch/powerpc/mm/ppc_mmu_32.c:170:21: warning: Using plain integer as NULL pointer
  arch/powerpc/platforms/powermac/pci.c:1227:23: warning: Using plain integer as NULL pointer
  arch/powerpc/platforms/powermac/pci.c:65:24: warning: Using plain integer as NULL pointer

Also use `--fix` command line option from `script/checkpatch --strict` to
remove the following:

  CHECK: Comparison to NULL could be written "!dispDeviceBase"
  rockchip-linux#72: FILE: arch/powerpc/kernel/btext.c:160:
  +	if (dispDeviceBase == NULL)

  CHECK: Comparison to NULL could be written "!vbase"
  rockchip-linux#80: FILE: arch/powerpc/kernel/btext.c:167:
  +	if (vbase == NULL)

  CHECK: Comparison to NULL could be written "!base"
  rockchip-linux#89: FILE: arch/powerpc/kernel/btext.c:274:
  +	if (base == NULL)

  CHECK: Comparison to NULL could be written "!dispDeviceBase"
  rockchip-linux#98: FILE: arch/powerpc/kernel/btext.c:285:
  +	if (dispDeviceBase == NULL)

  CHECK: Comparison to NULL could be written "strstr"
  rockchip-linux#117: FILE: arch/powerpc/kernel/module_32.c:117:
  +		if (strstr(secstrings + sechdrs[i].sh_name, ".debug") != NULL)

  CHECK: Comparison to NULL could be written "!Hash"
  rockchip-linux#130: FILE: arch/powerpc/mm/ppc_mmu_32.c:170:
  +	if (Hash == NULL)

  CHECK: Comparison to NULL could be written "Hash"
  rockchip-linux#143: FILE: arch/powerpc/mm/tlb_hash32.c:44:
  +	if (Hash != NULL) {

  CHECK: Comparison to NULL could be written "!Hash"
  rockchip-linux#152: FILE: arch/powerpc/mm/tlb_hash32.c:57:
  +	if (Hash == NULL) {

  CHECK: Comparison to NULL could be written "!Hash"
  rockchip-linux#161: FILE: arch/powerpc/mm/tlb_hash32.c:87:
  +	if (Hash == NULL) {

  CHECK: Comparison to NULL could be written "!Hash"
  rockchip-linux#170: FILE: arch/powerpc/mm/tlb_hash32.c:127:
  +	if (Hash == NULL) {

  CHECK: Comparison to NULL could be written "!Hash"
  rockchip-linux#179: FILE: arch/powerpc/mm/tlb_hash32.c:148:
  +	if (Hash == NULL) {

  ERROR: space required after that ';' (ctx:VxV)
  rockchip-linux#192: FILE: arch/powerpc/platforms/powermac/pci.c:65:
  +	for (; node != NULL;node = node->sibling) {

  CHECK: Comparison to NULL could be written "node"
  rockchip-linux#192: FILE: arch/powerpc/platforms/powermac/pci.c:65:
  +	for (; node != NULL;node = node->sibling) {

  CHECK: Comparison to NULL could be written "!region"
  rockchip-linux#201: FILE: arch/powerpc/platforms/powermac/pci.c:1227:
  +	if (region == NULL)

  CHECK: Comparison to NULL could be written "of_get_property"
  rockchip-linux#214: FILE: arch/powerpc/platforms/powermac/setup.c:155:
  +		if (of_get_property(np, "cache-unified", NULL) != NULL && dc) {

  CHECK: Comparison to NULL could be written "!np"
  rockchip-linux#223: FILE: arch/powerpc/platforms/powermac/setup.c:247:
  +		if (np == NULL)

  CHECK: Comparison to NULL could be written "np"
  rockchip-linux#226: FILE: arch/powerpc/platforms/powermac/setup.c:249:
  +		if (np != NULL) {

  CHECK: Comparison to NULL could be written "l2cr"
  rockchip-linux#230: FILE: arch/powerpc/platforms/powermac/setup.c:252:
  +			if (l2cr != NULL) {

  CHECK: Comparison to NULL could be written "via"
  rockchip-linux#243: FILE: drivers/macintosh/via-pmu.c:277:
  +	if (via != NULL)

  CHECK: Comparison to NULL could be written "current_req"
  rockchip-linux#252: FILE: drivers/macintosh/via-pmu.c:1155:
  +	if (current_req != NULL) {

  CHECK: Comparison to NULL could be written "!req"
  rockchip-linux#261: FILE: drivers/macintosh/via-pmu.c:1230:
  +	if (req == NULL || pmu_state != idle

  CHECK: Comparison to NULL could be written "!req"
  rockchip-linux#270: FILE: drivers/macintosh/via-pmu.c:1385:
  +			if (req == NULL) {

  CHECK: Comparison to NULL could be written "!pp"
  rockchip-linux#288: FILE: drivers/macintosh/via-pmu.c:2084:
  +	if (pp == NULL)

  CHECK: Comparison to NULL could be written "!pp"
  rockchip-linux#297: FILE: drivers/macintosh/via-pmu.c:2110:
  +	if (count < 1 || pp == NULL)

  CHECK: Comparison to NULL could be written "!pp"
  rockchip-linux#306: FILE: drivers/macintosh/via-pmu.c:2167:
  +	if (pp == NULL)

  CHECK: Comparison to NULL could be written "pp"
  rockchip-linux#315: FILE: drivers/macintosh/via-pmu.c:2183:
  +	if (pp != NULL) {

Link: https://github.com/linuxppc/linux/issues/37
Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
@rembo10
Copy link

rembo10 commented Nov 28, 2021

Hey I know this is like, a 3 year old issue but I'm wondering if you ever got it solved? I'm trying to run the mainline kernel on a rk3288 device and am having some trouble with the usb...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants