Commit graph

24 commits

Author SHA1 Message Date
Michael Ellerman
e5eff89657 powerpc/boot: Fix CONFIG_PPC_MPC52XX references
Commit 866bfc75f4 ("powerpc: conditionally compile platform-specific
serial drivers") made some code depend on CONFIG_PPC_MPC52XX, which
doesn't exist.

Fix it to use CONFIG_PPC_MPC52xx.

Fixes: 866bfc75f4 ("powerpc: conditionally compile platform-specific serial drivers")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200724131728.1643966-7-mpe@ellerman.id.au
2020-07-29 21:08:22 +10:00
Michal Simek
7ade8495dc powerpc: Remove Xilinx PPC405/PPC440 support
The latest Xilinx design tools called ISE and EDK has been released in
October 2013. New tool doesn't support any PPC405/PPC440 new designs.
These platforms are no longer supported and tested.

PowerPC 405/440 port is orphan from 2013 by
commit cdeb89943b ("MAINTAINERS: Fix incorrect status tag") and
commit 19624236cc ("MAINTAINERS: Update Grant's email address and maintainership")
that's why it is time to remove the support fot these platforms.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/8c593895e2cb57d232d85ce4d8c3a1aa7f0869cc.1590079968.git.christophe.leroy@csgroup.eu
2020-05-28 23:24:34 +10:00
Masahiro Yamada
4ba7f80f42 powerpc/boot: pass CONFIG options in a simpler and more robust way
Commit 5e9dcb6188 ("powerpc/boot: Expose Kconfig symbols to wrapper")
was wrong, but commit e41b93a6be ("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
2019-07-10 13:20:44 +10:00
Oliver O'Halloran
9bbc7e4ce4 powerpc/zImage: Also check for stdout-path
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-12-22 21:47:23 +11:00
Joel Stanley
5e9dcb6188 powerpc/boot: Expose Kconfig symbols to wrapper
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: 866bfc75f4 ("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-10-13 22:21:25 +11:00
Mark Greer
30f4bbe047 powerpc/boot: Remove support for Marvell MPSC serial controller
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>
2018-06-04 00:39:22 +10:00
Michael Ellerman
c3bb690dc6 powerpc/boot: Only build CPM code when necessary
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-11 13:03:31 +11:00
Michael Ellerman
f8e8e69cea powerpc/boot: Only build OPAL code when necessary
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-11 13:03:30 +11:00
Michael Ellerman
3d6bf693d8 powerpc/boot: Only build uartlite if XILINX_VIRTEX=y
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-12-11 13:03:30 +11:00
Hannes Reinecke
866bfc75f4 powerpc: conditionally compile platform-specific serial drivers
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>
2017-08-31 14:26:48 +10:00
Oliver O'Halloran
656ad58ef1 powerpc/boot: Add OPAL console to epapr wrappers
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>
2016-07-05 23:58:54 +10:00
Simon Kagstrom
4b4b13d5fe powerpc/boot: Parse chosen/cmdline-timeout parameter
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>
2014-11-10 09:59:30 +11:00
Gerhard Pircher
8f23735d8f powerpc/amigaone: Bootwrapper and serial console support for AmigaOne
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>
2009-02-11 16:00:09 +11:00
Mark A. Greer
a1810b44c2 [POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360
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-04-15 21:21:24 +10:00
Grant Likely
24ce6bc4a2 [POWERPC] mpc5200: make dts files conform to generic names recommended practice
Modify mpc5200 dts files to match Open Firmware's Generic Names recommended
practice.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-01-26 15:32:11 -07:00
Stephen Neuendorffer
c35a8fb2f2 [POWERPC] Xilinx: updated device tree compatibility to match uboot bsp generator.
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>
2008-01-09 07:56:31 -07:00
Grant Likely
7ddc5f978b [POWERPC] Virtex: Add uartlite bootwrapper driver
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-10-03 07:23:13 -05:00
Grant Likely
85498ae87c [POWERPC] mpc5200: Add cuimage support for mpc5200 boards
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-09-22 14:49:22 +10:00
Scott Wood
d0f53fafc0 [POWERPC] bootwrapper: Add CPM serial driver
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 15:26:20 +10:00
Scott Wood
3ee9b7abaf [POWERPC] bootwrapper: Declare udelay() in ops.h
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 15:21:49 +10:00
Scott Wood
dc4f397d6e [POWERPC] bootwrapper: serial_console_init() fixes
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-08-22 15:21:48 +10:00
Geoff Levand
b96fbb6e1e [POWERPC] Fix constantness of bootwrapper arg
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-06-28 19:16:49 +10:00
Mark A. Greer
e12deb840c [POWERPC] Add bootwrapper support for Marvell MPSC
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>
2007-05-12 11:32:49 +10:00
Mark A. Greer
0c176fa80f [POWERPC] Add non-OF serial console support
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>
2006-10-23 12:49:19 +10:00