Re: [PATCH net-next 1/2] net: dsa: tag_brcm: add support for legacy tags

2021-03-17 Thread Jonas Gorski
On Wed, 17 Mar 2021 at 10:16, Álvaro Fernández Rojas wrote: > > Hi Vladimir, > > > El 15 mar 2021, a las 22:28, Vladimir Oltean escribió: > > > > On Mon, Mar 15, 2021 at 03:27:35PM +0100, Álvaro Fernández Rojas wrote: > >> Add support for legacy Broadcom tags, which are similar to > >> DSA_TAG_P

[PATCH 0/4] bcm63xx_enet: remove mac_id usage

2017-12-17 Thread Jonas Gorski
This patchset aims at reducing the platform device id number usage with the target of making it eventually possible to probe the driver through OF. Runtested on BCM6358. Since the patches touch mostly net/, they should go through net-next. Jonas Gorski (4): bcm63xx_enet: just use "ene

[PATCH 4/4] bcm63xx_enet: use platform device id directly for miibus name

2017-12-17 Thread Jonas Gorski
Directly use the platform device for generating the miibus name. This removes the last user of bcm_enet_priv::mac_id and we can remove the field. Signed-off-by: Jonas Gorski --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 +-- drivers/net/ethernet/broadcom/bcm63xx_enet.h | 3 --- 2 files

[PATCH 1/4] bcm63xx_enet: just use "enet" as the clock name

2017-12-17 Thread Jonas Gorski
Now that we have the individual clocks available as "enet" we don't need to rely on the device id for them anymore. Signed-off-by: Jonas Gorski --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/et

[PATCH 3/4] bcm63xx_enet: remove pointless mac_id check

2017-12-17 Thread Jonas Gorski
Enabling the ephy clock for mac 1 is harmless, and the actual usage of the ephy is not restricted to mac 0, so we might as well remove the check. Signed-off-by: Jonas Gorski --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 2/4] bcm63xx_enet: use platform data for dma channel numbers

2017-12-17 Thread Jonas Gorski
To reduce the reliance on device ids, pass the dma channel numbers to the enet devices as platform data. Signed-off-by: Jonas Gorski --- arch/mips/bcm63xx/dev-enet.c | 8 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h | 4 drivers/net/ethernet

[PATCH 2/6] bcm63xx_enet: do not write to random DMA channel on BCM6345

2017-10-01 Thread Jonas Gorski
The DMA controller regs actually point to DMA channel 0, so the write to ENETDMA_CFG_REG will actually modify a random DMA channel. Since DMA controller registers do not exist on BCM6345, guard the write with the usual check for dma_has_sram. Signed-off-by: Jonas Gorski --- drivers/net

[PATCH 4/6] bcm63xx_enet: use managed functions for clock/ioremap

2017-10-01 Thread Jonas Gorski
Use managed functions where possible to reduce the amount of resource handling on error and remove paths. Signed-off-by: Jonas Gorski --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 54 +++- 1 file changed, 12 insertions(+), 42 deletions(-) diff --git a/drivers/net

[PATCH 6/6] bcm63xx_enet: remove unneeded include

2017-10-01 Thread Jonas Gorski
We don't use anyhing from that file, so drop it. Signed-off-by: Jonas Gorski --- drivers/net/ethernet/broadcom/bcm63xx_enet.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.h b/drivers/net/ethernet/broadcom/bcm63xx_enet.h index 0a1b7b2

[PATCH 0/6] bcm63xx_enet: small fixes and cleanups

2017-10-01 Thread Jonas Gorski
This patch set fixes a few theoretical issues and cleans up the code a bit. It also adds a bit more managed function usage to simplify clock and iomem usage. Based on net-next. Jonas Gorski (6): bcm63xx_enet: correct clock usage bcm63xx_enet: do not write to random DMA channel on BCM6345

[PATCH 5/6] bcm63xx_enet: drop unneeded NULL phy_clk check

2017-10-01 Thread Jonas Gorski
clk_disable and clk_unprepare are NULL-safe, so need to duplicate the NULL check of the functions. Signed-off-by: Jonas Gorski --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c

[PATCH 1/6] bcm63xx_enet: correct clock usage

2017-10-01 Thread Jonas Gorski
Check the return code of prepare_enable and change one last instance of enable only to prepare_enable. Also properly disable and release the clock in error paths and on remove for enetsw. Signed-off-by: Jonas Gorski --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 31

[PATCH 3/6] bcm63xx_enet: do not rely on probe order

2017-10-01 Thread Jonas Gorski
Do not rely on the shared device being probed before the enet(sw) devices. This makes it easier to eventually move out the shared device as a dma controller driver (what it should be). Signed-off-by: Jonas Gorski --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 9 ++--- 1 file changed, 2

Re: [PATCH 4/8] tty/bcm63xx_uart: allow naming clock in device tree

