Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
5536b235
Commit
5536b235
authored
Oct 09, 2006
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] Alchemy: nuke usbdev; it's useless as is ...
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
0118c3ca
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
9 additions
and
1662 deletions
+9
-1662
arch/mips/Kconfig
arch/mips/Kconfig
+0
-5
arch/mips/au1000/common/Makefile
arch/mips/au1000/common/Makefile
+0
-1
arch/mips/au1000/common/usbdev.c
arch/mips/au1000/common/usbdev.c
+0
-1552
arch/mips/au1000/db1x00/board_setup.c
arch/mips/au1000/db1x00/board_setup.c
+0
-5
arch/mips/au1000/mtx-1/board_setup.c
arch/mips/au1000/mtx-1/board_setup.c
+2
-6
arch/mips/au1000/pb1000/board_setup.c
arch/mips/au1000/pb1000/board_setup.c
+3
-7
arch/mips/au1000/pb1100/board_setup.c
arch/mips/au1000/pb1100/board_setup.c
+2
-4
arch/mips/au1000/pb1500/board_setup.c
arch/mips/au1000/pb1500/board_setup.c
+2
-7
arch/mips/configs/pb1100_defconfig
arch/mips/configs/pb1100_defconfig
+0
-1
arch/mips/configs/pb1500_defconfig
arch/mips/configs/pb1500_defconfig
+0
-1
include/asm-mips/mach-au1x00/au1000_usbdev.h
include/asm-mips/mach-au1x00/au1000_usbdev.h
+0
-73
No files found.
arch/mips/Kconfig
View file @
5536b235
...
...
@@ -1010,11 +1010,6 @@ endchoice
config ARC32
bool
config AU1X00_USB_DEVICE
bool
depends on MIPS_PB1500 || MIPS_PB1100 || MIPS_PB1000
default n
config BOOT_ELF32
bool
...
...
arch/mips/au1000/common/Makefile
View file @
5536b235
...
...
@@ -10,6 +10,5 @@ obj-y += prom.o irq.o puts.o time.o reset.o \
au1xxx_irqmap.o clocks.o platform.o power.o setup.o
\
sleeper.o cputable.o dma.o dbdma.o gpio.o
obj-$(CONFIG_AU1X00_USB_DEVICE)
+=
usbdev.o
obj-$(CONFIG_KGDB)
+=
dbg_io.o
obj-$(CONFIG_PCI)
+=
pci.o
arch/mips/au1000/common/usbdev.c
deleted
100644 → 0
View file @
0118c3ca
This diff is collapsed.
Click to expand it.
arch/mips/au1000/db1x00/board_setup.c
View file @
5536b235
...
...
@@ -58,11 +58,6 @@ void __init board_setup(void)
pin_func
=
0
;
/* not valid for 1550 */
#ifdef CONFIG_AU1X00_USB_DEVICE
// 2nd USB port is USB device
pin_func
=
au_readl
(
SYS_PINFUNC
)
&
(
u32
)(
~
0x8000
);
au_writel
(
pin_func
,
SYS_PINFUNC
);
#endif
#if defined(CONFIG_IRDA) && (defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100))
/* set IRFIRSEL instead of GPIO15 */
...
...
arch/mips/au1000/mtx-1/board_setup.c
View file @
5536b235
...
...
@@ -51,15 +51,11 @@ void board_reset (void)
void
__init
board_setup
(
void
)
{
#if defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
#ifdef CONFIG_AU1X00_USB_DEVICE
// 2nd USB port is USB device
au_writel
(
au_readl
(
SYS_PINFUNC
)
&
(
u32
)(
~
0x8000
),
SYS_PINFUNC
);
#endif
#ifdef CONFIG_USB_OHCI
// enable USB power switch
au_writel
(
au_readl
(
GPIO2_DIR
)
|
0x10
,
GPIO2_DIR
);
au_writel
(
0x100000
,
GPIO2_OUTPUT
);
#endif // defined (CONFIG_USB_OHCI)
|| defined (CONFIG_AU1X00_USB_DEVICE)
#endif // defined (CONFIG_USB_OHCI)
#ifdef CONFIG_PCI
#if defined(__MIPSEB__)
...
...
arch/mips/au1000/pb1000/board_setup.c
View file @
5536b235
...
...
@@ -54,7 +54,7 @@ void __init board_setup(void)
au_writel
(
0
,
SYS_PINSTATERD
);
udelay
(
100
);
#if
defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
#if
def CONFIG_USB_OHCI
/* zero and disable FREQ2 */
sys_freqctrl
=
au_readl
(
SYS_FREQCTRL0
);
sys_freqctrl
&=
~
0xFFF00000
;
...
...
@@ -104,23 +104,19 @@ void __init board_setup(void)
*/
#ifdef CONFIG_USB_OHCI
sys_clksrc
|=
((
4
<<
12
)
|
(
0
<<
11
)
|
(
0
<<
10
));
#endif
#ifdef CONFIG_AU1X00_USB_DEVICE
sys_clksrc
|=
((
4
<<
7
)
|
(
0
<<
6
)
|
(
0
<<
5
));
#endif
au_writel
(
sys_clksrc
,
SYS_CLKSRC
);
// configure pins GPIO[14:9] as GPIO
pin_func
=
au_readl
(
SYS_PINFUNC
)
&
(
u32
)(
~
0x8080
);
#ifndef CONFIG_AU1X00_USB_DEVICE
// 2nd USB port is USB host
pin_func
|=
0x8000
;
#endif
au_writel
(
pin_func
,
SYS_PINFUNC
);
au_writel
(
0x2800
,
SYS_TRIOUTCLR
);
au_writel
(
0x0030
,
SYS_OUTPUTCLR
);
#endif // defined (CONFIG_USB_OHCI)
|| defined (CONFIG_AU1X00_USB_DEVICE)
#endif // defined (CONFIG_USB_OHCI)
// make gpio 15 an input (for interrupt line)
pin_func
=
au_readl
(
SYS_PINFUNC
)
&
(
u32
)(
~
0x100
);
...
...
arch/mips/au1000/pb1100/board_setup.c
View file @
5536b235
...
...
@@ -55,7 +55,7 @@ void __init board_setup(void)
au_writel
(
0
,
SYS_PININPUTEN
);
udelay
(
100
);
#if
defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
#if
def CONFIG_USB_OHCI
// configure pins GPIO[14:9] as GPIO
pin_func
=
au_readl
(
SYS_PINFUNC
)
&
(
u32
)(
~
0x80
);
...
...
@@ -92,12 +92,10 @@ void __init board_setup(void)
// get USB Functionality pin state (device vs host drive pins)
pin_func
=
au_readl
(
SYS_PINFUNC
)
&
(
u32
)(
~
0x8000
);
#ifndef CONFIG_AU1X00_USB_DEVICE
// 2nd USB port is USB host
pin_func
|=
0x8000
;
#endif
au_writel
(
pin_func
,
SYS_PINFUNC
);
#endif // defined (CONFIG_USB_OHCI)
|| defined (CONFIG_AU1X00_USB_DEVICE)
#endif // defined (CONFIG_USB_OHCI)
/* Enable sys bus clock divider when IDLE state or no bus activity. */
au_writel
(
au_readl
(
SYS_POWERCTRL
)
|
(
0x3
<<
5
),
SYS_POWERCTRL
);
...
...
arch/mips/au1000/pb1500/board_setup.c
View file @
5536b235
...
...
@@ -56,7 +56,7 @@ void __init board_setup(void)
au_writel
(
0
,
SYS_PINSTATERD
);
udelay
(
100
);
#if
defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
#if
def CONFIG_USB_OHCI
/* GPIO201 is input for PCMCIA card detect */
/* GPIO203 is input for PCMCIA interrupt request */
...
...
@@ -87,20 +87,15 @@ void __init board_setup(void)
*/
#ifdef CONFIG_USB_OHCI
sys_clksrc
|=
((
4
<<
12
)
|
(
0
<<
11
)
|
(
0
<<
10
));
#endif
#ifdef CONFIG_AU1X00_USB_DEVICE
sys_clksrc
|=
((
4
<<
7
)
|
(
0
<<
6
)
|
(
0
<<
5
));
#endif
au_writel
(
sys_clksrc
,
SYS_CLKSRC
);
pin_func
=
au_readl
(
SYS_PINFUNC
)
&
(
u32
)(
~
0x8000
);
#ifndef CONFIG_AU1X00_USB_DEVICE
// 2nd USB port is USB host
pin_func
|=
0x8000
;
#endif
au_writel
(
pin_func
,
SYS_PINFUNC
);
#endif // defined (CONFIG_USB_OHCI)
|| defined (CONFIG_AU1X00_USB_DEVICE)
#endif // defined (CONFIG_USB_OHCI)
...
...
arch/mips/configs/pb1100_defconfig
View file @
5536b235
...
...
@@ -76,7 +76,6 @@ CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
CONFIG_SOC_AU1100=y
CONFIG_SOC_AU1X00=y
CONFIG_SWAP_IO_SPACE=y
# CONFIG_AU1X00_USB_DEVICE is not set
CONFIG_MIPS_L1_CACHE_SHIFT=5
#
...
...
arch/mips/configs/pb1500_defconfig
View file @
5536b235
...
...
@@ -75,7 +75,6 @@ CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
CONFIG_SOC_AU1500=y
CONFIG_SOC_AU1X00=y
# CONFIG_AU1X00_USB_DEVICE is not set
CONFIG_MIPS_L1_CACHE_SHIFT=5
#
...
...
include/asm-mips/mach-au1x00/au1000_usbdev.h
deleted
100644 → 0
View file @
0118c3ca
/*
* BRIEF MODULE DESCRIPTION
* Au1000 USB Device-Side Driver
*
* Copyright 2001 MontaVista Software Inc.
* Author: MontaVista Software, Inc.
* stevel@mvista.com or source@mvista.com
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define USBDEV_REV 0x0110 // BCD
#define USBDEV_EP0_MAX_PACKET_SIZE 64
typedef
enum
{
ATTACHED
=
0
,
POWERED
,
DEFAULT
,
ADDRESS
,
CONFIGURED
}
usbdev_state_t
;
typedef
enum
{
CB_NEW_STATE
=
0
,
CB_PKT_COMPLETE
}
usbdev_cb_type_t
;
typedef
struct
usbdev_pkt
{
int
ep_addr
;
// ep addr this packet routed to
int
size
;
// size of payload in bytes
unsigned
status
;
// packet status
struct
usbdev_pkt
*
next
;
// function layer can't touch this
u8
payload
[
0
];
// the payload
}
usbdev_pkt_t
;
#define PKT_STATUS_ACK (1<<0)
#define PKT_STATUS_NAK (1<<1)
#define PKT_STATUS_SU (1<<2)
extern
int
usbdev_init
(
struct
usb_device_descriptor
*
dev_desc
,
struct
usb_config_descriptor
*
config_desc
,
struct
usb_interface_descriptor
*
if_desc
,
struct
usb_endpoint_descriptor
*
ep_desc
,
struct
usb_string_descriptor
*
str_desc
[],
void
(
*
cb
)(
usbdev_cb_type_t
,
unsigned
long
,
void
*
),
void
*
cb_data
);
extern
void
usbdev_exit
(
void
);
extern
int
usbdev_alloc_packet
(
int
ep_addr
,
int
data_size
,
usbdev_pkt_t
**
pkt
);
extern
int
usbdev_send_packet
(
int
ep_addr
,
usbdev_pkt_t
*
pkt
);
extern
int
usbdev_receive_packet
(
int
ep_addr
,
usbdev_pkt_t
**
pkt
);
extern
int
usbdev_get_byte_count
(
int
ep_addr
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment