[RFC PATCH] Very minimal bcm2708 support for linux-next

Simon Arlott simon at fire.lp0.eu
Wed May 30 07:12:44 EDT 2012

On Wed, May 30, 2012 04:45, Stephen Warren wrote:
> (RFC - not for commit yet)

Have you looked at the rpi01-mach, rpi02-plat and rpi03-extra branches?

They have everything in separate commits and they're roughly ready for
mainline (there's no documentation on DT yet). Everything going into
rpi-linear is also merged as a fixup to the commits in those branches.

It also has a working frame buffer and there's no reason to leave this
out of any submission to mainline.

Is there any reason not to commit the final .dts files in the initial
patch rather than adding them in with other patches?

> ---
> First off, let me say that I think it's great people have started porting
> the BCM2708 support to later kernels such as 3.4, cleaned it up, worked
> on DT support, etc.
> Personally, my /primary/ aim is to get as much BCM2708 support as possible
> into mainline Linux, rather than working with even up-to-date downstream
> kernels. This is mainly because I'm already involved in upstreaming another
> ARM SoC, so am interested in upstream, but also because my RPi use-cases
> don't need any of the graphics-related stuff that's likely to be a very
> long pole in the upstreaming process. So, a mainline kernel could be usable
> for me very soon.
> Given all that, I decided to try to extract the minimum code from the rpi-
> linear branch to get the system at least partially booting, and excluding
> anything that I thought would need more discussion or rework during the
> upstreaming process. The patch below is what I came up with. It boots
> to the point where the timer is initialized, at least if you enable
> earlyprintk. I stopped didn't add the timer stuff in yet, because I wanted
> to resolve the comments I made on the timer DT binding before working on
> that.
> TO DO:
> * Add correct git authorship, signed-off-by tags, etc. based on some more
>   git research.
> * Remove mem and bootargs values once the bootloader is enhanced to fill
>   these in.

These are not required. If not using the future bootloader, ftdput can be
used to set up those values. Memory is not fixed (256MB below is invalid as
the GPU requires some memory).

> Changes relative to the rpi-linear branch:
> * IO_ADDRESS() macro in hardware.h changed to push the virtual address of
>   the static mapping to the end of the vmalloc area, with the hope of
>   reducing vmalloc virtual address fragmentation. We should probably explore
>   drastically cutting down on the size of the statically mapped areas too,
>   or even completely eliminating them (except for the debug UART for
>   DEBUG_L) but that could come in a later patch.
> What are people's thoughts on this? I'm not sure whether people are
> intending to keeping working on downstream kernels that track the latest
> upstream as much as possible, or were planning on starting this upstream
> process themselves anyway or ...? If needed, I do have a kernel.org
> account and am known to the ARM SoC maintainers, and hence volunteer to
> maintain the RPi patch tree for linux-next if desired, taking patches from
> whoever sends them, once they've passed review on the rpi mailing list.
>  arch/arm/Kconfig                                 |   20 +++++
>  arch/arm/Makefile                                |    1 +
>  arch/arm/boot/dts/bcm2835-rpi-a.dts              |   12 +++
>  arch/arm/boot/dts/bcm2835-rpi-b.dts              |   12 +++
>  arch/arm/boot/dts/bcm2835.dtsi                   |   10 +++
>  arch/arm/configs/bcm2708_defconfig               |  105 ++++++++++++++++++++++
>  arch/arm/mach-bcm2708/Kconfig                    |   11 +++
>  arch/arm/mach-bcm2708/Makefile                   |    1 +
>  arch/arm/mach-bcm2708/Makefile.boot              |    5 ++
>  arch/arm/mach-bcm2708/bcm2708.c                  |   87 ++++++++++++++++++
>  arch/arm/mach-bcm2708/include/mach/debug-macro.S |   22 +++++
>  arch/arm/mach-bcm2708/include/mach/hardware.h    |   32 +++++++
>  arch/arm/mach-bcm2708/include/mach/timex.h       |   26 ++++++
>  arch/arm/mach-bcm2708/include/mach/uncompress.h  |   57 ++++++++++++
>  14 files changed, 401 insertions(+)
>  create mode 100644 arch/arm/boot/dts/bcm2835-rpi-a.dts
>  create mode 100644 arch/arm/boot/dts/bcm2835-rpi-b.dts
>  create mode 100644 arch/arm/boot/dts/bcm2835.dtsi
>  create mode 100644 arch/arm/configs/bcm2708_defconfig
>  create mode 100644 arch/arm/mach-bcm2708/Kconfig
>  create mode 100644 arch/arm/mach-bcm2708/Makefile
>  create mode 100644 arch/arm/mach-bcm2708/Makefile.boot
>  create mode 100644 arch/arm/mach-bcm2708/bcm2708.c
>  create mode 100644 arch/arm/mach-bcm2708/include/mach/debug-macro.S
>  create mode 100644 arch/arm/mach-bcm2708/include/mach/hardware.h
>  create mode 100644 arch/arm/mach-bcm2708/include/mach/timex.h
>  create mode 100644 arch/arm/mach-bcm2708/include/mach/uncompress.h

Simon Arlott

More information about the linux-rpi-kernel mailing list