From 96195eeb71545b070e37413bfad1520ceca3da54 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Mon, 20 Oct 2014 13:25:21 -0700 Subject: [PATCH] tegra132: Change all SoC headers to system This patch aligns tegra132 to the new SoC header include scheme. Also alphabetized headers in affected files since we touch them anyway. BUG=None TEST=Tested with whole series. Compiled Rush_Ryu. Change-Id: I5cdf4008a65db84f15c937ef53aab5e4d3ef24c4 Signed-off-by: Patrick Georgi Original-Commit-Id: d5c5c63d7b6399d3eb8a211b15d47829fe93a591 Original-Change-Id: Ifafd4d42d4fb04a1c37e8a5f23877c2b550cf44c Original-Signed-off-by: Julius Werner Original-Reviewed-on: https://chromium-review.googlesource.com/224505 Original-Reviewed-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/9369 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/rush/boardid.c | 5 ++--- src/mainboard/google/rush/bootblock.c | 6 +++--- src/mainboard/google/rush/chromeos.c | 2 +- src/mainboard/google/rush/mainboard.c | 11 +++++----- src/mainboard/google/rush/memlayout.ld | 2 +- src/mainboard/google/rush/pmic.c | 2 +- src/mainboard/google/rush/reset.c | 2 +- src/mainboard/google/rush/romstage.c | 7 +++---- src/mainboard/google/rush_ryu/boardid.c | 4 ++-- src/mainboard/google/rush_ryu/bootblock.c | 4 ++-- src/mainboard/google/rush_ryu/chromeos.c | 1 + src/mainboard/google/rush_ryu/gpio.h | 2 +- src/mainboard/google/rush_ryu/mainboard.c | 7 +++---- src/mainboard/google/rush_ryu/memlayout.ld | 2 +- src/mainboard/google/rush_ryu/pmic.c | 1 + src/mainboard/google/rush_ryu/reset.c | 1 + src/mainboard/google/rush_ryu/romstage.c | 3 ++- src/soc/nvidia/tegra132/addressmap.c | 6 +++--- src/soc/nvidia/tegra132/bootblock.c | 3 +-- src/soc/nvidia/tegra132/cbfs.c | 4 +--- src/soc/nvidia/tegra132/ccplex.c | 18 ++++++++--------- src/soc/nvidia/tegra132/clock.c | 20 +++++++++---------- src/soc/nvidia/tegra132/cpu.c | 6 +++--- src/soc/nvidia/tegra132/dma.c | 10 ++++------ src/soc/nvidia/tegra132/funitcfg.c | 4 ++-- src/soc/nvidia/tegra132/i2c6.c | 8 ++++---- .../tegra132/{ => include/soc}/ccplex.h | 0 .../tegra132/{ => include/soc}/clk_rst.h | 0 src/soc/nvidia/tegra132/include/soc/clock.h | 2 +- .../tegra132/{ => include/soc}/clst_clk.h | 0 .../nvidia/tegra132/{ => include/soc}/dma.h | 0 .../nvidia/tegra132/{ => include/soc}/emc.h | 0 .../nvidia/tegra132/{ => include/soc}/flow.h | 0 .../nvidia/tegra132/include/soc/funitcfg.h | 6 +++--- .../nvidia/tegra132/{ => include/soc}/gpio.h | 2 +- .../tegra132/{ => include/soc}/maincpu.h | 0 .../nvidia/tegra132/{ => include/soc}/mc.h | 0 .../tegra132/{ => include/soc}/memlayout.ld | 0 .../{ => include/soc}/mmu_operations.h | 0 .../nvidia/tegra132/include/soc/padconfig.h | 2 +- .../tegra132/{ => include/soc}/pinmux.h | 0 .../nvidia/tegra132/{ => include/soc}/pmc.h | 0 .../nvidia/tegra132/{ => include/soc}/power.h | 2 +- .../nvidia/tegra132/{ => include/soc}/sdram.h | 2 +- .../tegra132/include/soc/sdram_configs.h | 2 +- .../tegra132/{ => include/soc}/sdram_param.h | 0 .../nvidia/tegra132/{ => include/soc}/spi.h | 3 +-- .../tegra132/{ => include/soc}/sysctr.h | 0 src/soc/nvidia/tegra132/mmu_operations.c | 9 ++++----- src/soc/nvidia/tegra132/padconfig.c | 1 - src/soc/nvidia/tegra132/power.c | 5 ++--- src/soc/nvidia/tegra132/ramstage.c | 2 +- src/soc/nvidia/tegra132/romstage.c | 12 +++++------ src/soc/nvidia/tegra132/sdram.c | 9 ++++----- src/soc/nvidia/tegra132/sdram_lp0.c | 9 ++++----- src/soc/nvidia/tegra132/secmon.c | 2 +- src/soc/nvidia/tegra132/soc.c | 11 +++++----- src/soc/nvidia/tegra132/spi.c | 14 ++++++------- src/soc/nvidia/tegra132/uart.c | 4 ++-- 59 files changed, 114 insertions(+), 126 deletions(-) rename src/soc/nvidia/tegra132/{ => include/soc}/ccplex.h (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/clk_rst.h (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/clst_clk.h (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/dma.h (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/emc.h (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/flow.h (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/gpio.h (95%) rename src/soc/nvidia/tegra132/{ => include/soc}/maincpu.h (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/mc.h (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/memlayout.ld (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/mmu_operations.h (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/pinmux.h (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/pmc.h (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/power.h (97%) rename src/soc/nvidia/tegra132/{ => include/soc}/sdram.h (97%) rename src/soc/nvidia/tegra132/{ => include/soc}/sdram_param.h (100%) rename src/soc/nvidia/tegra132/{ => include/soc}/spi.h (99%) rename src/soc/nvidia/tegra132/{ => include/soc}/sysctr.h (100%) diff --git a/src/mainboard/google/rush/boardid.c b/src/mainboard/google/rush/boardid.c index 67e55ba3fb..7ed2b53ed6 100644 --- a/src/mainboard/google/rush/boardid.c +++ b/src/mainboard/google/rush/boardid.c @@ -17,10 +17,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include - #include +#include +#include uint8_t board_id(void) { diff --git a/src/mainboard/google/rush/bootblock.c b/src/mainboard/google/rush/bootblock.c index e84a25ef8b..eb61cddf8c 100644 --- a/src/mainboard/google/rush/bootblock.c +++ b/src/mainboard/google/rush/bootblock.c @@ -21,13 +21,13 @@ #include #include #include +#include #include #include -#include #include #include -#include -#include /* FIXME: move back to soc code? */ +#include +#include /* FIXME: move back to soc code? */ #include "pmic.h" diff --git a/src/mainboard/google/rush/chromeos.c b/src/mainboard/google/rush/chromeos.c index 03908c0434..5232344223 100644 --- a/src/mainboard/google/rush/chromeos.c +++ b/src/mainboard/google/rush/chromeos.c @@ -21,9 +21,9 @@ #include #include #include +#include #include #include -#include void fill_lb_gpios(struct lb_gpios *gpios) { diff --git a/src/mainboard/google/rush/mainboard.c b/src/mainboard/google/rush/mainboard.c index 846a7ac55f..8ea3f4eb3d 100644 --- a/src/mainboard/google/rush/mainboard.c +++ b/src/mainboard/google/rush/mainboard.c @@ -18,17 +18,16 @@ */ #include -#include #include - +#include #include -#include -#include -#include #include -#include +#include +#include #include #include +#include +#include static const struct pad_config sdmmc3_pad[] = { /* MMC3(SDCARD) */ diff --git a/src/mainboard/google/rush/memlayout.ld b/src/mainboard/google/rush/memlayout.ld index b9def51e74..ead7f47838 100644 --- a/src/mainboard/google/rush/memlayout.ld +++ b/src/mainboard/google/rush/memlayout.ld @@ -1 +1 @@ -#include +#include diff --git a/src/mainboard/google/rush/pmic.c b/src/mainboard/google/rush/pmic.c index 85de2003e7..b016164ccd 100644 --- a/src/mainboard/google/rush/pmic.c +++ b/src/mainboard/google/rush/pmic.c @@ -18,13 +18,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include #include #include #include -#include #include "pmic.h" #include "reset.h" diff --git a/src/mainboard/google/rush/reset.c b/src/mainboard/google/rush/reset.c index f3057cac90..dbaed0d95b 100644 --- a/src/mainboard/google/rush/reset.c +++ b/src/mainboard/google/rush/reset.c @@ -18,8 +18,8 @@ */ #include +#include #include -#include void hard_reset(void) { diff --git a/src/mainboard/google/rush/romstage.c b/src/mainboard/google/rush/romstage.c index e82f5ad034..88b7d382c1 100644 --- a/src/mainboard/google/rush/romstage.c +++ b/src/mainboard/google/rush/romstage.c @@ -17,13 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include - #include #include -#include -#include #include +#include +#include +#include static const struct pad_config padcfgs[] = { /* SOC_WARM_RESET_L */ diff --git a/src/mainboard/google/rush_ryu/boardid.c b/src/mainboard/google/rush_ryu/boardid.c index 1aa7c16831..9d99b90ddc 100644 --- a/src/mainboard/google/rush_ryu/boardid.c +++ b/src/mainboard/google/rush_ryu/boardid.c @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include -#include +#include #include -#include #include "gpio.h" /* diff --git a/src/mainboard/google/rush_ryu/bootblock.c b/src/mainboard/google/rush_ryu/bootblock.c index 9a1c68bb96..898bb3fdfe 100644 --- a/src/mainboard/google/rush_ryu/bootblock.c +++ b/src/mainboard/google/rush_ryu/bootblock.c @@ -22,11 +22,11 @@ #include #include #include +#include #include #include -#include #include -#include +#include #include "pmic.h" diff --git a/src/mainboard/google/rush_ryu/chromeos.c b/src/mainboard/google/rush_ryu/chromeos.c index 9c9056eb96..521fe59372 100644 --- a/src/mainboard/google/rush_ryu/chromeos.c +++ b/src/mainboard/google/rush_ryu/chromeos.c @@ -23,6 +23,7 @@ #include #include #include + #include "gpio.h" void fill_lb_gpios(struct lb_gpios *gpios) diff --git a/src/mainboard/google/rush_ryu/gpio.h b/src/mainboard/google/rush_ryu/gpio.h index f790e8f2be..9c67420ff0 100644 --- a/src/mainboard/google/rush_ryu/gpio.h +++ b/src/mainboard/google/rush_ryu/gpio.h @@ -20,7 +20,7 @@ #ifndef __MAINBOARD_GOOGLE_RUSH_RYU_GPIO_H__ #define __MAINBOARD_GOOGLE_RUSH_RYU_GPIO_H__ -#include +#include /* Board ID definitions. */ enum { diff --git a/src/mainboard/google/rush_ryu/mainboard.c b/src/mainboard/google/rush_ryu/mainboard.c index e19ad02612..1af7e221cd 100644 --- a/src/mainboard/google/rush_ryu/mainboard.c +++ b/src/mainboard/google/rush_ryu/mainboard.c @@ -18,16 +18,15 @@ */ #include -#include #include +#include #include - #include +#include #include #include -#include -#include #include +#include static const struct pad_config mmcpads[] = { /* MMC4 (eMMC) */ diff --git a/src/mainboard/google/rush_ryu/memlayout.ld b/src/mainboard/google/rush_ryu/memlayout.ld index b9def51e74..ead7f47838 100644 --- a/src/mainboard/google/rush_ryu/memlayout.ld +++ b/src/mainboard/google/rush_ryu/memlayout.ld @@ -1 +1 @@ -#include +#include diff --git a/src/mainboard/google/rush_ryu/pmic.c b/src/mainboard/google/rush_ryu/pmic.c index 85cc6e2f5b..a816e8ac14 100644 --- a/src/mainboard/google/rush_ryu/pmic.c +++ b/src/mainboard/google/rush_ryu/pmic.c @@ -23,6 +23,7 @@ #include #include #include + #include "pmic.h" #include "reset.h" diff --git a/src/mainboard/google/rush_ryu/reset.c b/src/mainboard/google/rush_ryu/reset.c index 4548837d7e..7ccb2de28b 100644 --- a/src/mainboard/google/rush_ryu/reset.c +++ b/src/mainboard/google/rush_ryu/reset.c @@ -19,6 +19,7 @@ #include #include + #include "gpio.h" void hard_reset(void) diff --git a/src/mainboard/google/rush_ryu/romstage.c b/src/mainboard/google/rush_ryu/romstage.c index 5d195a6fcb..41c9149be4 100644 --- a/src/mainboard/google/rush_ryu/romstage.c +++ b/src/mainboard/google/rush_ryu/romstage.c @@ -21,9 +21,10 @@ #include #include #include -#include #include +#include #include + #include "gpio.h" #include "pmic.h" diff --git a/src/soc/nvidia/tegra132/addressmap.c b/src/soc/nvidia/tegra132/addressmap.c index bd644d4c5c..72563f5095 100644 --- a/src/soc/nvidia/tegra132/addressmap.c +++ b/src/soc/nvidia/tegra132/addressmap.c @@ -19,13 +19,13 @@ #include -#include #include #include #include +#include +#include +#include #include -#include "mc.h" -#include "sdram.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/tegra132/bootblock.c b/src/soc/nvidia/tegra132/bootblock.c index 6f2505011b..fe7d6f04fa 100644 --- a/src/soc/nvidia/tegra132/bootblock.c +++ b/src/soc/nvidia/tegra132/bootblock.c @@ -26,8 +26,7 @@ #include #include #include - -#include "power.h" +#include #define BCT_OFFSET_IN_BIT 0x50 #define ODMDATA_OFFSET_IN_BCT 0x6A8 diff --git a/src/soc/nvidia/tegra132/cbfs.c b/src/soc/nvidia/tegra132/cbfs.c index 648d13663a..2efd48bccf 100644 --- a/src/soc/nvidia/tegra132/cbfs.c +++ b/src/soc/nvidia/tegra132/cbfs.c @@ -17,12 +17,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include /* This driver serves as a CBFS media source. */ +#include #include -#include "spi.h" - int init_default_cbfs_media(struct cbfs_media *media) { return initialize_tegra_spi_cbfs_media(media, diff --git a/src/soc/nvidia/tegra132/ccplex.c b/src/soc/nvidia/tegra132/ccplex.c index b183e5d1e1..ea92b31324 100644 --- a/src/soc/nvidia/tegra132/ccplex.c +++ b/src/soc/nvidia/tegra132/ccplex.c @@ -17,21 +17,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include #include #include -#include +#include #include #include +#include +#include #include +#include +#include +#include +#include #include -#include "clk_rst.h" -#include "ccplex.h" -#include "flow.h" -#include "mc.h" -#include "pmc.h" -#include "power.h" +#include +#include #define PMC_REGS (void *)(uintptr_t)(TEGRA_PMC_BASE) #define MTS_FILE_NAME "mts" diff --git a/src/soc/nvidia/tegra132/clock.c b/src/soc/nvidia/tegra132/clock.c index db8a529223..0d37851775 100644 --- a/src/soc/nvidia/tegra132/clock.c +++ b/src/soc/nvidia/tegra132/clock.c @@ -14,19 +14,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#include +#include #include #include -#include -#include -#include #include -#include -#include "clk_rst.h" -#include "clst_clk.h" -#include "flow.h" -#include "maincpu.h" -#include "pmc.h" -#include "sysctr.h" +#include +#include +#include +#include +#include +#include +#include +#include static struct clst_clk_ctlr *clst_clk = (void *)TEGRA_CLUSTER_CLOCK_BASE; static struct flow_ctlr *flow = (void *)TEGRA_FLOW_BASE; diff --git a/src/soc/nvidia/tegra132/cpu.c b/src/soc/nvidia/tegra132/cpu.c index fd0c0524c5..5dd4c53493 100644 --- a/src/soc/nvidia/tegra132/cpu.c +++ b/src/soc/nvidia/tegra132/cpu.c @@ -17,12 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include #include +#include #include -#include "clk_rst.h" -#include "pmc.h" +#include #define EVP_CPU_RESET_VECTOR (void *)(uintptr_t)(TEGRA_EVP_BASE + 0x100) #define PMC_REGS (void *)(uintptr_t)(TEGRA_PMC_BASE) diff --git a/src/soc/nvidia/tegra132/dma.c b/src/soc/nvidia/tegra132/dma.c index 3f236c3e22..9f04e9777f 100644 --- a/src/soc/nvidia/tegra132/dma.c +++ b/src/soc/nvidia/tegra132/dma.c @@ -16,15 +16,13 @@ * along with this program. If not, see . */ +#include +#include #include +#include +#include #include #include -#include - -#include -#include - -#include "dma.h" struct apb_dma * const apb_dma = (struct apb_dma *)TEGRA_APB_DMA_BASE; diff --git a/src/soc/nvidia/tegra132/funitcfg.c b/src/soc/nvidia/tegra132/funitcfg.c index 2d34756a7f..1054f5ce7e 100644 --- a/src/soc/nvidia/tegra132/funitcfg.c +++ b/src/soc/nvidia/tegra132/funitcfg.c @@ -19,11 +19,11 @@ #include #include -#include #include +#include +#include #include #include -#include struct clk_dev_control { uint32_t *clk_enb_set; diff --git a/src/soc/nvidia/tegra132/i2c6.c b/src/soc/nvidia/tegra132/i2c6.c index e4fbd19f4e..86373d621e 100644 --- a/src/soc/nvidia/tegra132/i2c6.c +++ b/src/soc/nvidia/tegra132/i2c6.c @@ -18,13 +18,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include +#include #include -#include #include -#include -#include -#include "delay.h" +#include +#include #define I2C6_BUS 5 #define I2C6_PADCTL 0xC001 diff --git a/src/soc/nvidia/tegra132/ccplex.h b/src/soc/nvidia/tegra132/include/soc/ccplex.h similarity index 100% rename from src/soc/nvidia/tegra132/ccplex.h rename to src/soc/nvidia/tegra132/include/soc/ccplex.h diff --git a/src/soc/nvidia/tegra132/clk_rst.h b/src/soc/nvidia/tegra132/include/soc/clk_rst.h similarity index 100% rename from src/soc/nvidia/tegra132/clk_rst.h rename to src/soc/nvidia/tegra132/include/soc/clk_rst.h diff --git a/src/soc/nvidia/tegra132/include/soc/clock.h b/src/soc/nvidia/tegra132/include/soc/clock.h index d93e7b657f..2c7664c1ff 100644 --- a/src/soc/nvidia/tegra132/include/soc/clock.h +++ b/src/soc/nvidia/tegra132/include/soc/clock.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/soc/nvidia/tegra132/clst_clk.h b/src/soc/nvidia/tegra132/include/soc/clst_clk.h similarity index 100% rename from src/soc/nvidia/tegra132/clst_clk.h rename to src/soc/nvidia/tegra132/include/soc/clst_clk.h diff --git a/src/soc/nvidia/tegra132/dma.h b/src/soc/nvidia/tegra132/include/soc/dma.h similarity index 100% rename from src/soc/nvidia/tegra132/dma.h rename to src/soc/nvidia/tegra132/include/soc/dma.h diff --git a/src/soc/nvidia/tegra132/emc.h b/src/soc/nvidia/tegra132/include/soc/emc.h similarity index 100% rename from src/soc/nvidia/tegra132/emc.h rename to src/soc/nvidia/tegra132/include/soc/emc.h diff --git a/src/soc/nvidia/tegra132/flow.h b/src/soc/nvidia/tegra132/include/soc/flow.h similarity index 100% rename from src/soc/nvidia/tegra132/flow.h rename to src/soc/nvidia/tegra132/include/soc/flow.h diff --git a/src/soc/nvidia/tegra132/include/soc/funitcfg.h b/src/soc/nvidia/tegra132/include/soc/funitcfg.h index cf49d0ab8c..2c680fe374 100644 --- a/src/soc/nvidia/tegra132/include/soc/funitcfg.h +++ b/src/soc/nvidia/tegra132/include/soc/funitcfg.h @@ -20,10 +20,10 @@ #ifndef __SOC_NVIDIA_TEGRA132_FUNIT_CFG_H #define __SOC_NVIDIA_TEGRA132_FUNIT_CFG_H -#include -#include -#include #include +#include +#include +#include #define FUNIT_INDEX(_name) FUNIT_##_name diff --git a/src/soc/nvidia/tegra132/gpio.h b/src/soc/nvidia/tegra132/include/soc/gpio.h similarity index 95% rename from src/soc/nvidia/tegra132/gpio.h rename to src/soc/nvidia/tegra132/include/soc/gpio.h index 4b78b61f2c..b28a87f687 100644 --- a/src/soc/nvidia/tegra132/gpio.h +++ b/src/soc/nvidia/tegra132/include/soc/gpio.h @@ -20,6 +20,6 @@ #ifndef __SOC_NVIDIA_TEGRA132_GPIO_H__ #define __SOC_NVIDIA_TEGRA132_GPIO_H__ -#include +#include #endif /* __SOC_NVIDIA_TEGRA132_GPIO_H__ */ diff --git a/src/soc/nvidia/tegra132/maincpu.h b/src/soc/nvidia/tegra132/include/soc/maincpu.h similarity index 100% rename from src/soc/nvidia/tegra132/maincpu.h rename to src/soc/nvidia/tegra132/include/soc/maincpu.h diff --git a/src/soc/nvidia/tegra132/mc.h b/src/soc/nvidia/tegra132/include/soc/mc.h similarity index 100% rename from src/soc/nvidia/tegra132/mc.h rename to src/soc/nvidia/tegra132/include/soc/mc.h diff --git a/src/soc/nvidia/tegra132/memlayout.ld b/src/soc/nvidia/tegra132/include/soc/memlayout.ld similarity index 100% rename from src/soc/nvidia/tegra132/memlayout.ld rename to src/soc/nvidia/tegra132/include/soc/memlayout.ld diff --git a/src/soc/nvidia/tegra132/mmu_operations.h b/src/soc/nvidia/tegra132/include/soc/mmu_operations.h similarity index 100% rename from src/soc/nvidia/tegra132/mmu_operations.h rename to src/soc/nvidia/tegra132/include/soc/mmu_operations.h diff --git a/src/soc/nvidia/tegra132/include/soc/padconfig.h b/src/soc/nvidia/tegra132/include/soc/padconfig.h index a4339891f2..569fe4624c 100644 --- a/src/soc/nvidia/tegra132/include/soc/padconfig.h +++ b/src/soc/nvidia/tegra132/include/soc/padconfig.h @@ -21,7 +21,7 @@ #define __SOC_NVIDIA_TEGRA132_PAD_CFG_H #include -#include +#include struct pad_config { uint8_t pinmux_flags; /* PU/PU, OD, INPUT, SFIO, etc */ diff --git a/src/soc/nvidia/tegra132/pinmux.h b/src/soc/nvidia/tegra132/include/soc/pinmux.h similarity index 100% rename from src/soc/nvidia/tegra132/pinmux.h rename to src/soc/nvidia/tegra132/include/soc/pinmux.h diff --git a/src/soc/nvidia/tegra132/pmc.h b/src/soc/nvidia/tegra132/include/soc/pmc.h similarity index 100% rename from src/soc/nvidia/tegra132/pmc.h rename to src/soc/nvidia/tegra132/include/soc/pmc.h diff --git a/src/soc/nvidia/tegra132/power.h b/src/soc/nvidia/tegra132/include/soc/power.h similarity index 97% rename from src/soc/nvidia/tegra132/power.h rename to src/soc/nvidia/tegra132/include/soc/power.h index 0dbcc5e082..d42116eb75 100644 --- a/src/soc/nvidia/tegra132/power.h +++ b/src/soc/nvidia/tegra132/include/soc/power.h @@ -20,7 +20,7 @@ #ifndef __SOC_NVIDIA_TEGRA132_POWER_H__ #define __SOC_NVIDIA_TEGRA132_POWER_H__ -#include "pmc.h" +#include void power_ungate_partition(uint32_t id); diff --git a/src/soc/nvidia/tegra132/sdram.h b/src/soc/nvidia/tegra132/include/soc/sdram.h similarity index 97% rename from src/soc/nvidia/tegra132/sdram.h rename to src/soc/nvidia/tegra132/include/soc/sdram.h index 7684eb86d4..1e6e70de8c 100644 --- a/src/soc/nvidia/tegra132/sdram.h +++ b/src/soc/nvidia/tegra132/include/soc/sdram.h @@ -20,7 +20,7 @@ #ifndef __SOC_NVIDIA_TEGRA132_SDRAM_H__ #define __SOC_NVIDIA_TEGRA132_SDRAM_H__ -#include "sdram_param.h" +#include uint32_t sdram_get_ram_code(void); void sdram_init(const struct sdram_params *param); diff --git a/src/soc/nvidia/tegra132/include/soc/sdram_configs.h b/src/soc/nvidia/tegra132/include/soc/sdram_configs.h index 300be1093c..38368fb69b 100644 --- a/src/soc/nvidia/tegra132/include/soc/sdram_configs.h +++ b/src/soc/nvidia/tegra132/include/soc/sdram_configs.h @@ -20,7 +20,7 @@ #ifndef __SOC_NVIDIA_TEGRA132_SDRAM_CONFIGS_H__ #define __SOC_NVIDIA_TEGRA132_SDRAM_CONFIGS_H__ -#include +#include /* Loads SDRAM configurations for current system. */ const struct sdram_params *get_sdram_config(void); diff --git a/src/soc/nvidia/tegra132/sdram_param.h b/src/soc/nvidia/tegra132/include/soc/sdram_param.h similarity index 100% rename from src/soc/nvidia/tegra132/sdram_param.h rename to src/soc/nvidia/tegra132/include/soc/sdram_param.h diff --git a/src/soc/nvidia/tegra132/spi.h b/src/soc/nvidia/tegra132/include/soc/spi.h similarity index 99% rename from src/soc/nvidia/tegra132/spi.h rename to src/soc/nvidia/tegra132/include/soc/spi.h index e53505925b..2fd9562599 100644 --- a/src/soc/nvidia/tegra132/spi.h +++ b/src/soc/nvidia/tegra132/include/soc/spi.h @@ -18,11 +18,10 @@ #ifndef __NVIDIA_TEGRA132_SPI_H__ #define __NVIDIA_TEGRA132_SPI_H__ +#include #include #include -#include "dma.h" - struct tegra_spi_regs { u32 command1; /* 0x000: SPI_COMMAND1 */ u32 command2; /* 0x004: SPI_COMMAND2 */ diff --git a/src/soc/nvidia/tegra132/sysctr.h b/src/soc/nvidia/tegra132/include/soc/sysctr.h similarity index 100% rename from src/soc/nvidia/tegra132/sysctr.h rename to src/soc/nvidia/tegra132/include/soc/sysctr.h diff --git a/src/soc/nvidia/tegra132/mmu_operations.c b/src/soc/nvidia/tegra132/mmu_operations.c index b2e1077f99..42678fc280 100644 --- a/src/soc/nvidia/tegra132/mmu_operations.c +++ b/src/soc/nvidia/tegra132/mmu_operations.c @@ -17,13 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include +#include +#include +#include #include #include -#include - -#include -#include "mmu_operations.h" -#include /* This structure keeps track of all the mmap memory ranges for t132 */ static struct memranges t132_mmap_ranges; diff --git a/src/soc/nvidia/tegra132/padconfig.c b/src/soc/nvidia/tegra132/padconfig.c index 621898d2f7..5f7f2e4f93 100644 --- a/src/soc/nvidia/tegra132/padconfig.c +++ b/src/soc/nvidia/tegra132/padconfig.c @@ -17,7 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include #include #include diff --git a/src/soc/nvidia/tegra132/power.c b/src/soc/nvidia/tegra132/power.c index 679845c2ce..4316d763db 100644 --- a/src/soc/nvidia/tegra132/power.c +++ b/src/soc/nvidia/tegra132/power.c @@ -22,9 +22,8 @@ #include #include #include - -#include "pmc.h" -#include "power.h" +#include +#include static struct tegra_pmc_regs * const pmc = (void *)TEGRA_PMC_BASE; diff --git a/src/soc/nvidia/tegra132/ramstage.c b/src/soc/nvidia/tegra132/ramstage.c index 40d80ff8b8..ec8839fe95 100644 --- a/src/soc/nvidia/tegra132/ramstage.c +++ b/src/soc/nvidia/tegra132/ramstage.c @@ -19,8 +19,8 @@ #include #include -#include "mmu_operations.h" #include +#include void arm64_soc_init(void) { diff --git a/src/soc/nvidia/tegra132/romstage.c b/src/soc/nvidia/tegra132/romstage.c index 94fd845e65..28785dbabc 100644 --- a/src/soc/nvidia/tegra132/romstage.c +++ b/src/soc/nvidia/tegra132/romstage.c @@ -17,22 +17,20 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include #include #include #include -#include -#include #include - #include -#include -#include "sdram.h" -#include "ccplex.h" - +#include #include +#include +#include #include +#include void __attribute__((weak)) romstage_mainboard_init(void) { diff --git a/src/soc/nvidia/tegra132/sdram.c b/src/soc/nvidia/tegra132/sdram.c index c1d178ed2e..14d2b50fe1 100644 --- a/src/soc/nvidia/tegra132/sdram.c +++ b/src/soc/nvidia/tegra132/sdram.c @@ -22,13 +22,12 @@ #include #include #include +#include +#include +#include +#include #include -#include "emc.h" -#include "mc.h" -#include "pmc.h" -#include "sdram.h" - static void sdram_patch(uintptr_t addr, uint32_t value) { if (addr) diff --git a/src/soc/nvidia/tegra132/sdram_lp0.c b/src/soc/nvidia/tegra132/sdram_lp0.c index 2a88351656..c63b823006 100644 --- a/src/soc/nvidia/tegra132/sdram_lp0.c +++ b/src/soc/nvidia/tegra132/sdram_lp0.c @@ -17,12 +17,11 @@ #include #include -#include #include - -#include "clk_rst.h" -#include "pmc.h" -#include "sdram.h" +#include +#include +#include +#include /* * This function reads SDRAM parameters (and a few CLK_RST regsiter values) from diff --git a/src/soc/nvidia/tegra132/secmon.c b/src/soc/nvidia/tegra132/secmon.c index 0a5ec7f113..42f471e82a 100644 --- a/src/soc/nvidia/tegra132/secmon.c +++ b/src/soc/nvidia/tegra132/secmon.c @@ -19,8 +19,8 @@ #include #include -#include "mmu_operations.h" #include +#include static void soc_get_secure_mem(uint64_t *base, size_t *size) { diff --git a/src/soc/nvidia/tegra132/soc.c b/src/soc/nvidia/tegra132/soc.c index 25a8e7edfa..b3841135f3 100644 --- a/src/soc/nvidia/tegra132/soc.c +++ b/src/soc/nvidia/tegra132/soc.c @@ -18,20 +18,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include -#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include #include +#include +#include +#include + #include "chip.h" static void soc_read_resources(device_t dev) diff --git a/src/soc/nvidia/tegra132/spi.c b/src/soc/nvidia/tegra132/spi.c index 219998c88d..0bff31a245 100644 --- a/src/soc/nvidia/tegra132/spi.c +++ b/src/soc/nvidia/tegra132/spi.c @@ -18,23 +18,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include +#include #include #include +#include +#include #include #include #include +#include +#include +#include #include #include #include #include -#include -#include -#include -#include -#include -#include "dma.h" -#include "spi.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/tegra132/uart.c b/src/soc/nvidia/tegra132/uart.c index 80328af9bf..17e1a53d22 100644 --- a/src/soc/nvidia/tegra132/uart.c +++ b/src/soc/nvidia/tegra132/uart.c @@ -17,12 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include #include #include /* for __console definition */ -#include +#include #include +#include /* * TODO: Use DRIVERS_UART_8250MEM driver instead.