Commit Graph

7 Commits (88b28a7b178cf8c4d611725021862035629fbbcd)

Author SHA1 Message Date
Benjamin Herrenschmidt 88b28a7b17 console: Improve putchar(), add puts()
Make putchar() match a standard prototype and add puts()

Also make puts() add carriage returns before linefeeds so the
users don't have to do it all over the place.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
4 years ago
Benjamin Herrenschmidt c5f5f50738 hello_world: Use new headers and frequency from syscon
This uses the new header files for register definitions and
extracts the core frequency from syscon rather than hard coding it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
4 years ago
Benjamin Herrenschmidt 3687486d36 Update hello_world for 100Mhz clock
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
4 years ago
Michael Neuling fc5f7506f8 Add calls to dis/enable potato uart IRQ
Signed-off-by: Michael Neuling <mikey@neuling.org>
4 years ago
Paul Mackerras 04ec2115ad hello_world: Use ldcix/stdcix to access UART
This is one step towards ultimately removing the address-based
cache inhibit hack from dcache.vhdl.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
4 years ago
Paul Mackerras abefafd70b hello_world: Adjust header inclusions and Makefile
Currently hello_world fails to build with distro cross compiler
packages such as Debian gcc-powerpc64-linux-gnu, because it doesn't
provide string.h or unistd.h.  In fact we don't need them, we just
need stddef.h.  This adds #include <stddef.h> to console.h to get
size_t defined.  We also add #include "console.h" to console.c.

The hello_world Makefile currently hard-codes CROSS_COMPILE on
non-PPC machines.  This means that a command like:

	$ CROSS_COMPILE=powerpc64le-linux-gnu- make

doesn't do what you expect; it just tries to use powerpc64le-linux-gcc
regardless.  Adding a '?' makes it do what one expects.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
4 years ago
Michael Neuling 96fbd61de8 Breakout the console code so it can be reused.
No functional change.

Signed-off-by: Michael Neuling <mikey@neuling.org>
4 years ago