Re: [PATCH AUTOSEL 4.4 4/8] sparc32: Limit memblock allocation to low memory

2021-03-03 Thread Andreas Larsson
On 2021-03-02 12:59, Sasha Levin wrote: From: Andreas Larsson [ Upstream commit bda166930c37604ffa93f2425426af6921ec575a ] Commit cca079ef8ac29a7c02192d2bad2ffe4c0c5ffdd0 changed sparc32 to use memblocks instead of bootmem, but also made high memory available via memblock allocation which

Re: [PATCH AUTOSEL 4.9 05/10] sparc32: Limit memblock allocation to low memory

2021-03-03 Thread Andreas Larsson
On 2021-03-02 12:59, Sasha Levin wrote: From: Andreas Larsson [ Upstream commit bda166930c37604ffa93f2425426af6921ec575a ] Commit cca079ef8ac29a7c02192d2bad2ffe4c0c5ffdd0 changed sparc32 to use memblocks instead of bootmem, but also made high memory available via memblock allocation which

Re: [PATCH AUTOSEL 4.14 06/13] sparc32: Limit memblock allocation to low memory

2021-03-03 Thread Andreas Larsson
On 2021-03-02 12:58, Sasha Levin wrote: From: Andreas Larsson [ Upstream commit bda166930c37604ffa93f2425426af6921ec575a ] Commit cca079ef8ac29a7c02192d2bad2ffe4c0c5ffdd0 changed sparc32 to use memblocks instead of bootmem, but also made high memory available via memblock allocation which

[PATCH v2] sparc32: Limit memblock allocation to low memory

2021-02-05 Thread Andreas Larsson
in the early stages, now using memblock allocation. Signed-off-by: Andreas Larsson Acked-by: Mike Rapoport --- Changes, in commit message, since v1: - Added a missing "not" in "does not work" - Clarified crash to kernel panic. - Added Acked-by arch/sparc/mm/init_32.c | 3 ++

[PATCH] sparc32: Preserve clone syscall flags argument for restarts due to signals

2021-02-04 Thread Andreas Larsson
the setting %l6 to 0 or 1 was removed. The use of that 0 or 1 value in %l6 was removed in commit 28e6103665301ce60634e8a77f0b657c6cc099de. Signed-off-by: Andreas Larsson --- arch/sparc/kernel/entry.S| 8 +++- arch/sparc/kernel/rtrap_32.S | 2 +- 2 files changed, 4 insertions(+), 6

[PATCH] sparc32: Limit memblock allocation to low memory

2021-02-04 Thread Andreas Larsson
early stages, now using memblock allocation. Signed-off-by: Andreas Larsson --- arch/sparc/mm/init_32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index eb2946b1df8a..6139c5700ccc 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm

Re: sparc32: boot fails with > 256 MB memory after switch to NO_BOOTMEM

2021-01-28 Thread Andreas Larsson
On 2021-01-28 10:35, Mike Rapoport wrote: On Wed, Jan 27, 2021 at 04:03:00PM +0100, Andreas Larsson wrote: Commit cca079ef8ac29a7c02192d2bad2ffe4c0c5ffdd0 makes sparc32 use memblocks instead of the previous bootmem solution. Unfortunately, due to this: #define PAGE_OFFSET 0xf000 #define

sparc32: boot fails with > 256 MB memory after switch to NO_BOOTMEM

2021-01-27 Thread Andreas Larsson
ress ranges that is done in bootmem_init also looks a bit worrying, but removing the second one does not affect this problem. -- Best regards, Andreas Larsson Cobham Gaisler

Re: [patch 1/4] sparc/mm/highmem: Flush cache and TLB

2021-01-12 Thread Andreas Larsson
ghmem: Switch to generic kmap atomic") Reported-by: Andreas Larsson Signed-off-by: Thomas Gleixner Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org --- arch/sparc/include/asm/highmem.h |9 + 1 file changed, 5 insertions(+), 4 deletions(-) --- a/arch/sparc/include

sparc32: Init process fails to load with generic kmap atomic

2020-12-22 Thread Andreas Larsson
this in January. If anyone has any ideas how this could stem from this kmap patch, I am all ears. -- Andreas Larsson Software Engineer Cobham Gaisler

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-18 Thread Andreas Larsson
On 2020-12-17 17:43, Arnd Bergmann wrote: It does make sense to require that a single kernel can work on all possible hardware. So if we remove sun4m/sun4d support, all that is left is LEON, and you likely wouldn't need to worry about other CPUs any more. However, there is still the question whe

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-17 Thread Andreas Larsson
nvolved software. In addition, non-LTS users are running other mainline kernel versions as well. Best regards, Andreas Larsson Software Engineer Cobham Gaisler

Re: [PATCH] sparc32,leon: Use CASA when available for atomic operations

2017-12-22 Thread Andreas Larsson
On 2017-12-13 23:47, Sam Ravnborg wrote: Hi Andreas. On Mon, Dec 11, 2017 at 03:58:10PM +0100, Andreas Larsson wrote: This probes for CASA support, that is commonly present in LEON processors, and when available, uses the CASA instruction for atomic operations rather than the spinlock based

Re: [BUG] drivers/gpio: some possible sleep-in-atomic bugs

2017-12-13 Thread Andreas Larsson
c analysis tool (DSAC) and checked by my code review. Hi! Thank you for reporting this. I will take a look at it. -- Best Regards, Andreas Larsson

[PATCH] sparc32,leon: Use CASA when available for atomic operations

2017-12-11 Thread Andreas Larsson
: Andreas Larsson --- This the followup version to the "sparc32,leon: Allow and use CAS for atomic operations for LEON" patch series that did not do any runtime detection. There are a number of style warnings from checkpatch for this patch (and even errors for space after parenthesis) an

[PATCH 2/2] sparc32,leon: Add support for atomic operations with CAS

2017-11-14 Thread Andreas Larsson
644 index 000..5637606 --- /dev/null +++ b/arch/sparc/lib/atomic_cas_32.S @@ -0,0 +1,69 @@ +/* atomic_cas_32.S + * + * Copyright (C) 1999, 2007 2012 David S. Miller (da...@davemloft.net) + * + * Adaption for LEON with CAS from atomic_64.S, by Andreas Larsson + * (andr...@gaisler.com).

[PATCH 0/2] sparc32,leon: Allow and use CAS for atomic operations for LEON

2017-11-14 Thread Andreas Larsson
The first patch makes sure that CAS can be assembled and the second patch adds the configurable possibility to use the CASA instruction rather than spinlock based emulation for atomic operations. Andreas Larsson (2): sparc32,leon: Build with -mcpu=leon3 for SPARC_LEON sparc32,leon: Add

[PATCH 1/2] sparc32,leon: Build with -mcpu=leon3 for SPARC_LEON

2017-11-14 Thread Andreas Larsson
Apart from using LEON3 instruction timing it allows for usage of the CASA instruction. Signed-off-by: Andreas Larsson --- arch/sparc/Makefile | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index 8496a07..673ee73 100644

Re: [PATCH 27/44] sparc: remove leon_dma_ops

2017-06-12 Thread Andreas Larsson
AMBA buses. Some LEON systems have PCI bridges, but in general CONFIG_PCI is not a given. -- Andreas Larsson Software Engineer Cobham Gaisler

[PATCH] sparc32: Fix inverted invalid_frame_pointer checks on sigreturns

2016-11-09 Thread Andreas Larsson
Signed-off-by: Andreas Larsson --- arch/sparc/kernel/signal_32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index c3c12ef..9c0c8fd 100644 --- a/arch/sparc/kernel/signal_32.c +++ b/arch/sparc/kernel

[PATCH] MAINTAINERS: net: Change maintainer for GRETH 10/100/1G Ethernet MAC device driver

2016-04-27 Thread Andreas Larsson
Signed-off-by: Andreas Larsson --- MAINTAINERS |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1d5b4be..08ffebd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4903,7 +4903,7 @@ F:net/ipv4/gre_offload.c F: include/net/gre.h

[PATCH] sparc32: destroy_context() and switch_mm() needs to disable interrupts.

2014-12-18 Thread Andreas Larsson
interrupt while taking srmmu_context_spinlock in destroy_context() and switch_mm() so we don't deadlock. See also commit 77b838fa1ef0 ("[SPARC64]: destroy_context() needs to disable interrupts.") Signed-off-by: Andreas Larsson --- arch/sparc/mm/srmmu.c | 11 +++ 1 file change

[PATCH] sparc32,leon: Align ccall_info to prevent unaligned traps on crosscall

2014-12-05 Thread Andreas Larsson
It is being filled in using std in leon_cross_call. Signed-off-by: Andreas Larsson --- arch/sparc/kernel/leon_smp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index ea2bad3..71e16f2 100644 --- a/arch/sparc

[PATCH] soc: Include drivers/soc/Kconfig only once

2014-11-05 Thread Andreas Larsson
Signed-off-by: Andreas Larsson --- drivers/Kconfig |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/Kconfig b/drivers/Kconfig index 1a693d3..622fa26 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -148,8 +148,6 @@ source "drivers/remoteproc/Kconfig" source &quo

[PATCH] sparc32: Implement xchg and atomic_xchg using ATOMIC_HASH locks

2014-11-05 Thread Andreas Larsson
Atomicity between xchg and cmpxchg cannot be guaranteed when xchg is implemented with a swap and cmpxchg is implemented with locks. Without this, e.g. mcs_spin_lock and mcs_spin_unlock are broken. Signed-off-by: Andreas Larsson --- arch/sparc/include/asm/atomic_32.h |2 +- arch/sparc

Re: [PATCH] usb: gadget: udc_core: Use right kobj when calling sysfs_notify

2014-09-16 Thread Andreas Larsson
On 2014-09-16 07:15, Felipe Balbi wrote: Hi, On Tue, Sep 16, 2014 at 10:02:25AM +0800, Peter Chen wrote: On Mon, Sep 15, 2014 at 12:42:27PM +0200, Andreas Larsson wrote: The state attribute is connected to the kobj of the udc, not the gadget. Signed-off-by: Andreas Larsson --- drivers/usb

[PATCH] usb: gadget: udc_core: Use right kobj when calling sysfs_notify

2014-09-15 Thread Andreas Larsson
The state attribute is connected to the kobj of the udc, not the gadget. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/udc/udc-core.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc

[PATCH] usb: gadget: gr_udc: Add bounce buffer to handle odd sized OUT requests

2014-09-15 Thread Andreas Larsson
This adds a bounce buffer that handles the end of OUT requests where req.length is not divisible by ep->ep.maxpacket. Before this, such requests were rejected as the DMA engine cannot restrict itself to buffers that are smaller than ep->ep.maxpacket. Signed-off-by: Andreas Larsson --- d

[PATCH v2] sparc32, leon: Make leon_dma_ops avaiable when !CONFIG_PCI

2014-09-08 Thread Andreas Larsson
The leon_dma_ops struct is needed for leon regardless of PCI configuration. Signed-off-by: Andreas Larsson --- Changes from v1: Fixed typo in commit message arch/sparc/include/asm/dma-mapping.h |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/sparc/include/asm

[PATCH] sparc32, leon: Make leom_dma_ops avaiable when !CONFIG_PCI

2014-09-02 Thread Andreas Larsson
The leon_dma_ops struct is needed for leon regardless of PCI configuration. Signed-off-by: Andreas Larsson --- arch/sparc/include/asm/dma-mapping.h |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/sparc/include/asm/dma-mapping.h b/arch/sparc/include/asm/dma

[PATCH] sparc: Let memset return the address argument

2014-08-29 Thread Andreas Larsson
This makes memset follow the standard (instead of returning 0 on success). This is needed when certain versions of gcc optimizes around memset calls and assume that the address argument is preserved in %o0. Signed-off-by: Andreas Larsson --- arch/sparc/lib/memset.S | 18 ++ 1

[PATCH] sparc: leon: Fix race condition between leon_cycles_offset and timer_interrupt

2014-08-29 Thread Andreas Larsson
backwards. Signed-off-by: Andreas Larsson --- arch/sparc/kernel/leon_kernel.c | 31 --- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index 683c4af..9bbb8f2 100644 --- a/arch/sparc

Re: [PATCH 00/21] add and use devm_irq_of_parse_and_map()

2014-06-16 Thread Andreas Larsson
could change in the future. I personally don't see a problem with using devm_of_parse_and_map solution as long as there is a SPARC-specific one as discussed above. Best regards, Andreas Larsson -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH 20/21] usb: use devm_irq_of_parse_and_map() where appropriate

2014-06-16 Thread Andreas Larsson
#x27;s log message? Given that there are a lot of -EBUSY being returned in drivers/usb/host - not just in these error cases, maybe it is better to not touch this in this patch set. Best regards, Andreas Larsson -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [PATCH 20/21] usb: use devm_irq_of_parse_and_map() where appropriate

2014-06-16 Thread Andreas Larsson
On 2014-06-04 13:13, nyushche...@dev.rtsoft.ru wrote: From: Nikita Yushchenko This avoids leak of IRQ mapping on error paths, and makes it possible to use devm_request_irq() without facing unmap-while-handler-installed issues. Signed-off-by: Nikita Yushchenko --- drivers/usb/gadget/gr_udc.c

Re: [PATCH 00/21] add and use devm_irq_of_parse_and_map()

2014-06-16 Thread Andreas Larsson
with having a SPARC version of devm_irq_of_parse_and_map that just calls irq_of_parse_and_map as there are no mappings that needs to be disposed of. (The empty dummy for irq_dispose_mapping is used if any irq_dispose_mapping calls are made from drivers). Best regards, Andreas Larsson -- To

Re: [PATCH 00/21] add and use devm_irq_of_parse_and_map()

2014-06-12 Thread Andreas Larsson
several are currently only used on SPARC platforms). Best regards, Andreas Larsson -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Pleas

Re: [PATCH v3] usb: host: uhci-grlib.c : use devm_ functions

2014-06-11 Thread Andreas Larsson
free functions are removed and two labels are done away with. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. Signed-off-by: Himangi Saraogi Looks and works fine now! Acked-by: Andreas Larsson Best regards, Andreas Larsson --- Not

Re: [PATCH] usb: host: uhci-grlib.c : use devm_ functions

2014-06-10 Thread Andreas Larsson
goto err_ioremap; Here the label name also does not make sense anymore. Best regards, Andreas Larsson Software Engineer Aeroflex Gaisler AB Aeroflex Microelectronic Solutions – HiRel device_wakeup_enable(hcd->self.controller); return 0;

Re: [PATCH] usb: gadget: gr_udc: unconditionally use GFP_ATOMIC in gr_queue_ext()

2014-05-08 Thread Andreas Larsson
On 2014-05-07 22:26, Alexey Khoroshilov wrote: As far as gr_queue() is called with spinlock held, we have to pass GFP_ATOMIC regardless of gfp argument. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Acked-by: Andreas Larsson

Re: [PATCH v2 0/7] usb: gadget: gr_udc: OF and ep.maxpacket_limit improvements and fix of GFP_KERNEL in atomic context

2014-04-15 Thread Andreas Larsson
On 2014-03-27 16:15, Andreas Larsson wrote: This patchset: - Adds some OF related improvements suggested by Mark Rutland. - Adds ep.maxpacket_limit to the debugfs file and adds a check if gr_ep_enable is called with a maxpacket value greater than ep.maxpacket_limit. - Fixes a

[PATCH v2 7/7] usb: gadget: gr_udc: Use GFP_ATOMIC when allocating under held spinlock

2014-04-01 Thread Andreas Larsson
As gr_ep_init must be called with dev->lock held, GFP_KERNEL must not be used. Reported-by: Dan Carpenter Signed-off-by: Andreas Larsson --- Differences since v1: Fixed typo in commit message drivers/usb/gadget/gr_udc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

[PATCH v2 3/7] usb: gadget: gr_udc: Use platform_get_irq instead of irq_of_parse_and_map

2014-03-27 Thread Andreas Larsson
Use platform_get_irq as no mapping needs to be done. No functional difference for SPARC which is the typical environment for the driver though. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- Differences since v1: none drivers/usb/gadget/gr_udc.c | 14 -- 1 file

[PATCH v2 5/7] usb: gadget: gr_udc: Add ep.maxpacket_limit to debugfs information

2014-03-27 Thread Andreas Larsson
Add information on ep.maxpacket_limit for each endpoint in the debugfs information. Signed-off-by: Andreas Larsson --- Differences since v1: none drivers/usb/gadget/gr_udc.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c index

[PATCH v2 2/7] usb: gadget: gr_udc: Expand devicetree documentation

2014-03-27 Thread Andreas Larsson
Provide more information on the two different interrupt cases and more information of endpoint buffer sizes. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- Differences since v1: none Documentation/devicetree/bindings/usb/gr-udc.txt | 22 ++ 1 file changed

[PATCH v2 1/7] usb: gadget: gr_udc: Make struct platform_device variable name clearer and use platform_set/get_drvdata

2014-03-27 Thread Andreas Larsson
Rename struct platform_device pointers from ofdev to pdev for clarity. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- Differences since v1: use platform_set/get_drvdata drivers/usb/gadget/gr_udc.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff

[PATCH v2 6/7] usb: gadget: gr_udc: Return error code when trying to set ep.maxpacket > ep.maxpacket_limit

2014-03-27 Thread Andreas Larsson
Make gr_ep_enable fail properly when a call requests a larger ep.maxpacket than ep.maxpacket_limit. Signed-off-by: Andreas Larsson --- Differences since v1: none drivers/usb/gadget/gr_udc.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb

[PATCH 7/7] usb: gadget: gr_udc: Use GFP_ATOMIC when allocating under help spinlock

2014-03-27 Thread Andreas Larsson
As gr_ep_init must be called with dev->lock held, GFP_KERNEL must not be used. Reported-by: Dan Carpenter Signed-off-by: Andreas Larsson --- New patch but needs patch 1/7 to apply drivers/usb/gadget/gr_udc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH v2 0/7] usb: gadget: gr_udc: OF and ep.maxpacket_limit improvements and fix of GFP_KERNEL in atomic context

2014-03-27 Thread Andreas Larsson
Andreas Larsson (7): usb: gadget: gr_udc: Make struct platform_device variable name clearer and use platform_set/get_drvdata usb: gadget: gr_udc: Expand devicetree documentation usb: gadget: gr_udc: Use platform_get_irq instead of irq_of_parse_and_map usb: gadget: gr_udc: Use

[PATCH v2 4/7] usb: gadget: gr_udc: Use of_property_read_u32_index to access arrays

2014-03-27 Thread Andreas Larsson
Use an appropriate accessor function for property arrays to make the code nicer and make the code correct if it would ever run on little endian architectures. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- Differences since v1: none drivers/usb/gadget/gr_udc.c | 12

Re: [PATCH 1/6] usb: gadget: gr_udc: Make struct platform_device variable name clearer

2014-02-23 Thread Andreas Larsson
On 2014-02-18 16:52, Felipe Balbi wrote: On Thu, Jan 09, 2014 at 11:54:13AM +0100, Andreas Larsson wrote: Rename struct platform_device pointers from ofdev to pdev for clarity. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/gr_udc.c | 18

Re: [PATCH v3 0/5] can: sja1000: cleanups and new OF property

2014-02-04 Thread Andreas Larsson
On 2014-01-31 14:50, Andreas Larsson wrote: On 2014-01-31 14:40, Marc Kleine-Budde wrote: On 01/31/2014 02:34 PM, Florian Vaussard wrote: Hello, (could someone with a SJA1000 on SPARC perform a functional test to see if interrupts are working? it would be great :-) Changes since v2

Re: [PATCH v3 0/5] can: sja1000: cleanups and new OF property

2014-01-31 Thread Andreas Larsson
On 2014-01-31 14:40, Marc Kleine-Budde wrote: On 01/31/2014 02:34 PM, Florian Vaussard wrote: Hello, (could someone with a SJA1000 on SPARC perform a functional test to see if interrupts are working? it would be great :-) Changes since v2: - Dropped patch 1 "can: sja1000: remove unused defines

[PATCH 1/6] usb: gadget: gr_udc: Make struct platform_device variable name clearer

2014-01-09 Thread Andreas Larsson
Rename struct platform_device pointers from ofdev to pdev for clarity. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/gr_udc.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb

[PATCH 5/6] usb: gadget: gr_udc: Add ep.maxpacket_limit to debugfs information

2014-01-09 Thread Andreas Larsson
Add information on ep.maxpacket_limit for each endpoint in the debugfs information. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/gr_udc.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c index 8df35fc..55757fc 100644 --- a

[PATCH 4/6] usb: gadget: gr_udc: Use of_property_read_u32_index to access arrays

2014-01-09 Thread Andreas Larsson
Use an appropriate accessor function for property arrays to make the code nicer and make the code correct if it would ever run on little endian architectures. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/gr_udc.c | 12 1 file changed, 4

[PATCH 6/6] usb: gadget: gr_udc: Return error code when trying to set ep.maxpacket > ep.maxpacket_limit

2014-01-09 Thread Andreas Larsson
Make gr_ep_enable fail properly when a call requests a larger ep.maxpacket than ep.maxpacket_limit. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/gr_udc.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c index 55757fc

[PATCH 2/6] usb: gadget: gr_udc: Expand devicetree documentation

2014-01-09 Thread Andreas Larsson
Provide more information on the two different interrupt cases and more information of endpoint buffer sizes. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- Documentation/devicetree/bindings/usb/gr-udc.txt | 22 ++ 1 file changed, 14 insertions(+), 8

[PATCH 3/6] usb: gadget: gr_udc: Use platform_get_irq instead of irq_of_parse_and_map

2014-01-09 Thread Andreas Larsson
Use platform_get_irq as no mapping needs to be done. No functional difference for SPARC which is the typical environment for the driver though. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/gr_udc.c | 14 -- 1 file changed, 8 insertions(+), 6

[PATCH 0/6] usb: gadget: gr_udc: OF and ep.maxpacket_limit related improvements

2014-01-09 Thread Andreas Larsson
This patchset adds some OF related improvements suggested by Mark Rutland. This patchset also adds ep.maxpacket_limit to the debugfs file and adds a check if gr_ep_enable is called with a maxpacket value greater than ep.maxpacket_limit. Andreas Larsson (6): usb: gadget: gr_udc: Make struct

Re: [PATCH v6] usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDC

2014-01-08 Thread Andreas Larsson
ovements should work fine. On Mon, Dec 23, 2013 at 08:25:49PM +0000, Andreas Larsson wrote: This adds an UDC driver for GRUSBDC USB Device Controller cores available in the GRLIB VHDL IP core library. The driver only supports DMA mode. Signed-off-by: Andreas Larsson --- Differences since v1

Re: [PATCH v4] usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDC

2013-12-23 Thread Andreas Larsson
gr_ep_init() function). Hi! Thank you for the feedback! Added to v5. Best regards, Andreas Larsson -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH v3] usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDC

2013-12-15 Thread Andreas Larsson
On 12/13/2013 08:52 PM, Felipe Balbi wrote: Hi, On Fri, Dec 13, 2013 at 08:48:30AM +0100, Andreas Larsson wrote: On Wed, Dec 04, 2013 at 09:13:58AM +0100, Andreas Larsson wrote: +static void gr_finish_request(struct gr_ep *ep, struct gr_request *req, + int status

Re: [PATCH v3] usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDC

2013-12-12 Thread Andreas Larsson
On 2013-12-12 19:01, Felipe Balbi wrote: Hi, On Wed, Dec 04, 2013 at 09:13:58AM +0100, Andreas Larsson wrote: +static void gr_finish_request(struct gr_ep *ep, struct gr_request *req, + int status) +{ + struct gr_udc *dev; + + list_del_init(&req-&g

Re: [PATCH] usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDC

2013-10-28 Thread Andreas Larsson
complared to using the work queue solution. Unless you have any ideas here, I hope you can let the driver keep the work queue solution. Best regards, Andreas Larsson -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] usb: gadget: Make VERBOSE_DEBUG enableable via Kconfig

2013-10-10 Thread Andreas Larsson
Signed-off-by: Andreas Larsson --- drivers/usb/gadget/Kconfig | 14 ++ drivers/usb/gadget/Makefile |3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 48cddf3..922a04d 100644 --- a/drivers/usb

Re: [PATCH] usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDC

2013-10-02 Thread Andreas Larsson
On 2013-10-01 16:19, Felipe Balbi wrote: Hi, On Tue, Oct 01, 2013 at 10:34:47AM +0200, Andreas Larsson wrote: +/* #define VERBOSE_DEBUG */ we don't want this, we want verbose debug to be selectable on Kconfig, which already is ;-) I was only aware of CONFIG_USB_GADGET_DEBUG leadi

Re: [PATCH] usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDC

2013-10-01 Thread Andreas Larsson
Hi! Thank you for the feedback! Sorry for the delayed response back. Responses inline. On 2013-09-18 19:15, Felipe Balbi wrote: Hi, On Mon, Aug 12, 2013 at 04:05:10PM +0200, Andreas Larsson wrote: diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c new file mode 100644

Re: [PATCH] usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDC

2013-09-08 Thread Andreas Larsson
On 2013-08-28 11:02, Andreas Larsson wrote: On 2013-08-12 16:05, Andreas Larsson wrote: This adds an UDC driver for GRUSBDC USB Device Controller cores available in the GRLIB VHDL IP core library. The driver only supports DMA mode. Any comments? It would be great to get feedback soon in case

Re: [PATCH] usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDC

2013-08-28 Thread Andreas Larsson
On 2013-08-12 16:05, Andreas Larsson wrote: This adds an UDC driver for GRUSBDC USB Device Controller cores available in the GRLIB VHDL IP core library. The driver only supports DMA mode. Any comments? It would be great to get feedback soon in case some things need to be changed for this

Re: [PATCH] of: Define of_irq_find_parent dummy for !defined(CONFIG_OF_IRQ)

2013-08-27 Thread Andreas Larsson
On 2013-08-27 15:12, Rob Herring wrote: On Tue, Aug 27, 2013 at 2:57 AM, Andreas Larsson wrote: This changes the dummy version of of_irq_find_parent to be defined when !defined(CONFIG_OF_IRQ) instead of when !defined(CONFIG_OF). Without this of_irq_find_parent is undefined on SPARC that

[PATCH] of: Define of_irq_find_parent dummy for !defined(CONFIG_OF_IRQ)

2013-08-27 Thread Andreas Larsson
This changes the dummy version of of_irq_find_parent to be defined when !defined(CONFIG_OF_IRQ) instead of when !defined(CONFIG_OF). Without this of_irq_find_parent is undefined on SPARC that defines CONFIG_OF but not CONFIG_OF_IRQ. Signed-off-by: Andreas Larsson --- include/linux/of_irq.h

Re: [PATCH v2] gpio: interrupt consistency check for OF GPIO IRQs

2013-08-26 Thread Andreas Larsson
On 2013-08-26 16:04, Lars Poeschel wrote: On Monday 26 August 2013 at 13:29:07, Andreas Larsson wrote: On 2013-08-26 12:56, Lars Poeschel wrote: This call to of_irq_find_parent breaks gpiolib-of for SPARC due to the fact that the function is undefined when !defined(CONFIG_OF_IRQ) &&

Re: [PATCH v2] gpio: interrupt consistency check for OF GPIO IRQs

2013-08-26 Thread Andreas Larsson
On 2013-08-26 12:56, Lars Poeschel wrote: Hi Andreas! On Thursday 22 August 2013 at 15:16:18, Andreas Larsson wrote: On 2013-08-21 15:38, Lars Poeschel wrote: +static void of_gpio_scan_irq_lines(const struct device_node *const node, +struct device_node *const gcn

Re: [PATCH v2] gpio: interrupt consistency check for OF GPIO IRQs

2013-08-22 Thread Andreas Larsson
would be good if of_gpiochip_reserve_irq_lines is just an empty dummy or something like that when !defined(CONFIG_OF_IRQ). Cheers, Andreas Larsson -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH] drivers: net: can: grcan: use devm_ioremap_resource()

