Skip to contentSkip to conversation

ARM: add basic support for the Broadcom BCM2835 SoC

PATCH New Stephen Warren 5 participants 19 messages Jun 7, 2012 – Jun 22, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

This SoC is used in the Raspberry Pi, for example.

Initial support is enough to boot to a serial console, and execute a minimal set of U-Boot commands. No drivers are implemented. For more details, see http://www.broadcom.com/products/BCM2835 or
http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf.

---
 arch/arm/cpu/arm1176/bcm2835/Makefile        |   37 +++++++++++++++++
 arch/arm/cpu/arm1176/bcm2835/config.mk       |   19 +++++++++
 arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S |   19 +++++++++
 arch/arm/cpu/arm1176/bcm2835/reset.c         |   27 +++++++++++++
 arch/arm/cpu/arm1176/bcm2835/timer.c         |   55 ++++++++++++++++++++++++++
 arch/arm/include/asm/arch-bcm2835/timer.h    |   37 +++++++++++++++++
 6 files changed, 194 insertions(+)
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/Makefile
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/config.mk
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/reset.c
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/timer.c
 create mode 100644 arch/arm/include/asm/arch-bcm2835/timer.h
arch/arm/cpu/arm1176/bcm2835/Makefile new file +37 -0
new file mode 100644
index 0000000..4ea6d6b
@@ -0,0 +1,37 @@
+#
+# 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.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(SOC).o
+
+SOBJS	:= lowlevel_init.o
+COBJS	:= reset.o timer.o
+
+SRCS	:= $(SOBJS:.o=.c) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
+
+all:	$(obj).depend $(LIB)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $(OBJS))
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
arch/arm/cpu/arm1176/bcm2835/config.mk new file +19 -0
new file mode 100644
index 0000000..b87ce24
@@ -0,0 +1,19 @@
+#
+# (C) Copyright 2012 Stephen Warren
+#
+# 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.
+
+# Don't attempt to override the target CPU/ABI options;
+# the Raspberry Pi toolchain does the right thing by default.
+PLATFORM_RELFLAGS := $(filter-out -msoft-float,$(PLATFORM_RELFLAGS))
+PLATFORM_CPPFLAGS := $(filter-out -march=armv5t,$(PLATFORM_CPPFLAGS))
arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S new file +19 -0
new file mode 100644
index 0000000..c7b0843
@@ -0,0 +1,19 @@
+/*
+ * (C) Copyright 2012 Stephen Warren
+ *
+ * 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.
+ */
+
+.globl lowlevel_init
+lowlevel_init:
+	mov	pc, lr
arch/arm/cpu/arm1176/bcm2835/reset.c new file +27 -0
new file mode 100644
index 0000000..69c9577
@@ -0,0 +1,27 @@
+/*
+ * (C) Copyright 2012 Stephen Warren
+ *
+ * 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.
+ */
+
+#include <common.h>
+#include <asm/io.h>
+
+void reset_cpu(ulong addr)
+{
+	/*
+	 * We should probably use the WDT module here, but an unaligned
+	 * access will do the trick for now.
+	 */
+	readl(1);
+}
arch/arm/cpu/arm1176/bcm2835/timer.c new file +55 -0

55 lines not on this page · raw message

arch/arm/include/asm/arch-bcm2835/timer.h new file +37 -0
new file mode 100644
index 0000000..30c70e0
@@ -0,0 +1,37 @@
+/*
+ * (C) Copyright 2012 Stephen Warren
+ *
+ * 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.
+ */
+
+#ifndef _BCM2835_TIMER_H
+#define _BCM2835_TIMER_H
+
+#define BCM2835_TIMER_PHYSADDR	0x20003000
+
+struct bcm2835_timer_regs {
+	u32 cs;
+	u32 clo;
+	u32 chi;
+	u32 c0;
+	u32 c1;
+	u32 c2;
+	u32 c3;
+};
+
+#define BCM2835_TIMER_CS_M3	(1 << 3)
+#define BCM2835_TIMER_CS_M2	(1 << 2)
+#define BCM2835_TIMER_CS_M1	(1 << 1)
+#define BCM2835_TIMER_CS_M0	(1 << 0)
+
+#endif
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

Quoted 6 lines · Stephen Warren

This SoC is used in the Raspberry Pi, for example.

Initial support is enough to boot to a serial console, and execute a minimal set of U-Boot commands. No drivers are implemented. For more details, see http://www.broadcom.com/products/BCM2835 or
http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf.

Albert,

Do these patches look good? I'm assuming you do accept direct patch emails, and aren't waiting for this to be part of a pull request or anything like that?

Oleksandr Tymoshenko reports that he now has a working U-Boot USB driver for this SoC/board, so the port will soon be quite practically useful.

Thanks.

#2 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

In reply to Stephen Warren
Quoted 8 lines · Stephen Warren

This SoC is used in the Raspberry Pi, for example.

Initial support is enough to boot to a serial console, and execute a minimal set of U-Boot commands. No drivers are implemented. For more details, see http://www.broadcom.com/products/BCM2835 or
http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf.

Albert, per your request to remind you about patches in your backlog, there is this series.

BTW, I expect quite a few more patches to come in for the RPi; I already have a bunch of small tweaks queued up and I know there's a USB driver that works and hopefully will be sent soon. Should I be sending pull requests for these instead to ease your work? Do you take pull requests from git repos not on denx.de?

Thanks.

#3 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

Hi Stephen,

Quoted 8 lines · Stephen Warren
Quoted 7 lines · Stephen Warren

This SoC is used in the Raspberry Pi, for example.

Initial support is enough to boot to a serial console, and execute a minimal set of U-Boot commands. No drivers are implemented. For more details, see http://www.broadcom.com/products/BCM2835 or
http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf.

Quoted 4 lines
Quoted 1 line

Albert, per your request to remind you about patches in your backlog, there is this series.

I've marked the series as assigned to me and under review. IIUC, it is from June 7, so after the merge window closing, and will thus get in the next branch.

Quoted 7 lines

BTW, I expect quite a few more patches to come in for the RPi; I already have a bunch of small tweaks queued up and I know there's a USB driver that works and hopefully will be sent soon. Should I be sending pull requests for these instead to ease your work? Do you take pull requests from git repos not on denx.de?

Thanks.

I am sorry, I will not take in pull requests from any other repo than a custodian's one. Please point me to individual patches -- ideally as patchwork URLS.

Amicalement,

Signature · 1 line
Albert.
#4 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

Quoted 12 lines · Albert ARIBAUD

Hi Stephen,

Quoted 8 lines · Stephen Warren
Quoted 7 lines · Stephen Warren

This SoC is used in the Raspberry Pi, for example.

Initial support is enough to boot to a serial console, and execute a minimal set of U-Boot commands. No drivers are implemented. For more details, see http://www.broadcom.com/products/BCM2835 or
http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Albert, per your request to remind you about patches in your backlog, there is this series.

I've marked the series as assigned to me and under review. IIUC, it is from June 7, so after the merge window closing, and will thus get in the next branch.

OK, great.

Quoted 11 lines
Quoted 7 lines

BTW, I expect quite a few more patches to come in for the RPi; I already have a bunch of small tweaks queued up and I know there's a USB driver that works and hopefully will be sent soon. Should I be sending pull requests for these instead to ease your work? Do you take pull requests from git repos not on denx.de?

Thanks.

I am sorry, I will not take in pull requests from any other repo than a custodian's one. Please point me to individual patches -- ideally as patchwork URLS.

I haven't yet posted any patches other than the two you've assigned as mentioned above; I was waiting for those two to be merged first. Perhaps I should set up a custodian git repo to house them.

#5 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

Dear Stephen Warren,

Quoted 4 lines · In message <[email protected]> you wrote:

I haven't yet posted any patches other than the two you've assigned as mentioned above; I was waiting for those two to be merged first. Perhaps I should set up a custodian git repo to house them.

You misunderstand. A custodian repo is nothing you can set up yourself.

Please read the docs, especially
http://www.denx.de/wiki/U-Boot/Patches

It is _mandatory_ that all patches get posted here.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
THIS IS A 100% MATTER  PRODUCT:  In  the  Unlikely  Event  That  This
Merchandise  Should  Contact  Antimatter  in Any Form, a Catastrophic
Explosion Will Result.
#6 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

