[PATCH] drivers/video: compile fixes for fsl-diu-fb.c
Fix a bunch of compiler errors and warnings introduced in: commit ddd3d905436b572ebadc09dcf2d12ca5b37020a0 Author: Timur Tabi ti...@freescale.com drivers/video: fsl-diu-fb: merge all allocated data into one block Signed-off-by: Michael Neuling mi...@neuling.org --- Timur: you do compile test your patches, right? :-P This is effecting mpc85xx_defconfig on mainline (and has been in linux-next for while already). diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index acf292b..78cac52 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -366,7 +366,7 @@ struct mfb_info { */ struct fsl_diu_data { dma_addr_t dma_addr; - struct fb_info fsl_diu_info[NUM_AOIS]; + struct fb_info *fsl_diu_info[NUM_AOIS]; struct mfb_info mfb[NUM_AOIS]; struct device_attribute dev_attr; unsigned int irq; @@ -608,8 +608,8 @@ static void adjust_aoi_size_position(struct fb_var_screeninfo *var, int lower_aoi_is_open, upper_aoi_is_open; __u32 base_plane_width, base_plane_height, upper_aoi_height; - base_plane_width = data-fsl_diu_info[0].var.xres; - base_plane_height = data-fsl_diu_info[0].var.yres; + base_plane_width = data-fsl_diu_info[0]-var.xres; + base_plane_height = data-fsl_diu_info[0]-var.yres; if (mfbi-x_aoi_d 0) mfbi-x_aoi_d = 0; @@ -624,7 +624,7 @@ static void adjust_aoi_size_position(struct fb_var_screeninfo *var, break; case PLANE1_AOI0: case PLANE2_AOI0: - lower_aoi_mfbi = data-fsl_diu_info[index+1].par; + lower_aoi_mfbi = data-fsl_diu_info[index+1]-par; lower_aoi_is_open = lower_aoi_mfbi-count 0 ? 1 : 0; if (var-xres base_plane_width) var-xres = base_plane_width; @@ -642,8 +642,8 @@ static void adjust_aoi_size_position(struct fb_var_screeninfo *var, break; case PLANE1_AOI1: case PLANE2_AOI1: - upper_aoi_mfbi = data-fsl_diu_info[index-1].par; - upper_aoi_height = data-fsl_diu_info[index-1].var.yres; + upper_aoi_mfbi = data-fsl_diu_info[index-1]-par; + upper_aoi_height = data-fsl_diu_info[index-1]-var.yres; upper_aoi_bottom = upper_aoi_mfbi-y_aoi_d + upper_aoi_height; upper_aoi_is_open = upper_aoi_mfbi-count 0 ? 1 : 0; if (var-xres base_plane_width) @@ -1469,7 +1469,7 @@ static ssize_t store_monitor(struct device *device, unsigned int i; for (i=0; i NUM_AOIS; i++) - fsl_diu_set_par(data-fsl_diu_info[i]); + fsl_diu_set_par(data-fsl_diu_info[i]); } return count; } @@ -1524,7 +1524,7 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev) spin_lock_init(data-reg_lock); for (i = 0; i NUM_AOIS; i++) { - struct fb_info *info = data-fsl_diu_info[i]; + struct fb_info *info = data-fsl_diu_info[i]; info-device = pdev-dev; info-par = data-mfb[i]; @@ -1597,7 +1597,7 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev) out_be32(data-diu_reg-desc[2], data-dummy_ad.paddr); for (i = 0; i NUM_AOIS; i++) { - ret = install_fb(data-fsl_diu_info[i]); + ret = install_fb(data-fsl_diu_info[i]); if (ret) { dev_err(pdev-dev, could not register fb %d\n, i); goto error; @@ -1625,7 +1625,7 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev) error: for (i = 0; i NUM_AOIS; i++) - uninstall_fb(data-fsl_diu_info[i]); + uninstall_fb(data-fsl_diu_info[i]); iounmap(data-diu_reg); @@ -1641,11 +1641,11 @@ static int fsl_diu_remove(struct platform_device *pdev) int i; data = dev_get_drvdata(pdev-dev); - disable_lcdc(data-fsl_diu_info[0]); + disable_lcdc(data-fsl_diu_info[0]); free_irq_local(data); for (i = 0; i NUM_AOIS; i++) - uninstall_fb(data-fsl_diu_info[i]); + uninstall_fb(data-fsl_diu_info[i]); iounmap(data-diu_reg); ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] drivers/video: compile fixes for fsl-diu-fb.c
Michael Neuling wrote: Fix a bunch of compiler errors and warnings introduced in: commit ddd3d905436b572ebadc09dcf2d12ca5b37020a0 Author: Timur Tabiti...@freescale.com drivers/video: fsl-diu-fb: merge all allocated data into one block Signed-off-by: Michael Neulingmi...@neuling.org --- Timur: you do compile test your patches, right? :-P I have a script that tests each commit in a set to make sure it compiles, so that git-bisect isn't broken. This is effecting mpc85xx_defconfig on mainline (and has been in linux-next for while already). diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index acf292b..78cac52 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -366,7 +366,7 @@ struct mfb_info { */ struct fsl_diu_data { dma_addr_t dma_addr; - struct fb_info fsl_diu_info[NUM_AOIS]; + struct fb_info *fsl_diu_info[NUM_AOIS]; This doesn't make any sense. If you change fsl_diu_info into a pointer, then where is the object being allocated? -- Timur Tabi Linux kernel developer at Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] drivers/video: compile fixes for fsl-diu-fb.c
In message 4f1370c9.9010...@freescale.com you wrote: Michael Neuling wrote: Fix a bunch of compiler errors and warnings introduced in: commit ddd3d905436b572ebadc09dcf2d12ca5b37020a0 Author: Timur Tabiti...@freescale.com drivers/video: fsl-diu-fb: merge all allocated data into one block Signed-off-by: Michael Neulingmi...@neuling.org --- Timur: you do compile test your patches, right? :-P I have a script that tests each commit in a set to make sure it compiles, so that git-bisect isn't broken. May I suggest you actually run the script next time :-P This is effecting mpc85xx_defconfig on mainline (and has been in linux-next for while already). diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index acf292b..78cac52 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -366,7 +366,7 @@ struct mfb_info { */ struct fsl_diu_data { dma_addr_t dma_addr; - struct fb_info fsl_diu_info[NUM_AOIS]; + struct fb_info *fsl_diu_info[NUM_AOIS]; This doesn't make any sense. If you change fsl_diu_info into a pointer,=20 then where is the object being allocated? OK, how about this? From: Michael Neuling mi...@neuling.org [PATCH] drivers/video: compile fixes for fsl-diu-fb.c Fix a compiler errors introduced in: commit ddd3d905436b572ebadc09dcf2d12ca5b37020a0 Author: Timur Tabi ti...@freescale.com drivers/video: fsl-diu-fb: merge all allocated data into one block Signed-off-by: Michael Neuling mi...@neuling.org diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index acf292b..3006b2b 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -1432,7 +1432,7 @@ static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state) struct fsl_diu_data *data; data = dev_get_drvdata(ofdev-dev); - disable_lcdc(data-fsl_diu_info[0]); + disable_lcdc((data-fsl_diu_info[0])); return 0; } @@ -1442,7 +1442,7 @@ static int fsl_diu_resume(struct platform_device *ofdev) struct fsl_diu_data *data; data = dev_get_drvdata(ofdev-dev); - enable_lcdc(data-fsl_diu_info[0]); + enable_lcdc((data-fsl_diu_info[0])); return 0; } ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] drivers/video: compile fixes for fsl-diu-fb.c
Michael Neuling wrote: In message4f1370c9.9010...@freescale.com you wrote: Michael Neuling wrote: Fix a bunch of compiler errors and warnings introduced in: commit ddd3d905436b572ebadc09dcf2d12ca5b37020a0 Author: Timur Tabiti...@freescale.com drivers/video: fsl-diu-fb: merge all allocated data into one block Signed-off-by: Michael Neulingmi...@neuling.org --- Timur: you do compile test your patches, right? :-P I have a script that tests each commit in a set to make sure it compiles, so that git-bisect isn't broken. May I suggest you actually run the script next time :-P Tomorrow, when I get into the office, I'll take a look. But my code has always compiled. Can you give me the output of your compiler? diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index acf292b..3006b2b 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -1432,7 +1432,7 @@ static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state) struct fsl_diu_data *data; data = dev_get_drvdata(ofdev-dev); - disable_lcdc(data-fsl_diu_info[0]); + disable_lcdc((data-fsl_diu_info[0])); return 0; } @@ -1442,7 +1442,7 @@ static int fsl_diu_resume(struct platform_device *ofdev) struct fsl_diu_data *data; data = dev_get_drvdata(ofdev-dev); - enable_lcdc(data-fsl_diu_info[0]); + enable_lcdc((data-fsl_diu_info[0])); I prefer this: disable_lcdc(data-fsl_diu_info); Your change makes sense. I don't understand why it compiles on my system. Something strange is going on. -- Timur Tabi Linux kernel developer at Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] drivers/video: compile fixes for fsl-diu-fb.c
In message 4f138cbb.1080...@freescale.com you wrote: Michael Neuling wrote: In message4f1370c9.9010...@freescale.com you wrote: Michael Neuling wrote: Fix a bunch of compiler errors and warnings introduced in: commit ddd3d905436b572ebadc09dcf2d12ca5b37020a0 Author: Timur Tabiti...@freescale.com drivers/video: fsl-diu-fb: merge all allocated data into one block Signed-off-by: Michael Neulingmi...@neuling.org --- Timur: you do compile test your patches, right? :-P I have a script that tests each commit in a set to make sure it compiles= , so that git-bisect isn't broken. May I suggest you actually run the script next time :-P Tomorrow, when I get into the office, I'll take a look. But my code has always compiled. Can you give me the output of your compiler? drivers/video/fsl-diu-fb.c: In function 'fsl_diu_suspend': drivers/video/fsl-diu-fb.c:1435: error: incompatible type for argument 1 of 'disable_lcdc' drivers/video/fsl-diu-fb.c:592: note: expected 'struct fb_info *' but argument is of type 'struct fb_info' drivers/video/fsl-diu-fb.c: In function 'fsl_diu_resume': drivers/video/fsl-diu-fb.c:1445: error: incompatible type for argument 1 of 'enable_lcdc' drivers/video/fsl-diu-fb.c:583: note: expected 'struct fb_info *' but argument is of type 'struct fb_info' diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index acf292b..3006b2b 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -1432,7 +1432,7 @@ static int fsl_diu_suspend(struct platform_device *= ofdev, pm_message_t state) struct fsl_diu_data *data; data =3D dev_get_drvdata(ofdev-dev); - disable_lcdc(data-fsl_diu_info[0]); + disable_lcdc((data-fsl_diu_info[0])); return 0; } @@ -1442,7 +1442,7 @@ static int fsl_diu_resume(struct platform_device *o= fdev) struct fsl_diu_data *data; data =3D dev_get_drvdata(ofdev-dev); - enable_lcdc(data-fsl_diu_info[0]); + enable_lcdc((data-fsl_diu_info[0])); I prefer this: disable_lcdc(data-fsl_diu_info); Your change makes sense. I don't understand why it compiles on my system. Something strange is going on. Sure. Mikey From: Michael Neuling mi...@neuling.org [PATCH] drivers/video: compile fixes for fsl-diu-fb.c Fix a compiler errors introduced in: commit ddd3d905436b572ebadc09dcf2d12ca5b37020a0 Author: Timur Tabi ti...@freescale.com drivers/video: fsl-diu-fb: merge all allocated data into one block Signed-off-by: Michael Neuling mi...@neuling.org diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index acf292b..6af3f16 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -1432,7 +1432,7 @@ static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state) struct fsl_diu_data *data; data = dev_get_drvdata(ofdev-dev); - disable_lcdc(data-fsl_diu_info[0]); + disable_lcdc(data-fsl_diu_info); return 0; } @@ -1442,7 +1442,7 @@ static int fsl_diu_resume(struct platform_device *ofdev) struct fsl_diu_data *data; data = dev_get_drvdata(ofdev-dev); - enable_lcdc(data-fsl_diu_info[0]); + enable_lcdc(data-fsl_diu_info); return 0; } ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 1/2 v2] powerpc/85xx: Add dts for P1021RDB-PC board
P1021RDB-PC Overview - 1Gbyte DDR3 (on board DDR) 16Mbyte NOR flash 32Mbyte eSLC NAND Flash 256 Kbit M24256 I2C EEPROM 128 Mbit SPI Flash memory Real-time clock on I2C bus SD/MMC connector to interface with the SD memory card PCIex - x1 PCIe slot or x1 PCIe to dual SATA controller - x1 mini-PCIe slot USB 2.0 - ULPI PHY interface: SMSC USB3300 USB PHY and Genesys Logic’s GL850A - Two USB2.0 Type A receptacles - One USB2.0 signal to Mini PCIe slot eTSEC1: Connected to RGMII PHY VSC7385 eTSEC2: Connected to SGMII PHY VSC8221 eTSEC3: Connected to SGMII PHY AR8021 DUART interface: supports two UARTs up to 115200 bps for console display Signed-off-by: Matthew McClintock m...@freescale.com Signed-off-by: Xu Jiucheng b37...@freescale.com --- arch/powerpc/boot/dts/fsl/p1021si-post.dtsi |4 + arch/powerpc/boot/dts/p1021rdb.dts | 96 +++ arch/powerpc/boot/dts/p1021rdb.dtsi | 236 +++ arch/powerpc/boot/dts/p1021rdb_36b.dts | 96 +++ 4 files changed, 432 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/p1021rdb.dts create mode 100644 arch/powerpc/boot/dts/p1021rdb.dtsi create mode 100644 arch/powerpc/boot/dts/p1021rdb_36b.dts diff --git a/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi index 38ba54d..b7929c9 100644 --- a/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi @@ -144,6 +144,10 @@ /include/ pq3-usb2-dr-0.dtsi /include/ pq3-esdhc-0.dtsi + sdhc@2e000 { + sdhci,auto-cmd12; + }; + /include/ pq3-sec3.3-0.dtsi /include/ pq3-mpic.dtsi diff --git a/arch/powerpc/boot/dts/p1021rdb.dts b/arch/powerpc/boot/dts/p1021rdb.dts new file mode 100644 index 000..90b6b4c --- /dev/null +++ b/arch/powerpc/boot/dts/p1021rdb.dts @@ -0,0 +1,96 @@ +/* + * P1021 RDB Device Tree Source + * + * Copyright 2011 Freescale Semiconductor Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Freescale Semiconductor nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * + * ALTERNATIVELY, this software may be distributed under the terms of the + * GNU General Public License (GPL) as published by the Free Software + * Foundation, either version 2 of that License or (at your option) any + * later version. + * + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor AS IS AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/include/ fsl/p1021si-pre.dtsi +/ { + model = fsl,P1021RDB; + compatible = fsl,P1021RDB-PC; + + memory { + device_type = memory; + }; + + lbc: localbus@ffe05000 { + reg = 0 0xffe05000 0 0x1000; + + /* NOR, NAND Flashes and Vitesse 5 port L2 switch */ + ranges = 0x0 0x0 0x0 0xef00 0x0100 + 0x1 0x0 0x0 0xff80 0x0004 + 0x2 0x0 0x0 0xffb0 0x0002; + }; + + soc: soc@ffe0 { + ranges = 0x0 0x0 0xffe0 0x10; + }; + + pci0: pcie@ffe09000 { + ranges = 0x200 0x0 0xa000 0 0xa000 0x0 0x2000 + 0x100 0x0 0x 0 0xffc1 0x0 0x1; + reg = 0 0xffe09000 0 0x1000; + pcie@0 { + ranges = 0x200 0x0 0xa000 + 0x200 0x0 0xa000 + 0x0 0x2000 + + 0x100 0x0 0x0 + 0x100 0x0 0x0 + 0x0 0x10; + }; + }; + +
[PATCH 2/2 v2] powerpc/85xx: Added P1021RDB-PC Platform support
Signed-off-by: Xu Jiucheng b37...@freescale.com --- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 24 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index ccf520e..1273381 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c @@ -90,6 +90,7 @@ static void __init mpc85xx_rdb_setup_arch(void) machine_device_initcall(p2020_rdb, mpc85xx_common_publish_devices); machine_device_initcall(p1020_rdb, mpc85xx_common_publish_devices); +machine_device_initcall(p1021_rdb_pc, mpc85xx_common_publish_devices); /* * Called very early, device-tree isn't unflattened @@ -112,6 +113,15 @@ static int __init p1020_rdb_probe(void) return 0; } +static int __init p1021_rdb_pc_probe(void) +{ + unsigned long root = of_get_flat_dt_root(); + + if (of_flat_dt_is_compatible(root, fsl,P1021RDB-PC)) + return 1; + return 0; +} + define_machine(p2020_rdb) { .name = P2020 RDB, .probe = p2020_rdb_probe, @@ -139,3 +149,17 @@ define_machine(p1020_rdb) { .calibrate_decr = generic_calibrate_decr, .progress = udbg_progress, }; + +define_machine(p1021_rdb_pc) { + .name = P1021 RDB-PC, + .probe = p1021_rdb_pc_probe, + .setup_arch = mpc85xx_rdb_setup_arch, + .init_IRQ = mpc85xx_rdb_pic_init, +#ifdef CONFIG_PCI + .pcibios_fixup_bus = fsl_pcibios_fixup_bus, +#endif + .get_irq= mpic_get_irq, + .restart= fsl_rstcr_restart, + .calibrate_decr = generic_calibrate_decr, + .progress = udbg_progress, +}; -- 1.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev