* [PATCH v20120528 0/5] ARM: initial Tegra support
@ 2012-05-28 8:12 Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 1/5] " Antony Pavlov
` (4 more replies)
0 siblings, 5 replies; 12+ messages in thread
From: Antony Pavlov @ 2012-05-28 8:12 UTC (permalink / raw)
To: barebox
This patch series adds initial NVidia Tegra SoC support.
Also it introduces Tegra 250-based Toshiba AC100 netbook support.
Barebox can start from U-Boot only.
[PATCH v20120528 1/5] ARM: initial Tegra support
[PATCH v20120528 2/5] ARM: Tegra: add Toshiba AC100 support
[PATCH v20120528 3/5] usb: set MAXINTERFACES = 16
[PATCH v20120528 4/5] toshiba-ac100: add USB host support
[PATCH v20120528 5/5] toshiba_ac100: add defconfig
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v20120528 1/5] ARM: initial Tegra support
2012-05-28 8:12 [PATCH v20120528 0/5] ARM: initial Tegra support Antony Pavlov
@ 2012-05-28 8:12 ` Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 2/5] ARM: Tegra: add Toshiba AC100 support Antony Pavlov
` (3 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: Antony Pavlov @ 2012-05-28 8:12 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
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 | 45 +++++
arch/arm/mach-tegra/include/mach/iomap.h | 292 +++++++++++++++++++++++++++
arch/arm/mach-tegra/reset.c | 42 ++++
8 files changed, 454 insertions(+)
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
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index f465084..3eada5b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -83,6 +83,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
@@ -96,6 +101,7 @@ source arch/arm/mach-omap/Kconfig
source arch/arm/mach-pxa/Kconfig
source arch/arm/mach-samsung/Kconfig
source arch/arm/mach-versatile/Kconfig
+source arch/arm/mach-tegra/Kconfig
config ARM_ASM_UNIFIED
bool
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 40291aa..ddff124 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -61,6 +61,7 @@ machine-$(CONFIG_ARCH_OMAP) := omap
machine-$(CONFIG_ARCH_PXA) := pxa
machine-$(CONFIG_ARCH_SAMSUNG) := samsung
machine-$(CONFIG_ARCH_VERSATILE) := versatile
+machine-$(CONFIG_ARCH_TEGRA) := tegra
# Board directory name. This list is sorted alphanumerically
# by CONFIG_* macro name.
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
new file mode 100644
index 0000000..b0cc3cd
--- /dev/null
+++ b/arch/arm/mach-tegra/Kconfig
@@ -0,0 +1,7 @@
+if ARCH_TEGRA
+
+config ARCH_TEXT_BASE
+ hex
+ default 0x31fc0000
+
+endif
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile
new file mode 100644
index 0000000..11915e5
--- /dev/null
+++ b/arch/arm/mach-tegra/Makefile
@@ -0,0 +1,2 @@
+obj-y += clock.o
+obj-y += reset.o
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
new file mode 100644
index 0000000..0881698
--- /dev/null
+++ b/arch/arm/mach-tegra/clock.c
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * 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
+ */
+
+/**
+ * @file
+ * @brief Clocksource based on Tegra internal timer
+ */
+
+#include <common.h>
+#include <clock.h>
+#include <linux/list.h>
+#include <linux/clk.h>
+#include <init.h>
+#include <asm/io.h>
+#include <mach/iomap.h>
+
+static void __iomem *timer_reg_base = (void __iomem *) (TEGRA_TMR1_BASE);
+
+#define timer_writel(value, reg) \
+ __raw_writel(value, (u32)timer_reg_base + (reg))
+#define timer_readl(reg) \
+ __raw_readl((u32)timer_reg_base + (reg))
+
+static uint64_t tegra_clocksource_read(void)
+{
+ return timer_readl(0x10);
+}
+
+static struct clocksource cs = {
+ .read = tegra_clocksource_read,
+ .mask = 0xffffffff,
+};
+
+/* FIXME: here we have no initialization. All initialization made by U-Boot */
+static int clocksource_init(void)
+{
+ cs.mult = clocksource_hz2mult(1000000, cs.shift);
+ init_clock(&cs);
+
+ return 0;
+}
+core_initcall(clocksource_init);
diff --git a/arch/arm/mach-tegra/include/mach/debug_ll.h b/arch/arm/mach-tegra/include/mach/debug_ll.h
new file mode 100644
index 0000000..bc7801a
--- /dev/null
+++ b/arch/arm/mach-tegra/include/mach/debug_ll.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * 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
+ */
+
+/** @file
+ * This File contains declaration for early output support
+ */
+#ifndef __INCLUDE_ARCH_DEBUG_LL_H__
+#define __INCLUDE_ARCH_DEBUG_LL_H__
+
+#include <asm/io.h>
+#include <mach/iomap.h>
+
+#define DEBUG_LL_UART_ADDR TEGRA_UARTA_BASE
+#define DEBUG_LL_UART_RSHFT 2
+
+#define rbr (0 << DEBUG_LL_UART_RSHFT)
+#define lsr (5 << DEBUG_LL_UART_RSHFT)
+#define LSR_THRE 0x20 /* Xmit holding register empty */
+
+static inline void putc(char ch)
+{
+ while (!(__raw_readb(DEBUG_LL_UART_ADDR + lsr) & LSR_THRE))
+ ;
+
+ __raw_writeb(ch, DEBUG_LL_UART_ADDR + rbr);
+}
+
+#endif /* __INCLUDE_ARCH_DEBUG_LL_H__ */
diff --git a/arch/arm/mach-tegra/include/mach/iomap.h b/arch/arm/mach-tegra/include/mach/iomap.h
new file mode 100644
index 0000000..ba478e7
--- /dev/null
+++ b/arch/arm/mach-tegra/include/mach/iomap.h
@@ -0,0 +1,292 @@
+/*
+ * arch/arm/mach-tegra/include/mach/iomap.h
+ *
+ * Copyright (C) 2010 Google, Inc.
+ *
+ * Author:
+ * Colin Cross <ccross@google.com>
+ * Erik Gilling <konkers@google.com>
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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.
+ *
+ */
+
+#ifndef __MACH_TEGRA_IOMAP_H
+#define __MACH_TEGRA_IOMAP_H
+
+#include <sizes.h>
+
+#define TEGRA_IRAM_BASE 0x40000000
+#define TEGRA_IRAM_SIZE SZ_256K
+
+#define TEGRA_HOST1X_BASE 0x50000000
+#define TEGRA_HOST1X_SIZE 0x24000
+
+#define TEGRA_ARM_PERIF_BASE 0x50040000
+#define TEGRA_ARM_PERIF_SIZE SZ_8K
+
+#define TEGRA_ARM_PL310_BASE 0x50043000
+#define TEGRA_ARM_PL310_SIZE SZ_4K
+
+#define TEGRA_ARM_INT_DIST_BASE 0x50041000
+#define TEGRA_ARM_INT_DIST_SIZE SZ_4K
+
+#define TEGRA_MPE_BASE 0x54040000
+#define TEGRA_MPE_SIZE SZ_256K
+
+#define TEGRA_VI_BASE 0x54080000
+#define TEGRA_VI_SIZE SZ_256K
+
+#define TEGRA_ISP_BASE 0x54100000
+#define TEGRA_ISP_SIZE SZ_256K
+
+#define TEGRA_DISPLAY_BASE 0x54200000
+#define TEGRA_DISPLAY_SIZE SZ_256K
+
+#define TEGRA_DISPLAY2_BASE 0x54240000
+#define TEGRA_DISPLAY2_SIZE SZ_256K
+
+#define TEGRA_HDMI_BASE 0x54280000
+#define TEGRA_HDMI_SIZE SZ_256K
+
+#define TEGRA_GART_BASE 0x58000000
+#define TEGRA_GART_SIZE SZ_32M
+
+#define TEGRA_RES_SEMA_BASE 0x60001000
+#define TEGRA_RES_SEMA_SIZE SZ_4K
+
+#define TEGRA_HDMI_BASE 0x54280000
+#define TEGRA_HDMI_SIZE SZ_256K
+
+#define TEGRA_GART_BASE 0x58000000
+#define TEGRA_GART_SIZE SZ_32M
+
+#define TEGRA_RES_SEMA_BASE 0x60001000
+#define TEGRA_RES_SEMA_SIZE SZ_4K
+
+#define TEGRA_ARB_SEMA_BASE 0x60002000
+#define TEGRA_ARB_SEMA_SIZE SZ_4K
+
+#define TEGRA_PRIMARY_ICTLR_BASE 0x60004000
+#define TEGRA_PRIMARY_ICTLR_SIZE 64
+
+#define TEGRA_ARBGNT_ICTLR_BASE 0x60004040
+#define TEGRA_ARBGNT_ICTLR_SIZE 192
+
+#define TEGRA_SECONDARY_ICTLR_BASE 0x60004100
+#define TEGRA_SECONDARY_ICTLR_SIZE 64
+
+#define TEGRA_TERTIARY_ICTLR_BASE 0x60004200
+#define TEGRA_TERTIARY_ICTLR_SIZE 64
+
+#define TEGRA_QUATERNARY_ICTLR_BASE 0x60004300
+#define TEGRA_QUATERNARY_ICTLR_SIZE 64
+
+#define TEGRA_TMR1_BASE 0x60005000
+#define TEGRA_TMR1_SIZE 8
+
+#define TEGRA_TMR2_BASE 0x60005008
+#define TEGRA_TMR2_SIZE 8
+
+#define TEGRA_TMRUS_BASE 0x60005010
+#define TEGRA_TMRUS_SIZE 64
+
+#define TEGRA_TMR3_BASE 0x60005050
+#define TEGRA_TMR3_SIZE 8
+
+#define TEGRA_TMR4_BASE 0x60005058
+#define TEGRA_TMR4_SIZE 8
+
+#define TEGRA_CLK_RESET_BASE 0x60006000
+#define TEGRA_CLK_RESET_SIZE SZ_4K
+
+#define TEGRA_FLOW_CTRL_BASE 0x60007000
+#define TEGRA_FLOW_CTRL_SIZE 20
+
+#define TEGRA_AHB_DMA_BASE 0x60008000
+#define TEGRA_AHB_DMA_SIZE SZ_4K
+
+#define TEGRA_AHB_DMA_CH0_BASE 0x60009000
+#define TEGRA_AHB_DMA_CH0_SIZE 32
+
+#define TEGRA_APB_DMA_BASE 0x6000A000
+#define TEGRA_APB_DMA_SIZE SZ_4K
+
+#define TEGRA_APB_DMA_CH0_BASE 0x6000B000
+#define TEGRA_APB_DMA_CH0_SIZE 32
+
+#define TEGRA_AHB_GIZMO_BASE 0x6000C004
+#define TEGRA_AHB_GIZMO_SIZE 0x10C
+
+#define TEGRA_STATMON_BASE 0x6000C400
+#define TEGRA_STATMON_SIZE SZ_1K
+
+#define TEGRA_GPIO_BASE 0x6000D000
+#define TEGRA_GPIO_SIZE SZ_4K
+
+#define TEGRA_EXCEPTION_VECTORS_BASE 0x6000F000
+#define TEGRA_EXCEPTION_VECTORS_SIZE SZ_4K
+
+#define TEGRA_VDE_BASE 0x6001A000
+#define TEGRA_VDE_SIZE (SZ_8K + SZ_4K - SZ_256)
+
+#define TEGRA_APB_MISC_BASE 0x70000000
+#define TEGRA_APB_MISC_SIZE SZ_4K
+
+#define TEGRA_APB_MISC_DAS_BASE 0x70000c00
+#define TEGRA_APB_MISC_DAS_SIZE SZ_128
+
+#define TEGRA_AC97_BASE 0x70002000
+#define TEGRA_AC97_SIZE SZ_512
+
+#define TEGRA_SPDIF_BASE 0x70002400
+#define TEGRA_SPDIF_SIZE SZ_512
+
+#define TEGRA_I2S1_BASE 0x70002800
+#define TEGRA_I2S1_SIZE SZ_256
+
+#define TEGRA_I2S2_BASE 0x70002A00
+#define TEGRA_I2S2_SIZE SZ_256
+
+#define TEGRA_UARTA_BASE 0x70006000
+#define TEGRA_UARTA_SIZE 64
+
+#define TEGRA_UARTB_BASE 0x70006040
+#define TEGRA_UARTB_SIZE 64
+
+#define TEGRA_UARTC_BASE 0x70006200
+#define TEGRA_UARTC_SIZE SZ_256
+
+#define TEGRA_UARTD_BASE 0x70006300
+#define TEGRA_UARTD_SIZE SZ_256
+
+#define TEGRA_UARTE_BASE 0x70006400
+#define TEGRA_UARTE_SIZE SZ_256
+
+#define TEGRA_NAND_BASE 0x70008000
+#define TEGRA_NAND_SIZE SZ_256
+
+#define TEGRA_HSMMC_BASE 0x70008500
+#define TEGRA_HSMMC_SIZE SZ_256
+
+#define TEGRA_SNOR_BASE 0x70009000
+#define TEGRA_SNOR_SIZE SZ_4K
+
+#define TEGRA_PWFM_BASE 0x7000A000
+#define TEGRA_PWFM_SIZE SZ_256
+
+#define TEGRA_PWFM0_BASE 0x7000A000
+#define TEGRA_PWFM0_SIZE 4
+
+#define TEGRA_PWFM1_BASE 0x7000A010
+#define TEGRA_PWFM1_SIZE 4
+
+#define TEGRA_PWFM2_BASE 0x7000A020
+#define TEGRA_PWFM2_SIZE 4
+
+#define TEGRA_PWFM3_BASE 0x7000A030
+#define TEGRA_PWFM3_SIZE 4
+
+#define TEGRA_MIPI_BASE 0x7000B000
+#define TEGRA_MIPI_SIZE SZ_256
+
+#define TEGRA_I2C_BASE 0x7000C000
+#define TEGRA_I2C_SIZE SZ_256
+
+#define TEGRA_TWC_BASE 0x7000C100
+#define TEGRA_TWC_SIZE SZ_256
+
+#define TEGRA_SPI_BASE 0x7000C380
+#define TEGRA_SPI_SIZE 48
+
+#define TEGRA_I2C2_BASE 0x7000C400
+#define TEGRA_I2C2_SIZE SZ_256
+
+#define TEGRA_I2C3_BASE 0x7000C500
+#define TEGRA_I2C3_SIZE SZ_256
+
+#define TEGRA_OWR_BASE 0x7000C600
+#define TEGRA_OWR_SIZE 80
+
+#define TEGRA_DVC_BASE 0x7000D000
+#define TEGRA_DVC_SIZE SZ_512
+
+#define TEGRA_SPI1_BASE 0x7000D400
+#define TEGRA_SPI1_SIZE SZ_512
+
+#define TEGRA_SPI2_BASE 0x7000D600
+#define TEGRA_SPI2_SIZE SZ_512
+
+#define TEGRA_SPI3_BASE 0x7000D800
+#define TEGRA_SPI3_SIZE SZ_512
+
+#define TEGRA_SPI4_BASE 0x7000DA00
+#define TEGRA_SPI4_SIZE SZ_512
+
+#define TEGRA_RTC_BASE 0x7000E000
+#define TEGRA_RTC_SIZE SZ_256
+
+#define TEGRA_KBC_BASE 0x7000E200
+#define TEGRA_KBC_SIZE SZ_256
+
+#define TEGRA_PMC_BASE 0x7000E400
+#define TEGRA_PMC_SIZE SZ_256
+
+#define TEGRA_MC_BASE 0x7000F000
+#define TEGRA_MC_SIZE SZ_1K
+
+#define TEGRA_EMC_BASE 0x7000F400
+#define TEGRA_EMC_SIZE SZ_1K
+
+#define TEGRA_FUSE_BASE 0x7000F800
+#define TEGRA_FUSE_SIZE SZ_1K
+
+#define TEGRA_KFUSE_BASE 0x7000FC00
+#define TEGRA_KFUSE_SIZE SZ_1K
+
+#define TEGRA_CSITE_BASE 0x70040000
+#define TEGRA_CSITE_SIZE SZ_256K
+
+#define TEGRA_USB_BASE 0xC5000000
+#define TEGRA_USB_SIZE SZ_16K
+
+#define TEGRA_USB2_BASE 0xC5004000
+#define TEGRA_USB2_SIZE SZ_16K
+
+#define TEGRA_USB3_BASE 0xC5008000
+#define TEGRA_USB3_SIZE SZ_16K
+
+#define TEGRA_SDMMC1_BASE 0xC8000000
+#define TEGRA_SDMMC1_SIZE SZ_512
+
+#define TEGRA_SDMMC2_BASE 0xC8000200
+#define TEGRA_SDMMC2_SIZE SZ_512
+
+#define TEGRA_SDMMC3_BASE 0xC8000400
+#define TEGRA_SDMMC3_SIZE SZ_512
+
+#define TEGRA_SDMMC4_BASE 0xC8000600
+#define TEGRA_SDMMC4_SIZE SZ_512
+
+#if defined(CONFIG_TEGRA_DEBUG_UART_NONE)
+# define TEGRA_DEBUG_UART_BASE 0
+#elif defined(CONFIG_TEGRA_DEBUG_UARTA)
+# define TEGRA_DEBUG_UART_BASE TEGRA_UARTA_BASE
+#elif defined(CONFIG_TEGRA_DEBUG_UARTB)
+# define TEGRA_DEBUG_UART_BASE TEGRA_UARTB_BASE
+#elif defined(CONFIG_TEGRA_DEBUG_UARTC)
+# define TEGRA_DEBUG_UART_BASE TEGRA_UARTC_BASE
+#elif defined(CONFIG_TEGRA_DEBUG_UARTD)
+# define TEGRA_DEBUG_UART_BASE TEGRA_UARTD_BASE
+#elif defined(CONFIG_TEGRA_DEBUG_UARTE)
+# define TEGRA_DEBUG_UART_BASE TEGRA_UARTE_BASE
+#endif
+
+#endif
diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c
new file mode 100644
index 0000000..4dd7593
--- /dev/null
+++ b/arch/arm/mach-tegra/reset.c
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * 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
+ */
+
+/**
+ * @file
+ * @brief Resetting an malta board
+ */
+
+#include <common.h>
+#include <asm/io.h>
+#include <mach/iomap.h>
+
+#define PRM_RSTCTRL TEGRA_PMC_BASE
+
+void __noreturn reset_cpu(ulong addr)
+{
+ int rstctrl;
+
+ rstctrl = __raw_readl((char *)PRM_RSTCTRL);
+ rstctrl |= 0x10;
+ __raw_writel(rstctrl, (char *)PRM_RSTCTRL);
+
+ unreachable();
+}
+EXPORT_SYMBOL(reset_cpu);
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v20120528 2/5] ARM: Tegra: add Toshiba AC100 support
2012-05-28 8:12 [PATCH v20120528 0/5] ARM: initial Tegra support Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 1/5] " Antony Pavlov
@ 2012-05-28 8:12 ` Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 3/5] usb: set MAXINTERFACES = 16 Antony Pavlov
` (2 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: Antony Pavlov @ 2012-05-28 8:12 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
Documentation/boards.dox | 1 +
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/boards/toshiba-ac100/toshiba-ac100.dox | 37 +++++++++++++++++++
arch/arm/mach-tegra/Kconfig | 12 +++++++
9 files changed, 144 insertions(+)
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
create mode 100644 arch/arm/boards/toshiba-ac100/toshiba-ac100.dox
diff --git a/Documentation/boards.dox b/Documentation/boards.dox
index 7fcba9c..5241f5b 100644
--- a/Documentation/boards.dox
+++ b/Documentation/boards.dox
@@ -37,6 +37,7 @@ ARM type:
@li @subpage edb9315a
@li @subpage board_cupid
@li @subpage phycard-a-l1
+@li @subpage toshiba-ac100
Blackfin type:
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index ddff124..2407b69 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -134,6 +134,7 @@ board-$(CONFIG_MACH_TX25) := karo-tx25
board-$(CONFIG_MACH_TQMA53) := tqma53
board-$(CONFIG_MACH_TX51) := karo-tx51
board-$(CONFIG_MACH_MX6Q_ARM2) := freescale-mx6-arm2
+board-$(CONFIG_MACH_TOSHIBA_AC100) := toshiba-ac100
machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
diff --git a/arch/arm/boards/toshiba-ac100/Kconfig b/arch/arm/boards/toshiba-ac100/Kconfig
new file mode 100644
index 0000000..abba2cc
--- /dev/null
+++ b/arch/arm/boards/toshiba-ac100/Kconfig
@@ -0,0 +1,9 @@
+if MACH_TOSHIBA_AC100
+
+config ARCH_TEXT_BASE
+ hex
+ default 0x01000000
+
+config BOARDINFO
+ default "Toshiba AC100 (Tegra2)"
+endif
diff --git a/arch/arm/boards/toshiba-ac100/Makefile b/arch/arm/boards/toshiba-ac100/Makefile
new file mode 100644
index 0000000..9e14763
--- /dev/null
+++ b/arch/arm/boards/toshiba-ac100/Makefile
@@ -0,0 +1,2 @@
+obj-y += board.o
+obj-$(CONFIG_DRIVER_SERIAL_NS16550) += serial.o
diff --git a/arch/arm/boards/toshiba-ac100/board.c b/arch/arm/boards/toshiba-ac100/board.c
new file mode 100644
index 0000000..e3a5eba
--- /dev/null
+++ b/arch/arm/boards/toshiba-ac100/board.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * 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);
diff --git a/arch/arm/boards/toshiba-ac100/config.h b/arch/arm/boards/toshiba-ac100/config.h
new file mode 100644
index 0000000..25bb18f
--- /dev/null
+++ b/arch/arm/boards/toshiba-ac100/config.h
@@ -0,0 +1,5 @@
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#endif /* __CONFIG_H */
diff --git a/arch/arm/boards/toshiba-ac100/serial.c b/arch/arm/boards/toshiba-ac100/serial.c
new file mode 100644
index 0000000..2ed0e39
--- /dev/null
+++ b/arch/arm/boards/toshiba-ac100/serial.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * 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 <ns16550.h>
+#include <asm/io.h>
+#include <asm/common.h>
+#include <mach/iomap.h>
+
+static struct NS16550_plat serial_plat = {
+ .clock = 0x75 * 115200 * 16 /* MODE_X_DIV */,
+ .shift = 2,
+};
+
+static int ac100_serial_console_init(void)
+{
+ /* Register the serial port */
+ add_ns16550_device(-1, TEGRA_UARTA_BASE, 8 << serial_plat.shift,
+ IORESOURCE_MEM_8BIT, &serial_plat);
+
+ return 0;
+}
+console_initcall(ac100_serial_console_init);
diff --git a/arch/arm/boards/toshiba-ac100/toshiba-ac100.dox b/arch/arm/boards/toshiba-ac100/toshiba-ac100.dox
new file mode 100644
index 0000000..7c50f3c
--- /dev/null
+++ b/arch/arm/boards/toshiba-ac100/toshiba-ac100.dox
@@ -0,0 +1,37 @@
+/** @page toshiba-ac100 Toshiba AC100
+
+Toshiba AC100 is a Tegra2-based netbook.
+
+The netbook has
+@li NVidia Tegra 250 SoC;
+@li 512 MiB DDR2 RAM;
+@li 8 GiB internal e-MMC Flash Memory (some models have 32 GiB);
+@li RS232 serial interface (LV-TTL levels on the board!);
+@li SD card slot;
+@li 2xUSB interface (miniUSB-B and USB-A connectors);
+@li 10" LCD display (1024x600);
+@li HDMI-interface;
+@li touchpad and keyboard connected via I2C; the ENE KB926QF keyboard controller is used;
+@li web camera;
+@li some models have 3G-modem.
+
+U-Boot master branch is working on AC100, but there's no support for the keyboard or the display.
+
+barebox-toshiba-ac100 mini-howto:
+
+1. Connect to the netbook's UART (see http://pecourt.ovh.org/wiki-tegra/doku.php?id=hardware);
+
+2. Start U-Boot loader. See http://ac100.grandou.net/uboot and http://ac100.grandou.net/swarren_brain_dump for details.
+
+3. If you use U-Boot with turned on display support, then switch to serial console:
+@verbatim
+ Tegra2 (ac100) # setenv stdout serial
+@endverbatim
+
+4. Upload barebox.bin via Ymodem and start it:
+@verbatim
+ Tegra2 (ac100) # loady 0x01f00000
+ Tegra2 (ac100) # go 0x01f00000
+@endverbatim
+
+*/
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index b0cc3cd..eda786b 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -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
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v20120528 3/5] usb: set MAXINTERFACES = 16
2012-05-28 8:12 [PATCH v20120528 0/5] ARM: initial Tegra support Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 1/5] " Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 2/5] ARM: Tegra: add Toshiba AC100 support Antony Pavlov
@ 2012-05-28 8:12 ` Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 4/5] toshiba-ac100: add USB host support Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 5/5] toshiba_ac100: add defconfig Antony Pavlov
4 siblings, 0 replies; 12+ messages in thread
From: Antony Pavlov @ 2012-05-28 8:12 UTC (permalink / raw)
To: barebox
Tegra2 needs MAXINTERFACES > 8, so increase the macro's value.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
include/usb/usb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/usb/usb.h b/include/usb/usb.h
index a61a008..296e4e8 100644
--- a/include/usb/usb.h
+++ b/include/usb/usb.h
@@ -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
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v20120528 4/5] toshiba-ac100: add USB host support
2012-05-28 8:12 [PATCH v20120528 0/5] ARM: initial Tegra support Antony Pavlov
` (2 preceding siblings ...)
2012-05-28 8:12 ` [PATCH v20120528 3/5] usb: set MAXINTERFACES = 16 Antony Pavlov
@ 2012-05-28 8:12 ` Antony Pavlov
2012-05-29 8:30 ` Sascha Hauer
2012-05-28 8:12 ` [PATCH v20120528 5/5] toshiba_ac100: add defconfig Antony Pavlov
4 siblings, 1 reply; 12+ messages in thread
From: Antony Pavlov @ 2012-05-28 8:12 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/arm/boards/toshiba-ac100/board.c b/arch/arm/boards/toshiba-ac100/board.c
index e3a5eba..3fd720d 100644
--- a/arch/arm/boards/toshiba-ac100/board.c
+++ b/arch/arm/boards/toshiba-ac100/board.c
@@ -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);
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v20120528 5/5] toshiba_ac100: add defconfig
2012-05-28 8:12 [PATCH v20120528 0/5] ARM: initial Tegra support Antony Pavlov
` (3 preceding siblings ...)
2012-05-28 8:12 ` [PATCH v20120528 4/5] toshiba-ac100: add USB host support Antony Pavlov
@ 2012-05-28 8:12 ` Antony Pavlov
4 siblings, 0 replies; 12+ messages in thread
From: Antony Pavlov @ 2012-05-28 8:12 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/arm/configs/toshiba_ac100_defconfig | 39 ++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 arch/arm/configs/toshiba_ac100_defconfig
diff --git a/arch/arm/configs/toshiba_ac100_defconfig b/arch/arm/configs/toshiba_ac100_defconfig
new file mode 100644
index 0000000..053f53a
--- /dev/null
+++ b/arch/arm/configs/toshiba_ac100_defconfig
@@ -0,0 +1,39 @@
+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_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_SHOW_TYPE=y
+CONFIG_CMD_RESET=y
+CONFIG_CMD_GO=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_USB=y
+CONFIG_USB_EHCI=y
+CONFIG_USB_STORAGE=y
+CONFIG_FS_FAT=y
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v20120528 4/5] toshiba-ac100: add USB host support
2012-05-28 8:12 ` [PATCH v20120528 4/5] toshiba-ac100: add USB host support Antony Pavlov
@ 2012-05-29 8:30 ` Sascha Hauer
2012-05-29 10:37 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 12+ messages in thread
From: Sascha Hauer @ 2012-05-29 8:30 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
On Mon, May 28, 2012 at 12:12:35PM +0400, Antony Pavlov wrote:
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
> arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/arch/arm/boards/toshiba-ac100/board.c b/arch/arm/boards/toshiba-ac100/board.c
> index e3a5eba..3fd720d 100644
> --- a/arch/arm/boards/toshiba-ac100/board.c
> +++ b/arch/arm/boards/toshiba-ac100/board.c
> @@ -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
Better skip the ifdefs. It won't hurt except for a few bytes of wated
space.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v20120528 4/5] toshiba-ac100: add USB host support
2012-05-29 8:30 ` Sascha Hauer
@ 2012-05-29 10:37 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-29 10:42 ` Sascha Hauer
2012-05-29 10:55 ` Antony Pavlov
0 siblings, 2 replies; 12+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-05-29 10:37 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
On 10:30 Tue 29 May , Sascha Hauer wrote:
> On Mon, May 28, 2012 at 12:12:35PM +0400, Antony Pavlov wrote:
> > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> > ---
> > arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++
> > 1 file changed, 18 insertions(+)
> >
> > diff --git a/arch/arm/boards/toshiba-ac100/board.c b/arch/arm/boards/toshiba-ac100/board.c
> > index e3a5eba..3fd720d 100644
> > --- a/arch/arm/boards/toshiba-ac100/board.c
> > +++ b/arch/arm/boards/toshiba-ac100/board.c
> > @@ -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
>
> Better skip the ifdefs. It won't hurt except for a few bytes of wated
> space.
and the -1 need to be a define
btw I think we need to change the auto allocated dev_id to -2 so -1 one have
the same meanning as in the kernel
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v20120528 4/5] toshiba-ac100: add USB host support
2012-05-29 10:37 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-05-29 10:42 ` Sascha Hauer
2012-05-29 15:52 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-29 10:55 ` Antony Pavlov
1 sibling, 1 reply; 12+ messages in thread
From: Sascha Hauer @ 2012-05-29 10:42 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On Tue, May 29, 2012 at 12:37:20PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 10:30 Tue 29 May , Sascha Hauer wrote:
> > On Mon, May 28, 2012 at 12:12:35PM +0400, Antony Pavlov wrote:
> > > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> > > ---
> > > arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++
> > > 1 file changed, 18 insertions(+)
> > >
> > > diff --git a/arch/arm/boards/toshiba-ac100/board.c b/arch/arm/boards/toshiba-ac100/board.c
> > > index e3a5eba..3fd720d 100644
> > > --- a/arch/arm/boards/toshiba-ac100/board.c
> > > +++ b/arch/arm/boards/toshiba-ac100/board.c
> > > @@ -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
> >
> > Better skip the ifdefs. It won't hurt except for a few bytes of wated
> > space.
> and the -1 need to be a define
>
>
> btw I think we need to change the auto allocated dev_id to -2 so -1 one have
> the same meanning as in the kernel
I think we still have hardcoded -1 around.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v20120528 4/5] toshiba-ac100: add USB host support
2012-05-29 10:37 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-29 10:42 ` Sascha Hauer
@ 2012-05-29 10:55 ` Antony Pavlov
1 sibling, 0 replies; 12+ messages in thread
From: Antony Pavlov @ 2012-05-29 10:55 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On 29 May 2012 14:37, Jean-Christophe PLAGNIOL-VILLARD
<plagnioj@jcrosoft.com> wrote:
> On 10:30 Tue 29 May , Sascha Hauer wrote:
>> On Mon, May 28, 2012 at 12:12:35PM +0400, Antony Pavlov wrote:
>> > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
>> > ---
>> > arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++
>> > 1 file changed, 18 insertions(+)
>> >
>> > diff --git a/arch/arm/boards/toshiba-ac100/board.c b/arch/arm/boards/toshiba-ac100/board.c
>> > index e3a5eba..3fd720d 100644
>> > --- a/arch/arm/boards/toshiba-ac100/board.c
>> > +++ b/arch/arm/boards/toshiba-ac100/board.c
>> > @@ -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
>>
>> Better skip the ifdefs. It won't hurt except for a few bytes of wated
>> space.
> and the -1 need to be a define
Like this?
add_generic_usb_ehci_device(DEVICE_ID_DYNAMIC, TEGRA_USB3_BASE, &ehci_pdata);
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v20120528 4/5] toshiba-ac100: add USB host support
2012-05-29 10:42 ` Sascha Hauer
@ 2012-05-29 15:52 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-29 16:09 ` Sascha Hauer
0 siblings, 1 reply; 12+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-05-29 15:52 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
On 12:42 Tue 29 May , Sascha Hauer wrote:
> On Tue, May 29, 2012 at 12:37:20PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 10:30 Tue 29 May , Sascha Hauer wrote:
> > > On Mon, May 28, 2012 at 12:12:35PM +0400, Antony Pavlov wrote:
> > > > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> > > > ---
> > > > arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++
> > > > 1 file changed, 18 insertions(+)
> > > >
> > > > diff --git a/arch/arm/boards/toshiba-ac100/board.c b/arch/arm/boards/toshiba-ac100/board.c
> > > > index e3a5eba..3fd720d 100644
> > > > --- a/arch/arm/boards/toshiba-ac100/board.c
> > > > +++ b/arch/arm/boards/toshiba-ac100/board.c
> > > > @@ -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
> > >
> > > Better skip the ifdefs. It won't hurt except for a few bytes of wated
> > > space.
> > and the -1 need to be a define
> >
> >
> > btw I think we need to change the auto allocated dev_id to -2 so -1 one have
> > the same meanning as in the kernel
>
> I think we still have hardcoded -1 around.
I check normally no
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v20120528 4/5] toshiba-ac100: add USB host support
2012-05-29 15:52 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-05-29 16:09 ` Sascha Hauer
0 siblings, 0 replies; 12+ messages in thread
From: Sascha Hauer @ 2012-05-29 16:09 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On Tue, May 29, 2012 at 05:52:36PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > >
> > >
> > > btw I think we need to change the auto allocated dev_id to -2 so -1 one have
> > > the same meanning as in the kernel
> >
> > I think we still have hardcoded -1 around.
> I check normally no
Just grep for add_generic_usb_ehci_device. I have a patch for this but I
don't know which other wrapper functions are around which might have a
-1 in them.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-05-29 16:09 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-28 8:12 [PATCH v20120528 0/5] ARM: initial Tegra support Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 1/5] " Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 2/5] ARM: Tegra: add Toshiba AC100 support Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 3/5] usb: set MAXINTERFACES = 16 Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 4/5] toshiba-ac100: add USB host support Antony Pavlov
2012-05-29 8:30 ` Sascha Hauer
2012-05-29 10:37 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-29 10:42 ` Sascha Hauer
2012-05-29 15:52 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-29 16:09 ` Sascha Hauer
2012-05-29 10:55 ` Antony Pavlov
2012-05-28 8:12 ` [PATCH v20120528 5/5] toshiba_ac100: add defconfig Antony Pavlov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox