Re: [PATCH] powerpc: platforms: 52xx: Fix a resource leak in an error handling path
On Sat, 29 Jan 2022 08:16:04 +0100 Christophe JAILLET christophe.jail...@wanadoo.fr wrote: >The error handling path of mpc52xx_lpbfifo_probe() and a request_irq() is >not balanced by a corresponding free_irq(). > >Add the missing call, as already done in the remove function. > >Fixes: 3c9059d79f5e ("powerpc/5200: add LocalPlus bus FIFO device driver") >Signed-off-by: Christophe JAILLET >--- >Another strange thing is that the remove function has: > /* Release the bestcomm transmit task */ > free_irq(bcom_get_task_irq(lpbfifo.bcom_tx_task), ); >but I've not been able to find a corresponding request_irq(). This driver does not request the tx task irq itself, but a fifo client driver can request/free tx interrupts for submitted fifo write tasks, like mpc5200 fec and pata drivers do, so it is okay. >Is it dead code? Is there something missing in the probe? No. -- Anatolij
Re: [PATCH] powerpc/mpc512x: dts: fix PSC node warnings
On Thu, 14 Oct 2021 07:33:26 -0500 Rob Herring robh...@kernel.org wrote: ... >> +++ b/arch/powerpc/boot/dts/ac14xx.dts >> @@ -301,13 +301,21 @@ >> fsl,tx-fifo-size = <512>; >> }; >> >> + /delete-node/ psc@11400; >> + /delete-node/ psc@11500; > >That's an odd way to fix this, and means every user of the .dtsi file >with these nodes will have to repeat the same thing. okay, in v2 patch I've extracted the psc nodes to files which can be included and extended individually. Anatolij
[PATCH v2] powerpc/mpc512x: dts: fix PSC node warnings
Rework PSC node description to fix build warnings like: mpc5121.dtsi:397.13-406.5: Warning (spi_bus_bridge): /soc@8000/psc@11400: node name for SPI buses should be 'spi' mpc5121.dtsi:409.13-418.5: Warning (spi_bus_bridge): /soc@8000/psc@11500: node name for SPI buses should be 'spi' mpc5121.dtsi:457.13-466.5: Warning (spi_bus_bridge): /soc@8000/psc@11900: node name for SPI buses should be 'spi' Signed-off-by: Anatolij Gustschin --- Changes in v2: - extract PSC nodes to files which can be included separately and extended as needed arch/powerpc/boot/dts/ac14xx.dts| 118 arch/powerpc/boot/dts/mpc5121-psc0.dtsi | 16 +++ arch/powerpc/boot/dts/mpc5121-psc1.dtsi | 15 ++ arch/powerpc/boot/dts/mpc5121-psc10.dtsi| 15 ++ arch/powerpc/boot/dts/mpc5121-psc11.dtsi| 15 ++ arch/powerpc/boot/dts/mpc5121-psc2.dtsi | 15 ++ arch/powerpc/boot/dts/mpc5121-psc3.dtsi | 15 ++ arch/powerpc/boot/dts/mpc5121-psc4-spi.dtsi | 17 +++ arch/powerpc/boot/dts/mpc5121-psc4.dtsi | 15 ++ arch/powerpc/boot/dts/mpc5121-psc5-spi.dtsi | 17 +++ arch/powerpc/boot/dts/mpc5121-psc5.dtsi | 15 ++ arch/powerpc/boot/dts/mpc5121-psc6.dtsi | 15 ++ arch/powerpc/boot/dts/mpc5121-psc7.dtsi | 15 ++ arch/powerpc/boot/dts/mpc5121-psc8.dtsi | 15 ++ arch/powerpc/boot/dts/mpc5121-psc9-spi.dtsi | 17 +++ arch/powerpc/boot/dts/mpc5121-psc9.dtsi | 15 ++ arch/powerpc/boot/dts/mpc5121.dtsi | 148 +--- arch/powerpc/boot/dts/mpc5121ads.dts| 42 +++--- arch/powerpc/boot/dts/pdm360ng.dts | 104 +++--- 19 files changed, 371 insertions(+), 273 deletions(-) create mode 100644 arch/powerpc/boot/dts/mpc5121-psc0.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc1.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc10.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc11.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc2.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc3.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc4-spi.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc4.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc5-spi.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc5.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc6.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc7.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc8.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc9-spi.dtsi create mode 100644 arch/powerpc/boot/dts/mpc5121-psc9.dtsi diff --git a/arch/powerpc/boot/dts/ac14xx.dts b/arch/powerpc/boot/dts/ac14xx.dts index 5d8877e1f4ad..0af3b0ab7550 100644 --- a/arch/powerpc/boot/dts/ac14xx.dts +++ b/arch/powerpc/boot/dts/ac14xx.dts @@ -15,8 +15,8 @@ #size-cells = <1>; aliases { - serial0 = - serial1 = + serial0 = + serial1 = spi4 = spi5 = }; @@ -294,62 +294,6 @@ status = "disabled"; }; - /* PSC3 serial port A, aka ttyPSC0 */ - serial0: psc@11300 { - compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc"; - fsl,rx-fifo-size = <512>; - fsl,tx-fifo-size = <512>; - }; - - /* PSC4 in SPI mode */ - spi4: psc@11400 { - compatible = "fsl,mpc5121-psc-spi", "fsl,mpc5121-psc"; - fsl,rx-fifo-size = <768>; - fsl,tx-fifo-size = <768>; - #address-cells = <1>; - #size-cells = <0>; - num-cs = <1>; - cs-gpios = <_pic 25 0>; - - flash: m25p128@0 { - compatible = "st,m25p128"; - spi-max-frequency = <2000>; - reg = <0>; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "spi-flash0"; - reg = <0x 0x0100>; - }; - }; - }; - - /* PSC5 in SPI mode */ - spi5: psc@11500 { - compatible = "fsl,mpc5121-psc-spi", "fsl,mpc5121-psc"; - fsl,mode = "spi-master"; - fsl,rx-fifo-size = <128>; - fsl,tx-fifo-size = <128>; - #address-cells = <1>; -
Re: [RFC PATCH] powerpc: dts: Remove MPC5xxx platforms
On Wed, 13 Oct 2021 17:38:08 +1100 Stephen Rothwell s...@canb.auug.org.au wrote: >Hi Rob, > >On Tue, 12 Oct 2021 10:34:56 -0500 Rob Herring wrote: >> >> The mpc5xxx platforms have had dts warnings for some time which no one >> seems to care to fix, so let's just remove the dts files. >> >> According to Arnd: >> "Specifically, MPC5200B has a 15 year lifetime, which ends in >> 11 months from now. The original bplan/Genesi Efika 5K2 was >> quite popular at the time it came out, and there are probably >> still some of those hanging around, but they came with Open >> Firmware rather than relying on the dts files that ship with the >> kernel. >> >> Grant Likely was the original maintainer for MPC52xx until 2011, >> Anatolij Gustschin is still listed as maintainer since then but hasn't >> been active in it for a while either. Anatolij can probably best judge >> which of these boards are still in going to be used with future kernels, >> but I suspect once you start removing bits from 52xx, the newer >> but less common 512x platform can go away as well." >> >> Cc: Anatolij Gustschin >> Cc: Arnd Bergmann >> Cc: Stephen Rothwell >> Cc: Michael Ellerman >> Cc: Benjamin Herrenschmidt >> Cc: Paul Mackerras >> Cc: linuxppc-dev@lists.ozlabs.org >> Signed-off-by: Rob Herring >> --- >> Sending this out as a feeler to see if anyone cares. If anyone does, >> please fix the warnings. I've sent patches to fix the warnings. Thanks, Anatolij
Re: linux-next: build warnings in Linus' tree
On Thu, 14 Oct 2021 10:44:46 +0200 Arnd Bergmann a...@arndb.de wrote: >On Thu, Oct 14, 2021 at 12:12 AM Anatolij Gustschin wrote: >> On Tue, 12 Oct 2021 16:39:56 +0200 >> Arnd Bergmann a...@arndb.de wrote: >> ... >> >Grant Likely was the original maintainer for MPC52xx until 2011, >> >Anatolij Gustschin is still listed as maintainer since then but hasn't >> >been active in it for a while either. Anatolij can probably best judge >> >which of these boards are still in going to be used with future kernels, >> >but I suspect once you start removing bits from 52xx, the newer >> >but less common 512x platform can go away as well. >> >> many of these boards are still used, i.e. o2d*, digsy_mtc, tqm5200. > >Just for clarification, I assume when you say "still used" that implies >getting updated to new kernels rather than just running the old BSPs, >right? yes, at least some of them. I used v5.4 kernel on digsy_mtc and tqm5200 last year, and v5.10 kernel is also known to work. >What are the typical distro release cycles for those machines >you list: do you move from one LTS kernel to the next each year, >or are they getting more sporadic over time? these machines are in embedded systems and do not get regular distro updates, therefore more sporadic over time. >Do you expect the machines with the lowest memory such as the >32MB digsy to stop getting kernel updates before the others? No. There are also digsy variants with 256MiB DRAM. Thanks, Anatolij
[PATCH] powerpc/mpc512x: dts: fix PSC node warnings
Fix build warnings like: mpc5121.dtsi:397.13-406.5: Warning (spi_bus_bridge): /soc@8000/psc@11400: node name for SPI buses should be 'spi' mpc5121.dtsi:409.13-418.5: Warning (spi_bus_bridge): /soc@8000/psc@11500: node name for SPI buses should be 'spi' mpc5121.dtsi:457.13-466.5: Warning (spi_bus_bridge): /soc@8000/psc@11900: node name for SPI buses should be 'spi' Signed-off-by: Anatolij Gustschin --- arch/powerpc/boot/dts/ac14xx.dts | 17 +++-- arch/powerpc/boot/dts/pdm360ng.dts | 11 ++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/boot/dts/ac14xx.dts b/arch/powerpc/boot/dts/ac14xx.dts index 5d8877e1f4ad..662d7aa2e4e8 100644 --- a/arch/powerpc/boot/dts/ac14xx.dts +++ b/arch/powerpc/boot/dts/ac14xx.dts @@ -301,13 +301,21 @@ fsl,tx-fifo-size = <512>; }; + /delete-node/ psc@11400; + /delete-node/ psc@11500; + /* PSC4 in SPI mode */ - spi4: psc@11400 { + spi4: spi@11400 { compatible = "fsl,mpc5121-psc-spi", "fsl,mpc5121-psc"; + reg = <0x11400 0x100>; fsl,rx-fifo-size = <768>; fsl,tx-fifo-size = <768>; #address-cells = <1>; #size-cells = <0>; + interrupts = <40 0x8>; + clocks = < MPC512x_CLK_PSC4>, +< MPC512x_CLK_PSC4_MCLK>; + clock-names = "ipg", "mclk"; num-cs = <1>; cs-gpios = <_pic 25 0>; @@ -326,13 +334,18 @@ }; /* PSC5 in SPI mode */ - spi5: psc@11500 { + spi5: spi@11500 { compatible = "fsl,mpc5121-psc-spi", "fsl,mpc5121-psc"; + reg = <0x11500 0x100>; fsl,mode = "spi-master"; fsl,rx-fifo-size = <128>; fsl,tx-fifo-size = <128>; #address-cells = <1>; #size-cells = <0>; + interrupts = <40 0x8>; + clocks = < MPC512x_CLK_PSC5>, +< MPC512x_CLK_PSC5_MCLK>; + clock-names = "ipg", "mclk"; lcd@0 { compatible = "ilitek,ili922x"; diff --git a/arch/powerpc/boot/dts/pdm360ng.dts b/arch/powerpc/boot/dts/pdm360ng.dts index 67c3b9db75d7..2733d15079a9 100644 --- a/arch/powerpc/boot/dts/pdm360ng.dts +++ b/arch/powerpc/boot/dts/pdm360ng.dts @@ -169,10 +169,19 @@ compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc"; }; - psc@11900 { + /delete-node/ psc@11900; + + spi@11900 { compatible = "fsl,mpc5121-psc-spi", "fsl,mpc5121-psc"; + reg = <0x11900 0x100>; #address-cells = <1>; #size-cells = <0>; + interrupts = <40 0x8>; + fsl,rx-fifo-size = <16>; + fsl,tx-fifo-size = <16>; + clocks = < MPC512x_CLK_PSC9>, +< MPC512x_CLK_PSC9_MCLK>; + clock-names = "ipg", "mclk"; /* ADS7845 touch screen controller */ ts@0 { -- 2.17.1
[PATCH] dmaengine: bestcomm: fix system boot lockups
memset() and memcpy() on an MMIO region like here results in a lockup at startup on mpc5200 platform (since this first happens during probing of the ATA and Ethernet drivers). Use memset_io() and memcpy_toio() instead. Fixes: 2f9ea1bde0d1 ("bestcomm: core bestcomm support for Freescale MPC5200") Cc: sta...@vger.kernel.org # v5.14+ Signed-off-by: Anatolij Gustschin --- drivers/dma/bestcomm/ata.c | 2 +- drivers/dma/bestcomm/bestcomm.c | 22 +++--- drivers/dma/bestcomm/fec.c | 4 ++-- drivers/dma/bestcomm/gen_bd.c | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/dma/bestcomm/ata.c b/drivers/dma/bestcomm/ata.c index 2fd87f83cf90..e169f18da551 100644 --- a/drivers/dma/bestcomm/ata.c +++ b/drivers/dma/bestcomm/ata.c @@ -133,7 +133,7 @@ void bcom_ata_reset_bd(struct bcom_task *tsk) struct bcom_ata_var *var; /* Reset all BD */ - memset(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); + memset_io(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); tsk->index = 0; tsk->outdex = 0; diff --git a/drivers/dma/bestcomm/bestcomm.c b/drivers/dma/bestcomm/bestcomm.c index d91cbbe7a48f..8c42e5ca00a9 100644 --- a/drivers/dma/bestcomm/bestcomm.c +++ b/drivers/dma/bestcomm/bestcomm.c @@ -95,7 +95,7 @@ bcom_task_alloc(int bd_count, int bd_size, int priv_size) tsk->bd = bcom_sram_alloc(bd_count * bd_size, 4, >bd_pa); if (!tsk->bd) goto error; - memset(tsk->bd, 0x00, bd_count * bd_size); + memset_io(tsk->bd, 0x00, bd_count * bd_size); tsk->num_bd = bd_count; tsk->bd_size = bd_size; @@ -186,16 +186,16 @@ bcom_load_image(int task, u32 *task_image) inc = bcom_task_inc(task); /* Clear & copy */ - memset(var, 0x00, BCOM_VAR_SIZE); - memset(inc, 0x00, BCOM_INC_SIZE); + memset_io(var, 0x00, BCOM_VAR_SIZE); + memset_io(inc, 0x00, BCOM_INC_SIZE); desc_src = (u32 *)(hdr + 1); var_src = desc_src + hdr->desc_size; inc_src = var_src + hdr->var_size; - memcpy(desc, desc_src, hdr->desc_size * sizeof(u32)); - memcpy(var + hdr->first_var, var_src, hdr->var_size * sizeof(u32)); - memcpy(inc, inc_src, hdr->inc_size * sizeof(u32)); + memcpy_toio(desc, desc_src, hdr->desc_size * sizeof(u32)); + memcpy_toio(var + hdr->first_var, var_src, hdr->var_size * sizeof(u32)); + memcpy_toio(inc, inc_src, hdr->inc_size * sizeof(u32)); return 0; } @@ -302,13 +302,13 @@ static int bcom_engine_init(void) return -ENOMEM; } - memset(bcom_eng->tdt, 0x00, tdt_size); - memset(bcom_eng->ctx, 0x00, ctx_size); - memset(bcom_eng->var, 0x00, var_size); - memset(bcom_eng->fdt, 0x00, fdt_size); + memset_io(bcom_eng->tdt, 0x00, tdt_size); + memset_io(bcom_eng->ctx, 0x00, ctx_size); + memset_io(bcom_eng->var, 0x00, var_size); + memset_io(bcom_eng->fdt, 0x00, fdt_size); /* Copy the FDT for the EU#3 */ - memcpy(_eng->fdt[48], fdt_ops, sizeof(fdt_ops)); + memcpy_toio(_eng->fdt[48], fdt_ops, sizeof(fdt_ops)); /* Initialize Task base structure */ for (task=0; taskindex = 0; tsk->outdex = 0; - memset(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); + memset_io(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); /* Configure some stuff */ bcom_set_task_pragma(tsk->tasknum, BCOM_FEC_RX_BD_PRAGMA); @@ -241,7 +241,7 @@ bcom_fec_tx_reset(struct bcom_task *tsk) tsk->index = 0; tsk->outdex = 0; - memset(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); + memset_io(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); /* Configure some stuff */ bcom_set_task_pragma(tsk->tasknum, BCOM_FEC_TX_BD_PRAGMA); diff --git a/drivers/dma/bestcomm/gen_bd.c b/drivers/dma/bestcomm/gen_bd.c index 906ddba6a6f5..8a24a5cbc263 100644 --- a/drivers/dma/bestcomm/gen_bd.c +++ b/drivers/dma/bestcomm/gen_bd.c @@ -142,7 +142,7 @@ bcom_gen_bd_rx_reset(struct bcom_task *tsk) tsk->index = 0; tsk->outdex = 0; - memset(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); + memset_io(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); /* Configure some stuff */ bcom_set_task_pragma(tsk->tasknum, BCOM_GEN_RX_BD_PRAGMA); @@ -226,7 +226,7 @@ bcom_gen_bd_tx_reset(struct bcom_task *tsk) tsk->index = 0; tsk->outdex = 0; - memset(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); + memset_io(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); /* Configure some stuff */ bcom_set_task_pragma(tsk->tasknum, BCOM_GEN_TX_BD_PRAGMA); -- 2.17.1
[PATCH] powerpc/5200: dts: fix psc node warning
Fix build warning: Warning (spi_bus_bridge): /soc5200@f000/psc@2000: node name for SPI buses should be 'spi' Signed-off-by: Anatolij Gustschin --- arch/powerpc/boot/dts/motionpro.dts | 4 arch/powerpc/boot/dts/o2d.dtsi | 6 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts index 09f0eaa4ad49..cc217ddd50a0 100644 --- a/arch/powerpc/boot/dts/motionpro.dts +++ b/arch/powerpc/boot/dts/motionpro.dts @@ -19,6 +19,8 @@ label = "motionpro-readyled"; }; +/delete-node/ + / { model = "promess,motionpro"; compatible = "promess,motionpro"; @@ -35,6 +37,8 @@ // PSC2 in spi master mode psc@2200 { // PSC2 compatible = "fsl,mpc5200b-psc-spi","fsl,mpc5200-psc-spi"; + reg = <0x2200 0x100>; + interrupts = <2 2 0>; cell-index = <1>; }; diff --git a/arch/powerpc/boot/dts/o2d.dtsi b/arch/powerpc/boot/dts/o2d.dtsi index 898fe08a9fd0..34a836a37084 100644 --- a/arch/powerpc/boot/dts/o2d.dtsi +++ b/arch/powerpc/boot/dts/o2d.dtsi @@ -15,6 +15,8 @@ }; { gpio-controller; }; +/delete-node/ + / { model = "ifm,o2d"; compatible = "ifm,o2d"; @@ -29,8 +31,10 @@ status = "disabled"; }; - psc@2000 { // PSC1 + spi@2000 { // PSC1 compatible = "fsl,mpc5200b-psc-spi","fsl,mpc5200-psc-spi"; + reg = <0x2000 0x100>; + interrupts = <2 1 0>; #address-cells = <1>; #size-cells = <0>; cell-index = <0>; -- 2.17.1
Re: linux-next: build warnings in Linus' tree
On Wed, 13 Oct 2021 17:17:25 -0500 Rob Herring robh...@kernel.org wrote: ... >In general, you shouldn't need to be changing the drivers. Can you >tell me which warnings need driver changes? ethernet and mdio drivers share registers, so they use same unit-address: arch/powerpc/boot/dts/tqm5200.dts:127.17-133.5: Warning (unique_unit_address): /soc5200@f000/ethernet@3000: duplicate unit-address (also used in node /soc5200@f000/mdio@3000) arch/powerpc/boot/dts/mpc5200b.dtsi:218.23-223.5: Warning (unique_unit_address): /soc5200@f000/ethernet@3000: duplicate unit-address (also used in node /soc5200@f000/mdio@3000) also defined at arch/powerpc/boot/dts/digsy_mtc.dts:60.17-62.5 Anatolij
Re: linux-next: build warnings in Linus' tree
Hi Arnd, Rob, On Tue, 12 Oct 2021 16:39:56 +0200 Arnd Bergmann a...@arndb.de wrote: ... >Grant Likely was the original maintainer for MPC52xx until 2011, >Anatolij Gustschin is still listed as maintainer since then but hasn't >been active in it for a while either. Anatolij can probably best judge >which of these boards are still in going to be used with future kernels, >but I suspect once you start removing bits from 52xx, the newer >but less common 512x platform can go away as well. many of these boards are still used, i.e. o2d*, digsy_mtc, tqm5200. I've sent first series to fix some warnings. Other dts fixes require driver changes, so it will take some time to fix them. Anatolij
[PATCH 1/4] powerpc/5200: dts: add missing pci ranges
Add ranges property to fix build warnings: Warning (pci_bridge): /pci@fd00: missing ranges for PCI bridge (or not a bridge) Signed-off-by: Anatolij Gustschin --- arch/powerpc/boot/dts/mpc5200b.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/boot/dts/mpc5200b.dtsi b/arch/powerpc/boot/dts/mpc5200b.dtsi index 648fe31795f4..8c645d2bc455 100644 --- a/arch/powerpc/boot/dts/mpc5200b.dtsi +++ b/arch/powerpc/boot/dts/mpc5200b.dtsi @@ -276,7 +276,9 @@ clock-frequency = <0>; // From boot loader interrupts = <2 8 0 2 9 0 2 10 0>; bus-range = <0 0>; - // ranges = need to add + ranges = <0x4200 0 0x8000 0x8000 0 0x1000>, +<0x0200 0 0x9000 0x9000 0 0x1000>, +<0x0100 0 0x 0xa000 0 0x0100>; }; localbus: localbus { -- 2.17.1
[PATCH 4/4] powerpc/5200: dts: fix localbus node warnings
Fix build warnings like: localbus:ranges: 'oneOf' conditional failed, one must be fixed ... Warning (unit_address_vs_reg): /localbus: node has a reg or ranges property, but no unit name Warning (simple_bus_reg): /localbus/flash@0,0: simple-bus unit address format error, expected "0" Signed-off-by: Anatolij Gustschin --- arch/powerpc/boot/dts/a3m071.dts| 12 +- arch/powerpc/boot/dts/a4m072.dts| 20 - arch/powerpc/boot/dts/charon.dts| 14 ++-- arch/powerpc/boot/dts/cm5200.dts| 7 -- arch/powerpc/boot/dts/digsy_mtc.dts | 16 -- arch/powerpc/boot/dts/lite5200.dts | 4 ++-- arch/powerpc/boot/dts/lite5200b.dts | 6 +++-- arch/powerpc/boot/dts/media5200.dts | 20 + arch/powerpc/boot/dts/motionpro.dts | 32 +++ arch/powerpc/boot/dts/mpc5200b.dtsi | 2 +- arch/powerpc/boot/dts/mucmc52.dts | 34 +++-- arch/powerpc/boot/dts/o2d.dts | 10 + arch/powerpc/boot/dts/o2d.dtsi | 12 +- arch/powerpc/boot/dts/o2d300.dts| 10 + arch/powerpc/boot/dts/o2dnt2.dts| 10 + arch/powerpc/boot/dts/o2i.dts | 4 ++-- arch/powerpc/boot/dts/o2mnt.dts | 4 ++-- arch/powerpc/boot/dts/o3dnt.dts | 10 + arch/powerpc/boot/dts/pcm030.dts| 2 +- arch/powerpc/boot/dts/pcm032.dts| 26 -- arch/powerpc/boot/dts/tqm5200.dts | 4 ++-- arch/powerpc/boot/dts/uc101.dts | 14 +++- 22 files changed, 151 insertions(+), 122 deletions(-) diff --git a/arch/powerpc/boot/dts/a3m071.dts b/arch/powerpc/boot/dts/a3m071.dts index 034cfd8aa95b..14e59aaa0ba7 100644 --- a/arch/powerpc/boot/dts/a3m071.dts +++ b/arch/powerpc/boot/dts/a3m071.dts @@ -87,15 +87,15 @@ }; }; - localbus { + localbus@8000 { compatible = "fsl,mpc5200b-lpb","simple-bus"; #address-cells = <2>; #size-cells = <1>; - ranges = <0 0 0xfc00 0x0200 - 3 0 0xe900 0x0008 - 5 0 0xe800 0x0001>; + ranges = <0 0 0xfc00 0x0200>, +<3 0 0xe900 0x0008>, +<5 0 0xe800 0x0001>; - flash@0,0 { + flash@0 { #address-cells = <1>; #size-cells = <1>; reg = <0 0x0 0x0200>; @@ -124,7 +124,7 @@ }; }; - fpga@3,0 { + fpga@3 { compatible = "anonymous,a3m071-fpga"; reg = <3 0x0 0x0008 5 0x0 0x0001>; diff --git a/arch/powerpc/boot/dts/a4m072.dts b/arch/powerpc/boot/dts/a4m072.dts index d4270a2ec6c7..dede711957da 100644 --- a/arch/powerpc/boot/dts/a4m072.dts +++ b/arch/powerpc/boot/dts/a4m072.dts @@ -98,25 +98,25 @@ }; }; - localbus { + localbus@8000 { compatible = "fsl,mpc5200b-lpb","simple-bus"; #address-cells = <2>; #size-cells = <1>; - ranges = <0 0 0xfe00 0x0200 - 1 0 0x6200 0x0040 - 2 0 0x6400 0x0020 - 3 0 0x6600 0x0100 - 6 0 0x6800 0x0100 - 7 0 0x6a00 0x0004>; - - flash@0,0 { + ranges = <0 0 0xfe00 0x0200>, +<1 0 0x6200 0x0040>, +<2 0 0x6400 0x0020>, +<3 0 0x6600 0x0100>, +<6 0 0x6800 0x0100>, +<7 0 0x6a00 0x0004>; + + flash@0 { compatible = "cfi-flash"; reg = <0 0 0x0200>; bank-width = <2>; #size-cells = <1>; #address-cells = <1>; }; - sram0@1,0 { + sram0@1 { compatible = "mtd-ram"; reg = <1 0x0 0x0040>; bank-width = <2>; diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts index ea6e76ae2545..2e3518909321 100644 --- a/arch/powerpc/boot/dts/charon.dts +++ b/arch/powerpc/boot/dts/charon.dts @@ -177,15 +177,15 @@ }; }; - localbus { + localbus@8000 { compatible = "fsl,mpc5200-lpb","simple-bus&q
[PATCH 3/4] powerpc/5200: dts: fix memory node unit name
Fixes build warnings: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Signed-off-by: Anatolij Gustschin --- arch/powerpc/boot/dts/charon.dts| 2 +- arch/powerpc/boot/dts/digsy_mtc.dts | 2 +- arch/powerpc/boot/dts/lite5200.dts | 2 +- arch/powerpc/boot/dts/lite5200b.dts | 2 +- arch/powerpc/boot/dts/media5200.dts | 2 +- arch/powerpc/boot/dts/mpc5200b.dtsi | 2 +- arch/powerpc/boot/dts/o2d.dts | 2 +- arch/powerpc/boot/dts/o2d.dtsi | 2 +- arch/powerpc/boot/dts/o2dnt2.dts| 2 +- arch/powerpc/boot/dts/o3dnt.dts | 2 +- arch/powerpc/boot/dts/pcm032.dts| 2 +- arch/powerpc/boot/dts/tqm5200.dts | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts index 6f9fe88a5f36..ea6e76ae2545 100644 --- a/arch/powerpc/boot/dts/charon.dts +++ b/arch/powerpc/boot/dts/charon.dts @@ -35,7 +35,7 @@ }; }; - memory { + memory@0 { device_type = "memory"; reg = <0x 0x0800>; // 128MB }; diff --git a/arch/powerpc/boot/dts/digsy_mtc.dts b/arch/powerpc/boot/dts/digsy_mtc.dts index 010156649bfe..57024a4c1e7d 100644 --- a/arch/powerpc/boot/dts/digsy_mtc.dts +++ b/arch/powerpc/boot/dts/digsy_mtc.dts @@ -16,7 +16,7 @@ model = "intercontrol,digsy-mtc"; compatible = "intercontrol,digsy-mtc"; - memory { + memory@0 { reg = <0x 0x0200>; // 32MB }; diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts index 84a12e7915e9..b9d8487813b4 100644 --- a/arch/powerpc/boot/dts/lite5200.dts +++ b/arch/powerpc/boot/dts/lite5200.dts @@ -32,7 +32,7 @@ }; }; - memory { + memory@0 { device_type = "memory"; reg = <0x 0x0400>; // 64MB }; diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts index c361c59a9681..7e2d91c7cb66 100644 --- a/arch/powerpc/boot/dts/lite5200b.dts +++ b/arch/powerpc/boot/dts/lite5200b.dts @@ -31,7 +31,7 @@ led4 { gpios = <_simple 2 1>; }; }; - memory { + memory@0 { reg = <0x 0x1000>; // 256MB }; diff --git a/arch/powerpc/boot/dts/media5200.dts b/arch/powerpc/boot/dts/media5200.dts index f7d7538eb69d..96524ede16cd 100644 --- a/arch/powerpc/boot/dts/media5200.dts +++ b/arch/powerpc/boot/dts/media5200.dts @@ -32,7 +32,7 @@ }; }; - memory { + memory@0 { reg = <0x 0x0800>; // 128MB RAM }; diff --git a/arch/powerpc/boot/dts/mpc5200b.dtsi b/arch/powerpc/boot/dts/mpc5200b.dtsi index 8c645d2bc455..ffa82c7e1055 100644 --- a/arch/powerpc/boot/dts/mpc5200b.dtsi +++ b/arch/powerpc/boot/dts/mpc5200b.dtsi @@ -33,7 +33,7 @@ }; }; - memory: memory { + memory: memory@0 { device_type = "memory"; reg = <0x 0x0400>; // 64MB }; diff --git a/arch/powerpc/boot/dts/o2d.dts b/arch/powerpc/boot/dts/o2d.dts index 24a46f65e529..e0a8d3034417 100644 --- a/arch/powerpc/boot/dts/o2d.dts +++ b/arch/powerpc/boot/dts/o2d.dts @@ -12,7 +12,7 @@ model = "ifm,o2d"; compatible = "ifm,o2d"; - memory { + memory@0 { reg = <0x 0x0800>; // 128MB }; diff --git a/arch/powerpc/boot/dts/o2d.dtsi b/arch/powerpc/boot/dts/o2d.dtsi index 6661955a2be4..b55a9e5bd828 100644 --- a/arch/powerpc/boot/dts/o2d.dtsi +++ b/arch/powerpc/boot/dts/o2d.dtsi @@ -19,7 +19,7 @@ model = "ifm,o2d"; compatible = "ifm,o2d"; - memory { + memory@0 { reg = <0x 0x0400>; // 64MB }; diff --git a/arch/powerpc/boot/dts/o2dnt2.dts b/arch/powerpc/boot/dts/o2dnt2.dts index eeba7f5507d5..c2eedbd1f5fc 100644 --- a/arch/powerpc/boot/dts/o2dnt2.dts +++ b/arch/powerpc/boot/dts/o2dnt2.dts @@ -12,7 +12,7 @@ model = "ifm,o2dnt2"; compatible = "ifm,o2d"; - memory { + memory@0 { reg = <0x 0x0800>; // 128MB }; diff --git a/arch/powerpc/boot/dts/o3dnt.dts b/arch/powerpc/boot/dts/o3dnt.dts index fd00396b0593..e4c1bdd41271 100644 --- a/arch/powerpc/boot/dts/o3dnt.dts +++ b/arch/powerpc/boot/dts/o3dnt.dts @@ -12,7 +12,7 @@ model = "ifm,o3dnt"; compatible = "ifm,o2d"; - memory { + memory@0 { reg = <0x 0x0400>; // 64MB }; diff --git a/arch/powerpc/boot/dts/pcm032.dts b/arch/powerpc/boot/dts/pcm032.dts index b6fdf861c7d6..d00f13b62510 100644 --- a/
[PATCH 0/4] Update mpc5200 dts files to fix warnings
This series fixes localbus, memory and pci node build warnings. It was tested with current linux-next on digsy_mtc and tqm5200 boards. Anatolij Gustschin (4): powerpc/5200: dts: add missing pci ranges powerpc/5200: dts: fix pci ranges warnings powerpc/5200: dts: fix memory node unit name powerpc/5200: dts: fix localbus node warnings arch/powerpc/boot/dts/a3m071.dts| 12 - arch/powerpc/boot/dts/a4m072.dts| 26 ++-- arch/powerpc/boot/dts/charon.dts| 22 - arch/powerpc/boot/dts/cm5200.dts| 7 -- arch/powerpc/boot/dts/digsy_mtc.dts | 24 +- arch/powerpc/boot/dts/lite5200.dts | 12 - arch/powerpc/boot/dts/lite5200b.dts | 14 ++- arch/powerpc/boot/dts/media5200.dts | 28 +++-- arch/powerpc/boot/dts/motionpro.dts | 32 +--- arch/powerpc/boot/dts/mpc5200b.dtsi | 8 +++--- arch/powerpc/boot/dts/mucmc52.dts | 38 +++-- arch/powerpc/boot/dts/o2d.dts | 12 + arch/powerpc/boot/dts/o2d.dtsi | 14 ++- arch/powerpc/boot/dts/o2d300.dts| 10 +--- arch/powerpc/boot/dts/o2dnt2.dts| 12 + arch/powerpc/boot/dts/o2i.dts | 4 +-- arch/powerpc/boot/dts/o2mnt.dts | 4 +-- arch/powerpc/boot/dts/o3dnt.dts | 12 + arch/powerpc/boot/dts/pcm030.dts| 8 +++--- arch/powerpc/boot/dts/pcm032.dts| 34 ++ arch/powerpc/boot/dts/tqm5200.dts | 12 - arch/powerpc/boot/dts/uc101.dts | 14 ++- 22 files changed, 195 insertions(+), 164 deletions(-) -- 2.17.1
[PATCH 2/4] powerpc/5200: dts: fix pci ranges warnings
Fix ranges property warnings: pci@fd00:ranges: 'oneOf' conditional failed, one must be fixed: Signed-off-by: Anatolij Gustschin --- arch/powerpc/boot/dts/a4m072.dts| 6 +++--- arch/powerpc/boot/dts/charon.dts| 6 +++--- arch/powerpc/boot/dts/digsy_mtc.dts | 6 +++--- arch/powerpc/boot/dts/lite5200.dts | 6 +++--- arch/powerpc/boot/dts/lite5200b.dts | 6 +++--- arch/powerpc/boot/dts/media5200.dts | 6 +++--- arch/powerpc/boot/dts/mucmc52.dts | 6 +++--- arch/powerpc/boot/dts/pcm030.dts| 6 +++--- arch/powerpc/boot/dts/pcm032.dts| 6 +++--- arch/powerpc/boot/dts/tqm5200.dts | 6 +++--- 10 files changed, 30 insertions(+), 30 deletions(-) diff --git a/arch/powerpc/boot/dts/a4m072.dts b/arch/powerpc/boot/dts/a4m072.dts index a9cef5726422..d4270a2ec6c7 100644 --- a/arch/powerpc/boot/dts/a4m072.dts +++ b/arch/powerpc/boot/dts/a4m072.dts @@ -140,8 +140,8 @@ clock-frequency = <0>; /* From boot loader */ interrupts = <2 8 0 2 9 0 2 10 0>; bus-range = <0 0>; - ranges = <0x4200 0 0x8000 0x8000 0 0x1000 - 0x0200 0 0x9000 0x9000 0 0x1000 - 0x0100 0 0x 0xa000 0 0x0100>; + ranges = <0x4200 0 0x8000 0x8000 0 0x1000>, +<0x0200 0 0x9000 0x9000 0 0x1000>, +<0x0100 0 0x 0xa000 0 0x0100>; }; }; diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts index 408b486b13df..6f9fe88a5f36 100644 --- a/arch/powerpc/boot/dts/charon.dts +++ b/arch/powerpc/boot/dts/charon.dts @@ -225,8 +225,8 @@ clock-frequency = <0>; // From boot loader interrupts = <2 8 0 2 9 0 2 10 0>; bus-range = <0 0>; - ranges = <0x4200 0 0x8000 0x8000 0 0x1000 - 0x0200 0 0x9000 0x9000 0 0x1000 - 0x0100 0 0x 0xa000 0 0x0100>; + ranges = <0x4200 0 0x8000 0x8000 0 0x1000>, +<0x0200 0 0x9000 0x9000 0 0x1000>, +<0x0100 0 0x 0xa000 0 0x0100>; }; }; diff --git a/arch/powerpc/boot/dts/digsy_mtc.dts b/arch/powerpc/boot/dts/digsy_mtc.dts index 0e5e9d3acf79..010156649bfe 100644 --- a/arch/powerpc/boot/dts/digsy_mtc.dts +++ b/arch/powerpc/boot/dts/digsy_mtc.dts @@ -98,9 +98,9 @@ clock-frequency = <0>; // From boot loader interrupts = <2 8 0 2 9 0 2 10 0>; bus-range = <0 0>; - ranges = <0x4200 0 0x8000 0x8000 0 0x1000 - 0x0200 0 0x9000 0x9000 0 0x1000 - 0x0100 0 0x 0xa000 0 0x0100>; + ranges = <0x4200 0 0x8000 0x8000 0 0x1000>, +<0x0200 0 0x9000 0x9000 0 0x1000>, +<0x0100 0 0x 0xa000 0 0x0100>; }; localbus { diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts index cb2782dd6132..84a12e7915e9 100644 --- a/arch/powerpc/boot/dts/lite5200.dts +++ b/arch/powerpc/boot/dts/lite5200.dts @@ -283,9 +283,9 @@ clock-frequency = <0>; // From boot loader interrupts = <2 8 0 2 9 0 2 10 0>; bus-range = <0 0>; - ranges = <0x4200 0 0x8000 0x8000 0 0x2000 - 0x0200 0 0xa000 0xa000 0 0x1000 - 0x0100 0 0x 0xb000 0 0x0100>; + ranges = <0x4200 0 0x8000 0x8000 0 0x2000>, +<0x0200 0 0xa000 0xa000 0 0x1000>, +<0x0100 0 0x 0xb000 0 0x0100>; }; localbus { diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts index 2b86c81f9048..c361c59a9681 100644 --- a/arch/powerpc/boot/dts/lite5200b.dts +++ b/arch/powerpc/boot/dts/lite5200b.dts @@ -116,9 +116,9 @@ clock-frequency = <0>; // From boot loader interrupts = <2 8 0 2 9 0 2 10 0>; bus-range = <0 0>; - ranges = <0x4200 0 0x8000 0x8000 0 0x2000 - 0x0200 0 0xa000 0xa000 0 0x1000 - 0x0100 0 0x 0xb000 0 0x0100>; + ranges = <0x4200 0 0x8000 0x8000 0 0x2000>, +<0x0200 0 0xa000 0xa000 0 0x1
Re: [PATCH 6/8] powerpc: Update MPC5XXX MAINTAINERS entry
On Tue, 25 Feb 2020 10:31:44 +1100 Michael Ellerman m...@ellerman.id.au wrote: >It's several years since the last commit from Anatolij, so mark >MPC5XXX as "Odd Fixes" rather than "Maintained". > >Also the git link no longer works so remove it. > >Cc: Anatolij Gustschin >Signed-off-by: Michael Ellerman Acked-by: Anatolij Gustschin
Re: [PATCH 3/3] powerpc/5200: dts: digsy_mtc.dts: fix rv3029 compatible
On Fri, 15 Sep 2017 04:00:04 +0200 Alexandre Belloni alexandre.bell...@free-electrons.com wrote: >The proper compatible for rv3029 is microcrystal,rv3029. > >Signed-off-by: Alexandre Belloni <alexandre.bell...@free-electrons.com> Acked-by: Anatolij Gustschin <ag...@denx.de>
Re: [PATCH] powerpc: dts: use #include "..." to include local DT
Hi, On Wed, 24 May 2017 14:12:24 +0900 Masahiro Yamada yamada.masah...@socionext.com wrote: >Most of DT files in PowerPC use #include "..." to make pre-processor >include DT in the same directory, but we have 3 exceptional files >that use #include <...> for that. > >Fix them to remove -I$(srctree)/arch/$(SRCARCH)/boot/dts path from >dtc_cpp_flags. > >Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Tested-by: Anatolij Gustschin <ag...@denx.de>
Re: [PATCH] powerpc: dts: use #include "..." to include local DT
On Tue, 13 Jun 2017 20:21:45 +1000 Michael Ellerman m...@ellerman.id.au wrote: >Masahiro Yamadawrites: ... >> Ping. >> I am not 100% sure who is responsible for this, >> but somebody, could take a look at this patch, please? > >Have you tested it actually works? > >It sounds reasonable, and if it behaves as you describe there is no >change in behaviour, right? yes, these dtbs build with this patch and I've tested with mpc5121ads.dtb. Thanks, Anatolij
Re: arch/powerpc/platforms/512x/clock-commonclk.c:824: wrong % specifier ?
On Mon, 27 Jun 2016 08:59:42 +0100 David Binderman linuxdev.baldr...@gmail.com wrote: ... >linux-4.7-rc5/arch/powerpc/platforms/512x/clock-commonclk.c:824]: >(warning) %d in format string (no. 1) requires 'int' but the argument >type is 'size_t {aka unsigned long}'. mpc512x is 32-bit arch, size_t is unsigned int if you build 32-bit kernel. thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Pull request: powerpc/mpc5xxx next
Highlights include a driver for MPC512x LocalPlus Bus FIFO with its device tree binding documentation, mpc512x device tree updates and some minor fixes. These patches have already been queued for linux-next for a while. The following changes since commit 353169acf1858bb2dc3f91475dafabce547de14c: powerpc/eeh: Fix recursive fenced PHB on Broadcom shiner adapter (2015-10-21 20:42:16 +1100) are available in the git repository at: git://git.denx.de/linux-denx-agust.git next for you to fetch changes up to 39e69f55f85731d9c0320c03212a4d1f149464f0: powerpc: Introduce the use of the managed version of kzalloc (2015-10-22 16:13:23 +0200) Alexander Popov (2): powerpc/512x: add LocalPlus Bus FIFO device driver powerpc/512x: add a device tree binding for LocalPlus Bus FIFO Himangi Saraogi (1): powerpc: Introduce the use of the managed version of kzalloc Luis de Bethencourt (1): powerpc: platforms: mpc52xx_lpbfifo: Fix module autoload for OF platform driver Uwe Kleine-König (1): powerpc: mpc512x: drop bogus and unused psc register bit definitions .../bindings/powerpc/fsl/mpc512x_lpbfifo.txt | 21 + arch/powerpc/boot/dts/mpc5121.dtsi | 11 +- arch/powerpc/boot/dts/mpc5125twr.dts | 11 +- arch/powerpc/configs/mpc512x_defconfig |1 + arch/powerpc/include/asm/mpc5121.h | 59 +++ arch/powerpc/include/asm/mpc52xx_psc.h |2 - arch/powerpc/platforms/512x/Kconfig|6 + arch/powerpc/platforms/512x/Makefile |1 + arch/powerpc/platforms/512x/mpc512x_lpbfifo.c | 540 arch/powerpc/platforms/52xx/mpc52xx_gpt.c |6 +- arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c |1 + 11 files changed, 650 insertions(+), 9 deletions(-) create mode 100644 Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt create mode 100644 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Introduce the use of the managed version of kzalloc
On Tue, 27 May 2014 01:51:31 +0530 Himangi Saraogiwrote: ... > > Signed-off-by: Himangi Saraogi > Acked-by: Julia Lawall > --- > Not compile tested > arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) applied to mpc5xxx/next. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: mpc512x: drop bogus and unused psc register bit definitions
On Tue, 21 Jul 2015 09:21:13 +0200 Uwe Kleine-Königwrote: > These were introduced in commit 25ae3a0739c6 ("[POWERPC] mpc512x: Add > MPC512x PSC support to MPC52xx psc driver") and never used. Moreover > according to the datasheet[1] MEMERROR is bit 25 (0x40) and ORERR is > bit 27 (0x10). > > [1] MPC5125RM Rev. 2; 11/2009 > > Signed-off-by: Uwe Kleine-König > --- > arch/powerpc/include/asm/mpc52xx_psc.h | 2 -- > 1 file changed, 2 deletions(-) applied to mpc5xxx/next. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 2/2] powerpc/512x: add a device tree binding for LocalPlus Bus FIFO
On Mon, 12 Oct 2015 00:08:02 +0300 Alexander Popovwrote: > Add a device tree binding for Freescale MPC512x LocalPlus Bus FIFO and > introduce the document describing that binding. > > Signed-off-by: Alexander Popov > --- > .../bindings/powerpc/fsl/mpc512x_lpbfifo.txt| 21 > + > arch/powerpc/boot/dts/mpc5121.dtsi | 11 +-- > arch/powerpc/boot/dts/mpc5125twr.dts| 11 ++- > 3 files changed, 40 insertions(+), 3 deletions(-) > create mode 100644 > Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt applied to mpc5xxx/next. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 1/2] powerpc/512x: add LocalPlus Bus FIFO device driver
On Mon, 12 Oct 2015 00:08:01 +0300 Alexander Popovwrote: > This driver for Freescale MPC512x LocalPlus Bus FIFO (called SCLPC > in the Reference Manual) allows Direct Memory Access transfers > between RAM and peripheral devices on LocalPlus Bus. > > Signed-off-by: Alexander Popov > --- > arch/powerpc/configs/mpc512x_defconfig| 1 + > arch/powerpc/include/asm/mpc5121.h| 59 +++ > arch/powerpc/platforms/512x/Kconfig | 6 + > arch/powerpc/platforms/512x/Makefile | 1 + > arch/powerpc/platforms/512x/mpc512x_lpbfifo.c | 539 > ++ > 5 files changed, 606 insertions(+) > create mode 100644 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c extended with MODULE_DEVICE_TABLE() for of_device_id struct and applied to mpc5xxx/next. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [RESEND PATCH 1/2] powerpc: platforms: mpc52xx_lpbfifo: Fix module autoload for OF platform driver
On Tue, 20 Oct 2015 16:04:12 +0100 Luis de Bethencourtwrote: > From: Luis de Bethencourt > > This platform driver has a OF device ID table but the OF module > alias information is not created so module autoloading won't work. > > Signed-off-by: Luis de Bethencourt > --- > arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 1 + > 1 file changed, 1 insertion(+) applied to mpc5xxx/next. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Please pull 'next' branch of 5xxx tree
Hi Ben ! On Wed, 29 Jan 2014 18:46:09 +1100 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: ... Hrm, I get a merge conflicts with spi-mpc512x-psc.c, please check that I fixed it up properly in powerpc-next and let me know. your fix is correct. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Please pull 'next' branch of 5xxx tree
Hi Ben ! On Wed, 15 Jan 2014 22:18:59 +0100 Anatolij Gustschin ag...@denx.de wrote: Hi Ben ! please pull mpc5xxx patches for v3.14: Ping. Switch mpc512x to the common clock framework and adapt mpc512x drivers to use the new clock driver. Old PPC_CLOCK code is removed entirely since there are no users any more. All these patches have been in linux-next for more then two weeks now. Thanks, Anatolij The following changes since commit dece8ada993e1764a115bdff0f1eaa5fc8dc: Merge branch 'merge' into next (2013-12-30 15:19:31 +1100) are available in the git repository at: git://git.denx.de/linux-2.6-agust.git next for you to fetch changes up to bc75059422338197ce487d338ac9c898761e1e61: powerpc/512x: dts: add MPC5125 clock specs (2014-01-12 18:59:50 +0100) Gerhard Sittig (20): dts: mpc512x: introduce dt-bindings/clock/ header dts: mpc512x: add clock related device tree specs clk: mpc512x: introduce COMMON_CLK for MPC512x (disabled) clk: mpc512x: add backwards compat to the CCF code dts: mpc512x: add clock specs for client lookups clk: mpc5xxx: switch to COMMON_CLK, retire PPC_CLOCK spi: mpc512x: adjust to OF based clock lookup serial: mpc512x: adjust for OF based clock lookup serial: mpc512x: setup the PSC FIFO clock as well USB: fsl-mph-dr-of: adjust for OF based clock lookup mtd: mpc5121_nfc: adjust for OF based clock lookup fsl-viu: adjust for OF based clock lookup net: can: mscan: adjust to common clock support for mpc512x net: can: mscan: remove non-CCF code for MPC512x powerpc/mpc512x: improve DIU related clock setup clk: mpc512x: remove migration support workarounds powerpc/512x: clk: minor comment updates powerpc/512x: clk: enforce even SDHC divider values powerpc/512x: clk: support MPC5121/5123/5125 SoC variants powerpc/512x: dts: add MPC5125 clock specs arch/powerpc/Kconfig |5 - arch/powerpc/boot/dts/ac14xx.dts |7 + arch/powerpc/boot/dts/mpc5121.dtsi| 113 ++- arch/powerpc/boot/dts/mpc5125twr.dts | 53 +- arch/powerpc/include/asm/clk_interface.h | 20 - arch/powerpc/include/asm/mpc5121.h|7 +- arch/powerpc/kernel/Makefile |1 - arch/powerpc/kernel/clock.c | 82 -- arch/powerpc/platforms/512x/Kconfig |2 +- arch/powerpc/platforms/512x/Makefile |3 +- arch/powerpc/platforms/512x/clock-commonclk.c | 1221 + arch/powerpc/platforms/512x/clock.c | 754 --- arch/powerpc/platforms/512x/mpc512x_shared.c | 169 ++-- arch/powerpc/platforms/52xx/Kconfig |2 +- drivers/media/platform/fsl-viu.c |2 +- drivers/mtd/nand/mpc5121_nfc.c|2 +- drivers/net/can/mscan/mpc5xxx_can.c | 270 +++--- drivers/spi/spi-mpc512x-psc.c | 26 +- drivers/tty/serial/mpc52xx_uart.c | 90 +- drivers/usb/host/fsl-mph-dr-of.c | 13 +- include/dt-bindings/clock/mpc512x-clock.h | 76 ++ include/linux/clk-provider.h | 16 + 22 files changed, 1840 insertions(+), 1094 deletions(-) delete mode 100644 arch/powerpc/include/asm/clk_interface.h delete mode 100644 arch/powerpc/kernel/clock.c create mode 100644 arch/powerpc/platforms/512x/clock-commonclk.c delete mode 100644 arch/powerpc/platforms/512x/clock.c create mode 100644 include/dt-bindings/clock/mpc512x-clock.h ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Pull request: scottwood/linux.git
Hi Ben ! On Fri, 17 Jan 2014 19:22:36 -0600 Scott Wood scottw...@freescale.com wrote: This contains a fix for a chroma_defconfig build break that was introduced by e6500 tablewalk support, and a device tree binding patch that missed the previous pull request due to some last-minute polishing. this one is still pending, too. Thanks, Anatolij The following changes since commit fac515db45207718168cb55ca4d0a390e43b61af: Merge remote-tracking branch 'scott/next' into next (2014-01-15 14:22:35 +1100) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git next for you to fetch changes up to 4b3cbc82a04485f6400cb5b227798daaa8512a23: clk: corenet: Adds the clock binding (2014-01-17 19:01:27 -0600) Scott Wood (1): powerpc/booke64: Guard e6500 tlb handler with CONFIG_PPC_FSL_BOOK3E Tang Yuantian (1): clk: corenet: Adds the clock binding .../devicetree/bindings/clock/corenet-clock.txt| 134 + arch/powerpc/Kconfig | 1 + arch/powerpc/mm/tlb_low_64e.S | 3 +- arch/powerpc/mm/tlb_nohash.c | 2 + 4 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/clock/corenet-clock.txt ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Please pull 'next' branch of 5xxx tree
On Tue, 28 Jan 2014 17:00:14 +1100 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Tue, 2014-01-28 at 06:46 +0100, Anatolij Gustschin wrote: Hi Ben ! On Wed, 15 Jan 2014 22:18:59 +0100 Anatolij Gustschin ag...@denx.de wrote: Hi Ben ! please pull mpc5xxx patches for v3.14: Ping. Oops, you sent that while I was on vacation and I missed it. Next time, try to send your pull request earlier if possible, I'd like to have most stuff together before -rc5. I'll try to send this one to Linus after he has pulled my current one. Okay, I'll try to send it earlier next time. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Please pull 'next' branch of 5xxx tree
Hi Ben ! please pull mpc5xxx patches for v3.14: Switch mpc512x to the common clock framework and adapt mpc512x drivers to use the new clock driver. Old PPC_CLOCK code is removed entirely since there are no users any more. All these patches have been in linux-next for more then two weeks now. Thanks, Anatolij The following changes since commit dece8ada993e1764a115bdff0f1eaa5fc8dc: Merge branch 'merge' into next (2013-12-30 15:19:31 +1100) are available in the git repository at: git://git.denx.de/linux-2.6-agust.git next for you to fetch changes up to bc75059422338197ce487d338ac9c898761e1e61: powerpc/512x: dts: add MPC5125 clock specs (2014-01-12 18:59:50 +0100) Gerhard Sittig (20): dts: mpc512x: introduce dt-bindings/clock/ header dts: mpc512x: add clock related device tree specs clk: mpc512x: introduce COMMON_CLK for MPC512x (disabled) clk: mpc512x: add backwards compat to the CCF code dts: mpc512x: add clock specs for client lookups clk: mpc5xxx: switch to COMMON_CLK, retire PPC_CLOCK spi: mpc512x: adjust to OF based clock lookup serial: mpc512x: adjust for OF based clock lookup serial: mpc512x: setup the PSC FIFO clock as well USB: fsl-mph-dr-of: adjust for OF based clock lookup mtd: mpc5121_nfc: adjust for OF based clock lookup fsl-viu: adjust for OF based clock lookup net: can: mscan: adjust to common clock support for mpc512x net: can: mscan: remove non-CCF code for MPC512x powerpc/mpc512x: improve DIU related clock setup clk: mpc512x: remove migration support workarounds powerpc/512x: clk: minor comment updates powerpc/512x: clk: enforce even SDHC divider values powerpc/512x: clk: support MPC5121/5123/5125 SoC variants powerpc/512x: dts: add MPC5125 clock specs arch/powerpc/Kconfig |5 - arch/powerpc/boot/dts/ac14xx.dts |7 + arch/powerpc/boot/dts/mpc5121.dtsi| 113 ++- arch/powerpc/boot/dts/mpc5125twr.dts | 53 +- arch/powerpc/include/asm/clk_interface.h | 20 - arch/powerpc/include/asm/mpc5121.h|7 +- arch/powerpc/kernel/Makefile |1 - arch/powerpc/kernel/clock.c | 82 -- arch/powerpc/platforms/512x/Kconfig |2 +- arch/powerpc/platforms/512x/Makefile |3 +- arch/powerpc/platforms/512x/clock-commonclk.c | 1221 + arch/powerpc/platforms/512x/clock.c | 754 --- arch/powerpc/platforms/512x/mpc512x_shared.c | 169 ++-- arch/powerpc/platforms/52xx/Kconfig |2 +- drivers/media/platform/fsl-viu.c |2 +- drivers/mtd/nand/mpc5121_nfc.c|2 +- drivers/net/can/mscan/mpc5xxx_can.c | 270 +++--- drivers/spi/spi-mpc512x-psc.c | 26 +- drivers/tty/serial/mpc52xx_uart.c | 90 +- drivers/usb/host/fsl-mph-dr-of.c | 13 +- include/dt-bindings/clock/mpc512x-clock.h | 76 ++ include/linux/clk-provider.h | 16 + 22 files changed, 1840 insertions(+), 1094 deletions(-) delete mode 100644 arch/powerpc/include/asm/clk_interface.h delete mode 100644 arch/powerpc/kernel/clock.c create mode 100644 arch/powerpc/platforms/512x/clock-commonclk.c delete mode 100644 arch/powerpc/platforms/512x/clock.c create mode 100644 include/dt-bindings/clock/mpc512x-clock.h ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Please pull 'merge' branch of 5xxx tree
Hi Ben ! Please pull two DTS fixes for MPC5125 tower board. Without them the v3.13-rcX kernels do not boot. Thanks, Anatolij The following changes since commit 803c2d2f84da9dc2619449994af34d27148ab20d: powerpc/powernv: Fix OPAL LPC access in Little Endian (2013-12-13 15:55:15 +1100) are available in the git repository at: git://git.denx.de/linux-2.6-agust.git merge for you to fetch changes up to 11daf32be9a6041a2406c2cbf76b75a9c4a6eaaa: powerpc/512x: dts: disable MPC5125 usb module (2013-12-20 22:12:07 +0100) Gerhard Sittig (1): powerpc/512x: dts: remove misplaced IRQ spec from 'soc' node (5125) Matteo Facchinetti (1): powerpc/512x: dts: disable MPC5125 usb module arch/powerpc/boot/dts/mpc5125twr.dts |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2] powerpc/512x: dts: disable MPC5125 usb module
On Fri, 20 Dec 2013 10:16:22 +0100 Matteo Facchinetti matteo.facchine...@sirius-es.it wrote: At the moment the USB controller's pin muxing is not setup correctly and causes a kernel panic upon system startup, so disable the USB1 device tree node in the MPC5125 tower board dts file. The USB controller is connected to an USB3320 ULPI transceiver and the device tree should receive an update to reflect correct dependencies and required initialization data before the USB1 node can get re-enabled. Signed-off-by: Matteo Facchinetti matteo.facchine...@sirius-es.it --- v2: * improve the text of the commit as suggested by Gerhard Sittig g...@denx.de * put the 'status = disabled' to the last line in the list of properties * rewiew the comment related to USB1 device tree node --- arch/powerpc/boot/dts/mpc5125twr.dts | 5 + 1 file changed, 5 insertions(+) Applied to merge branch. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v1 0/4] powerpc/512x: update COMMON_CLK support for MPC5125
On Tue, 10 Dec 2013 14:11:33 +0100 Gerhard Sittig g...@denx.de wrote: ... Gerhard Sittig (4): powerpc/512x: clk: minor comment updates powerpc/512x: clk: enforce even SDHC divider values powerpc/512x: clk: support MPC5121/5123/5125 SoC variants powerpc/512x: dts: add MPC5125 clock specs arch/powerpc/boot/dts/mpc5125twr.dts | 53 +++- arch/powerpc/include/asm/mpc5121.h|7 +- arch/powerpc/platforms/512x/clock-commonclk.c | 369 + include/dt-bindings/clock/mpc512x-clock.h |9 +- 4 files changed, 386 insertions(+), 52 deletions(-) Applied this series to mpc5xxx next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v1 1/1] powerpc/512x: dts: remove misplaced IRQ spec from 'soc' node (5125)
On Tue, 10 Dec 2013 10:51:08 +0100 Gerhard Sittig g...@denx.de wrote: the 'soc' node in the MPC5125 tower board .dts has an '#interrupt-cells' property although this node is not an interrupt controller remove this erroneously placed property because starting with v3.13-rc1 lookup and resolution of 'interrupts' specs for peripherals gets misled (tries to use the 'soc' as the interrupt parent which fails), emits 'no irq domain found' WARN() messages and breaks the boot process [ best viewed with 'git diff -U5' to have DT node names in the context ] Cc: Anatolij Gustschin ag...@denx.de Cc: linuxppc-dev@lists.ozlabs.org Cc: devicet...@vger.kernel.org Signed-off-by: Gerhard Sittig g...@denx.de --- note that this is not a resend of the previous MPC5121 fix, but instead is a fix for MPC5125 along the same lines of the MPC5121 fix --- arch/powerpc/boot/dts/mpc5125twr.dts |1 - 1 file changed, 1 deletion(-) Applied. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc/52xx: re-enable bestcomm driver in defconfigs
The bestcomm driver has been moved to drivers/dma, so to select this driver by default additionally CONFIG_DMADEVICES has to be enabled. Currently it is not enabled in the config despite existing CONFIG_PPC_BESTCOMM=y in the config files. Fix it. Signed-off-by: Anatolij Gustschin ag...@denx.de --- arch/powerpc/configs/52xx/cm5200_defconfig|3 ++- arch/powerpc/configs/52xx/lite5200b_defconfig |3 ++- arch/powerpc/configs/52xx/motionpro_defconfig |3 ++- arch/powerpc/configs/52xx/pcm030_defconfig|3 ++- arch/powerpc/configs/52xx/tqm5200_defconfig |3 ++- arch/powerpc/configs/mpc5200_defconfig|3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/configs/52xx/cm5200_defconfig b/arch/powerpc/configs/52xx/cm5200_defconfig index 69b57da..0b88c7b 100644 --- a/arch/powerpc/configs/52xx/cm5200_defconfig +++ b/arch/powerpc/configs/52xx/cm5200_defconfig @@ -12,7 +12,6 @@ CONFIG_EXPERT=y CONFIG_PPC_MPC52xx=y CONFIG_PPC_MPC5200_SIMPLE=y # CONFIG_PPC_PMAC is not set -CONFIG_PPC_BESTCOMM=y CONFIG_SPARSE_IRQ=y CONFIG_PM=y # CONFIG_PCI is not set @@ -71,6 +70,8 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_HCD_PPC_OF_BE=y CONFIG_USB_STORAGE=y +CONFIG_DMADEVICES=y +CONFIG_PPC_BESTCOMM=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set diff --git a/arch/powerpc/configs/52xx/lite5200b_defconfig b/arch/powerpc/configs/52xx/lite5200b_defconfig index f3638ae..104a332 100644 --- a/arch/powerpc/configs/52xx/lite5200b_defconfig +++ b/arch/powerpc/configs/52xx/lite5200b_defconfig @@ -15,7 +15,6 @@ CONFIG_PPC_MPC52xx=y CONFIG_PPC_MPC5200_SIMPLE=y CONFIG_PPC_LITE5200=y # CONFIG_PPC_PMAC is not set -CONFIG_PPC_BESTCOMM=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y CONFIG_SPARSE_IRQ=y @@ -59,6 +58,8 @@ CONFIG_I2C_CHARDEV=y CONFIG_I2C_MPC=y # CONFIG_HWMON is not set CONFIG_VIDEO_OUTPUT_CONTROL=m +CONFIG_DMADEVICES=y +CONFIG_PPC_BESTCOMM=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set diff --git a/arch/powerpc/configs/52xx/motionpro_defconfig b/arch/powerpc/configs/52xx/motionpro_defconfig index 0c7de96..0d13ad7 100644 --- a/arch/powerpc/configs/52xx/motionpro_defconfig +++ b/arch/powerpc/configs/52xx/motionpro_defconfig @@ -12,7 +12,6 @@ CONFIG_EXPERT=y CONFIG_PPC_MPC52xx=y CONFIG_PPC_MPC5200_SIMPLE=y # CONFIG_PPC_PMAC is not set -CONFIG_PPC_BESTCOMM=y CONFIG_SPARSE_IRQ=y CONFIG_PM=y # CONFIG_PCI is not set @@ -84,6 +83,8 @@ CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_DS1307=y +CONFIG_DMADEVICES=y +CONFIG_PPC_BESTCOMM=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set diff --git a/arch/powerpc/configs/52xx/pcm030_defconfig b/arch/powerpc/configs/52xx/pcm030_defconfig index 22e7195..430aa18 100644 --- a/arch/powerpc/configs/52xx/pcm030_defconfig +++ b/arch/powerpc/configs/52xx/pcm030_defconfig @@ -21,7 +21,6 @@ CONFIG_MODULE_UNLOAD=y CONFIG_PPC_MPC52xx=y CONFIG_PPC_MPC5200_SIMPLE=y # CONFIG_PPC_PMAC is not set -CONFIG_PPC_BESTCOMM=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y CONFIG_HZ_100=y @@ -87,6 +86,8 @@ CONFIG_USB_OHCI_HCD_PPC_OF_BE=y CONFIG_USB_STORAGE=m CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_PCF8563=m +CONFIG_DMADEVICES=y +CONFIG_PPC_BESTCOMM=y CONFIG_EXT2_FS=m CONFIG_EXT3_FS=m # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set diff --git a/arch/powerpc/configs/52xx/tqm5200_defconfig b/arch/powerpc/configs/52xx/tqm5200_defconfig index 716a37b..7af4c5b 100644 --- a/arch/powerpc/configs/52xx/tqm5200_defconfig +++ b/arch/powerpc/configs/52xx/tqm5200_defconfig @@ -17,7 +17,6 @@ CONFIG_PPC_MPC52xx=y CONFIG_PPC_MPC5200_SIMPLE=y CONFIG_PPC_MPC5200_BUGFIX=y # CONFIG_PPC_PMAC is not set -CONFIG_PPC_BESTCOMM=y CONFIG_PM=y # CONFIG_PCI is not set CONFIG_NET=y @@ -86,6 +85,8 @@ CONFIG_USB_STORAGE=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_DS1307=y CONFIG_RTC_DRV_DS1374=y +CONFIG_DMADEVICES=y +CONFIG_PPC_BESTCOMM=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig index 6640a35..8b682d1c 100644 --- a/arch/powerpc/configs/mpc5200_defconfig +++ b/arch/powerpc/configs/mpc5200_defconfig @@ -15,7 +15,6 @@ CONFIG_PPC_MEDIA5200=y CONFIG_PPC_MPC5200_BUGFIX=y CONFIG_PPC_MPC5200_LPBFIFO=m # CONFIG_PPC_PMAC is not set -CONFIG_PPC_BESTCOMM=y CONFIG_SIMPLE_GPIO=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y @@ -125,6 +124,8 @@ CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_DS1307=y CONFIG_RTC_DRV_DS1374=y CONFIG_RTC_DRV_PCF8563=m +CONFIG_DMADEVICES=y +CONFIG_PPC_BESTCOMM=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -- 1.7.9.5 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Please pull 'merge' branch of 5xxx tree
Hi Ben ! Please pull a device tree fix for v3.13. The booting on mpc512x is broken since v3.13-rc1, this patch repairs it. Thanks, Anatolij The following changes since commit 721cb59e9d95eb7f47ec73711ed35ef85e1ea1ca: powerpc/windfarm: Fix XServe G5 fan control Makefile issue (2013-11-27 11:35:47 +1100) are available in the git repository at: git://git.denx.de/linux-2.6-agust.git merge for you to fetch changes up to c65ec135960e4555f65d8c9243f65b2fb88ac071: powerpc/512x: dts: remove misplaced IRQ spec from 'soc' node (2013-12-07 09:43:28 +0100) Gerhard Sittig (1): powerpc/512x: dts: remove misplaced IRQ spec from 'soc' node arch/powerpc/boot/dts/mpc5121.dtsi |1 - 1 file changed, 1 deletion(-) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 02/17] dts: mpc512x: introduce dt-bindings/clock/ header
On Sat, 30 Nov 2013 23:51:22 +0100 Gerhard Sittig g...@denx.de wrote: introduce a dt-bindings/ header file for MPC512x clocks, providing symbolic identifiers for those SoC clocks which clients will reference from their device tree nodes Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren swar...@wwwdotorg.org Cc: Ian Campbell ian.campb...@citrix.com Cc: devicet...@vger.kernel.org Reviewed-by: Mike Turquette mturque...@linaro.org # for v3: w/o bdlc, PSC ipg Signed-off-by: Gerhard Sittig g...@denx.de --- include/dt-bindings/clock/mpc512x-clock.h | 69 + 1 file changed, 69 insertions(+) create mode 100644 include/dt-bindings/clock/mpc512x-clock.h applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 03/17] dts: mpc512x: add clock related device tree specs
On Sat, 30 Nov 2013 23:51:23 +0100 Gerhard Sittig g...@denx.de wrote: this addresses the clock driver aka provider's side of clocks - introduce a 'clocks' subtree with an 'osc' node for the crystal or oscillator SoC input (fixed frequency) - the 'clock@f00' clock-control-module node references the 'osc' for its input, and is another provider for all the clocks which the CCM component manages - prepare for future references to clocks from peripheral nodes by means of the clks ID syntax and symbolic ID names which a header file provides - provide default values with 33MHz oscillator frequency in the common include (the 66MHz IPS bus already was there), and add override values for the ifm AC14xx board which deviates from the reference design (25MHz xtal, 80MHz IPS bus) Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren swar...@wwwdotorg.org Cc: Ian Campbell ian.campb...@citrix.com Cc: linux-arm-ker...@lists.infradead.org Cc: devicet...@vger.kernel.org Reviewed-by: Mike Turquette mturque...@linaro.org # for v3, before osc Signed-off-by: Gerhard Sittig g...@denx.de --- arch/powerpc/boot/dts/ac14xx.dts |7 +++ arch/powerpc/boot/dts/mpc5121.dtsi | 18 +- 2 files changed, 24 insertions(+), 1 deletion(-) applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 04/17] clk: mpc512x: introduce COMMON_CLK for MPC512x (disabled)
On Sat, 30 Nov 2013 23:51:24 +0100 Gerhard Sittig g...@denx.de wrote: this change implements a clock driver for the MPC512x PowerPC platform which follows the COMMON_CLK approach and uses common clock drivers shared with other platforms this driver implements the publicly announced set of clocks (those listed in the dt-bindings header file), as well as generates additional 'struct clk' items where the SoC hardware cannot easily get mapped to the common primitives (shared code) of the clock API, or requires intermediate clock nodes to represent clocks that have both gates and dividers the previous PPC_CLOCK implementation is kept in place and remains active for the moment, the newly introduced CCF clock driver will receive additional support for backwards compatibility in a subsequent patch before it gets enabled and will replace the PPC_CLOCK approach some of the clock items get pre-enabled in the clock driver to not have them automatically disabled by the underlying clock subsystem because of their being unused -- this approach is desirable because - some of the clocks are useful to have for diagnostics and information despite their not getting claimed by any drivers (CPU, internal and external RAM, internal busses, boot media) - some of the clocks aren't claimed by their peripheral drivers yet, either because of missing driver support or because device tree specs aren't available yet (but the workarounds will get removed as the drivers get adjusted and the device tree provides the clock specs) clkdev registration provides alias names for few clock items - to not break those peripheral drivers which encode their component index into the name that is used for clock lookup (UART, SPI, USB) - to not break those drivers which use names for the clock lookup which were encoded in the previous PPC_CLOCK implementation (NFC, VIU, CAN) this workaround will get removed as these drivers get adjusted after device tree based clock lookup has become available the COMMON_CLK implementation copes with device trees which lack an oscillator node (backwards compat), the REF clock is then derived from the IPS bus frequency and multiplier values fetched from hardware Cc: Mike Turquette mturque...@linaro.org Cc: Anatolij Gustschin ag...@denx.de Cc: linux-arm-ker...@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Gerhard Sittig g...@denx.de --- arch/powerpc/platforms/512x/Makefile |4 +- arch/powerpc/platforms/512x/clock-commonclk.c | 798 + include/linux/clk-provider.h | 16 + 3 files changed, 817 insertions(+), 1 deletion(-) create mode 100644 arch/powerpc/platforms/512x/clock-commonclk.c applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 05/17] clk: mpc512x: add backwards compat to the CCF code
On Sat, 30 Nov 2013 23:51:25 +0100 Gerhard Sittig g...@denx.de wrote: extend the recently added COMMON_CLK platform support for MPC512x such that it works with incomplete device tree data which lacks clock specs Cc: Mike Turquette mturque...@linaro.org Cc: Anatolij Gustschin ag...@denx.de Cc: linux-arm-ker...@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Gerhard Sittig g...@denx.de --- arch/powerpc/platforms/512x/clock-commonclk.c | 173 - 1 file changed, 172 insertions(+), 1 deletion(-) moved node macro definitions out of the function body and applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 06/17] dts: mpc512x: add clock specs for client lookups
On Sat, 30 Nov 2013 23:51:26 +0100 Gerhard Sittig g...@denx.de wrote: this addresses the client side of device tree based clock lookups add clock specifiers to the mbx, nfc, mscan, sdhc, i2c, axe, diu, viu, mdio, fec, usb, pata, psc, psc fifo, and pci nodes in the shared mpc5121.dtsi include Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren swar...@wwwdotorg.org Cc: Ian Campbell ian.campb...@citrix.com Cc: devicet...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Mike Turquette mturque...@linaro.org # for v3: w/o bdlc, PSC ipg Signed-off-by: Gerhard Sittig g...@denx.de --- arch/powerpc/boot/dts/mpc5121.dtsi | 95 1 file changed, 95 insertions(+) applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 07/17] clk: mpc5xxx: switch to COMMON_CLK, retire PPC_CLOCK
On Sat, 30 Nov 2013 23:51:27 +0100 Gerhard Sittig g...@denx.de wrote: the setup before the change was - arch/powerpc/Kconfig had the PPC_CLOCK option, off by default - depending on the PPC_CLOCK option the arch/powerpc/kernel/clock.c file was built, which implements the clk.h API but always returns -ENOSYS unless a platform registers specific callbacks - the MPC52xx platform selected PPC_CLOCK but did not register any callbacks, thus all clk.h API calls keep resulting in -ENOSYS errors (which is OK, all peripheral drivers deal with the situation) - the MPC512x platform selected PPC_CLOCK and registered specific callbacks implemented in arch/powerpc/platforms/512x/clock.c, thus provided real support for the clock API - no other powerpc platform did select PPC_CLOCK the situation after the change is - the MPC512x platform implements the COMMON_CLK interface, and thus the PPC_CLOCK approach in arch/powerpc/platforms/512x/clock.c has become obsolete - the MPC52xx platform still lacks genuine support for the clk.h API while this is not a change against the previous situation (the error code returned from COMMON_CLK stubs differs but every call still results in an error) - with all references gone, the arch/powerpc/kernel/clock.c wrapper and the PPC_CLOCK option have become obsolete, as did the clk_interface.h header file the switch from PPC_CLOCK to COMMON_CLK is done for all platforms within the same commit such that multiplatform kernels (the combination of 512x and 52xx within one executable) keep working Cc: Mike Turquette mturque...@linaro.org Cc: Anatolij Gustschin ag...@denx.de Cc: linux-arm-ker...@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Gerhard Sittig g...@denx.de --- arch/powerpc/Kconfig |5 - arch/powerpc/include/asm/clk_interface.h | 20 - arch/powerpc/kernel/Makefile |1 - arch/powerpc/kernel/clock.c | 82 arch/powerpc/platforms/512x/Kconfig |2 +- arch/powerpc/platforms/512x/Makefile |1 - arch/powerpc/platforms/512x/clock.c | 754 -- arch/powerpc/platforms/52xx/Kconfig |2 +- 8 files changed, 2 insertions(+), 865 deletions(-) delete mode 100644 arch/powerpc/include/asm/clk_interface.h delete mode 100644 arch/powerpc/kernel/clock.c delete mode 100644 arch/powerpc/platforms/512x/clock.c applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 08/17] spi: mpc512x: adjust to OF based clock lookup
On Sat, 30 Nov 2013 23:51:28 +0100 Gerhard Sittig g...@denx.de wrote: after device tree based clock lookup became available, the peripheral driver need no longer construct clock names which include the PSC index, remove the psc%d_mclk template and unconditionally use 'mclk' acquire and release the 'ipg' clock item for register access as well Cc: Mark Brown broo...@kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/spi/spi-mpc512x-psc.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 09/17] serial: mpc512x: adjust for OF based clock lookup
On Sat, 30 Nov 2013 23:51:29 +0100 Gerhard Sittig g...@denx.de wrote: after device tree based clock lookup became available, the peripheral driver need no longer construct clock names which include the PSC index, remove the psc%d_mclk template and unconditionally use 'mclk' acquire and release the ipg clock item for register access as well Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: Jiri Slaby jsl...@suse.cz Cc: linux-ser...@vger.kernel.org Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org # for v4 Signed-off-by: Gerhard Sittig g...@denx.de --- Greg, the difference since v4 of this patch is that v4 took the 'mclk' and 'ipg' clock items in reverse order, and thus potentially obfuscated the adjusted name for 'mclk' -- the updated version of the patch is identical in content but cleaner diff-wise --- drivers/tty/serial/mpc52xx_uart.c | 40 - 1 file changed, 35 insertions(+), 5 deletions(-) applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 10/17] serial: mpc512x: setup the PSC FIFO clock as well
On Sat, 30 Nov 2013 23:51:30 +0100 Gerhard Sittig g...@denx.de wrote: prepare and enable the FIFO clock upon PSC FIFO initialization, check for and propagage errors when enabling the PSC FIFO clock, disable and unprepare the FIFO clock upon PSC FIFO uninitialization devm_{get,put}_clk() doesn't apply here, as the SoC provides a single FIFO component which is shared among several PSC components, thus the FIFO isn't associated with a device (while the PSCs are) provide a fallback clock lookup approach in case the OF based clock lookup for the PSC FIFO fails, this allows for successful operation in the presence of an outdated device tree which lacks clock specs Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: Jiri Slaby jsl...@suse.cz Cc: linux-ser...@vger.kernel.org Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org # for v4 Signed-off-by: Gerhard Sittig g...@denx.de --- Greg, the addition since v4 is the clk_get_sys() call for the 'ipg' clock item (backwards compat for device trees w/o clock specs) --- drivers/tty/serial/mpc52xx_uart.c | 50 - 1 file changed, 44 insertions(+), 6 deletions(-) applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 11/17] USB: fsl-mph-dr-of: adjust for OF based clock lookup
On Sat, 30 Nov 2013 23:51:31 +0100 Gerhard Sittig g...@denx.de wrote: after device tree based clock lookup became available, the peripheral driver need no longer construct clock names which include the component index -- remove the usb%d_clk template, always use ipg instead Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: linux-...@vger.kernel.org Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/usb/host/fsl-mph-dr-of.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 12/17] mtd: mpc5121_nfc: adjust for OF based clock lookup
On Sat, 30 Nov 2013 23:51:32 +0100 Gerhard Sittig g...@denx.de wrote: after device tree based clock lookup became available, the NAND flash driver need no longer use the previous global nfc_clk name, but should use the ipg clock name specific to the OF node Cc: David Woodhouse dw...@infradead.org Cc: Artem Bityutskiy artem.bityuts...@linux.intel.com Cc: linux-...@lists.infradead.org Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/mtd/nand/mpc5121_nfc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 13/17] [media] fsl-viu: adjust for OF based clock lookup
On Sat, 30 Nov 2013 23:51:33 +0100 Gerhard Sittig g...@denx.de wrote: after device tree based clock lookup became available, the VIU driver need no longer use the previous global viu_clk name, but should use the ipg clock name specific to the OF node Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-me...@vger.kernel.org Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/media/platform/fsl-viu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 14/17] net: can: mscan: adjust to common clock support for mpc512x
On Sat, 30 Nov 2013 23:51:34 +0100 Gerhard Sittig g...@denx.de wrote: implement a .get_clock() callback for the MPC512x platform which uses the common clock infrastructure (eliminating direct access to the clock control registers from within the CAN network driver), and provide the corresponding .put_clock() callback to release resources after use acquire both the clock items for register access (ipg) as well as for wire communication (can) keep the previous implementation of MPC512x support in place during migration, this results in a readable diff of the change this change is neutral to the MPC5200 platform Cc: Wolfgang Grandegger w...@grandegger.com Cc: Marc Kleine-Budde m...@pengutronix.de Cc: linux-...@vger.kernel.org Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/net/can/mscan/mpc5xxx_can.c | 179 +++ 1 file changed, 179 insertions(+) applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 15/17] net: can: mscan: remove non-CCF code for MPC512x
On Sat, 30 Nov 2013 23:51:35 +0100 Gerhard Sittig g...@denx.de wrote: transition to the common clock framework has completed and the PPC_CLOCK is no longer available for the MPC512x platform, remove the now obsolete code path of the mpc5xxx mscan driver which accessed clock control module registers directly Cc: Wolfgang Grandegger w...@grandegger.com Cc: Marc Kleine-Budde m...@pengutronix.de Cc: linux-...@vger.kernel.org Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/net/can/mscan/mpc5xxx_can.c | 141 --- 1 file changed, 141 deletions(-) applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 16/17] powerpc/mpc512x: improve DIU related clock setup
On Sat, 30 Nov 2013 23:51:36 +0100 Gerhard Sittig g...@denx.de wrote: adapt the DIU clock initialization to the COMMON_CLK approach: device tree based clock lookup, prepare and unprepare for clocks, work with frequencies not dividers, call the appropriate clk_*() routines and don't access CCM registers the best clock determination now completely relies on the platform's clock driver to pick a frequency close to what the caller requests, and merely checks whether the desired frequency was met (fits the tolerance of the monitor) this approach shall succeed upon first try in the usual case, will test a few less desirable yet acceptable frequencies in edge cases, and will fallback to best effort if none of the previously tried frequencies pass the test provide a fallback clock lookup approach in case the OF based clock lookup for the DIU fails, this allows for successful operation in the presence of an outdated device tree which lacks clock specs Cc: Anatolij Gustschin ag...@denx.de Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Gerhard Sittig g...@denx.de --- arch/powerpc/platforms/512x/mpc512x_shared.c | 169 ++ 1 file changed, 92 insertions(+), 77 deletions(-) applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v6 17/17] clk: mpc512x: remove migration support workarounds
On Sat, 30 Nov 2013 23:51:37 +0100 Gerhard Sittig g...@denx.de wrote: this change removes workarounds which have become obsolete after migration to common clock support has completed - remove clkdev registration calls (compatibility clock item aliases) after all peripheral drivers were adjusted for device tree based clock lookup - remove pre-enable workarounds after all peripheral drivers were adjusted to acquire their respective clock items workarounds for these clock items get removed: FEC (ethernet), I2C, PSC (UART, SPI), PSC FIFO, USB, NFC (NAND flash), VIU (video capture), BDLC (CAN), CAN MCLK, DIU (video output) these clkdev registered names won't be provided any longer by the MPC512x platform's clock driver: psc%d_mclk, mscan%d_mclk, usb%d_clk, nfc_clk, viu_clk, sys_clk, ref_clk the pre-enable workaround for PCI remains, but depends on the presence of PCI related device tree nodes (disables the PCI clock in the absence of PCI nodes, keeps the PCI clock enabled in the presence of nodes) -- moving clock acquisition into the peripheral driver isn't possible for PCI because its initialization takes place before the platform clock driver gets initialized, thus the clock provider isn't available then Cc: Mike Turquette mturque...@linaro.org Cc: Anatolij Gustschin ag...@denx.de Cc: linux-arm-ker...@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Gerhard Sittig g...@denx.de --- arch/powerpc/platforms/512x/clock-commonclk.c | 50 - 1 file changed, 16 insertions(+), 34 deletions(-) applied to next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v1 1/1] powerpc/512x: dts: remove misplaced IRQ spec from 'soc' node
On Tue, 3 Dec 2013 11:56:52 +0100 Gerhard Sittig g...@denx.de wrote: the 'soc' node in the common .dtsi for MPC5121 has an '#interrupt-cells' property although this node is not an interrupt controller remove this erroneously placed property because starting with v3.13-rc1 lookup and resolution of 'interrupts' specs for peripherals gets misled, emits 'no irq domain found' WARN() messages and breaks the boot process irq: no irq domain found for /soc@8000 ! [ cut here ] WARNING: at /home/gsi/SRC/linux-torvalds/drivers/of/platform.c:171 Modules linked in: CPU: 0 PID: 1 Comm: swapper Tainted: GW 3.13.0-rc1-1-g8a66234 #8 task: df823bb0 ti: df834000 task.ti: df834000 NIP: c02b5190 LR: c02b5180 CTR: c01cf4e0 REGS: df835c50 TRAP: 0700 Tainted: GW (3.13.0-rc1-1-g8a66234) MSR: 00029032 EE,ME,IR,DR,RI CR: 229a9d42 XER: 2000 GPR00: c02b5180 df835d00 df823bb0 df835b18 0308 GPR08: c0479cc0 c048 c0479cc0 0308 0308 c00040fc GPR16: df850880 GPR24: df84d670 0001 df8561a0 dccc df85089c 0020 0001 NIP [c02b5190] of_device_alloc+0xf4/0x1a0 LR [c02b5180] of_device_alloc+0xe4/0x1a0 Call Trace: [df835d00] [c02b5180] of_device_alloc+0xe4/0x1a0 (unreliable) [df835d50] [c02b5278] of_platform_device_create_pdata+0x3c/0xc8 [df835d70] [c02b53fc] of_platform_bus_create+0xf8/0x170 [df835dc0] [c02b5448] of_platform_bus_create+0x144/0x170 [df835e10] [c02b55a8] of_platform_bus_probe+0x98/0xe8 [df835e30] [c0437508] mpc512x_init+0x28/0x1c4 [df835e70] [c0435de8] ppc_init+0x4c/0x60 [df835e80] [c0003b28] do_one_initcall+0x150/0x1a4 [df835ef0] [c0432048] kernel_init_freeable+0x114/0x1c0 [df835f30] [c0004114] kernel_init+0x18/0x124 [df835f40] [c000e910] ret_from_kernel_thread+0x5c/0x64 Instruction dump: 409effd4 57c9103a 57de2834 7c89f050 7f83e378 7c972214 7f45d378 48001f55 7c63d278 7c630034 5463d97e 687a0001 0f1a 2f99 387b0010 939b0098 ---[ end trace 2257f10e5a20cbdd ]--- ... irq: no irq domain found for /soc@8000 ! fsl-diu-fb 80002100.display: could not get DIU IRQ fsl-diu-fb: probe of 80002100.display failed with error -22 irq: no irq domain found for /soc@8000 ! mpc512x_dma 80014000.dma: Error mapping IRQ! mpc512x_dma: probe of 80014000.dma failed with error -22 ... irq: no irq domain found for /soc@8000 ! fs_enet: probe of 80002800.ethernet failed with error -22 ... irq: no irq domain found for /soc@8000 ! mpc5121-rtc 8a00.rtc: mpc5121_rtc_probe: could not request irq: 0 mpc5121-rtc: probe of 8a00.rtc failed with error -22 ... [ best viewed with 'git diff -U5' to have DT node names in the context ] Cc: Anatolij Gustschin ag...@denx.de Cc: linuxppc-dev@lists.ozlabs.org Cc: devicet...@vger.kernel.org Signed-off-by: Gerhard Sittig g...@denx.de --- arch/powerpc/boot/dts/mpc5121.dtsi |1 - 1 file changed, 1 deletion(-) applied, thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2] powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536
On Fri, 22 Nov 2013 16:12:40 +0800 Liu Gang gang@freescale.com wrote: For MPC8572/MPC8536, the status of GPIOs defined as output cannot be determined by reading GPDAT register, so the code use shadow data register instead. But the code may give the wrong status of GPIOs defined as input under some scenarios: 1. If some pins were configured as inputs and were asserted high before booting the kernel, the shadow data has been initialized with those pin values. 2. Some pins have been configured as output first and have been set to the high value, then reconfigured as input. The above cases will make the shadow data for those input pins to be set to high. Then reading the pin status will always return high even if the actual pin status is low. The code should eliminate the effects of the shadow data to the input pins, and the status of those pins should be read directly from GPDAT. Signed-off-by: Liu Gang gang@freescale.com --- changes in v2: - Added more description of the problem. - Reduced one in_be32() call. - Do not modify the shadow data. drivers/gpio/gpio-mpc8xxx.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 914e859..d7d6d72 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -70,10 +70,14 @@ static int mpc8572_gpio_get(struct gpio_chip *gc, unsigned int gpio) u32 val; struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc); struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm); + u32 out_mask, out_shadow; - val = in_be32(mm-regs + GPIO_DAT) ~in_be32(mm-regs + GPIO_DIR); + out_mask = in_be32(mm-regs + GPIO_DIR); - return (val | mpc8xxx_gc-data) mpc8xxx_gpio2mask(gpio); + val = in_be32(mm-regs + GPIO_DAT) ~out_mask; + out_shadow = mpc8xxx_gc-data out_mask; + + return (val | out_shadow) mpc8xxx_gpio2mask(gpio); } static int mpc8xxx_gpio_get(struct gpio_chip *gc, unsigned int gpio) Acked-by: Anatolij Gustschin ag...@denx.de ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536
On Fri, 15 Nov 2013 15:16:29 +0800 Liu Gang gang@freescale.com wrote: For MPC8572/MPC8536, the status of GPIOs defined as output cannot be determined by reading GPDAT register, so the code use shadow data register instead. But if the input pins are asserted high, they will always read high due to the shadow data, even if the pins are set to low. Could you please add a better description of the problem? I'm having some difficulties to understand the last sentence above. Does the issue appear if some pins were configured as inputs and were asserted high before booting the kernel, and therefore the shadow data has been initialized with these pin values? Or does the issue appear if some pin has been configured as output first and has been set to the high value, then reconfigured as input? Now reading the pin state will always return high even if the actual pin state is low? It seems the issue will appear in both cases. If so, please add this information to the commit message. So the input pins should be read directly from GPDAT, not the shadow data. Signed-off-by: Liu Gang gang@freescale.com --- drivers/gpio/gpio-mpc8xxx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 9ae29cc..1d4ac75 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -71,6 +71,7 @@ static int mpc8572_gpio_get(struct gpio_chip *gc, unsigned int gpio) struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm); val = in_be32(mm-regs + GPIO_DAT) ~in_be32(mm-regs + GPIO_DIR); + mpc8xxx_gc-data = in_be32(mm-regs + GPIO_DIR); we can reduce one in_be32() call here, i.e. u32 out_mask; ... out_mask = in_be32(mm-regs + GPIO_DIR); val = in_be32(mm-regs + GPIO_DAT) ~out_mask; mpc8xxx_gc-data = out_mask; return (val | mpc8xxx_gc-data) mpc8xxx_gpio2mask(gpio); } Thanks, Anatolij -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Problem reading and programming memory location...
Hi Lorenzo, On Tue, 19 Nov 2013 11:20:24 +0100 neorf3k neor...@gmail.com wrote: Hello Anatolij, this is our code, used at University, but again it doesn’t work… How i told, the only information we have about that reg are: Chip select 4 specification: Lp_cs4 bus size: 8 bit bus control: 2 wait state R/W ACK disabled size allocated: 4 KByte Our Register 8 bit LP_cs4 (we want to write) cs4 offset: 0x001 is the byte in FPGA at offset 0x0 writable? In your code you currently test read/write access to the byte at offset 0x0. If the read/write access works under U-Boot, then maybe the chip select parameters for CS4 are configured differently in U-Boot. You can dump the Chip Select 4 configuration registers under U-Boot and compare. Is address- and data-bus to the FPGA multipexed? Another possible reason for non-working access could be that the configured CS4 range 0x1002 - 0x1003 overlaps with configured range for CS0, CS1, CS2 or CS3. Can you verify that no such overlapping exists. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Problem reading and programming memory location...
Hi Lorenzo, see my comments below. On Fri, 15 Nov 2013 17:27:30 +0100 neorf3k neor...@gmail.com wrote: Hello again, I’ve tried this code, but we are not able to change cs4 reg value… what could be? — #define MALab_DEVICE_NAME MALab #define MPC5xxx_MM_CS4_START (MBAR_BASE + 0x0024) #define MPC5xxx_MM_CS4_STOP (MBAR_BASE + 0x0028) #define MPC5xxx_MM_IPBI(MBAR_BASE + 0x0054) #define MALab_MM_START 0x1002U #define MALab_MM_END 0x10020FFFU Please change MALab_MM_END to 0x1003U. #define MALab_MM_SIZE 0x1000U int init_module(void) { ... u16 cs4_start_value; u16 cs4_stop_value; u32 cs4_enable_value; u8 rvoice_ioaddr_value; // reserve a page of memory for our hardware /proc/iomem if ( check_region(MALab_MM_START,MALab_MM_SIZE) ) { printk (KERN_ALERT LED init_module: memory already in use\n); return -EBUSY; } request_mem_region(MALab_MM_START,MALab_MM_SIZE,MALab_DEVICE_NAME); void __iomem *cs0_reg = ioremap ((volatile unsigned long)(MBAR_BASE + 0x0300), 4); void __iomem *cs3_reg = ioremap ((volatile unsigned long)(MBAR_BASE + 0x030C), 4); void __iomem *ipbi_cr = ioremap ((volatile unsigned long)(MPC5xxx_MM_IPBI), 4); void __iomem *cs4_start = ioremap ((volatile unsigned long)(MPC5xxx_MM_CS4_START + 2), 2); void __iomem *cs4_stop = ioremap ((volatile unsigned long)(MPC5xxx_MM_CS4_STOP + 2), 2); void __iomem *cs4_enable = ioremap ((volatile unsigned long)(MBAR_BASE + 0x0310), 4); void __iomem *cs_ctrl_reg = ioremap ((volatile unsigned long)(MBAR_BASE + 0x0318), 4); this might work, but this is not how ioremap() supposed to be used. The mapping is done in 4k-page granularity, so it would be better to just map the internal register range my one ioremap() call, i.e. reg_base = ioremap(MBAR_BASE, 0x400); and then to calculate the register offsets, i.e. cs0_reg = reg_base + 0x0300; cs0_reg = reg_base + 0x030C; ... ipbi_cr = reg_base + 0x0054; cs4_start = reg_base + 0x0026; cs4_stop = reg_base + 0x002a; ... For FPGA mapping you need a separate ioremap() call of course. void __iomem *rvoice_ioaddr = ioremap ((volatile unsigned long)(MALab_MM_START), MALab_MM_SIZE); //disable CSO out_be32(cs0_reg, 0x0004ed00); //disable CS3 out_be32(cs3_reg, 0x0002cf00); // enable LocalBus chip select CS4 out_be32(ipbi_cr, 0x00290001); The comment and the code doesn't match here, the code disables CS4 to configure the its range, so the comment is confusing. cs4_start_value=in_be16(cs4_start); cs4_start_value=MALab_MM_START 16; out_be16(cs4_start, cs4_start_value); cs4_stop_value=in_be16(cs4_stop); cs4_stop_value=MALab_MM_END 16; out_be16(cs4_stop, cs4_stop_value); Here is the problem. The _minimal_ chip select range _must_ be 64 KiB, otherwise the register access can't work. Your current chip select 4 range is less then 1 KiB: 0x10020FFF - 0x1002 = 0xFFF Since you right-shift the start and stop values by 16, the chip select start and stop registers are both 0x1002. The resulting chip select address range is 0. Therefore please set MALab_MM_END value to 0x1003. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Problem reading and programming memory location...
On Wed, 13 Nov 2013 14:48:24 +0100 neorf3k neor...@gmail.com wrote: Yes, that is a device on the lpb via an fpga. We have tried to configure the chip select 4 configuration register at address MBAR + 0x0310, and it seems to be ok. what do you mean with “chip select parameters”? I meant the settings you can set up in the Chip Select 1–7 Configuration Registers, like address and data bus size, wait-states, etc. We have been able to edit it in U-BOOT, and the board (that chip) now works… The strange thing, is that when we read in linux, at that address, we see other content value… Suggestions? if you can access the register under U-Boot and read out the expected values, then the access should work under Linux too, assuming the chip select config is not overwritten somewhere while booting and the register address range is mapped correctly. I don't know your code, so I would first check if the register mapping is done correctly, i.e. check the return value of ioremap() for errors, then check if the chip select configuration is still valid when the kernel is up. Also verify that your fpga is not in the reset state when Linux is running. thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Problem reading and programming memory location...
On Tue, 12 Nov 2013 20:23:20 +0100 neorf3k neor...@gmail.com wrote: we have tried to read and program an 8bit register with 32bit address. we have mapped it with: ioremap, kmalloc etc… and then using: outb, iowrite8 etc.. but when we write to it, the value doesn’t change… with other memory location is ok. That is an 8 bit register, located at 0x1002 in a mpc5200b architecture. we are using kernel 2.6.33. what could be? 0x1002 is not in the internal register memory map, so it is probably a device on the LocalPlus bus. Did you configure the chip select parameters for this device and did you enable the associated chip select? HTH, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Please pull 'next' branch of 5xxx tree
Hi Ben ! Please pull mpc5xxx patches for v3.13: Fixes for build issues when LPB FIFO driver is configured as a module, removal of #ifdefs in mpc512x DIU platform code and a revert of recent changes to mpc52xx PIC driver. Wolfram provided a better fix for PIC driver build issue popping up when older gcc-4.3.5 is used. Thanks, Anatolij The following changes since commit 50bd6153d1a68354a0a0c8bca1fe949fa8875875: powerpc/powernv: Code update interface (2013-10-30 16:12:02 +1100) are available in the git repository at: git://git.denx.de/linux-2.6-agust.git next for you to fetch changes up to 7e198197ec878c720af4dc35c49c0c6a99b83f9f: powerpc/mpc512x: remove unnecessary #if (2013-10-30 22:56:10 +0100) Anatolij Gustschin (1): powerpc/52xx: fix build breakage for MPC5200 LPBFIFO module Brian Norris (1): powerpc/mpc512x: remove unnecessary #if Gerhard Sittig (1): powerpc/mpc512x: silence build warning upon disabled DIU Wolfram Sang (1): Kind of revert powerpc: 52xx: provide a default in mpc52xx_irqhost_map() arch/powerpc/platforms/512x/mpc512x_shared.c | 18 +++--- arch/powerpc/platforms/52xx/Kconfig |2 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c|5 ++--- arch/powerpc/sysdev/fsl_soc.h|3 --- 4 files changed, 10 insertions(+), 18 deletions(-) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH RFC v5 1/5] dma: mpc512x: reorder mpc8308 specific instructions
On Fri, 1 Nov 2013 11:19:30 +0400 Alexander Popov a13xp0p0...@gmail.com wrote: Concentrate the specific code for MPC8308 in the 'if' branch and handle MPC512x in the 'else' branch. This modification only reorders instructions but doesn't change behaviour. Signed-off-by: Alexander Popov a13xp0p0...@gmail.com --- drivers/dma/mpc512x_dma.c | 42 +- 1 file changed, 25 insertions(+), 17 deletions(-) Acked-by: Anatolij Gustschin ag...@denx.de diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c index 2fe4353..f41639f 100644 --- a/drivers/dma/mpc512x_dma.c +++ b/drivers/dma/mpc512x_dma.c @@ -50,9 +50,17 @@ #define MPC_DMA_DESCRIPTORS 64 /* Macro definitions */ -#define MPC_DMA_CHANNELS 64 #define MPC_DMA_TCD_OFFSET 0x1000 +/* + * Maximum channel counts for individual hardware variants + * and the maximum channel count over all supported controllers, + * used for data structure size + */ +#define MPC8308_DMACHAN_MAX 16 +#define MPC512x_DMACHAN_MAX 64 +#define MPC_DMA_CHANNELS 64 + /* Arbitration mode of group and channel */ #define MPC_DMA_DMACR_EDCG (1 31) #define MPC_DMA_DMACR_ERGA (1 3) @@ -708,10 +716,10 @@ static int mpc_dma_probe(struct platform_device *op) dma = mdma-dma; dma-dev = dev; - if (!mdma-is_mpc8308) - dma-chancnt = MPC_DMA_CHANNELS; + if (mdma-is_mpc8308) + dma-chancnt = MPC8308_DMACHAN_MAX; else - dma-chancnt = 16; /* MPC8308 DMA has only 16 channels */ + dma-chancnt = MPC512x_DMACHAN_MAX; dma-device_alloc_chan_resources = mpc_dma_alloc_chan_resources; dma-device_free_chan_resources = mpc_dma_free_chan_resources; dma-device_issue_pending = mpc_dma_issue_pending; @@ -745,7 +753,19 @@ static int mpc_dma_probe(struct platform_device *op) * - Round-robin group arbitration, * - Round-robin channel arbitration. */ - if (!mdma-is_mpc8308) { + if (mdma-is_mpc8308) { + /* MPC8308 has 16 channels and lacks some registers */ + out_be32(mdma-regs-dmacr, MPC_DMA_DMACR_ERCA); + + /* enable snooping */ + out_be32(mdma-regs-dmagpor, MPC_DMA_DMAGPOR_SNOOP_ENABLE); + /* Disable error interrupts */ + out_be32(mdma-regs-dmaeeil, 0); + + /* Clear interrupts status */ + out_be32(mdma-regs-dmaintl, 0x); + out_be32(mdma-regs-dmaerrl, 0x); + } else { out_be32(mdma-regs-dmacr, MPC_DMA_DMACR_EDCG | MPC_DMA_DMACR_ERGA | MPC_DMA_DMACR_ERCA); @@ -766,18 +786,6 @@ static int mpc_dma_probe(struct platform_device *op) /* Route interrupts to IPIC */ out_be32(mdma-regs-dmaihsa, 0); out_be32(mdma-regs-dmailsa, 0); - } else { - /* MPC8308 has 16 channels and lacks some registers */ - out_be32(mdma-regs-dmacr, MPC_DMA_DMACR_ERCA); - - /* enable snooping */ - out_be32(mdma-regs-dmagpor, MPC_DMA_DMAGPOR_SNOOP_ENABLE); - /* Disable error interrupts */ - out_be32(mdma-regs-dmaeeil, 0); - - /* Clear interrupts status */ - out_be32(mdma-regs-dmaintl, 0x); - out_be32(mdma-regs-dmaerrl, 0x); } /* Register DMA engine */ ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2] powerpc/mpc512x: remove unnecessary #if
On Fri, 11 Oct 2013 10:37:38 -0700 Brian Norris computersforpe...@gmail.com wrote: Several functions are only ever referenced locally, so make them static. Of those functions, many of them are protected by an #if. However, the code which can compile fine in either case. Now that (1) the unneeded code is marked 'static' and (2) the code is only used under a C 'if (IS_ENABLED(CONFIG_FB_FSL_DIU))', the compiler can automatically remove the unneeded code, and we don't need the #if or the empty stub functions. Signed-off-by: Brian Norris computersforpe...@gmail.com --- v2: left out a diff I was holding locally (to remove an #if/#endif completely). Sorry for the noise. Based off of Gerhard Sittig's patch: powerpc/mpc512x: silence build warning upon disabled DIU Compile-tested with CONFIG_FB_FSL_DIU=n arch/powerpc/platforms/512x/mpc512x_shared.c | 21 +++-- arch/powerpc/sysdev/fsl_soc.h| 3 --- 2 files changed, 7 insertions(+), 17 deletions(-) Applied, thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc/52xx: fix build breakage for MPC5200 LPBFIFO module
The MPC5200 LPBFIFO driver requires the bestcomm module to be enabled, otherwise building will fail. Fix it. Cc: sta...@vger.kernel.org # 3.10+ Reported-by: Wolfgang Denk w...@denx.de Signed-off-by: Anatolij Gustschin ag...@denx.de --- arch/powerpc/platforms/52xx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig index 90f4496..af54174 100644 --- a/arch/powerpc/platforms/52xx/Kconfig +++ b/arch/powerpc/platforms/52xx/Kconfig @@ -57,5 +57,5 @@ config PPC_MPC5200_BUGFIX config PPC_MPC5200_LPBFIFO tristate MPC5200 LocalPlus bus FIFO driver - depends on PPC_MPC52xx + depends on PPC_MPC52xx PPC_BESTCOMM select PPC_BESTCOMM_GEN_BD -- 1.8.3.1 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [v1] powerpc/mpc512x: silence build warning upon disabled DIU
Hi, On Wed, 9 Oct 2013 12:29:31 -0700 Brian Norris computersforpe...@gmail.com wrote: ... +#else +void __init mpc512x_setup_diu(void) { /* EMPTY */ } +void __init mpc512x_init_diu(void) { /* EMPTY */ } #endif void __init mpc512x_init_IRQ(void) I see an alternative solution: Can't almost all of the code in mpc512x_shared.c be declared 'static'? making mpc512x_setup_diu(), mpc512x_release_bootmem(), mpc512x_valid_monitor_port() and void mpc512x_set_pixel_clock() should be okay. Then, you can get the real benefit of IS_ENABLED() by removing the #if IS_ENABLED(CONFIG_FB_FSL_DIU) from around all the DIU code, and it will automatically be removed by the compiler when it is not used. I think the current patch is necessary for immediate use, and it can be sent to stable. But I might suggest a follow-up patch or 2 that makes the functions static and kills the #ifdef entirely. Yes, we also have to remove CONFIG_FB_FSL_DIU ifdef in arch/powerpc/sysdev/fsl_soc.h and building should work then. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [v1] powerpc/mpc512x: silence build warning upon disabled DIU
Hello, On Thu, 10 Oct 2013 11:23:55 -0700 Brian Norris computersforpe...@gmail.com wrote: ... making mpc512x_setup_diu(), mpc512x_release_bootmem(), mpc512x_valid_monitor_port() and void mpc512x_set_pixel_clock() should be okay. And mpc512x_init_diu()? yes, it can be static, too. Then, you can get the real benefit of IS_ENABLED() by removing the #if IS_ENABLED(CONFIG_FB_FSL_DIU) from around all the DIU code, and it will automatically be removed by the compiler when it is not used. I think the current patch is necessary for immediate use, and it can be sent to stable. But I might suggest a follow-up patch or 2 that makes the functions static and kills the #ifdef entirely. Yes, we also have to remove CONFIG_FB_FSL_DIU ifdef in arch/powerpc/sysdev/fsl_soc.h and building should work then. Still want it around this line, probably, so we'll get compiler errors and not linker errors if someone tries to use it? extern struct platform_diu_data_ops diu_ops; But otherwise that looks OK to me. Shall I send a patch? yes, please. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v1] powerpc/mpc512x: silence build warning upon disabled DIU
On Fri, 27 Sep 2013 17:28:38 +0200 Gerhard Sittig g...@denx.de wrote: a disabled Kconfig option results in a reference to a not implemented routine when the IS_ENABLED() macro is used for both conditional implementation of the routine as well as a C language source code test at the call site -- the if (0) func(); construct only gets eliminated later by the optimizer, while the compiler already has emitted its warning about func() being undeclared applied, thanks! ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] Kind of revert powerpc: 52xx: provide a default in mpc52xx_irqhost_map()
On Fri, 4 Oct 2013 17:37:09 +0200 Wolfram Sang w...@the-dreams.de wrote: This more or less reverts commit 6391f697d4892a6f233501beea553e13f7745a23. Instead of adding an unneeded 'default', mark the variable to prevent the false positive 'uninitialized var'. The other change (fixing the printout) needs revert, too. We want to know WHICH critical irq failed, not which level it had. Signed-off-by: Wolfram Sang w...@the-dreams.de Cc: Sebastian Andrzej Siewior bige...@linutronix.de Cc: Anatolij Gustschin ag...@denx.de applied, thanks! ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Please pull 'next' branch of 5xxx tree
On Thu, 05 Sep 2013 16:50:48 +1000 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: ... Thanks. BTW. Next time, any chance you can base this off the same point in Linus tree where my next branch is based ? Or base of my next branch :-) Okay, I will base of your next branch. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Please pull 'next' branch of 5xxx tree
Hi Ben ! Please pull mpc5xxx patches for v3.12. There are cleanups for some mpc5121 specific drivers and DTS files in preparation to switch mpc5121 clock support to a clock driver based on common clock framework. Additionally Sebastian fixed the mpc52xx PIC driver so that it builds when using older gcc versions. All these patches have already been in linux-next for a while. Thanks, Anatolij The following changes since commit d4e4ab86bcba5a72779c43dc1459f71fea3d89c8: Linux 3.11-rc5 (2013-08-11 18:04:20 -0700) are available in the git repository at: git://git.denx.de/linux-2.6-agust.git next for you to fetch changes up to f2110cb961200e5c382e9d0878ded015109b5dd6: dts: mpc512x: prepare for preprocessor support (2013-08-24 00:18:55 +0200) Gerhard Sittig (6): serial: mpc512x: cleanup clock API use USB: fsl-mph-dr-of: cleanup clock API use mtd: mpc5121_nfc: cleanup clock API use fsl-viu: cleanup clock API use powerpc: mpc512x: array decl for MCLK registers in CCM dts: mpc512x: prepare for preprocessor support Sebastian Siewior (1): powerpc: 52xx: provide a default in mpc52xx_irqhost_map() arch/powerpc/boot/dts/ac14xx.dts |2 +- arch/powerpc/boot/dts/include/dt-bindings |1 + arch/powerpc/boot/dts/mpc5121ads.dts |2 +- arch/powerpc/boot/dts/pdm360ng.dts|2 +- arch/powerpc/include/asm/mpc5121.h| 18 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c |3 +- drivers/media/platform/fsl-viu.c | 23 --- drivers/mtd/nand/mpc5121_nfc.c| 21 --- drivers/tty/serial/mpc52xx_uart.c | 98 - drivers/usb/host/fsl-mph-dr-of.c | 16 ++--- 10 files changed, 123 insertions(+), 63 deletions(-) create mode 12 arch/powerpc/boot/dts/include/dt-bindings ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 04/31] mtd: mpc5121_nfc: cleanup clock API use
On Tue, 6 Aug 2013 22:43:44 +0200 Gerhard Sittig g...@denx.de wrote: use devm_clk_get() for automatic put after device close, check for and propagate errors when enabling clocks, need to prepare clocks before they can get enabled, adjust error code paths to correctly balance get/put and prepare/unprepare and enable/disable calls Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/mtd/nand/mpc5121_nfc.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) Applied to mpc5xxx tree, thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 05/31] [media] fsl-viu: cleanup clock API use
On Tue, 6 Aug 2013 22:43:45 +0200 Gerhard Sittig g...@denx.de wrote: use devm_clk_get() for automatic put after device close, check for and propagate errors when enabling clocks, need to prepare clocks before they can get enabled, adjust code paths to correctly balance get/put and prepare/unprepare and enable/disable calls Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/media/platform/fsl-viu.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) Applied to mpc5xxx tree, thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 12/31] powerpc: mpc512x: array decl for MCLK registers in CCM
On Tue, 6 Aug 2013 22:43:52 +0200 Gerhard Sittig g...@denx.de wrote: reword the clock control module's registers declaration such that the MCLK related registers form an array and get indexed by PSC controller or CAN controller component number this change is in preparation to COMMON_CLK support for the MPC512x platform, the changed declaration remains neutral to existing code since the PSC and MSCAN CCR fields declared here aren't referenced anywhere Signed-off-by: Gerhard Sittig g...@denx.de --- arch/powerpc/include/asm/mpc5121.h | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) Applied, thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3 13/31] clk: wrap I/O access for improved portability
On Fri, 02 Aug 2013 15:30:00 -0700 Mike Turquette mturque...@linaro.org wrote: Quoting Gerhard Sittig (2013-07-22 05:14:40) the common clock drivers were motivated/initiated by ARM development and apparently assume little endian peripherals wrap register/peripherals access in the common code (div, gate, mux) in preparation of adding COMMON_CLK support for other platforms Signed-off-by: Gerhard Sittig g...@denx.de I've taken this into clk-next for testing. regmap deserves investigation but I don't think your series should be blocked on that. We can always overhaul the basic clock primitives with regmap support later on if that makes sense. Mike, I cannot see it in clk-next branch of git://git.linaro.org/people/mturquette/linux.git Can you please check? Or am I looking in the wrong place? Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 14/31] dts: mpc512x: prepare for preprocessor support
On Tue, 6 Aug 2013 22:43:54 +0200 Gerhard Sittig g...@denx.de wrote: prepare C preprocessor support when processing MPC512x DTS files - switch from DTS syntax to CPP syntax for include specs - create a symlink such that DTS processing can reference includes Signed-off-by: Gerhard Sittig g...@denx.de --- arch/powerpc/boot/dts/ac14xx.dts |2 +- arch/powerpc/boot/dts/include/dt-bindings |1 + arch/powerpc/boot/dts/mpc5121ads.dts |2 +- arch/powerpc/boot/dts/pdm360ng.dts|2 +- 4 files changed, 4 insertions(+), 3 deletions(-) create mode 12 arch/powerpc/boot/dts/include/dt-bindings Applied, thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 01/31] spi: mpc512x: cleanup clock API use
On Tue, 6 Aug 2013 22:43:41 +0200 Gerhard Sittig g...@denx.de wrote: cleanup the MPC512x SoC's SPI master's use of the clock API - get, prepare, and enable the MCLK during probe; disable, unprepare and put the MCLK upon remove; hold a reference to the clock over the period of use - fetch MCLK rate (reference) once during probe and slightly reword BCLK (bitrate) determination to reduce redundancy as well as to not exceed the maximum text line length - stick with the PPC_CLOCK 'psc%d_mclk' name for clock lookup, only switch to a fixed string later after device tree based clock lookup will have become available Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/spi/spi-mpc512x-psc.c | 48 + 1 file changed, 30 insertions(+), 18 deletions(-) Mark, are you going to apply this patch? Or should I queue it in my mpc5xxx tree (I'd like to get your Acked-by then)? Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 02/31] serial: mpc512x: cleanup clock API use
On Tue, 6 Aug 2013 22:43:42 +0200 Gerhard Sittig g...@denx.de wrote: cleanup the clock API use of the UART driver which is shared among the MPC512x and the MPC5200 platforms - get, prepare, and enable the MCLK during port allocation; disable, unprepare and put the MCLK upon port release; hold a reference to the clock over the period of use; check for and propagate enable errors - fix a buffer overflow for clock names with two digit PSC index numbers - stick with the PPC_CLOCK 'psc%d_mclk' name for clock lookup, only switch to a fixed string later after device tree based clock lookup will have become available to achieve support for MPC512x which is neutral to MPC5200, the modification was done as follows - introduce clock alloc and clock release routines in addition to the previous clock enable/disable routine in the psc_ops struct - make the clock allocation a part of the port request (resource allocation), and make clock release a part of the port release, such that essential resources get allocated early - just enable/disable the clock from within the .clock() callback without any allocation or preparation as the former implementation did, since this routine is called from within the startup and shutdown callbacks - all of the above remains a NOP for the MPC5200 platform (no callbacks are provided on that platform) - implementation note: the clock gets enabled upon allocation already just in case the clock is not only required for bitrate generation but for register access as well Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/tty/serial/mpc52xx_uart.c | 98 ++--- 1 file changed, 81 insertions(+), 17 deletions(-) applied, thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 01/31] spi: mpc512x: cleanup clock API use
On Wed, 21 Aug 2013 20:48:17 +0100 Mark Brown broo...@kernel.org wrote: On Wed, Aug 21, 2013 at 09:22:58PM +0200, Anatolij Gustschin wrote: Mark, are you going to apply this patch? Or should I queue it in my mpc5xxx tree (I'd like to get your Acked-by then)? Has this series settled down? I'd been ignoring it since it was getting so many and so frequent revisions. Patches 01 - 14 (except 09 and 11) won't change I think. I'd prefer to queue them for v3.12, so there will be no need to resubmit again and again. Other patches are not ready yet. Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 03/31] USB: fsl-mph-dr-of: cleanup clock API use
On Tue, 6 Aug 2013 22:43:43 +0200 Gerhard Sittig g...@denx.de wrote: use devm_get_clk() for automatic put upon device close, check for and propagate errors when enabling clocks, must prepare clocks before they can get enabled, unprepare after disable Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/usb/host/fsl-mph-dr-of.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) applied, thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: 52xx: provide a default in mpc52xx_irqhost_map()
On Mon, 12 Aug 2013 16:17:53 +0200 Sebastian Andrzej Siewior bige...@linutronix.de wrote: My gcc-4.3.5 fails to compile due to: |cc1: warnings being treated as errors |arch/powerpc/platforms/52xx/mpc52xx_pic.c: In function ‘mpc52xx_irqhost_map’: |arch/powerpc/platforms/52xx/mpc52xx_pic.c:343: error: ‘irqchip’ may be used uninitialized in this function since commit e34298c (powerpc: 52xx: nop out unsupported critical IRQs). This warning is complete crap since only values 0…3 are possible which are checked but gcc fails to understand that. I wouldn't care much but since this is compiled with -Werror I made this patch. While add it, I replaced the warning from l2irq to l1irq since this is the number that is evaluated. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Applied, thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 09/31] powerpc/fsl-pci: improve clock API use
On Tue, 6 Aug 2013 22:43:49 +0200 Gerhard Sittig g...@denx.de wrote: ... diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 46ac1dd..549ff08 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c ... + clk = devm_clk_get(pdev-dev, per); + if (!IS_ERR(clk)) { + ret = clk_prepare_enable(clk); + if (ret) { + dev_err(dev, Could not enable peripheral clock\n); above line will break building. s/dev,/pdev-dev,/ Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Failure to detect PCI card
On Mon, 5 Aug 2013 16:14:29 -0700 Peter LaDow pet...@gocougs.wsu.edu wrote: ... Perhaps it is a BIOS option ROM like you suggested earlier. The 3c90xC reference manual I found (http://people.freebsd.org/~wpaul/3Com/3c90xc.pdf) mentions an option ROM (and there is an Atmel part stuffed). I can't find any technical information on the FA331 (yet), so I don't know about it. But regardless, wouldn't enumeration have to occur before any option ROM could even be used? Yes. If the device didn't respond with its Device- and Vendor-ID when reading its configuration space, then it cannot be configured and reading the expansion ROM won't work. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Failure to detect PCI card
On Mon, 5 Aug 2013 10:58:01 -0700 Peter LaDow pet...@gocougs.wsu.edu wrote: I have a PCI card (a Netgear FA331, vendor:device 100b:0020) that is failing to be detected by our PPC platform. This device works just fine in a PC, and other cards work just fine in the same PCI slot (we have an Intel 82540EM based card that works). But for some reason, neither u-boot nor the kernel detect this card. Any ideas why this might be? Maybe this card needs bigger delay to respond after PCI reset. You can try to re-build U-Boot with defined CONFIG_PCI_BOOTDELAY. Use 1000 for CONFIG_PCI_BOOTDELAY in the first step and if detection works, try to decrease this value. HTH, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Please pull 'next' branch of 5xxx tree
On Tue, 02 Jul 2013 17:46:01 +1000 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Tue, 2013-07-02 at 00:36 +0200, Anatolij Gustschin wrote: Hi Ben ! Please pull mpc5xxx patches for v3.11. There are small cleanups and fixes for mpc512x common code, mpc512x_defconfig updates and soft reboot support for mpc5125 based boards. Looks like your server is down... The server should be up, a recent test pull succeeded here. Could you please try again? Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Please pull 'next' branch of 5xxx tree
On Tue, 02 Jul 2013 20:29:02 +1000 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: ... The server should be up, a recent test pull succeeded here. Could you please try again? Just a fluke indeed, works now. Pulled pushed. Thanks! Cheers, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc/mpc512x: update defconfig
On Sun, 30 Jun 2013 18:23:00 +0200 Gerhard Sittig g...@denx.de wrote: ... In hindsight, I'd prefer to reword the subject to something more specific, unless it's too late for this now. I suggest: [PATCH] powerpc/mpc512x: commit re-generated defconfig But if the patch is already queued somewhere, or is acceptable with the more generic subject, that's fine with me as well. I've changed the subject as suggested when commiting the patch. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Please pull 'next' branch of 5xxx tree
Hi Ben ! Please pull mpc5xxx patches for v3.11. There are small cleanups and fixes for mpc512x common code, mpc512x_defconfig updates and soft reboot support for mpc5125 based boards. Thanks, Anatolij The following changes since commit c7788792a5e7b0d5d7f96d0766b4cb6112d47d75: Linux 3.10-rc2 (2013-05-20 14:37:38 -0700) are available in the git repository at: git://git.denx.de/linux-2.6-agust.git next for you to fetch changes up to dd0120dea601de654a5a6d959da3a632a02200f0: powerpc/mpc512x: enable USB support in defconfig (2013-06-25 08:51:19 +0200) Anatolij Gustschin (1): powerpc/mpc512x: enable USB support in defconfig Gerhard Sittig (3): powerpc/mpc512x: move common code to shared.c file powerpc/mpc512x: initialize board restart earlier powerpc/mpc512x: commit re-generated defconfig Matteo Facchinetti (1): powerpc/mpc512x: add MPC5125 reset module support for system restart arch/powerpc/configs/mpc512x_defconfig| 27 - arch/powerpc/include/asm/mpc5121.h|1 - arch/powerpc/platforms/512x/mpc5121_ads.c |6 ++--- arch/powerpc/platforms/512x/mpc512x.h | 12 +++--- arch/powerpc/platforms/512x/mpc512x_generic.c |4 ++-- arch/powerpc/platforms/512x/mpc512x_shared.c | 31 ++--- arch/powerpc/platforms/512x/pdm360ng.c|4 ++-- 7 files changed, 47 insertions(+), 38 deletions(-) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc/mpc512x: update defconfig
From: Gerhard Sittig g...@denx.de This patch does not change the content, it merely re-orders configuration items and drops explicit options which already apply as the default. Signed-off-by: Gerhard Sittig g...@denx.de Signed-off-by: Anatolij Gustschin ag...@denx.de --- arch/powerpc/configs/mpc512x_defconfig | 20 +++- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/configs/mpc512x_defconfig b/arch/powerpc/configs/mpc512x_defconfig index 0d0d981..5b8ee80 100644 --- a/arch/powerpc/configs/mpc512x_defconfig +++ b/arch/powerpc/configs/mpc512x_defconfig @@ -1,7 +1,6 @@ -CONFIG_EXPERIMENTAL=y # CONFIG_SWAP is not set CONFIG_SYSVIPC=y -CONFIG_SPARSE_IRQ=y +CONFIG_NO_HZ=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_BLK_DEV_INITRD=y # CONFIG_COMPAT_BRK is not set @@ -9,6 +8,7 @@ CONFIG_SLAB=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set +CONFIG_PARTITION_ADVANCED=y # CONFIG_IOSCHED_CFQ is not set # CONFIG_PPC_CHRP is not set CONFIG_PPC_MPC512x=y @@ -16,9 +16,7 @@ CONFIG_MPC5121_ADS=y CONFIG_MPC512x_GENERIC=y CONFIG_PDM360NG=y # CONFIG_PPC_PMAC is not set -CONFIG_NO_HZ=y CONFIG_HZ_1000=y -# CONFIG_MIGRATION is not set # CONFIG_SECCOMP is not set # CONFIG_PCI is not set CONFIG_NET=y @@ -33,8 +31,6 @@ CONFIG_IP_PNP=y # CONFIG_INET_DIAG is not set # CONFIG_IPV6 is not set CONFIG_CAN=y -CONFIG_CAN_RAW=y -CONFIG_CAN_BCM=y CONFIG_CAN_VCAN=y CONFIG_CAN_MSCAN=y CONFIG_CAN_DEBUG_DEVICES=y @@ -46,7 +42,6 @@ CONFIG_DEVTMPFS_MOUNT=y # CONFIG_FIRMWARE_IN_KERNEL is not set CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y CONFIG_MTD_BLOCK=y CONFIG_MTD_CFI=y CONFIG_MTD_CFI_AMDSTD=y @@ -60,7 +55,6 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=1 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_XIP=y -CONFIG_MISC_DEVICES=y CONFIG_EEPROM_AT24=y CONFIG_EEPROM_AT25=y CONFIG_SCSI=y @@ -68,6 +62,7 @@ CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_SG=y CONFIG_NETDEVICES=y +CONFIG_FS_ENET=y CONFIG_MARVELL_PHY=y CONFIG_DAVICOM_PHY=y CONFIG_QSEMI_PHY=y @@ -83,10 +78,6 @@ CONFIG_STE10XP=y CONFIG_LSI_ET1011C_PHY=y CONFIG_FIXED_PHY=y CONFIG_MDIO_BITBANG=y -CONFIG_NET_ETHERNET=y -CONFIG_FS_ENET=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_1 is not set # CONFIG_WLAN is not set # CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_EVDEV=y @@ -106,10 +97,7 @@ CONFIG_GPIO_SYSFS=y CONFIG_GPIO_MPC8XXX=y # CONFIG_HWMON is not set CONFIG_MEDIA_SUPPORT=y -CONFIG_VIDEO_DEV=y CONFIG_VIDEO_ADV_DEBUG=y -# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set -CONFIG_VIDEO_SAA711X=y CONFIG_FB=y CONFIG_FB_FSL_DIU=y # CONFIG_VGA_CONSOLE is not set @@ -129,9 +117,7 @@ CONFIG_TMPFS=y CONFIG_JFFS2_FS=y CONFIG_UBIFS_FS=y CONFIG_NFS_FS=y -CONFIG_NFS_V3=y CONFIG_ROOT_NFS=y -CONFIG_PARTITION_ADVANCED=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y # CONFIG_ENABLE_WARN_DEPRECATED is not set -- 1.7.9.5 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc/mpc512x: enable USB support in defconfig
Enable USB EHCI, mass storage and USB gadget support. Signed-off-by: Anatolij Gustschin ag...@denx.de --- arch/powerpc/configs/mpc512x_defconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/configs/mpc512x_defconfig b/arch/powerpc/configs/mpc512x_defconfig index 5b8ee80..ee853a1 100644 --- a/arch/powerpc/configs/mpc512x_defconfig +++ b/arch/powerpc/configs/mpc512x_defconfig @@ -102,6 +102,13 @@ CONFIG_FB=y CONFIG_FB_FSL_DIU=y # CONFIG_VGA_CONSOLE is not set CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_FSL=y +# CONFIG_USB_EHCI_HCD_PPC_OF is not set +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_FSL_USB2=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_M41T80=y CONFIG_RTC_DRV_MPC5121=y -- 1.7.11.7 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 1/2] serial/mpc52xx_uart: prepare for adding MPC5125 PSC UART support
On Wed, 17 Apr 2013 23:21:41 +0200 Anatolij Gustschin ag...@denx.de wrote: From: Matteo Facchinetti matteo.facchine...@sirius-es.it MPC5125 PSC controller has different register layout than MPC5121. To support MPC5125 PSC in this driver we have to provide further psc_ops functions for SoC specific register accesses. Add new register access functions to the psc_ops structure and provide MPC52xx and MPC512x specific implementation for them. Then replace remaining direct register accesses in the driver by appropriate psc_ops function calls. The subsequent patch can now add MPC5125 specific set of psc_ops functions. Signed-off-by: Vladimir Ermakov vooon...@gmail.com Signed-off-by: Matteo Facchinetti matteo.facchine...@sirius-es.it Signed-off-by: Anatolij Gustschin ag...@denx.de --- Greg, with your Acked-by I can push these patches to my mpc5xxx tree. But it is fine with me if you prefer to apply them to tty tree. ping ... Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH RESEND v2 1/2] serial/mpc52xx_uart: prepare for adding MPC5125 PSC UART support
From: Matteo Facchinetti matteo.facchine...@sirius-es.it MPC5125 PSC controller has different register layout than MPC5121. To support MPC5125 PSC in this driver we have to provide further psc_ops functions for SoC specific register accesses. Add new register access functions to the psc_ops structure and provide MPC52xx and MPC512x specific implementation for them. Then replace remaining direct register accesses in the driver by appropriate psc_ops function calls. The subsequent patch can now add MPC5125 specific set of psc_ops functions. Signed-off-by: Vladimir Ermakov vooon...@gmail.com Signed-off-by: Matteo Facchinetti matteo.facchine...@sirius-es.it Signed-off-by: Anatolij Gustschin ag...@denx.de --- Changes in v2: - split into two patches to simplify review - minor coding style changes - revise commit log drivers/tty/serial/mpc52xx_uart.c | 161 +++-- 1 file changed, 119 insertions(+), 42 deletions(-) diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c index 018bad9..5aa87ac 100644 --- a/drivers/tty/serial/mpc52xx_uart.c +++ b/drivers/tty/serial/mpc52xx_uart.c @@ -122,6 +122,15 @@ struct psc_ops { void(*fifoc_uninit)(void); void(*get_irq)(struct uart_port *, struct device_node *); irqreturn_t (*handle_irq)(struct uart_port *port); + u16 (*get_status)(struct uart_port *port); + u8 (*get_ipcr)(struct uart_port *port); + void(*command)(struct uart_port *port, u8 cmd); + void(*set_mode)(struct uart_port *port, u8 mr1, u8 mr2); + void(*set_rts)(struct uart_port *port, int state); + void(*enable_ms)(struct uart_port *port); + void(*set_sicr)(struct uart_port *port, u32 val); + void(*set_imr)(struct uart_port *port, u16 val); + u8 (*get_mr1)(struct uart_port *port); }; /* setting the prescaler and divisor reg is common for all chips */ @@ -134,6 +143,65 @@ static inline void mpc52xx_set_divisor(struct mpc52xx_psc __iomem *psc, out_8(psc-ctlr, divisor 0xff); } +static u16 mpc52xx_psc_get_status(struct uart_port *port) +{ + return in_be16(PSC(port)-mpc52xx_psc_status); +} + +static u8 mpc52xx_psc_get_ipcr(struct uart_port *port) +{ + return in_8(PSC(port)-mpc52xx_psc_ipcr); +} + +static void mpc52xx_psc_command(struct uart_port *port, u8 cmd) +{ + out_8(PSC(port)-command, cmd); +} + +static void mpc52xx_psc_set_mode(struct uart_port *port, u8 mr1, u8 mr2) +{ + out_8(PSC(port)-command, MPC52xx_PSC_SEL_MODE_REG_1); + out_8(PSC(port)-mode, mr1); + out_8(PSC(port)-mode, mr2); +} + +static void mpc52xx_psc_set_rts(struct uart_port *port, int state) +{ + if (state) + out_8(PSC(port)-op1, MPC52xx_PSC_OP_RTS); + else + out_8(PSC(port)-op0, MPC52xx_PSC_OP_RTS); +} + +static void mpc52xx_psc_enable_ms(struct uart_port *port) +{ + struct mpc52xx_psc __iomem *psc = PSC(port); + + /* clear D_*-bits by reading them */ + in_8(psc-mpc52xx_psc_ipcr); + /* enable CTS and DCD as IPC interrupts */ + out_8(psc-mpc52xx_psc_acr, MPC52xx_PSC_IEC_CTS | MPC52xx_PSC_IEC_DCD); + + port-read_status_mask |= MPC52xx_PSC_IMR_IPC; + out_be16(psc-mpc52xx_psc_imr, port-read_status_mask); +} + +static void mpc52xx_psc_set_sicr(struct uart_port *port, u32 val) +{ + out_be32(PSC(port)-sicr, val); +} + +static void mpc52xx_psc_set_imr(struct uart_port *port, u16 val) +{ + out_be16(PSC(port)-mpc52xx_psc_imr, val); +} + +static u8 mpc52xx_psc_get_mr1(struct uart_port *port) +{ + out_8(PSC(port)-command, MPC52xx_PSC_SEL_MODE_REG_1); + return in_8(PSC(port)-mode); +} + #ifdef CONFIG_PPC_MPC52xx #define FIFO_52xx(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1)) static void mpc52xx_psc_fifo_init(struct uart_port *port) @@ -304,6 +372,15 @@ static struct psc_ops mpc52xx_psc_ops = { .set_baudrate = mpc5200_psc_set_baudrate, .get_irq = mpc52xx_psc_get_irq, .handle_irq = mpc52xx_psc_handle_irq, + .get_status = mpc52xx_psc_get_status, + .get_ipcr = mpc52xx_psc_get_ipcr, + .command = mpc52xx_psc_command, + .set_mode = mpc52xx_psc_set_mode, + .set_rts = mpc52xx_psc_set_rts, + .enable_ms = mpc52xx_psc_enable_ms, + .set_sicr = mpc52xx_psc_set_sicr, + .set_imr = mpc52xx_psc_set_imr, + .get_mr1 = mpc52xx_psc_get_mr1, }; static struct psc_ops mpc5200b_psc_ops = { @@ -325,6 +402,15 @@ static struct psc_ops mpc5200b_psc_ops = { .set_baudrate = mpc5200b_psc_set_baudrate, .get_irq = mpc52xx_psc_get_irq, .handle_irq = mpc52xx_psc_handle_irq, + .get_status = mpc52xx_psc_get_status, + .get_ipcr = mpc52xx_psc_get_ipcr, + .command = mpc52xx_psc_command, + .set_mode = mpc52xx_psc_set_mode
[PATCH RESEND v2 2/2] serial/mpc52xx_uart: add MPC5125 PSC support
From: Matteo Facchinetti matteo.facchine...@sirius-es.it Add MPC5125 PSC register layout structure, MPC5125 specific psc_ops function set and the compatible string. Signed-off-by: Vladimir Ermakov vooon...@gmail.com Signed-off-by: Matteo Facchinetti matteo.facchine...@sirius-es.it Signed-off-by: Anatolij Gustschin ag...@denx.de --- Changes in v2: - split into two patches to simplify review - minor coding style changes - revise commit log arch/powerpc/include/asm/mpc52xx_psc.h | 49 +++ drivers/tty/serial/mpc52xx_uart.c | 241 2 files changed, 290 insertions(+) diff --git a/arch/powerpc/include/asm/mpc52xx_psc.h b/arch/powerpc/include/asm/mpc52xx_psc.h index 2966df6..d0ece25 100644 --- a/arch/powerpc/include/asm/mpc52xx_psc.h +++ b/arch/powerpc/include/asm/mpc52xx_psc.h @@ -299,4 +299,53 @@ struct mpc512x_psc_fifo { #define rxdata_32 rxdata.rxdata_32 }; +struct mpc5125_psc { + u8 mr1;/* PSC + 0x00 */ + u8 reserved0[3]; + u8 mr2;/* PSC + 0x04 */ + u8 reserved1[3]; + struct { + u16 status; /* PSC + 0x08 */ + u8 reserved2[2]; + u8 clock_select; /* PSC + 0x0c */ + u8 reserved3[3]; + } sr_csr; + u8 command;/* PSC + 0x10 */ + u8 reserved4[3]; + union { /* PSC + 0x14 */ + u8 buffer_8; + u16 buffer_16; + u32 buffer_32; + } buffer; + struct { + u8 ipcr; /* PSC + 0x18 */ + u8 reserved5[3]; + u8 acr;/* PSC + 0x1c */ + u8 reserved6[3]; + } ipcr_acr; + struct { + u16 isr;/* PSC + 0x20 */ + u8 reserved7[2]; + u16 imr;/* PSC + 0x24 */ + u8 reserved8[2]; + } isr_imr; + u8 ctur; /* PSC + 0x28 */ + u8 reserved9[3]; + u8 ctlr; /* PSC + 0x2c */ + u8 reserved10[3]; + u32 ccr;/* PSC + 0x30 */ + u32 ac97slots; /* PSC + 0x34 */ + u32 ac97cmd;/* PSC + 0x38 */ + u32 ac97data; /* PSC + 0x3c */ + u8 reserved11[4]; + u8 ip; /* PSC + 0x44 */ + u8 reserved12[3]; + u8 op1;/* PSC + 0x48 */ + u8 reserved13[3]; + u8 op0;/* PSC + 0x4c */ + u8 reserved14[3]; + u32 sicr; /* PSC + 0x50 */ + u8 reserved15[4]; /* make eq. sizeof(mpc52xx_psc) */ +}; + #endif /* __ASM_MPC52xx_PSC_H__ */ diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c index 5aa87ac..9c3eab5 100644 --- a/drivers/tty/serial/mpc52xx_uart.c +++ b/drivers/tty/serial/mpc52xx_uart.c @@ -658,6 +658,246 @@ static void mpc512x_psc_get_irq(struct uart_port *port, struct device_node *np) port-irqflags = IRQF_SHARED; port-irq = psc_fifoc_irq; } +#endif + +#ifdef CONFIG_PPC_MPC512x + +#define PSC_5125(port) ((struct mpc5125_psc __iomem *)((port)-membase)) +#define FIFO_5125(port) ((struct mpc512x_psc_fifo __iomem *)(PSC_5125(port)+1)) + +static void mpc5125_psc_fifo_init(struct uart_port *port) +{ + /* /32 prescaler */ + out_8(PSC_5125(port)-mpc52xx_psc_clock_select, 0xdd); + + out_be32(FIFO_5125(port)-txcmd, MPC512x_PSC_FIFO_RESET_SLICE); + out_be32(FIFO_5125(port)-txcmd, MPC512x_PSC_FIFO_ENABLE_SLICE); + out_be32(FIFO_5125(port)-txalarm, 1); + out_be32(FIFO_5125(port)-tximr, 0); + + out_be32(FIFO_5125(port)-rxcmd, MPC512x_PSC_FIFO_RESET_SLICE); + out_be32(FIFO_5125(port)-rxcmd, MPC512x_PSC_FIFO_ENABLE_SLICE); + out_be32(FIFO_5125(port)-rxalarm, 1); + out_be32(FIFO_5125(port)-rximr, 0); + + out_be32(FIFO_5125(port)-tximr, MPC512x_PSC_FIFO_ALARM); + out_be32(FIFO_5125(port)-rximr, MPC512x_PSC_FIFO_ALARM); +} + +static int mpc5125_psc_raw_rx_rdy(struct uart_port *port) +{ + return !(in_be32(FIFO_5125(port)-rxsr) MPC512x_PSC_FIFO_EMPTY); +} + +static int mpc5125_psc_raw_tx_rdy(struct uart_port *port) +{ + return !(in_be32(FIFO_5125(port)-txsr) MPC512x_PSC_FIFO_FULL); +} + +static int mpc5125_psc_rx_rdy(struct uart_port *port) +{ + return in_be32(FIFO_5125(port)-rxsr) + in_be32(FIFO_5125(port)-rximr
Re: [PATCH v1 0/2] powerpc/mpc512x: improve common platform code
Hi Gerhard, On Tue, 14 May 2013 16:40:52 +0200 Gerhard Sittig g...@denx.de wrote: ... Gerhard Sittig (2): powerpc/mpc512x: move common code to the shared.c file powerpc/mpc512x: initialize board restart earlier Applied both patches for -next. Thanks! Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/1] powerpc: mpc512x_dma: add support for data transfers between memory and i/o memory
On Fri, 3 May 2013 10:28:02 +0400 Alexander Popov a13xp0p0...@gmail.com wrote: Hello Vinod, Thanks for the review. I will return with improved and tested version 2. Note that there is a patch for .device_prep_slave_sg() operation for this driver as part of this series: https://patchwork.kernel.org/patch/2368581/ https://patchwork.kernel.org/patch/2368591/ maybe you can reuse and improve it. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/1] powerpc: mpc512x_dma: add support for data transfers between memory and i/o memory
Hello Alexander, On Fri, 3 May 2013 14:43:23 +0400 Alexander Popov a13xp0p0...@gmail.com wrote: Hello Anatolij, Note that there is a patch for .device_prep_slave_sg() operation for this driver as part of this series: https://patchwork.kernel.org/patch/2368581/ https://patchwork.kernel.org/patch/2368591/ Thanks, I haven't seen that patch. It's certainly what my SCLPC device driver needs (http://patchwork.ozlabs.org/patch/241010/). I will send the second version of it which uses .device_prep_slave_sg(). maybe you can reuse and improve it. Anatolij Should I propose my additions at https://patchwork.kernel.org/patch/2368591/ ? Yes, I think so. I only used drivers new .device_prep_slave_sg() for SDHC DMA channel transfers up to now. Adding support for other peripherals would be good. With generic DMA DT bindings patch for this driver you can use dmas = dma0 26; dma-names = rx-tx; in your sclpc@10100 DT node and then dma_request_slave_channel(pdev-dev, rx-tx) in the lpbfifo driver. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Please pull 'next' branch of 5xxx tree
Hi Ben ! Please pull mpc5xxx patches for v3.10. There are some changes for mpc5121 generic platform code to support mpc5125 SoC and DTS files for ac14xx and MPC5125-TWR boards. All these patches have already been in linux-next for a while. Thanks, Anatolij The following changes since commit 07961ac7c0ee8b546658717034fe692fd12eefa9: Linux 3.9-rc5 (2013-03-31 15:12:43 -0700) are available in the git repository at: git://git.denx.de/linux-2.6-agust.git next for you to fetch changes up to fdeaf0e20e9f3999c5cb129e821595fe927bf259: powerpc/512x: add ifm ac14xx board (2013-04-10 20:48:44 +0200) Anatolij Gustschin (2): powerpc/mpc512x: create SoC devices for more nodes powerpc/512x: add ifm ac14xx board Matteo Facchinetti (2): powerpc/512x: move mpc5121_generic platform to mpc512x_generic. powerpc/mpc512x: add platform code for MPC5125. arch/powerpc/boot/dts/ac14xx.dts | 392 arch/powerpc/boot/dts/mpc5121.dtsi |2 +- arch/powerpc/boot/dts/mpc5121ads.dts |2 +- arch/powerpc/boot/dts/mpc5125twr.dts | 233 arch/powerpc/boot/dts/pdm360ng.dts |2 +- arch/powerpc/configs/mpc512x_defconfig |2 +- arch/powerpc/platforms/512x/Kconfig|8 +- arch/powerpc/platforms/512x/Makefile |2 +- arch/powerpc/platforms/512x/clock.c|9 +- arch/powerpc/platforms/512x/mpc512x.h |1 + .../512x/{mpc5121_generic.c = mpc512x_generic.c} | 12 +- arch/powerpc/platforms/512x/mpc512x_shared.c | 33 +- 12 files changed, 674 insertions(+), 24 deletions(-) create mode 100644 arch/powerpc/boot/dts/ac14xx.dts create mode 100644 arch/powerpc/boot/dts/mpc5125twr.dts rename arch/powerpc/platforms/512x/{mpc5121_generic.c = mpc512x_generic.c} (83%) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/1] usb: ehci-fsl: set INCR8 mode only on MPC512x
On Wed, 24 Apr 2013 10:55:10 +0800 Tiejun Chen tiejun.c...@windriver.com wrote: commit 761bbcb7, usb: ehci-fsl: set INCR8 mode for system bus interface on MPC512x, introduced to fix one MPC5121e (M36P) Errata by setting INCR8 mode for system bus interface on MPC512x, but we should make sure this is only valid for MPC512x like other parts of this commit. Otherwise NAK. It is already only valid for MPC512x. this would issue other platforms as abnormal without this similar Errata. This setting is in the ehci_fsl_mpc512x_drv_resume() function which is not called on other platforms. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v2 2/2] serial/mpc52xx_uart: add MPC5125 PSC support
From: Matteo Facchinetti matteo.facchine...@sirius-es.it Add MPC5125 PSC register layout structure, MPC5125 specific psc_ops function set and the compatible string. Signed-off-by: Vladimir Ermakov vooon...@gmail.com Signed-off-by: Matteo Facchinetti matteo.facchine...@sirius-es.it Signed-off-by: Anatolij Gustschin ag...@denx.de --- Changes in v2: - split into two patches to simplify review - minor coding style changes - revise commit log arch/powerpc/include/asm/mpc52xx_psc.h | 49 +++ drivers/tty/serial/mpc52xx_uart.c | 241 2 files changed, 290 insertions(+) diff --git a/arch/powerpc/include/asm/mpc52xx_psc.h b/arch/powerpc/include/asm/mpc52xx_psc.h index 2966df6..d0ece25 100644 --- a/arch/powerpc/include/asm/mpc52xx_psc.h +++ b/arch/powerpc/include/asm/mpc52xx_psc.h @@ -299,4 +299,53 @@ struct mpc512x_psc_fifo { #define rxdata_32 rxdata.rxdata_32 }; +struct mpc5125_psc { + u8 mr1;/* PSC + 0x00 */ + u8 reserved0[3]; + u8 mr2;/* PSC + 0x04 */ + u8 reserved1[3]; + struct { + u16 status; /* PSC + 0x08 */ + u8 reserved2[2]; + u8 clock_select; /* PSC + 0x0c */ + u8 reserved3[3]; + } sr_csr; + u8 command;/* PSC + 0x10 */ + u8 reserved4[3]; + union { /* PSC + 0x14 */ + u8 buffer_8; + u16 buffer_16; + u32 buffer_32; + } buffer; + struct { + u8 ipcr; /* PSC + 0x18 */ + u8 reserved5[3]; + u8 acr;/* PSC + 0x1c */ + u8 reserved6[3]; + } ipcr_acr; + struct { + u16 isr;/* PSC + 0x20 */ + u8 reserved7[2]; + u16 imr;/* PSC + 0x24 */ + u8 reserved8[2]; + } isr_imr; + u8 ctur; /* PSC + 0x28 */ + u8 reserved9[3]; + u8 ctlr; /* PSC + 0x2c */ + u8 reserved10[3]; + u32 ccr;/* PSC + 0x30 */ + u32 ac97slots; /* PSC + 0x34 */ + u32 ac97cmd;/* PSC + 0x38 */ + u32 ac97data; /* PSC + 0x3c */ + u8 reserved11[4]; + u8 ip; /* PSC + 0x44 */ + u8 reserved12[3]; + u8 op1;/* PSC + 0x48 */ + u8 reserved13[3]; + u8 op0;/* PSC + 0x4c */ + u8 reserved14[3]; + u32 sicr; /* PSC + 0x50 */ + u8 reserved15[4]; /* make eq. sizeof(mpc52xx_psc) */ +}; + #endif /* __ASM_MPC52xx_PSC_H__ */ diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c index 5aa87ac..9c3eab5 100644 --- a/drivers/tty/serial/mpc52xx_uart.c +++ b/drivers/tty/serial/mpc52xx_uart.c @@ -658,6 +658,246 @@ static void mpc512x_psc_get_irq(struct uart_port *port, struct device_node *np) port-irqflags = IRQF_SHARED; port-irq = psc_fifoc_irq; } +#endif + +#ifdef CONFIG_PPC_MPC512x + +#define PSC_5125(port) ((struct mpc5125_psc __iomem *)((port)-membase)) +#define FIFO_5125(port) ((struct mpc512x_psc_fifo __iomem *)(PSC_5125(port)+1)) + +static void mpc5125_psc_fifo_init(struct uart_port *port) +{ + /* /32 prescaler */ + out_8(PSC_5125(port)-mpc52xx_psc_clock_select, 0xdd); + + out_be32(FIFO_5125(port)-txcmd, MPC512x_PSC_FIFO_RESET_SLICE); + out_be32(FIFO_5125(port)-txcmd, MPC512x_PSC_FIFO_ENABLE_SLICE); + out_be32(FIFO_5125(port)-txalarm, 1); + out_be32(FIFO_5125(port)-tximr, 0); + + out_be32(FIFO_5125(port)-rxcmd, MPC512x_PSC_FIFO_RESET_SLICE); + out_be32(FIFO_5125(port)-rxcmd, MPC512x_PSC_FIFO_ENABLE_SLICE); + out_be32(FIFO_5125(port)-rxalarm, 1); + out_be32(FIFO_5125(port)-rximr, 0); + + out_be32(FIFO_5125(port)-tximr, MPC512x_PSC_FIFO_ALARM); + out_be32(FIFO_5125(port)-rximr, MPC512x_PSC_FIFO_ALARM); +} + +static int mpc5125_psc_raw_rx_rdy(struct uart_port *port) +{ + return !(in_be32(FIFO_5125(port)-rxsr) MPC512x_PSC_FIFO_EMPTY); +} + +static int mpc5125_psc_raw_tx_rdy(struct uart_port *port) +{ + return !(in_be32(FIFO_5125(port)-txsr) MPC512x_PSC_FIFO_FULL); +} + +static int mpc5125_psc_rx_rdy(struct uart_port *port) +{ + return in_be32(FIFO_5125(port)-rxsr) + in_be32(FIFO_5125(port)-rximr
[PATCH v2 1/2] serial/mpc52xx_uart: prepare for adding MPC5125 PSC UART support
From: Matteo Facchinetti matteo.facchine...@sirius-es.it MPC5125 PSC controller has different register layout than MPC5121. To support MPC5125 PSC in this driver we have to provide further psc_ops functions for SoC specific register accesses. Add new register access functions to the psc_ops structure and provide MPC52xx and MPC512x specific implementation for them. Then replace remaining direct register accesses in the driver by appropriate psc_ops function calls. The subsequent patch can now add MPC5125 specific set of psc_ops functions. Signed-off-by: Vladimir Ermakov vooon...@gmail.com Signed-off-by: Matteo Facchinetti matteo.facchine...@sirius-es.it Signed-off-by: Anatolij Gustschin ag...@denx.de --- Greg, with your Acked-by I can push these patches to my mpc5xxx tree. But it is fine with me if you prefer to apply them to tty tree. Thanks, Anatolij Changes in v2: - split into two patches to simplify review - minor coding style changes - revise commit log drivers/tty/serial/mpc52xx_uart.c | 161 +++-- 1 file changed, 119 insertions(+), 42 deletions(-) diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c index 018bad9..5aa87ac 100644 --- a/drivers/tty/serial/mpc52xx_uart.c +++ b/drivers/tty/serial/mpc52xx_uart.c @@ -122,6 +122,15 @@ struct psc_ops { void(*fifoc_uninit)(void); void(*get_irq)(struct uart_port *, struct device_node *); irqreturn_t (*handle_irq)(struct uart_port *port); + u16 (*get_status)(struct uart_port *port); + u8 (*get_ipcr)(struct uart_port *port); + void(*command)(struct uart_port *port, u8 cmd); + void(*set_mode)(struct uart_port *port, u8 mr1, u8 mr2); + void(*set_rts)(struct uart_port *port, int state); + void(*enable_ms)(struct uart_port *port); + void(*set_sicr)(struct uart_port *port, u32 val); + void(*set_imr)(struct uart_port *port, u16 val); + u8 (*get_mr1)(struct uart_port *port); }; /* setting the prescaler and divisor reg is common for all chips */ @@ -134,6 +143,65 @@ static inline void mpc52xx_set_divisor(struct mpc52xx_psc __iomem *psc, out_8(psc-ctlr, divisor 0xff); } +static u16 mpc52xx_psc_get_status(struct uart_port *port) +{ + return in_be16(PSC(port)-mpc52xx_psc_status); +} + +static u8 mpc52xx_psc_get_ipcr(struct uart_port *port) +{ + return in_8(PSC(port)-mpc52xx_psc_ipcr); +} + +static void mpc52xx_psc_command(struct uart_port *port, u8 cmd) +{ + out_8(PSC(port)-command, cmd); +} + +static void mpc52xx_psc_set_mode(struct uart_port *port, u8 mr1, u8 mr2) +{ + out_8(PSC(port)-command, MPC52xx_PSC_SEL_MODE_REG_1); + out_8(PSC(port)-mode, mr1); + out_8(PSC(port)-mode, mr2); +} + +static void mpc52xx_psc_set_rts(struct uart_port *port, int state) +{ + if (state) + out_8(PSC(port)-op1, MPC52xx_PSC_OP_RTS); + else + out_8(PSC(port)-op0, MPC52xx_PSC_OP_RTS); +} + +static void mpc52xx_psc_enable_ms(struct uart_port *port) +{ + struct mpc52xx_psc __iomem *psc = PSC(port); + + /* clear D_*-bits by reading them */ + in_8(psc-mpc52xx_psc_ipcr); + /* enable CTS and DCD as IPC interrupts */ + out_8(psc-mpc52xx_psc_acr, MPC52xx_PSC_IEC_CTS | MPC52xx_PSC_IEC_DCD); + + port-read_status_mask |= MPC52xx_PSC_IMR_IPC; + out_be16(psc-mpc52xx_psc_imr, port-read_status_mask); +} + +static void mpc52xx_psc_set_sicr(struct uart_port *port, u32 val) +{ + out_be32(PSC(port)-sicr, val); +} + +static void mpc52xx_psc_set_imr(struct uart_port *port, u16 val) +{ + out_be16(PSC(port)-mpc52xx_psc_imr, val); +} + +static u8 mpc52xx_psc_get_mr1(struct uart_port *port) +{ + out_8(PSC(port)-command, MPC52xx_PSC_SEL_MODE_REG_1); + return in_8(PSC(port)-mode); +} + #ifdef CONFIG_PPC_MPC52xx #define FIFO_52xx(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1)) static void mpc52xx_psc_fifo_init(struct uart_port *port) @@ -304,6 +372,15 @@ static struct psc_ops mpc52xx_psc_ops = { .set_baudrate = mpc5200_psc_set_baudrate, .get_irq = mpc52xx_psc_get_irq, .handle_irq = mpc52xx_psc_handle_irq, + .get_status = mpc52xx_psc_get_status, + .get_ipcr = mpc52xx_psc_get_ipcr, + .command = mpc52xx_psc_command, + .set_mode = mpc52xx_psc_set_mode, + .set_rts = mpc52xx_psc_set_rts, + .enable_ms = mpc52xx_psc_enable_ms, + .set_sicr = mpc52xx_psc_set_sicr, + .set_imr = mpc52xx_psc_set_imr, + .get_mr1 = mpc52xx_psc_get_mr1, }; static struct psc_ops mpc5200b_psc_ops = { @@ -325,6 +402,15 @@ static struct psc_ops mpc5200b_psc_ops = { .set_baudrate = mpc5200b_psc_set_baudrate, .get_irq = mpc52xx_psc_get_irq, .handle_irq = mpc52xx_psc_handle_irq, + .get_status
Re: [PATCH 2/3] serial/mpc52xx_uart: add PSC UART support for MPC5125 platforms.
On Wed, 20 Mar 2013 18:41:53 +0100 Matteo Facchinetti matteo.facchine...@sirius-es.it wrote: MPC5125 PSC controller has different registers than MPC5121. This patch was originally created by Vladimir Ermakov https://lists.ozlabs.org/pipermail/linuxppc-dev/2011-March/088954.html Signed-off-by: Vladimir Ermakov vooon...@gmail.com Signed-off-by: Matteo Facchinetti matteo.facchine...@sirius-es.it --- arch/powerpc/include/asm/mpc52xx_psc.h | 49 drivers/tty/serial/mpc52xx_uart.c | 407 2 files changed, 414 insertions(+), 42 deletions(-) This patch should be better split to add SoC specific register accessors first, then we can add mpc5125 changes by separate patch. I've just done this splitting and added more descriptive commit log. Thanks, Anatolij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev