diff options
author | Tomasz Figa <t.figa@samsung.com> | 2014-07-02 19:40:44 +0200 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-07-19 04:32:18 +0900 |
commit | d78c16ccde96eddf42942c093b241b5e5135b777 (patch) | |
tree | 3bedb6c54ec937d57d8d9e3f473739a78c1ae5ad /arch/arm/plat-samsung/s5p-dev-mfc.c | |
parent | 09ee2dac4c07016c6bc7577152822996c9a7c122 (diff) | |
download | op-kernel-dev-d78c16ccde96eddf42942c093b241b5e5135b777.zip op-kernel-dev-d78c16ccde96eddf42942c093b241b5e5135b777.tar.gz |
ARM: SAMSUNG: Remove remaining legacy code
After refactoring suspend/resume, which was last part with dependencies
on legacy code, all Kconfig symbols related to Samsung ATAGS support can
be deselected and more unused code removed. This includes most of s5p-*
code as well, as s5pv210 was their last user.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung/s5p-dev-mfc.c')
-rw-r--r-- | arch/arm/plat-samsung/s5p-dev-mfc.c | 81 |
1 files changed, 9 insertions, 72 deletions
diff --git a/arch/arm/plat-samsung/s5p-dev-mfc.c b/arch/arm/plat-samsung/s5p-dev-mfc.c index 469b862..0b04b6b0 100644 --- a/arch/arm/plat-samsung/s5p-dev-mfc.c +++ b/arch/arm/plat-samsung/s5p-dev-mfc.c @@ -17,56 +17,16 @@ #include <linux/of_fdt.h> #include <linux/of.h> -#include <plat/mfc.h> - -#ifdef CONFIG_SAMSUNG_ATAGS -#include <mach/map.h> -#include <mach/irqs.h> -#include <plat/devs.h> - -static struct resource s5p_mfc_resource[] = { - [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K), - [1] = DEFINE_RES_IRQ(IRQ_MFC), -}; - -struct platform_device s5p_device_mfc = { - .name = "s5p-mfc", - .id = -1, - .num_resources = ARRAY_SIZE(s5p_mfc_resource), - .resource = s5p_mfc_resource, -}; - -/* - * MFC hardware has 2 memory interfaces which are modelled as two separate - * platform devices to let dma-mapping distinguish between them. - * - * MFC parent device (s5p_device_mfc) must be registered before memory - * interface specific devices (s5p_device_mfc_l and s5p_device_mfc_r). - */ - -struct platform_device s5p_device_mfc_l = { - .name = "s5p-mfc-l", - .id = -1, - .dev = { - .parent = &s5p_device_mfc.dev, - .dma_mask = &s5p_device_mfc_l.dev.coherent_dma_mask, - .coherent_dma_mask = DMA_BIT_MASK(32), - }, -}; - -struct platform_device s5p_device_mfc_r = { - .name = "s5p-mfc-r", - .id = -1, - .dev = { - .parent = &s5p_device_mfc.dev, - .dma_mask = &s5p_device_mfc_r.dev.coherent_dma_mask, - .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_dt_meminfo { + unsigned long loff; + unsigned long lsize; + unsigned long roff; + unsigned long rsize; + char *compatible; +}; struct s5p_mfc_reserved_mem { phys_addr_t base; @@ -77,7 +37,7 @@ struct s5p_mfc_reserved_mem { static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata; -void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, +static void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, phys_addr_t lbase, unsigned int lsize) { int i; @@ -100,28 +60,6 @@ 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) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(s5p_mfc_mem); i++) { - struct s5p_mfc_reserved_mem *area = &s5p_mfc_mem[i]; - if (!area->base) - continue; - - if (dma_declare_coherent_memory(area->dev, area->base, - area->base, area->size, - DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE) == 0) - printk(KERN_ERR "Failed to declare coherent memory for MFC device (%ld bytes at 0x%08lx)\n", - area->size, (unsigned long) area->base); - } - return 0; -} -device_initcall(s5p_mfc_memory_init); -#endif - -#ifdef CONFIG_OF int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname, int depth, void *data) { @@ -154,4 +92,3 @@ int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname, return 1; } -#endif |