aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s5p
diff options
context:
space:
mode:
authorPankaj <pankaj.dubey@samsung.com>2010-08-04 17:07:55 +0900
committerArve Hjønnevåg <arve@android.com>2011-11-16 21:48:37 -0800
commit6fe317ca219c9e6507aff70272b8c8a489c10040 (patch)
treebdc62ba589b68d79b2846b40fdfd893569669491 /arch/arm/plat-s5p
parentc3aa81f4581371e89dcca061e218f704f794177c (diff)
downloadkernel_samsung_crespo-6fe317ca219c9e6507aff70272b8c8a489c10040.zip
kernel_samsung_crespo-6fe317ca219c9e6507aff70272b8c8a489c10040.tar.gz
kernel_samsung_crespo-6fe317ca219c9e6507aff70272b8c8a489c10040.tar.bz2
USB: Added/modified files for USB and Android Gadget Support.
Added new files - 1: param.h: Required by fsa9480_i2c driver. 2: fsa9480_i2c.h: Header file for fsa9480_i2c driver. Modified files: 1: cpu.c: Added mapping for OTG address. 2: mach-herring.c: Modified usb-otg clock name. Added new devices as usb_gadget and android_gadget in device list. 3: devs.c: Added platform data for Android gadget. 4: devs.h: added extern definition for android gadgets. 6: gadget_chips: Added new entry for s3c_udc gadget. 7: s3c_udc.h: Added new member related to dma mapping in structure s3c_request. 8: s3c_udc_otg.c: Changed clock name from usbotg to otg. 9: s3c_udc_otg_xfer_dma.c: Modified for dma functionality. disable debug message
Diffstat (limited to 'arch/arm/plat-s5p')
-rw-r--r--arch/arm/plat-s5p/devs.c97
1 files changed, 97 insertions, 0 deletions
diff --git a/arch/arm/plat-s5p/devs.c b/arch/arm/plat-s5p/devs.c
index 180addc..53de7cf 100644
--- a/arch/arm/plat-s5p/devs.c
+++ b/arch/arm/plat-s5p/devs.c
@@ -34,6 +34,103 @@
#include <plat/fimc.h>
#include <plat/csis.h>
+/* Android Gadget */
+#include <linux/usb/android_composite.h>
+#define S3C_VENDOR_ID 0x18d1
+#define S3C_PRODUCT_ID 0x0001
+#define S3C_ADB_PRODUCT_ID 0x0005
+#define MAX_USB_SERIAL_NUM 17
+
+static char *usb_functions_ums[] = {
+ "usb_mass_storage",
+};
+
+static char *usb_functions_rndis[] = {
+ "rndis",
+};
+
+static char *usb_functions_rndis_adb[] = {
+ "rndis",
+ "adb",
+};
+static char *usb_functions_ums_adb[] = {
+ "usb_mass_storage",
+ "adb",
+};
+
+static char *usb_functions_all[] = {
+#ifdef CONFIG_USB_ANDROID_RNDIS
+ "rndis",
+#endif
+ "usb_mass_storage",
+ "adb",
+#ifdef CONFIG_USB_ANDROID_ACM
+ "acm",
+#endif
+};
+static struct android_usb_product usb_products[] = {
+ {
+ .product_id = S3C_PRODUCT_ID,
+ .num_functions = ARRAY_SIZE(usb_functions_ums),
+ .functions = usb_functions_ums,
+ },
+ {
+ .product_id = S3C_ADB_PRODUCT_ID,
+ .num_functions = ARRAY_SIZE(usb_functions_ums_adb),
+ .functions = usb_functions_ums_adb,
+ },
+ /*
+ {
+ .product_id = S3C_RNDIS_PRODUCT_ID,
+ .num_functions = ARRAY_SIZE(usb_functions_rndis),
+ .functions = usb_functions_rndis,
+ },
+ {
+ .product_id = S3C_RNDIS_ADB_PRODUCT_ID,
+ .num_functions = ARRAY_SIZE(usb_functions_rndis_adb),
+ .functions = usb_functions_rndis_adb,
+ },
+ */
+};
+// serial number should be changed as real device for commercial release
+static char device_serial[MAX_USB_SERIAL_NUM]="0123456789ABCDEF";
+/* standard android USB platform data */
+
+// Information should be changed as real product for commercial release
+static struct android_usb_platform_data android_usb_pdata = {
+ .vendor_id = S3C_VENDOR_ID,
+ .product_id = S3C_PRODUCT_ID,
+ .manufacturer_name = "Android",//"Samsung",
+ .product_name = "Android",//"Samsung SMDKV210",
+ .serial_number = device_serial,
+ .num_products = ARRAY_SIZE(usb_products),
+ .products = usb_products,
+ .num_functions = ARRAY_SIZE(usb_functions_all),
+ .functions = usb_functions_all,
+};
+
+struct platform_device s3c_device_android_usb = {
+ .name = "android_usb",
+ .id = -1,
+ .dev = {
+ .platform_data = &android_usb_pdata,
+ },
+};
+EXPORT_SYMBOL(s3c_device_android_usb);
+
+static struct usb_mass_storage_platform_data ums_pdata = {
+ .vendor = "Android ",//"Samsung",
+ .product = "UMS Composite",//"SMDKV210",
+ .release = 1,
+};
+struct platform_device s3c_device_usb_mass_storage= {
+ .name = "usb_mass_storage",
+ .id = -1,
+ .dev = {
+ .platform_data = &ums_pdata,
+ },
+};
+EXPORT_SYMBOL(s3c_device_usb_mass_storage);
/* RTC */
static struct resource s5p_rtc_resource[] = {
[0] = {