Re: [PATCH] ata: pata_rb532: Add OF support and make COMPILE_TESTable

2021-04-20 Thread Thomas Bogendoerfer
On Tue, Apr 20, 2021 at 07:09:26PM +0300, Sergei Shtylyov wrote: > Hello! > > On 4/20/21 5:04 PM, Thomas Bogendoerfer wrote: > > > Add OF support for switching RB532 do device tree possible. > >I couldnb't parse that. :-) no wonder ;-) I'll rephrase in

[PATCH v2 2/2] dt-bindings: interrupt-controller: Add IDT 79RC3243x Interrupt Controller

2021-04-20 Thread Thomas Bogendoerfer
Document DT bindings for IDT 79RC3243x Interrupt Controller. Signed-off-by: Thomas Bogendoerfer --- .../interrupt-controller/idt,3243x-pic.yaml | 48 +++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/idt,3243x

[PATCH v2 1/2] irqchip: Add support for IDT 79rc3243x interrupt controller

2021-04-20 Thread Thomas Bogendoerfer
IDT 79rc3243x SoCs have rather simple interrupt controllers connected to the MIPS CPU interrupt lines. Each of them has room for up to 32 interrupts. Signed-off-by: Thomas Bogendoerfer --- drivers/irqchip/Kconfig| 5 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq

Re: [PATCH] irqchip: Add support for IDT 79rc3243x interrupt controller

2021-04-20 Thread Thomas Bogendoerfer
On Tue, Apr 20, 2021 at 06:34:59PM +0100, Marc Zyngier wrote: > On 2021-04-20 13:34, Thomas Bogendoerfer wrote: > > IDT 79rc3243x SoCs have rather simple interrupt controllers connected > > to the MIPS CPU interrupt lines. Each of them has room for up to > > 32 interrupts

[PATCH] ata: pata_rb532: Add OF support and make COMPILE_TESTable

2021-04-20 Thread Thomas Bogendoerfer
Add OF support for switching RB532 do device tree possible. By removing the not needed asm/mach-rc32434/rb.h include the driver could be compile tested now. Signed-off-by: Thomas Bogendoerfer --- drivers/ata/Kconfig | 2 +- drivers/ata/pata_rb532_cf.c | 11 +-- 2 files changed

[PATCH 2/2] dt-bindings: gpio: Add devicetree binding for IDT 79RC3243x GPIO controller

2021-04-20 Thread Thomas Bogendoerfer
Add YAML devicetree binding for IDT 79RC3243x GPIO controller Signed-off-by: Thomas Bogendoerfer --- .../bindings/gpio/gpio-idt3243x.yaml | 73 +++ 1 file changed, 73 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-idt3243x.yaml diff --git

[PATCH 1/2] gpio: Add support for IDT 79RC3243x GPIO controller

2021-04-20 Thread Thomas Bogendoerfer
IDT 79RC3243x SoCs integrated a gpio controller, which handles up to 32 gpios. All gpios could be used as interrupt source. Signed-off-by: Thomas Bogendoerfer --- drivers/gpio/Kconfig | 10 ++ drivers/gpio/Makefile| 1 + drivers/gpio/gpio-idt3243x.c | 210

[PATCH] irqchip: Add support for IDT 79rc3243x interrupt controller

2021-04-20 Thread Thomas Bogendoerfer
IDT 79rc3243x SoCs have rather simple interrupt controllers connected to the MIPS CPU interrupt lines. Each of them has room for up to 32 interrupts. Signed-off-by: Thomas Bogendoerfer --- drivers/irqchip/Kconfig| 5 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq

Re: build failure of malta_qemu_32r6_defconfig

2021-04-20 Thread Thomas Bogendoerfer
On Sun, Apr 18, 2021 at 12:01:36AM +0100, Sudip Mukherjee wrote: > Hi Thomas, > > On Fri, Apr 9, 2021 at 1:17 PM Thomas Bogendoerfer > wrote: > > > > On Thu, Apr 08, 2021 at 09:42:11AM +0800, YunQiang Su wrote: > > > Sudip Mukherjee 于2021年4月8日周四 上午

[PATCH v6 net-next 09/10] net: korina: Make driver COMPILE_TESTable

2021-04-18 Thread Thomas Bogendoerfer
Move structs/defines for ethernet/dma register into driver, since they are only used for this driver and remove any MIPS specific includes. This makes it possible to COMPILE_TEST the driver. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 2 +- drivers/net/ethernet

[PATCH v6 net-next 10/10] dt-bindings: net: korina: Add DT bindings for IDT 79RC3243x SoCs

2021-04-18 Thread Thomas Bogendoerfer
Add device tree bindings for ethernet controller integrated into IDT 79RC3243x SoCs. Signed-off-by: Thomas Bogendoerfer --- .../bindings/net/idt,3243x-emac.yaml | 73 +++ 1 file changed, 73 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/idt

[PATCH v6 net-next 08/10] net: korina: Get mdio input clock via common clock framework

2021-04-18 Thread Thomas Bogendoerfer
With device tree clock is provided via CCF. For non device tree use a maximum clock value to not overclock the PHY. The non device tree usage will go away after platform is converted to DT. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 21 +++-- 1 file

[PATCH v6 net-next 06/10] net: korina: Only pass mac address via platform data

2021-04-18 Thread Thomas Bogendoerfer
Get rid of access to struct korina_device by just passing the mac address via platform data and use drvdata for passing netdev to remove function. Signed-off-by: Thomas Bogendoerfer --- arch/mips/rb532/devices.c | 5 +++-- drivers/net/ethernet/korina.c | 11 ++- 2 files changed, 9

[PATCH v6 net-next 05/10] net: korina: Use DMA API

2021-04-18 Thread Thomas Bogendoerfer
Instead of messing with MIPS specific macros use DMA API for mapping descriptors and skbs. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 158 +- 1 file changed, 98 insertions(+), 60 deletions(-) diff --git

[PATCH v6 net-next 07/10] net: korina: Add support for device tree

2021-04-18 Thread Thomas Bogendoerfer
If there is no mac address passed via platform data try to get it via device tree and fall back to a random mac address, if all fail. Signed-off-by: Thomas Bogendoerfer --- arch/mips/rb532/devices.c | 20 +--- drivers/net/ethernet/korina.c | 32

[PATCH v6 net-next 04/10] net: korina: Remove nested helpers

2021-04-18 Thread Thomas Bogendoerfer
Remove helpers, which are only used in one call site. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net

[PATCH v6 net-next 03/10] net: korina: Remove not needed cache flushes

2021-04-18 Thread Thomas Bogendoerfer
Descriptors are mapped uncached so there is no need to do any cache handling for them. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet

[PATCH v6 net-next 02/10] net: korina: Use devres functions

2021-04-18 Thread Thomas Bogendoerfer
Simplify probe/remove code by using devm_ functions. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 64 --- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers

[PATCH v6 net-next 01/10] net: korina: Fix MDIO functions

2021-04-18 Thread Thomas Bogendoerfer
Fixed MDIO functions to work reliable and not just by accident. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/korina.c | 56 +++ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/drivers/net

[PATCH v6 net-next 00/10] net: Korina improvements

2021-04-18 Thread Thomas Bogendoerfer
- fixed descriptor current address handling by storing/using mapped dma addresses (dma controller modifies current address) Thomas Bogendoerfer (10): net: korina: Fix MDIO functions net: korina: Use devres functions net: korina: Remove not needed cache flushes net: korina: Remove

Re: [PATCH v5 net-next 10/10] dt-bindings: net: korina: Add DT bindings for IDT 79RC3243x SoCs

2021-04-16 Thread Thomas Bogendoerfer
On Fri, Apr 16, 2021 at 12:29:46PM +0300, Sergei Shtylyov wrote: > On 16.04.2021 11:52, Thomas Bogendoerfer wrote: > > > Add device tree bindings for ethernet controller integrated into > > IDT 79RC3243x SoCs. > > > > Signed-off-by: Thomas Bogendoerfer > >

[PATCH v5 net-next 09/10] net: korina: Make driver COMPILE_TESTable

2021-04-16 Thread Thomas Bogendoerfer
Move structs/defines for ethernet/dma register into driver, since they are only used for this driver and remove any MIPS specific includes. This makes it possible to COMPILE_TEST the driver. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 2 +- drivers/net/ethernet

[PATCH v5 net-next 10/10] dt-bindings: net: korina: Add DT bindings for IDT 79RC3243x SoCs

2021-04-16 Thread Thomas Bogendoerfer
Add device tree bindings for ethernet controller integrated into IDT 79RC3243x SoCs. Signed-off-by: Thomas Bogendoerfer --- .../bindings/net/idt,3243x-emac.yaml | 74 +++ 1 file changed, 74 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/idt

[PATCH v5 net-next 07/10] net: korina: Add support for device tree

2021-04-16 Thread Thomas Bogendoerfer
If there is no mac address passed via platform data try to get it via device tree and fall back to a random mac address, if all fail. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git

[PATCH v5 net-next 06/10] net: korina: Only pass mac address via platform data

