1
0
Fork 0
Commit Graph

881750 Commits (61212b715b4fb37553dae33df1320c418824c854)

Author SHA1 Message Date
Peng Fan 61212b715b gpio: imx-rpmsg: register gpio chip after rpmsg channel ready
Register gpio chip after rpmsg channel ready, otherwise consumer
might use gpio before rpmsg channel ready, and cause issue.

Late register the gpio chip could let consumer use defer probe
correclty.

Reported-by: Elven Wang <elven.wang@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-05-08 10:06:56 +08:00
Oliver F. Brown 21ed137e97 MLK-23938: arch: arm64: imx8mp: change compatible name for Basler camera
Need to change compatible to basler,basler-camera-vvcam to prevent breaking
exiting basler camera compatibility.

Signed-off-by: Oliver F. Brown <oliver.brown@nxp.com>
2020-05-07 14:22:40 -07:00
Anson Huang 8c2ae33a40 MLK-23936 mailbox: imx: Add runtime PM callback to handle MU clocks
Some of i.MX8M SoCs have MU clock, they need to be managed in runtime
to make sure the MU domain can be off in runtime, add runtime PM
callback to handle MU clock.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-07 20:05:45 +08:00
Shengjiu Wang 4316b08138 MLK-23906-4: ASoC: fsl_micfil: Don't bind clock with regmap
The call flow:
devm_regmap_init_mmio_clk
   - clk_prepare()
      - clk_pm_runtime_get()

Cause the power domain of ipg clock always be enabled.
which impact the power consumption.

so we can't bind clock with regmap, but explicitly enable
clock when using.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-05-07 17:17:50 +08:00
Shengjiu Wang b35c0a202e MLK-23906-3: ASoC: fsl_easrc: Don't bind clock with regmap
The call flow:
devm_regmap_init_mmio_clk
   - clk_prepare()
      - clk_pm_runtime_get()

Cause the power domain of mem clock always be enabled.
which impact the power consumption.

so we can't bind clock with regmap, but explicitly enable
clock when using.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-05-07 17:17:45 +08:00
Shengjiu Wang 7cdd916faa MLK-23906-2: ASoC: fsl_aud2htx: Switch to imx-pcm-dma-v2
With imx-pcm-dma, the dma channel is created in probe, when
there is power domain attached with dma device, the power
domain will be enabled when channel is created, then the
power of the domain will be always enabled from beginning.

So switch to imx-pcm-dma-v2, then the dma channel will be
created when playback or capture really started.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-05-07 17:17:42 +08:00
Shengjiu Wang 4ac1cd1136 MLK-23906-1: ASoC: fsl_aud2htx: Don't bind clock with regmap
The call flow:
devm_regmap_init_mmio_clk
   - clk_prepare()
      - clk_pm_runtime_get()

Cause the power domain of bus clock always be enabled.
which impact the power consumption.

So we can't bind clock with regmap, then explicitly enable
clock when using.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-05-07 17:17:27 +08:00
Liu Ying ae7f915cec MLK-23905-5 arm64: imx_v8_defconfig: Build in i.MX8qm/qxp/mp LDB encoder drivers
This patch builds in i.MX8qm/qxp/mp LDB encoder drivers by default.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
2020-05-07 15:19:02 +08:00
Liu Ying 114d61a84a MLK-23905-4 arm64: imx_v8_defconfig: Build in Mixel LVDS (combo) PHY drivers
This patch builds in Mixel LVDS (combo) PHY drivers by default.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
2020-05-07 15:19:02 +08:00
Liu Ying 89436b22b2 MLK-23905-3 arm64: imx_v8_defconfig: Build in FSL IMX LVDS bridge driver
This patch builds in FSL IMX LVDS bridge driver by default.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
2020-05-07 15:19:02 +08:00
Liu Ying 429ca4f4ca MLK-23905-2 drm/imx: imx-ldb: Use platform specific encoder drivers
This patch creates platform specific LDB encoder drivers for
i.MX53, i.MX6qdl, i.MX8qm, i.MX8qxp and i.MX8mp.  The encoders
would attach the bridge added in Freescale i.MX LVDS display
bridge driver.  This way, the platform specific things can be
handled in different drivers, like special phy settings, clocks
and SCU misc settings, etc.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
2020-05-07 15:19:02 +08:00
Liu Ying 8a134a2833 MLK-23905-1 drm/bridge: Add fsl imx ldb support
This patch adds Freescale i.MX LVDS display bridge driver.
The driver would add a common drm bridge which can be attached
to platform specific LDB encoder drivers.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
2020-05-07 15:19:02 +08:00
Liu Ying 6b634f8c97 MLK-23904 drm/imx: imx-ldb: Cache split mode status in struct imx_ldb
Instead of looking at ldb_ctrl to determine whether split mode is
enabled or not, we may cache it in struct imx_ldb directly so that
it can be accessed easily.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
2020-05-07 15:19:02 +08:00
Liu Ying 5e60caa2c5 MLK-23903 drm/imx: imx-ldb: Disable both two channels for split mode in enc->disable()
Both of the two LVDS channels should be disabled for split mode
in enc->disable().

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
2020-05-07 15:19:02 +08:00
Liu Ying 1696dd1e9b MLK-23902 drm/imx: imx-ldb: Remove LVDS_BIT_MAP_SPWG/JEIDA enums
No one is using the LVDS_BIT_MAP_SPWG/JEIDA enums, so remove them.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
2020-05-07 15:19:02 +08:00
Robin Gong e769e3db70 MLK-23910-2: arm64: dts: imx8mm-ddr4-evk: enable snvs_pwrkey
Enable snvs_pwrkey on imx8mm-ddr4-evk board.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
2020-05-07 15:19:02 +08:00
Robin Gong 9d04bd21e0 MLK-23910-1: arm64: dts: imx8mn-evk: enable snvs_pwrkey
Enable snvs_pwrkey on imx8mn-evk board.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
2020-05-07 15:19:02 +08:00
Robin Gong b97783e4c8 MLK-23869-3: dmaengine: imx-sdma: add sdma_get_firmware_wait
Add sdma_get_firmware_wait() since sdma firmware have to be ready after
runtime resume. That could be done for runtime feature on i.mx8mp since
the only sdma client audio driver request sdma channel after rootfs
mounted which means no any block in sdma_get_firmware_wait() as
sdma_get_firmware().

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-07 15:19:02 +08:00
Robin Gong 65e87c257b MLK-23869-2 dmaengine: imx-sdma: add runtime suspend/resume
Add runtime suspend/resume support on i.mx8mp. So sdma will be initialized
and firmware will be loaded at first channel requested, sdma will be off
once no any channel is running.For the legacy chips just keep sdma on
always as before.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-07 15:19:02 +08:00
Robin Gong 4da4ba1aed MLK-23869-1 dmaengine: imx-sdma: split sdma init hw and sw
Split sdma_init_sw and sdma_init_hw from sdma_init, so that sdma_init_hw
could be delayed in channel allocate phase and it's easier for implementing
runtime suspend/resume in the next.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-07 15:19:02 +08:00
Jacky Bai 52aa8b0564 MLK-23888 cpufreq: imx7ulp: Fix cpufreq probe failure due to defer probe
It is possible that the regulator_get will return defer probe error if
the regulator is not ready when cpufreq doing probe. cpufreq need to
defer probe again if regulator_get return '-EPROBE_DEFER', so fix it.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
2020-05-07 13:38:42 +08:00
Richard Zhu f51e2308f2 MLK-23901 PCI: imx: Initialize the variable value to fix build warning
Initialize the variable value to fix build warning.

CC      drivers/pci/controller/dwc/pci-imx6.o
drivers/pci/controller/dwc/pci-imx6.c: In function ‘imx6_pcie_probe’:
drivers/pci/controller/dwc/pci-imx6.c:2676:5: warning: ‘ret’ may be
used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
2020-05-06 13:46:50 +08:00
Ella Feng 00ca1506e9 MGS-5551 [#imx-1868] Update GPU database
Update GPU database. And fix VSI profiler GPU hang issue, also update power management
register for VIP.

Signed-off-by: Ella Feng <ella.feng@nxp.com>
2020-05-06 19:08:06 +08:00
Li Jun 31a04b5575 usb: typec: tcpm: set correct data role for non-DRD
Since the typec port data role is separated from power role,
so check the port data capability when setting data role.

Signed-off-by: Li Jun <jun.li@nxp.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/1581666828-2063-1-git-send-email-jun.li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6ecc632d4b)
2020-05-06 09:45:59 +08:00
Richard Zhu ed60006667 MLK-23899 PCI: imx: fix the warn dump of the dev link
Fix the warn dump of the device driver bound link.
Indroduced by kernel updates "515db266a9dace92b0cbaed9a6044dd5304b8ca9"

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
2020-05-06 09:58:48 +08:00
Franck LENORMAND d134fcc5b6 MLK-23892: soc: imx: secvio: Fix intentionnal fall through
The function snvs_reader uses a switch case with intentionnal
fall through which is an error displayed at compilation.

This patch uses the keyword "fallthrough" to fix the issue.

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
2020-05-04 16:06:40 +02:00
Viorel Suman 61433c781f MLK-23886-2: clk: imx: clk-audiomix: fix runtime PM
Move clock management and registers reads/writes into
runtime PM callbacks.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
2020-05-04 11:41:37 +03:00
Viorel Suman cd4e3bff13 MLK-23886-1: clk: imx: clk-gate-shared: provide dev in clk_register
Provide dev in clk_register in order to allow subsequent
power domain management.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
2020-05-04 11:41:28 +03:00
Viorel Suman 698861f076 MLK-23618-17: fsl_sai: fix hang in probe at boot time
A power domain associated with a device may be disabled in
a separate thread by "genpd_power_off_work_fn" function in
case the device has no PM runtime enabled at that moment.
This will stop the parent clock of "bus" clk and hang
the probe in regmap read/write operation. In order to avoid
this PM runtime must be enabled before any regmap read/write
ops. Aside of this replace clk bus clocks with
pm_runtime_get/put_sync calls.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Fixes: c2641e1974 ("MLK-23618-9: ASoC: fsl_sai: Don't bind clock with regmap")
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-01 12:45:43 +03:00
Viorel Suman 18b2111684 MLK-23887: ASoC: fsl_xcvr: set regcache_cache_only true in probe
Set regmap to use regcache only in probe in order to avoid
issue on cat /sys/kernel/debug/regmap/30cc0000.xcvr/registers

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-01 12:45:43 +03:00
Liu Ying 95df66dec1 MLK-23885 drm/imx: ldb: Add mode fixup for i.MX8mp LDB in ->atomic_check()
Due to limited video PLL frequency points on i.MX8mp, the exact pixel clock
rate of a panel's video mode is likely unsupported by the clock tree.
The driver would take a slightly fixed up pixel clock rate to match with
the clock tree capability and the panel should still work with that.
This should work based on the agreement that the chosen panel should work
with the existing PLL frequency points.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
2020-04-30 19:18:54 +08:00
Liu Ying 735ed1e9b0 MLK-23884 arm64: dts: imx8mp-evk-jdi-wuxga-lvds-panel: Correct lvds-channel@0 fsl,data-mapping property
The lvds-channel@0 fsl,data-mapping property is wrongly moved
out from lvds-channel@0 node to the parent ldb node by a previous
commit.  This patch fixes the property.

