CMOS: Add set_option and rework get_option.
[coreboot.git] / src / pc80 / usbdebug_direct_serial.c
1 #include <part/fallback_boot.h>
2 #include "../lib/usbdebug_direct.c" 
3 static void early_usbdebug_direct_init(void)
4 {
5         struct ehci_debug_info *dbg_info = 
6                 (struct ehci_debug_info *)(DCACHE_RAM_BASE + DCACHE_RAM_SIZE - sizeof (struct ehci_debug_info)); 
7         
8         usbdebug_direct_init(EHCI_BAR, EHCI_DEBUG_OFFSET, dbg_info); 
9 }
10 void usbdebug_direct_tx_byte(unsigned char data)
11 {
12         struct ehci_debug_info *dbg_info;
13         dbg_info = (struct ehci_debug_info *)(DCACHE_RAM_BASE + DCACHE_RAM_SIZE - sizeof (struct ehci_debug_info)); // in Cache 
14         if (dbg_info->ehci_debug) { 
15                 dbgp_bulk_write_x(dbg_info, &data, 1);
16         }
17 }
18 void usbdebug_direct_ram_tx_byte(unsigned char data)
19 {
20         struct ehci_debug_info *dbg_info;
21         dbg_info = (struct ehci_debug_info *)((CONFIG_LB_MEM_TOPK<<10) - sizeof (struct ehci_debug_info)); //in RAM 
22         if (dbg_info->ehci_debug) {
23                 dbgp_bulk_write_x(dbg_info, &data, 1);
24         }
25 }