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

2018-09-25 Thread NeilBrown
T-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

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

2018-11-11 Thread NeilBrown
ble to 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 htt

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 01/33] staging: mt7621-pci: parse and init port data from device tree

2018-11-18 Thread NeilBrown
en something else went wrong in a subsequent patch - haven't worked out what yet. Probably the *right* way to fix this is to add a driver for ralink,rt2880-clock but I don't know what such a driver would do. In any case, I don't plan to pursue this particular issue further until I under

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

2018-11-23 Thread NeilBrown
m time. So I'd feel more 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. Than

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 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 v2 0/7] staging: mt7621-pci: some fixes after test previous series

2018-11-24 Thread NeilBrown
egisters > staging: 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

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

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

[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

[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
numbers at 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 ebf66

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

[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

[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 3/7] staging: mt7621-dts: allow gnubee to reboot cleanly.

2018-12-08 Thread NeilBrown
he 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,

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

2018-12-29 Thread NeilBrown
uot;can't reserve map: %d\n", ret); > return ret; > } > > - tmp = *map; > - > - for_each_child_of_node(np_config, np) > - rt2880_pinctrl_dt_subnode_to_map(pctrldev, np, &tmp); > - *num_maps = max_maps; Previous

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, R

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

2019-01-02 Thread NeilBrown
ange the dts file 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 Parac

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

2019-01-02 Thread NeilBrown
t;0>; This causes warning drivers/staging/mt7621-dts/gbpc1.dtb: Warning (ranges_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 "ran

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

2019-01-02 Thread NeilBrown
PHY > + 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'

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

2019-01-10 Thread NeilBrown
ntly 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, N

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

2019-02-01 Thread NeilBrown
per-patch. You also: - made 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 - t

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

2019-02-03 Thread NeilBrown
o have 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 ___ de

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-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] staging: mt7621-pci: update driver's TODO file

2019-02-10 Thread NeilBrown
21 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

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

2019-02-12 Thread NeilBrown
mt7621-pci 1e14.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 sign

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

2019-02-14 Thread NeilBrown
reg = <0x 0 0 0 0>; > @@ -449,4 +451,33 @@ > bus-range = <0x00 0xff>; > }; > }; > + > + pcie0_phy: pcie-phy@1a149000 { Sorry for the late testing... This should be "1e149000", 'e', not

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

2019-02-14 Thread NeilBrown
y/Makefile > b/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/stagi

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 t

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

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

2019-03-11 Thread NeilBrown
d to switch ports 0 and 4 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/gbp

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

2019-03-13 Thread NeilBrown
780d8df70a5163d43bbdc6f13ba3f "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

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 1/3] staging: mt7621-dts: simplify pcie phy bindings

2019-03-28 Thread NeilBrown
0", "pcie1", "pcie2"; > - phys = <&pcie0_port>, <&pcie1_port>, <&pcie2_port>; > + phys = <&pcie0_phy 0>, <&pcie0_phy 1>, <&pcie1_phy>; I would be more comfortable if this was

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

2019-03-28 Thread NeilBrown
phy->phys[port] = instance; > > - pphy = devm_phy_create(dev, child_np, &mt7621_pci_phy_ops); > + pphy = devm_phy_create(dev, dev->of_node, &mt7621_pci_phy_ops); > if (IS_ERR(phy)) { > dev_err(

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

2019-03-28 Thread NeilBrown
this helps. 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: mt762

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

2019-04-02 Thread NeilBrown
should be able to handle the 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 Desc

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-07 Thread NeilBrown
troller, as would be 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,

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

2019-06-30 Thread NeilBrown
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

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

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

2018-06-29 Thread NeilBrown
s one applied, but this breaks 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-m

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 kno

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

2018-07-04 Thread NeilBrown
: 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] staging: mt7621-pci: refactor pci related read and writes functions

2018-07-08 Thread NeilBrown
mplementations 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 Descripti

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

2018-07-08 Thread NeilBrown
M; > + ret = pinctrl_utils_reserve_map(pctrldev, map, &reserved_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.

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

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

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

2018-07-08 Thread NeilBrown
gt; - > -core_initcall_sync(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 nee

Re: [PATCH v2 00/18] Some cleanups

2018-07-08 Thread NeilBrown
ies. > > 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

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 probl

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

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

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

2018-07-24 Thread NeilBrown
be of :01:00.0 failed with error -22 [8.70] ahci: probe of :02:00.0 failed with error -22 [8.71] 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

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-25 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-26 Thread NeilBrown
0] ahci 0000:01:00.0: 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

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

2018-07-29 Thread NeilBrown
d8>] driver_register+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, NeilBrow

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 change cus

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 v6 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-30 Thread NeilBrown
pted with this changes. 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-t

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 v7 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-31 Thread NeilBrown
g just a random guess 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 e

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

2018-08-01 Thread NeilBrown
ips needs this to work properly. > - Other patches rebased and adapted to this 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.

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

2018-08-02 Thread NeilBrown
ed 'iobase' address instead of 'devm_pci_remap_iospace' > 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 cha

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

2018-08-05 Thread NeilBrown
t added to > the resources > list 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 dr

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_alloc_

Re: [PATCH v2] staging: mt7621-eth: Fix sparse warning in ethtool.c

2018-04-02 Thread NeilBrown
On Mon, Apr 02 2018, Christian Lütke-Stetzkamp wrote: > On Mon, Apr 02, 2018 at 01:41:33PM +1000, NeilBrown wrote: >> On Mon, Apr 02 2018, Sean Wang wrote: >> > Hi, Neil >> > >> > Forgive me I cannot find the cover letter in the original series in my >> &

Re: [PATCH 33/34] staging: mt7621-mmc: Fix requesting of irq

2018-04-03 Thread NeilBrown
F_ONESHOT for flags > + ret = devm_request_irq(&pdev->dev, host->irq, msdc_irq, 0, pdev->name, > + host); I think the modern approach is to leave the flags as zero, and set flags via devicetree. sdhci has interrupt-p

Re: [PATCH 13/34] staging: mt7621-mmc: Remove unnecessary typedefs

2018-04-03 Thread NeilBrown
extlen; \ > + ((struct gpt *)gpd)->cmd= cmd; \ > + ((struct gpt *)gpd)->arg= arg; \ > + ((struct gpt *)gpd)->blknum = blknum; \ You mean "struct gpd", not "struct gpt

Re: [PATCH 27/34] staging: mt7621-mmc: Fix bug on dma_alloc_coherent fail

2018-04-03 Thread NeilBrown
erent(NULL, MAX_GPD_NUM * sizeof(struct > gpt), &host->dma.gpd_addr, GFP_KERNEL); > host->dma.bd = dma_alloc_coherent(NULL, MAX_BD_NUM * sizeof(struct > bd), &host->dma.bd_addr, GFP_KERNEL); > - BUG_ON((!host->dma.gpd) || (!host->dma.bd)); > + if (!ho

Re: [PATCH 26/34] staging: mt7621-mmc: Fix unmatched release_mem_regin

2018-04-03 Thread NeilBrown
get_irq(pdev, 0); > > //BUG_ON((!hw) || (!mem) || (irq < 0)); /* --- by chhung */ > > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0) You need a ';' at the end of that line. Thanks, NeilBrown signature.asc Description: PGP signature

Re: [PATCH 13/34] staging: mt7621-mmc: Remove unnecessary typedefs

2018-04-03 Thread NeilBrown
bd array */ > u32 used_gpd;/* the number of used gpd elements */ > diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c > index b5bd31e220d6..ec28925093cd 100644 > --- a/drivers/staging/mt7621-mmc/sd.c > +++ b/drivers/staging/mt7621-mmc/

Re: [PATCH 00/34] staging: mt7621-mmc: First cleanups

2018-04-03 Thread NeilBrown
changed, 3140 insertions(+), 3208 deletions(-) Thanks for these. When I addressed the various problems that I've mentioned separately the code compiles and boots and can access the sd card! It might be worth your while setting up a MIPS cross-compiler

Re: [PATCH v2 00/34] staging: mt7621-mmc: First cleanups

2018-04-04 Thread NeilBrown
ify comment regarding request irq Thanks, It compiles and works for me, and the patches look good. Reviewed-by: NeilBrown There are two new warnings as msdc_eirq_cd and msdc_eirq_sdio are now unused. I think they should be discarded - they don't contain any insights into how the hardwar

Re: [PATCH v2 00/34] staging: mt7621-mmc: First cleanups

2018-04-04 Thread NeilBrown
On Thu, Apr 05 2018, Christian Lütke-Stetzkamp wrote: > On Thu, Apr 05, 2018 at 08:06:47AM +1000, NeilBrown wrote: >> On Wed, Apr 04 2018, Christian Lütke-Stetzkamp wrote: >> >> > This patch series does the first cleanups in this driver. At some >> > points I

Re: [PATCH] staging: mt7621-gpio: prefer unsigned int to bare unsigned

2018-04-04 Thread NeilBrown
On Mon, Apr 02 2018, Sergio Paracuellos wrote: > This commit replaces some bare unsigned definitions in some > function parameters in favour of 'unsigned int' which is > preferred. > > This also fix checkpatch warnings about this. > > Signed-off-by: Sergio Parac

Re: [PATCH 07/10] staging: mt7621-mmc: Remove error message in debug

2018-04-06 Thread NeilBrown
>> "struct proc_dir_entry *de = " assignment as well? > > Thank, I overlooked it, will remove the assignment and resend a v2 > tomorrow. While you are at it, maybe change msdc_debug_proc_init() to return 'void' as the return value is never used. Patches look go

Re: [cfs_trace_lock_tcd] BUG: KASAN: null-ptr-deref in cfs_trace_lock_tcd+0x25/0xeb

2018-04-18 Thread NeilBrown
091931.gt6ijdw7ahkbtvrq@inn> Thanks, NeilBrown > > Anyway, I started looking at why the stack trace is such an incredible > mess, with lots of stale entries. > > The reason (well, _one_ reason) seems to be "ksocknal_startup". It has > a 500-byte stack frame for some inc

Re: [PATCH] staging: mt7621-spi: Remove redundant owner assignment

2018-04-20 Thread NeilBrown
On Wed, Apr 18 2018, Christian Lütke-Stetzkamp wrote: > Remove the owner assignment form the platform driver as > platform_driver_register() already initializes the owner. > Found using coccinelle. > > Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown Th

Re: [PATCH] staging: mt7621-pci: Remove redundant owner assignment

2018-04-20 Thread NeilBrown
On Wed, Apr 18 2018, Christian Lütke-Stetzkamp wrote: > Remove the owner assignment form the platform driver as > platform_driver_register() already initializes the owner. > Found using coccinelle. > > Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown Th

Re: [PATCH] staging: mt7621-pinctrl: Remove redundant owner assignment

2018-04-20 Thread NeilBrown
On Wed, Apr 18 2018, Christian Lütke-Stetzkamp wrote: > Remove the owner assignment form the platform driver as > platform_driver_register() already initializes the owner. > Found using coccinelle. > > Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown Th

Re: [PATCH 11/31] staging: mt7621-mmc: Remove multiple assignments

2018-04-20 Thread NeilBrown
was initialized to. No it will take the value of host->dma_xfer from the previous transfer. I doubt that is correct. I would change the if branches to assign to dma, not to host->dma_xfer. Then "host->dma_xfer = dma;". This isn't *quite* what the original

Re: [PATCH 24/31] staging: mt7621-mmc: Change default transfer mode to DMA

2018-04-20 Thread NeilBrown
mall transfer sizes. We might just need to bite the bullet and discard this code. Maybe. Thanks, NeilBrown > > #if defined(MT6575_SD_DEBUG) > -- > 2.16.1 signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 00/31] staging: mt7621-mmc: Next cleanups

2018-04-20 Thread NeilBrown
entries in the kernel, but fewer entries would be fine :-) They all get Reviewed-by: NeilBrown (and the other two get that as well if you make the changes I suggested). Thanks, NeilBrown > staging: mt7621-mmc: Replace dma dir with mmc_get_dma_dir > staging: mt7621-mmc: Correct da

Re: [PATCH 11/31] staging: mt7621-mmc: Remove multiple assignments

2018-04-20 Thread NeilBrown
On Sat, Apr 21 2018, Christian Luetke wrote: > Am 21.04.2018 00:22, schrieb NeilBrown: >> On Wed, Apr 18 2018, Christian Lütke-Stetzkamp wrote: >> >>> Fix checkpatch: multiple assignments should be avoided, to improve >>> readability. >>> &g

Re: [PATCH 22/31] staging: mt7621-mmc: Refactor msdc_init_gpd_bd

2018-04-24 Thread NeilBrown
prev->next = (void *)(dma->bd_addr + sizeof(struct bd) * (ptr - > bd)); > - ptr = prev; > - } > + memset(bd, 0, sizeof(struct bd) * MAX_BD_NUM); > + for (i = 0; i < (MAX_BD_NUM - 1); i++) > + bd[i].next = (void *)(dma->bd_addr

Re: [PATCH 0/8] staging: mt7621-mmc: remaining patches from previous series

2018-04-24 Thread NeilBrown
that these all apply for me, and the result builds and boot. Thanks, NeilBrown > > Christian Lütke-Stetzkamp (8): > staging: mt7621-mmc: Fix dereference before check in msdc_drv_pm > staging: mt7621-mmc: Remove multiple assignments > staging: mt7621-mmc: Fix dma_map_sg may map

Re: [PATCH] staging: mt7621-mmc: Fix calculation typo in msdc_init_gpd_bd

2018-04-25 Thread NeilBrown
mt7621-mmc: Refactor msdc_init_gpd_bd") > Reported-by: NeilBrown Now ... Reported-and-tested-by: NeilBrown Thanks, NeilBrown > Signed-off-by: Christian Lütke-Stetzkamp > --- > drivers/staging/mt7621-mmc/sd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCH 09/30] staging: mt7621-mmc: Remove function uffs

2018-04-29 Thread NeilBrown
< (ffs((unsigned int)field) - 1));\ Given that ffs() takes an "int", it is odd to cast "field" to an unsigned int to pass it. "field" is always a constant int, so no cast is needed. Thanks, NeilBrown > sdr_write32(reg, tv);

Re: [PATCH 11/30] staging: mt7621-mmc: Replace macro sdr_get_field with function

2018-04-29 Thread NeilBrown
t_field(MSDC_IOCON,MSDC_IOCON_RSPL,&orig_rsmpl); > + sdr_get_field(MSDC_PAD_TUNE, MSDC_PAD_TUNE_CMDRRDLY, &orig_rrdly); So this becomes > + orig_rsmpl = sdr_get_field(MSDC_IOCON, MSDC_IOCON_RSPL); > + orig_rrdly = sdr_get_field(MSDC_PAD_TUNE, MSDC_PAD_TUNE_CM

Re: [PATCH 23/30] staging: mt7621-mmc: Remove initialisation in msdc_dma_config

2018-04-29 Thread NeilBrown
as do several other places. Maybe you could move the initialization into the MSDC_MODE_DMA_BASIC case. Thanks, NeilBrown > > Signed-off-by: Christian Lütke-Stetzkamp > --- > drivers/staging/mt7621-mmc/sd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --

  1   2   3   >