ARM: initial Tegra support
Subsystems (3)
v2 cover ARM: initial Tegra support
This series make possible to run barebox on the Toshiba AC100 smartbook. The smartbook is based on Tegra2 chipset.
This patches are very preliminary and lack many important things such mmu&cache support and clocksource programming;
so to start barebox you need u-boot for hardware initialisation.
U-Boot for Toshiba AC100:
https://github.com/chpec/uboot-ac100.git
Linux for Toshiba AC100:
git://gitorious.org/~marvin24/ac100/marvin24s-kernel.git
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
RFC PATCH v2 1/6 ARM: initial Tegra support
--- arch/arm/Kconfig | 6 + arch/arm/Makefile | 1 + arch/arm/mach-tegra/Kconfig | 7 + arch/arm/mach-tegra/Makefile | 2 + arch/arm/mach-tegra/clock.c | 59 ++++++ arch/arm/mach-tegra/include/mach/debug_ll.h | 44 ++++ arch/arm/mach-tegra/include/mach/iomap.h | 292 +++++++++++++++++++++++++++ arch/arm/mach-tegra/reset.c | 43 ++++ 8 files changed, 454 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-tegra/Kconfig create mode 100644 arch/arm/mach-tegra/Makefile create mode 100644 arch/arm/mach-tegra/clock.c create mode 100644 arch/arm/mach-tegra/include/mach/debug_ll.h create mode 100644 arch/arm/mach-tegra/include/mach/iomap.h create mode 100644 arch/arm/mach-tegra/reset.c
arch/arm/Kconfig +6 -0
@@ -71,6 +71,11 @@ config ARCH_VERSATILE bool "ARM Versatile boards (ARM926EJ-S)" select CPU_ARM926T +config ARCH_TEGRA + bool "Nvidia Tegra-based boards" + select CPU_ARM926T + select HAS_DEBUG_LL + endchoice source arch/arm/cpu/Kconfig
@@ -83,6 +88,7 @@ source arch/arm/mach-nomadik/Kconfig source arch/arm/mach-omap/Kconfig source arch/arm/mach-s3c24xx/Kconfig source arch/arm/mach-versatile/Kconfig +source arch/arm/mach-tegra/Kconfig config ARM_ASM_UNIFIED bool
arch/arm/Makefile +1 -0
@@ -52,6 +52,7 @@ machine-$(CONFIG_ARCH_NETX) := netx machine-$(CONFIG_ARCH_OMAP) := omap machine-$(CONFIG_ARCH_S3C24xx) := s3c24xx machine-$(CONFIG_ARCH_VERSATILE) := versatile +machine-$(CONFIG_ARCH_TEGRA) := tegra # Board directory name. This list is sorted alphanumerically # by CONFIG_* macro name.
arch/arm/mach-tegra/Kconfig new file +7 -0
@@ -0,0 +1,7 @@ +if ARCH_TEGRA + +config ARCH_TEXT_BASE + hex + default 0x31fc0000 + +endif
arch/arm/mach-tegra/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-y += clock.o +obj-y += reset.o
arch/arm/mach-tegra/clock.c new file +59 -0
59 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/debug_ll.h new file +44 -0
44 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/iomap.h new file +292 -0
292 lines not on this page · raw message
arch/arm/mach-tegra/reset.c new file +43 -0
43 lines not on this page · raw message
Signature · 7 lines
1.7.7 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
RFC PATCH v2 2/6 dirty hack, fixme: disable mmu_cache_flush in arch/arm/cpu/start.c for Tegra
In reply to Antony PavlovInitial Tegra support has no initialisation routines, so it can't initialise the caches in the right way.
MMU & cache code in arch/arm/cpu/start.c hangs up a Tegra-based system.
--- arch/arm/cpu/start.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/cpu/start.c +3 -0
@@ -74,6 +74,8 @@ void __naked __bare_init reset(void)#ifdef CONFIG_ARCH_HAS_LOWLEVEL_INIT arch_init_lowlevel ();#endif + +#ifndef CONFIG_ARCH_TEGRA __asm__ __volatile__ ("bl __mmu_cache_flush;" :
@@ -89,6 +91,7 @@ void __naked __bare_init reset(void) r |=CR_B ;#endif set_cr (r); +#endif #ifdef CONFIG_MACH_DO_LOWLEVEL_INIT board_init_lowlevel ();
Signature · 7 lines
1.7.7 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
RFC PATCH v2 3/6 ARM: Tegra: add Toshiba AC100 support
In reply to Antony Pavlov--- arch/arm/Makefile | 1 + arch/arm/boards/toshiba-ac100/Kconfig | 9 ++++++ arch/arm/boards/toshiba-ac100/Makefile | 2 + arch/arm/boards/toshiba-ac100/board.c | 34 +++++++++++++++++++++++++ arch/arm/boards/toshiba-ac100/config.h | 5 +++ arch/arm/boards/toshiba-ac100/serial.c | 43 ++++++++++++++++++++++++++++++++ arch/arm/mach-tegra/Kconfig | 12 +++++++++ 7 files changed, 106 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boards/toshiba-ac100/Kconfig create mode 100644 arch/arm/boards/toshiba-ac100/Makefile create mode 100644 arch/arm/boards/toshiba-ac100/board.c create mode 100644 arch/arm/boards/toshiba-ac100/config.h create mode 100644 arch/arm/boards/toshiba-ac100/serial.c
arch/arm/Makefile +1 -0
@@ -111,6 +111,7 @@ board-$(CONFIG_MACH_USB_A9263) := usb-a926x board-$(CONFIG_MACH_USB_A9G20) := usb-a926x board-$(CONFIG_MACH_VERSATILEPB) := versatile board-$(CONFIG_MACH_TX25) := karo-tx25 +board-$(CONFIG_MACH_TOSHIBA_AC100) := toshiba-ac100 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
arch/arm/boards/toshiba-ac100/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +if MACH_TOSHIBA_AC100 + +config ARCH_TEXT_BASE + hex + default 0x01000000 + +config BOARDINFO + default "Toshiba AC100 (Tegra2)" +endif
arch/arm/boards/toshiba-ac100/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-y += board.o +obj-$(CONFIG_DRIVER_SERIAL_NS16550) += serial.o
arch/arm/boards/toshiba-ac100/board.c new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Copyright (C) 2011 Antony Pavlov <[email protected]> +* +* This file is part of barebox. +* See file CREDITS for list of people who contributed to this project. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 +* as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include <common.h> +#include <types.h> +#include <driver.h> +#include <init.h> +#include <asm/armlinux.h> +#include <sizes.h> + +static int ac100_mem_init (void ) +{ +arm_add_mem_device ("ram0" ,0x0 ,SZ_512M ); + +return 0 ; +} +mem_initcall (ac100_mem_init);
arch/arm/boards/toshiba-ac100/config.h new file +5 -0
@@ -0,0 +1,5 @@ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#endif /* __CONFIG_H */
arch/arm/boards/toshiba-ac100/serial.c new file +43 -0
43 lines not on this page · raw message
arch/arm/mach-tegra/Kconfig +12 -0
@@ -4,4 +4,16 @@ config ARCH_TEXT_BASE hex default 0x31fc0000 +choice + prompt "Tegra Board Type" + +config MACH_TOSHIBA_AC100 + bool "Toshiba AC100" + help + Say Y here if you are using Toshiba AC100 smartbook. + +endchoice + +source arch/arm/boards/toshiba-ac100/Kconfig + endif
Signature · 7 lines
1.7.7 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
RFC PATCH v2 4/6 toshiba-ac100: add USB host support
In reply to Antony Pavlov--- arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)
arch/arm/boards/toshiba-ac100/board.c +18 -0
@@ -24,6 +24,8 @@#include <init.h> #include <asm/armlinux.h> #include <sizes.h> +#include <usb/ehci.h> +#include <mach/iomap.h> static int ac100_mem_init (void ) {
@@ -32,3 +34,19 @@ static int ac100_mem_init(void)return 0 ; }mem_initcall (ac100_mem_init); + +#ifdef CONFIG_USB_EHCI +static struct ehci_platform_data ehci_pdata = { + .flags =EHCI_HAS_TT , +}; +#endif + +static int ac100_devices_init (void ) +{ +#ifdef CONFIG_USB_EHCI +add_generic_usb_ehci_device (-1 ,TEGRA_USB3_BASE , &ehci_pdata); +#endif + +return 0 ; +} +device_initcall (ac100_devices_init);
Signature · 7 lines
1.7.7 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
RFC PATCH v2 5/6 USB: set MAXINTERFACES=16, so Toshiba AC100 works correctly
In reply to Antony Pavlov--- include/usb/usb.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/usb/usb.h +1 -1
@@ -38,7 +38,7 @@#define USB_MAX_DEVICE 32#define USB_MAXCONFIG 8 -#define USB_MAXINTERFACES 8 +#define USB_MAXINTERFACES 16#define USB_MAXENDPOINTS 16#define USB_MAXCHILDREN 8/* This is arbitrary */ #define USB_MAX_HUB 16
Signature · 7 lines
1.7.7 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
RFC PATCH v2 6/6 add toshiba_ac100_defconfig
In reply to Antony Pavlov--- arch/arm/configs/toshiba_ac100_defconfig | 49 ++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) create mode 100644 arch/arm/configs/toshiba_ac100_defconfig
arch/arm/configs/toshiba_ac100_defconfig new file +49 -0
@@ -0,0 +1,49 @@ +CONFIG_ARCH_TEGRA=y +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y +CONFIG_TEXT_BASE=0x01000000 +CONFIG_BROKEN=y +CONFIG_EXPERIMENTAL=y +CONFIG_PROMPT="toshiba ac100> " +CONFIG_LONGHELP=y +CONFIG_CMDLINE_EDITING=y +CONFIG_AUTO_COMPLETE=y +# CONFIG_ERRNO_MESSAGES is not set +# CONFIG_DEFAULT_ENVIRONMENT is not set +CONFIG_POLLER=y +CONFIG_ENABLE_DEVICE_NOISE=y +CONFIG_CMD_SLEEP=y +# CONFIG_CMD_TRUE is not set +# CONFIG_CMD_FALSE is not set +# CONFIG_CMD_CLEAR is not set +# CONFIG_CMD_ECHO is not set +CONFIG_CMD_LOADB=y +CONFIG_CMD_LOADY=y +CONFIG_CMD_LOADS=y +CONFIG_CMD_MEMINFO=y +CONFIG_CMD_MD5SUM=y +CONFIG_CMD_SHA1SUM=y +CONFIG_CMD_BOOTM_ZLIB=y +CONFIG_CMD_BOOTM_SHOW_TYPE=y +CONFIG_CMD_RESET=y +CONFIG_CMD_GO=y +CONFIG_CMD_I2C=y +CONFIG_NET=y +CONFIG_NET_DHCP=y +CONFIG_NET_PING=y +CONFIG_NET_TFTP=y +CONFIG_NET_TFTP_PUSH=y +CONFIG_NET_NETCONSOLE=y +CONFIG_DRIVER_SERIAL_NS16550=y +CONFIG_NET_USB=y +CONFIG_NET_USB_ASIX=y +# CONFIG_SPI is not set +CONFIG_I2C=y +CONFIG_I2C_TEGRA=y +CONFIG_ATA=y +CONFIG_ATA_DISK=y +CONFIG_USB=y +CONFIG_USB_EHCI=y +CONFIG_USB_STORAGE=y +CONFIG_VIDEO=y +CONFIG_DRIVER_VIDEO_FB_TEGRA_DUMMY=y +CONFIG_FS_FAT=y
Signature · 7 lines
1.7.7 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox