summaryrefslogtreecommitdiffstats
path: root/sys/dev/uart/uart_cpu_fdt.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r281073, r281074, r281077, r281200:ian2015-05-241-32/+0
| | | | | | | | | | | | | | Use OF_getencprop over OF_getprop and fdt32_to_cpu. The latter may give us the wrong data in the failure case if shift was not zero. Remove the extra copy of uart_fdt_get_clock and uart_fdt_get_shift. While here also use OF_getencprop in uart_fdt_get_clock. Move uart_fdt_get_clock and uart_fdt_get_shift to uart_bus_fdt.c, we may not build uart_cpu_fdt.c in all configs. Fix uart_fdt_get_clock. It should have been using the cell variable passed in, not value on the stack.
* MFC r279723, r279724:ian2015-05-231-12/+54
| | | | | | | | | Define new linker set, UART_FDT_CLASS_AND_DEVICE, for registering full (class and device) FDT UART. Define second one, UART_FDT_CLASS, for UART class only. Move the uart_class definitions and fdt compat data into the individual uart implementations, and export them using the new linker-set mechanism.
* MFC r261083, r261092, r261126, r261127, r261128, r261129, r261130, r261131ian2014-05-141-1/+2
| | | | | | | | | | | | | | Add Atmel serial drivers. uart clock-frequency is a FreeBSD-specific extention. Make it optional and allow the client uart drivers to decide if a frequency is required. Remove redundant declaration for uart devclass. Commit some unrelated, but harmless, FDT ifdefs. Add at91 NAND support, Fix comment. Remove obsolete options and fix comments
* MFC r257180, r257195, r257196, r257198, r257209, r257295ian2014-05-141-6/+11
| | | | | | | | | | | | Add some extra sanity checking and checks to printf format specifiers. Try even harder to find a console before giving up. Make devices with registers into the KVA region work reliably. Turn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC. Return NOKEY instead of 0 if there are no more key presses queued.
* MFC r257111, r257144, r257157, r257183ian2014-05-131-11/+33
| | | | | | | | | | Test UARTs physical address instead of virtual. Be a bit more flexible in how we find the console from the properties on /chosen, following the list of allowed console properties in ePAPR. Also do not require that stdin be defined and equal to stdout: stdin is nonstandard (for ePAPR) and console in an unexpected place is after all better than no console.
* MFC r257556:ian2013-12-131-16/+10
| | | | | Arrange for uart_cpu_fdt's probe() routine to use the same table of compat strings as uart_bus_fdt's probe().
* Add support for uarts other than the serial console in TI OMAP SoCs.ian2013-08-211-0/+2
| | | | | | | | | The TI uart hardware is ns16550-compatible, except that before it can be used the clocks and power have to be enabled and a non-standard mode control register has to be set to put the device in uart mode (as opposed to irDa or other serial protocols). This adds the extra code in an extension to the standard ns8250 probe routine, and the rest of the driver is just the standard ns8250 code.
* Use an if/else sequence rather than unrelated if statements, so that aian2013-08-211-7/+7
| | | | | | device compatible with multiple drivers matches the more specific driver first and doesn't overwrite it later with the more generic. Move the generic ns16550 to the end of the list.
* Teach UART to attach Exynos/s3/s5 class driver.ray2013-06-291-0/+2
| | | | | Submitted by: Ruslan Bukin <br@bsdpad.com> Reviewed by: gonzo
* Add basic support for FDT to i386 & amd64. This change includes:marcel2013-05-211-0/+175
1. Common headers for fdt.h and ofw_machdep.h under x86/include with indirections under i386/include and amd64/include. 2. New modinfo for loader provided FDT blob. 3. Common x86_init_fdt() called from hammer_time() on amd64 and init386() on i386. 4. Split-off FDT specific low-level console functions from FDT bus methods for the uart(4) driver. The low-level console logic has been moved to uart_cpu_fdt.c and is used for arm, mips & powerpc only. The FDT bus methods are shared across all architectures. 5. Add dev/fdt/fdt_x86.c to hold the fdt_fixup_table[] and the fdt_pic_table[] arrays. Both are empty right now. FDT addresses are I/O ports on x86. Since the core FDT code does not handle different address spaces, adding support for both I/O ports and memory addresses requires some thought and discussion. It may be better to use a compile-time option that controls this. Obtained from: Juniper Networks, Inc.
OpenPOWER on IntegriCloud