[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 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 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 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 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 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 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 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 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

[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 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

[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 lf...@altera.com --- arch/nios2/mm/extable.c | 25 + arch/nios2/mm/fault.c | 251

[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 lf...@altera.com --- arch/nios2/include/asm/entry.h | 120 ++ arch/nios2/include/asm/setup.h | 38 +++ arch/nios2/kernel/head.S | 175 arch

[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 lf...@altera.com --- 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

[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 lf...@altera.com --- arch/nios2/include/asm/elf.h | 101 ++ arch/nios2/include/uapi/asm/elf.h | 67 + 2 files changed, 168 insertions(+) create mode

[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 lf...@altera.com --- arch/nios2/include/asm/asm-macros.h | 309 +++ arch/nios2/include/asm/asm-offsets.h | 20

[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 lf...@altera.com --- 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 lf...@altera.com --- 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 lf...@altera.com --- arch/nios2/include/asm/traps.h | 19 ++ arch/nios2/kernel/insnemu.S| 592 + arch/nios2/kernel/traps.c | 185 + 3 files changed, 796

[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 lf...@altera.com --- Documentation/devicetree/bindings/nios2/nios2.txt | 62 Documentation/devicetree/bindings/nios2/timer.txt | 19 +++ arch/nios2/boot/dts/3c120_devboard.dts| 164

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

2014-09-08 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan lf...@altera.com --- 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

[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 lf...@altera.com --- arch/nios2/include/asm/ptrace.h | 33 +++ arch/nios2/include/uapi/asm/ptrace.h | 120 arch/nios2/kernel/ptrace.c | 176 +++ 3 files changed

[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 lf...@altera.com --- arch/nios2/include/asm/cmpxchg.h| 61 + arch/nios2/include/asm/linkage.h| 25 ++ arch/nios2/include/asm/mutex.h | 1

[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 lf...@altera.com --- arch/nios2/include/asm/registers.h | 71 ++ 1 file changed, 71 insertions(+) create mode 100644 arch/nios2/include/asm

[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 lf...@altera.com --- 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

[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 lf...@altera.com

[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 lf...@altera.com --- 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

[PATCH v3 22/29] nios2: Cpuinfo handling

2014-09-08 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan lf...@altera.com --- 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

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

2014-09-08 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan lf...@altera.com --- 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

[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 lf...@altera.com --- arch/nios2/include/asm/tlb.h | 34 + arch/nios2/include/asm/tlbflush.h | 46 +++ arch/nios2/mm/tlb.c | 274 ++ 3 files changed, 354

[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 lf...@altera.com --- arch/nios2/include/asm/cache.h | 36 + arch/nios2/include/asm/cacheflush.h | 52 +++ arch/nios2/mm/cacheflush.c | 270 3

[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 lf...@altera.com --- arch/nios2/include/asm/dma-mapping.h | 130 arch/nios2/mm/dma-mapping.c | 185 +++ 2 files changed, 315 insertions(+) create mode

[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 lf...@altera.com --- arch/nios2/kernel/entry.S | 548 + arch/nios2/kernel/misaligned.c | 255 +++ 2 files changed, 803

[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 lf...@altera.com --- arch/nios2/include/asm/pgalloc.h | 86 ++ arch/nios2/include/asm/pgtable-bits.h | 35 arch/nios2/include/asm/pgtable.h | 305 ++ arch/nios2

[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 lf...@altera.com --- arch/nios2/Kconfig | 201 +++ arch/nios2/Kconfig.debug | 17 +++ arch/nios2/Makefile

[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 lf...@altera.com --- arch/nios2/include/asm/checksum.h | 78 +++ arch/nios2/include/asm/string.h | 24 + arch/nios2/lib/memcpy.c | 199 ++ arch/nios2/lib

[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 lf...@altera.com --- 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

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

2014-09-08 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan lf...@altera.com --- 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

[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 lf...@altera.com --- 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

[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 lf...@altera.com --- arch/nios2/include/asm/irq.h | 28 arch/nios2/include/asm/irqflags.h | 69 + arch/nios2/kernel/irq.c | 93

[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

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 * >>

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 da...@davemloft.net wrote: From: Ley Foon Tan lf...@altera.com 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 * return -EINVAL

[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 lf...@altera.com

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

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

2014-08-26 Thread Ley Foon Tan
On Tue, Aug 26, 2014 at 6:13 PM, Giuseppe CAVALLARO wrote: > On 8/26/2014 11:47 AM, Ley Foon Tan wrote: >> >> Warning: >> drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:122:41: >> sparse: cast removes address space of expression >> drivers/net/ethernet/stmi

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

2014-08-26 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

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

2014-08-26 Thread Ley Foon Tan
On Sel, 2014-08-26 at 10:04 +0200, Giuseppe CAVALLARO wrote: > > > > >> > >> patch should be for net-next > > Do you mean the patch need based on net-next git? > > yes I do. > > > I'm using linux-next git now. > > ok, can you signal it in the subject (e.g. [PATCH (net-next)] > This can help

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

2014-08-26 Thread Ley Foon Tan
On Tue, Aug 26, 2014 at 3:24 PM, Giuseppe CAVALLARO wrote: >> @@ -119,7 +119,8 @@ static int socfpga_dwmac_parse_data(struct >> socfpga_dwmac *dwmac, struct device * >> return -EINVAL; >> } >> >> - dwmac->splitter_base = (void

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

2014-08-26 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] net: stmmac: fix warning from Sparse for socfpga

2014-08-26 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 lf...@altera.com

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

2014-08-26 Thread Ley Foon Tan
On Tue, Aug 26, 2014 at 3:24 PM, Giuseppe CAVALLARO peppe.cavall...@st.com wrote: @@ -119,7 +119,8 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device * return -EINVAL; } - dwmac-splitter_base = (void

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

2014-08-26 Thread Ley Foon Tan
On Sel, 2014-08-26 at 10:04 +0200, Giuseppe CAVALLARO wrote: patch should be for net-next Do you mean the patch need based on net-next git? yes I do. I'm using linux-next git now. ok, can you signal it in the subject (e.g. [PATCH (net-next)] This can help on reviewing and

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

2014-08-26 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 lf...@altera.com

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

2014-08-26 Thread Ley Foon Tan
On Tue, Aug 26, 2014 at 6:13 PM, Giuseppe CAVALLARO peppe.cavall...@st.com wrote: On 8/26/2014 11:47 AM, Ley Foon Tan wrote: Warning: drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:122:41: sparse: cast removes address space of expression drivers/net/ethernet/stmicro/stmmac/dwmac

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 peppe.cavall...@st.com 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 dropped

[PATCH] net: stmmac: add dcrs parameter

2014-08-25 Thread Ley Foon Tan
. When DCRS bit set high in control register, the MAC transmitter ignore the (G)MII Carrier Sense signal during frame transmission in the half-duplex mode. This request results in no errors generated because of Loss of Carrier or No Carrier during such transmission. Signed-off-by: Ley Foon Tan

[PATCH] net: stmmac: add dcrs parameter

2014-08-25 Thread Ley Foon Tan
. When DCRS bit set high in control register, the MAC transmitter ignore the (G)MII Carrier Sense signal during frame transmission in the half-duplex mode. This request results in no errors generated because of Loss of Carrier or No Carrier during such transmission. Signed-off-by: Ley Foon Tan lf

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

2014-08-20 Thread Ley Foon Tan
in their 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

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

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

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.

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 richard.weinber...@gmail.com wrote: + +#include asm/ucontext.h +#include asm/cacheflush.h + +#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) + +static int do_signal(struct pt_regs *regs, int in_syscall); Do you really need

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 20/29] nios2: Cpuinfo handling

2014-08-06 Thread Ley Foon Tan
On Fri, Jul 18, 2014 at 10:43 AM, Ley Foon Tan lf...@altera.com wrote: On Tue, Jul 15, 2014 at 5:47 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:47 Ley Foon Tan wrote: +static void *cpuinfo_start(struct seq_file *m, loff_t *pos) +{ + unsigned long i = *pos

Re: [PATCH v2 02/29] nios2: Kernel booting and initialization

2014-07-30 Thread Ley Foon Tan
On Wed, Jul 30, 2014 at 5:12 PM, Tobias Klauser wrote: >> +/* >> + * Stack layout in 'ret_from_exception': >> + * >> + * This allows access to the syscall arguments in registers r4-r8 >> + * >> + *0(sp) - r8 >> + *4(sp) - r9 >> + *8(sp) - r10 >> + *C(sp) - r11 >> + * 10(sp) -

Re: [PATCH v2 05/29] nios2: Memory management

2014-07-30 Thread Ley Foon Tan
On Wed, Jul 30, 2014 at 4:57 PM, Tobias Klauser wrote: >> >> Any chance you can use mmu.h from asm-generic instead? >> >> It uses a struct with a single "unsigned long end_brk" member (unless >> >> CONFIG_BINFMT_ELF_FDPIC is defined). >> > From asm-generic/mmu.h, it is for nommu implementations.

Re: [PATCH v2 05/29] nios2: Memory management

2014-07-30 Thread Ley Foon Tan
On Wed, Jul 30, 2014 at 5:01 PM, Tobias Klauser wrote: > On 2014-07-15 at 10:45:32 +0200, Ley Foon Tan wrote: >> This patch contains the initialisation of the memory blocks, MMU >> attributes and the memory map. >> >> Signed-off-by: Ley Foon Tan >> --- >>

Re: [PATCH v2 05/29] nios2: Memory management

2014-07-30 Thread Ley Foon Tan
On Mon, Jul 28, 2014 at 10:59 PM, Geert Uytterhoeven wrote: > On Tue, Jul 15, 2014 at 10:45 AM, Ley Foon Tan wrote: >> --- /dev/null >> +++ b/arch/nios2/include/asm/mmu.h >> @@ -0,0 +1,18 @@ >> +/* >> + * Copyright (C) 2010 Tobias Klauser >> + * Cop

Re: [PATCH v2 05/29] nios2: Memory management

2014-07-30 Thread Ley Foon Tan
On Mon, Jul 28, 2014 at 10:59 PM, Geert Uytterhoeven ge...@linux-m68k.org wrote: On Tue, Jul 15, 2014 at 10:45 AM, Ley Foon Tan lf...@altera.com wrote: --- /dev/null +++ b/arch/nios2/include/asm/mmu.h @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2010 Tobias Klauser tklau...@distanz.ch

Re: [PATCH v2 05/29] nios2: Memory management

2014-07-30 Thread Ley Foon Tan
On Wed, Jul 30, 2014 at 5:01 PM, Tobias Klauser tklau...@distanz.ch wrote: On 2014-07-15 at 10:45:32 +0200, Ley Foon Tan lf...@altera.com wrote: This patch contains the initialisation of the memory blocks, MMU attributes and the memory map. Signed-off-by: Ley Foon Tan lf...@altera.com

Re: [PATCH v2 05/29] nios2: Memory management

2014-07-30 Thread Ley Foon Tan
On Wed, Jul 30, 2014 at 4:57 PM, Tobias Klauser tklau...@distanz.ch wrote: Any chance you can use mmu.h from asm-generic instead? It uses a struct with a single unsigned long end_brk member (unless CONFIG_BINFMT_ELF_FDPIC is defined). From asm-generic/mmu.h, it is for nommu

Re: [PATCH v2 02/29] nios2: Kernel booting and initialization

2014-07-30 Thread Ley Foon Tan
On Wed, Jul 30, 2014 at 5:12 PM, Tobias Klauser tklau...@distanz.ch wrote: +/* + * Stack layout in 'ret_from_exception': + * + * This allows access to the syscall arguments in registers r4-r8 + * + *0(sp) - r8 + *4(sp) - r9 + *8(sp) - r10 + *C(sp) - r11 + * 10(sp) - r12

Re: [PATCH v2 13/29] nios2: DMA mapping API

2014-07-29 Thread Ley Foon Tan
On Thu, Jul 24, 2014 at 8:05 PM, Arnd Bergmann wrote: >> I have spent some times look at other architectures and below is what >> I found. Please correct me if I am wrong, especially >> for_device():DMA_FROM_DEVICE. >> >> _for_cpu(): >> case DMA_BIDIRECTIONAL: >> case DMA_FROM_DEVICE: >> /*

Re: [PATCH v2 13/29] nios2: DMA mapping API

2014-07-29 Thread Ley Foon Tan
On Thu, Jul 24, 2014 at 8:05 PM, Arnd Bergmann a...@arndb.de wrote: I have spent some times look at other architectures and below is what I found. Please correct me if I am wrong, especially for_device():DMA_FROM_DEVICE. _for_cpu(): case DMA_BIDIRECTIONAL: case DMA_FROM_DEVICE: /*

Re: [PATCH v2 13/29] nios2: DMA mapping API

2014-07-24 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:38 PM, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:40 Ley Foon Tan wrote: > >> +static inline void __dma_sync(void *vaddr, size_t size, >> + enum dma_data_direction direction) >> +{ >> + swit

Re: [PATCH v2 13/29] nios2: DMA mapping API

2014-07-24 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:38 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:40 Ley Foon Tan wrote: +static inline void __dma_sync(void *vaddr, size_t size, + enum dma_data_direction direction) +{ + switch (direction) { + case

Re: [PATCH v2 15/29] nios2: System calls handling

2014-07-21 Thread Ley Foon Tan
On Fri, Jul 18, 2014 at 8:56 PM, James Hogan wrote: > Hi, > > On 15/07/14 09:45, Ley Foon Tan wrote: >> 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

Re: [PATCH v2 19/29] nios2: Time keeping

2014-07-21 Thread Ley Foon Tan
On Mon, Jul 21, 2014 at 6:51 PM, Arnd Bergmann wrote: > On Monday 21 July 2014 18:07:02 Ley Foon Tan wrote: >> > >> >> +#ifndef _ASM_NIOS2_TIMEX_H >> >> +#define _ASM_NIOS2_TIMEX_H >> >> + >> >> +/* Supply dummy tick-rate. Real value wi

Re: [PATCH v2 19/29] nios2: Time keeping

2014-07-21 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 6:00 PM, Thomas Gleixner wrote: >> + count = >> + readw(timer_membase + ALTERA_TIMER_SNAPH_REG) << 16 | >> + readw(timer_membase + ALTERA_TIMER_SNAPL_REG); > > So you're serious about having a new architecture with a timer > implementation

Re: [PATCH v2 21/29] nios2: Futex operations

2014-07-21 Thread Ley Foon Tan
On Mon, Jul 21, 2014 at 4:01 PM, Arnd Bergmann wrote: >> >> Okay, I will copy m68k implementation to asm-generic/futex.h. >> Do you prefer this as separate patch submission or this can be part of >> nios2 patchset? > > I think it's better for everybody if you include it in your nios2 > patchset,

Re: [PATCH v2 19/29] nios2: Time keeping

2014-07-21 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:45 PM, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:46 Ley Foon Tan wrote: >> + >> +static inline void __delay(unsigned long loops) >> +{ >> + int dummy; >> + >> + __asm__ __volatile__( >> +

Re: [PATCH v2 19/29] nios2: Time keeping

2014-07-21 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:45 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:46 Ley Foon Tan wrote: + +static inline void __delay(unsigned long loops) +{ + int dummy; + + __asm__ __volatile__( + 1:\n\t + beq%0,zero,2f\n\t + addi %0

Re: [PATCH v2 21/29] nios2: Futex operations

2014-07-21 Thread Ley Foon Tan
On Mon, Jul 21, 2014 at 4:01 PM, Arnd Bergmann a...@arndb.de wrote: Okay, I will copy m68k implementation to asm-generic/futex.h. Do you prefer this as separate patch submission or this can be part of nios2 patchset? I think it's better for everybody if you include it in your nios2

Re: [PATCH v2 19/29] nios2: Time keeping

2014-07-21 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 6:00 PM, Thomas Gleixner t...@linutronix.de wrote: + count = + readw(timer_membase + ALTERA_TIMER_SNAPH_REG) 16 | + readw(timer_membase + ALTERA_TIMER_SNAPL_REG); So you're serious about having a new architecture with a timer

Re: [PATCH v2 19/29] nios2: Time keeping

2014-07-21 Thread Ley Foon Tan
On Mon, Jul 21, 2014 at 6:51 PM, Arnd Bergmann a...@arndb.de wrote: On Monday 21 July 2014 18:07:02 Ley Foon Tan wrote: +#ifndef _ASM_NIOS2_TIMEX_H +#define _ASM_NIOS2_TIMEX_H + +/* Supply dummy tick-rate. Real value will be read from devicetree */ +#define CLOCK_TICK_RATE

Re: [PATCH v2 15/29] nios2: System calls handling

2014-07-21 Thread Ley Foon Tan
On Fri, Jul 18, 2014 at 8:56 PM, James Hogan james.ho...@imgtec.com wrote: Hi, On 15/07/14 09:45, Ley Foon Tan wrote: 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

Re: [PATCH v2 21/29] nios2: Futex operations

2014-07-20 Thread Ley Foon Tan
On Fri, Jul 18, 2014 at 5:55 PM, Arnd Bergmann wrote: > On Friday 18 July 2014 11:42:34 Thomas Gleixner wrote: >> On Fri, 18 Jul 2014, Arnd Bergmann wrote: >> > On Friday 18 July 2014 14:07:42 Ley Foon Tan wrote: >> > > On Thu, Jul 17, 2014 at

Re: [PATCH v2 21/29] nios2: Futex operations

2014-07-20 Thread Ley Foon Tan
On Fri, Jul 18, 2014 at 5:55 PM, Arnd Bergmann a...@arndb.de wrote: On Friday 18 July 2014 11:42:34 Thomas Gleixner wrote: On Fri, 18 Jul 2014, Arnd Bergmann wrote: On Friday 18 July 2014 14:07:42 Ley Foon Tan wrote: On Thu, Jul 17, 2014 at 7:07 PM, Arnd Bergmann a...@arndb.de wrote

Re: [PATCH v2 12/29] nios2: Interrupt handling

2014-07-18 Thread Ley Foon Tan
On Thu, Jul 17, 2014 at 9:58 PM, Thomas Gleixner wrote: > On Thu, 17 Jul 2014, Ley Foon Tan wrote: > >> On Tue, Jul 15, 2014 at 5:51 PM, Thomas Gleixner wrote: >> > On Tue, 15 Jul 2014, Ley Foon Tan wrote: >> >> +static void chip_unmask(struct irq_data

Re: [PATCH v2 21/29] nios2: Futex operations

2014-07-18 Thread Ley Foon Tan
On Thu, Jul 17, 2014 at 7:07 PM, Arnd Bergmann wrote: > The get_user/put_user functions really need to be annotated might_fault(), > because that's what they do. > > The whole point of get_user() is to access an unchecked user space > pointer, which can do a number of things based on what the

Re: [PATCH v2 21/29] nios2: Futex operations

2014-07-18 Thread Ley Foon Tan
On Thu, Jul 17, 2014 at 7:07 PM, Arnd Bergmann a...@arndb.de wrote: The get_user/put_user functions really need to be annotated might_fault(), because that's what they do. The whole point of get_user() is to access an unchecked user space pointer, which can do a number of things based on

<    4   5   6   7   8   9   10   11   12   13   >