Add iop driver for Sunplus SP7021
Subsystems (2)
v5 cover Add iop driver for Sunplus SP7021
Add iop driver for Sunplus SP7021 SOC
This is a patch series for iop driver for Sunplus SP7021 SOC.
Sunplus SP7021 is an ARM Cortex A7 (4 cores) based SoC. It integrates many peripherals (ex: UART, I2C, SPI, SDIO, eMMC, USB, SD card and etc.) into a single chip. It is designed for industrial control.
Refer to:
https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
https://tibbo.com/store/plus1.html
Tony Huang (2):
dt-binding: misc: Add iop yaml file for Sunplus SP7021
misc: Add iop driver for Sunplus SP7021
Documentation/ABI/testing/sysfs-platform-soc@B | 18 + .../devicetree/bindings/misc/sunplus-iop.yaml | 72 +++ MAINTAINERS | 7 + drivers/misc/Kconfig | 12 + drivers/misc/Makefile | 1 + drivers/misc/sunplus_iop.c | 481 +++++++++++++++++++++ 6 files changed, 591 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-platform-soc@B create mode 100644 Documentation/devicetree/bindings/misc/sunplus-iop.yaml create mode 100644 drivers/misc/sunplus_iop.c
Signature · 1 line
2.7.4
PATCH v5 1/2 dt-binding: misc: Add iop yaml file for Sunplus SP7021
Add iop yaml file for Sunplus SP7021
---
Changes in v5:
-Add iop-wakeup pin for 8051 to wake up the Linux kernel in shutdown mode.
.../devicetree/bindings/misc/sunplus-iop.yaml | 72 ++++++++++++++++++++++ MAINTAINERS | 5 ++ 2 files changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/sunplus-iop.yaml
Documentation/devicetree/bindings/misc/sunplus-iop.yaml new file +72 -0
@@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) Sunplus Ltd. Co. 2021 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/sunplus-iop.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sunplus IOP(8051) controller + +maintainers: + - Tony Huang <[email protected]> + +description: | + Processor for I/O control, RTC wake-up procedure management, + and cooperation with CPU&PMC in power management. + +properties: + compatible: + enum: + - sunplus,sp7021-iop + + reg: + items: + - description: IOP registers regions + - description: PMC registers regions + - description: MOON0 registers regions + + reg-names: + items: + - const: iop + - const: iop_pmc + - const: moon0 + + interrupts: + items: + - description: IOP_INT0. IOP to system Interrupt 0. + Sent by IOP to system RISC. + - description: IOP_INT1. IOP to System Interrupt 1. + Sent by IOP to system RISC. + + memory-region: + maxItems: 1 + + iop-wakeup: + description: Notify 8051 to wake up the Linux kernel. + +required: + - compatible + - reg + - reg-names + - interrupts + - memory-region + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/gpio/gpio.h> + iop: iop@9c000400 { + compatible = "sunplus,sp7021-iop"; + reg = <0x9c000400 0x80>, <0x9c003100 0x80>, <0x9c000000 0x80>; + reg-names = "iop", "iop_pmc", "moon0"; + interrupt-parent = <&intc>; + interrupts = <41 IRQ_TYPE_LEVEL_HIGH>, <42 IRQ_TYPE_LEVEL_HIGH>; + memory-region = <&iop_reserve>; + pinctrl-names = "default"; + pinctrl-0 = <&iop_pins>; + iop-wakeup = <&pctl 1 GPIO_ACTIVE_HIGH>; + }; +...
MAINTAINERS +5 -0
@@ -17945,6 +17945,11 @@ L: [email protected] S: Maintained F: drivers/net/ethernet/dlink/sundance.c +SUNPLUS IOP DRIVER +M: Tony Huang <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/misc/sunplu-iop.yaml + SUPERH M: Yoshinori Sato <[email protected]> M: Rich Felker <[email protected]>
Signature · 1 line
2.7.4
Rob Herring
maintainerRe: [PATCH v5 1/2] dt-binding: misc: Add iop yaml file for Sunplus SP7021
Quoted 53 lines · Tony Huang
Add iop yaml file for Sunplus SP7021
Signed-off-by Tony Huang <[email protected]>---
Changes in v5:(quoted diff) +0
-1-Add iop-wakeup pin for 8051 to wake up the Linux kernel in shutdown mode. .../devicetree/bindings/misc/sunplus-iop.yaml | 72 ++++++++++++++++++++++ MAINTAINERS | 5 ++ 2 files changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/sunplus-iop.yamlDocumentation/devicetree/bindings/misc/sunplus-iop.yaml new file +35
-0@@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) Sunplus Ltd. Co. 2021 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/sunplus-iop.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sunplus IOP(8051) controller + +maintainers: + - Tony Huang <[email protected]> + +description: | + Processor for I/O control, RTC wake-up procedure management, + and cooperation with CPU&PMC in power management. + +properties: + compatible: + enum: + - sunplus,sp7021-iop + + reg: + items: + - description: IOP registers regions + - description: PMC registers regions + - description: MOON0 registers regions + + reg-names: + items: + - const: iop + - const: iop_pmc + - const: moon0 + + interrupts: + items:
Documentation/devicetree/bindings/misc/sunplus-iop.yaml line 45
Quoted 10 lines
Documentation/devicetree/bindings/misc/sunplus-iop.yaml new file +10
-0+ - description: IOP_INT0. IOP to system Interrupt 0. + Sent by IOP to system RISC. + - description: IOP_INT1. IOP to System Interrupt 1. + Sent by IOP to system RISC. + + memory-region: + maxItems: 1 + + iop-wakeup: + description: Notify 8051 to wake up the Linux kernel.
What does that mean? What's the type? Does the standard 'wakeup-source' property not work here?
Quoted 15 lines
Documentation/devicetree/bindings/misc/sunplus-iop.yaml new file +15
-0+ +required: + - compatible + - reg + - reg-names + - interrupts + - memory-region + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/gpio/gpio.h>
Documentation/devicetree/bindings/misc/sunplus-iop.yaml line 70
Quoted 10 lines
Documentation/devicetree/bindings/misc/sunplus-iop.yaml new file +10
-0+ iop: iop@9c000400 { + compatible = "sunplus,sp7021-iop"; + reg = <0x9c000400 0x80>, <0x9c003100 0x80>, <0x9c000000 0x80>; + reg-names = "iop", "iop_pmc", "moon0"; + interrupt-parent = <&intc>; + interrupts = <41 IRQ_TYPE_LEVEL_HIGH>, <42 IRQ_TYPE_LEVEL_HIGH>; + memory-region = <&iop_reserve>; + pinctrl-names = "default"; + pinctrl-0 = <&iop_pins>; + iop-wakeup = <&pctl 1 GPIO_ACTIVE_HIGH>;
That's not how the GPIO binding works.
Quoted 22 lines
Documentation/devicetree/bindings/misc/sunplus-iop.yaml new file +2
-0+ }; +...MAINTAINERS +5
-0@@ -17945,6 +17945,11 @@ L: [email protected] S: Maintained F: drivers/net/ethernet/dlink/sundance.c +SUNPLUS IOP DRIVER +M: Tony Huang <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/misc/sunplu-iop.yaml + SUPERH M: Yoshinori Sato <[email protected]> M: Rich Felker <[email protected]>Signature · 1 line
2.7.4
RE: [PATCH v5 1/2] dt-binding: misc: Add iop yaml file for Sunplus SP7021
Dear Rob:
Quoted 65 lines
Subject: Re: [PATCH v5 1/2] dt-binding: misc: Add iop yaml file for Sunplus SP7021
Quoted 6 lines · Tony Huang
Add iop yaml file for Sunplus SP7021
Signed-off-by Tony Huang <[email protected]>---
Changes in v5:
-Add iop-wakeup pin for 8051 to wake up the Linux kernel in shutdownmode.
Quoted 2 lines
.../devicetree/bindings/misc/sunplus-iop.yaml | 72++++++++++++++++++++++
Quoted 51 lines
MAINTAINERS | 5 ++ 2 files changed, 77 insertions(+) create mode 100644
Documentation/devicetree/bindings/misc/sunplus-iop.yamlDocumentation/devicetree/bindings/misc/sunplus-iop.yaml new file +39
-0@@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # Copyright +(C) Sunplus Ltd. Co. 2021 %YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/sunplus-iop.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sunplus IOP(8051) controller + +maintainers: + - Tony Huang <[email protected]> + +description: | + Processor for I/O control, RTC wake-up procedure management, + and cooperation with CPU&PMC in power management. + +properties: + compatible: + enum: + - sunplus,sp7021-iop + + reg: + items: + - description: IOP registers regions + - description: PMC registers regions + - description: MOON0 registers regions + + reg-names: + items: + - const: iop + - const: iop_pmc + - const: moon0 + + interrupts: + items: + - description: IOP_INT0. IOP to system Interrupt 0. + Sent by IOP to system RISC. + - description: IOP_INT1. IOP to System Interrupt 1. + Sent by IOP to system RISC. +
Quoted 9 lines
Documentation/devicetree/bindings/misc/sunplus-iop.yaml line 45
Quoted 5 lines
Documentation/devicetree/bindings/misc/sunplus-iop.yaml new file +5
-0+ memory-region: + maxItems: 1 + + iop-wakeup: + description: Notify 8051 to wake up the Linux kernel.What does that mean? What's the type? Does the standard 'wakeup-source' property not work here?
When mounting IOP (8051). We can assign a gpio pin to 8051.
When the linux kernel system is powered off. 8051 is always powered. 8051 can receive external signals according to this gpio pin .
8051 receives external signal through gpio pin. 8051 can power on linux kernel system.
Quoted 51 lines
Quoted 8 lines
Documentation/devicetree/bindings/misc/sunplus-iop.yaml new file +8
-0+ +required: + - compatible + - reg + - reg-names + - interrupts + - memory-region +Documentation/devicetree/bindings/misc/sunplus-iop.yaml
Quoted 10 lines
Documentation/devicetree/bindings/misc/sunplus-iop.yaml new file +10
-0+additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/gpio/gpio.h> + iop: iop@9c000400 { + compatible = "sunplus,sp7021-iop"; + reg = <0x9c000400 0x80>, <0x9c003100 0x80>, <0x9c000000
0x80>;Documentation/devicetree/bindings/misc/sunplus-iop.yaml
Quoted 3 lines
Documentation/devicetree/bindings/misc/sunplus-iop.yaml new file +3
-0+ reg-names = "iop", "iop_pmc", "moon0"; + interrupt-parent = <&intc>; + interrupts = <41 IRQ_TYPE_LEVEL_HIGH>, <42
IRQ_TYPE_LEVEL_HIGH>;Documentation/devicetree/bindings/misc/sunplus-iop.yaml line 70
Quoted 4 lines
Documentation/devicetree/bindings/misc/sunplus-iop.yaml new file +4
-0+ memory-region = <&iop_reserve>; + pinctrl-names = "default"; + pinctrl-0 = <&iop_pins>; + iop-wakeup = <&pctl 1 GPIO_ACTIVE_HIGH>;That's not how the GPIO binding works.
Quoted 21 lines
Documentation/devicetree/bindings/misc/sunplus-iop.yaml new file +2
-0+ }; +...MAINTAINERS +5
-1@@ -17945,6 +17945,11 @@ L: [email protected] S: Maintained F: drivers/net/ethernet/dlink/sundance.c +SUNPLUS IOP DRIVER +M: Tony Huang <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/misc/sunplu-iop.yaml + SUPERH M: Yoshinori Sato <[email protected]> M: Rich Felker <[email protected]> --2.7.4
PATCH v5 2/2 misc: Add iop driver for Sunplus SP7021
In reply to Tony HuangIOP (IO Processor) embedded inside SP7021 which is used as Processor for I/O control, RTC wake-up and cooperation with CPU & PMC in power management purpose.
The IOP core is DQ8051, so also named IOP8051,
it supports dedicated JTAG debug pins which share with SP7021. In standby mode operation, the power spec reach 400uA.
---
Changes in v5:
- Modify sysfs read/write function.
- Added gpio pin for 8051 wake up linux kernel.
Documentation/ABI/testing/sysfs-platform-soc@B | 18 + MAINTAINERS | 2 + drivers/misc/Kconfig | 12 + drivers/misc/Makefile | 1 + drivers/misc/sunplus_iop.c | 481 +++++++++++++++++++++++++ 5 files changed, 514 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-platform-soc@B create mode 100644 drivers/misc/sunplus_iop.c
Documentation/ABI/testing/sysfs-platform-soc@B new file +18 -0
@@ -0,0 +1,18 @@ +What: /sys/devices/platform/soc@B/9c000400.iop/sp_iop_mailbox +Date: December 2021 +KernelVersion: 5.15 +Contact: Tony Huang <[email protected]> +Description: + Show 8051 mailbox data. + +What: /sys/devices/platform/soc@B/9c000400.iop/sp_iop_mode +Date: December 2021 +KernelVersion: 5.15 +Contact: Tony Huang <[email protected]> +Description: + Operation mode of IOP is switched to standby mode by writing + "1" to sysfs. + Operation mode of IOP is switched to normal mode by writing + "0" to sysfs. + +
MAINTAINERS +2 -0
@@ -17948,7 +17948,9 @@ F: drivers/net/ethernet/dlink/sundance.c SUNPLUS IOP DRIVER M: Tony Huang <[email protected]> S: Maintained +F: Documentation/ABI/testing/sysfs-platform-soc@B F: Documentation/devicetree/bindings/misc/sunplu-iop.yaml +F: drivers/misc/sunplus_iop.c SUPERH M: Yoshinori Sato <[email protected]>
drivers/misc/Kconfig +12 -0
@@ -470,6 +470,18 @@ config HISI_HIKEY_USB switching between the dual-role USB-C port and the USB-A host ports using only one USB controller. +config SUNPLUS_IOP + tristate "Sunplus IOP support" + default ARCH_SUNPLUS + help + Sunplus I/O processor (8051) driver. + Processor for I/O control, RTC wake-up proceduce management, + and cooperation with CPU&PMC in power management. + Need Install DQ8051, The DQ8051 bin file generated by keil C. + + This driver can also be built as a module. If so, the module + will be called ad525x_dpot. + source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +1 -0
@@ -52,6 +52,7 @@ obj-$(CONFIG_DW_XDATA_PCIE) += dw-xdata-pcie.o obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o obj-$(CONFIG_OCXL) += ocxl/ obj-$(CONFIG_BCM_VK) += bcm-vk/ +obj-$(CONFIG_SUNPLUS_IOP) += sunplus_iop.o obj-y += cardreader/ obj-$(CONFIG_PVPANIC) += pvpanic/ obj-$(CONFIG_HABANA_AI) += habanalabs/
drivers/misc/sunplus_iop.c new file +481 -0
481 lines not on this page · raw message
Signature · 1 line
2.7.4
Greg KH
maintainerRe: [PATCH v5 2/2] misc: Add iop driver for Sunplus SP7021
Quoted 28 lines · Tony Huang
IOP (IO Processor) embedded inside SP7021 which is used as Processor for I/O control, RTC wake-up and cooperation with CPU & PMC in power management purpose.
The IOP core is DQ8051, so also named IOP8051,
it supports dedicated JTAG debug pins which share with SP7021. In standby mode operation, the power spec reach 400uA.Signed-off-by Tony Huang <[email protected]>---
Changes in v5:
- Modify sysfs read/write function.
- Added gpio pin for 8051 wake up linux kernel.Documentation/ABI/testing/sysfs-platform-soc@B | 18 + MAINTAINERS | 2 + drivers/misc/Kconfig | 12 + drivers/misc/Makefile | 1 + drivers/misc/sunplus_iop.c | 481 +++++++++++++++++++++++++ 5 files changed, 514 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-platform-soc@B create mode 100644 drivers/misc/sunplus_iop.cDocumentation/ABI/testing/sysfs-platform-soc@B new file +0
-0
Documentation/ABI/testing/sysfs-platform-soc@B line 3
Quoted 3 lines
Documentation/ABI/testing/sysfs-platform-soc@B new file +3
-0@@ -0,0 +1,18 @@ +What: /sys/devices/platform/soc@B/9c000400.iop/sp_iop_mailbox +Date: December 2021 +KernelVersion: 5.15
5.15 was alread released, this can not be added to older kernels.
Documentation/ABI/testing/sysfs-platform-soc@B line 16
Quoted 13 lines
Documentation/ABI/testing/sysfs-platform-soc@B new file +13
-0+Contact: Tony Huang <[email protected]> +Description: + Show 8051 mailbox data. + +What: /sys/devices/platform/soc@B/9c000400.iop/sp_iop_mode +Date: December 2021 +KernelVersion: 5.15 +Contact: Tony Huang <[email protected]> +Description: + Operation mode of IOP is switched to standby mode by writing + "1" to sysfs. + Operation mode of IOP is switched to normal mode by writing + "0" to sysfs.
You are not documenting what reading these sysfs files show. Remember, sysfs is "one value per file" and it looks like you are printing out many values in the same file:
Documentation/ABI/testing/sysfs-platform-soc@B
Quoted 10 lines
Documentation/ABI/testing/sysfs-platform-soc@B new file +10
-0+static ssize_t sp_iop_mailbox_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct sp_iop *iop = dev_get_drvdata(dev); + struct regs_iop *p_iop_reg = (struct regs_iop *)iop->iop_regs; + unsigned int MB0, MB1, MB2; + + MB0 = readl(&p_iop_reg->iop_data0); + MB1 = readl(&p_iop_reg->iop_data1); + MB2 = readl(&p_iop_reg->iop_data2); + return sprintf(buf, "MB0:0x%x MB1:0x%x MB2:0x%x\n", MB0, MB1, MB2);
That is a very odd "single value".
Also please use sysfs_emit().
Documentation/ABI/testing/sysfs-platform-soc@B
Quoted 8 lines
Documentation/ABI/testing/sysfs-platform-soc@B new file +8
-0+static ssize_t sp_iop_mode_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct sp_iop *iop = dev_get_drvdata(dev); + + if (iop->mode == 0) + return sprintf(buf, "normal code\n"); + else + return sprintf(buf, "standby code\n");
2 words?
kernel test robot
build botRe: [PATCH v5 2/2] misc: Add iop driver for Sunplus SP7021
In reply to Tony HuangI love your patch! Perhaps something to improve:
Hi Tony,
I love your patch! Perhaps something to improve:
[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on robh/for-next linux/master linus/master v5.16-rc6 next-20211224] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Tony-Huang/Add-iop-driver-for-Sunplus-SP7021/20211224-163743 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 1bb866dcb8cf5054de88f592fc0ec1f275ad9d63 config: powerpc64-randconfig-s032-20211226 (https://download.01.org/0day-ci/archive/20211226/202112261932.8hwlDwCu-lkp(a)intel.com/config) compiler: powerpc64le-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/a75af7615fe0101c6f3742afc005a39c66b00864
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tony-Huang/Add-iop-driver-for-Sunplus-SP7021/20211224-163743
git checkout a75af7615fe0101c6f3742afc005a39c66b00864
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/misc/ drivers/pinctrl/nuvoton/
If you fix the issue, kindly add following tag as appropriate
sparse warnings: (new ones prefixed by >>)
drivers/misc/sunplus_iop.c:94:39: sparse: sparse: cast removes address space '__iomem' of expression drivers/misc/sunplus_iop.c:95:43: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/misc/sunplus_iop.c:100:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got void [noderef] __iomem *[assigned] iop_kernel_base @@
drivers/misc/sunplus_iop.c:100:16: sparse: expected void *p
drivers/misc/sunplus_iop.c:100:16: sparse: got void [noderef] __iomem *[assigned] iop_kernel_base
drivers/misc/sunplus_iop.c:101:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got void [noderef] __iomem *[assigned] iop_kernel_base @@
drivers/misc/sunplus_iop.c:101:16: sparse: expected void *p
drivers/misc/sunplus_iop.c:101:16: sparse: got void [noderef] __iomem *[assigned] iop_kernel_base
drivers/misc/sunplus_iop.c:103:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:103:47: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:103:47: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:105:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:105:22: sparse: expected void const volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:105:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:107:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:107:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:107:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:109:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:109:22: sparse: expected void const volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:109:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:111:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:111:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:111:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:113:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:113:22: sparse: expected void const volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:113:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:115:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:115:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:115:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:118:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:118:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:118:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:120:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:120:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:120:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:122:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:122:22: sparse: expected void const volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:122:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:124:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:124:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:124:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:130:39: sparse: sparse: cast removes address space '__iomem' of expression drivers/misc/sunplus_iop.c:131:43: sparse: sparse: cast removes address space '__iomem' of expression
drivers/misc/sunplus_iop.c:136:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got void [noderef] __iomem *[assigned] iop_kernel_base @@
drivers/misc/sunplus_iop.c:136:16: sparse: expected void *p
drivers/misc/sunplus_iop.c:136:16: sparse: got void [noderef] __iomem *[assigned] iop_kernel_base
drivers/misc/sunplus_iop.c:137:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got void [noderef] __iomem *[assigned] iop_kernel_base @@
drivers/misc/sunplus_iop.c:137:16: sparse: expected void *p
drivers/misc/sunplus_iop.c:137:16: sparse: got void [noderef] __iomem *[assigned] iop_kernel_base
drivers/misc/sunplus_iop.c:139:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:139:47: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:139:47: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:141:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:141:22: sparse: expected void const volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:141:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:143:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:143:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:143:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:145:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:145:22: sparse: expected void const volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:145:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:147:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:147:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:147:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:149:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:149:22: sparse: expected void const volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:149:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:151:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:151:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:151:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:154:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:154:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:154:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:156:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:156:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:156:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:158:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:158:22: sparse: expected void const volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:158:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:160:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:160:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:160:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:171:39: sparse: sparse: cast removes address space '__iomem' of expression drivers/misc/sunplus_iop.c:172:43: sparse: sparse: cast removes address space '__iomem' of expression drivers/misc/sunplus_iop.c:173:47: sparse: sparse: cast removes address space '__iomem' of expression
drivers/misc/sunplus_iop.c:177:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:177:47: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:177:47: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:179:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:179:22: sparse: expected void const volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:179:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:181:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:181:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:181:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:183:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:183:22: sparse: expected void const volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:183:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:185:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:185:22: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:185:22: sparse: got unsigned int *
drivers/misc/sunplus_iop.c:188:29: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/misc/sunplus_iop.c:188:29: sparse: expected void volatile [noderef] __iomem *addr
drivers/misc/sunplus_iop.c:188:29: sparse: got unsigned int *
vim +100 drivers/misc/sunplus_iop.c
91
92 static void sp_iop_normal_mode(struct sp_iop *iop)
93 {
94 struct regs_iop *p_iop_reg = (struct regs_iop *)iop->iop_regs;
95 struct regs_moon0 *p_moon0_reg = (struct regs_moon0 *)iop->moon0_regs;
96 void __iomem *iop_kernel_base;
97 unsigned int reg;
98
99 iop_kernel_base = ioremap(iop->iop_mem_start, NORMAL_CODE_MAX_SIZE);
> 100 memset(iop_kernel_base, 0, NORMAL_CODE_MAX_SIZE); 101 memcpy(iop_kernel_base, iop->iop_normal_code, NORMAL_CODE_MAX_SIZE);
102
103 writel(0x00100010, &p_moon0_reg->clken[0]);
104
105 reg = readl(&p_iop_reg->iop_control);
106 reg |= 0x01;
107 writel(reg, &p_iop_reg->iop_control);
108
109 reg = readl(&p_iop_reg->iop_control);
110 reg &= ~(0x8000);
111 writel(reg, &p_iop_reg->iop_control);
112
113 reg = readl(&p_iop_reg->iop_control);
114 reg |= 0x0200;//disable watchdog event reset IOP
115 writel(reg, &p_iop_reg->iop_control);
116
117 reg = (iop->iop_mem_start & 0xFFFF);
118 writel(reg, &p_iop_reg->iop_base_adr_l);
119 reg = (iop->iop_mem_start >> 16);
120 writel(reg, &p_iop_reg->iop_base_adr_h);
121
122 reg = readl(&p_iop_reg->iop_control);
123 reg &= ~(0x01);
124 writel(reg, &p_iop_reg->iop_control);
125 iop->mode = 0;
126 }
127
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org