summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2011-12-31 18:44:22 +0000
committerRafaël Carré <rafael.carre@gmail.com>2011-12-31 18:44:22 +0000
commit4d5dff4eae3d6abffc7384e001029825ecde416e (patch)
tree512305edd63622ce993e178ee1a08a11b4d457b7
parenta117e770a5e658017255f0cc7ec07d7e6884f33d (diff)
downloadrockbox-4d5dff4eae3d6abffc7384e001029825ecde416e.tar.gz
rockbox-4d5dff4eae3d6abffc7384e001029825ecde416e.zip
gigabeats usb-target: merge in system-target.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31493 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/system-target.h15
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/usb-target.h43
2 files changed, 15 insertions, 43 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/system-target.h b/firmware/target/arm/imx31/gigabeat-s/system-target.h
index a8f7922dd5..533b2a1bd3 100644
--- a/firmware/target/arm/imx31/gigabeat-s/system-target.h
+++ b/firmware/target/arm/imx31/gigabeat-s/system-target.h
@@ -85,4 +85,19 @@ struct ARM_REGS {
85 85
86void dumpregs(void); 86void dumpregs(void);
87 87
88void usb_connect_event(void);
89
90/** Sector read/write filters **/
91
92/* Filter some things in the MBR - see usb-gigabeat-s.c */
93void usb_fix_mbr(unsigned char *mbr);
94#define USBSTOR_READ_SECTORS_FILTER() \
95 ({ if (cur_cmd.sector == 0) \
96 usb_fix_mbr(cur_cmd.data[cur_cmd.data_select]); \
97 0; })
98
99/* Disallow MBR writes entirely since it was "fixed" in usb_fix_mbr */
100#define USBSTOR_WRITE_SECTORS_FILTER() \
101 ({ cur_cmd.sector != 0 ? 0 : -1; })
102
88#endif /* SYSTEM_TARGET_H */ 103#endif /* SYSTEM_TARGET_H */
diff --git a/firmware/target/arm/imx31/gigabeat-s/usb-target.h b/firmware/target/arm/imx31/gigabeat-s/usb-target.h
deleted file mode 100644
index 60a9abd04c..0000000000
--- a/firmware/target/arm/imx31/gigabeat-s/usb-target.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Linus Nielsen Feltzing
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#ifndef USB_TARGET_H
22#define USB_TARGET_H
23
24#ifdef BOOTLOADER
25#define USB_DRIVER_CLOSE
26#endif
27
28void usb_connect_event(void);
29
30/** Sector read/write filters **/
31
32/* Filter some things in the MBR - see usb-gigabeat-s.c */
33void usb_fix_mbr(unsigned char *mbr);
34#define USBSTOR_READ_SECTORS_FILTER() \
35 ({ if (cur_cmd.sector == 0) \
36 usb_fix_mbr(cur_cmd.data[cur_cmd.data_select]); \
37 0; })
38
39/* Disallow MBR writes entirely since it was "fixed" in usb_fix_mbr */
40#define USBSTOR_WRITE_SECTORS_FILTER() \
41 ({ cur_cmd.sector != 0 ? 0 : -1; })
42
43#endif /* USB_TARGET */