2013-05-14 Thread Andreas Larsson
_ioremap_resource(&ofdev->dev, res); + if (IS_ERR(base)) { + err = PTR_ERR(base); goto exit_error; } Acked-by: Andreas Larsson -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to maj

[PATCH v6 2/2] gpio: grgpio: Add irq support

2013-04-17 Thread Andreas Larsson
The drivers sets up an irq domain and hands out unique irqs to irq capable gpio lines regardless of how underlying irq maps to gpio lines. Any gpio line can map to any one or none of the irqs of the core, independently of each other. Signed-off-by: Andreas Larsson --- Changes since v5

[PATCH v6 0/2] gpio: Add device driver for GRGPIO cores

2013-04-17 Thread Andreas Larsson
ock in irq-handler - add warning printout in irq-handler if no gpio line matches irq Andreas Larsson (2): gpio: grgpio: Add device driver for GRGPIO cores gpio: grgpio: Add irq support .../devicetree/bindings/gpio/gpio-grgpio.txt | 26 + drivers/gpio/Kconfig

[PATCH v6 1/2] gpio: grgpio: Add device driver for GRGPIO cores

2013-04-17 Thread Andreas Larsson
This driver supports GRGPIO gpio cores available in the GRLIB VHDL IP core library from Aeroflex Gaisler. Signed-off-by: Andreas Larsson --- Changes since v5: - register accesses via base + constant - no base irq number from device tree - no empty irq-handler .../devicetree/bindings/gpio/gpio

