qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/arm/fsl-imx7: Instantiate apbh_dma and ocotp as unimplemented devices
@ 2020-03-13 16:15 Guenter Roeck
  2020-03-16 15:39 ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2020-03-13 16:15 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Andrey Smirnov, qemu-arm, qemu-devel, Guenter Roeck

Instantiating apbh_dma and ocotp as unimplemented devices prevents crashes
when booting Linux.

apbh_dma:

[   14.046518] Unhandled fault: external abort on non-linefetch (0x808) at 0xd0852008
[   14.047287] pgd = (ptrval)
[   14.047607] [d0852008] *pgd=8b028811, *pte=33000653, *ppte=33000453
[   14.050074] Internal error: : 808 [#1] SMP ARM
...
[   14.077029] [<c0856530>] (stmp_clear_poll_bit) from [<c0856580>] (stmp_reset_block+0x10/0xb8)
[   14.077642] [<c0856580>] (stmp_reset_block) from [<c1a9655c>] (mxs_dma_probe+0x1f4/0x370)
[   14.078158] [<c1a9655c>] (mxs_dma_probe) from [<c0b6a7e8>] (platform_drv_probe+0x48/0x98)
[   14.078641] [<c0b6a7e8>] (platform_drv_probe) from [<c0b685c4>] (really_probe+0x228/0x2d0)

ocotp:

[   71.286109] Unhandled fault: external abort on non-linefetch (0x008) at 0xd0ff0000
[   71.287891] pgd = (ptrval)
[   71.288449] [d0ff0000] *pgd=8b497811, *pte=30350653, *ppte=30350453
[   71.291389] Internal error: : 8 [#1] SMP ARM
[   71.292302] Modules linked in:
[   71.293583] CPU: 0 PID: 112 Comm: kworker/0:3 Not tainted 5.0.0-10153-g065b6c4c913d-dirty #2
[   71.294148] Hardware name: Freescale i.MX7 Dual (Device Tree)
[   71.296728] Workqueue: events deferred_probe_work_func
[   71.297740] PC is at imx_ocotp_read+0x68/0x180
[   71.298154] LR is at mark_held_locks+0x48/0x74

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 hw/arm/fsl-imx7.c         | 11 +++++++++++
 include/hw/arm/fsl-imx7.h |  6 ++++++
 2 files changed, 17 insertions(+)

diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c
index 119b281a50..a17136f83c 100644
--- a/hw/arm/fsl-imx7.c
+++ b/hw/arm/fsl-imx7.c
@@ -459,6 +459,17 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp)
      */
     create_unimplemented_device("sdma", FSL_IMX7_SDMA_ADDR, FSL_IMX7_SDMA_SIZE);
 
+    /*
+     * OCOTP
+     */
+    create_unimplemented_device("octop", FSL_IMX7_OCOTP_ADDR,
+                                FSL_IMX7_OCOTP_SIZE);
+
+    /*
+     * APBH_DMA
+     */
+    create_unimplemented_device("apbh_dma", FSL_IMX7_APBH_DMA_ADDR,
+                                FSL_IMX7_APBH_DMA_SIZE);
 
     object_property_set_bool(OBJECT(&s->gpr), true, "realized",
                              &error_abort);
diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h
index 706aef2e7e..f9faa16515 100644
--- a/include/hw/arm/fsl-imx7.h
+++ b/include/hw/arm/fsl-imx7.h
@@ -113,6 +113,9 @@ enum FslIMX7MemoryMap {
     FSL_IMX7_IOMUXC_GPR_ADDR      = 0x30340000,
     FSL_IMX7_IOMUXCn_SIZE         = 0x1000,
 
+    FSL_IMX7_OCOTP_ADDR           = 0x30350000,
+    FSL_IMX7_OCOTP_SIZE           = 0x10000,
+
     FSL_IMX7_ANALOG_ADDR          = 0x30360000,
     FSL_IMX7_SNVS_ADDR            = 0x30370000,
     FSL_IMX7_CCM_ADDR             = 0x30380000,
@@ -177,6 +180,9 @@ enum FslIMX7MemoryMap {
     FSL_IMX7_A7MPCORE_ADDR        = 0x31000000,
     FSL_IMX7_A7MPCORE_DAP_ADDR    = 0x30000000,
 
+    FSL_IMX7_APBH_DMA_ADDR        = 0x33000000,
+    FSL_IMX7_APBH_DMA_SIZE        = 0x2000,
+
     FSL_IMX7_PCIE_REG_ADDR        = 0x33800000,
     FSL_IMX7_PCIE_REG_SIZE        = 16 * 1024,
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-16 19:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-13 16:15 [PATCH] hw/arm/fsl-imx7: Instantiate apbh_dma and ocotp as unimplemented devices Guenter Roeck
2020-03-16 15:39 ` Peter Maydell
2020-03-16 19:21   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).