public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mips: add base support for atheros ar71xx based SOCs
Date: Sat, 19 Dec 2015 22:57:52 +0100	[thread overview]
Message-ID: <5675D2E0.5000303@gmail.com> (raw)
In-Reply-To: <BLU437-SMTP9890001EF32AAE5B07EE15FFE10@phx.gbl>



Am 18.12.2015 um 08:34 schrieb Wills Wang:
> This patch enable work for ar933x SOC, tested on ar9331
> 
> Signed-off-by: Wills Wang <wills.wang@live.com>
> ---
> 
>  arch/mips/Makefile                          |    1 +
>  arch/mips/include/asm/ar71xx.h              | 1144 +++++++++++++++++++++++++++
>  arch/mips/mach-ath79/Makefile               |    8 +
>  arch/mips/mach-ath79/ar933x/Makefile        |   11 +
>  arch/mips/mach-ath79/ar933x/dram.c          |   27 +
>  arch/mips/mach-ath79/ar933x/lowlevel_init.S |  784 ++++++++++++++++++
>  arch/mips/mach-ath79/ar933x/reset.c         |   29 +
>  arch/mips/mach-ath79/ar933x/serial.c        |  348 ++++++++
>  arch/mips/mach-ath79/config.mk              |    8 +
>  9 files changed, 2360 insertions(+)
>  create mode 100644 arch/mips/include/asm/ar71xx.h
>  create mode 100644 arch/mips/mach-ath79/Makefile
>  create mode 100644 arch/mips/mach-ath79/ar933x/Makefile
>  create mode 100644 arch/mips/mach-ath79/ar933x/dram.c
>  create mode 100644 arch/mips/mach-ath79/ar933x/lowlevel_init.S
>  create mode 100644 arch/mips/mach-ath79/ar933x/reset.c
>  create mode 100644 arch/mips/mach-ath79/ar933x/serial.c
>  create mode 100644 arch/mips/mach-ath79/config.mk
> 

We are transitioning towards "Driver Model" and new code should already
support it where possible. Thus rewrite at least serial.c as DM
compatible driver in drivers/serial/. If possible you should also
support device-tree. The next branch in u-boot-mips tree has a patch
which adds the initial infrastructure for it on MIPS.

Put all SoC specific header files in arch/mips/include/asm/arch-ath79/.
The next branch in u-boot-mips tree already has a patch to support again
the creation of symbolic links arch/mips/include/asm/arch ->
arch/mips/include/asm/arch-SOC. Apart from that your directory structure
is fine.

Add proper Kconfig symbols for your SoC. Also you need to have at least
one board that uses your SoC. That board have to be created in board/
directory along with proper Kconfig and MAINTAINERS files. Additionally
you need to add a Kconfig defconfig file for your board in directory
configs/. I wonder how you got your code compiled without a possibility
to select it with Kconfig.

Try to minimize the code in lowlevel_init.S. It is only intended to
bring up memory controllers and DRAM and maybe some clocks before a C
environment is available. Other code should be always written in C.
If your SoC has some SRAM space, you could use that for the initial
stack and global data and drop lowlevel_init.S entirely.

Please create at least three patches in your next patch series:
1) add ar933x SoC
2) add serial driver for ar933x (or one for all ath79 compatible SoC's)
3) add one ar933x based board (e.g. an official evaluation kit)

-- 
- Daniel

      parent reply	other threads:[~2015-12-19 21:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18  7:34 [U-Boot] [PATCH] mips: add base support for atheros ar71xx based SOCs Wills Wang
2015-12-18 12:54 ` Antony Pavlov
2015-12-18 15:24   ` Wills Wang
2015-12-18 16:16     ` Antony Pavlov
2015-12-18 16:44       ` Wills Wang
2015-12-18 18:13         ` Antony Pavlov
2015-12-19 21:57 ` Daniel Schwierzeck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5675D2E0.5000303@gmail.com \
    --to=daniel.schwierzeck@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox