blob: 37c1b8e84b5eac29afe81464446b8ac7687e81aa [file] [log] [blame]
Karl Kurbjun7b97fe22007-09-20 04:46:41 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
Karl Kurbjunbebbac82007-09-22 15:43:38 +00008 * $Id$
Karl Kurbjun7b97fe22007-09-20 04:46:41 +00009 *
10 * Copyright (C) 2007 by Karl Kurbjun
11 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * 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.
Karl Kurbjun7b97fe22007-09-20 04:46:41 +000016 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#include "config.h"
23#include "cpu.h"
24#include "system.h"
25#include "kernel.h"
26#include "ata.h"
Jonathan Gordonc67a7b12008-05-18 14:01:36 +000027#include "usb.h"
Karl Kurbjun7b97fe22007-09-20 04:46:41 +000028
29#define USB_RST_ASSERT
30#define USB_RST_DEASSERT
31
32#define USB_VPLUS_PWR_ASSERT
33#define USB_VPLUS_PWR_DEASSERT
34
Jonathan Gordonc67a7b12008-05-18 14:01:36 +000035#define USB_UNIT_IS_PRESENT USB_EXTRACTED
Karl Kurbjun7b97fe22007-09-20 04:46:41 +000036
37/* The usb detect is one pin to the cpu active low */
Jonathan Gordonc67a7b12008-05-18 14:01:36 +000038inline int usb_detect(void)
Karl Kurbjun7b97fe22007-09-20 04:46:41 +000039{
40 return USB_UNIT_IS_PRESENT;
41}
42
43void usb_init_device(void)
44{
45// ata_enable(true);
46}
47
48void usb_enable(bool on)
49{
50 if (on)
51 {
52 USB_VPLUS_PWR_ASSERT;
53 }
54 else
55 {
56 USB_VPLUS_PWR_DEASSERT;
57 }
58}