2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 02:34:01 +08:00

ARM: SAMSUNG: Make legacy MFC support code depend on SAMSUNG_ATAGS

This allows to bypass compilation of static platform device and resource
definitions that require interrupts and base addresses to be defined
statically.

Cc: Jeongtae Park <jtp.park@samsung.com>
Cc: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
This commit is contained in:
Tomasz Figa 2013-06-19 01:28:56 +09:00 committed by Kukjin Kim
parent 1816b9ddd0
commit 07fbe13deb

View File

@ -17,10 +17,12 @@
#include <linux/of_fdt.h> #include <linux/of_fdt.h>
#include <linux/of.h> #include <linux/of.h>
#include <plat/mfc.h>
#ifdef CONFIG_SAMSUNG_ATAGS
#include <mach/map.h> #include <mach/map.h>
#include <mach/irqs.h> #include <mach/irqs.h>
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/mfc.h>
static struct resource s5p_mfc_resource[] = { static struct resource s5p_mfc_resource[] = {
[0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K), [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K),
@ -61,6 +63,10 @@ struct platform_device s5p_device_mfc_r = {
.coherent_dma_mask = DMA_BIT_MASK(32), .coherent_dma_mask = DMA_BIT_MASK(32),
}, },
}; };
#else
static struct platform_device s5p_device_mfc_l;
static struct platform_device s5p_device_mfc_r;
#endif
struct s5p_mfc_reserved_mem { struct s5p_mfc_reserved_mem {
phys_addr_t base; phys_addr_t base;
@ -70,6 +76,7 @@ struct s5p_mfc_reserved_mem {
static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata; static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata;
void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize,
phys_addr_t lbase, unsigned int lsize) phys_addr_t lbase, unsigned int lsize)
{ {
@ -93,6 +100,7 @@ void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize,
} }
} }
#ifdef CONFIG_SAMSUNG_ATAGS
static int __init s5p_mfc_memory_init(void) static int __init s5p_mfc_memory_init(void)
{ {
int i; int i;
@ -111,6 +119,7 @@ static int __init s5p_mfc_memory_init(void)
return 0; return 0;
} }
device_initcall(s5p_mfc_memory_init); device_initcall(s5p_mfc_memory_init);
#endif
#ifdef CONFIG_OF #ifdef CONFIG_OF
int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname, int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname,