ARM: S5P: Add virtio-mmio-net and virtio-mmio-blk devices.
authorEvgeny Voevodin <e.voevodin@samsung.com>
Wed, 11 Apr 2012 06:32:10 +0000 (10:32 +0400)
committerEvgeny Voevodin <e.voevodin@samsung.com>
Fri, 14 Sep 2012 05:42:17 +0000 (09:42 +0400)
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
arch/arm/plat-samsung/devs.c
arch/arm/plat-samsung/include/plat/devs.h

index 8b928f9bc1c311e72936ad392f6ed13397bc3317..38f734778c7f0cc2c71b06f574dfc2ececee335e 100644 (file)
@@ -1352,6 +1352,36 @@ struct platform_device s5p_device_mixer = {
 };
 #endif /* CONFIG_S5P_DEV_TV */
 
+#ifdef CONFIG_VIRTIO_MMIO
+#ifdef CONFIG_VIRTIO_BLK
+static struct resource s5p_virtio_mmio_blk_resources[] = {
+       [0] = DEFINE_RES_MEM(0x10AD0000, SZ_4K),
+       [1] = DEFINE_RES_IRQ(IRQ_EINT(7)),
+};
+
+struct platform_device s5p_virtio_mmio_blk_device = {
+       .name           = "virtio-mmio",
+       .id             = 0,
+       .resource       = s5p_virtio_mmio_blk_resources,
+       .num_resources  = ARRAY_SIZE(s5p_virtio_mmio_blk_resources),
+};
+#endif /* CONFIG_VIRTIO_BLK */
+
+#ifdef CONFIG_VIRTIO_NET
+static struct resource s5p_virtio_mmio_net_resources[] = {
+       [0] = DEFINE_RES_MEM(0x10AC0000, SZ_4K),
+       [1] = DEFINE_RES_IRQ(IRQ_EINT(6)),
+};
+
+struct platform_device s5p_virtio_mmio_net_device = {
+       .name           = "virtio-mmio",
+       .id             = -1,
+       .resource       = s5p_virtio_mmio_net_resources,
+       .num_resources  = ARRAY_SIZE(s5p_virtio_mmio_net_resources),
+};
+#endif /* CONFIG_VIRTIO_NET */
+#endif /* CONFIG_VIRTIO_MMIO */
+
 /* USB */
 
 #ifdef CONFIG_S3C_DEV_USB_HOST
index 2155d4af62a30ce2d83c016e097690ba1b0ae316..ff1b77a8befe03d4b0c6cf805af6aea70fccf7f6 100644 (file)
@@ -94,6 +94,8 @@ extern struct platform_device s5p_device_mipi_csis1;
 extern struct platform_device s5p_device_mixer;
 extern struct platform_device s5p_device_onenand;
 extern struct platform_device s5p_device_sdo;
+extern struct platform_device s5p_virtio_mmio_blk_device;
+extern struct platform_device s5p_virtio_mmio_net_device;
 
 extern struct platform_device s5p6440_device_iis;
 extern struct platform_device s5p6440_device_pcm;