Sam Lewis has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44378 )
Change subject: cpu/ti/am335x: Move from cpu to soc in tree ......................................................................
cpu/ti/am335x: Move from cpu to soc in tree
The AM335X is a SoC, so should be in the soc tree.
This moves all the existing am335x code to soc/ and updates any references. It also adds a soc.c file as required for the ramstage.
Change-Id: Ic1ccb0e9b9c24a8b211b723b5f4cc26cdd0eaaab Signed-off-by: Sam Lewis sam.vr.lewis@gmail.com --- M MAINTAINERS D src/cpu/ti/Kconfig D src/cpu/ti/Makefile.inc M src/mainboard/ti/beaglebone/Kconfig M src/mainboard/ti/beaglebone/bootblock.c M src/mainboard/ti/beaglebone/devicetree.cb M src/mainboard/ti/beaglebone/leds.c A src/soc/ti/Kconfig A src/soc/ti/Makefile.inc R src/soc/ti/am335x/Kconfig R src/soc/ti/am335x/Makefile.inc R src/soc/ti/am335x/bootblock.c R src/soc/ti/am335x/bootblock_media.c R src/soc/ti/am335x/cbmem.c R src/soc/ti/am335x/clock.h R src/soc/ti/am335x/dmtimer.c R src/soc/ti/am335x/dmtimer.h R src/soc/ti/am335x/gpio.c R src/soc/ti/am335x/gpio.h R src/soc/ti/am335x/header.c R src/soc/ti/am335x/header.h R src/soc/ti/am335x/header.ld R src/soc/ti/am335x/memlayout.ld R src/soc/ti/am335x/monotonic_timer.c R src/soc/ti/am335x/nand.c R src/soc/ti/am335x/pinmux.c R src/soc/ti/am335x/pinmux.h A src/soc/ti/am335x/soc.c R src/soc/ti/am335x/uart.c R src/soc/ti/am335x/uart.h 30 files changed, 34 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/44378/1
diff --git a/MAINTAINERS b/MAINTAINERS index 924247e..e91bfc2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -550,7 +550,7 @@ ORPHANED ARM SOCS S: Orphaned F: src/cpu/armltd/ -F: src/cpu/ti/ +F: src/soc/ti/ F: src/soc/qualcomm/ F: src/soc/samsung/ F: util/exynos/ diff --git a/src/cpu/ti/Kconfig b/src/cpu/ti/Kconfig deleted file mode 100644 index 119e84b..0000000 --- a/src/cpu/ti/Kconfig +++ /dev/null @@ -1 +0,0 @@ -source "src/cpu/ti/am335x/Kconfig" diff --git a/src/cpu/ti/Makefile.inc b/src/cpu/ti/Makefile.inc deleted file mode 100644 index 64b22f6..0000000 --- a/src/cpu/ti/Makefile.inc +++ /dev/null @@ -1 +0,0 @@ -subdirs-$(CONFIG_CPU_TI_AM335X) += am335x diff --git a/src/mainboard/ti/beaglebone/Kconfig b/src/mainboard/ti/beaglebone/Kconfig index 7399f22..5be310c 100644 --- a/src/mainboard/ti/beaglebone/Kconfig +++ b/src/mainboard/ti/beaglebone/Kconfig @@ -4,7 +4,7 @@
config BOARD_SPECIFIC_OPTIONS def_bool y - select CPU_TI_AM335X + select SOC_TI_AM335X select BOARD_ROMSIZE_KB_4096 select MISSING_BOARD_RESET
diff --git a/src/mainboard/ti/beaglebone/bootblock.c b/src/mainboard/ti/beaglebone/bootblock.c index 6e9538b..ca1a390 100644 --- a/src/mainboard/ti/beaglebone/bootblock.c +++ b/src/mainboard/ti/beaglebone/bootblock.c @@ -3,9 +3,9 @@ #include <device/mmio.h> #include <bootblock_common.h> #include <console/uart.h> -#include <cpu/ti/am335x/clock.h> -#include <cpu/ti/am335x/gpio.h> -#include <cpu/ti/am335x/pinmux.h> +#include <soc/ti/am335x/clock.h> +#include <soc/ti/am335x/gpio.h> +#include <soc/ti/am335x/pinmux.h>
#include "leds.h"
diff --git a/src/mainboard/ti/beaglebone/devicetree.cb b/src/mainboard/ti/beaglebone/devicetree.cb index dd999b4..217a201 100644 --- a/src/mainboard/ti/beaglebone/devicetree.cb +++ b/src/mainboard/ti/beaglebone/devicetree.cb @@ -1,5 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only
-chip cpu/ti/am335x +chip soc/ti/am335x device cpu_cluster 0 on end end diff --git a/src/mainboard/ti/beaglebone/leds.c b/src/mainboard/ti/beaglebone/leds.c index 99ae6d9..df58fea 100644 --- a/src/mainboard/ti/beaglebone/leds.c +++ b/src/mainboard/ti/beaglebone/leds.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
#include <assert.h> -#include <cpu/ti/am335x/gpio.h> +#include <soc/ti/am335x/gpio.h>
#include "leds.h"
diff --git a/src/soc/ti/Kconfig b/src/soc/ti/Kconfig new file mode 100644 index 0000000..eb66519 --- /dev/null +++ b/src/soc/ti/Kconfig @@ -0,0 +1 @@ +source "src/soc/ti/am335x/Kconfig" diff --git a/src/soc/ti/Makefile.inc b/src/soc/ti/Makefile.inc new file mode 100644 index 0000000..357cc82 --- /dev/null +++ b/src/soc/ti/Makefile.inc @@ -0,0 +1 @@ +subdirs-$(CONFIG_SOC_TI_AM335X) += am335x diff --git a/src/cpu/ti/am335x/Kconfig b/src/soc/ti/am335x/Kconfig similarity index 76% rename from src/cpu/ti/am335x/Kconfig rename to src/soc/ti/am335x/Kconfig index 3684480..533a0de 100644 --- a/src/cpu/ti/am335x/Kconfig +++ b/src/soc/ti/am335x/Kconfig @@ -1,4 +1,4 @@ -config CPU_TI_AM335X +config SOC_TI_AM335X select ARCH_BOOTBLOCK_ARMV7 select ARCH_VERSTAGE_ARMV7 select ARCH_ROMSTAGE_ARMV7 @@ -9,10 +9,10 @@ bool default n
-if CPU_TI_AM335X +if SOC_TI_AM335X
config MEMLAYOUT_LD_FILE string - default "src/cpu/ti/am335x/memlayout.ld" + default "src/soc/ti/am335x/memlayout.ld"
endif diff --git a/src/cpu/ti/am335x/Makefile.inc b/src/soc/ti/am335x/Makefile.inc similarity index 98% rename from src/cpu/ti/am335x/Makefile.inc rename to src/soc/ti/am335x/Makefile.inc index 6f414bc..dd9e093 100644 --- a/src/cpu/ti/am335x/Makefile.inc +++ b/src/soc/ti/am335x/Makefile.inc @@ -13,6 +13,7 @@ ramstage-y += dmtimer.c ramstage-y += monotonic_timer.c ramstage-y += nand.c +ramstage-y += soc.c
bootblock-y += uart.c romstage-y += uart.c diff --git a/src/cpu/ti/am335x/bootblock.c b/src/soc/ti/am335x/bootblock.c similarity index 100% rename from src/cpu/ti/am335x/bootblock.c rename to src/soc/ti/am335x/bootblock.c diff --git a/src/cpu/ti/am335x/bootblock_media.c b/src/soc/ti/am335x/bootblock_media.c similarity index 100% rename from src/cpu/ti/am335x/bootblock_media.c rename to src/soc/ti/am335x/bootblock_media.c diff --git a/src/cpu/ti/am335x/cbmem.c b/src/soc/ti/am335x/cbmem.c similarity index 100% rename from src/cpu/ti/am335x/cbmem.c rename to src/soc/ti/am335x/cbmem.c diff --git a/src/cpu/ti/am335x/clock.h b/src/soc/ti/am335x/clock.h similarity index 98% rename from src/cpu/ti/am335x/clock.h rename to src/soc/ti/am335x/clock.h index aadd3f6..38b4ece 100644 --- a/src/cpu/ti/am335x/clock.h +++ b/src/soc/ti/am335x/clock.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef __CPU_TI_AM335X_CLOCK_H__ -#define __CPU_TI_AM335X_CLOCK_H__ +#ifndef __SOC_TI_AM335X_CLOCK_H__ +#define __SOC_TI_AM335X_CLOCK_H__
#include <stdint.h>
@@ -219,4 +219,4 @@ static struct am335x_cm_cefuse_regs * const am335x_cm_cefuse = (void *)0x44e00a00;
-#endif /* __CPU_TI_AM335X_CLOCK_H__ */ +#endif /* __SOC_TI_AM335X_CLOCK_H__ */ diff --git a/src/cpu/ti/am335x/dmtimer.c b/src/soc/ti/am335x/dmtimer.c similarity index 100% rename from src/cpu/ti/am335x/dmtimer.c rename to src/soc/ti/am335x/dmtimer.c diff --git a/src/cpu/ti/am335x/dmtimer.h b/src/soc/ti/am335x/dmtimer.h similarity index 69% rename from src/cpu/ti/am335x/dmtimer.h rename to src/soc/ti/am335x/dmtimer.h index 7e93a0c..ad8515f 100644 --- a/src/cpu/ti/am335x/dmtimer.h +++ b/src/soc/ti/am335x/dmtimer.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __CPU_TI_AM335X_DMTIMER_H__ -#define __CPU_TI_AM335X_DMTIMER_H__ +#ifndef __SOC_TI_AM335X_DMTIMER_H__ +#define __SOC_TI_AM335X_DMTIMER_H__
#include <stdint.h>
diff --git a/src/cpu/ti/am335x/gpio.c b/src/soc/ti/am335x/gpio.c similarity index 97% rename from src/cpu/ti/am335x/gpio.c rename to src/soc/ti/am335x/gpio.c index de7f740..d3d3581 100644 --- a/src/cpu/ti/am335x/gpio.c +++ b/src/soc/ti/am335x/gpio.c @@ -2,7 +2,7 @@
#include <device/mmio.h> #include <console/console.h> -#include <cpu/ti/am335x/gpio.h> +#include <soc/ti/am335x/gpio.h> #include <stdint.h>
static struct am335x_gpio_regs *gpio_regs_and_bit(unsigned int gpio, diff --git a/src/cpu/ti/am335x/gpio.h b/src/soc/ti/am335x/gpio.h similarity index 93% rename from src/cpu/ti/am335x/gpio.h rename to src/soc/ti/am335x/gpio.h index 62ad77a..0877a62 100644 --- a/src/cpu/ti/am335x/gpio.h +++ b/src/soc/ti/am335x/gpio.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef __CPU_TI_AM335X_GPIO_H__ -#define __CPU_TI_AM335X_GPIO_H__ +#ifndef __SOC_TI_AM335X_GPIO_H__ +#define __SOC_TI_AM335X_GPIO_H__
#include <stdint.h>
@@ -55,4 +55,4 @@ int gpio_get_value(unsigned int gpio); int gpio_set_value(unsigned int gpio, int value);
-#endif /* __CPU_TI_AM335X_CLOCK_H__ */ +#endif /* __SOC_TI_AM335X_CLOCK_H__ */ diff --git a/src/cpu/ti/am335x/header.c b/src/soc/ti/am335x/header.c similarity index 100% rename from src/cpu/ti/am335x/header.c rename to src/soc/ti/am335x/header.c diff --git a/src/cpu/ti/am335x/header.h b/src/soc/ti/am335x/header.h similarity index 92% rename from src/cpu/ti/am335x/header.h rename to src/soc/ti/am335x/header.h index 578d213..a0a54ad 100644 --- a/src/cpu/ti/am335x/header.h +++ b/src/soc/ti/am335x/header.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef __CPU_TI_AM335X_HEADER_H -#define __CPU_TI_AM335X_HEADER_H +#ifndef __SOC_TI_AM335X_HEADER_H +#define __SOC_TI_AM335X_HEADER_H
#include <stdint.h>
diff --git a/src/cpu/ti/am335x/header.ld b/src/soc/ti/am335x/header.ld similarity index 100% rename from src/cpu/ti/am335x/header.ld rename to src/soc/ti/am335x/header.ld diff --git a/src/cpu/ti/am335x/memlayout.ld b/src/soc/ti/am335x/memlayout.ld similarity index 100% rename from src/cpu/ti/am335x/memlayout.ld rename to src/soc/ti/am335x/memlayout.ld diff --git a/src/cpu/ti/am335x/monotonic_timer.c b/src/soc/ti/am335x/monotonic_timer.c similarity index 100% rename from src/cpu/ti/am335x/monotonic_timer.c rename to src/soc/ti/am335x/monotonic_timer.c diff --git a/src/cpu/ti/am335x/nand.c b/src/soc/ti/am335x/nand.c similarity index 100% rename from src/cpu/ti/am335x/nand.c rename to src/soc/ti/am335x/nand.c diff --git a/src/cpu/ti/am335x/pinmux.c b/src/soc/ti/am335x/pinmux.c similarity index 100% rename from src/cpu/ti/am335x/pinmux.c rename to src/soc/ti/am335x/pinmux.c diff --git a/src/cpu/ti/am335x/pinmux.h b/src/soc/ti/am335x/pinmux.h similarity index 98% rename from src/cpu/ti/am335x/pinmux.h rename to src/soc/ti/am335x/pinmux.h index 0cb56a6..c46d03d 100644 --- a/src/cpu/ti/am335x/pinmux.h +++ b/src/soc/ti/am335x/pinmux.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef __CPU_TI_AM335X_PINMUX_H -#define __CPU_TI_AM335X_PINMUX_H +#ifndef __SOC_TI_AM335X_PINMUX_H +#define __SOC_TI_AM335X_PINMUX_H
#include <stdint.h>
diff --git a/src/soc/ti/am335x/soc.c b/src/soc/ti/am335x/soc.c new file mode 100644 index 0000000..0362ed9 --- /dev/null +++ b/src/soc/ti/am335x/soc.c @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <device/device.h> + +struct chip_operations soc_ti_am335x_ops = { + CHIP_NAME("TI AM335X") +}; diff --git a/src/cpu/ti/am335x/uart.c b/src/soc/ti/am335x/uart.c similarity index 99% rename from src/cpu/ti/am335x/uart.c rename to src/soc/ti/am335x/uart.c index a882340..90095d4 100644 --- a/src/cpu/ti/am335x/uart.c +++ b/src/soc/ti/am335x/uart.c @@ -4,7 +4,7 @@ #include <console/uart.h> #include <device/mmio.h> #include <boot/coreboot_tables.h> -#include <cpu/ti/am335x/uart.h> +#include <soc/ti/am335x/uart.h>
#define EFR_ENHANCED_EN (1 << 4) #define FCR_FIFO_EN (1 << 0) diff --git a/src/cpu/ti/am335x/uart.h b/src/soc/ti/am335x/uart.h similarity index 100% rename from src/cpu/ti/am335x/uart.h rename to src/soc/ti/am335x/uart.h
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44378
to look at the new patch set (#2).
Change subject: cpu/ti/am335x: Move from cpu to soc in tree ......................................................................
cpu/ti/am335x: Move from cpu to soc in tree
The AM335X is a SoC, so should be in the soc tree.
This moves all the existing am335x code to soc/ and updates any references. It also adds a soc.c file as required for the ramstage.
Change-Id: Ic1ccb0e9b9c24a8b211b723b5f4cc26cdd0eaaab Signed-off-by: Sam Lewis sam.vr.lewis@gmail.com --- M MAINTAINERS D src/cpu/ti/Kconfig D src/cpu/ti/Makefile.inc M src/mainboard/ti/beaglebone/Kconfig M src/mainboard/ti/beaglebone/bootblock.c M src/mainboard/ti/beaglebone/devicetree.cb M src/mainboard/ti/beaglebone/leds.c A src/soc/ti/Kconfig A src/soc/ti/Makefile.inc R src/soc/ti/am335x/Kconfig R src/soc/ti/am335x/Makefile.inc R src/soc/ti/am335x/bootblock.c R src/soc/ti/am335x/bootblock_media.c R src/soc/ti/am335x/cbmem.c R src/soc/ti/am335x/clock.h R src/soc/ti/am335x/dmtimer.c R src/soc/ti/am335x/dmtimer.h R src/soc/ti/am335x/gpio.c R src/soc/ti/am335x/gpio.h R src/soc/ti/am335x/header.c R src/soc/ti/am335x/header.h R src/soc/ti/am335x/header.ld R src/soc/ti/am335x/memlayout.ld R src/soc/ti/am335x/monotonic_timer.c R src/soc/ti/am335x/nand.c R src/soc/ti/am335x/pinmux.c R src/soc/ti/am335x/pinmux.h A src/soc/ti/am335x/soc.c R src/soc/ti/am335x/uart.c R src/soc/ti/am335x/uart.h 30 files changed, 34 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/44378/2
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44378
to look at the new patch set (#3).
Change subject: cpu/ti/am335x: Move from cpu to soc in tree ......................................................................
cpu/ti/am335x: Move from cpu to soc in tree
The AM335X is a SoC, so should be in the soc tree.
This moves all the existing am335x code to soc/ and updates any references. It also adds a soc.c file as required for the ramstage.
Change-Id: Ic1ccb0e9b9c24a8b211b723b5f4cc26cdd0eaaab Signed-off-by: Sam Lewis sam.vr.lewis@gmail.com --- M MAINTAINERS D src/cpu/ti/Kconfig D src/cpu/ti/Makefile.inc M src/mainboard/ti/beaglebone/Kconfig M src/mainboard/ti/beaglebone/bootblock.c M src/mainboard/ti/beaglebone/devicetree.cb M src/mainboard/ti/beaglebone/leds.c A src/soc/ti/Kconfig A src/soc/ti/Makefile.inc R src/soc/ti/am335x/Kconfig R src/soc/ti/am335x/Makefile.inc R src/soc/ti/am335x/bootblock.c R src/soc/ti/am335x/bootblock_media.c R src/soc/ti/am335x/cbmem.c R src/soc/ti/am335x/clock.h R src/soc/ti/am335x/dmtimer.c R src/soc/ti/am335x/dmtimer.h R src/soc/ti/am335x/gpio.c R src/soc/ti/am335x/gpio.h R src/soc/ti/am335x/header.c R src/soc/ti/am335x/header.h R src/soc/ti/am335x/header.ld R src/soc/ti/am335x/memlayout.ld R src/soc/ti/am335x/monotonic_timer.c R src/soc/ti/am335x/nand.c R src/soc/ti/am335x/pinmux.c R src/soc/ti/am335x/pinmux.h A src/soc/ti/am335x/soc.c R src/soc/ti/am335x/uart.c R src/soc/ti/am335x/uart.h 30 files changed, 38 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/44378/3
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44378
to look at the new patch set (#4).
Change subject: cpu/ti/am335x: Move from cpu to soc in tree ......................................................................
cpu/ti/am335x: Move from cpu to soc in tree
The AM335X is a SoC, so should be in the soc tree.
This moves all the existing am335x code to soc/ and updates any references. It also adds a soc.c file as required for the ramstage.
Change-Id: Ic1ccb0e9b9c24a8b211b723b5f4cc26cdd0eaaab Signed-off-by: Sam Lewis sam.vr.lewis@gmail.com --- M MAINTAINERS D src/cpu/ti/Kconfig D src/cpu/ti/Makefile.inc M src/mainboard/ti/beaglebone/Kconfig M src/mainboard/ti/beaglebone/bootblock.c M src/mainboard/ti/beaglebone/devicetree.cb M src/mainboard/ti/beaglebone/leds.c A src/soc/ti/Kconfig A src/soc/ti/Makefile.inc R src/soc/ti/am335x/Kconfig R src/soc/ti/am335x/Makefile.inc R src/soc/ti/am335x/bootblock.c R src/soc/ti/am335x/bootblock_media.c R src/soc/ti/am335x/cbmem.c R src/soc/ti/am335x/clock.h R src/soc/ti/am335x/dmtimer.c R src/soc/ti/am335x/dmtimer.h R src/soc/ti/am335x/gpio.c R src/soc/ti/am335x/gpio.h R src/soc/ti/am335x/header.c R src/soc/ti/am335x/header.h R src/soc/ti/am335x/header.ld R src/soc/ti/am335x/memlayout.ld R src/soc/ti/am335x/monotonic_timer.c R src/soc/ti/am335x/nand.c R src/soc/ti/am335x/pinmux.c R src/soc/ti/am335x/pinmux.h A src/soc/ti/am335x/soc.c R src/soc/ti/am335x/uart.c R src/soc/ti/am335x/uart.h 30 files changed, 34 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/44378/4
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44378
to look at the new patch set (#5).
Change subject: cpu/ti/am335x: Move from cpu to soc in tree ......................................................................
cpu/ti/am335x: Move from cpu to soc in tree
The AM335X is a SoC, so should be in the soc tree.
This moves all the existing am335x code to soc/ and updates any references. It also adds a soc.c file as required for the ramstage.
Change-Id: Ic1ccb0e9b9c24a8b211b723b5f4cc26cdd0eaaab Signed-off-by: Sam Lewis sam.vr.lewis@gmail.com --- M MAINTAINERS D src/cpu/ti/Kconfig D src/cpu/ti/Makefile.inc M src/mainboard/ti/beaglebone/Kconfig M src/mainboard/ti/beaglebone/bootblock.c M src/mainboard/ti/beaglebone/devicetree.cb M src/mainboard/ti/beaglebone/leds.c A src/soc/ti/Kconfig A src/soc/ti/Makefile.inc R src/soc/ti/am335x/Kconfig R src/soc/ti/am335x/Makefile.inc R src/soc/ti/am335x/bootblock.c R src/soc/ti/am335x/bootblock_media.c R src/soc/ti/am335x/cbmem.c R src/soc/ti/am335x/clock.h R src/soc/ti/am335x/dmtimer.c R src/soc/ti/am335x/dmtimer.h R src/soc/ti/am335x/gpio.c R src/soc/ti/am335x/gpio.h R src/soc/ti/am335x/header.c R src/soc/ti/am335x/header.h R src/soc/ti/am335x/header.ld R src/soc/ti/am335x/memlayout.ld R src/soc/ti/am335x/monotonic_timer.c R src/soc/ti/am335x/nand.c R src/soc/ti/am335x/pinmux.c R src/soc/ti/am335x/pinmux.h A src/soc/ti/am335x/soc.c R src/soc/ti/am335x/uart.c R src/soc/ti/am335x/uart.h 30 files changed, 36 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/44378/5
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44378 )
Change subject: cpu/ti/am335x: Move from cpu to soc in tree ......................................................................
Patch Set 5: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44378 )
Change subject: cpu/ti/am335x: Move from cpu to soc in tree ......................................................................
cpu/ti/am335x: Move from cpu to soc in tree
The AM335X is a SoC, so should be in the soc tree.
This moves all the existing am335x code to soc/ and updates any references. It also adds a soc.c file as required for the ramstage.
Change-Id: Ic1ccb0e9b9c24a8b211b723b5f4cc26cdd0eaaab Signed-off-by: Sam Lewis sam.vr.lewis@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/44378 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Rudolph siro@das-labor.org --- M MAINTAINERS D src/cpu/ti/Kconfig D src/cpu/ti/Makefile.inc M src/mainboard/ti/beaglebone/Kconfig M src/mainboard/ti/beaglebone/bootblock.c M src/mainboard/ti/beaglebone/devicetree.cb M src/mainboard/ti/beaglebone/leds.c A src/soc/ti/Kconfig A src/soc/ti/Makefile.inc R src/soc/ti/am335x/Kconfig R src/soc/ti/am335x/Makefile.inc R src/soc/ti/am335x/bootblock.c R src/soc/ti/am335x/bootblock_media.c R src/soc/ti/am335x/cbmem.c R src/soc/ti/am335x/clock.h R src/soc/ti/am335x/dmtimer.c R src/soc/ti/am335x/dmtimer.h R src/soc/ti/am335x/gpio.c R src/soc/ti/am335x/gpio.h R src/soc/ti/am335x/header.c R src/soc/ti/am335x/header.h R src/soc/ti/am335x/header.ld R src/soc/ti/am335x/memlayout.ld R src/soc/ti/am335x/monotonic_timer.c R src/soc/ti/am335x/nand.c R src/soc/ti/am335x/pinmux.c R src/soc/ti/am335x/pinmux.h A src/soc/ti/am335x/soc.c R src/soc/ti/am335x/uart.c R src/soc/ti/am335x/uart.h 30 files changed, 36 insertions(+), 26 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved
diff --git a/MAINTAINERS b/MAINTAINERS index 924247e..e91bfc2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -550,7 +550,7 @@ ORPHANED ARM SOCS S: Orphaned F: src/cpu/armltd/ -F: src/cpu/ti/ +F: src/soc/ti/ F: src/soc/qualcomm/ F: src/soc/samsung/ F: util/exynos/ diff --git a/src/cpu/ti/Kconfig b/src/cpu/ti/Kconfig deleted file mode 100644 index 119e84b..0000000 --- a/src/cpu/ti/Kconfig +++ /dev/null @@ -1 +0,0 @@ -source "src/cpu/ti/am335x/Kconfig" diff --git a/src/cpu/ti/Makefile.inc b/src/cpu/ti/Makefile.inc deleted file mode 100644 index 64b22f6..0000000 --- a/src/cpu/ti/Makefile.inc +++ /dev/null @@ -1 +0,0 @@ -subdirs-$(CONFIG_CPU_TI_AM335X) += am335x diff --git a/src/mainboard/ti/beaglebone/Kconfig b/src/mainboard/ti/beaglebone/Kconfig index 7399f22..5be310c 100644 --- a/src/mainboard/ti/beaglebone/Kconfig +++ b/src/mainboard/ti/beaglebone/Kconfig @@ -4,7 +4,7 @@
config BOARD_SPECIFIC_OPTIONS def_bool y - select CPU_TI_AM335X + select SOC_TI_AM335X select BOARD_ROMSIZE_KB_4096 select MISSING_BOARD_RESET
diff --git a/src/mainboard/ti/beaglebone/bootblock.c b/src/mainboard/ti/beaglebone/bootblock.c index 6e9538b..ca1a390 100644 --- a/src/mainboard/ti/beaglebone/bootblock.c +++ b/src/mainboard/ti/beaglebone/bootblock.c @@ -3,9 +3,9 @@ #include <device/mmio.h> #include <bootblock_common.h> #include <console/uart.h> -#include <cpu/ti/am335x/clock.h> -#include <cpu/ti/am335x/gpio.h> -#include <cpu/ti/am335x/pinmux.h> +#include <soc/ti/am335x/clock.h> +#include <soc/ti/am335x/gpio.h> +#include <soc/ti/am335x/pinmux.h>
#include "leds.h"
diff --git a/src/mainboard/ti/beaglebone/devicetree.cb b/src/mainboard/ti/beaglebone/devicetree.cb index dd999b4..217a201 100644 --- a/src/mainboard/ti/beaglebone/devicetree.cb +++ b/src/mainboard/ti/beaglebone/devicetree.cb @@ -1,5 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only
-chip cpu/ti/am335x +chip soc/ti/am335x device cpu_cluster 0 on end end diff --git a/src/mainboard/ti/beaglebone/leds.c b/src/mainboard/ti/beaglebone/leds.c index 99ae6d9..df58fea 100644 --- a/src/mainboard/ti/beaglebone/leds.c +++ b/src/mainboard/ti/beaglebone/leds.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
#include <assert.h> -#include <cpu/ti/am335x/gpio.h> +#include <soc/ti/am335x/gpio.h>
#include "leds.h"
diff --git a/src/soc/ti/Kconfig b/src/soc/ti/Kconfig new file mode 100644 index 0000000..eb66519 --- /dev/null +++ b/src/soc/ti/Kconfig @@ -0,0 +1 @@ +source "src/soc/ti/am335x/Kconfig" diff --git a/src/soc/ti/Makefile.inc b/src/soc/ti/Makefile.inc new file mode 100644 index 0000000..357cc82 --- /dev/null +++ b/src/soc/ti/Makefile.inc @@ -0,0 +1 @@ +subdirs-$(CONFIG_SOC_TI_AM335X) += am335x diff --git a/src/cpu/ti/am335x/Kconfig b/src/soc/ti/am335x/Kconfig similarity index 76% rename from src/cpu/ti/am335x/Kconfig rename to src/soc/ti/am335x/Kconfig index 3684480..533a0de 100644 --- a/src/cpu/ti/am335x/Kconfig +++ b/src/soc/ti/am335x/Kconfig @@ -1,4 +1,4 @@ -config CPU_TI_AM335X +config SOC_TI_AM335X select ARCH_BOOTBLOCK_ARMV7 select ARCH_VERSTAGE_ARMV7 select ARCH_ROMSTAGE_ARMV7 @@ -9,10 +9,10 @@ bool default n
-if CPU_TI_AM335X +if SOC_TI_AM335X
config MEMLAYOUT_LD_FILE string - default "src/cpu/ti/am335x/memlayout.ld" + default "src/soc/ti/am335x/memlayout.ld"
endif diff --git a/src/cpu/ti/am335x/Makefile.inc b/src/soc/ti/am335x/Makefile.inc similarity index 95% rename from src/cpu/ti/am335x/Makefile.inc rename to src/soc/ti/am335x/Makefile.inc index 6f414bc..2865338 100644 --- a/src/cpu/ti/am335x/Makefile.inc +++ b/src/soc/ti/am335x/Makefile.inc @@ -1,3 +1,4 @@ +ifeq ($(CONFIG_SOC_TI_AM335X),y) bootblock-y += bootblock.c bootblock-y += bootblock_media.c bootblock-y += dmtimer.c @@ -13,6 +14,7 @@ ramstage-y += dmtimer.c ramstage-y += monotonic_timer.c ramstage-y += nand.c +ramstage-y += soc.c
bootblock-y += uart.c romstage-y += uart.c @@ -51,3 +53,4 @@
omap-header-srcs += $(CONFIG_MEMLAYOUT_LD_FILE) omap-header-y += header.ld +endif diff --git a/src/cpu/ti/am335x/bootblock.c b/src/soc/ti/am335x/bootblock.c similarity index 100% rename from src/cpu/ti/am335x/bootblock.c rename to src/soc/ti/am335x/bootblock.c diff --git a/src/cpu/ti/am335x/bootblock_media.c b/src/soc/ti/am335x/bootblock_media.c similarity index 100% rename from src/cpu/ti/am335x/bootblock_media.c rename to src/soc/ti/am335x/bootblock_media.c diff --git a/src/cpu/ti/am335x/cbmem.c b/src/soc/ti/am335x/cbmem.c similarity index 100% rename from src/cpu/ti/am335x/cbmem.c rename to src/soc/ti/am335x/cbmem.c diff --git a/src/cpu/ti/am335x/clock.h b/src/soc/ti/am335x/clock.h similarity index 98% rename from src/cpu/ti/am335x/clock.h rename to src/soc/ti/am335x/clock.h index aadd3f6..38b4ece 100644 --- a/src/cpu/ti/am335x/clock.h +++ b/src/soc/ti/am335x/clock.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef __CPU_TI_AM335X_CLOCK_H__ -#define __CPU_TI_AM335X_CLOCK_H__ +#ifndef __SOC_TI_AM335X_CLOCK_H__ +#define __SOC_TI_AM335X_CLOCK_H__
#include <stdint.h>
@@ -219,4 +219,4 @@ static struct am335x_cm_cefuse_regs * const am335x_cm_cefuse = (void *)0x44e00a00;
-#endif /* __CPU_TI_AM335X_CLOCK_H__ */ +#endif /* __SOC_TI_AM335X_CLOCK_H__ */ diff --git a/src/cpu/ti/am335x/dmtimer.c b/src/soc/ti/am335x/dmtimer.c similarity index 100% rename from src/cpu/ti/am335x/dmtimer.c rename to src/soc/ti/am335x/dmtimer.c diff --git a/src/cpu/ti/am335x/dmtimer.h b/src/soc/ti/am335x/dmtimer.h similarity index 69% rename from src/cpu/ti/am335x/dmtimer.h rename to src/soc/ti/am335x/dmtimer.h index 7e93a0c..ad8515f 100644 --- a/src/cpu/ti/am335x/dmtimer.h +++ b/src/soc/ti/am335x/dmtimer.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __CPU_TI_AM335X_DMTIMER_H__ -#define __CPU_TI_AM335X_DMTIMER_H__ +#ifndef __SOC_TI_AM335X_DMTIMER_H__ +#define __SOC_TI_AM335X_DMTIMER_H__
#include <stdint.h>
diff --git a/src/cpu/ti/am335x/gpio.c b/src/soc/ti/am335x/gpio.c similarity index 97% rename from src/cpu/ti/am335x/gpio.c rename to src/soc/ti/am335x/gpio.c index de7f740..d3d3581 100644 --- a/src/cpu/ti/am335x/gpio.c +++ b/src/soc/ti/am335x/gpio.c @@ -2,7 +2,7 @@
#include <device/mmio.h> #include <console/console.h> -#include <cpu/ti/am335x/gpio.h> +#include <soc/ti/am335x/gpio.h> #include <stdint.h>
static struct am335x_gpio_regs *gpio_regs_and_bit(unsigned int gpio, diff --git a/src/cpu/ti/am335x/gpio.h b/src/soc/ti/am335x/gpio.h similarity index 93% rename from src/cpu/ti/am335x/gpio.h rename to src/soc/ti/am335x/gpio.h index 62ad77a..0877a62 100644 --- a/src/cpu/ti/am335x/gpio.h +++ b/src/soc/ti/am335x/gpio.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef __CPU_TI_AM335X_GPIO_H__ -#define __CPU_TI_AM335X_GPIO_H__ +#ifndef __SOC_TI_AM335X_GPIO_H__ +#define __SOC_TI_AM335X_GPIO_H__
#include <stdint.h>
@@ -55,4 +55,4 @@ int gpio_get_value(unsigned int gpio); int gpio_set_value(unsigned int gpio, int value);
-#endif /* __CPU_TI_AM335X_CLOCK_H__ */ +#endif /* __SOC_TI_AM335X_CLOCK_H__ */ diff --git a/src/cpu/ti/am335x/header.c b/src/soc/ti/am335x/header.c similarity index 100% rename from src/cpu/ti/am335x/header.c rename to src/soc/ti/am335x/header.c diff --git a/src/cpu/ti/am335x/header.h b/src/soc/ti/am335x/header.h similarity index 92% rename from src/cpu/ti/am335x/header.h rename to src/soc/ti/am335x/header.h index 578d213..a0a54ad 100644 --- a/src/cpu/ti/am335x/header.h +++ b/src/soc/ti/am335x/header.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef __CPU_TI_AM335X_HEADER_H -#define __CPU_TI_AM335X_HEADER_H +#ifndef __SOC_TI_AM335X_HEADER_H +#define __SOC_TI_AM335X_HEADER_H
#include <stdint.h>
diff --git a/src/cpu/ti/am335x/header.ld b/src/soc/ti/am335x/header.ld similarity index 100% rename from src/cpu/ti/am335x/header.ld rename to src/soc/ti/am335x/header.ld diff --git a/src/cpu/ti/am335x/memlayout.ld b/src/soc/ti/am335x/memlayout.ld similarity index 100% rename from src/cpu/ti/am335x/memlayout.ld rename to src/soc/ti/am335x/memlayout.ld diff --git a/src/cpu/ti/am335x/monotonic_timer.c b/src/soc/ti/am335x/monotonic_timer.c similarity index 100% rename from src/cpu/ti/am335x/monotonic_timer.c rename to src/soc/ti/am335x/monotonic_timer.c diff --git a/src/cpu/ti/am335x/nand.c b/src/soc/ti/am335x/nand.c similarity index 100% rename from src/cpu/ti/am335x/nand.c rename to src/soc/ti/am335x/nand.c diff --git a/src/cpu/ti/am335x/pinmux.c b/src/soc/ti/am335x/pinmux.c similarity index 100% rename from src/cpu/ti/am335x/pinmux.c rename to src/soc/ti/am335x/pinmux.c diff --git a/src/cpu/ti/am335x/pinmux.h b/src/soc/ti/am335x/pinmux.h similarity index 98% rename from src/cpu/ti/am335x/pinmux.h rename to src/soc/ti/am335x/pinmux.h index 0cb56a6..c46d03d 100644 --- a/src/cpu/ti/am335x/pinmux.h +++ b/src/soc/ti/am335x/pinmux.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef __CPU_TI_AM335X_PINMUX_H -#define __CPU_TI_AM335X_PINMUX_H +#ifndef __SOC_TI_AM335X_PINMUX_H +#define __SOC_TI_AM335X_PINMUX_H
#include <stdint.h>
diff --git a/src/soc/ti/am335x/soc.c b/src/soc/ti/am335x/soc.c new file mode 100644 index 0000000..0362ed9 --- /dev/null +++ b/src/soc/ti/am335x/soc.c @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <device/device.h> + +struct chip_operations soc_ti_am335x_ops = { + CHIP_NAME("TI AM335X") +}; diff --git a/src/cpu/ti/am335x/uart.c b/src/soc/ti/am335x/uart.c similarity index 99% rename from src/cpu/ti/am335x/uart.c rename to src/soc/ti/am335x/uart.c index a882340..90095d4 100644 --- a/src/cpu/ti/am335x/uart.c +++ b/src/soc/ti/am335x/uart.c @@ -4,7 +4,7 @@ #include <console/uart.h> #include <device/mmio.h> #include <boot/coreboot_tables.h> -#include <cpu/ti/am335x/uart.h> +#include <soc/ti/am335x/uart.h>
#define EFR_ENHANCED_EN (1 << 4) #define FCR_FIFO_EN (1 << 0) diff --git a/src/cpu/ti/am335x/uart.h b/src/soc/ti/am335x/uart.h similarity index 100% rename from src/cpu/ti/am335x/uart.h rename to src/soc/ti/am335x/uart.h