Fixes: 46552dfa17 ("MLK-23694-12 arm64: dts: imx8mp-evk: integrate LVDS bridge display in")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
2020-04-30 19:18:53 +08:00
Guoniu.zhou 691511f5ea MLK-23877-2: arm64: dts: imx8mn-evk.dts: enable isi child device
Enable ISI child device.

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
2020-04-30 18:06:42 +08:00
Guoniu.zhou 5a4410f868 MLK-23877-1: arm64: dts: imx8mn-evk.dts: correct ov5640 properties
For kernel 5.4, we use community driver for ov5640, so correct some
properties to satify the need of ov5640 driver.

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
2020-04-30 18:06:42 +08:00
Robby Cai 07364a7aa5 MLK-23600-2 arm64: dts: imx8mp: set media axi/apb clock to desired value
set media axi clock to 500MHz and apb clock to 200MHz for 4K

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.zhou <guoniu.zhou@nxp.com>
2020-04-30 16:34:05 +08:00
Robby Cai 2b941dee90 MLK-23600-1 arm64: dts: imx8mp: add isp nodes
add isp nodes for imx8mp(m865)

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.zhou <guoniu.zhou@nxp.com>
2020-04-30 16:34:05 +08:00
Fugang Duan 9bbea7a5e3 MLK-23883 net: wireless: mxm_wifiex: fix the suspend issue: cmd id 0x5b timeout
When do suspend test, cmd id 0x5b timeout during suspend:
	Timeout cmd id (615.964367) = 0x5b, act = 0x1

