diff options
author | raj <raj@FreeBSD.org> | 2010-07-11 21:08:29 +0000 |
---|---|---|
committer | raj <raj@FreeBSD.org> | 2010-07-11 21:08:29 +0000 |
commit | 6496d826ccfca6b78860dfa86efcb3f96cb6053f (patch) | |
tree | 827f9dce3768613a609f3a9e594b123936ec2e0e /sys/dev/uart/uart_cpu_powerpc.c | |
parent | 710dc13ac9dfbfa4fead6e52f9efb9e7b6af119e (diff) | |
download | FreeBSD-src-6496d826ccfca6b78860dfa86efcb3f96cb6053f.zip FreeBSD-src-6496d826ccfca6b78860dfa86efcb3f96cb6053f.tar.gz |
Convert Freescale PowerPC platforms to FDT convention.
The following systems are affected:
- MPC8555CDS
- MPC8572DS
This overhaul covers the following major changes:
- All integrated peripherals drivers for Freescale MPC85XX SoC, which are
currently in the FreeBSD source tree are reworked and adjusted so they
derive config data out of the device tree blob (instead of hard coded /
tabelarized values).
- This includes: LBC, PCI / PCI-Express, I2C, DS1553, OpenPIC, TSEC, SEC,
QUICC, UART, CFI.
- Thanks to the common FDT infrastrucutre (fdtbus, simplebus) we retire
ocpbus(4) driver, which was based on hard-coded config data.
Note that world for these platforms has to be built WITH_FDT.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/dev/uart/uart_cpu_powerpc.c')
-rw-r--r-- | sys/dev/uart/uart_cpu_powerpc.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/sys/dev/uart/uart_cpu_powerpc.c b/sys/dev/uart/uart_cpu_powerpc.c index 8e4c1da..997bdd8 100644 --- a/sys/dev/uart/uart_cpu_powerpc.c +++ b/sys/dev/uart/uart_cpu_powerpc.c @@ -27,57 +27,28 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "opt_platform.h" - #include <sys/param.h> #include <sys/systm.h> #include <vm/vm.h> #include <vm/pmap.h> #include <machine/bus.h> - -#ifndef MPC85XX -#include <dev/ofw/openfirm.h> #include <machine/ofw_machdep.h> -#endif +#include <dev/ofw/openfirm.h> #include <dev/uart/uart.h> #include <dev/uart/uart_cpu.h> -#ifdef MPC85XX -bus_space_tag_t uart_bus_space_io = &bs_be_tag; -bus_space_tag_t uart_bus_space_mem = &bs_be_tag; -#else bus_space_tag_t uart_bus_space_io = &bs_le_tag; bus_space_tag_t uart_bus_space_mem = &bs_le_tag; -#endif int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { -#ifdef MPC85XX - return ((b1->bsh == b2->bsh) ? 1 : 0); -#else + return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0); -#endif } -#ifdef MPC85XX -int -uart_cpu_getdev(int devtype, struct uart_devinfo *di) -{ - struct uart_class *class; - - class = &uart_ns8250_class; - if (class == NULL) - class = &uart_quicc_class; - if (class == NULL) - return (ENXIO); - - /* Check the environment. */ - return (uart_getenv(devtype, di, class)); -} -#else static int ofw_get_uart_console(phandle_t opts, phandle_t *result, const char *inputdev, const char *outputdev) @@ -174,4 +145,3 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) di->parity = UART_PARITY_NONE; return (0); } -#endif |