aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/serial.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-07-10powerpc/boot: pass CONFIG options in a simpler and more robust wayMasahiro Yamada1-1/+0
Commit 5e9dcb6188a4 ("powerpc/boot: Expose Kconfig symbols to wrapper") was wrong, but commit e41b93a6be57 ("powerpc/boot: Fix build failures with -j 1") was also wrong. The correct dependency is: $(obj)/serial.o: $(obj)/autoconf.h However, I do not see the reason why we need to copy autoconf.h to arch/power/boot/. Nor do I see consistency in the way of passing CONFIG options. decompress.c references CONFIG_KERNEL_GZIP and CONFIG_KERNEL_XZ, which are passed via the command line. serial.c includes autoconf.h to reference a couple of CONFIG options, but this is fragile because we often forget to include "autoconf.h" from source files. In fact, it is already broken. ppc_asm.h references CONFIG_PPC_8xx, but utils.S is not given any way to access CONFIG options. So, CONFIG_PPC_8xx is never defined here. Pass $(LINUXINCLUDE) to make sure CONFIG options are accessible from all .c and .S files in arch/powerpc/boot/. I also removed the -traditional flag to make include/linux/kconfig.h work. This flag makes the preprocessor imitate the behavior of the pre-standard C compiler, but I do not understand why it is necessary. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20190705100144.28785-2-yamada.masahiro@socionext.com
2018-12-22powerpc/zImage: Also check for stdout-pathOliver O'Halloran1-1/+2
The /chosen/linux,stdout-path is "deprecated" in favour of /chosen/stdout-path so we should be checking for both. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-10-13powerpc/boot: Expose Kconfig symbols to wrapperJoel Stanley1-0/+1
Currently the wrapper is built without including anything in $(src)/include/, which means there are no CONFIG_ symbols defined. This means the platform specific serial drivers were never enabled. We now copy the definitions into the boot directory, so any C file can now include autoconf.h to depend on configuration options. Fixes: 866bfc75f40e ("powerpc: conditionally compile platform-specific serial drivers") Signed-off-by: Joel Stanley <joel@jms.id.au> [mpe: Fix to use $(objtree) to find autoconf.h] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-06-04powerpc/boot: Remove support for Marvell MPSC serial controllerMark Greer1-4/+0
There are no longer any platforms that use Marvell's MPSC serial controller so remove its driver. Signed-off-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-12-11powerpc/boot: Only build CPM code when necessaryMichael Ellerman1-0/+2
As far as I can tell CONFIG_CPM is the right symbol to use to conditionally compile the cpm-serial.c code. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-12-11powerpc/boot: Only build OPAL code when necessaryMichael Ellerman1-0/+2
Only build the OPAL console code in when necessary. This looks like it should use CONFIG_PPC_POWERNV, but because the opal-call.S code is 64-bit only, we must only build it when we're building the boot wrapper 64-bit. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-12-11powerpc/boot: Only build uartlite if XILINX_VIRTEX=yMichael Ellerman1-0/+2
The serial code in uartlite.c only matches if we find one of two Xilinx (xlnx) nodes in the device tree, there's no need to build or link the code on other platforms. As far as I can tell CONFIG_XILINX_VIRTEX is the appropriate symbol to use to conditionally compile the code. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-31powerpc: conditionally compile platform-specific serial driversHannes Reinecke1-0/+4
mpsc.c and mpc52xx-psc.c are platform-specific serial drivers, and should be compiled for the respective platforms only. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Torsten Duwe <duwe@suse.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-07-05powerpc/boot: Add OPAL console to epapr wrappersOliver O'Halloran1-0/+2
This patch adds an OPAL console backend to the powerpc boot wrapper so that decompression failures inside the wrapper can be reported to the user. This is important since it typically indicates data corruption in the firmware and other nasty things. Currently this only works when building a little endian kernel. When compiling a 64 bit BE kernel the wrapper is always build 32 bit to be compatible with some 32 bit firmwares. BE support will be added at a later date. Another limitation of this is that only the "raw" type of OPAL console is supported, however machines that provide a hvsi console also provide a raw console so this is not an issue in practice. Actually-written-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [mpe: Move #ifdef __powerpc64__ to avoid warnings on 32-bit] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-11-10powerpc/boot: Parse chosen/cmdline-timeout parameterSimon Kagstrom1-3/+3
On some platforms a 5 second timeout during boot might be quite long, so make it configurable. Run the loop at least once to let the user stop the boot by holding a key pressed. If the timeout is set to 0, don't wait for input, which can be used as a workaround if the boot hangs on random data coming in on the serial port. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> [mpe: Changelog wording & whitespace] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2009-02-11powerpc/amigaone: Bootwrapper and serial console support for AmigaOneGerhard Pircher1-1/+2
This adds the bootwrapper for the cuImage target and a compatible property check for "pnpPNP,501" to the generic serial console support code. The default link address for the cuImage target is set to 0x800000. This allows to boot the kernel with AmigaOS4's second level bootloader, which always loads a uImage at 0x500000. Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-04-15[POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360Mark A. Greer1-1/+1
Compatible names should refer to a specific version of the hardware, without wildcards. Change each instance of mv64x60 to mv64360, which is the oldest version we currently support. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-01-26[POWERPC] mpc5200: make dts files conform to generic names recommended practiceGrant Likely1-1/+1
Modify mpc5200 dts files to match Open Firmware's Generic Names recommended practice. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-01-09[POWERPC] Xilinx: updated device tree compatibility to match uboot bsp generator.Stephen Neuendorffer1-1/+2
Missed this one in the boot loader before. Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-10-03[POWERPC] Virtex: Add uartlite bootwrapper driverGrant Likely1-0/+2
Allows the bootwrapper to use the uartlite device for console output. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-09-22[POWERPC] mpc5200: Add cuimage support for mpc5200 boardsGrant Likely1-0/+2
Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-22[POWERPC] bootwrapper: Add CPM serial driverScott Wood1-0/+5
This serial port is used on all 8xx, many 82xx, and some 85xx chips. The driver requires that the port has already been set up by the firmware and/or platform code. Signed-off-by: Scott Wood <scottwood@freescale.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-22[POWERPC] bootwrapper: Declare udelay() in ops.hScott Wood1-2/+0
Declarations in various users are removed. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-22[POWERPC] bootwrapper: serial_console_init() fixesScott Wood1-7/+5
1. Search the entire compatible list for serial devices. The serial code previously did a simple strcmp on the compatible node; this fails when the match string is not the first compatible listed. Use dt_is_compatible() instead. 2. Don't call serial_edit_cmdline if getc isn't defined. Signed-off-by: Scott Wood <scottwood@freescale.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-28[POWERPC] Fix constantness of bootwrapper argGeoff Levand1-1/+1
Fixes the constantness of the powerpc bootwrapper's console_ops.write routine. Allows printing of constant strings. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-12[POWERPC] Add bootwrapper support for Marvell MPSCMark A. Greer1-0/+2
The bootwrapper requires a serial driver to allow cmdline editing and information reporting on the console. This driver is required by platforms that boot a zImage and use the MPSC for the console. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-10-23[POWERPC] Add non-OF serial console supportMark A. Greer1-0/+142
Add serial console support for non-OF systems. There is a generic serial console layer which calls a serial console driver. Included is the serial console driver for the ns16550 class of uarts. Necessary support routines are added as well. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>