public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] usb: add support for R8A66597 usb	controller
Date: Thu, 10 Jul 2008 19:38:19 +0900	[thread overview]
Message-ID: <4875E69B.10505@renesas.com> (raw)
In-Reply-To: <20080709191535.GD18713@game.jcrosoft.org>

2008/07/10 4:15, Jean-Christophe PLAGNIOL-VILLARD wrote:
>  +
>> +#include <common.h>
>> +#include <usb.h>
>> +#include <asm/io.h>
>> +
>> +#include "r8a66597.h"
>> +
>> +#if defined(CONFIG_USB_R8A66597_HCD)
> please move to the Makefile

Thank you for your comment.
I wlll move to the Makefile.

>> +
>> +#ifdef R8A66597_DEBUG
>> +#define R8A66597_DPRINT		printf
>> +#else
>> +#define R8A66597_DPRINT(...)
>> +#endif
> why not using debug()

I'm sorry. I didn't know debug(). I will use it.

>> +
>> +static const char hcd_name[] = "r8a66597_hcd";
>> +static unsigned short clock = CONFIG_R8A66597_XTAL;
>> +static unsigned short vif = CONFIG_R8A66597_LDRV;
>> +static unsigned short endian = CONFIG_R8A66597_ENDIAN;
>> +static struct r8a66597 gr8a66597;
> is it not possible to have a better name for the struct and the var
> and btw for the function naming?

Because XTAL, LDRV, DEVADD are a register name or register bit name,
I think that it is a good name...
But I will change a name of the "struct r8a66957 gr8a66597" to
"struct r8a66597 r8a66597_dev".

>> +
>> +static void set_devadd_reg(struct r8a66597 *r8a66597, u8 r8a66597_address,
>> +			   u16 usbspd, u8 upphub, u8 hubport, int port)
>> +{
>> +	u16 val;
>> +	unsigned long devadd_reg = get_devadd_addr(r8a66597_address);
>> +
>> +	val = (upphub << 11) | (hubport << 8) | (usbspd << 6) | (port & 0x0001);
>> +	r8a66597_write(r8a66597, val, devadd_reg);
>> +}
>> +

Best Regards,
Yoshihiro Shimoda

  reply	other threads:[~2008-07-10 10:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09 12:07 [U-Boot-Users] [PATCH] usb: add support for R8A66597 usb controller Yoshihiro Shimoda
2008-07-09 19:15 ` Jean-Christophe PLAGNIOL-VILLARD
2008-07-10 10:38   ` Yoshihiro Shimoda [this message]
2008-07-10 11:01     ` Wolfgang Denk
2008-07-10 12:40       ` Yoshihiro Shimoda
2008-07-10 19:47         ` Wolfgang Denk
2008-07-11  1:26           ` Nobuhiro Iwamatsu
2008-07-13 13:15             ` Wolfgang Denk

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=4875E69B.10505@renesas.com \
    --to=shimoda.yoshihiro@renesas.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox