All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3 V2] EHCI: Exynos: Add fdt support
Date: Thu, 6 Dec 2012 18:39:45 +0100	[thread overview]
Message-ID: <201212061839.45249.marex@denx.de> (raw)
In-Reply-To: <1354775556-23212-2-git-send-email-rajeshwari.s@samsung.com>

Dear Rajeshwari Shinde,

> Adding fdt support to ehci-exynos in order to parse
> register base addresses from the device node.
> 
> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
> ---
> Chnages in V2:
> 	- Removed checkpatch errors.
>  drivers/usb/host/ehci-exynos.c |   59
> ++++++++++++++++++++++++++++++++++++--- 1 files changed, 54 insertions(+),
> 5 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-exynos.c
> b/drivers/usb/host/ehci-exynos.c index 9f0ed06..f9189a5 100644
> --- a/drivers/usb/host/ehci-exynos.c
> +++ b/drivers/usb/host/ehci-exynos.c
> @@ -21,6 +21,8 @@
>   */
> 
>  #include <common.h>
> +#include <fdtdec.h>
> +#include <libfdt.h>
>  #include <usb.h>
>  #include <asm/arch/cpu.h>
>  #include <asm/arch/ehci.h>
> @@ -28,6 +30,9 @@
>  #include <asm/arch/power.h>
>  #include "ehci.h"
> 
> +/* Declare global data pointer */
> +DECLARE_GLOBAL_DATA_PTR;
> +
>  /* Setup the EHCI host controller. */
>  static void setup_usb_phy(struct exynos_usb_phy *usb)
>  {
> @@ -86,12 +91,39 @@ static void reset_usb_phy(struct exynos_usb_phy *usb)
>   */
>  int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor
> **hcor) {
> -	struct exynos_usb_phy *usb;
> +	struct exynos_usb_phy *usb = NULL;
> +	unsigned int *hcd = NULL;
> +	unsigned int node;
> +
> +	node = fdtdec_next_compatible(gd->fdt_blob, 0,
> +					COMPAT_SAMSUNG_EXYNOS_EHCI);
> +	if (node <= 0) {
> +		debug("EHCI: Can't get device tree node for ehci\n");
[...]

error output should be really puts() or printf() ...

You can also use errno.h instead of -1.

Rest is good

  reply	other threads:[~2012-12-06 17:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06  6:32 [U-Boot] [PATCH 0/3 V2] EXYNOS5: Add FDT support for USB Rajeshwari Shinde
2012-12-06  6:32 ` [U-Boot] [PATCH 1/3 V2] EHCI: Exynos: Add fdt support Rajeshwari Shinde
2012-12-06 17:39   ` Marek Vasut [this message]
2012-12-06 17:57     ` Simon Glass
2012-12-06 18:02       ` Marek Vasut
2012-12-06 18:07         ` Simon Glass
2012-12-06 18:13           ` Marek Vasut
2012-12-06  6:32 ` [U-Boot] [PATCH 2/3 V2] EXYNOS5: Add devine node for USB Rajeshwari Shinde
2012-12-06 17:40   ` Marek Vasut
2012-12-06  6:32 ` [U-Boot] [PATCH 3/3 V2] EXYNOS5: FDT: Add compatible strings " Rajeshwari Shinde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201212061839.45249.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.