2021-04-16 Thread Thomas Bogendoerfer
Get rid of access to struct korina_device by just passing the mac address via platform data and use drvdata for passing netdev to remove function. Signed-off-by: Thomas Bogendoerfer --- arch/mips/rb532/devices.c | 5 +++-- drivers/net/ethernet/korina.c | 11 ++- 2 files changed, 9

[PATCH v5 net-next 08/10] net: korina: Get mdio input clock via common clock framework

2021-04-16 Thread Thomas Bogendoerfer
With device tree clock is provided via CCF. For non device tree use a maximum clock value to not overclock the PHY. The non device tree usage will go away after platform is converted to DT. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 21 +++-- 1 file

[PATCH v5 net-next 05/10] net: korina: Use DMA API

2021-04-16 Thread Thomas Bogendoerfer
Instead of messing with MIPS specific macros use DMA API for mapping descriptors and skbs. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 158 +- 1 file changed, 98 insertions(+), 60 deletions(-) diff --git

[PATCH v5 net-next 04/10] net: korina: Remove nested helpers

2021-04-16 Thread Thomas Bogendoerfer
Remove helpers, which are only used in one call site. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net

[PATCH v5 net-next 02/10] net: korina: Use devres functions

2021-04-16 Thread Thomas Bogendoerfer
Simplify probe/remove code by using devm_ functions. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 64 --- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers

[PATCH v5 net-next 03/10] net: korina: Remove not needed cache flushes

2021-04-16 Thread Thomas Bogendoerfer
Descriptors are mapped uncached so there is no need to do any cache handling for them. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet

[PATCH v5 net-next 01/10] net: korina: Fix MDIO functions

2021-04-16 Thread Thomas Bogendoerfer
Fixed MDIO functions to work reliable and not just by accident. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/korina.c | 56 +++ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/drivers/net

[PATCH v5 net-next 00/10] net: Korina improvements

2021-04-16 Thread Thomas Bogendoerfer
- fixed usage of of_get_mac_address for net-next Changes in v2: - added device tree support to get rid of idt_cpu_freq - fixed compile test on 64bit archs - fixed descriptor current address handling by storing/using mapped dma addresses (dma controller modifies current address) Thomas

[PATCH v4 net-next 09/10] net: korina: Make driver COMPILE_TESTable

2021-04-16 Thread Thomas Bogendoerfer
Move structs/defines for ethernet/dma register into driver, since they are only used for this driver and remove any MIPS specific includes. This makes it possible to COMPILE_TEST the driver. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 2 +- drivers/net/ethernet

[PATCH v4 net-next 08/10] net: korina: Get mdio input clock via common clock framework

2021-04-16 Thread Thomas Bogendoerfer
With device tree clock is provided via CCF. For non device tree use a maximum clock value to not overclock the PHY. The non device tree usage will go away after platform is converted to DT. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 21 +++-- 1 file

[PATCH v4 net-next 07/10] net: korina: Add support for device tree

2021-04-16 Thread Thomas Bogendoerfer
If there is no mac address passed via platform data try to get it via device tree and fall back to a random mac address, if all fail. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git

[PATCH v4 net-next 05/10] net: korina: Use DMA API

2021-04-16 Thread Thomas Bogendoerfer
Instead of messing with MIPS specific macros use DMA API for mapping descriptors and skbs. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 158 +- 1 file changed, 98 insertions(+), 60 deletions(-) diff --git

[PATCH v4 net-next 06/10] net: korina: Only pass mac address via platform data

2021-04-16 Thread Thomas Bogendoerfer
Get rid of access to struct korina_device by just passing the mac address via platform data and use drvdata for passing netdev to remove function. Signed-off-by: Thomas Bogendoerfer --- arch/mips/rb532/devices.c | 5 +++-- drivers/net/ethernet/korina.c | 11 ++- 2 files changed, 9

[PATCH v4 net-next 04/10] net: korina: Remove nested helpers

2021-04-16 Thread Thomas Bogendoerfer
Remove helpers, which are only used in one call site. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net

[PATCH v4 net-next 02/10] net: korina: Use devres functions

2021-04-16 Thread Thomas Bogendoerfer
Simplify probe/remove code by using devm_ functions. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 64 --- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers

[PATCH v4 net-next 03/10] net: korina: Remove not needed cache flushes

2021-04-16 Thread Thomas Bogendoerfer
Descriptors are mapped uncached so there is no need to do any cache handling for them. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet

[PATCH v4 net-next 01/10] net: korina: Fix MDIO functions

2021-04-16 Thread Thomas Bogendoerfer
Fixed MDIO functions to work reliable and not just by accident. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/korina.c | 56 +++ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/drivers/net

[PATCH v4 net-next 00/10] net: Korina improvements

2021-04-16 Thread Thomas Bogendoerfer
support to get rid of idt_cpu_freq - fixed compile test on 64bit archs - fixed descriptor current address handling by storing/using mapped dma addresses (dma controller modifies current address) Thomas Bogendoerfer (10): net: korina: Fix MDIO functions net: korina: Use devres functions

Re: [PATCH v3 net-next 07/10] net: korina: Add support for device tree

2021-04-16 Thread Thomas Bogendoerfer
On Fri, Apr 16, 2021 at 01:49:07AM +0200, Andrew Lunn wrote: > > - memcpy(dev->dev_addr, mac_addr, ETH_ALEN); > > + if (mac_addr) { > > + ether_addr_copy(dev->dev_addr, mac_addr); > > + } else { > > + u8 ofmac[ETH_ALEN]; > > + > > + if

Re: [PATCH v2 0/8] MIPS: fixes for PCI legacy drivers (rt2880, rt3883)

2021-04-16 Thread Thomas Bogendoerfer
On Tue, Apr 13, 2021 at 08:12:32PM -0700, Ilya Lipnitskiy wrote: > One major fix for rt2880-pci in the first patch - fixes breakage that > existed since v4.14. > > Other more minor fixes, cleanups, and improvements that either free up > memory, make dmesg messages clearer, or remove redundant

Re: [PATCH] MIPS: Fix strnlen_user access check

2021-04-16 Thread Thomas Bogendoerfer
On Thu, Apr 15, 2021 at 11:26:40PM +0200, Thomas Bogendoerfer wrote: > Commit 04324f44cb69 ("MIPS: Remove get_fs/set_fs") changed the access_ok > for strnlen_user to check the whole range, which broke some callers > of strndup_user(). Restore the old behaviour and just c

Re: [PATCH v3 net-next 06/10] net: korina: Only pass mac address via platform data

2021-04-16 Thread Thomas Bogendoerfer
On Fri, Apr 16, 2021 at 01:30:04AM +0200, Andrew Lunn wrote: > On Thu, Apr 15, 2021 at 01:06:43AM +0200, Thomas Bogendoerfer wrote: > > Get rid of access to struct korina_device by just passing the mac > > address via platform data and use drvdata for passing netdev to remo

[PATCH] MIPS: Fix strnlen_user access check

2021-04-15 Thread Thomas Bogendoerfer
Commit 04324f44cb69 ("MIPS: Remove get_fs/set_fs") changed the access_ok for strnlen_user to check the whole range, which broke some callers of strndup_user(). Restore the old behaviour and just check the first byte. Fixes: 04324f44cb69 ("MIPS: Remove get_fs/set_fs") S

[PATCH v3 net-next 09/10] net: korina: Make driver COMPILE_TESTable

2021-04-14 Thread Thomas Bogendoerfer
Move structs/defines for ethernet/dma register into driver, since they are only used for this driver and remove any MIPS specific includes. This makes it possible to COMPILE_TEST the driver. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 2 +- drivers/net/ethernet

[PATCH v3 net-next 05/10] net: korina: Use DMA API

2021-04-14 Thread Thomas Bogendoerfer
Instead of messing with MIPS specific macros use DMA API for mapping descriptors and skbs. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 158 +- 1 file changed, 98 insertions(+), 60 deletions(-) diff --git a/drivers/net/ethernet/korina.c

[PATCH v3 net-next 08/10] net: korina: Get mdio input clock via common clock framework

2021-04-14 Thread Thomas Bogendoerfer
With device tree clock is provided via CCF. For non device tree use a maximum clock value to not overclock the PHY. The non device tree usage will go away after platform is converted to DT. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 19 +-- 1 file

[PATCH v3 net-next 07/10] net: korina: Add support for device tree

2021-04-14 Thread Thomas Bogendoerfer
If there is no mac address passed via platform data try to get it via device tree and fall back to a random mac address, if all fail. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff

[PATCH v3 net-next 03/10] net: korina: Remove not needed cache flushes

2021-04-14 Thread Thomas Bogendoerfer
Descriptors are mapped uncached so there is no need to do any cache handling for them. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index 6bef5d590ebe

[PATCH v3 net-next 06/10] net: korina: Only pass mac address via platform data

2021-04-14 Thread Thomas Bogendoerfer
Get rid of access to struct korina_device by just passing the mac address via platform data and use drvdata for passing netdev to remove function. Signed-off-by: Thomas Bogendoerfer --- arch/mips/rb532/devices.c | 5 +++-- drivers/net/ethernet/korina.c | 11 ++- 2 files changed, 9

[PATCH v3 net-next 04/10] net: korina: Remove nested helpers

2021-04-14 Thread Thomas Bogendoerfer
Remove helpers, which are only used in one call site. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index

[PATCH v3 net-next 02/10] net: korina: Use devres functions

2021-04-14 Thread Thomas Bogendoerfer
Simplify probe/remove code by using devm_ functions. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 64 --- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index

[PATCH v3 net-next 01/10] net: korina: Fix MDIO functions

2021-04-14 Thread Thomas Bogendoerfer
Fixed MDIO functions to work reliable and not just by accident. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/korina.c | 54 +++ 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/drivers/net

[PATCH v3 net-next 00/10] net: Korina improvements

2021-04-14 Thread Thomas Bogendoerfer
by storing/using mapped dma addresses (dma controller modifies current address) Thomas Bogendoerfer (10): net: korina: Fix MDIO functions net: korina: Use devres functions net: korina: Remove not needed cache flushes net: korina: Remove nested helpers net: korina: Use DMA API net: korina

Re: [PATCH net-next 1/7] net: korina: Fix MDIO functions

2021-04-14 Thread Thomas Bogendoerfer
On Wed, Apr 14, 2021 at 09:36:04PM +0200, Andrew Lunn wrote: > > +static int korina_mdio_wait(struct korina_private *lp) > > +{ > > + int timeout = 1000; > > + > > + while ((readl(>eth_regs->miimind) & 1) && timeout-- > 0) > > + udelay(1); > > + > > + if (timeout <= 0) > > +

[PATCH v2 net-next 8/9] net: korina: Get mdio input clock via common clock framework

2021-04-14 Thread Thomas Bogendoerfer
With device tree clock is provided via CCF. For non device tree use a maximum clock value to not overclock the PHY. The non device tree usage will go away after platform is converted to DT. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 19 +-- 1 file

[PATCH v2 net-next 6/9] net: korina: Only pass mac address via platform data

2021-04-14 Thread Thomas Bogendoerfer
Get rid of access to struct korina_device by just passing the mac address via platform data and use drvdata for passing netdev to remove function. Signed-off-by: Thomas Bogendoerfer --- arch/mips/rb532/devices.c | 5 +++-- drivers/net/ethernet/korina.c | 11 ++- 2 files changed, 9

[PATCH v2 net-next 9/9] net: korina: Make driver COMPILE_TESTable

2021-04-14 Thread Thomas Bogendoerfer
Move structs/defines for ethernet/dma register into driver, since they are only used for this driver and remove any MIPS specific includes. This makes it possible to COMPILE_TEST the driver. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 2 +- drivers/net/ethernet

[PATCH v2 net-next 7/9] net: korina: Add support for device tree

2021-04-14 Thread Thomas Bogendoerfer
If there is no mac address passed via platform data try to get it via device tree and fall back to a random mac address, if all fail. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff

[PATCH v2 net-next 5/9] net: korina: Use DMA API

2021-04-14 Thread Thomas Bogendoerfer
Instead of messing with MIPS specific macros use DMA API for mapping descriptors and skbs. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 158 +- 1 file changed, 98 insertions(+), 60 deletions(-) diff --git a/drivers/net/ethernet/korina.c

[PATCH v2 net-next 4/9] net: korina: Remove nested helpers

2021-04-14 Thread Thomas Bogendoerfer
Remove helpers, which are only used in one call site. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index

[PATCH v2 net-next 3/9] net: korina: Remove not needed cache flushes

2021-04-14 Thread Thomas Bogendoerfer
Descriptors are mapped uncached so there is no need to do any cache handling for them. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index 3a454f6214b0

[PATCH v2 net-next 2/9] net: korina: Use devres functions

2021-04-14 Thread Thomas Bogendoerfer
Simplify probe/remove code by using devm_ functions. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 64 --- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index

[PATCH v2 net-next 1/9] net: korina: Fix MDIO functions

2021-04-14 Thread Thomas Bogendoerfer
Fixed MDIO functions to work reliable and not just by accident. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/korina.c | 57 +++ 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/drivers/net

[PATCH v2 net-next 0/9] net: Korina improvements

2021-04-14 Thread Thomas Bogendoerfer
compile test on 64bit archs - fixed descriptor current address handling by storing/using mapped dma addresses (dma controller modifies current address) Thomas Bogendoerfer (9): net: korina: Fix MDIO functions net: korina: Use devres functions net: korina: Remove not needed cache flushes

Re: [PATCH] MIPS: Fix strnlen_user access check

2021-04-14 Thread Thomas Bogendoerfer
On Tue, Apr 13, 2021 at 04:01:13PM +, David Laight wrote: > From: Thomas Bogendoerfer > > Sent: 13 April 2021 16:19 > > > > On Tue, Apr 13, 2021 at 12:37:25PM +, David Laight wrote: > > > From: Thomas Bogendoerfer > > > > Sent: 13 April 2021

[PATCH net-next 6/7] net: korina: Only pass mac address via platform data

2021-04-13 Thread Thomas Bogendoerfer
Get rid of access to struct korina_device by just passing the mac address via platform data and use drvdata for passing netdev to remove function. Signed-off-by: Thomas Bogendoerfer --- arch/mips/rb532/devices.c | 5 +++-- drivers/net/ethernet/korina.c | 11 ++- 2 files changed, 9

[PATCH net-next 5/7] net: korina: Use DMA API

2021-04-13 Thread Thomas Bogendoerfer
Instead of messing with MIPS specific macros use DMA API for mapping descriptors and skbs. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 143 -- 1 file changed, 85 insertions(+), 58 deletions(-) diff --git a/drivers/net/ethernet/korina.c

[PATCH net-next 7/7] net: korina: Make driver COMPILE_TESTable

2021-04-13 Thread Thomas Bogendoerfer
Move structs/defines for ethernet/dma register into driver, since they are only used for this driver and remove any MIPS specific includes. This makes it possible to COMPILE_TEST the driver. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 2 +- drivers/net/ethernet

[PATCH net-next 4/7] net: korina: Remove nested helpers

2021-04-13 Thread Thomas Bogendoerfer
Remove helpers, which are only used in one call site. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index

[PATCH net-next 3/7] net: korina: Remove not needed cache flushes

2021-04-13 Thread Thomas Bogendoerfer
Descriptors are mapped uncached so there is no need to do any cache handling for them. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index 3a454f6214b0

[PATCH net-next 2/7] net: korina: Use devres functions

2021-04-13 Thread Thomas Bogendoerfer
Simplify probe/remove code by using devm_ functions. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 64 --- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index

[PATCH net-next 1/7] net: korina: Fix MDIO functions

2021-04-13 Thread Thomas Bogendoerfer
Fixed MDIO functions to work reliable and not just by accident. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 57 +++ 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet

[PATCH net-next 0/7] net: Korina improvements

2021-04-13 Thread Thomas Bogendoerfer
While converting Mikrotik RB532 support to use device tree I stumbled over the korina ethernet driver, which used way too many MIPS specific hacks. This series cleans this all up. Thomas Bogendoerfer (7): net: korina: Fix MDIO functions net: korina: Use devres functions net: korina: Remove

Re: [PATCH] MIPS: Fix strnlen_user access check

2021-04-13 Thread Thomas Bogendoerfer
On Tue, Apr 13, 2021 at 12:37:25PM +, David Laight wrote: > From: Thomas Bogendoerfer > > Sent: 13 April 2021 12:15 > ... > > > The __access_ok() is noted with `Ensure that the range [addr, addr+size) > > > is within the process's address space`. Does the rang

Re: [PATCH] MIPS: Fix strnlen_user access check

2021-04-13 Thread Thomas Bogendoerfer
On Tue, Apr 13, 2021 at 09:15:48AM +0800, Jinyang He wrote: > On 04/12/2021 10:27 PM, Thomas Bogendoerfer wrote: > > > diff --git a/arch/mips/include/asm/uaccess.h > > > b/arch/mips/include/asm/uaccess.h > > > index 91bc7fb..eafc99b 100644 > > > --- a/arch

Re: [PATCH -next] MIPS: Alchemy: Use DEFINE_SPINLOCK() for spinlock

2021-04-12 Thread Thomas Bogendoerfer
On Sat, Mar 27, 2021 at 05:52:25PM +0800, Chen Lifu wrote: > From: Lifu Chen > > spinlock can be initialized automatically with DEFINE_SPINLOCK() > rather than explicitly calling spin_lock_init(). > > Reported-by: Hulk Robot > Signed-off-by: Lifu Chen > --- > arch/mips/alchemy/common/clock.c

Re: [PATCH] MIPS: generic: Update node names to avoid unit addresses

2021-04-12 Thread Thomas Bogendoerfer
On Fri, Apr 09, 2021 at 12:21:28PM -0700, Nathan Chancellor wrote: > With the latest mkimage from U-Boot 2021.04, the generic defconfigs no > longer build, failing with: > > /usr/bin/mkimage: verify_header failed for FIT Image support with exit code 1 > > This is expected after the linked U-Boot

Re: [PATCH v3] MIPS: add support for buggy MT7621S core detection

2021-04-12 Thread Thomas Bogendoerfer
On Wed, Apr 07, 2021 at 01:07:38PM -0700, Ilya Lipnitskiy wrote: > Most MT7621 SoCs have 2 cores, which is detected and supported properly > by CPS. > > Unfortunately, MT7621 SoC has a less common S variant with only one core. > On MT7621S, GCR_CONFIG still reports 2 cores, which leads to hangs

Re: [PATCH] MIPS: uaccess: Reduce number of nested macros

2021-04-12 Thread Thomas Bogendoerfer
On Thu, Apr 08, 2021 at 08:14:37PM +0200, Thomas Bogendoerfer wrote: > Clean up macros even further after removal get_fs/set_fs. > > Signed-off-by: Thomas Bogendoerfer > --- > arch/mips/include/asm/uaccess.h | 157 +++- > 1 file changed, 71

Re: [PATCH] MIPS: Fix strnlen_user access check

2021-04-12 Thread Thomas Bogendoerfer
On Mon, Apr 12, 2021 at 11:02:19AM +0800, Tiezhu Yang wrote: > On 04/11/2021 07:04 PM, Jinyang He wrote: > > Commit 04324f44cb69 ("MIPS: Remove get_fs/set_fs") brought a problem for > > strnlen_user(). Jump out when checking access_ok() with condition that > > (s + strlen(s)) < __UA_LIMIT <= (s +

Re: [PATCH v2 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Thomas Bogendoerfer
| 1 + > arch/mips/sgi-ip22/ip22-reset.c | 1 + > arch/mips/sgi-ip32/ip32-reset.c | 1 + Acked-by: Thomas Bogendoerfer -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea.[ RFC1925, 2.3 ]

Re: build failure of malta_qemu_32r6_defconfig

2021-04-09 Thread Thomas Bogendoerfer
On Thu, Apr 08, 2021 at 09:42:11AM +0800, YunQiang Su wrote: > Sudip Mukherjee 于2021年4月8日周四 上午2:26写道: > > > > Hi Thomas, > > > > I was building v5.10.28 with malta_qemu_32r6_defconfig and noticed that > > it fails to build, so tried next-20210407 to see if it has been fixed. > > But linux-next

Re: [PATCH] MIPS: octeon: Add __raw_copy_[from|to|in]_user symbols

2021-04-09 Thread Thomas Bogendoerfer
On Fri, Apr 09, 2021 at 11:42:46AM +0300, Sergei Shtylyov wrote: > Hello! > > On 09.04.2021 0:48, Thomas Bogendoerfer wrote: > > > Cavium Octeon has it's own memcpy implementation and also need the change > >Its. :-) applied (with typo fixed) to mips-next. Th

[PATCH] MIPS: octeon: Add __raw_copy_[from|to|in]_user symbols

2021-04-08 Thread Thomas Bogendoerfer
Cavium Octeon has it's own memcpy implementation and also need the change done in commit 04324f44cb69 ("MIPS: Remove get_fs/set_fs"). Fixes: 04324f44cb69 ("MIPS: Remove get_fs/set_fs") Reported-by: kernel test robot Signed-off-by: Thomas Bogendoerfer --- arch/mips/cavium-oc

Re: [PATCH] MIPS: uaccess: Reduce number of nested macros

2021-04-08 Thread Thomas Bogendoerfer
On Thu, Apr 08, 2021 at 09:46:11PM +0200, Christoph Hellwig wrote: > > +#define put_user(x, ptr) \ > > +({ \ > > + __typeof__(*(ptr)) __user *__p = (ptr); \ > > +

[PATCH] MIPS: uaccess: Reduce number of nested macros

2021-04-08 Thread Thomas Bogendoerfer
Clean up macros even further after removal get_fs/set_fs. Signed-off-by: Thomas Bogendoerfer --- arch/mips/include/asm/uaccess.h | 157 +++- 1 file changed, 71 insertions(+), 86 deletions(-) diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm

Re: [PATCH] MIPS: Fix new sparse warning

2021-04-08 Thread Thomas Bogendoerfer
On Wed, Apr 07, 2021 at 01:03:48AM +0200, Thomas Bogendoerfer wrote: > Commit 45deb5faeb9e ("MIPS: uaccess: Remove get_fs/set_fs call sites") > caused a few new sparse warning, fix them. > > Signed-off-by: Thomas Bogendoerfer > --- > arch/mips/kernel/access-helpe

[PATCH] MIPS: Fix new sparse warning

2021-04-06 Thread Thomas Bogendoerfer
Commit 45deb5faeb9e ("MIPS: uaccess: Remove get_fs/set_fs call sites") caused a few new sparse warning, fix them. Signed-off-by: Thomas Bogendoerfer --- arch/mips/kernel/access-helper.h | 7 --- arch/mips/kernel/unaligned.c | 6 +++--- 2 files changed, 7 insertions(+), 6

Re: [PATCH v4] MIPS: Add support for CONFIG_DEBUG_VIRTUAL

2021-04-06 Thread Thomas Bogendoerfer
On Tue, Mar 30, 2021 at 08:22:07PM -0700, Florian Fainelli wrote: > Provide hooks to intercept bad usages of virt_to_phys() and > __pa_symbol() throughout the kernel. To make this possible, we need to > rename the current implement of virt_to_phys() into > __virt_to_phys_nodebug() and wrap it

Re: [PATCH v2 0/6] mips: bmips: fix and improve reboot nodes

2021-04-06 Thread Thomas Bogendoerfer
On Sun, Mar 14, 2021 at 05:43:45PM +0100, Álvaro Fernández Rojas wrote: > These patches improve bmips bcm63xx device tree nodes. > > v2: add missing BCM63268 patch. > > Álvaro Fernández Rojas (6): > mips: bmips: fix syscon-reboot nodes > mips: bmips: bcm6328: populate device tree nodes >

Re: [PATCH v3 0/4] MIPS: Remove get_fs/set_fs

2021-04-06 Thread Thomas Bogendoerfer
On Thu, Apr 01, 2021 at 02:56:33PM +0200, Thomas Bogendoerfer wrote: > This series replaces get_fs/set_fs and removes it from MIPS arch code. > > Changes in v3: > - use get_user/get_kernel_nofault for helper functions > > Changes in v2: > - added copy_from_kernel_nofau

Re: [PATCH] MIPS: fix memory reservation for non-usermem setups

2021-04-06 Thread Thomas Bogendoerfer
On Sat, Apr 03, 2021 at 07:02:13PM -0700, Ilya Lipnitskiy wrote: > Hi Mike, > > On Tue, Mar 16, 2021 at 11:33 PM Mike Rapoport wrote: > > > > Hi Ilya, > > > > On Tue, Mar 16, 2021 at 10:10:09PM -0700, Ilya Lipnitskiy wrote: > > > Hi Thomas, > >

Re: [PATCH v3 0/4] MIPS: Remove get_fs/set_fs

2021-04-06 Thread Thomas Bogendoerfer
On Tue, Apr 06, 2021 at 09:24:43AM +0200, Christoph Hellwig wrote: > Btw, there is a bunch of cleanups that would fit in nicely on top of > this: > > - remove the unused __invoke_copy_from function I've removed in the last patch before applying to mips-next. > - fold __get_user_check into

Re: [PATCH RFC] MIPS: Loongson64: Use _CACHE_UNCACHED instead of _CACHE_UNCACHED_ACCELERATED

2021-04-06 Thread Thomas Bogendoerfer
On Tue, Apr 06, 2021 at 05:25:12PM +0800, Tiezhu Yang wrote: > Loongson64 processors have a writecombine issue that maybe failed to > write back framebuffer used with ATI Radeon or AMD GPU at times, after > commit 8a08e50cee66 ("drm: Permit video-buffers writecombine mapping > for MIPS"), there

Re: [PATCH] MIPS: ralink: rt288x: select MIPS_AUTO_PFN_OFFSET

2021-04-06 Thread Thomas Bogendoerfer
On Sat, Apr 03, 2021 at 07:11:26PM -0700, Ilya Lipnitskiy wrote: > RT288X systems may have a non-zero ramstart causing problems with memory > reservations and boot hangs, as well as messages like: > Wasting 1048576 bytes for tracking 32768 unused pages > > Both are alleviated by selecting

Re: [PATCH 6/9] mips: netlogic: Use irq_domain_simple_ops for XLP PIC

2021-04-06 Thread Thomas Bogendoerfer
On Tue, Apr 06, 2021 at 10:35:54AM +0100, Marc Zyngier wrote: > Use the generic irq_domain_simple_ops structure instead of > a home-grown one. > > Signed-off-by: Marc Zyngier > --- > arch/mips/netlogic/common/irq.c | 6 +- > 1 file changed, 1 insertion(+), 5 deletions

  1   2   3   4   5   6   7   8   9   10   >