It is not necessary to download 0x5b command after disconnect
to AP, sometimes this command has no response and causes timeout.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-04-30 15:57:55 +08:00
Peng Fan d85cedb6d0 MLK-23882 remoteproc: imx_rproc: check resource table header
Before using resource table, check whether this is a valid header.
M4 image might not publish a valid header, so let's catch it to avoid
kernel panic.

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-30 16:05:48 +08:00
Minjie Zhuang 4bbe573768 MGS-5596 [#imx-2035] [2/2]PM QoS feature development
add compatible string "fsl,imx8-vipsi" to identify the vip core
for PM Qos

Signed-off-by: minjie.zhuang@nxp.com
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
2020-04-30 14:38:54 +08:00
Minjie Zhuang 86f9fcb3cb MGS-5596 [#imx-2035] [1/2] PM QoS feature development
add PM QoS feature for VIP core by adding pm_qos_add_request
and pm_qos_remove_request function at set_power

Signed-off-by: minjie.zhuang@nxp.com
2020-04-30 14:38:42 +08:00
Zhang Peng 1a17334e71 MLK-23837 Asoc: fsl_dsp: Fix system crash when do dsp suspend test
The issue is GPU will crash when do dsp suspend test, and only
meet this issue when load GPU as module.
The reason is that dsp framework's global data set size little
than actul size. So dsp will touch the memory that not owned
dsp, then caused GPU crash.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-04-29 20:50:04 +08:00
Shengjiu Wang fe01a5d14b MLK-23642-3: ASoC: fsl: imx-cdnhdmi: support 6 channels
Add support 6 channels

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-04-29 18:35:51 +08:00
Shengjiu Wang 326442c327 MLK-23642-2: ASoC: hdmi-codec: Add iec958 kcontrol
Add iec958 controls, then user can set the AES from user space.
The command is "iecset", which is in alsa-utils.

For HBR test, we need do below steps
1. Generate iec61937 mat stream by ffmpeg.
   ffmpeg -i input.mlp -acodec copy -f spdif output.spd

2. Add iec60958 header by iec958 plugin in alsa-lib

<confdir:pcm/iec958.conf>

IMX-CDNHDMI.pcm.iec958.0 {
	@args [ CARD AES0 AES1 AES2 AES3 ]
	@args.CARD {
		type string
	}
	@args.AES0 {
		type integer
	}
	@args.AES1 {
		type integer
	}
	@args.AES2 {
		type integer
	}
	@args.AES3 {
		type integer
	}
	type iec958
	slave {
		format IEC958_SUBFRAME_LE
		pcm {
			type file
			slave.pcm null
			file "output.spd.iec958"
			format "raw"
		}
	}
	status [ $AES0 $AES1 $AES2 $AES3 ]
	preamble.z 0x1
	preamble.x 0x0
	preamble.y 0x0
}
aplay -Diec958:3,AES0=0x06,AES1=0x80,AES2=0x02,AES3=0x09 -r 192000 -c 2 -f S16_LE output.spd

3. Enable non-linear pcm.
   iecset -c 3 audio off

4. aplay -Dcdnhdmi8ch -r 192000 -c 8 -f S32_LE output.spd.iec958
pcm.cdnhdmi8ch {
        type dshare
        slave {
                pcm "hw:3,0"
                channels 8
                rate 192000
                format S32_LE
        }
        ipc_key 5144458
        bindings.0 0
        bindings.1 4
        bindings.2 1
        bindings.3 5
        bindings.4 2
        bindings.5 6
        bindings.6 3
        bindings.7 7
}

5. Test is finished, disable non-linear pcm
   iecset -c 3 audio on

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-04-29 18:35:44 +08:00
Shengjiu Wang 81875f6f91 MLK-23642-1: drm: bridge: cadence: support HBR and 6 channel
Support HBR and 6 channel.

For HBR, it only support compressed bitstream, sample rate
is 192kHz, and 8 channels.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-04-29 18:35:22 +08:00
Dirk Mueller 94d71bc1d8 scripts/dtc: Remove redundant YYLOC global declaration
gcc 10 will default to -fno-common, which causes this error at link
time:

  (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here

This is because both dtc-lexer as well as dtc-parser define the same
global symbol yyloc. Before with -fcommon those were merged into one
defintion. The proper solution would be to to mark this as "extern",
however that leads to:

  dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
   26 | extern YYLTYPE yylloc;
      |                ^~~~~~
In file included from dtc-lexer.l:24:
dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
  127 | extern YYLTYPE yylloc;
      |                ^~~~~~
cc1: all warnings being treated as errors

which means the declaration is completely redundant and can just be
dropped.

Signed-off-by: Dirk Mueller <dmueller@suse.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[robh: cherry-pick from upstream]
Cc: stable@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
(cherry picked from commit e33a814e77)
2020-04-29 12:33:27 +03:00
Peng Fan fe92d9f8f3 LF-1360 remoteproc: imx: enlarge the mbox timeout delay
Enlarge timeout delay to 50ms, 20ms seems not enough. it is easy
to timeout using 20ms when m4 enter VLLS mode.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-29 15:03:06 +08:00
Jan Kiszka 3ea2de8648 virtio: Add virtio-over-ivshmem transport driver
This provides a virtio transport driver over the Inter-VM shared memory
device as found in QEMU and the Jailhouse hypervisor.

...

Note: Specification work for both ivshmem and the virtio transport is
ongoing, so details may still change.

Acked-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-04-29 15:03:05 +08:00
Jan Kiszka 92de0e9899 uio: Add driver for inter-VM shared memory device
This adds a UIO driver the ivshmem device, found in QEMU and the
Jailhouse hypervisor. It exposes the MMIO register region and all shared
memory section to userspace. Interrupts are configured in one-shot mode
so that userspace needs to re-enable them after each event via the
Interrupt Control register. The driver registers all possible MSI-X
vectors, coalescing them into the single notifier UIO provides.

Note: Specification work for the interface is ongoing, so details may
still change.

Acked-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-04-29 15:03:05 +08:00
Jan Kiszka 5d0c0395a6 ivshmem: Add header file
Common defines and structures for the ivshmem device.

Acked-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-04-29 15:03:05 +08:00
Jan Kiszka 014f0b6109 uio: Enable read-only mappings
This allows to tag memory regions read-only, denying userspace to map
them writable. Default remains read/write.

Acked-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-04-29 15:03:04 +08:00