Re: [PATCH] arm: aspeed: Add Aspeed board file with clocksource devicetree fixup

2017-06-20 Thread Jonas Jensen
On 20 June 2017 at 10:06, Linus Walleij wrote: > Moxart is deploying the DTBs with the kernel, they go hand-in-hand. > Backward compatibility with old DTBs here would just be an academic > exercise. I've used CONFIG_ARM_APPENDED_DTB=y since the beginning mainly because UC-7112-LX's proprietary bo

Re: [PATCH 2/2] drivers/clocksource/fttmr010: Implement delay timer

2017-06-12 Thread Jonas Jensen
ce 8000.flash [1.192166] Creating 4 MTD partitions on "8000.flash": [1.198093] 0x-0x0004 : "bootloader" [1.220088] 0x0004-0x0020 : "linux kernel" [ 1.244496] 0x0020-0x00a0 : "root filesystem" [1.269177] 0x00a0-0x0100 : "user filesystem" Tested-by: Jonas Jensen

[PATCH] ARM: dts: moxart: rename sdhci mmc

2017-05-23 Thread Jonas Jensen
The host driver compatible string changed to "moxa,moxart-mmc" during the review process while the old name was committed to moxart's dts* files. Correct the host driver compatible string and also fix the node name. Signed-off-by: Jonas Jensen --- Notes: Applies to next-2017

Re: [PATCH 7/8 v2] clocksource/drivers/fttmr010: Merge Moxa into FTTMR010

2017-05-19 Thread Jonas Jensen
tem with ordered data mode. Opts: (null) [6.265796] VFS: Mounted root (ext3 filesystem) on device 179:1. [6.373316] devtmpfs: mounted [6.410728] Freeing unused kernel memory: 192K [6.415430] This architecture does not have kernel memory protection. INIT: version 2.88 booting Tested-by: Jonas Jensen Jonas

Re: [PATCH 0/8] clocksource: Generalize Faraday timer

2017-05-18 Thread Jonas Jensen
On 17 May 2017 at 16:05, Linus Walleij wrote: > The patches can be applied as soon as Jonas Jensen and Joel > Stanley says they work for them. Thanks! fttmr010 seem to work OK! I did the usual test on UC-7112-LX [1] after merging linux-nomadik/fttmr010 into next-20170518. [1]

Re: [PATCH v2] net: moxa: fix TX overrun memory leak

2017-03-28 Thread Jonas Jensen
On 28 March 2017 at 05:50, David Miller wrote: > Doing the wakeup unconditionally is very wasteful, you just need to do it > when enough space has been made available. Thanks, please see v3. Jonas

[PATCH v3] net: moxa: fix TX overrun memory leak

2017-03-28 Thread Jonas Jensen
ug.cgi?id=99451 Signed-off-by: Jonas Jensen --- Notes: ChangeLog v2->v3: - add wakeup threshold ChangeLog v1->v2: - stop queue instead of dropping frames Applies to next-20170310 drivers/net/ethernet/moxa/moxart_ether.c | 20 ++-- drivers/net/etherne

[PATCH v2] net: moxa: fix TX overrun memory leak

2017-03-27 Thread Jonas Jensen
r. Wake it on completion. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=99451 Signed-off-by: Jonas Jensen --- Notes: ChangeLog v1->v2: - stop queue instead of dropping frames The following trick was used to trigger the leak. On the host (where this driver

[PATCH] net: moxa: fix TX overrun memory leak

2015-06-05 Thread Jonas Jensen
ail. Move tx_head and place tx_tail within spinlock, avoiding read-write race that could happen when interrupts hit at the wrong moment. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=99451 Signed-off-by: Jonas Jensen --- Notes: Applies to next-20150604 drivers/net/ethernet/moxa/moxart_et

Re: [PATCH v5 1/2] net: moxa: clear TX descriptor length bits

2014-08-25 Thread Jonas Jensen
Thanks for giving feedback. On 20 August 2014 19:10, Eric Dumazet wrote: > Wouldnt it be faster to not use readl() at all here ? On 22 August 2014 06:39, David Miller wrote: > Like others I wonder why the existing descriptor value is being read > at all. It makes sense and I have verified, tra

Re: [PATCH v4 2/2] net: moxa: replace build_skb() with netdev_alloc_skb_ip_align() / memcpy()

2014-08-25 Thread Jonas Jensen
Thanks for giving feedback. On 21 August 2014 23:43, Michał Mirosław wrote: > This has implicit: if (!skb) BUG(); There should probably be a return > or continue inside the if (!skb). Fixed, see v6 update (broken out to separate patch) which now includes increment to RX head counter > dma_sync_

[PATCH v6 4/4] net: moxa: continue loop on skb allocation failure

2014-08-25 Thread Jonas Jensen
explicit napi_gro_flush() Signed-off-by: Jonas Jensen --- Notes: Applies to next-20140825 drivers/net/ethernet/moxa/moxart_ether.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart

[PATCH v6 3/4] net: moxa: synchronize DMA memory

2014-08-25 Thread Jonas Jensen
DMA memory should be synchronized before data is passed to/from controller. Add dma_sync_single_for_cpu(.., DMA_FROM_DEVICE) to RX path and dma_sync_single_for_device(.., DMA_TO_DEVICE) to TX path. Signed-off-by: Jonas Jensen --- Notes: Applies to next-20140825 drivers/net/ethernet/moxa

[PATCH v6 1/4] net: moxa: clear DESC1 on ndo_start_xmit()

2014-08-25 Thread Jonas Jensen
TX buffer length is not cleared on ndo_start_xmit(). Failing to do so can bug/hang the controller and cause TX interrupts to stop altogether. Remove the readl() and compute a new value for DESC1. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=69031 Signed-off-by: Jonas Jensen --- Notes

[PATCH v6 2/4] net: moxa: replace build_skb() with netdev_alloc_skb_ip_align() / memcpy()

2014-08-25 Thread Jonas Jensen
memcpy(). Remove SKB_DATA_ALIGN() from RX buffer size while we're at it. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=69041 Signed-off-by: Jonas Jensen --- Notes: Changes since v5: 1. broke out DMA synchronization to separate patch Applies to next-201

Re: [PATCH v4 2/2] net: moxa: replace build_skb() with netdev_alloc_skb_ip_align() / memcpy()

2014-08-20 Thread Jonas Jensen
On 19 August 2014 20:31, Eric Dumazet wrote: > Instead of : > > priv->rx_buf_size = RX_BUF_SIZE + > SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); > > I think rx_buf_size can now be RX_BUF_SIZE You're right, that's now a remnant, see update in v5. > Another point is that priv->

[PATCH v5 1/2] net: moxa: clear TX descriptor length bits

2014-08-20 Thread Jonas Jensen
Signed-off-by: Jonas Jensen --- Notes: No changes since v4. Applies to next-20140820 drivers/net/ethernet/moxa/moxart_ether.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c index

[PATCH v5 2/2] net: moxa: replace build_skb() with netdev_alloc_skb_ip_align() / memcpy()

2014-08-20 Thread Jonas Jensen
memcpy(), and synchronize DMA memory before passing skb to napi_gro_receive(). Remove SKB_DATA_ALIGN() from RX buffer size while we're at it. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=69041 Signed-off-by: Jonas Jensen --- Notes: Changes since v4: 1. remove SKB_DATA_

Re: fs: panic in mnt_set_mountpoint

2014-08-20 Thread Jonas Jensen
> diff --git a/fs/namespace.c b/fs/namespace.c > index 4246696dc678..a6815027f225 100644 > --- a/fs/namespace.c > +++ b/fs/namespace.c > @@ -736,6 +736,7 @@ static struct mountpoint *new_mountpoint(struct dentry > *dentry) > return ERR_PTR(ret); > } > > + INIT_HLIST_H

[PATCH v4 2/2] net: moxa: replace build_skb() with netdev_alloc_skb_ip_align() / memcpy()

2014-08-19 Thread Jonas Jensen
memcpy(). Also, synchronize DMA memory before passing skb to napi_gro_receive(). Addresses https://bugzilla.kernel.org/show_bug.cgi?id=69041 Signed-off-by: Jonas Jensen --- Notes: The original motivation was to avoid memcpy(), since the memory is already allocated, why make a copy

[PATCH v4 1/2] net: moxa: clear TX descriptor length bits

2014-08-19 Thread Jonas Jensen
Signed-off-by: Jonas Jensen --- Notes: Changes since v3: 1. commit message reworded Applies to next-20140818 drivers/net/ethernet/moxa/moxart_ether.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net

fs: panic in mnt_set_mountpoint

2014-08-18 Thread Jonas Jensen
Hi, I've run into a kernel panic [1] in next-20140818 you might find interesting. It surprised me because there was never an error in next-20140815, I did a search for related panics but it came up empty. The board boots fine after applying the following: diff --git a/fs/namespace.c b/fs/namesp

Re: [RFC PATCH 0/5] watchdog: Add reboot API

2014-05-06 Thread Jonas Jensen
Thanks, Applied in series: 1, 3, and 4 Patches work on moxa UC-7112-LX hardware. Tested-by: Jonas Jensen -- 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

[PATCH] ARM: moxart: add select CLKSRC_OF to ARCH_MOXART

2014-04-11 Thread Jonas Jensen
CLKSRC_OF was recently removed from options selected by ARCH_MULTIPLATFORM, breaking boot on MOXA ART SoCs. Add it to options selected by ARCH_MOXART. Signed-off-by: Jonas Jensen --- Notes: see "Merge tag 'cleanup-3.15' of git://git.kernel.org/pub/scm/linux/kernel/

Re: [PATCH] ARM: reinsert ARCH_MULTI_V4 Kconfig option

2014-04-10 Thread Jonas Jensen
On 9 April 2014 18:01, Russell King - ARM Linux wrote: > It would be useful to see the register state from the undefined > instruction exception. That needs this patch, CONFIG_DEBUG_USER in the > kernel config enabled, and user_debug=1 passed on the kernel command > line. I have done two tests,

Re: [PATCH] ARM: reinsert ARCH_MULTI_V4 Kconfig option

2014-04-09 Thread Jonas Jensen
On 13 December 2013 12:39, Russell King - ARM Linux wrote: > I see what's causing this: the kuser helpers are using "bx lr" to return > which will be undefined on non-Thumb CPUs. We generally cope fine with > non-Thumb CPUs, conditionalising where necessary on HWCAP_THUMB or the > T bit in the PS

[PATCH v8] mmc: moxart: Add MOXA ART SD/MMC driver

2014-04-09 Thread Jonas Jensen
Add SD/MMC driver for MOXA ART SoCs. The "MOXA ART MMC controller" is likely a faraday "ftsdc010", a controller with support in U-Boot: http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mmc/ftsdc010_mci.c Signed-off-by: Jonas Jensen --- Notes: This has been cleaned up

[PATCH v11] clk: add MOXA ART SoCs clock driver

2014-01-28 Thread Jonas Jensen
MOXA ART SoCs allow to determine PLL output and APB frequencies by reading registers holding multiplier and divisor information. Add a clock driver for this SoC. Signed-off-by: Jonas Jensen --- Notes: Thanks for the replies, Changes since v10: 1. add clock-specifier to DT

[PATCH] ARM: moxart: DT fixups

2014-01-21 Thread Jonas Jensen
Change DT files to remain coherent with changes in accompanying drivers. 1. replace "sdhci" with "mmc" 2. add bus-width property to mmc node 3. drop device_type property 4. replace "mac@" with "ethernet@" 5. replace CONFIG_MMC_SDHCI_MOXART with CONFIG

[PATCH v3 3/7] net: moxa: connect to PHY

2014-01-21 Thread Jonas Jensen
The kernel now has a MDIO bus driver and a phy_driver (RTL8201CP), connect to this PHY using OF. Signed-off-by: Jonas Jensen --- Notes: Thanks for reviewing, This time I'll avoid sending out the entire set, attaching it here directly to my reply. Because the DT ex

[PATCH v10] clk: add MOXA ART SoCs clock driver

2014-01-21 Thread Jonas Jensen
MOXA ART SoCs allow to determine PLL output and APB frequencies by reading registers holding multiplier and divisor information. Add a clock driver for this SoC. Signed-off-by: Jonas Jensen --- Notes: Thanks for the reply Sudeep, changes are in v10. Changes since v9: 1

[PATCH v7] mmc: moxart: Add MOXA ART SD/MMC driver

2014-01-21 Thread Jonas Jensen
Add SD/MMC driver for MOXA ART SoCs. Signed-off-by: Jonas Jensen --- Notes: v6 was supposed to fix a panic from dmaengine_tx_status() but it still happened. This is the sort of panic that lasts between reboots but not between kernel reflash. dmaengine_tx_status() is used

[PATCH v3 2/7] net: moxa: fix build_skb() memory corruption

2014-01-20 Thread Jonas Jensen
DMA buffer memory must be synchronized and copied before passing skb to napi_gro_receive(). The use of build_skb() can lead to memory corruption, replace it with netdev_alloc_skb_ip_align() and memcpy(). Addresses https://bugzilla.kernel.org/show_bug.cgi?id=69041 Signed-off-by: Jonas Jensen

[PATCH v3 6/7] net: moxa: generate random address

2014-01-20 Thread Jonas Jensen
The address register is zero:ed on boot, fill it with a randomly generated address on probe. Signed-off-by: Jonas Jensen --- Notes: Applies to next-20140120 drivers/net/ethernet/moxa/moxart_ether.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/moxa

[PATCH v3 3/7] net: moxa: connect to PHY

2014-01-20 Thread Jonas Jensen
The kernel now has a MDIO bus driver and a phy_driver (RTL8201CP), connect to this PHY using OF. Signed-off-by: Jonas Jensen --- Notes: Applies to next-20140120 .../devicetree/bindings/net/moxa,moxart-mac.txt| 47 ++- drivers/net/ethernet/moxa/moxart_ether.c | 92

[PATCH v3 7/7] net: moxa: use eth_mac_addr()

2014-01-20 Thread Jonas Jensen
Replace boilerplate in moxart_set_mac_address() with eth_mac_addr(). Signed-off-by: Jonas Jensen --- Notes: Applies to next-20140120 drivers/net/ethernet/moxa/moxart_ether.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c

[PATCH v3 5/7] net: moxa: add IFF_LIVE_ADDR_CHANGE flag

2014-01-20 Thread Jonas Jensen
.ndo_set_mac_address hook callback already supports IFF_LIVE_ADDR_CHANGE so add it to our flags. Signed-off-by: Jonas Jensen --- Notes: Applies to next-20140120 drivers/net/ethernet/moxa/moxart_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net

[PATCH v3 1/7] net: moxa: clear TX descriptor length bits between sends

2014-01-20 Thread Jonas Jensen
: Jonas Jensen --- Notes: Applies to next-20140120 drivers/net/ethernet/moxa/moxart_ether.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c index 5020fd4..aa45607 100644 --- a/drivers/net

[PATCH v3 4/7] net: moxa: add ethtool support

2014-01-20 Thread Jonas Jensen
Add and assign ethtool_ops callback functions. Signed-off-by: Jonas Jensen --- Notes: Applies to next-20140120 drivers/net/ethernet/moxa/moxart_ether.c | 121 +++ 1 file changed, 121 insertions(+) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b

[PATCH v9] clk: add MOXA ART SoCs clock driver

2014-01-17 Thread Jonas Jensen
This patch adds MOXA ART SoCs clock driver support. Signed-off-by: Jonas Jensen --- Notes: Changes since v8: 1. rebase drivers/clk/Makefile to next-20140117 DT bindings document: 2. use two separate sections describing PLL/APB 3. update example

[PATCH v6] mmc: sdhci-moxart: Add MOXA ART SDHCI driver

2014-01-17 Thread Jonas Jensen
Add SDHCI driver for MOXA ART SoCs. Signed-off-by: Jonas Jensen --- Notes: Changes in v6 fixes a kernel panic in moxart_dma_complete(). Panic only happens with CONFIG_SLAB or CONFIG_SLOB, the same code works for CONFIG_SLUB, and happens because a cookie belonging to the

[PATCH v16] dmaengine: Add MOXA ART DMA engine driver

2014-01-17 Thread Jonas Jensen
driver or client application. Signed-off-by: Jonas Jensen --- Notes: Changes since v15: 1. rebase drivers/dma/Kconfig to next-20140117 Applies to next-20140117 .../devicetree/bindings/dma/moxa,moxart-dma.txt| 45 ++ drivers/dma/Kconfig| 8

[PATCH] ARM: moxart: move fixed rate clock child node to board level dts

2014-01-16 Thread Jonas Jensen
When a skeleton "clocks { .. }" remain in .dtsi, the child node can be moved to .dts, "ref12" is then found by of_clk_get(). Signed-off-by: Jonas Jensen --- Notes: Applies to next-20140116 arch/arm/boot/dts/moxart-uc7112lx.dts | 8 arch/arm/boot/dts/mox

Re: build_skb() and data corruption

2014-01-14 Thread Jonas Jensen
Thanks for the replies, you led me to a new solution, I now think build_skb() is not the right choice, my motivation for using it in the first place, that I thought it meant getting away with not copying memory. build_skb() is replaced by netdev_alloc_skb_ip_align() and memcpy() (derived from dr

build_skb() and data corruption

2014-01-13 Thread Jonas Jensen
Please help, I think I see memory corruption with a driver recently added to linux-next. The following error occur downloading a large file with wget (or ncftp): "read error: Bad address" wget exits and leaves the file unfinished. The error goes away when build_skb() is patched out, in this case

Re: [PATCH v6 2/2] ARM: mach-moxart: add MOXA ART SoC device tree files

2013-12-19 Thread Jonas Jensen
On 19 December 2013 00:41, Peter Crosthwaite wrote: >> + clocks { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + ref12: ref12M { >> + compatible = "fixed-clock"; > > Is the correct split to perhaps have the fixed-c

[PATCH v7 2/2] ARM: mach-moxart: add MOXA ART SoC device tree files

2013-12-19 Thread Jonas Jensen
Add a generic (dtsi) include file for MOXA ART SoCs. Also add a file for UC-7112-LX. Signed-off-by: Jonas Jensen --- Documentation/devicetree/bindings/arm/moxart.txt | 12 ++ arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/moxart-uc7112lx.dts| 117

[PATCH v7 1/2] ARM: mach-moxart: add MOXA ART SoC platform files

2013-12-19 Thread Jonas Jensen
The MOXA ART SoC is based on Faraday's FA526. This is a ARMv4 32-bit 192 MHz CPU with MMU and 16KB/8KB D/I-cache. Add platform support for this SoC. Also add UC-7112-LX as a machine. Signed-off-by: Jonas Jensen --- arch/arm/Kconfig | 2 + arch/arm/Mak

[PATCH v7 0/2] ARM: mach-moxart: add MOXA ART SoC support

2013-12-19 Thread Jonas Jensen
of_clk_get() works again. Changes since v6: 1. move fixed rate clock "ref12" from .dtsi to .dts 2. sort new entry alphabetically in arch/arm/Kconfig 3. rebase to next-20131219: arch/arm/Makefile arch/arm/Kconfig Applies to next-20131219 Jonas Jensen (2): ARM: mach-moxart: add MOXA A

[PATCH] watchdog: mach-moxart: add restart handler

2013-12-18 Thread Jonas Jensen
mach-moxart lacks a separate register for reset; as a workaround, add a function that can be hooked to arm_pm_restart. Signed-off-by: Jonas Jensen --- Notes: During review of this driver, the restart handler for moxart was removed, and moved to platform code under arch/arm/mach-moxart

Re: [PATCH v5 2/2] ARM: mach-moxart: add MOXA ART SoC device tree files

2013-12-18 Thread Jonas Jensen
Thanks for the replies, changes should be in v6. On 18 December 2013 00:29, Peter Crosthwaite wrote: >> + clocks { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + ref12: ref12M { >> + compatible = "fixed-clock"; >>

[PATCH v6 1/2] ARM: mach-moxart: add MOXA ART SoC platform files

2013-12-18 Thread Jonas Jensen
The MOXA ART SoC is based on Faraday's FA526. This is a ARMv4 32-bit 192 MHz CPU with MMU and 16KB/8KB D/I-cache. Add platform support for this SoC. Also add UC-7112-LX as a machine. Signed-off-by: Jonas Jensen --- arch/arm/Kconfig | 2 + arch/arm/Mak

[PATCH v6 2/2] ARM: mach-moxart: add MOXA ART SoC device tree files

2013-12-18 Thread Jonas Jensen
Add a generic (dtsi) include file for MOXA ART SoCs. Also add a file for UC-7112-LX. Signed-off-by: Jonas Jensen --- Documentation/devicetree/bindings/arm/moxart.txt | 12 ++ arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/moxart-uc7112lx.dts| 109

[PATCH v6 0/2] ARM: mach-moxart: add MOXA ART SoC support

2013-12-18 Thread Jonas Jensen
bc clkspec->np=c02fe7dc [0.00] of_clk_get_from_provider: provider->get() failed [0.00] of_clk_get_from_provider: no providers [0.00] Kernel panic - not syncing: /soc/timer@9840: of_clk_get failed Changes since v5: 1. change Makefile objects list order, sort alp

[PATCH v5 1/2] ARM: mach-moxart: add MOXA ART SoC platform files

2013-12-17 Thread Jonas Jensen
The MOXA ART SoC is based on Faraday's FA526. This is a ARMv4 32-bit 192 MHz CPU with MMU and 16KB/8KB D/I-cache. Add platform support for this SoC. Also add UC-7112-LX as a machine. Signed-off-by: Jonas Jensen --- arch/arm/Kconfig | 2 + arch/arm/Mak

[PATCH v5 0/2] ARM: mach-moxart: add MOXA ART SoC support

2013-12-17 Thread Jonas Jensen
. removed moxart_defconfig options: # CONFIG_ARM_THUMB is not set Applies to next-20131217 Jonas Jensen (2): ARM: mach-moxart: add MOXA ART SoC platform files ARM: mach-moxart: add MOXA ART SoC device tree files Documentation/devicetree/bindings/arm/moxart.txt | 12 ++ arch/arm/Kconfig

[PATCH v5 2/2] ARM: mach-moxart: add MOXA ART SoC device tree files

2013-12-17 Thread Jonas Jensen
Add a generic (dtsi) include file for MOXA ART SoCs. Also add a file for UC-7112-LX. Signed-off-by: Jonas Jensen --- Documentation/devicetree/bindings/arm/moxart.txt | 12 ++ arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/moxart-uc7112lx.dts| 93

Re: [PATCH v4 2/2] ARM: mach-moxart: add MOXA ART SoC device tree files

2013-12-16 Thread Jonas Jensen
On 15 December 2013 05:27, Peter Crosthwaite wrote: >> + sdhci: sdhci@98e0 { >> + compatible = "moxa,moxart-sdhci"; >> + reg = <0x98e0 0x5C>; >> + interrupts = <5 0>; >> + clocks = <&clk_apb>; >> + dmas = <&dma 5>

[PATCH v15] dmaengine: Add MOXA ART DMA engine driver

2013-12-16 Thread Jonas Jensen
driver or client application. Signed-off-by: Jonas Jensen --- Notes: Changes since v14: 1. add "completed_sgs" parameter to moxart_dma_desc_size() 2. use [1], corrected the in flight residue calculation Applies to next-20131216 .../devicetree/bindings/dma/moxa,moxa

Re: [PATCH v4 1/2] ARM: mach-moxart: add MOXA ART SoC platform files

2013-12-14 Thread Jonas Jensen
On 14 December 2013 16:50, Guenter Roeck wrote: > The above would at least avoid the crash, though I would not understand > the point of having an unloadable restart handler. Forcing the watchdog > driver into the kernel just because you want the restart handler in it > would seem odd. And if the

Re: [PATCH v4 1/2] ARM: mach-moxart: add MOXA ART SoC platform files

2013-12-14 Thread Jonas Jensen
On 13 December 2013 20:07, Guenter Roeck wrote: >> I got the impression from Guenter Roeck's review, that it doesn't belong >> there, >> maybe I was too quick to remove it? >> > You'd have to answer the questions I raised in my review if you want it in > there. I didn't see a solution at the tim

Re: [PATCH v4 1/2] ARM: mach-moxart: add MOXA ART SoC platform files

2013-12-13 Thread Jonas Jensen
On 13 December 2013 17:17, Arnd Bergmann wrote: > IIRC the separate defconfig is needed because we have never gotten a mixed > fa526+arm9 > kernel to boot, right? In theory it is supposed to work and there is most > likely just > a small bug somewhere. Once that is working, we can think about ad

[PATCH v4 2/2] ARM: mach-moxart: add MOXA ART SoC device tree files

2013-12-13 Thread Jonas Jensen
Add a generic (dtsi) include file for MOXA ART SoCs. Also add a file for UC-7112-LX. Signed-off-by: Jonas Jensen --- Documentation/devicetree/bindings/arm/moxart.txt | 12 +++ arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/moxart-uc7112lx.dts| 131

[PATCH v4 1/2] ARM: mach-moxart: add MOXA ART SoC platform files

2013-12-13 Thread Jonas Jensen
The MOXA ART SoC is based on Faraday's FA526. This is a ARMv4 32-bit 192 MHz CPU with MMU and 16KB/8KB D/I-cache. Add platform support for this SoC. Also add UC-7112-LX as a machine. Signed-off-by: Jonas Jensen --- arch/arm/Kconfig | 2 + arch/arm/Mak

[PATCH v4 0/2] ARM: mach-moxart: add MOXA ART SoC support

2013-12-13 Thread Jonas Jensen
dtsi: 13. add fixed-clock node "ref12" 14. remove "clk" node, add nodes "clk_pll"/"clk_apb" 15. add gpio-rtc-* (sclk|data|reset) to "rtc" node 16. add "dma" node 17. remove second register from "gpio" node Applies to next-20131213 J

Re: [PATCH] ARM: reinsert ARCH_MULTI_V4 Kconfig option

2013-12-13 Thread Jonas Jensen
Boots without panic when bx is removed. Diff and boot log: diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index b3fb8c9..ad736b3 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -737,8 +737,8 @@ ENDPROC(__switch_to) .macro usr_ret

Re: [PATCH] ARM: reinsert ARCH_MULTI_V4 Kconfig option

2013-12-13 Thread Jonas Jensen
On 13 December 2013 10:56, Russell King - ARM Linux wrote: > So, having these symbols enabled (provided the right ones for FA526 are > also enabled) makes no difference. So I don't buy your explanation. The explanation is indeed false, CPU_FA526 and CPU_ARM920T get along just fine. That's not wh

[PATCH] ARM: reinsert ARCH_MULTI_V4 Kconfig option

2013-12-13 Thread Jonas Jensen
forms with CPU_FA526. Signed-off-by: Jonas Jensen --- Notes: I don't know how to handle this so I'm making it standalone for your feedback (it was broken out from MOXA ART SoC series). This is important for MOXA ART (and other FA526 platforms), please have a look.

[PATCH v14] dmaengine: Add MOXA ART DMA engine driver

2013-12-12 Thread Jonas Jensen
driver or client application. Signed-off-by: Jonas Jensen --- Notes: Thanks for the replies! This is now rebased on next-20131212 and uses the newly added dma_get_any_slave_channel(). There's a problem/crash if DMA_PRIVATE isn't first added to capabil

[PATCH v13] dmaengine: Add MOXA ART DMA engine driver

2013-12-11 Thread Jonas Jensen
driver or client application. Signed-off-by: Jonas Jensen --- Notes: Thanks for the replies! Changes since v12: 1. add description of dma specifier to DT binding document 2. remove linux/irq.h include 3. rename "fn" to "len" in struct moxart_sg

[PATCH v5] mmc: sdhci-moxart: Add MOXA ART SDHCI driver

2013-12-11 Thread Jonas Jensen
Add SDHCI driver for MOXA ART SoCs. Signed-off-by: Jonas Jensen --- Notes: Changes since v4: 1. remove dma_chan_cur pointer from host structure 2. add local dma_chan_cur pointer in moxart_transfer_dma() 3. add dma_async_tx_descriptor pointer (host structure) 4. save

[PATCH v8] clk: add MOXA ART SoCs clock driver

2013-12-09 Thread Jonas Jensen
This patch adds MOXA ART SoCs clock driver support. Signed-off-by: Jonas Jensen --- Notes: Thanks for the replies. As indicated by Sylwester, that it's discouraged to use hardware to register DT properties (multiplier-* divisor-*), I decided to remove them.

[PATCH v2] dma: fix vchan_cookie_complete() debug print

2013-12-09 Thread Jonas Jensen
vchan_cookie_complete() is supposed to print the cookie value but it's always zero because: dma_cookie_complete() is called prior to dev_vdbg() Move the call, place it after dev_vdbg(). Signed-off-by: Jonas Jensen --- Notes: Changes since v1: 1. remove local dma_cookie_t

[PATCH] dma: fix vchan_cookie_complete() debug print

2013-12-06 Thread Jonas Jensen
vd->tx.cookie is set zero on dma_cookie_complete(), save to local before printing it. Signed-off-by: Jonas Jensen --- Notes: dev_vdbg() could also be moved to happen earlier, what do you prefer? Applies to next-20131206 drivers/dma/virt-dma.h | 4 +++- 1 file changed

[PATCH v12] dmaengine: Add MOXA ART DMA engine driver

2013-12-06 Thread Jonas Jensen
driver or client application. Signed-off-by: Jonas Jensen --- Notes: Thanks for the replies. This has now been reworked / uses the virt-dma layer. Changes inspired by OMAP DMA. Changes since v11: 1. implement vchan support 2. fill in residue Applies

[PATCH] gpio: MOXA ART: rename moxart_gpio_base to base

2013-12-02 Thread Jonas Jensen
Renaming "moxart_gpio_base" to "base" allows better fit, remove line breaks in moxart_gpio_get(). While doing trivial cleanup, also remove fields initialized with zero in moxart_template_chip. Signed-off-by: Jonas Jensen --- Notes: Thanks for applying! This

[PATCH v7] gpio: Add MOXA ART GPIO driver

2013-11-29 Thread Jonas Jensen
Add GPIO driver for MOXA ART SoCs. Signed-off-by: Jonas Jensen --- Notes: Thanks Arnd, done in other drivers no reason to not do it here. Changes since v6: 1. remove global __iomem pointer 2. add derived data structure "struct moxart_gpio_chip" 3. use co

[PATCH v6] gpio: Add MOXA ART GPIO driver

2013-11-28 Thread Jonas Jensen
Add GPIO driver for MOXA ART SoCs. Signed-off-by: Jonas Jensen --- Notes: Thanks for reviewing! v5 writes to "pincontrol" are not needed, the pins work regardless. I took notes probing the pins with a multimeter, and I don't know the proper place

[PATCH v2 5/6] net: MOXA ART: generate random address

2013-11-25 Thread Jonas Jensen
The address register is zero:ed on boot, fill it with a randomly generated address on probe. Signed-off-by: Jonas Jensen --- Notes: Applies to next-20131125 drivers/net/ethernet/moxa/moxart_ether.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/moxa

[PATCH v2 3/6] net: MOXA ART: add ethtool support

2013-11-25 Thread Jonas Jensen
Add and assign ethtool_ops callback functions. Signed-off-by: Jonas Jensen --- Notes: Thanks for reviewing! Changes since v1: 1. declare MOXART_NUM_STATS with ARRAY_SIZE macro 2. don't initialise info->n_stats in moxart_get_drvinfo() 3. remove "if (!

[PATCH v2 6/6] net: MOXA ART: use eth_mac_addr()

2013-11-25 Thread Jonas Jensen
Replace boilerplate in moxart_set_mac_address() with eth_mac_addr(). Signed-off-by: Jonas Jensen --- Notes: Applies to next-20131125 drivers/net/ethernet/moxa/moxart_ether.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c

[PATCH v2 2/6] net: MOXA ART: connect to PHY

2013-11-25 Thread Jonas Jensen
The kernel now has a MDIO bus driver and a phy_driver (RTL8201CP), connect to this PHY using OF. Signed-off-by: Jonas Jensen --- Notes: Thanks for reviewing! Changes since v1: 1. split ethtool support to separate patch 2. changes to devicetree binding document 3

[PATCH v2 1/6] net: MOXA ART: clear TX descriptor length bits between sends

2013-11-25 Thread Jonas Jensen
Add TX_DESC1_BUF_SIZE_MASK to bits that are cleared, before the TX buffer length is set. Failing to do so can cause the controller to drop dead i.e. all TX interrupts stop, resulting in complete communication failure. Signed-off-by: Jonas Jensen --- Notes: Applies to next-20131125 drivers

[PATCH v2 4/6] net: MOXA ART: add IFF_LIVE_ADDR_CHANGE flag

2013-11-25 Thread Jonas Jensen
.ndo_set_mac_address hook callback already supports IFF_LIVE_ADDR_CHANGE so add it to our flags. Signed-off-by: Jonas Jensen --- Notes: Applies to next-20131125 drivers/net/ethernet/moxa/moxart_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net

Re: [PATCH 2/5] net: MOXA ART: connect to PHY and add ethtool support

2013-11-22 Thread Jonas Jensen
On 22 November 2013 15:57, Jonas Jensen wrote: > drivers/net/ethernet/moxa/moxart_ether.c | 179 > ++- > drivers/net/ethernet/moxa/moxart_ether.h | 1 + > 2 files changed, 179 insertions(+), 1 deletion(-) I see now I forgot to include the device

[PATCH 2/5] net: MOXA ART: connect to PHY and add ethtool support

2013-11-22 Thread Jonas Jensen
The kernel now has a MDIO bus driver and a phy_driver (RTL8201CP), connect to this PHY using OF and add ethtool support. Signed-off-by: Jonas Jensen --- Notes: Applies to next-20131122 drivers/net/ethernet/moxa/moxart_ether.c | 179 ++- drivers/net/ethernet

[PATCH 3/5] net: MOXA ART: add IFF_LIVE_ADDR_CHANGE flag

2013-11-22 Thread Jonas Jensen
.ndo_set_mac_address hook callback already supports IFF_LIVE_ADDR_CHANGE so add it to our flags. Signed-off-by: Jonas Jensen --- Notes: Applies to next-20131122 drivers/net/ethernet/moxa/moxart_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net

[PATCH 5/5] net: MOXA ART: use eth_mac_addr()

2013-11-22 Thread Jonas Jensen
Replace boilerplate in moxart_set_mac_address() with eth_mac_addr(). Signed-off-by: Jonas Jensen --- Notes: Applies to next-20131122 drivers/net/ethernet/moxa/moxart_ether.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c

[PATCH 1/5] net: MOXA ART: clear TX descriptor length bits between sends

2013-11-22 Thread Jonas Jensen
Add TX_DESC1_BUF_SIZE_MASK to bits that are cleared, before the TX buffer length is set. Failing to do so can cause the controller to drop dead i.e. all TX interrupts stop, resulting in complete communication failure. Signed-off-by: Jonas Jensen --- Notes: Applies to next-20131122 drivers

[PATCH 4/5] net: MOXA ART: generate random address

2013-11-22 Thread Jonas Jensen
The address register is zero:ed on boot, fill it with a randomly generated address on probe. Signed-off-by: Jonas Jensen --- Notes: Applies to next-20131122 drivers/net/ethernet/moxa/moxart_ether.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/moxa

[PATCH v2] Documentation: Add MDIO bus node to PHY binding document

2013-11-13 Thread Jonas Jensen
Add MDIO bus node segment and update the example, allowing trivial bindings to break out boilerplate. Signed-off-by: Jonas Jensen --- Notes: Thanks Mark, This should have the changes from your comments. It also adds optional properties "compatible" and "reg", w

[PATCH] PHY: Add RTL8201CP phy_driver to realtek

2013-11-11 Thread Jonas Jensen
Add RTL8201CP phy_driver. Signed-off-by: Jonas Jensen --- Notes: RTL8201CP PHY is used on MOXA UC-711X hardware(s). Adding the ID allows the PHY to be probed (by libphy), and eventually connected from MAC code. Applies to next-2013 drivers/net/phy/realtek.c | 15

[PATCH] Documentation: Add MDIO bus node to PHY binding document

2013-11-11 Thread Jonas Jensen
Add MDIO bus node segment and update the example, allowing trivial bindings to break out boilerplate. Signed-off-by: Jonas Jensen --- Notes: Changes per reply from Grant [0] [0] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-November/208851.html Applies to

[PATCH v2] phy: Add MOXA MDIO driver

2013-11-05 Thread Jonas Jensen
The MOXA UC-711X hardware(s) has an ethernet controller that seem to be developed internally. The IC used is "RTL8201CP". This patch adds an MDIO driver which handles the MII bus. Signed-off-by: Jonas Jensen --- Notes: Thanks for the feedback. Besides what is below

Re: [PATCH] phy: Add MOXA RTL8201CP PHY support

2013-11-04 Thread Jonas Jensen
Thanks for the replies. On 1 November 2013 18:01, Florian Fainelli wrote: >> + dev_err(&bus->dev, "%s timed out\n", __func__); > > I would keep these as a debugging aid and not spawn error messages on > the console by default. Done. >> + snprintf(bus->id, MII_BUS_ID_SIZE, "%s-mii",

Re: [PATCH v7 0/5] clk: clock deregistration support

2013-11-04 Thread Jonas Jensen
On 1 November 2013 17:41, Sylwester Nawrocki wrote: > It is recommended to quote also human readable patch summary line, > so it's more immediately clear which patch you refer to. Sorry about that. This was tested on a clean (some added moxart drivers but no other patches) next-20131031, revertin

[PATCH] phy: Add MOXA RTL8201CP PHY support

2013-11-01 Thread Jonas Jensen
The MOXA UC-711X hardware(s) has an ethernet controller that seem to be developed internally. The IC used is "RTL8201CP". This patch adds an MDIO driver and also patches realtek to include RTL8201CP PHY driver. Signed-off-by: Jonas Jensen --- Notes: The hardware does not use a se

Re: [PATCH v7 0/5] clk: clock deregistration support

2013-11-01 Thread Jonas Jensen
Hi, Just letting you know, the following warning from __clk_get is now printed, and not printed after revert (git revert 0b35b92fb3600a2f9ca114a6142db95f760d55f5). Is the driver doing something it shouldn't be doing? moxart_of_pll_clk_init() source can be found here: http://www.spinics.net/lists

Re: [PATCH v5] gpio: Add MOXA ART GPIO driver

2013-10-14 Thread Jonas Jensen
Thank you for the replies. On 11 October 2013 17:44, Linus Walleij wrote: >> The register responsible for doing enable/disable is located >> at <0x98100100 0x4>, the clock register is very close at >> <0x9810 0x34>. > > If we don't know we have to guess. > > This layout makes me t

[PATCH v5] gpio: Add MOXA ART GPIO driver

2013-10-11 Thread Jonas Jensen
Add GPIO driver for MOXA ART SoCs. Signed-off-by: Jonas Jensen --- Notes: Thanks for the replies, I agree it is a bit strange GPIO control is divided in two separate registers. Unfortunately I can't offer an explanation because the documentation is not publicly avai

  1   2   3   >