From: Maksim Kozlov Date: Fri, 1 Jun 2012 16:58:22 +0000 (+0400) Subject: ARM: VirtIO devices was moved to board specific file X-Git-Tag: 2.2.1_release^2~83^2~7^2~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ac8295493147d57e8aaf7c18271b6d2e438841f;p=sdk%2Femulator%2Femulator-kernel.git ARM: VirtIO devices was moved to board specific file They were moved from plat-samsung to mach-tizen because they cause conflict of IRQs with max8997 device on the other boards. max8997 isn't used on the tizen, but it may be needed on others (nuri, for example) --- diff --git a/arch/arm/mach-exynos/mach-tizen.c b/arch/arm/mach-exynos/mach-tizen.c index f622755fadf0..88f92e0b29c1 100644 --- a/arch/arm/mach-exynos/mach-tizen.c +++ b/arch/arm/mach-exynos/mach-tizen.c @@ -1364,6 +1364,36 @@ static struct platform_device exynos4_bus_devfreq = { .name = "exynos4210-busfreq", }; +#ifdef CONFIG_VIRTIO_MMIO +#ifdef CONFIG_VIRTIO_BLK +static struct resource tizen_virtio_mmio_blk_resources[] = { + [0] = DEFINE_RES_MEM(0x10AD0000, SZ_4K), + [1] = DEFINE_RES_IRQ(IRQ_EINT(7)), +}; + +struct platform_device tizen_virtio_mmio_blk_device = { + .name = "virtio-mmio", + .id = 0, + .resource = tizen_virtio_mmio_blk_resources, + .num_resources = ARRAY_SIZE(tizen_virtio_mmio_blk_resources), +}; +#endif /* CONFIG_VIRTIO_BLK */ + +#ifdef CONFIG_VIRTIO_NET +static struct resource tizen_virtio_mmio_net_resources[] = { + [0] = DEFINE_RES_MEM(0x10AC0000, SZ_4K), + [1] = DEFINE_RES_IRQ(IRQ_EINT(6)), +}; + +struct platform_device tizen_virtio_mmio_net_device = { + .name = "virtio-mmio", + .id = -1, + .resource = tizen_virtio_mmio_net_resources, + .num_resources = ARRAY_SIZE(tizen_virtio_mmio_net_resources), +}; +#endif /* CONFIG_VIRTIO_NET */ +#endif /* CONFIG_VIRTIO_MMIO */ + static struct platform_device *tizen_devices[] __initdata = { /* Samsung Platform Devices */ &s3c_device_i2c5, /* PMIC should initialize first */ @@ -1391,8 +1421,15 @@ static struct platform_device *tizen_devices[] __initdata = { &s5p_device_mfc_l, &s5p_device_mfc_r, &s5p_device_fimc_md, - &s5p_virtio_mmio_blk_device, - &s5p_virtio_mmio_net_device, + +#ifdef CONFIG_VIRTIO_MMIO +#ifdef CONFIG_VIRTIO_BLK + &tizen_virtio_mmio_blk_device, +#endif /* CONFIG_VIRTIO_BLK */ +#ifdef CONFIG_VIRTIO_NET + &tizen_virtio_mmio_net_device, +#endif /* CONFIG_VIRTIO_NET */ +#endif /* CONFIG_VIRTIO_MMIO */ /* Tizen Devices */ &tizen_gpio_keys, diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 38f734778c7f..8b928f9bc1c3 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -1352,36 +1352,6 @@ 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 diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index ff1b77a8befe..2155d4af62a3 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h @@ -94,8 +94,6 @@ 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;