public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] sunxi: Add CONFIG_MACH_TYPE defines to sun4i, sun5i and sun7i
Date: Thu, 16 Oct 2014 21:31:42 +0300	[thread overview]
Message-ID: <20141016213142.705fdae1@i7> (raw)
In-Reply-To: <543F86E2.3060201@redhat.com>

On Thu, 16 Oct 2014 10:50:42 +0200
Hans de Goede <hdegoede@redhat.com> wrote:

> Hi,
> 
> On 10/15/2014 12:48 PM, Siarhei Siamashka wrote:
> > On Mon, 13 Oct 2014 14:55:35 +0200
> > Hans de Goede <hdegoede@redhat.com> wrote:
> > 
> >> Many people are still using old linux-sunxi-3.4 kernels on sunxi devices,
> >> adding the proper MACH_TYPE defines for this allows people to switch to
> >> upstream u-boot, so that we can stop maintaining the linux-sunxi u-boot fork.
> >>
> >> These machine-ids are all properly registered at:
> >>
> >> http://www.arm.linux.org.uk/developer/machines/
> >>
> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >> ---
> >>  include/configs/sun4i.h | 1 +
> >>  include/configs/sun5i.h | 1 +
> >>  include/configs/sun7i.h | 1 +
> >>  3 files changed, 3 insertions(+)
> >>
> >> diff --git a/include/configs/sun4i.h b/include/configs/sun4i.h
> >> index 5611ecc..d0191a3 100644
> >> --- a/include/configs/sun4i.h
> >> +++ b/include/configs/sun4i.h
> >> @@ -15,6 +15,7 @@
> >>  #define CONFIG_CLK_FULL_SPEED		1008000000
> >>  
> >>  #define CONFIG_SYS_PROMPT		"sun4i# "
> >> +#define CONFIG_MACH_TYPE		4104
> >>  
> >>  #ifdef CONFIG_USB_EHCI
> >>  #define CONFIG_USB_EHCI_SUNXI
> >> diff --git a/include/configs/sun5i.h b/include/configs/sun5i.h
> >> index 6066371..7b683e9 100644
> >> --- a/include/configs/sun5i.h
> >> +++ b/include/configs/sun5i.h
> >> @@ -15,6 +15,7 @@
> >>  #define CONFIG_CLK_FULL_SPEED		1008000000
> >>  
> >>  #define CONFIG_SYS_PROMPT		"sun5i# "
> >> +#define CONFIG_MACH_TYPE		4138
> >>  
> >>  #ifdef CONFIG_USB_EHCI
> >>  #define CONFIG_USB_EHCI_SUNXI
> >> diff --git a/include/configs/sun7i.h b/include/configs/sun7i.h
> >> index a902b84..966cbd8 100644
> >> --- a/include/configs/sun7i.h
> >> +++ b/include/configs/sun7i.h
> >> @@ -16,6 +16,7 @@
> >>  #define CONFIG_CLK_FULL_SPEED		912000000
> >>  
> >>  #define CONFIG_SYS_PROMPT		"sun7i# "
> >> +#define CONFIG_MACH_TYPE		4283
> >>  
> >>  #ifdef CONFIG_USB_EHCI
> >>  #define CONFIG_USB_EHCI_SUNXI
> > 
> > This patch is just trying to remove the safety guards (which exist
> > there for a reason!) without addressing the real compatibility
> > issues.
> 
> Erm, no the mach_type-s are not "safety-guards", they are absolutely
> necessary to get old non devicetree kernels to work at all.

If it looks like a safety-guard, swims like a safety-guard, and
quacks like a safety-guard, then it probably is a safety-guard.

The users of the u-boot from the v2014.10 tag can't easily hurt
themselves, because the old non-mainline 3.4 kernel will just
refuse to boot.

Yes, the users can easily patch the sources to add the machine id
or provide it via the environment variable. But it requires some
action from the user. This is kind of like a "no trespassing"
tape, which can be easily stepped over. But a certain level of
protection is still there.

> With just this single patch, sunxi-3.4 kernels with fixed PLL5 support,
> will happily boot on sun4i and sun5i.
>
> And with the bootm_boot_mode patch + env setting sun7i will boot fine too.

Yes, it's a very simple problem. And multiple simple solutions
are available. You just hastily picked one of them. And it has some
unfortunate practical implications related to DRAM configuration
opportunities, which I have already explained to you.

As a custodian, you take full responsibility for your actions.
If you think that this was the best choice, then so be it.

-- 
Best regards,
Siarhei Siamashka

      parent reply	other threads:[~2014-10-16 18:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-13 12:55 [U-Boot] [PATCH] sunxi: Add CONFIG_MACH_TYPE defines to sun4i, sun5i and sun7i Hans de Goede
2014-10-14  9:56 ` Ian Campbell
2014-10-15 10:48 ` Siarhei Siamashka
2014-10-16  8:50   ` Hans de Goede
2014-10-16  9:06     ` Jeroen Hofstee
2014-10-16 18:31     ` Siarhei Siamashka [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=20141016213142.705fdae1@i7 \
    --to=siarhei.siamashka@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