mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] Add bcm2835/Raspberry-Pi support
@ 2012-09-18 20:30 Carlo Caione
  2012-09-18 20:30 ` [PATCH 2/2] Add Raspberry-Pi defconfig Carlo Caione
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Carlo Caione @ 2012-09-18 20:30 UTC (permalink / raw)
  To: barebox; +Cc: Carlo Caione

Signed-off-by: Carlo Caione <carlo@carlocaione.org>
---
 arch/arm/Kconfig                              |    6 +
 arch/arm/Makefile                             |    2 +
 arch/arm/boards/raspberry-pi/Kconfig          |   10 ++
 arch/arm/boards/raspberry-pi/Makefile         |    2 +
 arch/arm/boards/raspberry-pi/config.h         |    4 +
 arch/arm/boards/raspberry-pi/env/config       |    1 +
 arch/arm/boards/raspberry-pi/rpi.c            |   58 +++++++
 arch/arm/cpu/Kconfig                          |    5 +
 arch/arm/mach-bcm2835/Kconfig                 |   15 ++
 arch/arm/mach-bcm2835/Makefile                |    4 +
 arch/arm/mach-bcm2835/clock.c                 |   75 +++++++++
 arch/arm/mach-bcm2835/core.c                  |  100 ++++++++++++
 arch/arm/mach-bcm2835/gpio.c                  |  115 ++++++++++++++
 arch/arm/mach-bcm2835/include/mach/clkdev.h   |    7 +
 arch/arm/mach-bcm2835/include/mach/clock.h    |   10 ++
 arch/arm/mach-bcm2835/include/mach/core.h     |   27 ++++
 arch/arm/mach-bcm2835/include/mach/gpio.h     |   12 ++
 arch/arm/mach-bcm2835/include/mach/platform.h |  207 +++++++++++++++++++++++++
 18 files changed, 660 insertions(+)
 create mode 100644 arch/arm/boards/raspberry-pi/Kconfig
 create mode 100644 arch/arm/boards/raspberry-pi/Makefile
 create mode 100644 arch/arm/boards/raspberry-pi/config.h
 create mode 100644 arch/arm/boards/raspberry-pi/env/config
 create mode 100644 arch/arm/boards/raspberry-pi/rpi.c
 create mode 100644 arch/arm/mach-bcm2835/Kconfig
 create mode 100644 arch/arm/mach-bcm2835/Makefile
 create mode 100644 arch/arm/mach-bcm2835/clock.c
 create mode 100644 arch/arm/mach-bcm2835/core.c
 create mode 100644 arch/arm/mach-bcm2835/gpio.c
 create mode 100644 arch/arm/mach-bcm2835/include/mach/clkdev.h
 create mode 100644 arch/arm/mach-bcm2835/include/mach/clock.h
 create mode 100644 arch/arm/mach-bcm2835/include/mach/core.h
 create mode 100644 arch/arm/mach-bcm2835/include/mach/gpio.h
 create mode 100644 arch/arm/mach-bcm2835/include/mach/platform.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a54ad03..f8eb1b4 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -92,6 +92,11 @@ config ARCH_TEGRA
 	select CPU_ARM926T
 	select HAS_DEBUG_LL
 
+config ARCH_BCM2835
+	bool "Broadcom BCM2835 boards"
+	select GENERIC_GPIO
+	select CPU_ARM1176
+
 endchoice
 
 source arch/arm/cpu/Kconfig
@@ -106,6 +111,7 @@ source arch/arm/mach-pxa/Kconfig
 source arch/arm/mach-samsung/Kconfig
 source arch/arm/mach-versatile/Kconfig
 source arch/arm/mach-tegra/Kconfig
+source arch/arm/mach-bcm2835/Kconfig
 
 config ARM_ASM_UNIFIED
 	bool
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 8e660be..36a1b91 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -62,6 +62,7 @@ machine-$(CONFIG_ARCH_PXA)		:= pxa
 machine-$(CONFIG_ARCH_SAMSUNG)		:= samsung
 machine-$(CONFIG_ARCH_VERSATILE)	:= versatile
 machine-$(CONFIG_ARCH_TEGRA)		:= tegra
+machine-$(CONFIG_ARCH_BCM2835)		:= bcm2835
 
 # Board directory name.  This list is sorted alphanumerically
 # by CONFIG_* macro name.
@@ -141,6 +142,7 @@ board-$(CONFIG_MACH_TOSHIBA_AC100)		:= toshiba-ac100
 board-$(CONFIG_MACH_CCMX51)			:= ccxmx51
 board-$(CONFIG_MACH_TINY210)			:= friendlyarm-tiny210
 board-$(CONFIG_MACH_SABRELITE)			:= freescale-mx6-sabrelite
+board-$(CONFIG_MACH_RPI)			:= raspberry-pi
 
 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
 
diff --git a/arch/arm/boards/raspberry-pi/Kconfig b/arch/arm/boards/raspberry-pi/Kconfig
new file mode 100644
index 0000000..9d19c98
--- /dev/null
+++ b/arch/arm/boards/raspberry-pi/Kconfig
@@ -0,0 +1,10 @@
+
+if MACH_RPI
+
+config ARCH_TEXT_BASE
+	hex
+	default 0x00008000
+
+config BOARDINFO
+	default "RaspberryPi (BCM2835/ARM1176JZF-S)"
+endif
diff --git a/arch/arm/boards/raspberry-pi/Makefile b/arch/arm/boards/raspberry-pi/Makefile
new file mode 100644
index 0000000..56da6f2
--- /dev/null
+++ b/arch/arm/boards/raspberry-pi/Makefile
@@ -0,0 +1,2 @@
+
+obj-$(CONFIG_MACH_RPI) += rpi.o
diff --git a/arch/arm/boards/raspberry-pi/config.h b/arch/arm/boards/raspberry-pi/config.h
new file mode 100644
index 0000000..ca15136
--- /dev/null
+++ b/arch/arm/boards/raspberry-pi/config.h
@@ -0,0 +1,4 @@
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#endif	/* __CONFIG_H */
diff --git a/arch/arm/boards/raspberry-pi/env/config b/arch/arm/boards/raspberry-pi/env/config
new file mode 100644
index 0000000..1a24852
--- /dev/null
+++ b/arch/arm/boards/raspberry-pi/env/config
@@ -0,0 +1 @@
+#!/bin/sh
diff --git a/arch/arm/boards/raspberry-pi/rpi.c b/arch/arm/boards/raspberry-pi/rpi.c
new file mode 100644
index 0000000..bbbe6ec
--- /dev/null
+++ b/arch/arm/boards/raspberry-pi/rpi.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2012 Carlo Caione <carlo@carlocaione.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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 <init.h>
+#include <asm/armlinux.h>
+#include <generated/mach-types.h>
+#include <environment.h>
+#include <partition.h>
+#include <sizes.h>
+
+#include <mach/gpio.h>
+#include <mach/core.h>
+#include <mach/platform.h>
+#include <linux/amba/serial.h>
+#include <io.h>
+
+static int rpi_mem_init(void)
+{
+	bcm2835_add_device_sdram(128 * 1024 *1024);
+
+	return 0;
+}
+mem_initcall(rpi_mem_init);
+
+static int rpi_console_init(void)
+{
+	bcm2835_register_uart();
+	return 0;
+}
+console_initcall(rpi_console_init);
+
+static int rpi_devices_init(void)
+{
+	armlinux_set_architecture(MACH_TYPE_BCM2708);
+	armlinux_set_bootparams((void *)(0x00000100));
+	return 0;
+}
+
+device_initcall(rpi_devices_init);
+
diff --git a/arch/arm/cpu/Kconfig b/arch/arm/cpu/Kconfig
index f55e862..108253b 100644
--- a/arch/arm/cpu/Kconfig
+++ b/arch/arm/cpu/Kconfig
@@ -8,6 +8,11 @@ config CPU_32
 # which CPUs we support in the kernel image, and the compiler instruction
 # optimiser behaviour.
 
+# ARM1176
+config CPU_ARM1176
+	bool
+	select CPU_V6
+
 # ARM920T
 config CPU_ARM920T
 	bool
diff --git a/arch/arm/mach-bcm2835/Kconfig b/arch/arm/mach-bcm2835/Kconfig
new file mode 100644
index 0000000..ae6d3ae
--- /dev/null
+++ b/arch/arm/mach-bcm2835/Kconfig
@@ -0,0 +1,15 @@
+if ARCH_BCM2835
+
+choice
+	prompt "ARM Board type"
+
+config MACH_RPI
+	bool "RaspberryPi (BCM2835/ARM1176JZF-S)"
+	select ARM_AMBA
+	select CLKDEV_LOOKUP
+
+endchoice
+
+source arch/arm/boards/raspberry-pi/Kconfig
+
+endif
diff --git a/arch/arm/mach-bcm2835/Makefile b/arch/arm/mach-bcm2835/Makefile
new file mode 100644
index 0000000..6d530d5
--- /dev/null
+++ b/arch/arm/mach-bcm2835/Makefile
@@ -0,0 +1,4 @@
+
+obj-y += core.o
+obj-y += clock.o
+obj-y += gpio.o
diff --git a/arch/arm/mach-bcm2835/clock.c b/arch/arm/mach-bcm2835/clock.c
new file mode 100644
index 0000000..99900e3
--- /dev/null
+++ b/arch/arm/mach-bcm2835/clock.c
@@ -0,0 +1,75 @@
+/*
+ *  linux/arch/arm/mach-bcm2708/clock.c
+ *
+ *  Copyright (C) 2010 Broadcom
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 <init.h>
+#include <clock.h>
+#include <debug_ll.h>
+
+#include <linux/clkdev.h>
+#include <linux/clk.h>
+#include <linux/err.h>
+
+#include <io.h>
+#include <asm/hardware/arm_timer.h>
+#include <asm/armlinux.h>
+
+#include <mach/platform.h>
+#include <mach/clock.h>
+
+int clk_enable(struct clk *clk)
+{
+	return 0;
+}
+EXPORT_SYMBOL(clk_enable);
+
+void clk_disable(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_disable);
+
+unsigned long clk_get_rate(struct clk *clk)
+{
+	return clk->rate;
+}
+EXPORT_SYMBOL(clk_get_rate);
+
+long clk_round_rate(struct clk *clk, unsigned long rate)
+{
+	return clk->rate;
+}
+EXPORT_SYMBOL(clk_round_rate);
+
+int clk_set_rate(struct clk *clk, unsigned long rate)
+{
+	return -EIO;
+}
+EXPORT_SYMBOL(clk_set_rate);
+
+int bcm2835_clk_create(struct clk *clk, const char *dev_id)
+{
+	struct clk_lookup *clkdev;
+
+	clkdev = clkdev_alloc(clk, NULL, dev_id);
+	if (!clkdev)
+		return -ENOMEM;
+	clkdev_add(clkdev);
+	return 0;
+}
diff --git a/arch/arm/mach-bcm2835/core.c b/arch/arm/mach-bcm2835/core.c
new file mode 100644
index 0000000..382f8a3
--- /dev/null
+++ b/arch/arm/mach-bcm2835/core.c
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2012 Carlo Caione <carlo@carlocaione.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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 <init.h>
+#include <clock.h>
+#include <debug_ll.h>
+
+#include <linux/clkdev.h>
+#include <linux/clk.h>
+#include <linux/err.h>
+
+#include <io.h>
+#include <asm/hardware/arm_timer.h>
+#include <asm/armlinux.h>
+
+#include <mach/platform.h>
+#include <mach/core.h>
+#include <mach/clock.h>
+
+static struct clk ref24_clk = {
+	.rate = UART0_CLOCK,	
+};
+
+void bcm2835_add_device_sdram(u32 size)
+{
+	arm_add_mem_device("ram0", 0x00000000, size);
+}
+
+static struct clk_lookup clocks_lookups[] = {
+	CLKDEV_DEV_ID("uart-pl0110", &ref24_clk),
+};
+
+#define STC_FREQ_HZ 1000000
+
+static uint64_t stc_read_cycles(void)
+{
+	return (uint64_t) readl(ST_BASE + 0x04);
+}
+
+static struct clocksource bcm2835_cs = {
+	.read = stc_read_cycles,
+	.mask = CLOCKSOURCE_MASK(32),
+};
+
+static int bcm2835_clocksource_init(void)
+{
+	clocks_calc_mult_shift(&bcm2835_cs.mult, &bcm2835_cs.shift, STC_FREQ_HZ, NSEC_PER_SEC, 60);
+	return init_clock(&bcm2835_cs);
+}
+core_initcall(bcm2835_clocksource_init);
+
+static int bcm2835_clkdev_init(void)
+{
+	clkdev_add_table(clocks_lookups, ARRAY_SIZE(clocks_lookups));
+
+	return 0;
+}
+postcore_initcall(bcm2835_clkdev_init);
+
+void bcm2835_register_uart(void)
+{
+	struct device_d *dev;
+
+	dev = add_generic_device("uart-pl011", 0, NULL, UART0_BASE, 4096,
+			   IORESOURCE_MEM, NULL);
+	bcm2835_clk_create(&ref24_clk, dev_name(dev));
+}
+
+#define RESET_TIMEOUT 10
+
+void __noreturn reset_cpu (unsigned long addr)
+{
+  	uint32_t rstc;
+   
+    rstc = readl(PM_RSTC);
+    rstc &= ~PM_RSTC_WRCFG_SET;
+    rstc |= PM_RSTC_WRCFG_FULL_RESET;
+  
+    writel(PM_PASSWORD | RESET_TIMEOUT, PM_WDOG);
+    writel(PM_PASSWORD | rstc, PM_RSTC);
+}
+EXPORT_SYMBOL(reset_cpu);
diff --git a/arch/arm/mach-bcm2835/gpio.c b/arch/arm/mach-bcm2835/gpio.c
new file mode 100644
index 0000000..4fd22e1
--- /dev/null
+++ b/arch/arm/mach-bcm2835/gpio.c
@@ -0,0 +1,115 @@
+/*
+ *  linux/arch/arm/mach-bcm2708/bcm2708_gpio.c
+ *
+ *  Copyright (C) 2010 Broadcom
+ *
+ * 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.
+ *
+ */
+
+#include <common.h>
+#include <errno.h>
+#include <init.h>
+#include <io.h>
+
+#include <mach/platform.h>
+#include <mach/gpio.h>
+
+#define GPIOFSEL(x)  (0x00+(x)*4)
+#define GPIOSET(x)   (0x1c+(x)*4)
+#define GPIOCLR(x)   (0x28+(x)*4)
+#define GPIOLEV(x)   (0x34+(x)*4)
+#define GPIOEDS(x)   (0x40+(x)*4)
+#define GPIOREN(x)   (0x4c+(x)*4)
+#define GPIOFEN(x)   (0x58+(x)*4)
+#define GPIOHEN(x)   (0x64+(x)*4)
+#define GPIOLEN(x)   (0x70+(x)*4)
+#define GPIOAREN(x)  (0x7c+(x)*4)
+#define GPIOAFEN(x)  (0x88+(x)*4)
+#define GPIOUD(x)    (0x94+(x)*4)
+#define GPIOUDCLK(x) (0x98+(x)*4)
+
+enum { GPIO_FSEL_INPUT, GPIO_FSEL_OUTPUT,
+	GPIO_FSEL_ALT5, GPIO_FSEL_ALT_4,
+	GPIO_FSEL_ALT0, GPIO_FSEL_ALT1,
+	GPIO_FSEL_ALT2, GPIO_FSEL_ALT3,
+};
+
+struct bcm2835_gpio {
+	void __iomem *base;
+};
+
+static struct bcm2835_gpio *bcm2835_gpio;
+
+static int bcm2835_gpio_init(void)
+{
+	bcm2835_gpio = kzalloc(sizeof(struct bcm2835_gpio), GFP_KERNEL);
+	if (bcm2835_gpio == NULL) {
+		pr_err("%s: failed to allocate GPIO\n", __func__);
+		return -ENOMEM;
+	}
+	bcm2835_gpio->base = (void __iomem *)GPIO_BASE;
+	return 0;
+}
+postcore_initcall(bcm2835_gpio_init);
+
+static int bcm2835_set_function(unsigned gpio, int function)
+{
+	unsigned gpiodir;
+	unsigned gpio_bank = gpio / 10;
+	unsigned gpio_field_offset = (gpio - 10 * gpio_bank) * 3;
+
+	if (gpio >= BCM_NR_GPIOS)
+		return -EINVAL;
+
+	gpiodir = readl(bcm2835_gpio->base + GPIOFSEL(gpio_bank));
+	gpiodir &= ~(7 << gpio_field_offset);
+	gpiodir |= function << gpio_field_offset;
+	writel(gpiodir, bcm2835_gpio->base + GPIOFSEL(gpio_bank));
+	gpiodir = readl(bcm2835_gpio->base + GPIOFSEL(gpio_bank));
+
+	return 0;
+}
+
+int gpio_direction_input(unsigned gpio)
+{
+	return bcm2835_set_function(gpio, GPIO_FSEL_INPUT);
+}
+
+int gpio_direction_output(unsigned gpio, int value)
+{
+	int ret;
+	ret =  bcm2835_set_function(gpio, GPIO_FSEL_OUTPUT);
+	if (ret >= 0)
+		gpio_set_value(gpio, value);
+	return ret;
+}
+
+
+void gpio_set_value(unsigned gpio, int value)
+{
+	unsigned gpio_bank = gpio / 32;
+	unsigned gpio_field_offset = (gpio - 32 * gpio_bank);
+
+	if (gpio >= BCM_NR_GPIOS)
+		return;
+	if (value)
+		writel(1 << gpio_field_offset, bcm2835_gpio->base + GPIOSET(gpio_bank));
+	else
+		writel(1 << gpio_field_offset, bcm2835_gpio->base + GPIOCLR(gpio_bank));
+}
+
+
+int gpio_get_value(unsigned gpio)
+{
+	unsigned gpio_bank = gpio / 32;
+	unsigned gpio_field_offset = (gpio - 32 * gpio_bank);
+	unsigned lev;
+
+	if (gpio >= BCM_NR_GPIOS)
+		return 0;
+	lev = readl(bcm2835_gpio->base + GPIOLEV(gpio_bank));
+	return 0x1 & (lev >> gpio_field_offset);
+}
\ No newline at end of file
diff --git a/arch/arm/mach-bcm2835/include/mach/clkdev.h b/arch/arm/mach-bcm2835/include/mach/clkdev.h
new file mode 100644
index 0000000..04b37a8
--- /dev/null
+++ b/arch/arm/mach-bcm2835/include/mach/clkdev.h
@@ -0,0 +1,7 @@
+#ifndef __ASM_MACH_CLKDEV_H
+#define __ASM_MACH_CLKDEV_H
+
+#define __clk_get(clk) ({ 1; })
+#define __clk_put(clk) do { } while (0)
+
+#endif
diff --git a/arch/arm/mach-bcm2835/include/mach/clock.h b/arch/arm/mach-bcm2835/include/mach/clock.h
new file mode 100644
index 0000000..a365a77
--- /dev/null
+++ b/arch/arm/mach-bcm2835/include/mach/clock.h
@@ -0,0 +1,10 @@
+#ifndef _BCM2708_CLOCK_H
+#define _BCM2708_CLOCK_H
+
+int bcm2835_clk_create(struct clk *clk, const char *dev_id);
+
+struct clk {
+	unsigned long rate;
+};
+
+#endif
\ No newline at end of file
diff --git a/arch/arm/mach-bcm2835/include/mach/core.h b/arch/arm/mach-bcm2835/include/mach/core.h
new file mode 100644
index 0000000..b931e75
--- /dev/null
+++ b/arch/arm/mach-bcm2835/include/mach/core.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2009 Carlo Caione <carlo@carlocaione.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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
+ *
+ */
+ 
+#ifndef __BCM2835_CORE_H__
+#define __BCM2835_CORE_H__
+
+void bcm2835_register_uart(void);
+void bcm2835_add_device_sdram(u32 size);
+
+#endif
diff --git a/arch/arm/mach-bcm2835/include/mach/gpio.h b/arch/arm/mach-bcm2835/include/mach/gpio.h
new file mode 100644
index 0000000..f1a7e4f
--- /dev/null
+++ b/arch/arm/mach-bcm2835/include/mach/gpio.h
@@ -0,0 +1,12 @@
+#ifndef _BCM2708_GPIO_H
+#define _BCM2708_GPIO_H
+
+#define BCM_NR_GPIOS 54 // number of gpio lines
+
+extern int gpio_direction_input(unsigned gpio);
+extern int gpio_direction_output(unsigned gpio, int value);
+extern void gpio_set_value(unsigned gpio, int value);
+extern int gpio_get_value(unsigned gpio);
+
+
+#endif
\ No newline at end of file
diff --git a/arch/arm/mach-bcm2835/include/mach/platform.h b/arch/arm/mach-bcm2835/include/mach/platform.h
new file mode 100644
index 0000000..3b92005
--- /dev/null
+++ b/arch/arm/mach-bcm2835/include/mach/platform.h
@@ -0,0 +1,207 @@
+/*
+ * arch/arm/mach-bcm2708/include/mach/platform.h
+ *
+ * Copyright (C) 2010 Broadcom
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ */
+
+#ifndef _BCM2708_PLATFORM_H
+#define _BCM2708_PLATFORM_H
+
+
+
+/*
+ *  SDRAM
+ */
+#define BCM2708_SDRAM_BASE           0x00000000
+
+/*
+ *  Logic expansion modules
+ *
+ */
+
+
+/*
+ * Definitions and addresses for the ARM CONTROL logic
+ * This file is manually generated.
+ */
+
+#define BCM2708_PERI_BASE        0x20000000
+#define ST_BASE                  (BCM2708_PERI_BASE + 0x3000)   /* System Timer */
+#define DMA_BASE		 (BCM2708_PERI_BASE + 0x7000)	/* DMA controller */
+#define ARM_BASE                 (BCM2708_PERI_BASE + 0xB000)	 /* BCM2708 ARM control block */
+#define PM_BASE			 (BCM2708_PERI_BASE + 0x100000) /* Power Management, Reset controller and Watchdog registers */
+#define GPIO_BASE                (BCM2708_PERI_BASE + 0x200000) /* GPIO */
+#define UART0_BASE               (BCM2708_PERI_BASE + 0x201000)	/* Uart 0 */
+#define MMCI0_BASE               (BCM2708_PERI_BASE + 0x202000) /* MMC interface */
+#define SPI0_BASE		 (BCM2708_PERI_BASE + 0x204000) /* SPI0 */
+#define BSC0_BASE		 (BCM2708_PERI_BASE + 0x205000) /* BSC0 I2C/TWI */
+#define UART1_BASE               (BCM2708_PERI_BASE + 0x215000) /* Uart 1 */
+#define EMMC_BASE                (BCM2708_PERI_BASE + 0x300000) /* eMMC interface */
+#define SMI_BASE		 (BCM2708_PERI_BASE + 0x600000) /* SMI */
+#define BSC1_BASE		 (BCM2708_PERI_BASE + 0x804000) /* BSC1 I2C/TWI */
+#define USB_BASE                 (BCM2708_PERI_BASE + 0x980000) /* DTC_OTG USB controller */
+#define MCORE_BASE               (BCM2708_PERI_BASE + 0x0000)   /* Fake frame buffer device (actually the multicore sync block*/
+
+#define ARMCTRL_BASE             (ARM_BASE + 0x000)
+#define ARMCTRL_IC_BASE          (ARM_BASE + 0x200)           /* ARM interrupt controller */
+#define ARMCTRL_TIMER0_1_BASE    (ARM_BASE + 0x400)           /* Timer 0 and 1 */
+#define ARMCTRL_0_SBM_BASE       (ARM_BASE + 0x800)           /* User 0 (ARM)'s Semaphores Doorbells and Mailboxes */
+
+
+/*
+ * Interrupt assignments
+ */
+
+#define ARM_IRQ1_BASE                  0
+#define INTERRUPT_TIMER0               (ARM_IRQ1_BASE + 0)
+#define INTERRUPT_TIMER1               (ARM_IRQ1_BASE + 1)
+#define INTERRUPT_TIMER2               (ARM_IRQ1_BASE + 2)
+#define INTERRUPT_TIMER3               (ARM_IRQ1_BASE + 3)
+#define INTERRUPT_CODEC0               (ARM_IRQ1_BASE + 4)
+#define INTERRUPT_CODEC1               (ARM_IRQ1_BASE + 5)
+#define INTERRUPT_CODEC2               (ARM_IRQ1_BASE + 6)
+#define INTERRUPT_VC_JPEG              (ARM_IRQ1_BASE + 7)
+#define INTERRUPT_ISP                  (ARM_IRQ1_BASE + 8)
+#define INTERRUPT_VC_USB               (ARM_IRQ1_BASE + 9)
+#define INTERRUPT_VC_3D                (ARM_IRQ1_BASE + 10)
+#define INTERRUPT_TRANSPOSER           (ARM_IRQ1_BASE + 11)
+#define INTERRUPT_MULTICORESYNC0       (ARM_IRQ1_BASE + 12)
+#define INTERRUPT_MULTICORESYNC1       (ARM_IRQ1_BASE + 13)
+#define INTERRUPT_MULTICORESYNC2       (ARM_IRQ1_BASE + 14)
+#define INTERRUPT_MULTICORESYNC3       (ARM_IRQ1_BASE + 15)
+#define INTERRUPT_DMA0                 (ARM_IRQ1_BASE + 16)
+#define INTERRUPT_DMA1                 (ARM_IRQ1_BASE + 17)
+#define INTERRUPT_VC_DMA2              (ARM_IRQ1_BASE + 18)
+#define INTERRUPT_VC_DMA3              (ARM_IRQ1_BASE + 19)
+#define INTERRUPT_DMA4                 (ARM_IRQ1_BASE + 20)
+#define INTERRUPT_DMA5                 (ARM_IRQ1_BASE + 21)
+#define INTERRUPT_DMA6                 (ARM_IRQ1_BASE + 22)
+#define INTERRUPT_DMA7                 (ARM_IRQ1_BASE + 23)
+#define INTERRUPT_DMA8                 (ARM_IRQ1_BASE + 24)
+#define INTERRUPT_DMA9                 (ARM_IRQ1_BASE + 25)
+#define INTERRUPT_DMA10                (ARM_IRQ1_BASE + 26)
+#define INTERRUPT_DMA11                (ARM_IRQ1_BASE + 27)
+#define INTERRUPT_DMA12                (ARM_IRQ1_BASE + 28)
+#define INTERRUPT_AUX                (ARM_IRQ1_BASE + 29)
+#define INTERRUPT_ARM                  (ARM_IRQ1_BASE + 30)
+#define INTERRUPT_VPUDMA               (ARM_IRQ1_BASE + 31)
+
+#define ARM_IRQ2_BASE                  32
+#define INTERRUPT_HOSTPORT             (ARM_IRQ2_BASE + 0)
+#define INTERRUPT_VIDEOSCALER          (ARM_IRQ2_BASE + 1)
+#define INTERRUPT_CCP2TX               (ARM_IRQ2_BASE + 2)
+#define INTERRUPT_SDC                  (ARM_IRQ2_BASE + 3)
+#define INTERRUPT_DSI0                 (ARM_IRQ2_BASE + 4)
+#define INTERRUPT_AVE                  (ARM_IRQ2_BASE + 5)
+#define INTERRUPT_CAM0                 (ARM_IRQ2_BASE + 6)
+#define INTERRUPT_CAM1                 (ARM_IRQ2_BASE + 7)
+#define INTERRUPT_HDMI0                (ARM_IRQ2_BASE + 8)
+#define INTERRUPT_HDMI1                (ARM_IRQ2_BASE + 9)
+#define INTERRUPT_PIXELVALVE1          (ARM_IRQ2_BASE + 10)
+#define INTERRUPT_I2CSPISLV            (ARM_IRQ2_BASE + 11)
+#define INTERRUPT_DSI1                 (ARM_IRQ2_BASE + 12)
+#define INTERRUPT_PWA0                 (ARM_IRQ2_BASE + 13)
+#define INTERRUPT_PWA1                 (ARM_IRQ2_BASE + 14)
+#define INTERRUPT_CPR                  (ARM_IRQ2_BASE + 15)
+#define INTERRUPT_SMI                  (ARM_IRQ2_BASE + 16)
+#define INTERRUPT_GPIO0                (ARM_IRQ2_BASE + 17)
+#define INTERRUPT_GPIO1                (ARM_IRQ2_BASE + 18)
+#define INTERRUPT_GPIO2                (ARM_IRQ2_BASE + 19)
+#define INTERRUPT_GPIO3                (ARM_IRQ2_BASE + 20)
+#define INTERRUPT_VC_I2C               (ARM_IRQ2_BASE + 21)
+#define INTERRUPT_VC_SPI               (ARM_IRQ2_BASE + 22)
+#define INTERRUPT_VC_I2SPCM            (ARM_IRQ2_BASE + 23)
+#define INTERRUPT_VC_SDIO              (ARM_IRQ2_BASE + 24)
+#define INTERRUPT_VC_UART              (ARM_IRQ2_BASE + 25)
+#define INTERRUPT_SLIMBUS              (ARM_IRQ2_BASE + 26)
+#define INTERRUPT_VEC                  (ARM_IRQ2_BASE + 27)
+#define INTERRUPT_CPG                  (ARM_IRQ2_BASE + 28)
+#define INTERRUPT_RNG                  (ARM_IRQ2_BASE + 29)
+#define INTERRUPT_VC_ARASANSDIO        (ARM_IRQ2_BASE + 30)
+#define INTERRUPT_AVSPMON              (ARM_IRQ2_BASE + 31)
+
+#define ARM_IRQ0_BASE                  64
+#define INTERRUPT_ARM_TIMER            (ARM_IRQ0_BASE + 0)
+#define INTERRUPT_ARM_MAILBOX          (ARM_IRQ0_BASE + 1)
+#define INTERRUPT_ARM_DOORBELL_0       (ARM_IRQ0_BASE + 2)
+#define INTERRUPT_ARM_DOORBELL_1       (ARM_IRQ0_BASE + 3)
+#define INTERRUPT_VPU0_HALTED          (ARM_IRQ0_BASE + 4)
+#define INTERRUPT_VPU1_HALTED          (ARM_IRQ0_BASE + 5)
+#define INTERRUPT_ILLEGAL_TYPE0        (ARM_IRQ0_BASE + 6)
+#define INTERRUPT_ILLEGAL_TYPE1        (ARM_IRQ0_BASE + 7)
+#define INTERRUPT_PENDING1             (ARM_IRQ0_BASE + 8)
+#define INTERRUPT_PENDING2             (ARM_IRQ0_BASE + 9)
+#define INTERRUPT_JPEG                 (ARM_IRQ0_BASE + 10)
+#define INTERRUPT_USB                  (ARM_IRQ0_BASE + 11)
+#define INTERRUPT_3D                   (ARM_IRQ0_BASE + 12)
+#define INTERRUPT_DMA2                 (ARM_IRQ0_BASE + 13)
+#define INTERRUPT_DMA3                 (ARM_IRQ0_BASE + 14)
+#define INTERRUPT_I2C                  (ARM_IRQ0_BASE + 15)
+#define INTERRUPT_SPI                  (ARM_IRQ0_BASE + 16)
+#define INTERRUPT_I2SPCM               (ARM_IRQ0_BASE + 17)
+#define INTERRUPT_SDIO                 (ARM_IRQ0_BASE + 18)
+#define INTERRUPT_UART                 (ARM_IRQ0_BASE + 19)
+#define INTERRUPT_ARASANSDIO           (ARM_IRQ0_BASE + 20)
+
+#define MAXIRQNUM                      (32 + 32 + 20)
+#define MAXFIQNUM                      (32 + 32 + 20)
+
+#define MAX_TIMER                       2
+#define MAX_PERIOD                      699050
+#define TICKS_PER_uSEC                  1
+
+/*
+ *  These are useconds NOT ticks.
+ *
+ */
+#define mSEC_1                          1000
+#define mSEC_5                          (mSEC_1 * 5)
+#define mSEC_10                         (mSEC_1 * 10)
+#define mSEC_25                         (mSEC_1 * 25)
+#define SEC_1                           (mSEC_1 * 1000)
+
+/*
+ * Watchdog
+ */
+#define PM_RSTC			       (PM_BASE+0x1c)
+#define PM_RSTS			       (PM_BASE+0x20)
+#define PM_WDOG			       (PM_BASE+0x24)
+
+#define PM_WDOG_RESET                                         0000000000
+#define PM_PASSWORD		       0x5a000000
+#define PM_WDOG_TIME_SET	       0x000fffff
+#define PM_RSTC_WRCFG_CLR              0xffffffcf
+#define PM_RSTC_WRCFG_SET              0x00000030
+#define PM_RSTC_WRCFG_FULL_RESET       0x00000020
+#define PM_RSTC_RESET                  0x00000102
+
+#define PM_RSTS_HADPOR_SET                                 0x00001000
+#define PM_RSTS_HADSRH_SET                                 0x00000400
+#define PM_RSTS_HADSRF_SET                                 0x00000200
+#define PM_RSTS_HADSRQ_SET                                 0x00000100
+#define PM_RSTS_HADWRH_SET                                 0x00000040
+#define PM_RSTS_HADWRF_SET                                 0x00000020
+#define PM_RSTS_HADWRQ_SET                                 0x00000010
+#define PM_RSTS_HADDRH_SET                                 0x00000004
+#define PM_RSTS_HADDRF_SET                                 0x00000002
+#define PM_RSTS_HADDRQ_SET                                 0x00000001
+
+#define UART0_CLOCK      3000000
+
+#endif
+
+/* END */
-- 
1.7.9.5


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 2/2] Add Raspberry-Pi defconfig
  2012-09-18 20:30 [PATCH 1/2] Add bcm2835/Raspberry-Pi support Carlo Caione
@ 2012-09-18 20:30 ` Carlo Caione
  2012-09-18 22:07   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-09-18 22:06 ` [PATCH 1/2] Add bcm2835/Raspberry-Pi support Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 20+ messages in thread
From: Carlo Caione @ 2012-09-18 20:30 UTC (permalink / raw)
  To: barebox; +Cc: Carlo Caione

Signed-off-by: Carlo Caione <carlo@carlocaione.org>
---
 arch/arm/configs/rpi_defconfig |   45 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 arch/arm/configs/rpi_defconfig

diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig
new file mode 100644
index 0000000..2b35ef8
--- /dev/null
+++ b/arch/arm/configs/rpi_defconfig
@@ -0,0 +1,45 @@
+CONFIG_ARCH_BCM2835=y
+CONFIG_ARCH_TEXT_BASE=0x00008000
+CONFIG_MEMORY_LAYOUT_FIXED=y
+CONFIG_STACK_BASE=0x00100000
+CONFIG_STACK_SIZE=0x8000
+CONFIG_MALLOC_BASE=0x00200000
+CONFIG_MALLOC_SIZE=0x400000
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_PROMPT="RPi> "
+CONFIG_LONGHELP=y
+CONFIG_GLOB=y
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_MENU=y
+CONFIG_PARTITION=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
+CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/raspberry-pi/env"
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_LOADENV=y
+CONFIG_CMD_EXPORT=y
+CONFIG_CMD_PRINTENV=y
+CONFIG_CMD_READLINE=y
+CONFIG_CMD_MENU=y
+CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_PASSWD=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_LOADB=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_MTEST=y
+CONFIG_CMD_MTEST_ALTERNATIVE=y
+CONFIG_CMD_BOOTM_ZLIB=y
+CONFIG_CMD_BOOTM_BZLIB=y
+CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_RESET=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_TIMEOUT=y
+CONFIG_CMD_PARTITION=y
+CONFIG_CMD_UNCOMPRESS=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_FS_CRAMFS=y
+CONFIG_SHA1=y
+CONFIG_SHA256=y
\ No newline at end of file
-- 
1.7.9.5


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-18 20:30 [PATCH 1/2] Add bcm2835/Raspberry-Pi support Carlo Caione
  2012-09-18 20:30 ` [PATCH 2/2] Add Raspberry-Pi defconfig Carlo Caione
