Message ID | 20180821143055.29012-2-lokeshvutla@ti.com |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Series | Initial support Texas Instrument's AM654 Platform | expand |
On Tue, Aug 21, 2018 at 08:00:48PM +0530, Lokesh Vutla wrote: > Add support for Texas Instruments' K3 Generation Processor > families. [snip] > diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c > index 9c80090aa7..f48d82f051 100644 > --- a/drivers/serial/ns16550.c > +++ b/drivers/serial/ns16550.c > @@ -175,7 +175,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) > ; > > serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier); > -#if defined(CONFIG_ARCH_OMAP2PLUS) > +#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_ARCH_K3) > serial_out(0x7, &com_port->mdr1); /* mode select reset TL16C750*/ > #endif > > @@ -183,7 +183,8 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) > serial_out(ns16550_getfcr(com_port), &com_port->fcr); > if (baud_divisor != -1) > NS16550_setbrg(com_port, baud_divisor); > -#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX) > +#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX) || \ > + defined(CONFIG_ARCH_K3) > /* /16 is proper to hit 115200 with 48MHz */ > serial_out(0, &com_port->mdr1); > #endif K3 would also be using CONFIG_OMAP_SERIAL once https://patchwork.ozlabs.org/patch/956252/ is applied (which I'll do in the next release) yes? I think 956252 needs a follow-up that changes the above hunks to be testing off CONFIG_OMAP_SERIAL instead so this part of the series just becomes changing the default y line for OMAP_SERIAL.
On Friday 24 August 2018 07:40 PM, Tom Rini wrote: > On Tue, Aug 21, 2018 at 08:00:48PM +0530, Lokesh Vutla wrote: > >> Add support for Texas Instruments' K3 Generation Processor >> families. > [snip] >> diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c >> index 9c80090aa7..f48d82f051 100644 >> --- a/drivers/serial/ns16550.c >> +++ b/drivers/serial/ns16550.c >> @@ -175,7 +175,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) >> ; >> >> serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier); >> -#if defined(CONFIG_ARCH_OMAP2PLUS) >> +#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_ARCH_K3) >> serial_out(0x7, &com_port->mdr1); /* mode select reset TL16C750*/ >> #endif >> >> @@ -183,7 +183,8 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) >> serial_out(ns16550_getfcr(com_port), &com_port->fcr); >> if (baud_divisor != -1) >> NS16550_setbrg(com_port, baud_divisor); >> -#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX) >> +#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX) || \ >> + defined(CONFIG_ARCH_K3) >> /* /16 is proper to hit 115200 with 48MHz */ >> serial_out(0, &com_port->mdr1); >> #endif > > K3 would also be using CONFIG_OMAP_SERIAL once > https://patchwork.ozlabs.org/patch/956252/ is applied (which I'll do in > the next release) yes? I think 956252 needs a follow-up that changes > the above hunks to be testing off CONFIG_OMAP_SERIAL instead so this I did not make this change because ns16550 is also used by non-DM platforms. Since OMAP_SERIAL is DM specific, converting this #ifdef to OMAP_SERIAL would break non DM platforms. I guess I should still add || OMAP_SERIAL. Ill post a v2 for 956252. Thanks and regards, Lokesh
On Fri, Aug 24, 2018 at 08:21:19PM +0530, Lokesh Vutla wrote: > > > On Friday 24 August 2018 07:40 PM, Tom Rini wrote: > > On Tue, Aug 21, 2018 at 08:00:48PM +0530, Lokesh Vutla wrote: > > > >> Add support for Texas Instruments' K3 Generation Processor > >> families. > > [snip] > >> diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c > >> index 9c80090aa7..f48d82f051 100644 > >> --- a/drivers/serial/ns16550.c > >> +++ b/drivers/serial/ns16550.c > >> @@ -175,7 +175,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) > >> ; > >> > >> serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier); > >> -#if defined(CONFIG_ARCH_OMAP2PLUS) > >> +#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_ARCH_K3) > >> serial_out(0x7, &com_port->mdr1); /* mode select reset TL16C750*/ > >> #endif > >> > >> @@ -183,7 +183,8 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) > >> serial_out(ns16550_getfcr(com_port), &com_port->fcr); > >> if (baud_divisor != -1) > >> NS16550_setbrg(com_port, baud_divisor); > >> -#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX) > >> +#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX) || \ > >> + defined(CONFIG_ARCH_K3) > >> /* /16 is proper to hit 115200 with 48MHz */ > >> serial_out(0, &com_port->mdr1); > >> #endif > > > > K3 would also be using CONFIG_OMAP_SERIAL once > > https://patchwork.ozlabs.org/patch/956252/ is applied (which I'll do in > > the next release) yes? I think 956252 needs a follow-up that changes > > the above hunks to be testing off CONFIG_OMAP_SERIAL instead so this > > I did not make this change because ns16550 is also used by non-DM > platforms. Since OMAP_SERIAL is DM specific, converting this #ifdef to > OMAP_SERIAL would break non DM platforms. I guess I should still add || > OMAP_SERIAL. Ill post a v2 for 956252. What are the non-DM serial users at this point?
On Friday 24 August 2018 08:25 PM, Tom Rini wrote: > On Fri, Aug 24, 2018 at 08:21:19PM +0530, Lokesh Vutla wrote: >> >> >> On Friday 24 August 2018 07:40 PM, Tom Rini wrote: >>> On Tue, Aug 21, 2018 at 08:00:48PM +0530, Lokesh Vutla wrote: >>> >>>> Add support for Texas Instruments' K3 Generation Processor >>>> families. >>> [snip] >>>> diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c >>>> index 9c80090aa7..f48d82f051 100644 >>>> --- a/drivers/serial/ns16550.c >>>> +++ b/drivers/serial/ns16550.c >>>> @@ -175,7 +175,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) >>>> ; >>>> >>>> serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier); >>>> -#if defined(CONFIG_ARCH_OMAP2PLUS) >>>> +#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_ARCH_K3) >>>> serial_out(0x7, &com_port->mdr1); /* mode select reset TL16C750*/ >>>> #endif >>>> >>>> @@ -183,7 +183,8 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) >>>> serial_out(ns16550_getfcr(com_port), &com_port->fcr); >>>> if (baud_divisor != -1) >>>> NS16550_setbrg(com_port, baud_divisor); >>>> -#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX) >>>> +#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX) || \ >>>> + defined(CONFIG_ARCH_K3) >>>> /* /16 is proper to hit 115200 with 48MHz */ >>>> serial_out(0, &com_port->mdr1); >>>> #endif >>> >>> K3 would also be using CONFIG_OMAP_SERIAL once >>> https://patchwork.ozlabs.org/patch/956252/ is applied (which I'll do in >>> the next release) yes? I think 956252 needs a follow-up that changes >>> the above hunks to be testing off CONFIG_OMAP_SERIAL instead so this >> >> I did not make this change because ns16550 is also used by non-DM >> platforms. Since OMAP_SERIAL is DM specific, converting this #ifdef to >> OMAP_SERIAL would break non DM platforms. I guess I should still add || >> OMAP_SERIAL. Ill post a v2 for 956252. > > What are the non-DM serial users at this point? > omap4-evm and omap5-uevm are two TI boards which uses non-DM. I am not sure about non-TI boards with omap SoCs. Thanks and regards, Lokesh
On Fri, Aug 24, 2018 at 08:44:50PM +0530, Lokesh Vutla wrote: > > > On Friday 24 August 2018 08:25 PM, Tom Rini wrote: > > On Fri, Aug 24, 2018 at 08:21:19PM +0530, Lokesh Vutla wrote: > >> > >> > >> On Friday 24 August 2018 07:40 PM, Tom Rini wrote: > >>> On Tue, Aug 21, 2018 at 08:00:48PM +0530, Lokesh Vutla wrote: > >>> > >>>> Add support for Texas Instruments' K3 Generation Processor > >>>> families. > >>> [snip] > >>>> diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c > >>>> index 9c80090aa7..f48d82f051 100644 > >>>> --- a/drivers/serial/ns16550.c > >>>> +++ b/drivers/serial/ns16550.c > >>>> @@ -175,7 +175,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) > >>>> ; > >>>> > >>>> serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier); > >>>> -#if defined(CONFIG_ARCH_OMAP2PLUS) > >>>> +#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_ARCH_K3) > >>>> serial_out(0x7, &com_port->mdr1); /* mode select reset TL16C750*/ > >>>> #endif > >>>> > >>>> @@ -183,7 +183,8 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) > >>>> serial_out(ns16550_getfcr(com_port), &com_port->fcr); > >>>> if (baud_divisor != -1) > >>>> NS16550_setbrg(com_port, baud_divisor); > >>>> -#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX) > >>>> +#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX) || \ > >>>> + defined(CONFIG_ARCH_K3) > >>>> /* /16 is proper to hit 115200 with 48MHz */ > >>>> serial_out(0, &com_port->mdr1); > >>>> #endif > >>> > >>> K3 would also be using CONFIG_OMAP_SERIAL once > >>> https://patchwork.ozlabs.org/patch/956252/ is applied (which I'll do in > >>> the next release) yes? I think 956252 needs a follow-up that changes > >>> the above hunks to be testing off CONFIG_OMAP_SERIAL instead so this > >> > >> I did not make this change because ns16550 is also used by non-DM > >> platforms. Since OMAP_SERIAL is DM specific, converting this #ifdef to > >> OMAP_SERIAL would break non DM platforms. I guess I should still add || > >> OMAP_SERIAL. Ill post a v2 for 956252. > > > > What are the non-DM serial users at this point? > > > > omap4-evm and omap5-uevm are two TI boards which uses non-DM. I am not > sure about non-TI boards with omap SoCs. OK. I guess please just make sure updating omap4/5 are on your TODO list somewhere, thanks!
diff --git a/Kconfig b/Kconfig index db0f545e45..04ffc26753 100644 --- a/Kconfig +++ b/Kconfig @@ -447,7 +447,7 @@ config SYS_EXTRA_OPTIONS config SYS_TEXT_BASE depends on !NIOS2 && !XTENSA depends on !EFI_APP - default 0x80800000 if ARCH_OMAP2PLUS + default 0x80800000 if ARCH_OMAP2PLUS || ARCH_K3 default 0x4a000000 if ARCH_SUNXI && !MACH_SUN9I && !MACH_SUN8I_V3S default 0x2a000000 if ARCH_SUNXI && MACH_SUN9I default 0x42e00000 if ARCH_SUNXI && MACH_SUN8I_V3S diff --git a/MAINTAINERS b/MAINTAINERS index 8f237128b2..1971197ec0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -272,6 +272,7 @@ M: Tom Rini <trini@konsulko.com> S: Maintained T: git git://git.denx.de/u-boot-ti.git F: arch/arm/mach-davinci/ +F: arch/arm/mach-k3/ F: arch/arm/mach-keystone/ F: arch/arm/include/asm/arch-omap*/ F: arch/arm/include/asm/ti-common/ diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 63ec02403a..deed8103de 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -646,6 +646,12 @@ config ARCH_KEYSTONE imply CMD_SAVES imply FIT +config ARCH_K3 + bool "Texas Instruments' K3 Architecture" + select SPL + select SUPPORT_SPL + select FIT + config ARCH_OMAP2PLUS bool "TI OMAP2+" select CPU_V7A @@ -1377,6 +1383,8 @@ source "arch/arm/mach-highbank/Kconfig" source "arch/arm/mach-integrator/Kconfig" +source "arch/arm/mach-k3/Kconfig" + source "arch/arm/mach-keystone/Kconfig" source "arch/arm/mach-kirkwood/Kconfig" diff --git a/arch/arm/Makefile b/arch/arm/Makefile index cac58bdc4d..cbcb357f3d 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -58,6 +58,7 @@ machine-$(CONFIG_ARCH_BCMSTB) += bcmstb machine-$(CONFIG_ARCH_DAVINCI) += davinci machine-$(CONFIG_ARCH_EXYNOS) += exynos machine-$(CONFIG_ARCH_HIGHBANK) += highbank +machine-$(CONFIG_ARCH_K3) += k3 machine-$(CONFIG_ARCH_KEYSTONE) += keystone # TODO: rename CONFIG_KIRKWOOD -> CONFIG_ARCH_KIRKWOOD machine-$(CONFIG_KIRKWOOD) += kirkwood diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig new file mode 100644 index 0000000000..552b84923e --- /dev/null +++ b/arch/arm/mach-k3/Kconfig @@ -0,0 +1,12 @@ +if ARCH_K3 + +choice + prompt "Texas Instruments' K3 based SoC select" + optional + +endchoice + +config SYS_SOC + default "k3" + +endif diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 0ad1e049a9..11c2c0133f 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -171,7 +171,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR default 0x140 if ARCH_MVEBU default 0x200 if ARCH_SOCFPGA || ARCH_AT91 default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \ - OMAP54XX || AM33XX || AM43XX + OMAP54XX || AM33XX || AM43XX || ARCH_K3 default 0x4000 if ARCH_ROCKCHIP help Address on the MMC to load U-Boot from, when the MMC is being used diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 9c80090aa7..f48d82f051 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -175,7 +175,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) ; serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier); -#if defined(CONFIG_ARCH_OMAP2PLUS) +#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_ARCH_K3) serial_out(0x7, &com_port->mdr1); /* mode select reset TL16C750*/ #endif @@ -183,7 +183,8 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) serial_out(ns16550_getfcr(com_port), &com_port->fcr); if (baud_divisor != -1) NS16550_setbrg(com_port, baud_divisor); -#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX) +#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX) || \ + defined(CONFIG_ARCH_K3) /* /16 is proper to hit 115200 with 48MHz */ serial_out(0, &com_port->mdr1); #endif
Add support for Texas Instruments' K3 Generation Processor families. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> --- Kconfig | 2 +- MAINTAINERS | 1 + arch/arm/Kconfig | 8 ++++++++ arch/arm/Makefile | 1 + arch/arm/mach-k3/Kconfig | 12 ++++++++++++ common/spl/Kconfig | 2 +- drivers/serial/ns16550.c | 5 +++-- 7 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-k3/Kconfig