From: Vitaly Bordug <vitb@kernel.crashing.org>
To: Greg KH <greg@kroah.com>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH] USB_DR device support for FSL MPC831x
Date: Tue, 17 Jul 2007 04:58:49 +0400 [thread overview]
Message-ID: <20070717005849.23036.21497.stgit@localhost.localdomain> (raw)
This adds support for USB device mode on mpc831x series.
Devicetree node modification is required to make it work -
dr_mode ="peripheral";
which should be commented out if host mode is desired onboot.
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
---
arch/powerpc/sysdev/fsl_soc.c | 1 +
include/linux/fsl_devices.h | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index c0ddc80..27a1510 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -514,6 +514,7 @@ static int __init fsl_usb_of_init(void)
}
} else if (prop && !strcmp(prop, "peripheral")) {
usb_data.operating_mode = FSL_USB2_DR_DEVICE;
+ usb_data.max_ep_nr = *(unsigned int*)of_get_property(np, "max_ep_nr",NULL);
usb_dev_dr_client = platform_device_register_simple(
"fsl-usb2-udc", i, r, 2);
if (IS_ERR(usb_dev_dr_client)) {
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 12e631f..a3feb34 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -103,6 +103,7 @@ struct fsl_usb2_platform_data {
enum fsl_usb2_operating_modes operating_mode;
enum fsl_usb2_phy_modes phy_mode;
unsigned int port_enables;
+ unsigned int max_ep_nr;
};
/* Flags in fsl_usb2_mph_platform_data */
next reply other threads:[~2007-07-17 0:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-17 0:58 Vitaly Bordug [this message]
2007-07-17 12:21 ` [PATCH] USB_DR device support for FSL MPC831x Li Yang-r58472
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=20070717005849.23036.21497.stgit@localhost.localdomain \
--to=vitb@kernel.crashing.org \
--cc=greg@kroah.com \
--cc=linuxppc-dev@ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).