Re: [PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml

2020-04-10 Thread NeilBrown
the last couple of months. I have confirm that PCI works and in particular I don't get the cold-boot hangs that are common without these patches. So that is an excellent result. Thanks, NeilBrown 7e4350e416ed staging: mt7621-pci: simplify 'mt7621_pcie_init_virtual_bridges' function

Re: [PATCH] staging: mt7621-pci: simplify 'mt7621_pcie_init_virtual_bridges' function

2020-04-10 Thread NeilBrown
This second for loop seems like a change in functionality to what we had before. Is that correct? I seems to make sense but as you didn't flag the change in the commit message I thought I would ask. Also I feel it would help to have a comment explaining what was go

[PATCH 2/2] staging: mt7621-dts: add support for second network interface

2019-06-30 Thread NeilBrown
interface to mt7621.dtsi and add a gbpc2.dts which makes use of this. This allows the second interface to be used. I don't fully understand how to configure this interface - the documentation is thin - so there could well be room for improvement here. Signed-off-by: NeilBrown --- drivers/staging

[PATCH 0/2] staging: update mt7621 dts for some recent driver changes

2019-06-30 Thread NeilBrown
to work with mt7621 hardware and the mt7621-eth driver was removed from staging. The second patch enhances the mt7621.dtsi to better support this driver and particularly to allow the second network port to be used in at least one of its possible configurations. Thanks, NeilBrown --- NeilBrown (2

[PATCH 1/2] staging: mt7621-dts: update sdhci config.

2019-06-30 Thread NeilBrown
The mtk-sd driver has been updated to support the IP in the mt7621, so update our configuration to work with it. Signed-off-by: NeilBrown --- drivers/staging/mt7621-dts/mt7621.dtsi | 41 +++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/drivers

Re: [PATCH 03/16] staging: m57621-mmc: delete driver from the tree.

2019-04-07 Thread NeilBrown
necessary for existing hardware. > > George FYI I have mmc working on my mt7621 board using the drivers/mmc/host/mtk_sd.c driver and the following patch. I haven't looked at the card-detect yet. I'll post bits of this to relevant lists as they are ready, not to this list any more. If

Re: [PATCH 03/16] staging: m57621-mmc: delete driver from the tree.

2019-04-02 Thread NeilBrown
On Tue, Apr 02 2019, Christian Lütke-Stetzkamp wrote: > On Wed, Apr 03, 2019 at 06:51:49AM +1100, NeilBrown wrote: >> People keep telling me that drivers/mmc/host/mtk-sd.c should be able to >> handle the same hardware as this driver, with a little bit of work. >> Unfortunat

Re: [PATCH 03/16] staging: m57621-mmc: delete driver from the tree.

2019-04-02 Thread NeilBrown
same hardware as this driver, with a little bit of work. Unfortunately they haven't told me what the little bit of work involves. Have you explored that possibility at all? I might try to have a look if I can make time. NeilBrown signature.asc Description: PGP signature

Re: [PATCH v2 0/3] staging: mt7621-pci-phy: simplify driver to don't use child nodes in DT

2019-03-29 Thread NeilBrown
Thanks. Works correctly now. Reviewed-by: NeilBrown NeilBrown > > Best regards, > Sergio Paracuellos > > Sergio Paracuellos (3): > staging: mt7621-dts: simplify pcie phy bindings > staging: mt7621-pci-phy: update bindings documentation > staging: mt7621-pci-phy: chan

Re: [PATCH 3/3] staging: mt7621-pci-phy: change driver to don't use child nodes

2019-03-28 Thread NeilBrown
; - pphy = devm_phy_create(dev, child_np, _pci_phy_ops); > + pphy = devm_phy_create(dev, dev->of_node, _pci_phy_ops); > if (IS_ERR(phy)) { > dev_err(dev, "failed to create phy\n"); > ret = PT

Re: [PATCH 1/3] staging: mt7621-dts: simplify pcie phy bindings

2019-03-28 Thread NeilBrown
e2"; > - phys = <_port>, <_port>, <_port>; > + phys = <_phy 0>, <_phy 1>, <_phy>; I would be more comfortable if this was phys = <_phy 0>, <_phy 1>, <_phy 0>; and pcie-phy@1 had #phy-cell

Re: [PATCH] spi: mediatek: Attempt to address style issues in spi-mt7621.c

2019-03-13 Thread NeilBrown
On Thu, Mar 14 2019, Chuanhong Guo wrote: > Hi! > On Thu, Mar 14, 2019 at 6:14 AM NeilBrown wrote: >> >> [...] >> My only small concern is that this driver was backported to openwrt >> (4.14 based) and then reverted >> >>

Re: [PATCH] spi: mediatek: Attempt to address style issues in spi-mt7621.c

2019-03-13 Thread NeilBrown
ca780d8df70a5163d43bbdc6f13ba3f "This breaks some mt7621 devices." Possibly it was backported badly, or possibly there is a problem. John: do you have any more details of the problem other than what is in the commit message? Thanks, NeilBrown signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 0/2] staging: remove mt7621-eth

2019-03-11 Thread NeilBrown
drivers/net/ethernet/mediatek/ now supports the mt7621 ethernet controller. So we can remove the drivers/staging driver, and update the devicetree file to work with this driver. NeilBrown --- NeilBrown (2): staging: remove mt7621-eth staging: mt7621-dts: update ethernet settings

[PATCH 1/2] staging: remove mt7621-eth

2019-03-11 Thread NeilBrown
driver/net/ethernet/mediatek/ now supports this hardware, so we don't need a separate driver. Signed-off-by: NeilBrown --- drivers/staging/Kconfig|2 drivers/staging/Makefile |1 .../devicetree/bindings/net/mediatek-net-gsw.txt

[PATCH 2/2] staging: mt7621-dts: update ethernet settings.

2019-03-11 Thread NeilBrown
respectively. Signed-off-by: NeilBrown --- drivers/staging/mt7621-dts/gbpc1.dts | 29 ++--- drivers/staging/mt7621-dts/mt7621.dtsi | 73 +++- 2 files changed, 83 insertions(+), 19 deletions(-) diff --git a/drivers/staging/mt7621-dts/gbpc1.dts b/drivers/staging

Re: [PATCH 0/5] staging: mt7621-pci: minor cleanups

2019-02-15 Thread NeilBrown
t7621-pci: remove two register writes > > drivers/staging/mt7621-dts/mt7621.dtsi | 4 +-- > drivers/staging/mt7621-pci/pci-mt7621.c | 39 - > 2 files changed, 21 insertions(+), 22 deletions(-) > I've now tested these after fixing the two issues with

Re: [PATCH v3 1/4] staging: mt7621-pci-phy: add new driver for phy part of mt7621-pci

2019-02-14 Thread NeilBrown
/drivers/staging/mt7621-pci-phy/Makefile > new file mode 100644 > index ..2b82ccfc28c6 > --- /dev/null > +++ b/drivers/staging/mt7621-pci-phy/Makefile > @@ -0,0 +1 @@ > +obj-$(CONFIG_SOC_MT7621) += pci-mt7621-phy.o > diff --git a/drivers/staging/mt7621-pci-phy/TO

Re: [PATCH v3 3/4] staging: mt7621-dts: add pci-phy related bindings to board's device tree

2019-02-14 Thread NeilBrown
bus-range = <0x00 0xff>; > }; > }; > + > + pcie0_phy: pcie-phy@1a149000 { Sorry for the late testing... This should be "1e149000", 'e', not 'a'. Same for pcie1_phy. Thanks, NeilBrown > + compati

Re: [PATCH 0/5] staging: mt7621-pci: minor cleanups

2019-02-12 Thread NeilBrown
4.pcie: Error applying setting, reverse things back [ 11.35] mt7621-pci 1e14.pcie: Parsing DT failed So something is messed up somewhere. I might be able to have a deeper look on the weekend. NeilBrown signature.asc Description: PGP signature _

Re: [PATCH] staging: mt7621-pci: update driver's TODO file

2019-02-10 Thread NeilBrown
0 There are two sets of 8 spaces in there, that should be a TAB, and there is a space before a TAB, that should be removed (yes, I do have x-ray vision). I really don't know how important all this is. Maybe it would be best to post the patch and see what people say. Thanks, NeilBrown

Re: [PATCH 1/9 v3] staging: spi: mt7621: Switch to SPDX identifier

2019-02-04 Thread NeilBrown
On Mon, Feb 04 2019, Mark Brown wrote: > On Mon, Feb 04, 2019 at 09:34:56AM +1100, NeilBrown wrote: > >> It is extremely common in the kernel for a file to start >>// SPDX-License-Identifier. > >> and to have that immediately

Re: [PATCH 9/9 v3] staging: spi: mt7621: Remove superfluous pre-declaration of struct mt7621_spi

2019-02-03 Thread NeilBrown
On Fri, Feb 01 2019, Stefan Roese wrote: > This patch removes the superfluous pre-declaration of struct mt7621_spi. > > Signed-off-by: Stefan Roese > Cc: Mark Brown > Cc: Greg Kroah-Hartman > Cc: NeilBrown > Cc: Sankalp Negi > Cc: Chuanhong Guo > Cc: John Crispin

Re: [PATCH 1/9 v3] staging: spi: mt7621: Switch to SPDX identifier

2019-02-03 Thread NeilBrown
e that immediately followed by a comment lile: /* * . * This patch makes this file match much of the rest of the kernel. Why do you want something different? Thanks, NeilBrown signature.asc Description: PGP signature ___ devel m

Re: [PATCH 2/2 v2] staging: spi: mt7621: Minor code cleanup

2019-02-01 Thread NeilBrown
de some white-space changes - deleted a point pre-declaration of struct mt7621_spi The white-space changes could be combined with comment-style fixes, the deletion could be combined with the SPI_BPW_MASK deletation. But in any case, they should be mentioned. Thanks - these are all valuable improvem

Re: [PATCH v2 1/2] Move ralink-gdma to its own directory

2019-01-10 Thread NeilBrown
equently realized that neither of these dma drivers are used in this hardware. Consequently I cannot test any changes you make. But maybe you can - which would be excellent! So this is just letting you and Greg know that despite my stated interest, I cannot actually review or test this. Thanks, NeilBr

Re: [PATCH v2 1/3] staging: mt7621-pci-phy: add new driver for phy part of mt7621-pci

2019-01-02 Thread NeilBrown
tristate "MediaTek MT7621 PCI PHY Driver" > + depends on RALINK && OF > + select GENERIC_PHY > + help > + Say 'Y' here to add support for MediaTek MT7621 PCI PHY driver, > + I wonder if this should default to 'y' if SOC_MT7621 && PCI

Re: [PATCH v2 3/3] staging: mt7621-dts: add pci-phy related bindings to board's device tree

2019-01-02 Thread NeilBrown
s_format): /pcie-phy@1a149000:ranges: empty "ranges" property but its #size-cells (0) differs from / (1) drivers/staging/mt7621-dts/gbpc1.dtb: Warning (ranges_format): /pcie-phy@1a14a000:ranges: empty "ranges" property but its #size-cells (0) differs from / (1) Whether I leave

Re: [PATCH 0/2] staging: mt7621-pinctrl: use pinconf-generic in some driver ops

2019-01-02 Thread NeilBrown
le to mis-configure some pins for driving LEDs, and checked that the LEDs broken. The fixed the dts, and the LEDs started working again. I think that will have to do. Tested-by: NeilBrown Thanks, NeilBrown > > Hope this helps. > > Best regards, > Sergio Paracuellos > >

Re: [PATCH 15/18] staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function

2018-12-30 Thread NeilBrown
all works. > > Looking other drivers and 'pinctrl_utils_reserve_map' code it seems > this should be first set to zero. Yes, I can see that now in pinconf_generic_dt_node_to_map() which is a lot of driver use ... I wonder if we can use the 'generic' one too. Anyway, Reported-and-te

Re: [PATCH 15/18] staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function

2018-12-29 Thread NeilBrown
> - tmp = *map; > - > - for_each_child_of_node(np_config, np) > - rt2880_pinctrl_dt_subnode_to_map(pctrldev, np, ); > - *num_maps = max_maps; Previously *num_maps was initialised here - clearly too late. Now it isn't initialised at all. Do you know wh

[PATCH 3/7] staging: mt7621-dts: allow gnubee to reboot cleanly.

2018-12-08 Thread NeilBrown
board doesn't claim to support a hardware watchdog - and the SPI certain isn't "broken". This causes an annoying warning on every boot, but that is better than failing on ever reboot. Signed-off-by: NeilBrown --- drivers/staging/mt7621-dts/gbpc1.dts |1 + 1 file changed, 1 insertion(+)

[PATCH 5/7] staging: mt7621-mmc: add missing header.

2018-12-08 Thread NeilBrown
is sometimes included by other include files, and sometimes not, depending on config, particularly CONFIG_HIGHMEM. So include it explicitly rather than relying on implicit inclusion. Signed-off-by: NeilBrown --- drivers/staging/mt7621-mmc/sd.c |1 + 1 file changed, 1 insertion(+) diff

[PATCH 1/7] staging: mt7621-eth: set correct dma mask.

2018-12-08 Thread NeilBrown
Since commit f8c55dc6e828 ("MIPS: use generic dma noncoherent ops for simple noncoherent platforms") changed MIPS dma handling, the eth driver fails because the dma mask is set on the wrong 'struct device'. Move the setting to the correct struct device. Signed-off-by: NeilBrown --

[PATCH 6/7] staging: mt7621-mmc: fix compile warnging: cmd_buf

2018-12-08 Thread NeilBrown
cmd_buf is only used when MT6575_SD_DEBUG is defined. So only declare it in that case. Signed-off-by: NeilBrown --- drivers/staging/mt7621-mmc/dbg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-mmc/dbg.c b/drivers/staging/mt7621-mmc/dbg.c index

[PATCH 2/7] staging: mt7621-mmc: set correct dma mask.

2018-12-08 Thread NeilBrown
Since commit f8c55dc6e828 ("MIPS: use generic dma noncoherent ops for simple noncoherent platforms") changed MIPS dma handling, the mmc driver fails because it doesn't have a dma mask is set. So set the correct dma mask. Signed-off-by: NeilBrown --- drivers/staging/mt7621-mmc/sd.c |

[PATCH 4/7] staging: mt7621-eth: fix compile warning.

2018-12-08 Thread NeilBrown
This code generates a waring as PHY_GBIT_FEATURES is "long" but ->supported in "int". It looks likely that "PHY_1000BT_FEATURES" is the correct define to use - it is intended to be used with the ->features field. Signed-off-by: NeilBrown --- drivers/staging

[PATCH 7/7] staging: mt7621-dts: avoid warnings in pinctrl definitions

2018-12-08 Thread NeilBrown
t the end) to avoid the warning. Signed-off-by: NeilBrown --- drivers/staging/mt7621-dts/mt7621.dtsi | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/mt7621-dts/mt7621.dtsi b/drivers/staging/mt7621-dts/mt7621.dtsi index ebf6667bbc54..7

[PATCH 0/7] various fixes for mt7621-* in staging.

2018-12-08 Thread NeilBrown
These fixes, together with some that others have posted recently, allow my to once again compile mainline linux for my gnubee-pc1, and have it work. Thanks, NeilBrown --- NeilBrown (7): staging: mt7621-eth: set correct dma mask. staging: mt7621-mmc: set correct dma mask

Re: [PATCH v3 0/2] staging: mt7621-spi: drop broken SPI modes

2018-12-08 Thread NeilBrown
Send the two commit as a patchset > fix code style complained by checkpatch.pl > > Chuanhong Guo (2): > staging: mt7621-spi: drop the broken full-duplex mode > staging: mt7621-spi: drop support for SPI mode 1/2/3 Looks great! Reviewed-by: NeilBrown Thanks, NeilBrown > &

Re: [PATCH v2] staging: mt7621-mmc: Fix incompletely removed #if 0 block in sd.c

2018-12-06 Thread NeilBrown
; That causes an error - MSDC_CLKSRC_REG is not defined. > > This patch completely removes the #if 0 block > > Reported-by: NeilBrown > Fixes: 2a54e3259e2a ("staging: mt7621-mmc: Remove #if 0 blocks in sd.c") > Signed-off-by: Nishad Kamdar > --- Perfect, thanks.

Re: [PATCH] staging: mt7621-mmc: Remove missed lines of the #if 0 block in sd.c

2018-12-05 Thread NeilBrown
introduced a problem, it is best-practice to also do $ git fx 2a54e3259e2a Fixes: 2a54e3259e2a ("staging: mt7621-mmc: Remove #if 0 blocks in sd.c") and add the "Fixes" near the Signed-off-by line. Thanks, NeilBrown > This causes the function msdc_select_clksrc()

Re: [PATCH] staging: mt7621-spi: drop the broken full-duplex mode

2018-12-04 Thread NeilBrown
On Tue, Dec 04 2018, Chuanhong Guo wrote: > Hi! > NeilBrown 于2018年12月4日周二 上午5:55写道: >> >> On Mon, Dec 03 2018, Chuanhong Guo wrote: >> >> > Under MORE_BUF_MODE the controller will always shift one bit out of >> > spi_opcode if (mosi_bit_cnt > 0) &

Re: [PATCH] staging: mt7621-spi: drop the broken full-duplex mode

2018-12-03 Thread NeilBrown
..? It would be nice to have the source of this information documented. Thanks, NeilBrown > > Signed-off-by: Chuanhong Guo > --- > drivers/staging/mt7621-spi/spi-mt7621.c | 120 +++- > 1 file changed, 15 insertions(+), 105 deletions(-) > > diff --git a/dr

Re: [PATCH v2 4/7] staging: mt7621-pci: fix reset lines for each pcie port

2018-11-26 Thread NeilBrown
; > Depending of chip revision reset lines are inverted. It is also >> > > necessary to read PCIE_FTS_NUM register before enabling the phy. >> > > Hence update the code to achieve this. >> > > >> > > Fixes: 745eeeac68d7: "staging: mt762

Re: [PATCH v2 0/7] staging: mt7621-pci: some fixes after test previous series

2018-11-24 Thread NeilBrown
ing: mt7621-dts: remove sysctl registers from pcie bindings > staging: mt7621-pci: dt-bindings: update bindings doc removing sysctls > registers > staging: mt7621-pci: fix reset lines for each pcie port > staging: mt7621-pci: avoid using clk_* operations all above: Tested-by

Re: [PATCH v6 00/33] staging: mt7621-pci: Parse ports info from DT and other minor cleanups

2018-11-23 Thread NeilBrown
On Mon, Nov 12 2018, Sergio Paracuellos wrote: > On Mon, Nov 12, 2018 at 08:40:10AM +1100, NeilBrown wrote: >> On Sun, Nov 11 2018, Greg KH wrote: >> >> > On Sun, Nov 04, 2018 at 11:49:26AM +0100, Sergio Paracuellos wrote: >> >> This patch series parse

Re: [PATCH v6 14/33] staging: mt7621-dts: add sysctl registers base address to pcie

2018-11-23 Thread NeilBrown
way to access the sysc registers is to use rt_sysc_[rwm]32(). Below is my current fix-up patch to deal with this. Thanks, NeilBrown diff --git a/drivers/staging/mt7621-dts/mt7621.dtsi b/drivers/staging/mt7621-dts/mt7621.dtsi index 6b4bc43d8eb6..e1000690bef2 100644 --- a/drivers/staging/

Re: [PATCH v6 04/33] staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2018-11-23 Thread NeilBrown
re comfortable having a msleep(100) while the port is in reset. Below is my current fix-up patch which make the board work again after this patch. Swapping 'assert' and 'deassert' is obviously just a hack - some more proper solution is required. Thanks, NeilBrown diff --git a/drivers/staging/mt762

Re: [PATCH v6 01/33] staging: mt7621-pci: parse and init port data from device tree

2018-11-18 Thread NeilBrown
"; #clock-cells = <1>; }; but there is no driver that declares compatibility with ralink,rt2880-clock. So devm_clk_get() cannot find any clocks, and returns an error. I worked around this by just ignoring the error, but then something else went wrong in

Re: [PATCH v6 1/3] staging: mt7621-mmc: Remove #if 0 blocks in sd.c

2018-11-17 Thread NeilBrown
nd the "#endif /* end of --- */" at the end? Thanks, NeilBrown signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v6 00/33] staging: mt7621-pci: Parse ports info from DT and other minor cleanups

2018-11-11 Thread NeilBrown
o get it tested sometime in the next couple of weeks, and will provide feedback once I have it. Thanks, NeilBrown > > thanks, > > greg k-h signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://d

Re: [PATCH v2] staging: mt7621-mmc: Fix single statement macros in sd.c

2018-09-25 Thread NeilBrown
nWRT-like distros). In libreCMC the patch has John listed as the Author, and I thought it right to preserve that. I believe the code comes from a code-dump made by Mediatek several years ago. It can be found at git://github.com/mqmaker/linux.git. The code there contains (in drivers/mmc/host/mtk-mmc/sd.c

Re: [PATCH v2 00/20] staging: mt7621-pci: Parse ports info from DT and other minor cleanups

2018-08-19 Thread NeilBrown
e failed with error -22 and no working PCI. Thanks, NeilBrown > > Best regards, > Sergio Paracuellos > > Sergio Paracuellos (20): > staging: mt7621-pci: parse and init port data from device tree > staging: mt7621-pci: replace return value if > devm_pci_al

Re: [PATCH v10 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-08-05 Thread NeilBrown
and system gets into a not working state. > - Other patches rebased and adapted to this changes. And.. we have a winner !!! Tested-by: NeilBrown I haven't actually looked at the code - just compiled, booted, saw that the SATA drive appears to work. Thanks, NeilBrown Starting kern

Re: [PATCH v9 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-08-02 Thread NeilBrown
pace' > which get into a WARN_ONCE statement because 'PCI_IOBASE' is not > defined for mips. > - Other patches rebased and adapted to this changes. You probably expected this, but still no change. Just for completeness boot log is below. Thanks, NeilBrown Starting kerne

Re: [PATCH v8 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-08-01 Thread NeilBrown
his changes. See boot log below. Doesn't hang, but doesn't work. I'll try to schedule some time to see if I can work out what is happening. Thanks, NeilBrown Starting kernel ... [0.00] Linux version 4.18.0-rc7+ (neilb@noble) (gcc version 7.2.0 (GCC)) #273 SMP Thu Aug 2 08:02:45 A

Re: [PATCH v7 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-31 Thread NeilBrown
really. Though if I hack pci_address_to_pio() to succeed, I get: [1.99] mt7621-pci 1e14.pcie: resource collision: [io 0x1e16-0x1e16] conflicts with PCI IO [io 0x-0x] which looks a little weird ... why do those conflict? Maybe because everything has to fit into

Re: [PATCH v6 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-30 Thread NeilBrown
On Tue, Jul 31 2018, Sergio Paracuellos wrote: > On Tue, Jul 31, 2018 at 08:55:52AM +1000, NeilBrown wrote: >> On Mon, Jul 30 2018, Sergio Paracuellos wrote: >> >> > This patch series include an attempt to avoid the use of custom >> > read and writes in driver

Re: [PATCH v6 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-30 Thread NeilBrown
es. No noticeable difference. Still hangs after [8.63] ahci :01:00.0: enabling device ( -> 0002) the readl() at the start of ahci_enable_ahci() hangs, reading c4017004. I built on a merge of Merge: 527838d470e3 b9f13084580c linus' master + staging/staging-testing dmesg below. Tha

Re: [PATCH] staging: mt7621-mmc: Use BIT macro instead of explicit shifting in board.h

2018-07-30 Thread NeilBrown
On Fri, Jul 27 2018, Nishad Kamdar wrote: > Replace explicit shifting with BIT macro in board.h. > Issue found by checkpatch. > > Signed-off-by: Nishad Kamdar Reviewed-by: NeilBrown Thanks, NeilBrown > --- > drivers/staging/mt7621-mmc/board.h | 8 > 1 file

Re: [PATCH v5 01/16] staging: mt7621-pci: use generic kernel pci subsystem read and write

2018-07-30 Thread NeilBrown
On Mon, Jul 30 2018, Sergio Paracuellos wrote: > On Mon, Jul 30, 2018 at 03:20:47PM +1000, NeilBrown wrote: >> On Fri, Jul 27 2018, Sergio Paracuellos wrote: >> >> > map_bus callback is called before every .read/.write operation. >> > Implement it and ch

Re: [PATCH v5 01/16] staging: mt7621-pci: use generic kernel pci subsystem read and write

2018-07-29 Thread NeilBrown
ter+0xd0/0x118 [2.67] [<80001618>] do_one_initcall+0x84/0x19c [2.68] [<80741ed0>] kernel_init_freeable+0x248/0x250 [2.69] [<805f549c>] kernel_init+0x14/0x110 So presumably the resources aren't getting initialised properly? Thanks, NeilBrown > --- > driver

Re: [PATCH v4 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-26 Thread NeilBrown
enabling device ( -> 0002) and hangs. Full dmesg pasted below. Thanks, NeilBrown [0.00] Linux version 4.18.0-rc5+ (neilb@noble) (gcc version 7.2.0 (GCC)) #231 SMP Thu Jul 26 19:57:52 AEST 2018 [0.00] SoC Type: MediaTek MT7621 ver:1 eco:3 [0.00] bootconsole [early0

Re: [PATCH v4 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-26 Thread NeilBrown
On Thu, Jul 26 2018, Sergio Paracuellos wrote: > On Thu, Jul 26, 2018 at 6:50 AM, NeilBrown wrote: >> On Wed, Jul 25 2018, Sergio Paracuellos wrote: >> >>> On Wed, Jul 25, 2018 at 08:21:35AM +1000, NeilBrown wrote: >>>> On Mon, Jul 16 2018, Sergio Paracuellos

Re: [PATCH v4 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-25 Thread NeilBrown
On Wed, Jul 25 2018, Sergio Paracuellos wrote: > On Wed, Jul 25, 2018 at 08:21:35AM +1000, NeilBrown wrote: >> On Mon, Jul 16 2018, Sergio Paracuellos wrote: >> >> > This patch series include an attempt to avoid the use of custom >> > read and writes in driver

Re: [PATCH v4 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-24 Thread NeilBrown
:01:00.0 failed with error -22 [8.70] ahci: probe of :02:00.0 failed with error -22 [8.710000] ahci: probe of :03:00.0 failed with error -22 I haven't dug deeper yet. Thanks, NeilBrown [0.00] Linux version 4.18.0-rc5+ (neilb@noble) (gcc version 7.2.0 (GCC))

Re: [PATCH 2/3] staging: mt7621-pci: use generic kernel pci subsystem read and write

2018-07-13 Thread NeilBrown
r = mt7621_pcie_parse_dt(port); > + if (err) { > + dev_err(dev, "Parsing DT failed\n"); > + return err; > + } > + > + bridge->dev.parent = dev; > + bridge->sysdata = port; > + bridge->ops = _pci_op

Re: [PATCH 2/3] staging: mt7621-pci: use generic kernel pci subsystem read and write

2018-07-11 Thread NeilBrown
> > + if (!type || strcmp(type, "pci")) { >> >> Instead of testing for pci, can you test for pcie? > > Does this platform support pcie? Yes, the platform has 3 pcie ports. I hope to test these patches by Saturday morning (GMT+10). I'll report any problems,

Re: [PATCH v2 00/18] Some cleanups

2018-07-08 Thread NeilBrown
w series. > > Hope this helps. Thanks, I haven't looked though the patches yet, only tested them. With the two fixed to pinctrl that I posted together with the change to "avoid pointer arithmetics in some macros" in this series, they appear to work. So Tested-by: NeilBrown I may a

Re: [PATCH 13/13] staging: mt7621-pinctrl: replace core_initcall_sync with builtin_platform_driver

2018-07-08 Thread NeilBrown
(rt2880_pinmux_init); > +builtin_platform_driver(rt2880_pinmux_driver); > -- > 2.7.4 This patch causes the network interface on my device to stop working. device_initcall() is called much later than core_initcall_sync() and that seem to be a problem. I think this needs to be reverted - a

Re: [PATCH v2 03/18] staging: mt7621-pci: avoid pointer arithmetics in some macros

2018-07-08 Thread NeilBrown
k |= (0x0 << 20); // port1 + break; - if (pcie_link_status != 2) + case 4: + mask &= ~0x0fff; + mask |= (0x1 << 16); // port0 + mask |= (0x2 << 20); // port1 + break; + +

Re: [PATCH 13/18] staging: mt7621-pinctrl: make use of pinctrl_utils_reserve_map

2018-07-08 Thread NeilBrown
inctrl_utils_reserve_map(pctrldev, map, _maps, > + num_maps, max_maps); Unfortunately this is buggy. pinctrl_utils_reserve_map() calls krealloc() on *map. So we need to initialise *map = NULL; before calling it. Thanks, NeilBrown si

Re: [PATCH] staging: mt7621-pci: refactor pci related read and writes functions

2018-07-08 Thread NeilBrown
lementations of pci_config_read() and pci_config_write. 6/ discard any newly dead code (e.g write_config_* ??) Now if there is anything left in the patch is should be clear if it could benefit from being broken up. Thanks for working on this. NeilBrown signature.asc Description: P

Re: [PATCH 0/4] staging: mt7621-gpio: fix problem using one node in DT

2018-07-05 Thread NeilBrown
all: Reviewed-by: NeilBrown Thanks a lot! NeilBrown > > Best regards, > Sergio Paracuellos > > Sergio Paracuellos (4): > staging: mt7621-gpio: set irq chip name only once > staging: mt7621-gpio: use custom xlate function > staging: mt7621-gpio: assign gpio chip cust

Re: [PATCH v5 18/18] staging: mt7621-gpio: avoid use banks in device tree

2018-07-04 Thread NeilBrown
On Sat, Jun 30 2018, Sergio Paracuellos wrote: > On Sat, Jun 30, 2018 at 7:47 AM, NeilBrown wrote: >> On Mon, Jun 18 2018, Sergio Paracuellos wrote: >> >>> Banks shouldn't be defined in DT if number of resources >>> per bank is not variable. We actually know tha

Re: [PATCH v5 18/18] staging: mt7621-gpio: avoid use banks in device tree

2018-06-29 Thread NeilBrown
reaks it. I haven't had a chance to look into why yet. Sorry. NeilBrown > --- > drivers/staging/mt7621-dts/gbpc1.dts | 10 ++-- > drivers/staging/mt7621-dts/mt7621.dtsi | 31 ++-- > drivers/staging/mt7621-gpio/gpio-mt7621.c | 21

Re: [lustre-devel] [PATCH v3] staging: lustre: Change return type to vm_fault_t

2018-06-14 Thread NeilBrown
On Thu, Jun 14 2018, Souptick Joarder wrote: > On Thu, Jun 14, 2018 at 12:59 PM, NeilBrown wrote: >> On Tue, Jun 12 2018, Souptick Joarder wrote: >> >>> On 12-Jun-2018 2:21 AM, "Greg KH" wrote: >>>> >>>> On Tue, Jun 12, 2018 at 02:00

Re: [lustre-devel] [PATCH v3] staging: lustre: Change return type to vm_fault_t

2018-06-14 Thread NeilBrown
have you tried applying it to Linus's current tree? :) > > Last tested on 4.17-rc-6 and it worked fine. Let me verify in current tree. > As you have undoubtedly noticed, lustre is no longer in Linus' tree. I'm experimenting with maintaining a branch which retains the code (lustre/* in githu

RE: [PATCH] staging: lustre: add error handling for try_module_get

2018-06-13 Thread NeilBrown
completing. Some code outside the module must release the lock. Having said that, I don't really like this approach. I much prefer for the module reference to be taken and put outside of the module - it seems less error-prone. NeilBrown signature.asc Description: PGP signature __

Re: [PATCH] staging: lustre: add error handling for try_module_get

2018-06-11 Thread NeilBrown
sizeof(*info)); Thanks for the patch I agree that this is probably a bug, but the code is still buggy after you patch, just in a different way. Try following through the code and see what happens when you 'goto failed'. NeilBrown signature.asc Description: PGP signature _

Re: [PATCH v3 0/8] staging: mt7621-gpio: last cleanups

2018-06-11 Thread NeilBrown
018-June/121742.html > > this series tries to fix all of the issues in order to send > v2 and give it a new try. Because I don't have to hardware to > test my changes I send new cleanups first in staging to make > easier to NeilBrown test it and get a feedback about them. >

Re: [PATCH v2 0/7] staging: mt7621-gpio: last cleanups

2018-06-11 Thread NeilBrown
On Mon, Jun 11 2018, Sergio Paracuellos wrote: > On Mon, Jun 11, 2018 at 06:33:44PM +1000, NeilBrown wrote: >> On Mon, Jun 11 2018, Sergio Paracuellos wrote: >> >> > After submiting this driver to try to get mainlined and get >> > out of staging some n

Re: [PATCH v2 0/7] staging: mt7621-gpio: last cleanups

2018-06-11 Thread NeilBrown
018-June/121742.html > > this series tries to fix all of the issues in order to send > v2 and give it a new try. Because I don't have to hardware to > test my changes I send new cleanups first in staging to make > easier to NeilBrown test it and get a feedback about them. > >

Re: [PATCH v2] staging: mt7621-gpio: avoid custom irq_domain for gpio

2018-06-11 Thread NeilBrown
line has not been marked IRQF_SHARED. I cannot figure out how to mark it as IRQF_SHARED. If I hack the code so that mediatek_gpio_bank_probe() is only called for the first bank, then interrupt from that bank work fine. If I let it be called for all three banks, then on the first interrupt, the

Re: [PATCH v2 7/7] staging: mt7621-gpio: implement high level and low level irqs

2018-06-11 Thread NeilBrown
;= ~mask; > + } > + } I wonder if we should be clearing the mask bit for hlevel and llevel when setting either edge - and clearing the edge bits when setting a level. Actually, you might have been right about using a switch statement. Several d

Re: [PATCH 8/8] staging: mt7621-gpio: implement high level and low level irqs

2018-06-10 Thread NeilBrown
IGH: > + rg->hlevel |= mask; > + rg->rising &= ~mask; > + rg->falling &= mask; > + rg->llevel &= ~mask; > + break; > + case IRQ_TYPE_LEVEL_LOW: > + rg->llevel |= mask; > +

Re: [PATCH 7/8] staging: mt7621-gpio: avoid custom irq_domain for gpio

2018-06-10 Thread NeilBrown
TH) { > - u32 map = irq_find_mapping(gpio_data->gpio_irq_domain, > + u32 map = irq_find_mapping(rg->chip.irq.domain, > (MTK_BANK_WIDTH * i) + bit); I think you need more changes to mediatek_gpio_irq

Re: [PATCH 4/8] staging: mt7621-gpio: implement '.irq_[request|release]_resources' functions

2018-06-10 Thread NeilBrown
er_of to get the 'rg', and you don't need 'bank' at all. The same applies in several places. It might not be this patch that introduces the problem, but this was the easiest place to point to it. Thanks, NeilBrown > + int bank = irqd_to_hwirq(d) / MTK_BANK_WIDTH; > + struct mtk_gc *rg = _data-

Re: [PATCH 1/8] staging: mt7621-gpio: make use 'bgpio_init' from GPIO_GENERIC

2018-06-10 Thread NeilBrown
CTRL(rg->bank), > + gpio_data->gpio_membase + GPIO_REG_CTRL(rg->bank), > + 0); This is the first problem I git. You've provided both 'dirout' and 'dirin' and that is not permitted. You've given exactly the same value for both, which isn't

[PATCH 5/5] staging: mt7621-dts: convert to gpio-keys

2018-06-06 Thread NeilBrown
Now that gpio-interrupts work correctly, we can use gpio-keys instead of gpio-keys-polled for the single push-button on the gbpc-1. Signed-off-by: NeilBrown --- drivers/staging/mt7621-dts/gbpc1.dts |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging

[PATCH 4/5] staging: mt7621-dts: correct various clock frequencies.

2018-06-06 Thread NeilBrown
200MHz with a CPU clock of 900MHz. So assume 1/4 is the default. Also, the nor-flash in the gbpc1 is documented as accepting 50MHz for request requests, and higher for other requests. So set maximum to 50MHz. Signed-off-by: NeilBrown --- drivers/staging/mt7621-dts/gbpc1.dts |5

[PATCH 2/5] staging: mt7621-spi: change mt7621_spi_wait_till_ready to take struct mt7621_spi

2018-06-06 Thread NeilBrown
All callers have a 'struct mt7621_spi' and that is all mt7621_spi_wait_till_ready() needs. So just pass it instead of the spi_device. Signed-off-by: NeilBrown --- drivers/staging/mt7621-spi/spi-mt7621.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 3/5] staging: mt7621-spi: revised half-duplex message handling

2018-06-06 Thread NeilBrown
with a following read transfer, as this is a common pattern. With this in place, we can remove the current max_transfer_size limit. In testing, this increases the read throughput for a NOR flash chip from 1.4MB/s to 2.3MB/s, a 50% improvement. Signed-off-by: NeilBrown --- drivers/staging/mt7621

[PATCH 1/5] staging: mt7621-pci: use rt_sysc_?32() to access system-control register.

2018-06-06 Thread NeilBrown
of pointers, and use these functions. Signed-off-by: NeilBrown --- drivers/staging/mt7621-pci/pci-mt7621.c | 57 +++ 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index

[PATCH 0/5] staging: mt7621 improvements, particularly SPI

2018-06-06 Thread NeilBrown
messages. Thanks, NeilBrown --- NeilBrown (5): staging: mt7621-pci: use rt_sysc_?32() to access system-control register. staging: mt7621-spi: change mt7621_spi_wait_till_ready to take struct mt7621_spi staging: mt7621-spi: revised half-duplex message handling staging

Re: [PATCH 2/2] staging: mt7621-dts: Match pcie format to mt7623.dtsi

2018-06-04 Thread NeilBrown
ned by: drivers/pci/dwc/pcie-designware.c: ret = of_property_read_u32(np, "num-lanes", ); drivers/pci/host/pcie-mediatek.c: err = of_property_read_u32(node, "num-lanes", >lane); drivers/pci/host/pcie-rockchip.c: err = of_p

Re: [PATCH 1/2] staging: mt7621-dts: Fix several dts warnings

2018-06-04 Thread NeilBrown
has a unit name, but no reg property > > I tried to match what is in mt7623.dtsi. > > Signed-off-by: Rosen Penev Reviewed-by: NeilBrown Thanks, NeilBrown > --- > drivers/staging/mt7621-dts/mt7621.dtsi | 13 ++--- > 1 file changed, 10 insertions(+), 3 deletions

Re: [lustre-devel] [PATCH] staging: lustre: delete the filesystem from the tree.

2018-06-03 Thread NeilBrown
On Sun, Jun 03 2018, Dilger, Andreas wrote: > On Jun 1, 2018, at 17:19, NeilBrown wrote: >> >> On Fri, Jun 01 2018, Doug Oucharek wrote: >> >>> Would it makes sense to land LNet and LNDs on their own first? Get >>> the networking house in order first

Re: [PATCH v3 0/5] staging: mt7621-spi: Fix C Coding style issues.

2018-06-03 Thread NeilBrown
of spaces. > staging: mt7621-spi: Add a space before open paranthesis. > staging: mt7621-spi: Remove unnecessary braces {} from single > statement if block. > Thanks, All Reviewed-by: NeilBrown NeilBrown signature.asc Description: PGP signature

  1   2   3   >