All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: "Bin Meng" <bmeng.cn@gmail.com>, "Tom Rini" <trini@konsulko.com>,
	"Mark Kettenis" <kettenis@openbsd.org>,
	"U-Boot Mailing List" <u-boot@lists.denx.de>,
	"Bharat Gooty" <bharat.gooty@broadcom.com>,
	"Rayagonda Kokatanur" <rayagonda.kokatanur@broadcom.com>,
	"Oliver Graute" <oliver.graute@kococonnector.com>,
	"Bin Meng" <bin.meng@windriver.com>,
	"Leo Liang" <ycliang@andestech.com>,
	"Tianrui Wei" <tianrui-wei@outlook.com>,
	"Stephan Gerhold" <stephan@gerhold.net>,
	"Padmarao Begari" <padmarao.begari@microchip.com>,
	"Kishon Vijay Abraham I" <kishon@ti.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Michael Walle" <michael@walle.cc>,
	"Masami Hiramatsu" <masami.hiramatsu@linaro.org>,
	"Asherah Connor" <ashe@kivikakk.ee>,
	"Wasim Khan" <wasim.khan@nxp.com>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"Igor Opaniuk" <igor.opaniuk@foundries.io>,
	"Heiko Schocher" <hs@denx.de>, "Ye Li" <ye.li@nxp.com>,
	"Stefan Roese" <sr@denx.de>,
	"Vabhav Sharma" <vabhav.sharma@nxp.com>,
	"Marek Behún" <marek.behun@nic.cz>,
	"Weijie Gao" <weijie.gao@mediatek.com>,
	"AKASHI Takahiro" <takahiro.akashi@linaro.org>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Pratyush Yadav" <p.yadav@ti.com>
Subject: Re: [PATCH 1/5] arm: apple: Add initial support for Apple's M1 SoC
Date: Sat, 25 Sep 2021 07:27:43 -0600	[thread overview]
Message-ID: <CAPnjgZ05z+HQ4EZ-R_ip3Y1z_Hz=z9+YmMqs7LnaU3g4f-YUNg@mail.gmail.com> (raw)
In-Reply-To: <56147354b55fb501@bloch.sibelius.xs4all.nl>

Hi Mark,

On Tue, 21 Sept 2021 at 10:09, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>
> > From: Bin Meng <bmeng.cn@gmail.com>
> > Date: Tue, 21 Sep 2021 23:53:10 +0800
> >
> > On Tue, Sep 21, 2021 at 8:42 PM Tom Rini <trini@konsulko.com> wrote:
> > >
> > > On Sun, Sep 19, 2021 at 10:33:25PM +0200, Mark Kettenis wrote:
> > > > > From: Bin Meng <bmeng.cn@gmail.com>
> > > > > Date: Sun, 19 Sep 2021 09:17:07 +0800
> > > > >
> > > > > Hi Mark,
> > > > >
> > > > > On Sun, Sep 19, 2021 at 9:04 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> > > > > >
> > > > > > Hi Mark,
> > > > > >
> > > > > > On Sat, Sep 18, 2021 at 9:55 PM Mark Kettenis <kettenis@openbsd.org> wrote:
> > > > > > >
> > > > > > > Add support for Apple's M1 SoC that is used in "Apple Silicon"
> > > > > > > Macs.  This builds a basic U-Boot that can be used as a payload
> > > > > > > for the m1n1 boot loader being developed by the Asahi Linux
> > > > > > > project.
> > > > > > >
> > > > > > > Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
> > > > > > > ---
> > > > > > >  arch/arm/Kconfig                    |  22 ++++
> > > > > > >  arch/arm/Makefile                   |   1 +
> > > > > > >  arch/arm/mach-apple/Kconfig         |  18 ++++
> > > > > > >  arch/arm/mach-apple/Makefile        |   4 +
> > > > > > >  arch/arm/mach-apple/board.c         | 158 ++++++++++++++++++++++++++++
> > > > > > >  arch/arm/mach-apple/lowlevel_init.S |  16 +++
> > > > > > >  configs/apple_m1_defconfig          |  14 +++
> > > > > > >  include/configs/apple.h             |  38 +++++++
> > > > > > >  8 files changed, 271 insertions(+)
> > > > > > >  create mode 100644 arch/arm/mach-apple/Kconfig
> > > > > > >  create mode 100644 arch/arm/mach-apple/Makefile
> > > > > > >  create mode 100644 arch/arm/mach-apple/board.c
> > > > > > >  create mode 100644 arch/arm/mach-apple/lowlevel_init.S
> > > > > > >  create mode 100644 configs/apple_m1_defconfig
> > > > > > >  create mode 100644 include/configs/apple.h
> > > > > > >
[..]

> > > > > > > diff --git a/arch/arm/mach-apple/lowlevel_init.S b/arch/arm/mach-apple/lowlevel_init.S
> > > > > > > new file mode 100644
> > > > > > > index 0000000000..0f5313163e
> > > > > > > --- /dev/null
> > > > > > > +++ b/arch/arm/mach-apple/lowlevel_init.S
> > > > > > > @@ -0,0 +1,16 @@
> > > > > > > +/* SPDX-License-Identifier: GPL-2.0+ */
> > > > > > > +/*
> > > > > > > + * (C) Copyright 2021 Mark Kettenis <kettenis@openbsd.org>
> > > > > > > + */
> > > > > > > +
> > > > > > > +.align 8
> > > > > > > +.global fw_dtb_pointer
> > > > > > > +fw_dtb_pointer:
> > > > > > > +       .quad   0
> > > > > >
> > > > > > Is this filled in by m1n1?
> > > > >
> > > > > Sorry I misread, so this is passed by m1n1 and filled in by U-Boot. I
> > > > > think we should stop using CONFIG_OF_BOARD, and for such case we
> > > > > should use CONFIG_OF_PRIOR_STAGE.
> > > >
> > > > Yes, CONFIG_OF_PRIOR_STAGE would work as well.  But Tom was talking
> > > > about removing that option in favour of CONFIG_OF_BOARD the other day.
> > >
> > > Yes.  I was even looking for some feedback from you, Bin, on converting
> > > some boards from CONFIG_OF_PRIOR_STAGE to CONFIG_OF_BOARD.  It seems
> > > like CONFIG_OF_PRIOR_STAGE is a subset of CONFIG_OF_BOARD, at the cost
> > > of possibly a few bytes.
> >
> > Ah, I thought we wanted to do the other way around, by removing
> > CONFIG_OF_BOARD, and convert that to CONFIG_OF_PRIORI_STAGE?
>
> I must say that I see some logic in keeping both, where
> CONFIG_OF_BOARD indicates that the device tree is somehow stored on
> the board and U-Boot has to run some code to fetch it, and
> CONFIG_OF_PRIOR_STAGE is used when the device tree is provided by
> firmware that runs before U-Boot.
>
> In that case I obviously should use CONFIG_OF_PRIOR_STAGE here.

Well see Ilias' series where he proposed going with OF_BOARD!

Tested on: Macbook Air M1
Tested-by: Simon Glass <sjg@chromium.org>

