Skip to contentSkip to conversation

arm64: dts: Add a virtio disk to the RTSM motherboard

PATCH New Mark Brown 2 participants 3 messages Dec 3, 2013 Device tree bindings

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 arm64: dts: Add a virtio disk to the RTSM motherboard

From: Mark Hambleton <[email protected]>

Describe the virtio device so we can mount disk images in the simulator.

---
 arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi +6 -0
index b45e5f39f577..4ccd96552b70 100644
@@ -183,6 +183,12 @@
 				clocks = <&v2m_oscclk1>, <&v2m_clk24mhz>;
 				clock-names = "clcdclk", "apb_pclk";
 			};
+
+			virtio_block at 0130000 {
+				compatible = "virtio,mmio";
+				reg = <0x130000 0x1000>;
+				interrupts = <42>;
+			};
 		};
 
 		v2m_fixed_3v3: fixedregulator at 0 {
Signature · 1 line
1.8.5
#1 lore raw

PATCH 1/1 arm64: dts: Add a virtio disk to the RTSM motherboard

Quoted 15 lines · Mark Brown

From: Mark Hambleton <[email protected]>

Describe the virtio device so we can mount disk images in the simulator.

---
 arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi +0 -0
index b45e5f39f577..4ccd96552b70 100644

arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi line 189

Quoted 7 lines
arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi +4 -0
@@ -183,6 +183,12 @@
 				clocks = <&v2m_oscclk1>, <&v2m_clk24mhz>;
 				clock-names = "clcdclk", "apb_pclk";
 			};
+
+			virtio_block at 0130000 {
+				compatible = "virtio,mmio";
+				reg = <0x130000 0x1000>;

Can we make this 0x200 for the size? That's what kvmtool uses and, from the virtio-mmio spec, config data from offset 0x100+ is driver-specific. A quick look at the virtio block driver suggests we only use 31 bytes of that at the moment, so 4k is really OTT (and doesn't match the page size for 64K page systems anyway).

With that change:

Cheers,

Will

author
#2 lore raw

PATCH 1/1 arm64: dts: Add a virtio disk to the RTSM motherboard

Quoted 11 lines · Will Deacon

arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi line 189

Quoted 3 lines · Mark Brown
arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi +3 -0
+			virtio_block at 0130000 {
+				compatible = "virtio,mmio";
+				reg = <0x130000 0x1000>;

Can we make this 0x200 for the size? That's what kvmtool uses and, from the virtio-mmio spec, config data from offset 0x100+ is driver-specific. A quick look at the virtio block driver suggests we only use 31 bytes of that at the moment, so 4k is really OTT (and doesn't match the page size for 64K page systems anyway).

Sure, I'll send a patch to make this change for the foundation model too.

Quoted 3 lines

With that change:

Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131203/b2479a04/attachment-0001.sig>