usb: add support for R8A66597 usb controller
PATCH 1/1 usb: add support for R8A66597 usb controller
add support for Renesas R8A66597 usb controller.
This patch supports USB Host mode.
--- drivers/usb/Makefile | 1 + drivers/usb/r8a66597-hcd.c | 924 ++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/r8a66597.h | 663 +++++++++++++++++++++++++++++++ include/usb.h | 2 +- 4 files changed, 1589 insertions(+), 1 deletions(-) create mode 100644 drivers/usb/r8a66597-hcd.c create mode 100644 drivers/usb/r8a66597.h
drivers/usb/Makefile +1 -0
@@ -28,6 +28,7 @@ LIB := $(obj)libusb.a COBJS-y += isp116x-hcd.o COBJS-y += sl811_usb.o COBJS-y += usb_ohci.o +COBJS-y += r8a66597-hcd.o COBJS-y += usbdcore.o COBJS-y += usbdcore_ep0.o COBJS-y += usbdcore_mpc8xx.o
drivers/usb/r8a66597-hcd.c new file +924 -0
924 lines not on this page · raw message
drivers/usb/r8a66597.h new file +663 -0
663 lines not on this page · raw message
include/usb.h +1 -1
@@ -171,7 +171,7 @@ struct usb_device {#if defined(CONFIG_USB_UHCI ) || defined(CONFIG_USB_OHCI ) || \ defined(CONFIG_USB_OHCI_NEW ) || defined (CONFIG_USB_SL811HS ) || \ - defined(CONFIG_USB_ISP116X_HCD ) + defined(CONFIG_USB_ISP116X_HCD ) || defined(CONFIG_USB_R8A66597_HCD )int usb_lowlevel_init (void );int usb_lowlevel_stop (void );
PATCH 1/1 usb: add support for R8A66597 usb controller
+
drivers/usb/r8a66597-hcd.c line 27
Quoted 7 lines
drivers/usb/r8a66597-hcd.c new file +7
-0+#include <common.h> +#include <usb.h> +#include <asm/io.h> + +#include "r8a66597.h" + +#if defined(CONFIG_USB_R8A66597_HCD )
please move to the Makefile
drivers/usb/r8a66597-hcd.c line 33
Quoted 6 lines
drivers/usb/r8a66597-hcd.c new file +6
-0+ +#ifdef R8A66597_DEBUG +#define R8A66597_DPRINT printf +#else +#define R8A66597_DPRINT (...) +#endif
why not using debug()
drivers/usb/r8a66597-hcd.c line 39
Quoted 6 lines
drivers/usb/r8a66597-hcd.c new file +6
-0+ +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?
drivers/usb/r8a66597-hcd.c line 50
Quoted 11 lines
drivers/usb/r8a66597-hcd.c new file +11
-0+ +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,
J.
PATCH 1/1 usb: add support for R8A66597 usb controller
Quoted 9 lines · Jean-Christophe PLAGNIOL-VILLARD
+
drivers/usb/r8a66597-hcd.c line 27
Quoted 7 lines
drivers/usb/r8a66597-hcd.c new file +7
-0+#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.
Quoted 7 lines
drivers/usb/r8a66597-hcd.c line 33
Quoted 6 lines
drivers/usb/r8a66597-hcd.c new file +6
-0+ +#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.
Quoted 8 lines
drivers/usb/r8a66597-hcd.c line 39
Quoted 6 lines
drivers/usb/r8a66597-hcd.c new file +6
-0+ +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".
Quoted 11 lines
drivers/usb/r8a66597-hcd.c line 50
Quoted 11 lines
drivers/usb/r8a66597-hcd.c new file +11
-0+ +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
PATCH 1/1 usb: add support for R8A66597 usb controller
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 3 lines
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 r8a66597r8a66597_dev".
Can you not find some simpler name that "r8a66597"? That's a mess to type and to read.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month. - Wernher von Braun
PATCH 1/1 usb: add support for R8A66597 usb controller
Quoted 10 lines · Wolfgang Denk
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 2 lines
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 r8a66597r8a66597_dev".Can you not find some simpler name that "r8a66597"? That's a mess to type and to read.
Thank you for your comment.
I can change that "struct r8a66597" for a simple name. For example, its name is "struct r597". However, I do not want to change a source file name and CONFIG_ name, because "R8A66597" is product name.
Best Regards,
Yoshihiro Shimoda
PATCH 1/1 usb: add support for R8A66597 usb controller
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Can you not find some simpler name that "r8a66597"? That's a mess to type and to read.
Thank you for your comment.
I can change that "struct r8a66597" for a simple name. For example, its name is "struct r597". However, I do not want to change a source file name and
CONFIG_name, because "R8A66597" is product name.
Doesn't the board have an easy to spell and easy to remember nickname or so?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de To the systems programmer, users and applications serve only to provide a test load.
PATCH 1/1 usb: add support for R8A66597 usb controller
Hi, Wolfgang.
2008/7/11 Wolfgang Denk <[email protected]>:
Quoted 5 lines
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Can you not find some simpler name that "r8a66597"? That's a mess to type and to read.
Quoted 8 lines
Quoted 5 lines
Thank you for your comment.
I can change that "struct r8a66597" for a simple name. For example, its name is "struct r597". However, I do not want to change a source file name and
CONFIG_name, because "R8A66597" is product name.Doesn't the board have an easy to spell and easy to remember nickname or so?
Unfortunately this tip does not have nicname and other. We want to acquire a name same as Linux kernel USB driver..
Best regards,
Nobuhiro
PATCH 1/1 usb: add support for R8A66597 usb controller
Quoted 3 lines · In message <[email protected]> you…
Unfortunately this tip does not have nicname and other. We want to acquire a name same as Linux kernel USB driver..
I see.
Well, so we have to swallow that bitter pill, I guess.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The only person who always got his work done by Friday
was Robinson Crusoe.