@ 2012-09-18 22:06 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-09-19  7:42   ` Juergen Beisert
  2012-09-19  9:10 ` Jan Lübbe
  2012-09-20 15:40 ` Jan Lübbe
  3 siblings, 1 reply; 20+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-18 22:06 UTC (permalink / raw)
  To: Carlo Caione; +Cc: barebox, Carlo Caione

On 22:30 Tue 18 Sep     , Carlo Caione wrote:
> Signed-off-by: Carlo Caione <carlo@carlocaione.org>
> ---
>  arch/arm/Kconfig                              |    6 +
>  arch/arm/Makefile                             |    2 +
>  arch/arm/boards/raspberry-pi/Kconfig          |   10 ++
>  arch/arm/boards/raspberry-pi/Makefile         |    2 +
>  arch/arm/boards/raspberry-pi/config.h         |    4 +
>  arch/arm/boards/raspberry-pi/env/config       |    1 +
>  arch/arm/boards/raspberry-pi/rpi.c            |   58 +++++++
>  arch/arm/cpu/Kconfig                          |    5 +
>  arch/arm/mach-bcm2835/Kconfig                 |   15 ++
>  arch/arm/mach-bcm2835/Makefile                |    4 +
>  arch/arm/mach-bcm2835/clock.c                 |   75 +++++++++
>  arch/arm/mach-bcm2835/core.c                  |  100 ++++++++++++
>  arch/arm/mach-bcm2835/gpio.c                  |  115 ++++++++++++++
>  arch/arm/mach-bcm2835/include/mach/clkdev.h   |    7 +
>  arch/arm/mach-bcm2835/include/mach/clock.h    |   10 ++
>  arch/arm/mach-bcm2835/include/mach/core.h     |   27 ++++
>  arch/arm/mach-bcm2835/include/mach/gpio.h     |   12 ++
>  arch/arm/mach-bcm2835/include/mach/platform.h |  207 +++++++++++++++++++++++++
>  18 files changed, 660 insertions(+)
>  create mode 100644 arch/arm/boards/raspberry-pi/Kconfig
>  create mode 100644 arch/arm/boards/raspberry-pi/Makefile
>  create mode 100644 arch/arm/boards/raspberry-pi/config.h
>  create mode 100644 arch/arm/boards/raspberry-pi/env/config
>  create mode 100644 arch/arm/boards/raspberry-pi/rpi.c
>  create mode 100644 arch/arm/mach-bcm2835/Kconfig
>  create mode 100644 arch/arm/mach-bcm2835/Makefile
>  create mode 100644 arch/arm/mach-bcm2835/clock.c
>  create mode 100644 arch/arm/mach-bcm2835/core.c
>  create mode 100644 arch/arm/mach-bcm2835/gpio.c
>  create mode 100644 arch/arm/mach-bcm2835/include/mach/clkdev.h
>  create mode 100644 arch/arm/mach-bcm2835/include/mach/clock.h
>  create mode 100644 arch/arm/mach-bcm2835/include/mach/core.h
>  create mode 100644 arch/arm/mach-bcm2835/include/mach/gpio.h
>  create mode 100644 arch/arm/mach-bcm2835/include/mach/platform.h
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index a54ad03..f8eb1b4 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -92,6 +92,11 @@ config ARCH_TEGRA
>  	select CPU_ARM926T
>  	select HAS_DEBUG_LL
>  
> +config ARCH_BCM2835
> +	bool "Broadcom BCM2835 boards"
> +	select GENERIC_GPIO
> +	select CPU_ARM1176
please keep in alphabetic order
> +
>  endchoice
>  
>  source arch/arm/cpu/Kconfig
> @@ -106,6 +111,7 @@ source arch/arm/mach-pxa/Kconfig
>  source arch/arm/mach-samsung/Kconfig
>  source arch/arm/mach-versatile/Kconfig
>  source arch/arm/mach-tegra/Kconfig
> +source arch/arm/mach-bcm2835/Kconfig
>  
>  config ARM_ASM_UNIFIED
>  	bool
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 8e660be..36a1b91 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -62,6 +62,7 @@ machine-$(CONFIG_ARCH_PXA)		:= pxa
>  machine-$(CONFIG_ARCH_SAMSUNG)		:= samsung
>  machine-$(CONFIG_ARCH_VERSATILE)	:= versatile
>  machine-$(CONFIG_ARCH_TEGRA)		:= tegra
> +machine-$(CONFIG_ARCH_BCM2835)		:= bcm2835
please keep in alphabetic order
>  
>  # Board directory name.  This list is sorted alphanumerically
>  # by CONFIG_* macro name.
> @@ -141,6 +142,7 @@ board-$(CONFIG_MACH_TOSHIBA_AC100)		:= toshiba-ac100
>  board-$(CONFIG_MACH_CCMX51)			:= ccxmx51
>  board-$(CONFIG_MACH_TINY210)			:= friendlyarm-tiny210
>  board-$(CONFIG_MACH_SABRELITE)			:= freescale-mx6-sabrelite
> +board-$(CONFIG_MACH_RPI)			:= raspberry-pi
please keep in alphabetic order
>  
>  machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
>  
> diff --git a/arch/arm/boards/raspberry-pi/Kconfig b/arch/arm/boards/raspberry-pi/Kconfig
> new file mode 100644
> index 0000000..9d19c98
> --- /dev/null
> +++ b/arch/arm/boards/raspberry-pi/Kconfig
> @@ -0,0 +1,10 @@
> +
> +if MACH_RPI
> +
> +config ARCH_TEXT_BASE
> +	hex
> +	default 0x00008000
> +
> +config BOARDINFO
> +	default "RaspberryPi (BCM2835/ARM1176JZF-S)"
missing if MACH...
> +endif
> diff --git a/arch/arm/boards/raspberry-pi/Makefile b/arch/arm/boards/raspberry-pi/Makefile
> new file mode 100644
> index 0000000..56da6f2
> --- /dev/null
> +++ b/arch/arm/boards/raspberry-pi/Makefile
> @@ -0,0 +1,2 @@
> +
> +obj-$(CONFIG_MACH_RPI) += rpi.o
> diff --git a/arch/arm/boards/raspberry-pi/config.h b/arch/arm/boards/raspberry-pi/config.h
> new file mode 100644
> index 0000000..ca15136
> --- /dev/null
> +++ b/arch/arm/boards/raspberry-pi/config.h
> @@ -0,0 +1,4 @@
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
split the patch in 2 arch tehn board
> +
> +#endif	/* __CONFIG_H */
> diff --git a/arch/arm/boards/raspberry-pi/env/config b/arch/arm/boards/raspberry-pi/env/config
> new file mode 100644
> index 0000000..1a24852
> --- /dev/null
> +++ b/arch/arm/boards/raspberry-pi/env/config
please switch to defaultenv-2
> @@ -0,0 +1 @@
> +#!/bin/sh
> diff --git a/arch/arm/boards/raspberry-pi/rpi.c b/arch/arm/boards/raspberry-pi/rpi.c
> new file mode 100644
> index 0000000..bbbe6ec
> --- /dev/null
> +++ b/arch/arm/boards/raspberry-pi/rpi.c
> @@ -0,0 +1,58 @@
> +/*
> + * Copyright (C) 2012 Carlo Caione <carlo@carlocaione.org>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * 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 <init.h>
> +#include <asm/armlinux.h>
> +#include <generated/mach-types.h>
> +#include <environment.h>
> +#include <partition.h>
> +#include <sizes.h>
> +
> +#include <mach/gpio.h>
> +#include <mach/core.h>
> +#include <mach/platform.h>
> +#include <linux/amba/serial.h>
no need the amba include
> +#include <io.h>
> +
> +static int rpi_mem_init(void)
> +{
> +	bcm2835_add_device_sdram(128 * 1024 *1024);
can't you detect it?
> +
> +	return 0;
> +}
> +mem_initcall(rpi_mem_init);
> +
> +static int rpi_console_init(void)
> +{
> +	bcm2835_register_uart();
> +	return 0;
> +}
> +console_initcall(rpi_console_init);
> +
> +static int rpi_devices_init(void)
> +{
> +	armlinux_set_architecture(MACH_TYPE_BCM2708);
> +	armlinux_set_bootparams((void *)(0x00000100));
> +	return 0;
> +}
> +
> +device_initcall(rpi_devices_init);
> +
> diff --git a/arch/arm/cpu/Kconfig b/arch/arm/cpu/Kconfig
> index f55e862..108253b 100644
> --- a/arch/arm/cpu/Kconfig
> +++ b/arch/arm/cpu/Kconfig
> @@ -8,6 +8,11 @@ config CPU_32
>  # which CPUs we support in the kernel image, and the compiler instruction
>  # optimiser behaviour.
>  
> +# ARM1176
> +config CPU_ARM1176
> +	bool
> +	select CPU_V6
seperated patch
> +
>  # ARM920T
>  config CPU_ARM920T
>  	bool
> diff --git a/arch/arm/mach-bcm2835/Kconfig b/arch/arm/mach-bcm2835/Kconfig
> new file mode 100644
> index 0000000..ae6d3ae
> --- /dev/null
> +++ b/arch/arm/mach-bcm2835/Kconfig
> @@ -0,0 +1,15 @@
> +if ARCH_BCM2835
> +
> +choice
> +	prompt "ARM Board type"
ARM?? IT's broadcom
> +
> +config MACH_RPI
> +	bool "RaspberryPi (BCM2835/ARM1176JZF-S)"
> +	select ARM_AMBA
> +	select CLKDEV_LOOKUP
> +
> +endchoice
> +
> +source arch/arm/boards/raspberry-pi/Kconfig
> +
> +endif
> diff --git a/arch/arm/mach-bcm2835/Makefile b/arch/arm/mach-bcm2835/Makefile
> new file mode 100644
> index 0000000..6d530d5
> --- /dev/null
> +++ b/arch/arm/mach-bcm2835/Makefile
> @@ -0,0 +1,4 @@
> +
> +obj-y += core.o
> +obj-y += clock.o
> +obj-y += gpio.o
> diff --git a/arch/arm/mach-bcm2835/clock.c b/arch/arm/mach-bcm2835/clock.c
> new file mode 100644
> index 0000000..99900e3
> --- /dev/null
> +++ b/arch/arm/mach-bcm2835/clock.c
> @@ -0,0 +1,75 @@
> +/*
> + *  linux/arch/arm/mach-bcm2708/clock.c
this code come from nomadik please keep my copy right
> + *
> + *  Copyright (C) 2010 Broadcom
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * 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 <init.h>
> +#include <clock.h>
> +#include <debug_ll.h>
> +
> +#include <linux/clkdev.h>
> +#include <linux/clk.h>
> +#include <linux/err.h>
> +
> +#include <io.h>
> +#include <asm/hardware/arm_timer.h>
> +#include <asm/armlinux.h>
> +
> +#include <mach/platform.h>
> +#include <mach/clock.h>
> +
> +int clk_enable(struct clk *clk)
> +{
> +	return 0;
> +}
> +EXPORT_SYMBOL(clk_enable);
> +
> +void clk_disable(struct clk *clk)
> +{
> +}
> +EXPORT_SYMBOL(clk_disable);
> +
> +unsigned long clk_get_rate(struct clk *clk)
> +{
> +	return clk->rate;
> +}
> +EXPORT_SYMBOL(clk_get_rate);
> +
> +long clk_round_rate(struct clk *clk, unsigned long rate)
> +{
> +	return clk->rate;
> +}
> +EXPORT_SYMBOL(clk_round_rate);
> +
> +int clk_set_rate(struct clk *clk, unsigned long rate)
> +{
> +	return -EIO;
> +}
> +EXPORT_SYMBOL(clk_set_rate);
> +
> +int bcm2835_clk_create(struct clk *clk, const char *dev_id)
> +{
> +	struct clk_lookup *clkdev;
> +
> +	clkdev = clkdev_alloc(clk, NULL, dev_id);
> +	if (!clkdev)
> +		return -ENOMEM;
> +	clkdev_add(clkdev);
> +	return 0;
> +}
> diff --git a/arch/arm/mach-bcm2835/core.c b/arch/arm/mach-bcm2835/core.c
> new file mode 100644
> index 0000000..382f8a3
> --- /dev/null
> +++ b/arch/arm/mach-bcm2835/core.c
> @@ -0,0 +1,100 @@
> +/*
ditto here
> + * Copyright (C) 2012 Carlo Caione <carlo@carlocaione.org>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * 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 <init.h>
> +#include <clock.h>
> +#include <debug_ll.h>
> +
> +#include <linux/clkdev.h>
> +#include <linux/clk.h>
> +#include <linux/err.h>
> +
> +#include <io.h>
> +#include <asm/hardware/arm_timer.h>
> +#include <asm/armlinux.h>
> +
> +#include <mach/platform.h>
> +#include <mach/core.h>
> +#include <mach/clock.h>
> +
> +static struct clk ref24_clk = {
> +	.rate = UART0_CLOCK,	
put the rate here no need macro

and the clokc is 30K so ref24 is a bit off as a name
> +};
> +
> +void bcm2835_add_device_sdram(u32 size)
> +{
> +	arm_add_mem_device("ram0", 0x00000000, size);
> +}
> +
> +static struct clk_lookup clocks_lookups[] = {
> +	CLKDEV_DEV_ID("uart-pl0110", &ref24_clk),
> +};
> +
> +#define STC_FREQ_HZ 1000000
> +
> +static uint64_t stc_read_cycles(void)
> +{
> +	return (uint64_t) readl(ST_BASE + 0x04);
> +}
> +
> +static struct clocksource bcm2835_cs = {
> +	.read = stc_read_cycles,
> +	.mask = CLOCKSOURCE_MASK(32),
> +};
> +
> +static int bcm2835_clocksource_init(void)
> +{
> +	clocks_calc_mult_shift(&bcm2835_cs.mult, &bcm2835_cs.shift, STC_FREQ_HZ, NSEC_PER_SEC, 60);
> +	return init_clock(&bcm2835_cs);
> +}
> +core_initcall(bcm2835_clocksource_init);
> +
> +static int bcm2835_clkdev_init(void)
> +{
> +	clkdev_add_table(clocks_lookups, ARRAY_SIZE(clocks_lookups));
> +
> +	return 0;
> +}
> +postcore_initcall(bcm2835_clkdev_init);
> +
> +void bcm2835_register_uart(void)
> +{
> +	struct device_d *dev;
> +
> +	dev = add_generic_device("uart-pl011", 0, NULL, UART0_BASE, 4096,
> +			   IORESOURCE_MEM, NULL);
this will not work on next I add the amba bus support check the nomadik code
> +	bcm2835_clk_create(&ref24_clk, dev_name(dev));
no need drop it
> +}
> +
> +#define RESET_TIMEOUT 10
> +
> +void __noreturn reset_cpu (unsigned long addr)
> +{
> +  	uint32_t rstc;
> +   
> +    rstc = readl(PM_RSTC);
> +    rstc &= ~PM_RSTC_WRCFG_SET;
> +    rstc |= PM_RSTC_WRCFG_FULL_RESET;
> +  
> +    writel(PM_PASSWORD | RESET_TIMEOUT, PM_WDOG);
> +    writel(PM_PASSWORD | rstc, PM_RSTC);
> +}
> +EXPORT_SYMBOL(reset_cpu);
> diff --git a/arch/arm/mach-bcm2835/gpio.c b/arch/arm/mach-bcm2835/gpio.c
> new file mode 100644
> index 0000000..4fd22e1
> --- /dev/null
> +++ b/arch/arm/mach-bcm2835/gpio.c
> @@ -0,0 +1,115 @@
> +/*
> + *  linux/arch/arm/mach-bcm2708/bcm2708_gpio.c
please switch to gpiolib
> + *
> + *  Copyright (C) 2010 Broadcom
> + *
> + * 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.
> + *
> + */
> +
> +#include <common.h>
> +#include <errno.h>
> +#include <init.h>
> +#include <io.h>
> +
> +#include <mach/platform.h>
> +#include <mach/gpio.h>
> +
> +#define GPIOFSEL(x)  (0x00+(x)*4)
> +#define GPIOSET(x)   (0x1c+(x)*4)
> +#define GPIOCLR(x)   (0x28+(x)*4)
> +#define GPIOLEV(x)   (0x34+(x)*4)
> +#define GPIOEDS(x)   (0x40+(x)*4)
> +#define GPIOREN(x)   (0x4c+(x)*4)
> +#define GPIOFEN(x)   (0x58+(x)*4)
> +#define GPIOHEN(x)   (0x64+(x)*4)
> +#define GPIOLEN(x)   (0x70+(x)*4)
> +#define GPIOAREN(x)  (0x7c+(x)*4)
> +#define GPIOAFEN(x)  (0x88+(x)*4)
> +#define GPIOUD(x)    (0x94+(x)*4)
> +#define GPIOUDCLK(x) (0x98+(x)*4)
> +
> +enum { GPIO_FSEL_INPUT, GPIO_FSEL_OUTPUT,
> +	GPIO_FSEL_ALT5, GPIO_FSEL_ALT_4,
> +	GPIO_FSEL_ALT0, GPIO_FSEL_ALT1,
> +	GPIO_FSEL_ALT2, GPIO_FSEL_ALT3,
> +};
> +
> +struct bcm2835_gpio {
> +	void __iomem *base;
> +};
> +
> +static struct bcm2835_gpio *bcm2835_gpio;
> +
> +static int bcm2835_gpio_init(void)
> +{
> +	bcm2835_gpio = kzalloc(sizeof(struct bcm2835_gpio), GFP_KERNEL);
> +	if (bcm2835_gpio == NULL) {
> +		pr_err("%s: failed to allocate GPIO\n", __func__);
> +		return -ENOMEM;
> +	}
> +	bcm2835_gpio->base = (void __iomem *)GPIO_BASE;
> +	return 0;
> +}
> +postcore_initcall(bcm2835_gpio_init);
> +
> +static int bcm2835_set_function(unsigned gpio, int function)
> +{
> +	unsigned gpiodir;
> +	unsigned gpio_bank = gpio / 10;
> +	unsigned gpio_field_offset = (gpio - 10 * gpio_bank) * 3;
> +
> +	if (gpio >= BCM_NR_GPIOS)
> +		return -EINVAL;
> +
> +	gpiodir = readl(bcm2835_gpio->base + GPIOFSEL(gpio_bank));
> +	gpiodir &= ~(7 << gpio_field_offset);
> +	gpiodir |= function << gpio_field_offset;
> +	writel(gpiodir, bcm2835_gpio->base + GPIOFSEL(gpio_bank));
> +	gpiodir = readl(bcm2835_gpio->base + GPIOFSEL(gpio_bank));
> +
> +	return 0;
> +}
> +
> +int gpio_direction_input(unsigned gpio)
> +{
> +	return bcm2835_set_function(gpio, GPIO_FSEL_INPUT);
> +}
> +
> +int gpio_direction_output(unsigned gpio, int value)
> +{
> +	int ret;
> +	ret =  bcm2835_set_function(gpio, GPIO_FSEL_OUTPUT);
> +	if (ret >= 0)
> +		gpio_set_value(gpio, value);
> +	return ret;
> +}
> +
> +
please drop the extra line
> +void gpio_set_value(unsigned gpio, int value)
> +{
> +	unsigned gpio_bank = gpio / 32;
> +	unsigned gpio_field_offset = (gpio - 32 * gpio_bank);
gpio % 32 will do the tric
> +
> +	if (gpio >= BCM_NR_GPIOS)
> +		return;
> +	if (value)
> +		writel(1 << gpio_field_offset, bcm2835_gpio->base + GPIOSET(gpio_bank));
> +	else
> +		writel(1 << gpio_field_offset, bcm2835_gpio->base + GPIOCLR(gpio_bank));
> +}
> +
> +
> +int gpio_get_value(unsigned gpio)
> +{
> +	unsigned gpio_bank = gpio / 32;
> +	unsigned gpio_field_offset = (gpio - 32 * gpio_bank);
> +	unsigned lev;
> +
> +	if (gpio >= BCM_NR_GPIOS)
> +		return 0;
> +	lev = readl(bcm2835_gpio->base + GPIOLEV(gpio_bank));
> +	return 0x1 & (lev >> gpio_field_offset);
> +}
> \ No newline at end of file
> diff --git a/arch/arm/mach-bcm2835/include/mach/clkdev.h b/arch/arm/mach-bcm2835/include/mach/clkdev.h
> new file mode 100644
> index 0000000..04b37a8
> --- /dev/null
> +++ b/arch/arm/mach-bcm2835/include/mach/clkdev.h
> @@ -0,0 +1,7 @@
> +#ifndef __ASM_MACH_CLKDEV_H
> +#define __ASM_MACH_CLKDEV_H
> +
> +#define __clk_get(clk) ({ 1; })
> +#define __clk_put(clk) do { } while (0)
> +
> +#endif
> diff --git a/arch/arm/mach-bcm2835/include/mach/clock.h b/arch/arm/mach-bcm2835/include/mach/clock.h
> new file mode 100644
> index 0000000..a365a77
> --- /dev/null
> +++ b/arch/arm/mach-bcm2835/include/mach/clock.h
> @@ -0,0 +1,10 @@
> +#ifndef _BCM2708_CLOCK_H
> +#define _BCM2708_CLOCK_H
> +
> +int bcm2835_clk_create(struct clk *clk, const char *dev_id);
> +
> +struct clk {
> +	unsigned long rate;
> +};
> +
> +#endif
> \ No newline at end of file
> diff --git a/arch/arm/mach-bcm2835/include/mach/core.h b/arch/arm/mach-bcm2835/include/mach/core.h
> new file mode 100644
> index 0000000..b931e75
> --- /dev/null
> +++ b/arch/arm/mach-bcm2835/include/mach/core.h
> @@ -0,0 +1,27 @@
> +/*
> + * Copyright (C) 2009 Carlo Caione <carlo@carlocaione.org>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * 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
> + *
> + */
> + 
> +#ifndef __BCM2835_CORE_H__
> +#define __BCM2835_CORE_H__
> +
> +void bcm2835_register_uart(void);
> +void bcm2835_add_device_sdram(u32 size);
> +
> +#endif
> diff --git a/arch/arm/mach-bcm2835/include/mach/gpio.h b/arch/arm/mach-bcm2835/include/mach/gpio.h
> new file mode 100644
> index 0000000..f1a7e4f
> --- /dev/null
> +++ b/arch/arm/mach-bcm2835/include/mach/gpio.h
> @@ -0,0 +1,12 @@
> +#ifndef _BCM2708_GPIO_H
> +#define _BCM2708_GPIO_H
> +
> +#define BCM_NR_GPIOS 54 // number of gpio lines
no c++ comment
> +
> +extern int gpio_direction_input(unsigned gpio);
> +extern int gpio_direction_output(unsigned gpio, int value);
> +extern void gpio_set_value(unsigned gpio, int value);
> +extern int gpio_get_value(unsigned gpio);
> +
> +
> +#endif
> \ No newline at end of file
> diff --git a/arch/arm/mach-bcm2835/include/mach/platform.h b/arch/arm/mach-bcm2835/include/mach/platform.h
> new file mode 100644
> index 0000000..3b92005
> --- /dev/null
> +++ b/arch/arm/mach-bcm2835/include/mach/platform.h
> @@ -0,0 +1,207 @@
> +/*
> + * arch/arm/mach-bcm2708/include/mach/platform.h
> + *
> + * Copyright (C) 2010 Broadcom
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * 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
> + */
> +
> +#ifndef _BCM2708_PLATFORM_H
> +#define _BCM2708_PLATFORM_H
> +
> +
> +
> +/*
> + *  SDRAM
> + */
> +#define BCM2708_SDRAM_BASE           0x00000000
> +
> +/*
> + *  Logic expansion modules
> + *
> + */
> +
> +
> +/*
> + * Definitions and addresses for the ARM CONTROL logic
> + * This file is manually generated.
> + */
> +
> +#define BCM2708_PERI_BASE        0x20000000
> +#define ST_BASE                  (BCM2708_PERI_BASE + 0x3000)   /* System Timer */
> +#define DMA_BASE		 (BCM2708_PERI_BASE + 0x7000)	/* DMA controller */
too many whitespace please fix and sue tab for indentation

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/2] Add Raspberry-Pi defconfig
  2012-09-18 20:30 ` [PATCH 2/2] Add Raspberry-Pi defconfig Carlo Caione
@ 2012-09-18 22:07   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-09-19 22:19     ` Carlo Caione
  0 siblings, 1 reply; 20+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-18 22:07 UTC (permalink / raw)
  To: Carlo Caione; +Cc: barebox, Carlo Caione

On 22:30 Tue 18 Sep     , Carlo Caione wrote:
> Signed-off-by: Carlo Caione <carlo@carlocaione.org>
> ---
>  arch/arm/configs/rpi_defconfig |   45 ++++++++++++++++++++++++++++++++++++++++
add this in the board patch
>  1 file changed, 45 insertions(+)
>  create mode 100644 arch/arm/configs/rpi_defconfig
> 
> diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig
> new file mode 100644
> index 0000000..2b35ef8
> --- /dev/null
> +++ b/arch/arm/configs/rpi_defconfig
> @@ -0,0 +1,45 @@
> +CONFIG_ARCH_BCM2835=y
> +CONFIG_ARCH_TEXT_BASE=0x00008000
> +CONFIG_MEMORY_LAYOUT_FIXED=y
why fixed?

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-18 22:06 ` [PATCH 1/2] Add bcm2835/Raspberry-Pi support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-09-19  7:42   ` Juergen Beisert
  2012-09-19  8:14     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 20+ messages in thread
From: Juergen Beisert @ 2012-09-19  7:42 UTC (permalink / raw)
  To: barebox

Jean-Christophe PLAGNIOL-VILLARD wrote:
> [...]
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index a54ad03..f8eb1b4 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -92,6 +92,11 @@ config ARCH_TEGRA
> >  	select CPU_ARM926T
> >  	select HAS_DEBUG_LL
> >
> > +config ARCH_BCM2835
> > +	bool "Broadcom BCM2835 boards"
> > +	select GENERIC_GPIO
> > +	select CPU_ARM1176
>
> please keep in alphabetic order

What a useless rule...

Just my 2ct.

jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-5121-206917-5128 |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-19  7:42   ` Juergen Beisert
@ 2012-09-19  8:14     ` Jean-Christophe PLAGNIOL-VILLARD
  2012-09-19  8:54       ` Juergen Beisert
  0 siblings, 1 reply; 20+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-19  8:14 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: barebox

