Commit Graph

21 Commits

Author SHA1 Message Date
Jimmy Brisson 831b0e9824 Don't return error information from console_flush
And from crash_console_flush.

We ignore the error information return by console_flush in _every_
place where we call it, and casting the return type to void does not
work around the MISRA violation that this causes. Instead, we collect
the error information from the driver (to avoid changing that API), and
don't return it to the caller.

Change-Id: I1e35afe01764d5c8f0efd04f8949d333ffb688c1
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
2020-10-09 10:21:50 -05:00
Andre Przywara 489e298744 meson: Use generic console_t data structure
Since now the generic console_t structure holds the UART base address as
well, let's use that generic location and drop the UART driver specific
data structure at all.

Change-Id: I07a07677153d3671ced776671e4f107824d3df16
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2020-02-25 09:34:38 +00:00
Carlo Caione 5cfdfc3c62 amlogic: scpi: Add support to retrieve chip ID
Both kernel and U-Boot use a SMC call to the secure monitor to get the
chip ID. This call is translated by BL31 to a call to the SCP to
retrieve the ID. Add a new SiP call and the backing SCPI command.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ib128f5645ee92866e7ebbcd550dacd33f573524b
2019-09-17 13:11:50 +01:00
Carlo Caione a759d34519 amlogic: console: Move console driver to common directory
The code managing the console is the same for all the platforms
currently supported. Since it is unlikely to change in the future move
the code to an external file in the common directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I6df555ea82d483b4f08a4a1e2cb0a7488fbaa015
2019-09-12 19:18:04 +01:00
Carlo Caione 421b67b666 amlogic: Fix header guards
Make the header guards more generic and contextually remove the
GXBB_BL31_PLAT_PARAM_VAL value that is unused on the GXL platform.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I842fa2e084e71280ae17b39c67877e844821a171
2019-09-11 18:04:12 +01:00
Carlo Caione 9a5616fa18 amlogic: Fix prefixes in the SCPI related code
Add a new aml_* prefix to the SCPI related function calls.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I697812ac1c0df28cbb639a1dc3e838f1107fb739
2019-09-05 10:39:30 +01:00
Carlo Caione cbaad533d1 amlogic: Fix prefixes in the MHU code
Make the MHU code AML specific adding a new aml_* prefix and remove the
GXBB prefix from the register names.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I8f20918e29f08542bd71bd679f88e65b4efaa7d2
2019-09-05 10:39:30 +01:00
Carlo Caione 381b901f22 amlogic: Fix prefixes in the SIP/SVC code
All the SIP/SVC related code is currently the same between GXL and GXBB.
Rename function names and register names to avoid hardcoding the GXBB
prefix.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I7e58ab68489df8d4762663fc01fb64e6899cc8bf
2019-09-05 10:39:30 +01:00
Carlo Caione 73f6d05766 amlogic: Fix prefixes in the thermal driver
No need to have a special SoC-specific prefix.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I0da543e7d92d56604e79440a98027ffd9a2eaa59
2019-09-05 10:39:30 +01:00
Carlo Caione 010fdc1ba0 amlogic: Fix prefixes in the private header file
The header file is shared between all the SoCs. Better avoiding
hardcoding the SoC name in the function names.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I9074871bd1ed8a702c1a656e0f50f2d3c6cb0425
2019-09-05 10:39:30 +01:00
Carlo Caione 93c795ae9c amlogic: Fix prefixes in the efuse driver
The efuse driver is hardcoding the GXBB prefix. No need to do that since
the driver is shared between multiple SoCs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I97691b0bbd55170d8216d301a3fc04feb8c2af2e
2019-09-05 10:39:30 +01:00
Carlo Caione 821781f30e amlogic: Fix prefixes in the platform macros file
Fixing at the same time the related register names.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ib1130d50abe6088f1c0826878d1ae454a0f23008
2019-09-05 10:39:30 +01:00
Carlo Caione f681c676df amlogic: Fix prefixes in the helpers file
The code is the common directory is now generic, no need to have the SoC
prefix hardcoded in the function names.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ied3a5e506b9abd4c2d6f893bafef50019bff24f1
2019-09-05 10:39:30 +01:00
Carlo Caione 35aee24ef5 amlogic: Move the SIP SVC code to common directory
The code is the same between GXBB and GXL. Move it to the common source
directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I875689a6fd029971aa755fc2725217e90ed06b6c
2019-09-05 10:39:30 +01:00
Carlo Caione 261e7fd7b6 amlogic: Move topology file to common directory
As done already for multiple files, move the topology file to the common
directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Iaca357a089593ad58c35c05c929239132249dcda
2019-09-05 10:39:30 +01:00
Carlo Caione cd94cc4013 amlogic: Move thermal code to common directory
As for most of the Amlogic code, this is common between the Amlogic
SoCs. Move the code to the common directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Id3f0073ff1f0b9ddbe964f80303323ee4a2f27b0
2019-09-05 10:39:30 +01:00
Carlo Caione 6f3b0dc465 amlogic: Move MHU code to common directory
The MHU code is shared between all the supported platforms. Move it to
the common directory instead.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Iaf53122866eae85c13f772927d16836dcfa877a3
2019-09-05 10:39:30 +01:00
Carlo Caione d498d24970 amlogic: Move efuse code to common directory
The efuse code is the same between GXL and GXBB. Move the code to common
directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ie37f21d1907a36292724f1fb645a78041fe4a6b3
2019-09-05 10:39:30 +01:00
Carlo Caione 5b74369871 amlogic: Move platform macros assembly file to common directory
The platform macros are shared between all the SoCs. Move it to common
directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ia04c3ffe4d7b068aa701268ed99f69995d8db92b
2019-09-05 10:39:30 +01:00
Carlo Caione 69b315aabf amlogic: Move SCPI code to common directory
The SCPI code is the same between GXBB and GXL. No need to have it
replicated for each SoCs. Move it to the common directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I7e416caf1e9538b3ce7702c0363ee00a054e2451
2019-09-05 10:39:30 +01:00
Carlo Caione 40fac1ab4c amlogic: Move assembly helpers to common directory
The assembly helpers are common to all the amlogic SoCs. Move the .S
file to the common directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I0d8616a7ae22dbcb14848cefd0149b6bb5814ea6
2019-09-05 10:39:30 +01:00