Quoted 10 lines · Wolfgang Denk

Dear Stephen Warren,

Quoted 4 lines · In message <[email protected]> you wrote:

I haven't yet posted any patches other than the two you've assigned as mentioned above; I was waiting for those two to be merged first. Perhaps I should set up a custodian git repo to house them.

You misunderstand. A custodian repo is nothing you can set up yourself.

No, I don't misunderstand at all. By "set up" I simply meant to follow the process to obtain one; I didn't mean to create one myself.

#7 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

Dear Stephen Warren,

Quoted 10 lines · In message <[email protected]> you wrote:
Quoted 7 lines
Quoted 4 lines

I haven't yet posted any patches other than the two you've assigned as mentioned above; I was waiting for those two to be merged first. Perhaps I should set up a custodian git repo to house them.

You misunderstand. A custodian repo is nothing you can set up yourself.

No, I don't misunderstand at all. By "set up" I simply meant to follow the process to obtain one; I didn't mean to create one myself.

For which sub-system to you volunteer to become the custodian?

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Work 8 hours, sleep 8 hours; but not the same 8 hours.
#8 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

Quoted 8 lines · Wolfgang Denk

Dear Stephen Warren,

Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 5 lines
Quoted 4 lines

I haven't yet posted any patches other than the two you've assigned as mentioned above; I was waiting for those two to be merged first. Perhaps I should set up a custodian git repo to house them.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

You misunderstand. A custodian repo is nothing you can set up yourself.

No, I don't misunderstand at all. By "set up" I simply meant to follow the process to obtain one; I didn't mean to create one myself.

For which sub-system to you volunteer to become the custodian?

The BCM2835 ARM sub-architecture, as used in the Raspberry Pi.

#9 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

Quoted 12 lines · Stephen Warren
Quoted 11 lines · Wolfgang Denk

Dear Stephen Warren,

Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 7 lines
Quoted 4 lines

I haven't yet posted any patches other than the two you've assigned as mentioned above; I was waiting for those two to be merged first. Perhaps I should set up a custodian git repo to house them.

You misunderstand. A custodian repo is nothing you can set up yourself.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

No, I don't misunderstand at all. By "set up" I simply meant to follow the process to obtain one; I didn't mean to create one myself.

For which sub-system to you volunteer to become the custodian?

The BCM2835 ARM sub-architecture, as used in the Raspberry Pi.

What Wolfgang is driving at, I believe, is that there's a threshold for getting a custodian tree hosted on denx, as opposed to hosting $wherever and using send-email and so forth, which is always required (since all patches must be posted).

Signature · 1 line
Tom
#10 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

In reply to Stephen Warren

Dear Stephen Warren,

Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 2 lines

For which sub-system to you volunteer to become the custodian?

The BCM2835 ARM sub-architecture, as used in the Raspberry Pi.

I see no reason to install a new custodian just for a single SoC.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The human mind ordinarily operates at only ten percent of its capaci-
ty - the rest is overhead for the operating system.
#11 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

Quoted 9 lines · Wolfgang Denk

Dear Stephen Warren,

Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 2 lines

For which sub-system to you volunteer to become the custodian?

The BCM2835 ARM sub-architecture, as used in the Raspberry Pi.

I see no reason to install a new custodian just for a single SoC.

OK, that's fine; I'll rely solely on patch email then. I just figured on saving Albert some git am work, seeing as how many other single SoCs are handled via git pull already.

#12 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

Dear Stephen Warren,

Quoted 4 lines · In message <[email protected]> you wrote:

OK, that's fine; I'll rely solely on patch email then. I just figured on saving Albert some git am work, seeing as how many other single SoCs are handled via git pull already.

Are there? Which for example?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Those who do not  understand  Unix  are  condemned  to  reinvent  it,
poorly.              - Henry Spencer, University of Toronto Unix hack
#13 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

Quoted 9 lines · Wolfgang Denk

Dear Stephen Warren,

Quoted 4 lines · In message <[email protected]> you wrote:

OK, that's fine; I'll rely solely on patch email then. I just figured on saving Albert some git am work, seeing as how many other single SoCs are handled via git pull already.

Are there? Which for example?

Tegra does this for sure. There are also u-boot-ti.git, u-boot-samsung.git, and u-boot-marvell.git that I believe are for the same purpose.

#14 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

Dear Stephen Warren,

Quoted 10 lines · In message <[email protected]> you wrote:
Quoted 6 lines
Quoted 4 lines

OK, that's fine; I'll rely solely on patch email then. I just figured on saving Albert some git am work, seeing as how many other single SoCs are handled via git pull already.

Are there? Which for example?

Tegra does this for sure. There are also u-boot-ti.git, u-boot-samsung.git, and u-boot-marvell.git that I believe are for the same purpose.

All these handle a number of processors - note that (with the exception of tegra) these are explicitly named as vendor trees, collingting all processors from some silicon vendors. Have a closer look at the imx (Freescale) or TI or Samsung or Marvell trees - all these handle a pretty large number of different SoCs.

We can discuss to add a Broadcom repository one day - but only after it turns out that there is sufficiently large traffic here on the list to justify another split. Given that Broadcom has essentially zero coverage in mainline U-Boot, there is some way to go before we reach such a point.

Just for a single SoC it makes no sense to set up a new custodian tree.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Life is a game. Money is how we keep score.              - Ted Turner
#15 lore raw

PATCH 1/2 ARM: add basic support for the Broadcom BCM2835 SoC

In reply to Stephen Warren
Quoted 9 lines · Stephen Warren
Quoted 8 lines · Wolfgang Denk

Dear Stephen Warren,

Quoted 4 lines · In message <[email protected]> you wrote:

OK, that's fine; I'll rely solely on patch email then. I just figured on saving Albert some git am work, seeing as how many other single SoCs are handled via git pull already.

Quoted 5 lines
Quoted 1 line

Are there? Which for example?

Tegra does this for sure. There are also u-boot-ti.git, u-boot-samsung.git, and u-boot-marvell.git that I believe are for the same purpose.

u-boot-ti covers omap3 (and derrivatives), omap4, omap5, am33xx and davinci SoCs. u-boot-samsung also covers a handful of SoCs (at least 3 by a quick count). kirkwood (marvell) also has a number of boards. I think u-boot-tegra is probably the smallest example but that's still 6 boards (and another SoC family trying to get in). Once BCM2835 (or BCM283x or BCM28xx or whatever the generic name would be) reaches that threshold, I imagine Wolfgang would see the need for a custodian repository.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120622/aecdc8d3/attachment.pgp>
#16 lore raw

PATCH 2/2 ARM: bcm2835: add Raspberry Pi model B board

In reply to Stephen Warren

The Raspberry Pi model B uses the BCM2835 SoC, has 256MB of RAM, contains an SMSC 9512 USB LAN/Hub chip, and various IO connectors. For more details, see http://www.raspberrypi.org/.

---
 MAINTAINERS                      |    4 ++
 board/raspberrypi/rpi_b/Makefile |   34 ++++++++++++++++
 board/raspberrypi/rpi_b/rpi_b.c  |   32 +++++++++++++++
 boards.cfg                       |    1 +
 include/configs/rpi_b.h          |   80 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 151 insertions(+)
 create mode 100644 board/raspberrypi/rpi_b/Makefile
 create mode 100644 board/raspberrypi/rpi_b/rpi_b.c
 create mode 100644 include/configs/rpi_b.h
MAINTAINERS +4 -0
index f796872..f12d862 100644
@@ -913,6 +913,10 @@ Stephen Warren <[email protected]>
 	ventana		Tegra2 (ARM7 & A9 Dual Core)
 	paz00		Tegra2 (ARM7 & A9 Dual Core)
 
+Stephen Warren <[email protected]>
+
+	rpi_b		BCM2835 (ARM1176)
+
 Thomas Weber <[email protected]>
 
 	devkit8000	ARM ARMV7 (OMAP3530 SoC)
board/raspberrypi/rpi_b/Makefile new file +34 -0
new file mode 100644
index 0000000..9d0c377
@@ -0,0 +1,34 @@
+#
+# 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.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(BOARD).o
+
+COBJS	:= $(BOARD).o
+
+SRCS	:= $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+
+$(LIB):	$(obj).depend $(OBJS)
+	$(call cmd_link_o_target, $(OBJS))
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/raspberrypi/rpi_b/rpi_b.c new file +32 -0
new file mode 100644
index 0000000..f39440f
@@ -0,0 +1,32 @@
+/*
+ * (C) Copyright 2012 Stephen Warren
+ *
+ * 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.
+ */
+
+#include <common.h>
+#include <asm/global_data.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int dram_init(void)
+{
+	gd->ram_size = SZ_256M;
+
+	return 0;
+}
+
+int board_init(void)
+{
+	return 0;
+}
boards.cfg +1 -0
index 0dee43f..b82534e 100644
@@ -48,6 +48,7 @@ mx35pdk                      arm         arm1136     -                   freesca
 apollon			     arm	 arm1136     apollon		 -	        omap24xx
 omap2420h4                   arm         arm1136     -                   ti             omap24xx
 tnetv107x_evm                arm         arm1176     tnetv107xevm        ti             tnetv107x
+rpi_b                        arm         arm1176     rpi_b               raspberrypi    bcm2835
 integratorap_cm720t          arm         arm720t     integrator          armltd         -           integratorap:CM720T
 integratorap_cm920t          arm         arm920t     integrator          armltd         -           integratorap:CM920T
 integratorcp_cm920t          arm         arm920t     integrator          armltd         -           integratorcp:CM920T
include/configs/rpi_b.h new file +80 -0

80 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#17 lore raw

PATCH 2/2 ARM: bcm2835: add Raspberry Pi model B board

Hi Stephen,

Quoted 5 lines · Stephen Warren

The Raspberry Pi model B uses the BCM2835 SoC, has 256MB of RAM, contains an SMSC 9512 USB LAN/Hub chip, and various IO connectors. For more details, see http://www.raspberrypi.org/.

Now I really can't wait for my Raspberry Pi to turn up (due on 25 June)

Looking forward to trying this out - any hints / traps for young players?

Regards,

Graeme

#18 lore raw

PATCH 2/2 ARM: bcm2835: add Raspberry Pi model B board

Quoted 7 lines · Graeme Russ

Hi Stephen,

Quoted 4 lines · Stephen Warren

The Raspberry Pi model B uses the BCM2835 SoC, has 256MB of RAM, contains an SMSC 9512 USB LAN/Hub chip, and various IO connectors. For more details, see http://www.raspberrypi.org/.

Quoted 5 lines
Quoted 1 line

Now I really can't wait for my Raspberry Pi to turn up (due on 25 June)

Looking forward to trying this out - any hints / traps for young players?

Mostly U-Boot on RPi works like it would anywhere else. The few things to watch out for are:

a) Pick the correct toolchain to build with. For my branch, I assumed everyone was building for armhf/hardfp these days, and so from the tools repo:

https://github.com/raspberrypi/tools.git

I picked the toolchain in the x86-linux64-cross-arm-linux-hardfp sub-directory, and adjusted the U-Boot Makefiles to suite options required for that toolchain.

However, Oleksandr's U-Boot branch appears to rely upon the armel/softfp toolchain in the linux-x86 sub-directory.

b) You need to appropriate stuff in config.txt on the SD card - I apparently have:

device_tree=kernel.dtb
device_tree_address=0x100
kernel_address=0x8000
disable_commandline_tags=1

and I store U-Boot in kernel.img.

(although I think the DT-related values are irrelevant when I'm booting U-Boot instead of a kernel)

You will of course need a 3.3v serial->something (USB or true RS232) adapter hooked up to GPIO header pins 6/8/10 for the console, since there's no video output support in U-Boot yet (although I suppose we could add USB keyboard support soon...)

Oh, and you'll probably want to update the binary firmware images on your SD card to the latest from:
https://github.com/raspberrypi/firmware.git

The following email from Oleksandr will be interesting too:
http://lists.infradead.org/pipermail/linux-rpi-kernel/2012-June/000060.html

Of course, this is all if you specifically want to use U-Boot. The default boot process already works completely, without involving U-Boot, but of course doesn't support e.g. network booting.