usb: r8a66597-hcd platform data on_chip support
PATCH 1/1 usb: r8a66597-hcd platform data on_chip support
From: Magnus Damm <[email protected]>
Convert the r8a66597-hcd driver to use the on_chip flag from platform data to enable on chip behaviour instead of relying on CONFIG_SUPERH_ON_CHIP_R8A66597 ugliness.
This makes the code cleaner and also allows us to support both external and internal r8a66597 with the same kernel.
It also makes the Kconfig part more future proof since we with this patch can add support for new processors with on-chip r8a66597 without modifying the Kconfig.
---
Applies on top of the dev_pm_ops patch.
arch/sh/boards/mach-se/7724/setup.c | 1 arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 2 arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 2 drivers/usb/host/Kconfig | 7 - drivers/usb/host/r8a66597-hcd.c | 187 ++++++++++++++++++-------------- drivers/usb/host/r8a66597.h | 78 ++++++------- include/linux/usb/r8a66597.h | 3 7 files changed, 148 insertions(+), 132 deletions(-)
arch/sh/boards/mach-se/7724/setup.c +1 -0
@@ -304,6 +304,7 @@ static struct platform_device sh_eth_dev };static struct r8a66597_platdata sh7724_usb0_host_data = { + .on_chip =1 , };static struct resource sh7724_usb0_host_resources[] = {
arch/sh/kernel/cpu/sh4a/setup-sh7366.c +1 -1
@@ -40,7 +40,7 @@ static struct platform_device iic_device };static struct r8a66597_platdata r8a66597_data = { -/* This set zero to all members */ + .on_chip =1 , };static struct resource usb_host_resources[] = {
arch/sh/kernel/cpu/sh4a/setup-sh7723.c +1 -1
@@ -398,7 +398,7 @@ static struct platform_device rtc_device };static struct r8a66597_platdata r8a66597_data = { -/* This set zero to all members */ + .on_chip =1 , };static struct resource sh7723_usb_host_resources[] = {
drivers/usb/host/Kconfig +0 -7
@@ -335,13 +335,6 @@ config USB_R8A66597_HCD To compile this driver as a module, choose M here: the module will be called r8a66597-hcd. -config SUPERH_ON_CHIP_R8A66597 - boolean "Enable SuperH on-chip R8A66597 USB" - depends on USB_R8A66597_HCD && (CPU_SUBTYPE_SH7366 || CPU_SUBTYPE_SH7723 || CPU_SUBTYPE_SH7724) - help - This driver enables support for the on-chip R8A66597 in the - SH7366, SH7723 and SH7724 processors. - config USB_WHCI_HCD tristate "Wireless USB Host Controller Interface (WHCI) driver (EXPERIMENTAL)" depends on EXPERIMENTAL
drivers/usb/host/r8a66597-hcd.c +106 -81
358 lines not on this page · raw message
drivers/usb/host/r8a66597.h +36 -42
134 lines not on this page · raw message
include/linux/usb/r8a66597.h +3 -0
@@ -31,6 +31,9 @@ struct r8a66597_platdata {/* This ops can controll port power instead of DVSTCTR register. */ void (*port_power)(int port,int power); +/* set one = on chip controller, set zero = external controller */ + unsigned on_chip:1; +/* (external controller only) set R8A66597_PLATDATA_XTAL_nnMHZ */ unsigned xtal:2;
Quoted 9 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Convert the r8a66597-hcd driver to use the
on_chipflag from platform data to enable on chip behaviour instead of relying onCONFIG_SUPERH_ON_CHIP_R8A66597ugliness.This makes the code cleaner and also allows us to support both external and internal r8a66597 with the same kernel.
Quoted 6 lines
It also makes the
Kconfigpart more future proof since we with this patch can add support for new processors with on-chip r8a66597 without modifying theKconfig.Signed-off-by Magnus Damm <[email protected]>---
Thank you very much for your patch.
I tested this patch and it was working.
Thanks,
Yoshihiro Shimoda
Quoted 14 lines · Yoshihiro Shimoda
Quoted 13 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Convert the r8a66597-hcd driver to use the
on_chipflag from platform data to enable on chip behaviour instead of relying onCONFIG_SUPERH_ON_CHIP_R8A66597ugliness.This makes the code cleaner and also allows us to support both external and internal r8a66597 with the same kernel.
It also makes the
Kconfigpart more future proof since we with this patch can add support for new processors with on-chip r8a66597 without modifying theKconfig.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Magnus Damm <[email protected]>---
Thank you very much for your patch.
I tested this patch and it was working.
Thanks, I've added this to the patch.
greg k-h