On 09:42 Wed 19 Sep     , Juergen Beisert wrote:
> Jean-Christophe PLAGNIOL-VILLARD wrote:
> > [...]
> > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > index a54ad03..f8eb1b4 100644
> > > --- a/arch/arm/Kconfig
> > > +++ b/arch/arm/Kconfig
> > > @@ -92,6 +92,11 @@ config ARCH_TEGRA
> > >  	select CPU_ARM926T
> > >  	select HAS_DEBUG_LL
> > >
> > > +config ARCH_BCM2835
> > > +	bool "Broadcom BCM2835 boards"
> > > +	select GENERIC_GPIO
> > > +	select CPU_ARM1176
> >
> > please keep in alphabetic order
> 
> What a useless rule...
no when you search for something you expect b to be after a not after z

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-19  8:14     ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-09-19  8:54       ` Juergen Beisert
  2012-09-19  9:37         ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 20+ messages in thread
From: Juergen Beisert @ 2012-09-19  8:54 UTC (permalink / raw)
  To: barebox

Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 09:42 Wed 19 Sep     , Juergen Beisert wrote:
> > Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > [...]
> > >
> > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > > index a54ad03..f8eb1b4 100644
> > > > --- a/arch/arm/Kconfig
> > > > +++ b/arch/arm/Kconfig
> > > > @@ -92,6 +92,11 @@ config ARCH_TEGRA
> > > >  	select CPU_ARM926T
> > > >  	select HAS_DEBUG_LL
> > > >
> > > > +config ARCH_BCM2835
> > > > +	bool "Broadcom BCM2835 boards"
> > > > +	select GENERIC_GPIO
> > > > +	select CPU_ARM1176
> > >
> > > please keep in alphabetic order
> >
> > What a useless rule...
>
> no when you search for something you expect b to be after a not after z

In Kconfig and Makefiles? Sorry. How often do your search for something in 
these kind of files?

And how often do you search for something in the C-sources?

So, what is important and what is useless?

"Some people unfortunately like jumping up and down about spaces but not code.
[...]  I'd rather read good poetry written in very bad hand writing than bad
poetry written in beautiful handwriting, and I think the same is true of code.
           -- Alan Cox <20090701130018.115ce0ea@lxorguk.ukuu.org.uk>"

Still just my 2ct.

jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-5121-206917-5128 |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-18 20:30 [PATCH 1/2] Add bcm2835/Raspberry-Pi support Carlo Caione
  2012-09-18 20:30 ` [PATCH 2/2] Add Raspberry-Pi defconfig Carlo Caione
  2012-09-18 22:06 ` [PATCH 1/2] Add bcm2835/Raspberry-Pi support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-09-19  9:10 ` Jan Lübbe
  2012-09-19 10:00   ` Carlo Caione
  2012-09-20 15:40 ` Jan Lübbe
  3 siblings, 1 reply; 20+ messages in thread