2017-09-06 Thread Jonas Gorski
On 6 September 2017 at 14:17, Greg Kroah-Hartman wrote: > On Wed, Sep 06, 2017 at 01:01:32PM +0200, Jonas Gorski wrote: >> Hi Greg, >> >> On 2 August 2017 at 11:34, Jonas Gorski wrote: >> > Codify using a named clock for the refclk of the uart. This makes it >>

Re: [PATCH 4/8] tty/bcm63xx_uart: allow naming clock in device tree

2017-09-06 Thread Jonas Gorski
Hi Greg, On 2 August 2017 at 11:34, Jonas Gorski wrote: > Codify using a named clock for the refclk of the uart. This makes it > easier if we might need to add a gating clock (like present on the > BCM6345). > > Signed-off-by: Jonas Gorski Could I please get a (N)Ack so Ralf can

Re: [PATCH 6/8] bcm63xx_enet: just use "enet" as the clock name

2017-09-06 Thread Jonas Gorski
Hi David, On 2 August 2017 at 11:34, Jonas Gorski wrote: > Now that we have the individual clocks available as "enet" we > don't need to rely on the device id for them anymore. > > Signed-off-by: Jonas Gorski Could I please get a (N)Ack so Ralf can add this patch t

[PATCH 1/8] MIPS: BCM63XX: add clkdev lookup support

2017-08-02 Thread Jonas Gorski
Enable clkdev lookup support to allow us providing clocks under different names to devices more easily, so we don't need to care about clock name clashes anymore. Signed-off-by: Jonas Gorski --- arch/mips/Kconfig | 1 + arch/mips/bcm63xx/clk.c

[PATCH 6/8] bcm63xx_enet: just use "enet" as the clock name

2017-08-02 Thread Jonas Gorski
Now that we have the individual clocks available as "enet" we don't need to rely on the device id for them anymore. Signed-off-by: Jonas Gorski --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/et

[PATCH 0/8] MIPS: BCM63XX: add and use clkdev lookup support

2017-08-02 Thread Jonas Gorski
MIPS and device tree. Jonas Gorski (8): MIPS: BCM63XX: add clkdev lookup support MIPS: BCM63XX: provide periph clock as refclk for uart tty/bcm63xx_uart: use refclk for the expected clock name tty/bcm63xx_uart: allow naming clock in device tree MIPS: BCM63XX: provide enet clocks as &q

[PATCH 7/8] MIPS: BCM63XX: move the HSSPI PLL HZ into its own clock

2017-08-02 Thread Jonas Gorski
Split up the HSSPL clock into rate and a gate clock, to more closely match the actual hardware. Signed-off-by: Jonas Gorski --- arch/mips/bcm63xx/clk.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c index

[PATCH 5/8] MIPS: BCM63XX: provide enet clocks as "enet" to the ethernet devices

2017-08-02 Thread Jonas Gorski
Add lookups to provide the appropriate enetX clocks as just "enet" to the ethernet devices. Signed-off-by: Jonas Gorski --- arch/mips/bcm63xx/clk.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c index 0b898e5e4c5b..8a

[PATCH 3/8] tty/bcm63xx_uart: use refclk for the expected clock name

2017-08-02 Thread Jonas Gorski
We now have the clock available under refclk, so use that. Signed-off-by: Jonas Gorski --- drivers/tty/serial/bcm63xx_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c index 583c9a0c7ecc

[PATCH 4/8] tty/bcm63xx_uart: allow naming clock in device tree

2017-08-02 Thread Jonas Gorski
Codify using a named clock for the refclk of the uart. This makes it easier if we might need to add a gating clock (like present on the BCM6345). Signed-off-by: Jonas Gorski --- Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt | 6 ++ drivers/tty/serial/bcm63xx_uart.c

[PATCH 8/8] MIPS: BMIPS: name the refclk clock for uart

2017-08-02 Thread Jonas Gorski
Add the clock name to the uart nodes, to name the input clock properly. Signed-off-by: Jonas Gorski --- arch/mips/boot/dts/brcm/bcm3368.dtsi | 2 ++ arch/mips/boot/dts/brcm/bcm63268.dtsi | 2 ++ arch/mips/boot/dts/brcm/bcm6328.dtsi | 2 ++ arch/mips/boot/dts/brcm/bcm6358.dtsi | 2 ++ arch

[PATCH 2/8] MIPS: BCM63XX: provide periph clock as refclk for uart

2017-08-02 Thread Jonas Gorski
Add a lookup as "refclk" to describe its function for the uarts. Signed-off-by: Jonas Gorski --- arch/mips/bcm63xx/clk.c | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c index eb1cb0bf930b..0b898e5e4c5b 100644 --- a

Re: [PATCH] MIPS: Remove all the uses of custom gpio.h

2015-07-30 Thread Jonas Gorski
Hi, On Thu, Jul 30, 2015 at 7:28 PM, Alban Bedel wrote: > Currently CONFIG_ARCH_HAVE_CUSTOM_GPIO_H is defined for all MIPS > machines, and each machine type provides its own gpio.h. However > only a handful really implement the GPIO API, most just forward > everythings to gpiolib. > > The Alchemy