f3f36faf35
They're listed in AUTHORS and often incorrect anyway, for example: - What's a "Copyright $year-present"? - Which incarnation of Google (Inc, LLC, ...) is the current copyright holder? - People sometimes have their editor auto-add themselves to files even though they only deleted stuff - Or they let the editor automatically update the copyright year, because why not? - Who is the copyright holder "The coreboot project Authors"? - Or "Generated Code"? Sidestep all these issues by simply not putting these notices in individual files, let's list all copyright holders in AUTHORS instead and use the git history to deal with the rest. Change-Id: I89b10076e0f4a4b3acd59160fb7abe349b228321 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39611 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
67 lines
1.9 KiB
C
67 lines
1.9 KiB
C
/*
|
|
* This file is part of the coreboot project.
|
|
*
|
|
*
|
|
* 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; version 2 of the License.
|
|
*
|
|
* 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 _CONSOLE_USB_H_
|
|
#define _CONSOLE_USB_H_
|
|
|
|
#include <types.h>
|
|
|
|
void usbdebug_init(void);
|
|
int usbdebug_hw_init(bool force);
|
|
|
|
void usb_tx_byte(int idx, unsigned char data);
|
|
void usb_tx_flush(int idx);
|
|
unsigned char usb_rx_byte(int idx);
|
|
int usb_can_rx_byte(int idx);
|
|
|
|
#define __CONSOLE_USB_ENABLE__ (CONFIG(CONSOLE_USB) && \
|
|
((ENV_BOOTBLOCK && CONFIG(USBDEBUG_IN_PRE_RAM)) || \
|
|
(ENV_ROMSTAGE && CONFIG(USBDEBUG_IN_PRE_RAM)) || \
|
|
(ENV_POSTCAR && CONFIG(USBDEBUG_IN_PRE_RAM)) || \
|
|
(ENV_VERSTAGE && CONFIG(USBDEBUG_IN_PRE_RAM)) || \
|
|
ENV_RAMSTAGE))
|
|
|
|
#define USB_PIPE_FOR_CONSOLE 0
|
|
#define USB_PIPE_FOR_GDB 0
|
|
|
|
#if __CONSOLE_USB_ENABLE__
|
|
static inline void __usbdebug_init(void) { usbdebug_init(); }
|
|
static inline void __usb_tx_byte(u8 data)
|
|
{
|
|
usb_tx_byte(USB_PIPE_FOR_CONSOLE, data);
|
|
}
|
|
static inline void __usb_tx_flush(void) { usb_tx_flush(USB_PIPE_FOR_CONSOLE); }
|
|
#else
|
|
static inline void __usbdebug_init(void) {}
|
|
static inline void __usb_tx_byte(u8 data) {}
|
|
static inline void __usb_tx_flush(void) {}
|
|
#endif
|
|
|
|
/* */
|
|
#if 0 && CONFIG(GDB_STUB) && \
|
|
((ENV_ROMSTAGE && CONFIG(USBDEBUG_IN_PRE_RAM)) \
|
|
|| ENV_RAMSTAGE)
|
|
static inline void __gdb_hw_init(void) { usbdebug_init(); }
|
|
static inline void __gdb_tx_byte(u8 data)
|
|
{
|
|
usb_tx_byte(USB_PIPE_FOR_GDB, data);
|
|
}
|
|
static inline void __gdb_tx_flush(void) { usb_tx_flush(USB_PIPE_FOR_GDB); }
|
|
static inline u8 __gdb_rx_byte(void)
|
|
{
|
|
return usb_rx_byte(USB_PIPE_FOR_GDB);
|
|
}
|
|
#endif
|
|
|
|
#endif /* _CONSOLE_USB_H_ */
|