From: Jan Lübbe @ 2012-09-19  9:10 UTC (permalink / raw)
  To: barebox

Hi,

thanks for working on this!

For trying out your code, I'd like to know how you tested this. How did
you prepare your SD card? Is there anything else I need to be ware of to
get it working?

Regards,
Jan
-- 
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] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-19  8:54       ` Juergen Beisert
@ 2012-09-19  9:37         ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 20+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-19  9:37 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: barebox

On 10:54 Wed 19 Sep     , Juergen Beisert wrote:
> Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 09:42 Wed 19 Sep     , Juergen Beisert wrote:
> > > Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > [...]
> > > >
> > > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > > > index a54ad03..f8eb1b4 100644
> > > > > --- a/arch/arm/Kconfig
> > > > > +++ b/arch/arm/Kconfig
> > > > > @@ -92,6 +92,11 @@ config ARCH_TEGRA
> > > > >  	select CPU_ARM926T
> > > > >  	select HAS_DEBUG_LL
> > > > >
> > > > > +config ARCH_BCM2835
> > > > > +	bool "Broadcom BCM2835 boards"
> > > > > +	select GENERIC_GPIO
> > > > > +	select CPU_ARM1176
> > > >
> > > > please keep in alphabetic order
> > >
> > > What a useless rule...
> >
> > no when you search for something you expect b to be after a not after z
> 
> In Kconfig and Makefiles? Sorry. How often do your search for something in 
> these kind of files?
very
> 
> And how often do you search for something in the C-sources?
more often
> 
> So, what is important and what is useless?
both

I did spend time to cleanup it in the past so if you think my work in useless
I've nothing to said

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-19  9:10 ` Jan Lübbe
@ 2012-09-19 10:00   ` Carlo Caione
  2012-09-19 10:08     ` Jan Lübbe
  2012-09-20 10:25     ` Thomas Petazzoni
  0 siblings, 2 replies; 20+ messages in thread
From: Carlo Caione @ 2012-09-19 10:00 UTC (permalink / raw)
  To: barebox

On 19/09/2012 11:10, Jan Lübbe wrote:
> Hi,
>
> thanks for working on this!

You are welcome :)

> For trying out your code, I'd like to know how you tested this. How did
> you prepare your SD card? Is there anything else I need to be ware of to
> get it working?

Yes, it works for me.
You need an sd card with a single partition fat32 with inside 
bootcode.bin, loader.bin and start.elf (you can find the files here 
https://github.com/raspberrypi/firmware/tree/master/boot)
Then just copy barebox.bin on the card and rename it kernel.img.

Please, let me know if you have any problem.

Thank you,

--
Carlo Caione


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-19 10:00   ` Carlo Caione
@ 2012-09-19 10:08     ` Jan Lübbe
  2012-09-19 10:49       ` Carlo Caione
  2012-09-19 10:49       ` Marc Kleine-Budde
  2012-09-20 10:25     ` Thomas Petazzoni
  1 sibling, 2 replies; 20+ messages in thread
From: Jan Lübbe @ 2012-09-19 10:08 UTC (permalink / raw)
  To: barebox-request

Hi,

On Wed, 2012-09-19 at 12:00 +0200, Carlo Caione wrote:
> You need an sd card with a single partition fat32 with inside 
> bootcode.bin, loader.bin and start.elf (you can find the files here 
> https://github.com/raspberrypi/firmware/tree/master/boot)
> Then just copy barebox.bin on the card and rename it kernel.img.

Ok, I'll try that later today.

What are your next plans? The USB or SD controllers?

Regards,
Jan
-- 
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] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-19 10:08     ` Jan Lübbe
@ 2012-09-19 10:49       ` Carlo Caione
  2012-09-19 10:49       ` Marc Kleine-Budde
  1 sibling, 0 replies; 20+ messages in thread
From: Carlo Caione @ 2012-09-19 10:49 UTC (permalink / raw)
  To: barebox

On 19/09/2012 12:08, Jan Lübbe wrote:
> Hi,
>
> On Wed, 2012-09-19 at 12:00 +0200, Carlo Caione wrote:
>> You need an sd card with a single partition fat32 with inside
>> bootcode.bin, loader.bin and start.elf (you can find the files here
>> https://github.com/raspberrypi/firmware/tree/master/boot)
>> Then just copy barebox.bin on the card and rename it kernel.img.
>
> Ok, I'll try that later today.
>
> What are your next plans? The USB or SD controllers?

SD controller definitely (after patching for Jean-Christophe suggestions).

Regards,

--
Carlo Caione

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-19 10:08     ` Jan Lübbe
  2012-09-19 10:49       ` Carlo Caione
@ 2012-09-19 10:49       ` Marc Kleine-Budde
  2012-09-19 11:10         ` Carlo Caione
  1 sibling, 1 reply; 20+ messages in thread
From: Marc Kleine-Budde @ 2012-09-19 10:49 UTC (permalink / raw)
  To: Jan Lübbe; +Cc: Michael Olbrich, barebox-request


[-- Attachment #1.1: Type: text/plain, Size: 894 bytes --]

On 09/19/2012 12:08 PM, Jan Lübbe wrote:
> Hi,
> 
> On Wed, 2012-09-19 at 12:00 +0200, Carlo Caione wrote:
>> You need an sd card with a single partition fat32 with inside 
>> bootcode.bin, loader.bin and start.elf (you can find the files here 
>> https://github.com/raspberrypi/firmware/tree/master/boot)
>> Then just copy barebox.bin on the card and rename it kernel.img.
> 
> Ok, I'll try that later today.
> 
> What are your next plans? The USB or SD controllers?

IIRC our colleague Michael (mol) said it's another incarnation of the
chipidea IP core, which also in the imx28, imx53, etc...

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-19 10:49       ` Marc Kleine-Budde
@ 2012-09-19 11:10         ` Carlo Caione
  2012-09-19 11:13           ` Marc Kleine-Budde
  0 siblings, 1 reply; 20+ messages in thread
From: Carlo Caione @ 2012-09-19 11:10 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: Michael Olbrich, barebox-request

On 19/09/2012 12:49, Marc Kleine-Budde wrote:
> On 09/19/2012 12:08 PM, Jan Lübbe wrote:
>> Hi,
>>
>> On Wed, 2012-09-19 at 12:00 +0200, Carlo Caione wrote:
>>> You need an sd card with a single partition fat32 with inside
>>> bootcode.bin, loader.bin and start.elf (you can find the files here
>>> https://github.com/raspberrypi/firmware/tree/master/boot)
>>> Then just copy barebox.bin on the card and rename it kernel.img.
>>
>> Ok, I'll try that later today.
>>
>> What are your next plans? The USB or SD controllers?
>
> IIRC our colleague Michael (mol) said it's another incarnation of the
> chipidea IP core, which also in the imx28, imx53, etc...

Great info!

Thank you,

--
Carlo Caione



_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-19 11:10         ` Carlo Caione
@ 2012-09-19 11:13           ` Marc Kleine-Budde
  0 siblings, 0 replies; 20+ messages in thread
From: Marc Kleine-Budde @ 2012-09-19 11:13 UTC (permalink / raw)
  To: Carlo Caione; +Cc: Michael Olbrich, barebox-request


[-- Attachment #1.1: Type: text/plain, Size: 1163 bytes --]

On 09/19/2012 01:10 PM, Carlo Caione wrote:
> On 19/09/2012 12:49, Marc Kleine-Budde wrote:
>> On 09/19/2012 12:08 PM, Jan Lübbe wrote:
>>> Hi,
>>>
>>> On Wed, 2012-09-19 at 12:00 +0200, Carlo Caione wrote:
>>>> You need an sd card with a single partition fat32 with inside
>>>> bootcode.bin, loader.bin and start.elf (you can find the files here
>>>> https://github.com/raspberrypi/firmware/tree/master/boot)
>>>> Then just copy barebox.bin on the card and rename it kernel.img.
>>>
>>> Ok, I'll try that later today.
>>>
>>> What are your next plans? The USB or SD controllers?
>>
>> IIRC our colleague Michael (mol) said it's another incarnation of the
>> chipidea IP core, which also in the imx28, imx53, etc...

Please check this :)

The current mainline kernel implementation is located here:
http://lxr.free-electrons.com/source/drivers/usb/chipidea/

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/2] Add Raspberry-Pi defconfig
  2012-09-18 22:07   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-09-19 22:19     ` Carlo Caione
  2012-09-20  5:19       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 20+ messages in thread
From: Carlo Caione @ 2012-09-19 22:19 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox


On Sep 19, 2012, at 12:07 AM, Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> wrote:

> On 22:30 Tue 18 Sep     , Carlo Caione wrote:
>> Signed-off-by: Carlo Caione <carlo@carlocaione.org>
>> ---
>> arch/arm/configs/rpi_defconfig |   45 ++++++++++++++++++++++++++++++++++++++++
> add this in the board patch
>> 1 file changed, 45 insertions(+)
>> create mode 100644 arch/arm/configs/rpi_defconfig
>> 
>> diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig
>> new file mode 100644
>> index 0000000..2b35ef8
>> --- /dev/null
>> +++ b/arch/arm/configs/rpi_defconfig
>> @@ -0,0 +1,45 @@
>> +CONFIG_ARCH_BCM2835=y
>> +CONFIG_ARCH_TEXT_BASE=0x00008000
>> +CONFIG_MEMORY_LAYOUT_FIXED=y
> why fixed?

The problem here is that TEXT_BASE is at 0x00008000 and without setting CONFIG_MALLOC_BASE my malloc space falls outside of sdram.

> Best Regards,
> J.

Regards,

--
Carlo Caione
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/2] Add Raspberry-Pi defconfig
  2012-09-19 22:19     ` Carlo Caione
@ 2012-09-20  5:19       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 20+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-20  5:19 UTC (permalink / raw)
  To: Carlo Caione; +Cc: barebox

On 00:19 Thu 20 Sep     , Carlo Caione wrote:
> 
> On Sep 19, 2012, at 12:07 AM, Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> wrote:
> 
> > On 22:30 Tue 18 Sep     , Carlo Caione wrote:
> >> Signed-off-by: Carlo Caione <carlo@carlocaione.org>
> >> ---
> >> arch/arm/configs/rpi_defconfig |   45 ++++++++++++++++++++++++++++++++++++++++
> > add this in the board patch
> >> 1 file changed, 45 insertions(+)
> >> create mode 100644 arch/arm/configs/rpi_defconfig
> >> 
> >> diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig
> >> new file mode 100644
> >> index 0000000..2b35ef8
> >> --- /dev/null
> >> +++ b/arch/arm/configs/rpi_defconfig
> >> @@ -0,0 +1,45 @@
> >> +CONFIG_ARCH_BCM2835=y
> >> +CONFIG_ARCH_TEXT_BASE=0x00008000
> >> +CONFIG_MEMORY_LAYOUT_FIXED=y
> > why fixed?
> 
> The problem here is that TEXT_BASE is at 0x00008000 and without setting CONFIG_MALLOC_BASE my malloc space falls outside of sdram.
because your TEXT_BASE is wrong put it at 64MiB it will work

you can load barebox anywhere in ddr and jump, barebox will relocate itself at
it's correct address

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-19 10:00   ` Carlo Caione
  2012-09-19 10:08     ` Jan Lübbe
@ 2012-09-20 10:25     ` Thomas Petazzoni
  1 sibling, 0 replies; 20+ messages in thread
From: Thomas Petazzoni @ 2012-09-20 10:25 UTC (permalink / raw)
  To: Carlo Caione; +Cc: barebox

Dear Carlo Caione,

On Wed, 19 Sep 2012 12:00:23 +0200, Carlo Caione wrote:

> Yes, it works for me.
> You need an sd card with a single partition fat32 with inside 
> bootcode.bin, loader.bin and start.elf (you can find the files here 
> https://github.com/raspberrypi/firmware/tree/master/boot)
> Then just copy barebox.bin on the card and rename it kernel.img.

It would probably be good to put that somewhere in the Barebox
documentation. Generally, I think some per-board documentation is
lacking in Barebox on how to set up Barebox on each particular
platform, especially with regard to the first stage bootloaders that
are often needed on a number of platforms.

And yes, I know, I should be sending a patch augmenting the
documentation with this :)

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-18 20:30 [PATCH 1/2] Add bcm2835/Raspberry-Pi support Carlo Caione
                   ` (2 preceding siblings ...)
  2012-09-19  9:10 ` Jan Lübbe
@ 2012-09-20 15:40 ` Jan Lübbe
  2012-09-20 16:18   ` Carlo Caione
  3 siblings, 1 reply; 20+ messages in thread
From: Jan Lübbe @ 2012-09-20 15:40 UTC (permalink / raw)
  To: barebox

Hi,

I've tried your patches and the boot fine:

barebox 2012.09.0-00168-g5a8f45d #1 Thu Sep 20 17:24:48 CEST 2012

Board: RaspberryPi (BCM2835/ARM1176JZF-S)
Malloc space: 0x00200000 -> 0x005fffff (size  4 MB)
Stack space : 0x00100000 -> 0x00108000 (size 32 kB)
Open /dev/env0 No such file or directory
no valid environment found on /dev/env0. Using default environment
running /env/bin/init...
RPi> / devinfo 
devices:
`---- uart-pl0110
     `---- cs0
`---- global
`---- mem0
     `---- 0x00000000-0x07ffffff: /dev/ram0
`---- ramfs0
`---- devfs0
`---- mem1
     `---- 0x00000000-0x00002007: /dev/defaultenv
`---- mem2
     `---- 0x00000000-0xfffffffe: /dev/mem

drivers:
uart-pl011
     ramfs
     devfs
       mem
    cramfs
RPi> / 

The first patch has some white-space warnings which should be fixed:
$ git am ~/\[PATCH_1_2\]_Add_bcm2835_Raspberry-Pi_support.mbox
Applying: Add bcm2835/Raspberry-Pi support
/ptx/work/dude/jlu/raspi/barebox/.git/rebase-apply/patch:358: trailing whitespace.
        .rate = UART0_CLOCK,
/ptx/work/dude/jlu/raspi/barebox/.git/rebase-apply/patch:410: space before tab in indent.
        uint32_t rstc;
/ptx/work/dude/jlu/raspi/barebox/.git/rebase-apply/patch:411: trailing whitespace.

/ptx/work/dude/jlu/raspi/barebox/.git/rebase-apply/patch:415: trailing whitespace.

/ptx/work/dude/jlu/raspi/barebox/.git/rebase-apply/patch:595: trailing whitespace.

warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.

So feel free to add my Tested-By for the cleaned-up version:
Tested-By: Jan Luebbe <jlu@pengutronix.de>

Regards,
Jan
-- 
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] 20+ messages in thread