Regards,
Simon

  reply	other threads:[~2021-09-25 13:28 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-18 13:54 [PATCH 0/5] Apple M1 Support Mark Kettenis
2021-09-18 13:54 ` [PATCH 1/5] arm: apple: Add initial support for Apple's M1 SoC Mark Kettenis
2021-09-19  1:04   ` Bin Meng
2021-09-19  1:17     ` Bin Meng
2021-09-19 20:33       ` Mark Kettenis
2021-09-21 12:42         ` Tom Rini
2021-09-21 15:53           ` Bin Meng
2021-09-21 16:04             ` Tom Rini
2021-09-21 16:08             ` Mark Kettenis
2021-09-25 13:27               ` Simon Glass [this message]
2021-09-19 20:05     ` Mark Kettenis
2021-09-20  3:15   ` Simon Glass
2021-09-20  8:49     ` Mark Kettenis
2021-09-21  1:11       ` Simon Glass
2021-09-18 13:54 ` [PATCH 2/5] serial: s5p: Add Apple M1 support Mark Kettenis
2021-09-19  1:11   ` Bin Meng
2021-09-19 20:30     ` Mark Kettenis
2021-09-20  3:15   ` Simon Glass
2021-09-25 13:27     ` Simon Glass
2021-10-02 22:15     ` Mark Kettenis
2021-10-03  2:01       ` Simon Glass
2021-09-18 13:54 ` [PATCH 3/5] misc: Add Apple DART driver Mark Kettenis
2021-09-20  3:16   ` Simon Glass
2021-09-20  8:33     ` Mark Kettenis
2021-09-21  1:11       ` Simon Glass
2021-09-25 13:27         ` Simon Glass
2021-09-26 20:53         ` Mark Kettenis
2021-09-27 20:14           ` Simon Glass
2021-09-18 13:54 ` [PATCH 4/5] arm: dts: apple: Add preliminary device trees Mark Kettenis
2021-09-20  3:16   ` Simon Glass
2021-09-25 13:27     ` Simon Glass
2021-09-18 13:54 ` [PATCH 5/5] doc: board: apple: Add Apple M1 documentation Mark Kettenis
2021-09-19  1:22   ` Bin Meng
2021-09-20  3:16   ` Simon Glass
2021-09-25 13:27     ` Simon Glass
2021-09-20  8:45   ` Igor Opaniuk
2021-09-25  1:20 ` [PATCH 0/5] Apple M1 Support Simon Glass
2021-09-25  8:11   ` Mark Kettenis
2021-09-25 13:27     ` Simon Glass
2021-09-25 13:52       ` Mark Kettenis
2021-09-25 14:42         ` Simon Glass
2021-09-25 16:45           ` Mark Kettenis
2021-09-26 15:53             ` Simon Glass
2021-09-28  3:46               ` Simon Glass
2021-09-28  7:36                 ` Mark Kettenis
2021-09-28 12:07                   ` Simon Glass

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='CAPnjgZ05z+HQ4EZ-R_ip3Y1z_Hz=z9+YmMqs7LnaU3g4f-YUNg@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=ashe@kivikakk.ee \
    --cc=bharat.gooty@broadcom.com \
    --cc=bin.meng@windriver.com \
    --cc=bmeng.cn@gmail.com \
    --cc=hs@denx.de \
    --cc=igor.opaniuk@foundries.io \
    --cc=kettenis@openbsd.org \
    --cc=kishon@ti.com \
    --cc=marek.behun@nic.cz \
    --cc=mark.kettenis@xs4all.nl \
    --cc=masami.hiramatsu@linaro.org \
    --cc=michael@walle.cc \
    --cc=michal.simek@xilinx.com \
    --cc=oliver.graute@kococonnector.com \
    --cc=p.yadav@ti.com \
    --cc=padmarao.begari@microchip.com \
    --cc=rayagonda.kokatanur@broadcom.com \
    --cc=sr@denx.de \
    --cc=stephan@gerhold.net \
    --cc=takahiro.akashi@linaro.org \
    --cc=tianrui-wei@outlook.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vabhav.sharma@nxp.com \
    --cc=wasim.khan@nxp.com \
    --cc=weijie.gao@mediatek.com \
    --cc=xypron.glpk@gmx.de \
    --cc=ycliang@andestech.com \
    --cc=ye.li@nxp.com \
    --subject='Re: [PATCH 1/5] arm: apple: Add initial support for Apple'\''s M1 SoC' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.