From 06745d74e46a8dffa768e43b54835aa94903550a Mon Sep 17 00:00:00 2001 From: Chen Gang <762976180@qq.com> Date: Tue, 3 Mar 2015 07:24:26 +0800 Subject: c6x: asm: Add default flat.h according to xtensa architecture For supporting uClinux flat-format executables, c6x needs to define the fewest features to support it, at present, xtensa architecture has the fewest feature for it, so just copy xtensa flat.h. The related error: CC fs/binfmt_flat.o In file included from fs/binfmt_flat.c:36:0: include/linux/flat.h:12:22: fatal error: asm/flat.h: No such file or directory Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/include/asm/flat.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 arch/c6x/include/asm/flat.h (limited to 'arch/c6x/include') diff --git a/arch/c6x/include/asm/flat.h b/arch/c6x/include/asm/flat.h new file mode 100644 index 000000000000..a1858bd5f6c8 --- /dev/null +++ b/arch/c6x/include/asm/flat.h @@ -0,0 +1,12 @@ +#ifndef __ASM_C6X_FLAT_H +#define __ASM_C6X_FLAT_H + +#define flat_argvp_envp_on_stack() 0 +#define flat_old_ram_flag(flags) (flags) +#define flat_reloc_valid(reloc, size) ((reloc) <= (size)) +#define flat_get_addr_from_rp(rp, relval, flags, p) get_unaligned(rp) +#define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val, rp) +#define flat_get_relocate_addr(rel) (rel) +#define flat_set_persistent(relval, p) 0 + +#endif /* __ASM_C6X_FLAT_H */ -- cgit From 9bd54f64afa4da93d8f5751d80466ab3d660b51c Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 4 Mar 2015 06:06:26 +0800 Subject: c6x: include: asm: setup: Include "linux/types.h" Some modules may assume "asm/setup.h" already include all headers which needed by itself. So need let "asm/setup.h" include "linux/types.h", the related error: C [M] drivers/input/joydev.o In file included from include/asm-generic/page.h:23:0, from ./arch/c6x/include/asm/page.h:9, from include/asm-generic/io.h:14, from arch/c6x/include/generated/asm/io.h:1, from drivers/input/joydev.c:15: ./arch/c6x/include/asm/setup.h:17:27: error: unknown type name 'phys_addr_t' extern int c6x_add_memory(phys_addr_t start, unsigned long size); ^ Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/include/asm/setup.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/c6x/include') diff --git a/arch/c6x/include/asm/setup.h b/arch/c6x/include/asm/setup.h index 696804475f55..852afb209afb 100644 --- a/arch/c6x/include/asm/setup.h +++ b/arch/c6x/include/asm/setup.h @@ -12,6 +12,7 @@ #define _ASM_C6X_SETUP_H #include +#include #ifndef __ASSEMBLY__ extern int c6x_add_memory(phys_addr_t start, unsigned long size); -- cgit From 76e018925406b2fd619babc1a9a9e25456017109 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 4 Mar 2015 11:09:35 +0800 Subject: c6x: include: asm: dma-mapping: Add dummy dma_sync_single_range_for_device c6x does not implement get_dma_ops() for dma-mapping-common.h. And in dma-mapping-common.h, dma_sync_single_range_for_device() may be dummy. So c6x can just define a dummy function for allmodconfig building. CC [M] drivers/net/ethernet/micrel/ks8851.o drivers/net/ethernet/micrel/ks8842.c: In function 'ks8842_tx_frame_dma': drivers/net/ethernet/micrel/ks8842.c:453:2: error: implicit declaration of function 'dma_sync_single_range_for_device' [-Werror=implicit-function-declaration] dma_sync_single_range_for_device(adapter->dev, ^ Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/include/asm/dma-mapping.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/c6x/include') diff --git a/arch/c6x/include/asm/dma-mapping.h b/arch/c6x/include/asm/dma-mapping.h index 88bd0d899bdb..bbd7774e4d4e 100644 --- a/arch/c6x/include/asm/dma-mapping.h +++ b/arch/c6x/include/asm/dma-mapping.h @@ -17,6 +17,14 @@ #define dma_supported(d, m) 1 +static inline void dma_sync_single_range_for_device(struct device *dev, + dma_addr_t addr, + unsigned long offset, + size_t size, + enum dma_data_direction dir) +{ +} + static inline int dma_set_mask(struct device *dev, u64 dma_mask) { if (!dev->dma_mask || !dma_supported(dev, dma_mask)) -- cgit From df93ab7552daf664ffa048704729e25f2aeb55ac Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 4 Mar 2015 11:12:10 +0800 Subject: c6x: include: asm: Kbuild: Add generic serial.h Or it will cause building break with allmodconfig: CC [M] drivers/tty/serial/8250/8250_core.o drivers/tty/serial/8250/8250_core.c:102:24: fatal error: asm/serial.h: No such file or directory Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/include/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/c6x/include') diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index 2de73391b81e..ae0a51f5376c 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild @@ -41,6 +41,7 @@ generic-y += resource.h generic-y += scatterlist.h generic-y += segment.h generic-y += sembuf.h +generic-y += serial.h generic-y += shmbuf.h generic-y += shmparam.h generic-y += siginfo.h -- cgit