* Re: [PATCH 1/2] Add bcm2835/Raspberry-Pi support
  2012-09-20 15:40 ` Jan Lübbe
@ 2012-09-20 16:18   ` Carlo Caione
  0 siblings, 0 replies; 20+ messages in thread
From: Carlo Caione @ 2012-09-20 16:18 UTC (permalink / raw)
  To: barebox-request

On 20/09/2012 17:40, Jan Lübbe wrote:
> Hi,
>
> I've tried your patches and the boot fine:

[cut]

> The first patch has some white-space warnings which should be fixed:
>  $ git am ~/\[PATCH_1_2\]_Add_bcm2835_Raspberry-Pi_support.mbox
> Applying: Add bcm2835/Raspberry-Pi support
> /ptx/work/dude/jlu/raspi/barebox/.git/rebase-apply/patch:358:
> trailing whitespace. .rate = UART0_CLOCK,
> /ptx/work/dude/jlu/raspi/barebox/.git/rebase-apply/patch:410: space
> before tab in indent. uint32_t rstc;
> /ptx/work/dude/jlu/raspi/barebox/.git/rebase-apply/patch:411:
> trailing whitespace.
>
> /ptx/work/dude/jlu/raspi/barebox/.git/rebase-apply/patch:415:
> trailing whitespace.
>
> /ptx/work/dude/jlu/raspi/barebox/.git/rebase-apply/patch:595:
> trailing whitespace.
>
> warning: squelched 1 whitespace error warning: 6 lines add
> whitespace errors.
>
> So feel free to add my Tested-By for the cleaned-up version:
> Tested-By: Jan Luebbe <jlu@pengutronix.de>

Thank you for testing it.
I'll fix the whitespace errors in the next patches.

Best,

--
Carlo Caione

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2012-09-20 16:18 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-18 20:30 [PATCH 1/2] Add bcm2835/Raspberry-Pi support Carlo Caione
2012-09-18 20:30 ` [PATCH 2/2] Add Raspberry-Pi defconfig Carlo Caione
2012-09-18 22:07   ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-19 22:19     ` Carlo Caione
2012-09-20  5:19       ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-18 22:06 ` [PATCH 1/2] Add bcm2835/Raspberry-Pi support Jean-Christophe PLAGNIOL-VILLARD
2012-09-19  7:42   ` Juergen Beisert
2012-09-19  8:14     ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-19  8:54       ` Juergen Beisert
2012-09-19  9:37         ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-19  9:10 ` Jan Lübbe
2012-09-19 10:00   ` Carlo Caione
2012-09-19 10:08     ` Jan Lübbe
2012-09-19 10:49       ` Carlo Caione
2012-09-19 10:49       ` Marc Kleine-Budde
2012-09-19 11:10         ` Carlo Caione
2012-09-19 11:13           ` Marc Kleine-Budde
2012-09-20 10:25     ` Thomas Petazzoni
2012-09-20 15:40 ` Jan Lübbe
2012-09-20 16:18   ` Carlo Caione

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox