Re: [PATCH v5 01/58] mtd: nand: denali: add missing nand_release() call in denali_remove()
On Fri, Dec 11, 2015 at 11:08 AM, Boris Brezillon wrote: > Hi Dinh, > > On Fri, 11 Dec 2015 10:50:21 -0600 > Dinh Nguyen wrote: > >> Hi Boris, >> >> On Fri, Dec 11, 2015 at 9:10 AM, Boris Brezillon >> wrote: >> > + Dinh (who made commit 2a0a288ec258) >> > >> > Also added back the Fixes tag. >> > >> > On Fri, 11 Dec 2015 15:02:34 +0100 >> > Boris Brezillon wrote: >> > >> >> Unregister the NAND device from the NAND subsystem when removing a denali >> >> NAND controller, otherwise the MTD attached to the NAND device is still >> >> exposed by the MTD layer, and accesses to this device will likely crash >> >> the system. >> >> >> >> Signed-off-by: Boris Brezillon >> > >> > Fixes: 2a0a288ec258 ("mtd: denali: split the generic driver and PCI layer") >> > >> >> --- >> >> Changes since v4: >> >> - remove Cc stable and fixes tags >> >> - calculate the dma buffer size before calling nand_release() >> >> >> >> drivers/mtd/nand/denali.c | 6 -- >> >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> >> >> diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c >> >> index 67eb2be..fdfea05 100644 >> >> --- a/drivers/mtd/nand/denali.c >> >> +++ b/drivers/mtd/nand/denali.c >> >> @@ -1622,9 +1622,11 @@ EXPORT_SYMBOL(denali_init); >> >> /* driver exit point */ >> >> void denali_remove(struct denali_nand_info *denali) >> >> { >> >> + int bufsize = denali->mtd.writesize + denali->mtd.oobsize; >> >> + >> >> + nand_release(&denali->mtd); >> >> denali_irq_cleanup(denali->irq, denali); >> >> - dma_unmap_single(denali->dev, denali->buf.dma_buf, >> >> - denali->mtd.writesize + denali->mtd.oobsize, >> >> + dma_unmap_single(denali->dev, denali->buf.dma_buf, bufsize, >> >>DMA_BIDIRECTIONAL); >> >> Not sure what is the need to add bufsize here, but the commit message >> doesn't reflect the change. > > You were not in Cc of the first version (my fault), but Brian pointed > that the mtd fields could be in an unknown state after the > nand_release() call (this is currently not the case, but it change in > the future). The idea is to pre-compute the DMA buffer size before > releasing the mtd/nand device to prevent any future issues. > > I don't think it is worth mentioning this in the commit message, > because these are just implementation details, but I can add the > following comment before the bufsize declaration: > > /* > * Pre-compute DMA buffer size to avoid any problems in case > * nand_release() ever changes in a way that mtd->writesize and > * mtd->oobsize are not reliable after this call. > */ > > What do you think? > Ah, perfect! With the updated comment, Acked-by: Dinh Nguyen Thanks, Dinh -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 01/58] mtd: nand: denali: add missing nand_release() call in denali_remove()
Hi Boris, On Fri, Dec 11, 2015 at 9:10 AM, Boris Brezillon wrote: > + Dinh (who made commit 2a0a288ec258) > > Also added back the Fixes tag. > > On Fri, 11 Dec 2015 15:02:34 +0100 > Boris Brezillon wrote: > >> Unregister the NAND device from the NAND subsystem when removing a denali >> NAND controller, otherwise the MTD attached to the NAND device is still >> exposed by the MTD layer, and accesses to this device will likely crash >> the system. >> >> Signed-off-by: Boris Brezillon > > Fixes: 2a0a288ec258 ("mtd: denali: split the generic driver and PCI layer") > >> --- >> Changes since v4: >> - remove Cc stable and fixes tags >> - calculate the dma buffer size before calling nand_release() >> >> drivers/mtd/nand/denali.c | 6 -- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c >> index 67eb2be..fdfea05 100644 >> --- a/drivers/mtd/nand/denali.c >> +++ b/drivers/mtd/nand/denali.c >> @@ -1622,9 +1622,11 @@ EXPORT_SYMBOL(denali_init); >> /* driver exit point */ >> void denali_remove(struct denali_nand_info *denali) >> { >> + int bufsize = denali->mtd.writesize + denali->mtd.oobsize; >> + >> + nand_release(&denali->mtd); >> denali_irq_cleanup(denali->irq, denali); >> - dma_unmap_single(denali->dev, denali->buf.dma_buf, >> - denali->mtd.writesize + denali->mtd.oobsize, >> + dma_unmap_single(denali->dev, denali->buf.dma_buf, bufsize, >>DMA_BIDIRECTIONAL); Not sure what is the need to add bufsize here, but the commit message doesn't reflect the change. Dinh -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv10 4/5] ARM: dts: socfpga: unuse the slot-node and deprecate the supports-highspeed for dw-mmc
On Thu, Aug 7, 2014 at 2:38 AM, Jaehoon Chung wrote: > dw-mmc controller can support multiple slots. > But, there are no use-cases anywhere. So we don't need to support the > slot-node for dw-mmc controller. > And "supports-highspeed" property in dw-mmc is deprecated. > "supports-highspeed" property can be replaced with "cap-sd/mmc-highspeed". > > Signed-off-by: Jaehoon Chung > Reviewed-by: Tushar Behera > Reviewed-by: Ulf Hansson > Acked-by: Seungwon Jeon > Acked-by: Dinh Nguyen > --- I've queued this patch in my tree for v3.18. Thanks, Dinh > arch/arm/boot/dts/socfpga_arria5.dtsi |9 +++-- > arch/arm/boot/dts/socfpga_cyclone5.dtsi |9 +++-- > arch/arm/boot/dts/socfpga_vt.dts|9 +++-- > 3 files changed, 9 insertions(+), 18 deletions(-) > > diff --git a/arch/arm/boot/dts/socfpga_arria5.dtsi > b/arch/arm/boot/dts/socfpga_arria5.dtsi > index 12d1c2c..468fc4c 100644 > --- a/arch/arm/boot/dts/socfpga_arria5.dtsi > +++ b/arch/arm/boot/dts/socfpga_arria5.dtsi > @@ -29,13 +29,10 @@ > > dwmmc0@ff704000 { > num-slots = <1>; > - supports-highspeed; > broken-cd; > - > - slot@0 { > - reg = <0>; > - bus-width = <4>; > - }; > + bus-width = <4>; > + cap-mmc-highspeed; > + cap-sd-highspeed; > }; > > sysmgr@ffd08000 { > diff --git a/arch/arm/boot/dts/socfpga_cyclone5.dtsi > b/arch/arm/boot/dts/socfpga_cyclone5.dtsi > index bf51182..1ee03c4 100644 > --- a/arch/arm/boot/dts/socfpga_cyclone5.dtsi > +++ b/arch/arm/boot/dts/socfpga_cyclone5.dtsi > @@ -30,13 +30,10 @@ > > dwmmc0@ff704000 { > num-slots = <1>; > - supports-highspeed; > broken-cd; > - > - slot@0 { > - reg = <0>; > - bus-width = <4>; > - }; > + bus-width = <4>; > + cap-mmc-highspeed; > + cap-sd-highspeed; > }; > > ethernet@ff702000 { > diff --git a/arch/arm/boot/dts/socfpga_vt.dts > b/arch/arm/boot/dts/socfpga_vt.dts > index 09792b4..f9345e0 100644 > --- a/arch/arm/boot/dts/socfpga_vt.dts > +++ b/arch/arm/boot/dts/socfpga_vt.dts > @@ -43,13 +43,10 @@ > > dwmmc0@ff704000 { > num-slots = <1>; > - supports-highspeed; > broken-cd; > - > - slot@0 { > - reg = <0>; > - bus-width = <4>; > - }; > + bus-width = <4>; > + cap-mmc-highspeed; > + cap-sd-highspeed; > }; > > ethernet@ff70 { > -- > 1.7.9.5 > > > ___ > linux-arm-kernel mailing list > linux-arm-ker...@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv5 3/5] ARM: dts: socfpga: unuse the slot-node and deprecated the supports-highspeed for dw-mmc
On Fri, 2014-07-11 at 12:49 +0900, Jaehoon Chung wrote: > dw-mmc controller can support multiple slots. > But, there are no use-cases anywhere. So we don't need to support the > slot-node for dw-mmc controller. > And "supports-highspeed" property in dw-mmc is deprecated. > "supports-highspeed" property can be replaced to "cap-sd/mmc-highspeed". > > Signed-off-by: Jaehoon Chung > Reviewed-by: Tushar Behera > Reviewed-by: Ulf Hansson > Acked-by: Seungwon Jeon > --- > arch/arm/boot/dts/socfpga_arria5.dtsi |9 +++-- > arch/arm/boot/dts/socfpga_cyclone5.dtsi |9 +++-- > arch/arm/boot/dts/socfpga_vt.dts|9 +++-- > 3 files changed, 9 insertions(+), 18 deletions(-) > > diff --git a/arch/arm/boot/dts/socfpga_arria5.dtsi > b/arch/arm/boot/dts/socfpga_arria5.dtsi > index 12d1c2c..468fc4c 100644 > --- a/arch/arm/boot/dts/socfpga_arria5.dtsi > +++ b/arch/arm/boot/dts/socfpga_arria5.dtsi > @@ -29,13 +29,10 @@ > > dwmmc0@ff704000 { > num-slots = <1>; > - supports-highspeed; > broken-cd; > - > - slot@0 { > - reg = <0>; > - bus-width = <4>; > - }; > + bus-width = <4>; > + cap-mmc-highspeed; > + cap-sd-highspeed; > }; > > sysmgr@ffd08000 { > diff --git a/arch/arm/boot/dts/socfpga_cyclone5.dtsi > b/arch/arm/boot/dts/socfpga_cyclone5.dtsi > index bf51182..1ee03c4 100644 > --- a/arch/arm/boot/dts/socfpga_cyclone5.dtsi > +++ b/arch/arm/boot/dts/socfpga_cyclone5.dtsi > @@ -30,13 +30,10 @@ > > dwmmc0@ff704000 { > num-slots = <1>; > - supports-highspeed; > broken-cd; > - > - slot@0 { > - reg = <0>; > - bus-width = <4>; > - }; > + bus-width = <4>; > + cap-mmc-highspeed; > + cap-sd-highspeed; > }; > > ethernet@ff702000 { > diff --git a/arch/arm/boot/dts/socfpga_vt.dts > b/arch/arm/boot/dts/socfpga_vt.dts > index 09792b4..f9345e0 100644 > --- a/arch/arm/boot/dts/socfpga_vt.dts > +++ b/arch/arm/boot/dts/socfpga_vt.dts > @@ -43,13 +43,10 @@ > > dwmmc0@ff704000 { > num-slots = <1>; > - supports-highspeed; > broken-cd; > - > - slot@0 { > - reg = <0>; > - bus-width = <4>; > - }; > + bus-width = <4>; > + cap-mmc-highspeed; > + cap-sd-highspeed; > }; > > ethernet@ff70 { Acked-by: Dinh Nguyen Thanks, Dinh -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv3 4/4] ARM: dts: replace the slot property into slot sub-node for dwmmc.
On 05/30/2014 01:15 PM, Heiko Stübner wrote: Am Freitag, 30. Mai 2014, 21:54:13 schrieb Seungwon Jeon: + Dinh Nguyen + Heiko Stuebner On Wed, May 28, 2014, Jaehoon Chung wrote: dw-mmc controller can support the multiple slot. So each slot's property can be difference. And "support-highspeed" property in dw-mmc is deprecated. "support-highspeed" property can be replaced to "cap-sd/mmc-highspeed". Signed-off-by: Jaehoon Chung Looks good to me. Acked-by: Seungwon Jeon the rockchip part also looks ok to me Acked-by: Heiko Stuebner For the socfpga parts: Acked-by: Dinh Nguyen Thanks, Dinh -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC PATCHv1] usb: dwc2: Combine the dwc2 and s3c_hsotg into a single USB DRD driver.
On 2/11/14 11:56 PM, Jingoo Han wrote: > On Wednesday, February 12, 2014 2:34 PM, Stephen Warren wrote: >> On 02/04/2014 02:45 PM, dingu...@altera.com wrote: >>> From: Dinh Nguyen >>> >>> This means that the driver can be in host or peripheral mode when the >>> appropriate >>> connector is used. When an A-cable is plugged in, the driver behaves in host >>> mode, and when a B-cable is used, the driver will be in peripheral mode. >> Sorry for the slow response. When building ARCH=arm bcm2835_defconfig, I >> get build errors: Thanks for testing. >> >>> drivers/built-in.o: In function `dwc2_gadget_init': >>> drivers/usb/dwc2/s3c-hsotg.c:3335: undefined reference to >>> `usb_add_gadget_udc' >>> drivers/built-in.o: In function `s3c_hsotg_remove': >>> drivers/usb/dwc2/s3c-hsotg.c:3358: undefined reference to >>> `usb_del_gadget_udc' >>> drivers/usb/dwc2/s3c-hsotg.c:3364: undefined reference to >>> `usb_gadget_unregister_driver' > These errors happen when CONFIG_USB_GADGET=n. 's3c-hsotg.c' > supports only gadget mode. In the case of USB_DWC2_HOST mode, > CONFIG_USB_GADGET is NOT enabled. I don't know how to solve it. I'm working on v2 of this patch. I think I can make the Kconfig more flexible by selecting USB_GADGET for dual-role or gadget. Or I can make the new driver more independent for the various modes, meaning if the driver is built for HOST mode, it shouldn't be dependent on gadget functions. Dinh > > Best regards, > Jingoo Han > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [RFC PATCHv1] usb: dwc2: Combine the dwc2 and s3c_hsotg into a single USB DRD driver.
On Wed, 2014-02-05 at 00:42 +, Paul Zimmerman wrote: > > From: dingu...@altera.com [mailto:dingu...@altera.com] > > Sent: Tuesday, February 04, 2014 1:46 PM > > > > From: Dinh Nguyen > > > > This means that the driver can be in host or peripheral mode when the > > appropriate > > connector is used. When an A-cable is plugged in, the driver behaves in host > > mode, and when a B-cable is used, the driver will be in peripheral mode. > > > > This commit: > > - Replaces in the defines used in s3c_hsotg.h with the defines used in the > > dwc2 > > hw.h defines. > > - Use the dw2_hsotg as the unified data structure for the host/gadget. > > - Uses the dwc2 IRQ handler for host/gadget. > > - A single spinlock. > > Hi Dinh, > > Putting all of these changes into a single patch makes them unreviewable > as far I am concerned. You need to break this into a series of smaller > patches. I would suggest something like this: > > 1 of n: Make the minimum changes to the dwc2 header files needed to > support s3c-hsotg as a standalone driver. > 2 of n: Make the spelling changes to s3c-hsotg.c needed to use the dwc2 > headers, and move it to the dwc2/ directory. Make the Kconfig > and Makefile changes needed for the move. Delete s3c-hsotg.h. > 3 of n: Move the struct defines etc. from s3c-hsotg.c to the dwc2 > header files. > .. of n: Make the changes required to combine the functionality of > both drivers into one. Preferably this would also be a series > of patches instead of one big one. > > At each step of the series, both drivers should still compile and work. I agree. My original thought was to also split this patch, but I just didn't know how to split it. This is why I designated as an RFC. I was really looking for feedback as this is the correct way to combine this driver. I was also looking for testing purpose to make sure I did not break anything for the s3c platform. > > Also, please follow the patch style used on the linux lists. > 'git format-patch --cover-letter' should do most of this for you > automatically. I did use --cover-letter on this patch series. > > And you should probably trim the Cc list to something more reasonable. I looked through all the commits for the dwc2 driver for the cc list. I also CC a bunch of the Samsung people as I figured that the biggest impact of the work would affect the s3c folks. Dinh -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC PATCH 0/2] dwc2/s3c-hsotg: Initial steps to combine the 2 driver
On Tue, 2014-01-14 at 13:14 -0800, Greg KH wrote: > On Tue, Jan 14, 2014 at 08:57:12PM +, Paul Zimmerman wrote: > > > From: Dinh Nguyen [mailto:dingu...@altera.com] > > > Sent: Tuesday, January 14, 2014 12:46 PM > > > > > > On Tue, 2014-01-14 at 06:21 -0800, Greg KH wrote: > > > > On Tue, Jan 14, 2014 at 05:01:00AM -0600, dingu...@altera.com wrote: > > > > > From: Dinh Nguyen > > > > > > > > > > Hi, > > > > > > > > > > I'm starting work downstream on combining the DWC2 host driver and > > > > > the s3c-hsotg > > > > > gadget driver into a dual-role OTG driver. Before I go further, I was > > > > > hoping to > > > > > solicit comments on whether or not my initial approach is correct? I > > > > > know there > > > > > are plans to combine the 2, so would like to solicit > > > > > comments/suggestions so > > > > > that I can also upstream it as well. > > > > > > > > > > These 2 patches: > > > > > > > > > > * Moves the DWC2 driver out of drivers/staging into drivers/usb/dwc2/ > > > > > > > > This already happened yesterday in my tree, so you should see this in > > > > linux-next by now, no need to do it again :) > > > > > > > > > > I see it now. Thanks for the pointer. > > > > > > > > * Moves the s3c-hsotg driver into drivers/usb/dwc2/ > > > > > * Delete s3c-hsotg.h > > > > > * Make the s3c-hsotg.c file use the defines in hw.h from the DWC2 > > > > > driver. > > > > > > > > > > This initial patch has been tested on the SOCFPGA platform only in > > > > > Host-only > > > > > and Gadget-only mode. > > > > > > > > > > The next step would be to do the combining of the driver into a > > > > > dual-role OTG > > > > > driver. > > > > > > > > I was told that merging the two of these isn't going to work as the > > > > silicon is just too different, which is why I allowed the code to move > > > > out of staging. If you feel differently, and think you can combine the > > > > two drivers, that's wonderful, I'll gladly take patches to do so, but be > > > > sure to test on the proper platforms to make sure nothing breaks. > > > > > > > > > > I wasn't aware of the silicon differences. I just took the s3c-hsotg > > > driver as is and it worked fine on my version 2.93a of the USB IP. I'll > > > search the ML for information, or perhaps Paul can comment? > > > > I think Greg is thinking of the octeon-usb driver in staging [1], not > > the s3c-hsotg driver. The plan was always to eventually merge dwc2 with > > s3c-hsotg. > > Yes, I'm totally confused, you are right. > > Nevermind then, Dinh, if you want to redo your patch after 3.14-rc1 is > out, that would be great as merging the drivers together can be done > easier after that development point. > Unless, Paul has already started the work, I can take a crack at it. Dinh > thanks, > > greg k-h > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC PATCH 0/2] dwc2/s3c-hsotg: Initial steps to combine the 2 driver
On Tue, 2014-01-14 at 06:21 -0800, Greg KH wrote: > On Tue, Jan 14, 2014 at 05:01:00AM -0600, dingu...@altera.com wrote: > > From: Dinh Nguyen > > > > Hi, > > > > I'm starting work downstream on combining the DWC2 host driver and the > > s3c-hsotg > > gadget driver into a dual-role OTG driver. Before I go further, I was > > hoping to > > solicit comments on whether or not my initial approach is correct? I know > > there > > are plans to combine the 2, so would like to solicit comments/suggestions so > > that I can also upstream it as well. > > > > These 2 patches: > > > > * Moves the DWC2 driver out of drivers/staging into drivers/usb/dwc2/ > > This already happened yesterday in my tree, so you should see this in > linux-next by now, no need to do it again :) > I see it now. Thanks for the pointer. > > * Moves the s3c-hsotg driver into drivers/usb/dwc2/ > > * Delete s3c-hsotg.h > > * Make the s3c-hsotg.c file use the defines in hw.h from the DWC2 driver. > > > > This initial patch has been tested on the SOCFPGA platform only in Host-only > > and Gadget-only mode. > > > > The next step would be to do the combining of the driver into a dual-role > > OTG > > driver. > > I was told that merging the two of these isn't going to work as the > silicon is just too different, which is why I allowed the code to move > out of staging. If you feel differently, and think you can combine the > two drivers, that's wonderful, I'll gladly take patches to do so, but be > sure to test on the proper platforms to make sure nothing breaks. > I wasn't aware of the silicon differences. I just took the s3c-hsotg driver as is and it worked fine on my version 2.93a of the USB IP. I'll search the ML for information, or perhaps Paul can comment? Thanks, Dinh > thanks, > > greg k-h > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [RFC V3 2/4] mmc: dw_mmc: socfpga: move socfpga private init
On Thu, 2013-08-29 at 20:59 +0900, Seungwon Jeon wrote: > On Wed, August 28, 2013, Yuvaraj Kumar C D wrote: > > Currently platform specific private data initialisation is done by > > dw_mci_socfpga_priv_init and dw_mci_socfpga_parse_dt.As we already have > > separate platform specific device tree parser dw_mci_socfpga_parse_dt, > > move the dw_mci_socfpga_priv_init code to dw_mci_socfpga_parse_dt. > > We can use the dw_mci_socfpga_priv_init to do some actual platform > > specific initialisation. I am looking to remove all of dw_mmc-socfpga file. The only reason for this file is to set the sdr timing values. But since the register that controls these SDR values are located out of the IP, it is probably best to implement the settings in platform specific code. Dinh > > > > This patch is compile tested only. > CC'ed Dinh Nguyen > > Thanks, > Seungwon Jeon > > > > > changes since V2: none > > > > Signed-off-by: Yuvaraj Kumar C D > > --- > > drivers/mmc/host/dw_mmc-socfpga.c | 29 ++--- > > 1 file changed, 14 insertions(+), 15 deletions(-) > > > > diff --git a/drivers/mmc/host/dw_mmc-socfpga.c > > b/drivers/mmc/host/dw_mmc-socfpga.c > > index 14b5961..953f260 100644 > > --- a/drivers/mmc/host/dw_mmc-socfpga.c > > +++ b/drivers/mmc/host/dw_mmc-socfpga.c > > @@ -38,20 +38,6 @@ struct dw_mci_socfpga_priv_data { > > > > static int dw_mci_socfpga_priv_init(struct dw_mci *host) > > { > > - struct dw_mci_socfpga_priv_data *priv; > > - > > - priv = devm_kzalloc(host->dev, sizeof(*priv), GFP_KERNEL); > > - if (!priv) { > > - dev_err(host->dev, "mem alloc failed for private data\n"); > > - return -ENOMEM; > > - } > > - > > - priv->sysreg = syscon_regmap_lookup_by_compatible("altr,sys-mgr"); > > - if (IS_ERR(priv->sysreg)) { > > - dev_err(host->dev, "regmap for altr,sys-mgr lookup failed.\n"); > > - return PTR_ERR(priv->sysreg); > > - } > > - host->priv = priv; > > > > return 0; > > } > > @@ -79,12 +65,24 @@ static void dw_mci_socfpga_prepare_command(struct > > dw_mci *host, u32 *cmdr) > > > > static int dw_mci_socfpga_parse_dt(struct dw_mci *host) > > { > > - struct dw_mci_socfpga_priv_data *priv = host->priv; > > + struct dw_mci_socfpga_priv_data *priv; > > struct device_node *np = host->dev->of_node; > > u32 timing[2]; > > u32 div = 0; > > int ret; > > > > + priv = devm_kzalloc(host->dev, sizeof(*priv), GFP_KERNEL); > > + if (!priv) { > > + dev_err(host->dev, "mem alloc failed for private data\n"); > > + return -ENOMEM; > > + } > > + > > + priv->sysreg = syscon_regmap_lookup_by_compatible("altr,sys-mgr"); > > + if (IS_ERR(priv->sysreg)) { > > + dev_err(host->dev, "regmap for altr,sys-mgr lookup failed.\n"); > > + return PTR_ERR(priv->sysreg); > > + } > > + > > ret = of_property_read_u32(np, "altr,dw-mshc-ciu-div", &div); > > if (ret) > > dev_info(host->dev, "No dw-mshc-ciu-div specified, assuming 1"); > > @@ -96,6 +94,7 @@ static int dw_mci_socfpga_parse_dt(struct dw_mci *host) > > return ret; > > > > priv->hs_timing = SYSMGR_SDMMC_CTRL_SET(timing[0], timing[1]); > > + host->priv = priv; > > return 0; > > } > > > > -- > > 1.7.9.5 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > > the body of a message to majord...@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] Arm: socfpga: pl330: Add #dma-cells for generic dma binding support
On Mon, 2013-03-04 at 11:04 +0530, Padmavathi Venna wrote: > This patch adds #dma-cells property to PL330 DMA controller nodes for > supporting generic dma dt bindings on SOCFPGA platform. #dma-channels > and #dma-requests are not required now but added in advance. > > Signed-off-by: Padmavathi Venna > --- > > Based on Torvalds tree > > arch/arm/boot/dts/socfpga.dtsi |3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi > index 936d230..7e8769b 100644 > --- a/arch/arm/boot/dts/socfpga.dtsi > +++ b/arch/arm/boot/dts/socfpga.dtsi > @@ -75,6 +75,9 @@ > compatible = "arm,pl330", "arm,primecell"; > reg = <0xffe01000 0x1000>; > interrupts = <0 180 4>; > + #dma-cells = <1>; > + #dma-channels = <8>; > + #dma-requests = <32>; Acked-by: Dinh Nguyen}; > }; > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html