Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33687 )
Change subject: soc/nvidia: Use 'include <stdlib.h>' when appropriate ......................................................................
soc/nvidia: Use 'include <stdlib.h>' when appropriate
Also including <types.h>, is supposed to provide stdint and stddef.
Change-Id: I812d468c68b31917da5d406e2fb3b84bc6331b69 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/33687 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Julius Werner jwerner@chromium.org --- M src/soc/nvidia/tegra/i2c.c M src/soc/nvidia/tegra124/dp.c M src/soc/nvidia/tegra124/spi.c M src/soc/nvidia/tegra210/addressmap.c M src/soc/nvidia/tegra210/arm_tf.c M src/soc/nvidia/tegra210/dc.c M src/soc/nvidia/tegra210/dp.c M src/soc/nvidia/tegra210/jdi_25x18_display/panel-jdi-lpm102a188a.c M src/soc/nvidia/tegra210/mipi.c M src/soc/nvidia/tegra210/mipi_dsi.c M src/soc/nvidia/tegra210/mmu_operations.c 11 files changed, 18 insertions(+), 17 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
diff --git a/src/soc/nvidia/tegra/i2c.c b/src/soc/nvidia/tegra/i2c.c index 9dbfde8..c28cd0b 100644 --- a/src/soc/nvidia/tegra/i2c.c +++ b/src/soc/nvidia/tegra/i2c.c @@ -17,9 +17,10 @@ #include <console/console.h> #include <delay.h> #include <device/i2c_simple.h> -#include <stdlib.h> #include <string.h> #include <soc/addressmap.h> +#include <stdint.h> + #include "i2c.h"
static void do_bus_clear(int bus) diff --git a/src/soc/nvidia/tegra124/dp.c b/src/soc/nvidia/tegra124/dp.c index b9fa0ea..d8a4f22 100644 --- a/src/soc/nvidia/tegra124/dp.c +++ b/src/soc/nvidia/tegra124/dp.c @@ -27,8 +27,8 @@ #include <soc/nvidia/tegra/dc.h> #include <soc/nvidia/tegra/displayport.h> #include <soc/sor.h> -#include <stdlib.h> #include <string.h> +#include <types.h>
#include "chip.h"
diff --git a/src/soc/nvidia/tegra124/spi.c b/src/soc/nvidia/tegra124/spi.c index 45159c2..4bd0ab7 100644 --- a/src/soc/nvidia/tegra124/spi.c +++ b/src/soc/nvidia/tegra124/spi.c @@ -26,10 +26,9 @@ #include <soc/spi.h> #include <spi-generic.h> #include <spi_flash.h> -#include <stdint.h> -#include <stdlib.h> #include <symbols.h> #include <timer.h> +#include <types.h>
#if defined(CONFIG_DEBUG_SPI) && CONFIG_DEBUG_SPI # define DEBUG_SPI(x,...) printk(BIOS_DEBUG, "TEGRA_SPI: " x) diff --git a/src/soc/nvidia/tegra210/addressmap.c b/src/soc/nvidia/tegra210/addressmap.c index 4f11d4e..716c900 100644 --- a/src/soc/nvidia/tegra210/addressmap.c +++ b/src/soc/nvidia/tegra210/addressmap.c @@ -21,9 +21,9 @@ #include <soc/id.h> #include <soc/mc.h> #include <soc/sdram.h> -#include <stdlib.h> #include <symbols.h> #include <soc/nvidia/tegra/types.h> +#include <types.h>
static uintptr_t tz_base_mib; static const size_t tz_size_mib = CONFIG_TRUSTZONE_CARVEOUT_SIZE_MB; diff --git a/src/soc/nvidia/tegra210/arm_tf.c b/src/soc/nvidia/tegra210/arm_tf.c index bd34185..38bb8bf 100644 --- a/src/soc/nvidia/tegra210/arm_tf.c +++ b/src/soc/nvidia/tegra210/arm_tf.c @@ -18,8 +18,8 @@ #include <assert.h> #include <soc/addressmap.h> #include <soc/console_uart.h> -#include <stdlib.h> #include <symbols.h> +#include <types.h>
typedef struct bl31_plat_params { /* TZ memory size */ diff --git a/src/soc/nvidia/tegra210/dc.c b/src/soc/nvidia/tegra210/dc.c index ceffb41..46443cf 100644 --- a/src/soc/nvidia/tegra210/dc.c +++ b/src/soc/nvidia/tegra210/dc.c @@ -12,16 +12,17 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ + #include <console/console.h> #include <device/mmio.h> #include <stdint.h> -#include <stdlib.h> #include <edid.h> #include <device/device.h> #include <soc/nvidia/tegra/dc.h> -#include "chip.h" #include <soc/display.h>
+#include "chip.h" + int dump = 0; unsigned long READL(void *p) { diff --git a/src/soc/nvidia/tegra210/dp.c b/src/soc/nvidia/tegra210/dp.c index b0c0846..4284550 100644 --- a/src/soc/nvidia/tegra210/dp.c +++ b/src/soc/nvidia/tegra210/dp.c @@ -16,11 +16,11 @@ * GNU General Public License for more details. * */ + #include <console/console.h> #include <device/device.h> #include <device/i2c_simple.h> #include <edid.h> -#include <stdlib.h> #include <string.h> #include <delay.h> #include <soc/addressmap.h> @@ -32,6 +32,8 @@ #include <soc/nvidia/tegra/pwm.h> #include <soc/nvidia/tegra/displayport.h> #include <soc/sor.h> +#include <types.h> + #include "chip.h"
#define DO_FAST_LINK_TRAINING 0 diff --git a/src/soc/nvidia/tegra210/jdi_25x18_display/panel-jdi-lpm102a188a.c b/src/soc/nvidia/tegra210/jdi_25x18_display/panel-jdi-lpm102a188a.c index a9101b8..f95a819 100644 --- a/src/soc/nvidia/tegra210/jdi_25x18_display/panel-jdi-lpm102a188a.c +++ b/src/soc/nvidia/tegra210/jdi_25x18_display/panel-jdi-lpm102a188a.c @@ -12,18 +12,19 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ + #include <console/console.h> #include <stdint.h> -#include <stdlib.h> #include <delay.h> #include <soc/addressmap.h> #include <soc/clock.h> #include <device/device.h> #include <soc/nvidia/tegra/types.h> -#include "../chip.h" #include <soc/display.h> #include <soc/mipi_dsi.h> #include <soc/tegra_dsi.h> + +#include "../chip.h" #include "panel-jdi-lpm102a188a.h"
struct panel_jdi jdi_data[NUM_DSI]; diff --git a/src/soc/nvidia/tegra210/mipi.c b/src/soc/nvidia/tegra210/mipi.c index f863496..e222048 100644 --- a/src/soc/nvidia/tegra210/mipi.c +++ b/src/soc/nvidia/tegra210/mipi.c @@ -16,8 +16,6 @@ #include <types.h> #include <console/console.h> #include <device/mmio.h> -#include <stdint.h> -#include <stdlib.h> #include <delay.h> #include <soc/addressmap.h> #include <soc/clock.h> @@ -26,6 +24,7 @@ #include <soc/display.h> #include <soc/mipi_dsi.h> #include <soc/tegra_dsi.h> + #include "jdi_25x18_display/panel-jdi-lpm102a188a.h"
static unsigned long dsi_pads[] = { diff --git a/src/soc/nvidia/tegra210/mipi_dsi.c b/src/soc/nvidia/tegra210/mipi_dsi.c index 23d9274..24a61f1 100644 --- a/src/soc/nvidia/tegra210/mipi_dsi.c +++ b/src/soc/nvidia/tegra210/mipi_dsi.c @@ -40,8 +40,6 @@ */
#include <console/console.h> -#include <stdint.h> -#include <stdlib.h> #include <string.h> #include <soc/addressmap.h> #include <soc/clock.h> @@ -51,6 +49,7 @@ #include <soc/mipi_dsi.h> #include <soc/mipi_display.h> #include <soc/tegra_dsi.h> +#include <types.h>
struct mipi_dsi_device mipi_dsi_device_data[NUM_DSI] = { { diff --git a/src/soc/nvidia/tegra210/mmu_operations.c b/src/soc/nvidia/tegra210/mmu_operations.c index 86328a3..73538b1 100644 --- a/src/soc/nvidia/tegra210/mmu_operations.c +++ b/src/soc/nvidia/tegra210/mmu_operations.c @@ -17,9 +17,8 @@ #include <assert.h> #include <soc/addressmap.h> #include <soc/mmu_operations.h> -#include <stdlib.h> -#include <stdint.h> #include <symbols.h> +#include <types.h>
static void tegra210_mmu_config(void) {