* [PATCH v3 0/8] xilinxfb changes @ 2013-05-31 12:55 Michal Simek [not found] ` <cover.1370004925.git.michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Michal Simek @ 2013-05-31 12:55 UTC (permalink / raw) To: linux-kernel-u79uwXL29TY76Z2rM5mHXA Cc: Timur Tabi, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-fbdev-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Michal Simek, Tomi Valkeinen, Grant Likely [-- Attachment #1.1: Type: text/plain, Size: 1341 bytes --] Hi, I have done more changes in the driver to support probing on little and big endian system where detection is done directly on the hardware. I have also done some cleanups to get it to the better shape. Thanks for your review, Michal Changes in v3: - Remove out_be IO name from function name - Change patch subject from "Do not use out_be32 IO function" to "Do not name out_be32 in function name" - New patch in this patchset based on discussions - New patch in this patchset based on discussions - New patch in this patchset - New patch in this patchset based on discussions - New patch in this patchset Changes in v2: - use of_property_read_u32 helper function Series-changes: 3 - fix commit message Michal Simek (8): video: xilinxfb: Fix OF probing on little-endian systems video: xilinxfb: Do not name out_be32 in function name video: xilinxfb: Rename PLB_ACCESS_FLAG to BUS_ACCESS_FLAG video: xilinxfb: Use drvdata->regs_phys instead of physaddr video: xilinxfb: Group bus initialization video: xilinxfb: Add support for little endian accesses video: xilinxfb: Fix sparse warnings video: xilinxfb: Use driver for Xilinx ARM Zynq drivers/video/Kconfig | 2 +- drivers/video/xilinxfb.c | 157 ++++++++++++++++++++++++----------------------- 2 files changed, 81 insertions(+), 78 deletions(-) -- 1.8.2.3 [-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --] [-- Attachment #2: Type: text/plain, Size: 192 bytes --] _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org https://lists.ozlabs.org/listinfo/devicetree-discuss ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <cover.1370004925.git.michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>]
* [PATCH v3 1/8] video: xilinxfb: Fix OF probing on little-endian systems [not found] ` <cover.1370004925.git.michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org> @ 2013-05-31 12:55 ` Michal Simek 2013-05-31 13:05 ` Timur Tabi 0 siblings, 1 reply; 4+ messages in thread From: Michal Simek @ 2013-05-31 12:55 UTC (permalink / raw) To: linux-kernel-u79uwXL29TY76Z2rM5mHXA Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Michal Simek, Rob Herring, Timur Tabi, Tomi Valkeinen, linux-fbdev-u79uwXL29TY76Z2rM5mHXA, Grant Likely [-- Attachment #1.1: Type: text/plain, Size: 1414 bytes --] From: Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org> DTB is always big-endian that's why it is necessary to properly convert value (*p). It is automatically done in of_property_read_u32(). Signed-off-by: Michal Simek <michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org> --- Changes in v3: None Changes in v2: - use of_property_read_u32 helper function Series-changes: 3 - fix commit message drivers/video/xilinxfb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c index af0b4fd..aecd15d 100644 --- a/drivers/video/xilinxfb.c +++ b/drivers/video/xilinxfb.c @@ -406,8 +406,7 @@ static int xilinxfb_release(struct device *dev) static int xilinxfb_of_probe(struct platform_device *op) { const u32 *prop; - u32 *p; - u32 tft_access; + u32 tft_access = 0; struct xilinxfb_platform_data pdata; struct resource res; int size, rc; @@ -427,8 +426,8 @@ static int xilinxfb_of_probe(struct platform_device *op) * To check whether the core is connected directly to DCR or PLB * interface and initialize the tft_access accordingly. */ - p = (u32 *)of_get_property(op->dev.of_node, "xlnx,dcr-splb-slave-if", NULL); - tft_access = p ? *p : 0; + of_property_read_u32(op->dev.of_node, "xlnx,dcr-splb-slave-if", + &tft_access); /* * Fill the resource structure if its direct PLB interface -- 1.8.2.3 [-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --] [-- Attachment #2: Type: text/plain, Size: 192 bytes --] _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org https://lists.ozlabs.org/listinfo/devicetree-discuss ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 1/8] video: xilinxfb: Fix OF probing on little-endian systems 2013-05-31 12:55 ` [PATCH v3 1/8] video: xilinxfb: Fix OF probing on little-endian systems Michal Simek @ 2013-05-31 13:05 ` Timur Tabi 2013-05-31 13:09 ` Michal Simek 0 siblings, 1 reply; 4+ messages in thread From: Timur Tabi @ 2013-05-31 13:05 UTC (permalink / raw) To: Michal Simek Cc: linux-kernel, Michal Simek, Arnd Bergmann, Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Grant Likely, Rob Herring, linux-fbdev, devicetree-discuss On 05/31/2013 07:55 AM, Michal Simek wrote: > - p = (u32 *)of_get_property(op->dev.of_node, "xlnx,dcr-splb-slave-if", NULL); > - tft_access = p ? *p : 0; > + of_property_read_u32(op->dev.of_node, "xlnx,dcr-splb-slave-if", > + &tft_access); This is okay, but just FYI, you could instead have just used be32_to_cpup(). -- Timur Tabi ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 1/8] video: xilinxfb: Fix OF probing on little-endian systems 2013-05-31 13:05 ` Timur Tabi @ 2013-05-31 13:09 ` Michal Simek 0 siblings, 0 replies; 4+ messages in thread From: Michal Simek @ 2013-05-31 13:09 UTC (permalink / raw) To: Timur Tabi Cc: Michal Simek, linux-kernel, Arnd Bergmann, Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Grant Likely, Rob Herring, linux-fbdev, devicetree-discuss [-- Attachment #1: Type: text/plain, Size: 829 bytes --] On 05/31/2013 03:05 PM, Timur Tabi wrote: > On 05/31/2013 07:55 AM, Michal Simek wrote: >> - p = (u32 *)of_get_property(op->dev.of_node, "xlnx,dcr-splb-slave-if", NULL); >> - tft_access = p ? *p : 0; >> + of_property_read_u32(op->dev.of_node, "xlnx,dcr-splb-slave-if", >> + &tft_access); > > This is okay, but just FYI, you could instead have just used be32_to_cpup(). yep. I was there in v1 but then Soren suggested to use of_property_read_u32 http://lkml.org/lkml/2013/5/29/365 Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 263 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-31 13:09 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-05-31 12:55 [PATCH v3 0/8] xilinxfb changes Michal Simek [not found] ` <cover.1370004925.git.michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org> 2013-05-31 12:55 ` [PATCH v3 1/8] video: xilinxfb: Fix OF probing on little-endian systems Michal Simek 2013-05-31 13:05 ` Timur Tabi 2013-05-31 13:09 ` Michal Simek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).