Re: [PATCH] net: stmmac: add dcrs parameter

2014-08-26 Thread Ley Foon Tan
On Tue, Aug 26, 2014 at 9:20 PM, Giuseppe CAVALLARO wrote: >>> >>> >>> >>> Indeed this is what I had done in the patch. >>> >>> >>> http://git.stlinux.com/?p=stm/linux-sh4-2.6.32.y.git;a=commit;h=b0b863bf65c36dc593f6b7b4b418394fd880dae2 >>> >>> Also in case of carrier sense the frame will be drop

Re: [PATCH] net: stmmac: fix warning from Sparse for socfpga

2014-08-27 Thread Ley Foon Tan
On Thu, Aug 28, 2014 at 7:33 AM, David Miller wrote: > From: Ley Foon Tan > Date: Tue, 26 Aug 2014 15:11:16 +0800 > >> @@ -119,7 +119,8 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac >> *dwmac, struct device * >>

[PATCH (net-next) v3] net: stmmac: fix warning from Sparse for socfpga

2014-08-27 Thread Ley Foon Tan
Warning: drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:122:41: sparse: cast removes address space of expression drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:122:38: sparse: incorrect type in assignment (different address spaces) Signed-off-by: Ley Foon Tan --- drivers/net/ethernet

[PATCH v3 00/29] nios2 Linux kernel port

2014-09-08 Thread Ley Foon Tan
* remove nommu comment from license header patchset history - [v1] : https://lkml.org/lkml/2014/4/18/216 [v2] : https://lkml.org/lkml/2014/7/15/120 Ley Foon Tan (29): asm-generic: add generic futex for !CONFIG_SMP nios2: Assembly macros and definitions nios2: Kernel booting and

[PATCH v3 08/29] nios2: MMU Fault handling

2014-09-08 Thread Ley Foon Tan
This patch adds support for the handling of the MMU faults (exception entry code introduced by a previous patch, kernel/entry.S). Signed-off-by: Ley Foon Tan --- arch/nios2/mm/extable.c | 25 + arch/nios2/mm/fault.c | 251 2 files changed

[PATCH v3 03/29] nios2: Kernel booting and initialization

2014-09-08 Thread Ley Foon Tan
This patch adds the kernel booting and the initial setup code. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/entry.h | 120 ++ arch/nios2/include/asm/setup.h | 38 +++ arch/nios2/kernel/head.S | 175 arch/nios2/kernel

[PATCH v3 18/29] nios2: Signal handling support

2014-09-08 Thread Ley Foon Tan
This patch adds support for signal handling. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/signal.h | 22 +++ arch/nios2/include/asm/ucontext.h| 32 arch/nios2/include/uapi/asm/sigcontext.h | 28 +++ arch/nios2/include/uapi/asm/signal.h | 23 +++ arch

[PATCH v3 16/29] nios2: ELF definitions

2014-09-08 Thread Ley Foon Tan
This patch adds definitions for the ELF format Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/elf.h | 101 ++ arch/nios2/include/uapi/asm/elf.h | 67 + 2 files changed, 168 insertions(+) create mode 100644 arch/nios2

[PATCH v3 02/29] nios2: Assembly macros and definitions

2014-09-08 Thread Ley Foon Tan
This patch add assembly macros and definitions used in the .S files across arch/nios2/ and together with asm-offsets.c. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/asm-macros.h | 309 +++ arch/nios2/include/asm/asm-offsets.h | 20 +++ arch/nios2

[PATCH v3 06/29] nios2: Memory management

2014-09-08 Thread Ley Foon Tan
This patch contains the initialisation of the memory blocks, MMU attributes and the memory map. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/mmu.h | 16 +++ arch/nios2/include/asm/page.h| 111 +++ arch/nios2/include/asm/uaccess.h | 231

[PATCH v3 07/29] nios2: I/O Mapping

2014-09-08 Thread Ley Foon Tan
This patch adds several definitions for I/O accessors and ioremap(). Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/io.h | 84 arch/nios2/lib/io.c | 138 arch/nios2/mm/ioremap.c | 186

[PATCH v3 05/29] nios2: Traps exception handling

2014-09-08 Thread Ley Foon Tan
This patch contains traps exception handling. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/traps.h | 19 ++ arch/nios2/kernel/insnemu.S| 592 + arch/nios2/kernel/traps.c | 185 + 3 files changed, 796 insertions(+) create

[PATCH v3 20/29] nios2: Device tree support

2014-09-08 Thread Ley Foon Tan
Add device tree support to arch/nios2. Signed-off-by: Ley Foon Tan --- Documentation/devicetree/bindings/nios2/nios2.txt | 62 Documentation/devicetree/bindings/nios2/timer.txt | 19 +++ arch/nios2/boot/dts/3c120_devboard.dts| 164 ++ arch/nios2/boot

[PATCH v3 27/29] MAINTAINERS: Add nios2 maintainer

2014-09-08 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index cf24bb5..01a509c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6423,6 +6423,13 @@ S: Maintained F: Documentation/scsi/NinjaSCSI.txt F: drivers

[PATCH v3 26/29] nios2: ptrace support

2014-09-08 Thread Ley Foon Tan
Add ptrace support for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/ptrace.h | 33 +++ arch/nios2/include/uapi/asm/ptrace.h | 120 arch/nios2/kernel/ptrace.c | 176 +++ 3 files changed, 329 insertions

[PATCH v3 23/29] nios2: Miscellaneous header files

2014-09-08 Thread Ley Foon Tan
This patch introduces a few nios2-specific header files. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/cmpxchg.h| 61 + arch/nios2/include/asm/linkage.h| 25 ++ arch/nios2/include/asm/mutex.h | 1 + arch/nios2

[PATCH v3 24/29] nios2: Nios2 registers

2014-09-08 Thread Ley Foon Tan
This file contains constants for the instruction macros, cpu registers, fields and bits. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/registers.h | 71 ++ 1 file changed, 71 insertions(+) create mode 100644 arch/nios2/include/asm/registers.h diff

[PATCH v3 21/29] nios2: Time keeping

2014-09-08 Thread Ley Foon Tan
Add time keeping code for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/delay.h | 21 +++ arch/nios2/include/asm/timex.h | 26 arch/nios2/kernel/time.c | 318 + arch/nios2/lib/delay.c | 52 +++ 4 files changed

[PATCH v3 17/29] nios2: System calls handling

2014-09-08 Thread Ley Foon Tan
This patch adds support for system calls from userspaces. It uses the asm-generic/unistd.h definitions with architecture spcific syscall. The sys_call_table is just an array defined in a C file and it contains pointers to the syscall functions. Signed-off-by: Ley Foon Tan --- arch/nios2

[PATCH v3 25/29] nios2: Module support

2014-09-08 Thread Ley Foon Tan
This patch adds support for loadable modules. Signed-off-by: Ley Foon Tan --- arch/nios2/kernel/module.c | 137 + 1 file changed, 137 insertions(+) create mode 100644 arch/nios2/kernel/module.c diff --git a/arch/nios2/kernel/module.c b/arch/nios2

[PATCH v3 22/29] nios2: Cpuinfo handling

2014-09-08 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/cpuinfo.h | 57 +++ arch/nios2/kernel/cpuinfo.c | 201 +++ 2 files changed, 258 insertions(+) create mode 100644 arch/nios2/include/asm/cpuinfo.h create mode 100644 arch/nios2/kernel

[PATCH v3 28/29] Documentation: Add documentation for Nios2 architecture

2014-09-08 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- Documentation/nios2/README | 23 +++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/nios2/README diff --git a/Documentation/nios2/README b/Documentation/nios2/README new file mode 100644 index 000..054a67d --- /dev/null

[PATCH v3 12/29] nios2: TLB handling

2014-09-08 Thread Ley Foon Tan
This patch adds the TLB maintenance functions. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/tlb.h | 34 + arch/nios2/include/asm/tlbflush.h | 46 +++ arch/nios2/mm/tlb.c | 274 ++ 3 files changed, 354 insertions

[PATCH v3 11/29] nios2: Cache handling

2014-09-08 Thread Ley Foon Tan
This patch adds functionality required for cache maintenance. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/cache.h | 36 + arch/nios2/include/asm/cacheflush.h | 52 +++ arch/nios2/mm/cacheflush.c | 270 3 files changed, 358

[PATCH v3 14/29] nios2: DMA mapping API

2014-09-08 Thread Ley Foon Tan
This patch adds support for the DMA mapping API. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/dma-mapping.h | 130 arch/nios2/mm/dma-mapping.c | 185 +++ 2 files changed, 315 insertions(+) create mode 100644 arch/nios2

[PATCH v3 04/29] nios2: Exception handling

2014-09-08 Thread Ley Foon Tan
This patch contains the exception entry code (kernel/entry.S) and misaligned exception. Signed-off-by: Ley Foon Tan --- arch/nios2/kernel/entry.S | 548 + arch/nios2/kernel/misaligned.c | 255 +++ 2 files changed, 803 insertions

[PATCH v3 09/29] nios2: Page table management

2014-09-08 Thread Ley Foon Tan
This patch adds support for page table management. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/pgalloc.h | 86 ++ arch/nios2/include/asm/pgtable-bits.h | 35 arch/nios2/include/asm/pgtable.h | 305 ++ arch/nios2/mm/pgtable.c

[PATCH v3 29/29] nios2: Build infrastructure

2014-09-08 Thread Ley Foon Tan
This patch adds Makefile and Kconfig files required for building a nios2 kernel. Signed-off-by: Ley Foon Tan --- arch/nios2/Kconfig | 201 +++ arch/nios2/Kconfig.debug | 17 +++ arch/nios2/Makefile | 73

[PATCH v3 19/29] nios2: Library functions

2014-09-08 Thread Ley Foon Tan
Add optimised library functions for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/checksum.h | 78 +++ arch/nios2/include/asm/string.h | 24 + arch/nios2/lib/memcpy.c | 199 ++ arch/nios2/lib/memmove.c

[PATCH v3 10/29] nios2: Process management

2014-09-08 Thread Ley Foon Tan
This patch adds support for thread creation and context switching. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/mmu_context.h | 66 + arch/nios2/include/asm/processor.h | 103 ++ arch/nios2/include/asm/switch_to.h | 31 + arch/nios2/include/asm

[PATCH v3 15/29] Add ELF machine define for Nios2

2014-09-08 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- include/uapi/linux/elf-em.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h index 01529bd..7f06c0d 100644 --- a/include/uapi/linux/elf-em.h +++ b/include/uapi/linux/elf-em.h @@ -33,6 +33,7 @@ #define

[PATCH v3 01/29] asm-generic: add generic futex for !CONFIG_SMP

2014-09-08 Thread Ley Foon Tan
Follow m68k futex implementation for !CONFIG_SMP. Signed-off-by: Ley Foon Tan --- include/asm-generic/futex.h | 82 + 1 file changed, 82 insertions(+) diff --git a/include/asm-generic/futex.h b/include/asm-generic/futex.h index 01f227e..f5650a5

[PATCH v3 13/29] nios2: Interrupt handling

2014-09-08 Thread Ley Foon Tan
This patch adds the support for IRQ handling. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/irq.h | 28 arch/nios2/include/asm/irqflags.h | 69 + arch/nios2/kernel/irq.c | 93 +++ 3 files

[PATCH] net: stmmac: add fix_mac_speed support for socfpga

2014-08-19 Thread Ley Foon Tan
system. Software needs to update a register in splitter core when there is speed change. Signed-off-by: Ley Foon Tan --- .../devicetree/bindings/net/socfpga-dwmac.txt | 4 ++ .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c| 63 ++ 2 files changed, 67 insertions(+) diff

Re: [PATCH v2 20/29] nios2: Cpuinfo handling

2014-08-06 Thread Ley Foon Tan
On Fri, Jul 18, 2014 at 10:43 AM, Ley Foon Tan wrote: > On Tue, Jul 15, 2014 at 5:47 PM, Arnd Bergmann wrote: >> On Tuesday 15 July 2014 16:45:47 Ley Foon Tan wrote: >>> +static void *cpuinfo_start(struct seq_file *m, loff_t *pos) >>> +{ >>

Re: [PATCH v2 16/29] nios2: Signal handling support

2014-08-08 Thread Ley Foon Tan
On Fri, Jul 18, 2014 at 4:04 PM, Richard Weinberger wrote: >> + >> +#include >> +#include >> + >> +#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) >> + >> +static int do_signal(struct pt_regs *regs, int in_syscall); > > Do you really need this prototype? Yes, we don't need this. Wil

Re: [PATCH v5 21/29] nios2: Time keeping

2014-10-30 Thread Ley Foon Tan
On Tue, Oct 28, 2014 at 11:15 PM, Thomas Gleixner wrote: > On Tue, 28 Oct 2014, Ley Foon Tan wrote: >> On Sel, 2014-10-28 at 10:23 +0100, Arnd Bergmann wrote: >> > On Tuesday 28 October 2014 10:46:29 Ley Foon Tan wrote: >> > > On Sun, Oct 26, 2014 at 5:10 AM,

Re: [PATCH v5 29/29] nios2: Build infrastructure

2014-10-30 Thread Ley Foon Tan
On Tue, Oct 28, 2014 at 9:38 PM, Arnd Bergmann wrote: > On Friday 24 October 2014 16:24:31 Ley Foon Tan wrote: >> +DECLARE_EXPORT(__gcc_bcmp); >> +DECLARE_EXPORT(__divdi3); >> +DECLARE_EXPORT(__divsi3); >> +DECLARE_EXPORT(__moddi3); >> +DECLARE_EXPORT(__mods

Re: [PATCH v5 29/29] nios2: Build infrastructure

2014-10-30 Thread Ley Foon Tan
On Thu, Oct 30, 2014 at 7:33 PM, Arnd Bergmann wrote: > On Thursday 30 October 2014 18:44:37 Ley Foon Tan wrote: >> > >> > I don't remember what all of these are, but at least some of them seem >> > to be concerned with 64-bit division. By convention, we do

Re: [PATCH v5 21/29] nios2: Time keeping

2014-10-27 Thread Ley Foon Tan
On Sun, Oct 26, 2014 at 5:10 AM, Thomas Gleixner wrote: > On Fri, 24 Oct 2014, Ley Foon Tan wrote: >> +#ifndef _ASM_NIOS2_TIMEX_H >> +#define _ASM_NIOS2_TIMEX_H >> + >> +typedef unsigned long cycles_t; >> + >> +extern cycles_t get_cycles(void); >> + &g

Re: [PATCH v5 21/29] nios2: Time keeping

2014-10-28 Thread Ley Foon Tan
On Sel, 2014-10-28 at 10:23 +0100, Arnd Bergmann wrote: > On Tuesday 28 October 2014 10:46:29 Ley Foon Tan wrote: > > On Sun, Oct 26, 2014 at 5:10 AM, Thomas Gleixner wrote: > > > On Fri, 24 Oct 2014, Ley Foon Tan wrote: > > >> +#ifndef _ASM_NIOS2_TIMEX_H >

Re: [PATCH v5 07/29] nios2: I/O Mapping

2014-10-29 Thread Ley Foon Tan
On Tue, Oct 28, 2014 at 9:30 PM, Arnd Bergmann wrote: > On Friday 24 October 2014 16:24:09 Ley Foon Tan wrote: > >> +/* PCI is not supported in nios2, set this to 0. */ >> +#define IO_SPACE_LIMIT 0 >> + >> +extern void outsb(unsigned long addr, const void *buf, i

Re: [PATCH v5 21/29] nios2: Time keeping

2014-10-29 Thread Ley Foon Tan
On Tue, Oct 28, 2014 at 9:39 PM, Arnd Bergmann wrote: >> Hi Arnd, >> No problem, I can change that. But, seem that we don't need to have >> calibrate_delay_is_known() as well. We can just set "lpj_fine" variable, >> arm64 uses this. > > Right, that works too. Okay. > >> BTW, do you have further c

[PATCH v5 01/29] asm-generic: add generic futex for !CONFIG_SMP

2014-10-24 Thread Ley Foon Tan
Follow m68k futex implementation for !CONFIG_SMP. Signed-off-by: Ley Foon Tan Acked-by: Arnd Bergmann --- include/asm-generic/futex.h | 82 + 1 file changed, 82 insertions(+) diff --git a/include/asm-generic/futex.h b/include/asm-generic/futex.h

[PATCH v5 03/29] nios2: Kernel booting and initialization

2014-10-24 Thread Ley Foon Tan
This patch adds the kernel booting and the initial setup code. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/entry.h | 120 +++ arch/nios2/include/asm/setup.h | 38 +++ arch/nios2/kernel/head.S | 175 + arch/nios2/kernel

[PATCH v5 08/29] nios2: MMU Fault handling

2014-10-24 Thread Ley Foon Tan
This patch adds support for the handling of the MMU faults (exception entry code introduced by a previous patch, kernel/entry.S). Signed-off-by: Ley Foon Tan --- arch/nios2/mm/extable.c | 25 + arch/nios2/mm/fault.c | 251 2 files changed

[PATCH v5 15/29] Add ELF machine define for Nios2

2014-10-24 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan Acked-by: Arnd Bergmann --- include/uapi/linux/elf-em.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h index aa90bc9..ae99f77 100644 --- a/include/uapi/linux/elf-em.h +++ b/include/uapi/linux/elf-em.h

[PATCH v5 12/29] nios2: TLB handling

2014-10-24 Thread Ley Foon Tan
This patch adds the TLB maintenance functions. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/tlb.h | 34 + arch/nios2/include/asm/tlbflush.h | 46 +++ arch/nios2/mm/tlb.c | 274 ++ 3 files changed, 354 insertions

[PATCH v5 22/29] nios2: Cpuinfo handling

2014-10-24 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/cpuinfo.h | 57 +++ arch/nios2/kernel/cpuinfo.c | 201 +++ 2 files changed, 258 insertions(+) create mode 100644 arch/nios2/include/asm/cpuinfo.h create mode 100644 arch/nios2/kernel

[PATCH v5 21/29] nios2: Time keeping

2014-10-24 Thread Ley Foon Tan
Add time keeping code for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/delay.h | 21 +++ arch/nios2/include/asm/timex.h | 26 arch/nios2/kernel/time.c | 320 + arch/nios2/lib/delay.c | 52 +++ 4 files changed

[PATCH v5 23/29] nios2: Miscellaneous header files

2014-10-24 Thread Ley Foon Tan
This patch introduces a few nios2-specific header files. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/cmpxchg.h| 61 + arch/nios2/include/asm/linkage.h| 25 ++ arch/nios2/include/asm/mutex.h | 1 + arch/nios2

[PATCH v5 19/29] nios2: Library functions

2014-10-24 Thread Ley Foon Tan
Add optimised library functions for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/checksum.h | 78 +++ arch/nios2/include/asm/string.h | 24 + arch/nios2/lib/memcpy.c | 199 ++ arch/nios2/lib/memmove.c

[PATCH v5 28/29] Documentation: Add documentation for Nios2 architecture

2014-10-24 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- Documentation/nios2/README | 23 +++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/nios2/README diff --git a/Documentation/nios2/README b/Documentation/nios2/README new file mode 100644 index 000..054a67d --- /dev/null

[PATCH v5 26/29] nios2: ptrace support

2014-10-24 Thread Ley Foon Tan
Add ptrace support for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/ptrace.h | 33 +++ arch/nios2/include/uapi/asm/ptrace.h | 120 + arch/nios2/kernel/ptrace.c | 166 +++ 3 files changed, 319 insertions

[PATCH v5 24/29] nios2: Nios2 registers

2014-10-24 Thread Ley Foon Tan
This file contains constants for the instruction macros, cpu registers, fields and bits. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/registers.h | 71 ++ 1 file changed, 71 insertions(+) create mode 100644 arch/nios2/include/asm/registers.h diff

[PATCH v5 29/29] nios2: Build infrastructure

2014-10-24 Thread Ley Foon Tan
This patch adds Makefile and Kconfig files required for building a nios2 kernel. Signed-off-by: Ley Foon Tan --- arch/nios2/Kconfig | 201 +++ arch/nios2/Kconfig.debug | 17 +++ arch/nios2/Makefile | 73

[PATCH v5 27/29] MAINTAINERS: Add nios2 maintainer

2014-10-24 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a20df9b..3179a0d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6525,6 +6525,13 @@ S: Maintained F: Documentation/scsi/NinjaSCSI.txt F: drivers

[PATCH v5 25/29] nios2: Module support

2014-10-24 Thread Ley Foon Tan
This patch adds support for loadable modules. Signed-off-by: Ley Foon Tan --- arch/nios2/kernel/module.c | 137 + 1 file changed, 137 insertions(+) create mode 100644 arch/nios2/kernel/module.c diff --git a/arch/nios2/kernel/module.c b/arch/nios2

[PATCH v5 17/29] nios2: System calls handling

2014-10-24 Thread Ley Foon Tan
This patch adds support for system calls from userspaces. It uses the asm-generic/unistd.h definitions with architecture spcific syscall. The sys_call_table is just an array defined in a C file and it contains pointers to the syscall functions. Signed-off-by: Ley Foon Tan --- arch/nios2/include

[PATCH v5 18/29] nios2: Signal handling support

2014-10-24 Thread Ley Foon Tan
This patch adds support for signal handling. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/signal.h | 22 +++ arch/nios2/include/asm/ucontext.h| 32 arch/nios2/include/uapi/asm/sigcontext.h | 28 +++ arch/nios2/include/uapi/asm/signal.h | 23 +++ arch

[PATCH v5 20/29] nios2: Device tree support

2014-10-24 Thread Ley Foon Tan
Add device tree support to arch/nios2. Signed-off-by: Ley Foon Tan --- Documentation/devicetree/bindings/nios2/nios2.txt | 62 Documentation/devicetree/bindings/nios2/timer.txt | 19 +++ arch/nios2/boot/dts/3c120_devboard.dts| 164 ++ arch/nios2/boot

[PATCH v5 16/29] nios2: ELF definitions

2014-10-24 Thread Ley Foon Tan
This patch adds definitions for the ELF format Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/elf.h | 101 ++ arch/nios2/include/uapi/asm/elf.h | 67 + 2 files changed, 168 insertions(+) create mode 100644 arch/nios2

[PATCH v5 13/29] nios2: Interrupt handling

2014-10-24 Thread Ley Foon Tan
This patch adds the support for IRQ handling. Signed-off-by: Ley Foon Tan Reviewed-by: Thomas Gleixner --- arch/nios2/include/asm/irq.h | 28 arch/nios2/include/asm/irqflags.h | 69 + arch/nios2/kernel/irq.c | 93

[PATCH v5 14/29] nios2: DMA mapping API

2014-10-24 Thread Ley Foon Tan
This patch adds support for the DMA mapping API. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/dma-mapping.h | 130 arch/nios2/mm/dma-mapping.c | 185 +++ 2 files changed, 315 insertions(+) create mode 100644 arch/nios2

[PATCH v5 11/29] nios2: Cache handling

2014-10-24 Thread Ley Foon Tan
This patch adds functionality required for cache maintenance. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/cache.h | 36 + arch/nios2/include/asm/cacheflush.h | 52 +++ arch/nios2/mm/cacheflush.c | 270 3 files changed, 358

[PATCH v5 07/29] nios2: I/O Mapping

2014-10-24 Thread Ley Foon Tan
This patch adds several definitions for I/O accessors and ioremap(). Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/io.h | 84 arch/nios2/lib/io.c | 138 arch/nios2/mm/ioremap.c | 186

[PATCH v5 10/29] nios2: Process management

2014-10-24 Thread Ley Foon Tan
This patch adds support for thread creation and context switching. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/mmu_context.h | 66 + arch/nios2/include/asm/processor.h | 103 ++ arch/nios2/include/asm/switch_to.h | 31 + arch/nios2/include/asm

[PATCH v5 09/29] nios2: Page table management

2014-10-24 Thread Ley Foon Tan
This patch adds support for page table management. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/pgalloc.h | 86 ++ arch/nios2/include/asm/pgtable-bits.h | 35 arch/nios2/include/asm/pgtable.h | 305 ++ arch/nios2/mm/pgtable.c

[PATCH v5 04/29] nios2: Exception handling

2014-10-24 Thread Ley Foon Tan
This patch contains the exception entry code (kernel/entry.S) and misaligned exception. Signed-off-by: Ley Foon Tan --- arch/nios2/kernel/entry.S | 559 + arch/nios2/kernel/misaligned.c | 255 +++ 2 files changed, 814 insertions

[PATCH v5 05/29] nios2: Traps exception handling

2014-10-24 Thread Ley Foon Tan
This patch contains traps exception handling. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/traps.h | 19 ++ arch/nios2/kernel/insnemu.S| 592 + arch/nios2/kernel/traps.c | 185 + 3 files changed, 796 insertions(+) create

[PATCH v5 06/29] nios2: Memory management

2014-10-24 Thread Ley Foon Tan
This patch contains the initialisation of the memory blocks, MMU attributes and the memory map. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/mmu.h | 16 +++ arch/nios2/include/asm/page.h| 111 +++ arch/nios2/include/asm/uaccess.h | 231

[PATCH v5 02/29] nios2: Assembly macros and definitions

2014-10-24 Thread Ley Foon Tan
This patch add assembly macros and definitions used in the .S files across arch/nios2/ and together with asm-offsets.c. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/asm-macros.h | 309 +++ arch/nios2/include/asm/asm-offsets.h | 20 +++ arch/nios2

[PATCH v5 00/29] nios2 Linux kernel port

2014-10-24 Thread Ley Foon Tan
://lkml.org/lkml/2014/7/15/120 [v3] : https://lkml.org/lkml/2014/9/8/139 [v4] : https://lkml.org/lkml/2014/10/8/141 Ley Foon Tan (29): asm-generic: add generic futex for !CONFIG_SMP nios2: Assembly macros and definitions nios2: Kernel booting and initialization nios2: Exception handling nios2

Re: [PATCH v5 04/29] nios2: Exception handling

2014-10-27 Thread Ley Foon Tan
On Fri, Oct 24, 2014 at 5:15 PM, Geert Uytterhoeven wrote: > On Fri, Oct 24, 2014 at 10:24 AM, Ley Foon Tan wrote: >> --- /dev/null >> +++ b/arch/nios2/kernel/entry.S >> @@ -0,0 +1,559 @@ >> +/* >> + * linux/arch/nios2/kernel/entry.S >> + * >> +

Re: [PATCH v5 29/29] nios2: Build infrastructure

2014-10-27 Thread Ley Foon Tan
On Fri, Oct 24, 2014 at 5:10 PM, Geert Uytterhoeven wrote: > On Fri, Oct 24, 2014 at 10:24 AM, Ley Foon Tan wrote: >> --- /dev/null >> +++ b/arch/nios2/boot/install.sh >> @@ -0,0 +1,52 @@ >> +#!/bin/sh >> +# >> +# This file is subject to the terms a

Re: [PATCH v6 00/29] nios2 Linux kernel port

2014-11-07 Thread Ley Foon Tan
On Fri, Nov 7, 2014 at 3:39 PM, LF.Tan wrote: > On Mon, Nov 3, 2014 at 6:51 PM, Ley Foon Tan wrote: >> >> This is the 6th version of patchset adds the Linux kernel port for Nios II >> processor from Altera. All of the feedback from v5 patchseries has been >> address

[PATCH v6 00/29] nios2 Linux kernel port

2014-11-03 Thread Ley Foon Tan
] : https://lkml.org/lkml/2014/10/24/104 Ley Foon Tan (29): asm-generic: add generic futex for !CONFIG_SMP nios2: Assembly macros and definitions nios2: Kernel booting and initialization nios2: Exception handling nios2: Traps exception handling nios2: Memory management nios2: I/O

[PATCH v6 18/29] nios2: Signal handling support

2014-11-03 Thread Ley Foon Tan
This patch adds support for signal handling. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/signal.h | 22 +++ arch/nios2/include/asm/ucontext.h| 32 +++ arch/nios2/include/uapi/asm/sigcontext.h | 28 +++ arch/nios2/include/uapi/asm/signal.h | 23 +++ arch/nios2

[PATCH v6 05/29] nios2: Traps exception handling

2014-11-03 Thread Ley Foon Tan
This patch contains traps exception handling. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/traps.h | 19 ++ arch/nios2/kernel/insnemu.S| 592 + arch/nios2/kernel/traps.c | 185 + 3 files changed, 796 insertions(+) create

[PATCH v6 02/29] nios2: Assembly macros and definitions

2014-11-03 Thread Ley Foon Tan
This patch add assembly macros and definitions used in the .S files across arch/nios2/ and together with asm-offsets.c. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/asm-macros.h | 309 +++ arch/nios2/include/asm/asm-offsets.h | 20 +++ arch/nios2

[PATCH v6 07/29] nios2: I/O Mapping

2014-11-03 Thread Ley Foon Tan
This patch adds several definitions for I/O accessors and ioremap(). Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/io.h | 61 +++ arch/nios2/mm/ioremap.c | 187 2 files changed, 248 insertions(+) create mode 100644 arch

[PATCH v6 11/29] nios2: Cache handling

2014-11-03 Thread Ley Foon Tan
This patch adds functionality required for cache maintenance. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/cache.h | 36 + arch/nios2/include/asm/cacheflush.h | 52 +++ arch/nios2/mm/cacheflush.c | 271 3 files changed, 359

[PATCH v6 13/29] nios2: Interrupt handling

2014-11-03 Thread Ley Foon Tan
This patch adds the support for IRQ handling. Signed-off-by: Ley Foon Tan Reviewed-by: Thomas Gleixner --- arch/nios2/include/asm/irq.h | 28 arch/nios2/include/asm/irqflags.h | 72 ++ arch/nios2/kernel/irq.c | 93

[PATCH v6 20/29] nios2: Device tree support

2014-11-03 Thread Ley Foon Tan
Add device tree support to arch/nios2. Signed-off-by: Ley Foon Tan --- Documentation/devicetree/bindings/nios2/nios2.txt | 62 Documentation/devicetree/bindings/nios2/timer.txt | 19 +++ arch/nios2/boot/dts/3c120_devboard.dts| 164 ++ arch/nios2/boot

[PATCH v6 09/29] nios2: Page table management

2014-11-03 Thread Ley Foon Tan
This patch adds support for page table management. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/pgalloc.h | 86 ++ arch/nios2/include/asm/pgtable-bits.h | 35 arch/nios2/include/asm/pgtable.h | 310 ++ arch/nios2/mm/pgtable.c

[PATCH v6 01/29] asm-generic: add generic futex for !CONFIG_SMP

2014-11-03 Thread Ley Foon Tan
Follow m68k futex implementation for !CONFIG_SMP. Signed-off-by: Ley Foon Tan Acked-by: Arnd Bergmann --- include/asm-generic/futex.h | 114 1 file changed, 114 insertions(+) diff --git a/include/asm-generic/futex.h b/include/asm-generic/futex.h

[PATCH v6 15/29] Add ELF machine define for Nios2

2014-11-03 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan Acked-by: Arnd Bergmann --- include/uapi/linux/elf-em.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h index aa90bc9..ae99f77 100644 --- a/include/uapi/linux/elf-em.h +++ b/include/uapi/linux/elf-em.h

[PATCH v6 23/29] nios2: Miscellaneous header files

2014-11-03 Thread Ley Foon Tan
This patch introduces a few nios2-specific header files. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/cmpxchg.h| 61 + arch/nios2/include/asm/linkage.h| 25 ++ arch/nios2/include/asm/mutex.h | 1 + arch/nios2

[PATCH v6 21/29] nios2: Time keeping

2014-11-03 Thread Ley Foon Tan
Add time keeping code for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/delay.h | 21 +++ arch/nios2/include/asm/timex.h | 24 arch/nios2/kernel/time.c | 310 + arch/nios2/lib/delay.c | 52 +++ 4 files changed

[PATCH v6 29/29] nios2: Build infrastructure

2014-11-03 Thread Ley Foon Tan
This patch adds Makefile and Kconfig files required for building a nios2 kernel. Signed-off-by: Ley Foon Tan --- arch/nios2/Kconfig | 201 +++ arch/nios2/Kconfig.debug | 17 +++ arch/nios2/Makefile | 73

[PATCH v6 25/29] nios2: Module support

2014-11-03 Thread Ley Foon Tan
This patch adds support for loadable modules. Signed-off-by: Ley Foon Tan --- arch/nios2/kernel/module.c | 138 + 1 file changed, 138 insertions(+) create mode 100644 arch/nios2/kernel/module.c diff --git a/arch/nios2/kernel/module.c b/arch/nios2

[PATCH v6 22/29] nios2: Cpuinfo handling

2014-11-03 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/cpuinfo.h | 57 +++ arch/nios2/kernel/cpuinfo.c | 201 +++ 2 files changed, 258 insertions(+) create mode 100644 arch/nios2/include/asm/cpuinfo.h create mode 100644 arch/nios2/kernel

[PATCH v6 28/29] Documentation: Add documentation for Nios2 architecture

2014-11-03 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- Documentation/nios2/README | 23 +++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/nios2/README diff --git a/Documentation/nios2/README b/Documentation/nios2/README new file mode 100644 index 000..054a67d --- /dev/null

[PATCH v6 24/29] nios2: Nios2 registers

2014-11-03 Thread Ley Foon Tan
This file contains constants for the instruction macros, cpu registers, fields and bits. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/registers.h | 71 ++ 1 file changed, 71 insertions(+) create mode 100644 arch/nios2/include/asm/registers.h diff

[PATCH v6 27/29] MAINTAINERS: Add nios2 maintainer

2014-11-03 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3c64271..023ab87 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6544,6 +6544,13 @@ S: Maintained F: Documentation/scsi/NinjaSCSI.txt F: drivers

[PATCH v6 26/29] nios2: ptrace support

2014-11-03 Thread Ley Foon Tan
Add ptrace support for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/ptrace.h | 33 +++ arch/nios2/include/uapi/asm/ptrace.h | 120 + arch/nios2/kernel/ptrace.c | 166 +++ 3 files changed, 319 insertions

[PATCH v6 19/29] nios2: Library functions

2014-11-03 Thread Ley Foon Tan
Add optimised library functions for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/checksum.h | 78 +++ arch/nios2/include/asm/string.h | 24 + arch/nios2/lib/memcpy.c | 202 ++ arch/nios2/lib/memmove.c

[PATCH v6 17/29] nios2: System calls handling

2014-11-03 Thread Ley Foon Tan
This patch adds support for system calls from userspaces. It uses the asm-generic/unistd.h definitions with architecture spcific syscall. The sys_call_table is just an array defined in a C file and it contains pointers to the syscall functions. Signed-off-by: Ley Foon Tan --- arch/nios2/include

[PATCH v6 16/29] nios2: ELF definitions

2014-11-03 Thread Ley Foon Tan
This patch adds definitions for the ELF format Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/elf.h | 101 ++ arch/nios2/include/uapi/asm/elf.h | 67 + 2 files changed, 168 insertions(+) create mode 100644 arch/nios2

[PATCH v6 12/29] nios2: TLB handling

2014-11-03 Thread Ley Foon Tan
This patch adds the TLB maintenance functions. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/tlb.h | 34 + arch/nios2/include/asm/tlbflush.h | 46 +++ arch/nios2/mm/tlb.c | 275 ++ 3 files changed, 355 insertions

<    1   2   3   4   5   6   7   >