[PATCH v5 1/3] gpio: gpio-generic: Add 16 and 32 bit big endian byte order support

2013-03-15 Thread Andreas Larsson
There is no general support for 64-bit big endian accesses, so that is left unsupported. Signed-off-by: Andreas Larsson --- drivers/gpio/gpio-generic.c | 56 --- include/linux/basic_mmio_gpio.h |1 + 2 files changed, 48 insertions(+), 9 deletions

[PATCH v5 3/3] gpio: grgpio: Add irq support

2013-03-15 Thread Andreas Larsson
The drivers sets up an irq domain and hands out unique virqs to irq capable gpio lines regardless of which underlying irqs maps to which gpio line. Signed-off-by: Andreas Larsson --- .../devicetree/bindings/gpio/gpio-grgpio.txt |5 + drivers/gpio/gpio-grgpio.c

[PATCH v5 2/3] gpio: grgpio: Add device driver for GRGPIO cores

2013-03-15 Thread Andreas Larsson
This driver supports GRGPIO gpio cores available in the GRLIB VHDL IP core library from Aeroflex Gaisler. Signed-off-by: Andreas Larsson --- .../devicetree/bindings/gpio/gpio-grgpio.txt | 24 +++ drivers/gpio/Kconfig |9 ++ drivers/gpio/Makefile

[PATCH v5 0/3] gpio: Add device driver for GRGPIO cores and support custom accessors with gpio-generic

2013-03-15 Thread Andreas Larsson
Signed-off-by: Andreas Larsson Andreas Larsson (3): gpio: gpio-generic: Add 16 and 32 bit big endian byte order support gpio: grgpio: Add device driver for GRGPIO cores gpio: grgpio: Add irq support .../devicetree/bindings/gpio/gpio-grgpio.txt | 29 ++ drivers/gpio/Kconfig

Re: [PATCH v3] gpio: Add device driver for GRGPIO cores and support custom accessors with gpio-generic

2013-03-08 Thread Andreas Larsson
On Thu, 2013-03-07 at 04:44 +0100, Linus Walleij wrote: > On Mon, Mar 4, 2013 at 10:46 AM, Andreas Larsson wrote: > > [Me] > >>> +struct grgpio_priv { > >>> + struct bgpio_chip bgc; > >>> + struct grgpio_regs __iomem *regs; > >&g

Re: [PATCH v3] gpio: Add device driver for GRGPIO cores and support custom accessors with gpio-generic

2013-03-04 Thread Andreas Larsson
On 2013-03-01 01:24, Linus Walleij wrote: On Tue, Feb 12, 2013 at 8:24 AM, Andreas Larsson wrote: This driver supports GRGPIO gpio cores available in the GRLIB VHDL IP core library from Aeroflex Gaisler. This also adds support to gpio-generic for using custom accessor functions. The grgpio

Re: [PATCH 1/2] gpio: gpio-generic: Fix bug in big endian bit conversion

2013-02-26 Thread Andreas Larsson
On 2013-02-26 11:46, Andreas Larsson wrote: On 2013-02-26 08:52, Grant Likely wrote: On Sat, 09 Feb 2013 14:58:55 +, Grant Likely wrote: We /could/ have a ioread32be/write32be mode in the driver, but I don't think that is the right approach. It means we need yet another set of acce

Re: [PATCH 1/2] gpio: gpio-generic: Fix bug in big endian bit conversion

2013-02-26 Thread Andreas Larsson
On 2013-02-26 08:52, Grant Likely wrote: On Sat, 09 Feb 2013 14:58:55 +, Grant Likely wrote: On Tue, 5 Feb 2013 11:33:02 +0100, Andreas Larsson wrote: The swap to convert LE to BE in bgpio_pin2mask_be should be on byte level, not on bit level. Signed-off-by: Andreas Larsson

[PATCH v3 3/7] spi: spi-fsl-spi: Move setting non-zero tx and rx shifts to a function accessed by a function pointer

2013-02-15 Thread Andreas Larsson
Acked-by: Anton Vorontsov Signed-off-by: Andreas Larsson --- drivers/spi/spi-fsl-lib.h |5 drivers/spi/spi-fsl-spi.c | 51 +++- 2 files changed, 36 insertions(+), 20 deletions(-) diff --git a/drivers/spi/spi-fsl-lib.h b/drivers/spi/spi-fsl

[PATCH v3 5/7] spi: spi-fsl-spi: Add support for setting a maximum number of bits per word

2013-02-15 Thread Andreas Larsson
Acked-by: Anton Vorontsov Signed-off-by: Andreas Larsson --- drivers/spi/spi-fsl-lib.h |1 + drivers/spi/spi-fsl-spi.c |8 +++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spi-fsl-lib.h b/drivers/spi/spi-fsl-lib.h index 5a9c36c..d5c788b 100644 --- a

[PATCH v3 1/7] spi: spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environment

2013-02-15 Thread Andreas Larsson
devicetree probing a "clock-frequency" property is used for clock frequency instead of calls to FSL_SOC-specific functions. Acked-by: Anton Vorontsov Signed-off-by: Andreas Larsson --- Change since v2: - Small style tweak lining up function arguments properly This introduces a l

[PATCH v3 7/7] spi: spi-fsl-spi: Add support for gpio chipselects for GRLIB type cores

2013-02-15 Thread Andreas Larsson
This relies upon of_spi_register_master to find out which gpios to use. Acked-by: Anton Vorontsov Signed-off-by: Andreas Larsson --- drivers/spi/spi-fsl-lib.h |1 + drivers/spi/spi-fsl-spi.c | 50 2 files changed, 46 insertions(+), 5 deletions

[PATCH v3 0/7] spi: spi-fsl-spi: Make spi-fsl-spi usable in cpu mode outside of FSL SOC environments and add a grlib variant normally running on sparc

2013-02-15 Thread Andreas Larsson
ag for this core in include/linux/fsl_devices.h which does not feel right given that this core is not part of an FSL device. Signed-off-by: Andreas Larsson Andreas Larsson (7): spi: spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environment spi: spi-fsl-spi: Make sure in spi_

[PATCH v3 2/7] spi: spi-fsl-spi: Make sure in spi_fsl_setup that chipselect becomes inactive

2013-02-15 Thread Andreas Larsson
This is needed for a device in SPI_CS_HIGH mode that otherwise could start out active for the first transaction. Acked-by: Anton Vorontsov Signed-off-by: Andreas Larsson --- drivers/spi/spi-fsl-spi.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/spi/spi

[PATCH v3 6/7] spi: spi-fsl-spi: Add support for Aeroflex Gaisler GRLIB cores normally running on SPARC

2013-02-15 Thread Andreas Larsson
function differences exists but are not relevant to the driver. Acked-by: Anton Vorontsov Signed-off-by: Andreas Larsson --- Documentation/devicetree/bindings/spi/fsl-spi.txt |2 +- .../devicetree/bindings/vendor-prefixes.txt|1 + drivers/spi/Kconfig

[PATCH v3 4/7] spi: spi-fsl-spi: Introduce a type for the driver

2013-02-15 Thread Andreas Larsson
For being able to distinguishing between the regular type of cores and others with different entries in of_fsl_spi_match. Acked-by: Anton Vorontsov Signed-off-by: Andreas Larsson --- drivers/spi/spi-fsl-lib.h |2 ++ drivers/spi/spi-fsl-spi.c | 39

[PATCH v4 RESEND] gpio: Add device driver for GRGPIO cores and support custom accessors with gpio-generic

2013-02-14 Thread Andreas Larsson
Vorontsov Signed-off-by: Andreas Larsson --- [Resent as I forgot to mark it as v4] Changes since v3: - Add Reveiwed-by - Fix pointed out style issues - Use np->full_name directly instead of kstrdup'ing it as it is a const char* - Call gpiochip_remove in grgpio_remove .../devicetree/

[PATCH] gpio: Add device driver for GRGPIO cores and support custom accessors with gpio-generic

2013-02-13 Thread Andreas Larsson
Vorontsov Signed-off-by: Andreas Larsson --- Changes since v3: - Add Reveiwed-by - Fix pointed out style issues - Use np->full_name directly instead of kstrdup'ing it as it is a const char* - Call gpiochip_remove in grgpio_remove .../devicetree/bindings/gpio/gpio-grgpio.txt

Re: [PATCH v3] gpio: Add device driver for GRGPIO cores and support custom accessors with gpio-generic

2013-02-13 Thread Andreas Larsson
On 2013-02-13 08:05, Anton Vorontsov wrote: On Tue, Feb 12, 2013 at 08:24:33AM +0100, Andreas Larsson wrote: + res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); + regs = devm_request_and_ioremap(&ofdev->dev, res); Just wonder, is it safe to pass null

[PATCH] of: spi: Return error from of_spi_register_master on bad "cs-gpios" property

2013-02-13 Thread Andreas Larsson
used it is important that failure to read a broken "cs-gpios" property does not silently fail leading to the spi controller to use an unintended chipselect. Signed-off-by: Andreas Larsson --- Can only be applied to devicetree/next as it builds upon the "of: Add helper for count

[PATCH] spi: Initialize cs_gpio and cs_gpios with -ENOENT

2013-02-13 Thread Andreas Larsson
GPIO line should not be used for the given spi_device. This sets the default value of cs_gpio in struct spi_device and entries of cs_gpios in struct spi_master to -ENOENT. Thus, -ENOENT is the only value used to indicate that no GPIO line should be used. Signed-off-by: Andreas Larsson --- To be appl

  1   2   >