summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config-c200.h3
-rw-r--r--firmware/export/config-e200.h3
-rw-r--r--firmware/export/config-gigabeat-s.h6
-rwxr-xr-xfirmware/export/imx31l.h8
-rw-r--r--firmware/export/pp5020.h7
-rw-r--r--firmware/export/usb.h8
-rw-r--r--firmware/export/usb_core.h10
-rw-r--r--firmware/export/usb_drv.h6
8 files changed, 33 insertions, 18 deletions
diff --git a/firmware/export/config-c200.h b/firmware/export/config-c200.h
index d68d21455f..ff260dc956 100644
--- a/firmware/export/config-c200.h
+++ b/firmware/export/config-c200.h
@@ -180,6 +180,9 @@
180 180
181/* enable these for the experimental usb stack */ 181/* enable these for the experimental usb stack */
182#define HAVE_USBSTACK 182#define HAVE_USBSTACK
183#ifndef BOOTLOADER
184#define USB_DETECT_BY_DRV
185#endif
183#define USB_VENDOR_ID 0x0781 186#define USB_VENDOR_ID 0x0781
184#define USB_PRODUCT_ID 0x7450 187#define USB_PRODUCT_ID 0x7450
185 188
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h
index 2be64d95cc..7b27391c64 100644
--- a/firmware/export/config-e200.h
+++ b/firmware/export/config-e200.h
@@ -177,6 +177,9 @@
177 177
178/* enable these for the experimental usb stack */ 178/* enable these for the experimental usb stack */
179#define HAVE_USBSTACK 179#define HAVE_USBSTACK
180#ifndef BOOTLOADER
181#define USB_DETECT_BY_DRV
182#endif
180#define USB_VENDOR_ID 0x0781 183#define USB_VENDOR_ID 0x0781
181#define USB_PRODUCT_ID 0x7421 184#define USB_PRODUCT_ID 0x7421
182 185
diff --git a/firmware/export/config-gigabeat-s.h b/firmware/export/config-gigabeat-s.h
index 64f351c1ce..9e6029f00b 100644
--- a/firmware/export/config-gigabeat-s.h
+++ b/firmware/export/config-gigabeat-s.h
@@ -176,10 +176,12 @@
176/* USB On-the-go */ 176/* USB On-the-go */
177#define CONFIG_USBOTG USBOTG_ARC 177#define CONFIG_USBOTG USBOTG_ARC
178 178
179/* enable these for the experimental usb stack */ 179/* enable these for the usb stack */
180#define USE_ROCKBOX_USB 180#define USE_ROCKBOX_USB
181#define HAVE_USBSTACK 181#define HAVE_USBSTACK
182#define USB_STORAGE 182#define USB_STORAGE
183/* usb stack and driver settings */
184#define USB_PORTSCX_PHY_TYPE PORTSCX_PTS_ULPI
183#define USB_VENDOR_ID 0x0930 185#define USB_VENDOR_ID 0x0930
184#define USB_PRODUCT_ID 0x0010 186#define USB_PRODUCT_ID 0x0010
185 187
@@ -201,7 +203,7 @@
201/* Offset ( in the firmware file's header ) to the real data */ 203/* Offset ( in the firmware file's header ) to the real data */
202#define FIRMWARE_OFFSET_FILE_DATA 8 204#define FIRMWARE_OFFSET_FILE_DATA 8
203 205
204#define HAVE_SERIAL 206//#define HAVE_SERIAL
205#define HAVE_VOLUME_IN_LIST 207#define HAVE_VOLUME_IN_LIST
206 208
207/*Remove Comments from UART_INT to enable the UART interrupts,*/ 209/*Remove Comments from UART_INT to enable the UART interrupts,*/
diff --git a/firmware/export/imx31l.h b/firmware/export/imx31l.h
index b572c788a9..b55a56b105 100755
--- a/firmware/export/imx31l.h
+++ b/firmware/export/imx31l.h
@@ -36,7 +36,11 @@
36#define FRAME_SIZE (240*320*2) 36#define FRAME_SIZE (240*320*2)
37 37
38#define DEVBSS_ATTR __attribute__((section(".devbss"),nocommon)) 38#define DEVBSS_ATTR __attribute__((section(".devbss"),nocommon))
39#define QHARRAY_ATTR __attribute__((section(".qharray"),nocommon)) 39/* USBOTG */
40#define USB_QHARRAY_ATTR __attribute__((section(".qharray"),nocommon,aligned(2048)))
41#define USB_NUM_ENDPOINTS 8
42#define USB_DEVBSS_ATTR DEVBSS_ATTR
43#define USB_BASE OTG_BASE_ADDR
40 44
41/* 45/*
42 * AIPS 1 46 * AIPS 1
@@ -1580,6 +1584,4 @@
1580#define UART_FIFO_CTRL 0x881 1584#define UART_FIFO_CTRL 0x881
1581#define TIMEOUT 1000 1585#define TIMEOUT 1000
1582 1586
1583#define USB_BASE OTG_BASE_ADDR
1584
1585#endif /* __IMX31L_H__ */ 1587#endif /* __IMX31L_H__ */
diff --git a/firmware/export/pp5020.h b/firmware/export/pp5020.h
index b4919a219e..0f622a907d 100644
--- a/firmware/export/pp5020.h
+++ b/firmware/export/pp5020.h
@@ -23,7 +23,12 @@
23 23
24/* All info gleaned and/or copied from the iPodLinux project. */ 24/* All info gleaned and/or copied from the iPodLinux project. */
25 25
26#define QHARRAY_ATTR __attribute__((section(".qharray"),nocommon)) 26/* USBOTG */
27#define USB_NUM_ENDPOINTS 3
28/* This needs to be 2048 byte aligned, but USB_QHARRAY_ATTR should take care
29 * of that */
30#define USB_QHARRAY_ATTR __attribute__((section(".qharray"),nocommon,aligned(4)))
31#define USB_DEVBSS_ATTR IBSS_ATTR
27 32
28/* DRAM starts at 0x10000000, but in Rockbox we remap it to 0x00000000 */ 33/* DRAM starts at 0x10000000, but in Rockbox we remap it to 0x00000000 */
29#define DRAM_START 0x10000000 34#define DRAM_START 0x10000000
diff --git a/firmware/export/usb.h b/firmware/export/usb.h
index a6cfad5889..0a0539a622 100644
--- a/firmware/export/usb.h
+++ b/firmware/export/usb.h
@@ -33,8 +33,11 @@
33enum { 33enum {
34 USB_INSERTED, /* Event+State */ 34 USB_INSERTED, /* Event+State */
35 USB_EXTRACTED, /* Event+State */ 35 USB_EXTRACTED, /* Event+State */
36#ifdef HAVE_USB_POWER 36#if defined(HAVE_USB_POWER) || defined(USB_DETECT_BY_DRV)
37 USB_POWERED, /* State */ 37 USB_POWERED, /* Event+State */
38#endif
39#ifdef USB_DETECT_BY_DRV
40 USB_UNPOWERED, /* Event */
38#endif 41#endif
39#ifdef HAVE_LCD_BITMAP 42#ifdef HAVE_LCD_BITMAP
40 USB_SCREENDUMP, /* State */ 43 USB_SCREENDUMP, /* State */
@@ -107,6 +110,7 @@ struct usb_transfer_completion_event_data
107 110
108void usb_init(void); 111void usb_init(void);
109void usb_enable(bool on); 112void usb_enable(bool on);
113void usb_attach(void);
110void usb_start_monitoring(void); 114void usb_start_monitoring(void);
111void usb_close(void); 115void usb_close(void);
112void usb_acknowledge(long id); 116void usb_acknowledge(long id);
diff --git a/firmware/export/usb_core.h b/firmware/export/usb_core.h
index 7af8e43c8d..d0c8270d93 100644
--- a/firmware/export/usb_core.h
+++ b/firmware/export/usb_core.h
@@ -7,7 +7,7 @@
7 * \/ \/ \/ \/ \/ 7 * \/ \/ \/ \/ \/
8 * $Id$ 8 * $Id$
9 * 9 *
10 * Copyright (C) 2007 by Bjรถrn Stenberg 10 * Copyright (C) 2007 by Bjrn Stenberg
11 * 11 *
12 * This program is free software; you can redistribute it and/or 12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License 13 * modify it under the terms of the GNU General Public License
@@ -35,14 +35,6 @@
35 35
36/* endpoints */ 36/* endpoints */
37#define EP_CONTROL 0 37#define EP_CONTROL 0
38#if CONFIG_CPU == IMX31L
39#define NUM_ENDPOINTS 8
40#define USBDEVBSS_ATTR DEVBSS_ATTR
41#else
42#define USBDEVBSS_ATTR IBSS_ATTR
43#define NUM_ENDPOINTS 3
44#endif
45
46extern int usb_max_pkt_size; 38extern int usb_max_pkt_size;
47 39
48struct usb_class_driver; 40struct usb_class_driver;
diff --git a/firmware/export/usb_drv.h b/firmware/export/usb_drv.h
index 3d2e689050..23f6f4ce2a 100644
--- a/firmware/export/usb_drv.h
+++ b/firmware/export/usb_drv.h
@@ -24,9 +24,13 @@
24#include "kernel.h" 24#include "kernel.h"
25 25
26void usb_drv_startup(void); 26void usb_drv_startup(void);
27void usb_drv_usb_detect_event(void); /* Target implemented */
28void usb_drv_int_enable(bool enable); /* Target implemented */
29void usb_drv_reset(void);
27void usb_drv_init(void); 30void usb_drv_init(void);
28void usb_drv_exit(void); 31void usb_drv_exit(void);
29void usb_drv_int(void); 32void usb_drv_attach(void);
33void usb_drv_int(void); /* Call from target INT handler */
30void usb_drv_stall(int endpoint, bool stall,bool in); 34void usb_drv_stall(int endpoint, bool stall,bool in);
31bool usb_drv_stalled(int endpoint,bool in); 35bool usb_drv_stalled(int endpoint,bool in);
32int usb_drv_send(int endpoint, void* ptr, int length); 36int usb_drv_send(int endpoint, void* ptr, int length);