Masahiro Yamada | da333ae | 2014-10-23 22:26:09 +0900 | [diff] [blame] | 1 | config DM_SERIAL |
| 2 | bool "Enable Driver Model for serial drivers" |
| 3 | depends on DM |
| 4 | help |
Simon Glass | f94a1be | 2015-02-05 21:41:35 -0700 | [diff] [blame] | 5 | Enable driver model for serial. This replaces |
| 6 | drivers/serial/serial.c with the serial uclass, which |
| 7 | implements serial_putc() etc. The uclass interface is |
| 8 | defined in include/serial.h. |
Masahiro Yamada | ff247b7 | 2014-10-23 22:26:11 +0900 | [diff] [blame] | 9 | |
Simon Glass | 2f964aa | 2015-01-26 18:27:07 -0700 | [diff] [blame] | 10 | config DEBUG_UART |
| 11 | bool "Enable an early debug UART for debugging" |
| 12 | help |
| 13 | The debug UART is intended for use very early in U-Boot to debug |
| 14 | problems when an ICE or other debug mechanism is not available. |
| 15 | |
| 16 | To use it you should: |
| 17 | - Make sure your UART supports this interface |
| 18 | - Enable CONFIG_DEBUG_UART |
| 19 | - Enable the CONFIG for your UART to tell it to provide this interface |
| 20 | (e.g. CONFIG_DEBUG_UART_NS16550) |
| 21 | - Define the required settings as needed (see below) |
| 22 | - Call debug_uart_init() before use |
| 23 | - Call debug_uart_putc() to output a character |
| 24 | |
| 25 | Depending on your platform it may be possible to use this UART before |
| 26 | a stack is available. |
| 27 | |
| 28 | If your UART does not support this interface you can probably add |
| 29 | support quite easily. Remember that you cannot use driver model and |
| 30 | it is preferred to use no stack. |
| 31 | |
| 32 | You must not use this UART once driver model is working and the |
| 33 | serial drivers are up and running (done in serial_init()). Otherwise |
| 34 | the drivers may conflict and you will get strange output. |
| 35 | |
Simon Glass | 21d0043 | 2015-01-26 18:27:09 -0700 | [diff] [blame] | 36 | choice |
| 37 | prompt "Select which UART will provide the debug UART" |
| 38 | depends on DEBUG_UART |
| 39 | |
| 40 | config DEBUG_UART_NS16550 |
| 41 | bool "ns16550" |
| 42 | help |
| 43 | Select this to enable a debug UART using the ns16550 driver. You |
| 44 | will need to provide parameters to make this work. The driver will |
| 45 | be available until the real driver model serial is running. |
| 46 | |
| 47 | endchoice |
| 48 | |
Simon Glass | 2f964aa | 2015-01-26 18:27:07 -0700 | [diff] [blame] | 49 | config DEBUG_UART_BASE |
| 50 | hex "Base address of UART" |
| 51 | depends on DEBUG_UART |
| 52 | help |
| 53 | This is the base address of your UART for memory-mapped UARTs. |
| 54 | |
| 55 | A default should be provided by your board, but if not you will need |
| 56 | to use the correct value here. |
| 57 | |
| 58 | config DEBUG_UART_CLOCK |
| 59 | int "UART input clock" |
| 60 | depends on DEBUG_UART |
| 61 | help |
| 62 | The UART input clock determines the speed of the internal UART |
| 63 | circuitry. The baud rate is derived from this by dividing the input |
| 64 | clock down. |
| 65 | |
| 66 | A default should be provided by your board, but if not you will need |
| 67 | to use the correct value here. |
| 68 | |
Simon Glass | dd0b012 | 2015-02-27 22:06:25 -0700 | [diff] [blame^] | 69 | config DEBUG_UART_SHIFT |
| 70 | int "UART register shift" |
| 71 | depends on DEBUG_UART |
| 72 | default 0 if DEBUG_UART |
| 73 | help |
| 74 | Some UARTs (notably ns16550) support different register layouts |
| 75 | where the registers are spaced either as bytes, words or some other |
| 76 | value. Use this value to specify the shift to use, where 0=byte |
| 77 | registers, 2=32-bit word registers, etc. |
| 78 | |
Masahiro Yamada | ff247b7 | 2014-10-23 22:26:11 +0900 | [diff] [blame] | 79 | config UNIPHIER_SERIAL |
| 80 | bool "UniPhier on-chip UART support" |
| 81 | depends on ARCH_UNIPHIER && DM_SERIAL |
| 82 | help |
| 83 | Support for the on-chip UARTs on the Panasonic UniPhier platform. |