aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/Makefile1
-rw-r--r--arch/arm/mach-omap2/board-tuna-android-usb.c68
-rw-r--r--arch/arm/mach-omap2/board-tuna.c2
-rw-r--r--arch/arm/mach-omap2/board-tuna.h19
4 files changed, 90 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 6a56113..53c3bc2 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -251,6 +251,7 @@ obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda-android.o
obj-$(CONFIG_MACH_TUNA) += board-tuna.o \
hsmmc.o \
omap_phy_internal.o
+obj-$(CONFIG_MACH_TUNA) += board-tuna-android-usb.o
obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o \
diff --git a/arch/arm/mach-omap2/board-tuna-android-usb.c b/arch/arm/mach-omap2/board-tuna-android-usb.c
new file mode 100644
index 0000000..e6f3aea
--- /dev/null
+++ b/arch/arm/mach-omap2/board-tuna-android-usb.c
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2011 Google, Inc.
+ *
+ * Author: Dima Zavin <dima@android.com>
+ *
+ * Based on all the other android boards
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/usb/android_composite.h>
+
+#include "board-tuna.h"
+
+static char *usb_functions_adb[] = {
+ "adb",
+};
+
+static char *usb_functions_all[] = {
+ "adb",
+};
+
+static struct android_usb_product usb_products[] = {
+ {
+ .product_id = 0x4e11,
+ .num_functions = ARRAY_SIZE(usb_functions_adb),
+ .functions = usb_functions_adb,
+ },
+};
+
+static struct android_usb_platform_data android_usb_pdata = {
+ .vendor_id = 0x18d1,
+ .product_id = 0x4e30,
+ .version = 0x0100,
+ .product_name = "Google, Inc.",
+ .manufacturer_name = "Tuna",
+ .num_products = ARRAY_SIZE(usb_products),
+ .products = usb_products,
+ .num_functions = ARRAY_SIZE(usb_functions_all),
+ .functions = usb_functions_all,
+};
+
+static struct platform_device android_usb_device = {
+ .name = "android_usb",
+ .id = -1,
+ .dev = {
+ .platform_data = &android_usb_pdata,
+ },
+};
+
+static struct platform_device *android_devices[] __initdata = {
+ &android_usb_device,
+};
+
+void __init omap4_tuna_android_usb_init(void)
+{
+ platform_add_devices(android_devices, ARRAY_SIZE(android_devices));
+}
diff --git a/arch/arm/mach-omap2/board-tuna.c b/arch/arm/mach-omap2/board-tuna.c
index da11922..5e3fc09 100644
--- a/arch/arm/mach-omap2/board-tuna.c
+++ b/arch/arm/mach-omap2/board-tuna.c
@@ -45,6 +45,7 @@
#include "hsmmc.h"
#include "control.h"
#include "mux.h"
+#include "board-tuna.h"
#define GPIO_WIFI_PMENA 43
#define GPIO_WIFI_IRQ 53
@@ -461,6 +462,7 @@ static void __init tuna_init(void)
board_serial_init();
omap2_hsmmc_init(mmc);
usb_musb_init(&musb_board_data);
+ omap4_tuna_android_usb_init();
}
static void __init tuna_map_io(void)
diff --git a/arch/arm/mach-omap2/board-tuna.h b/arch/arm/mach-omap2/board-tuna.h
new file mode 100644
index 0000000..456f142
--- /dev/null
+++ b/arch/arm/mach-omap2/board-tuna.h
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2011 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _MACH_OMAP2_BOARD_TUNA_H_
+#define _MACH_OMAP2_BOARD_TUNA_H_
+
+void omap4_tuna_android_usb_init(void);
+
+#endif