Message ID | 1372587149-8220-5-git-send-email-fredo@starox.org |
---|---|
State | Superseded |
Headers | show |
On Sun, Jun 30, 2013 at 12:12:29PM +0200, Frédéric Leroy wrote: > CloudBox device is device tree compliant, but older LaCie kernel uses > machine ID method to boot. > > Signed-off-by: Frédéric Leroy <fredo@starox.org> > --- > arch/arm/include/asm/mach-types.h | 14 ++++++++++++++ > board/LaCie/cloudbox/cloudbox.c | 7 ++++++- > include/configs/lacie_kw.h | 1 + > 3 files changed, 21 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h > index 440b041..071bd11 100644 > --- a/arch/arm/include/asm/mach-types.h > +++ b/arch/arm/include/asm/mach-types.h > @@ -1106,6 +1106,7 @@ extern unsigned int __machine_arch_type; > #define MACH_TYPE_OMAP5_SEVM 3777 > #define MACH_TYPE_ARMADILLO_800EVA 3863 > #define MACH_TYPE_KZM9G 4140 > +#define MACH_TYPE_CLOUDBOX 4170 > > #ifdef CONFIG_ARCH_EBSA110 > # ifdef machine_arch_type > @@ -14235,6 +14236,19 @@ extern unsigned int __machine_arch_type; > # define machine_is_kzm9g() (0) > #endif > > +#ifdef CONFIG_MACH_CLOUDBOX > +# ifdef machine_arch_type > +# undef machine_arch_type > +# define machine_arch_type __machine_arch_type > +# else > +# define machine_arch_type MACH_TYPE_CLOUDBOX > +# endif > +# define machine_cloudbox() (machine_arch_type == MACH_TYPE_CLOUDBOX) > +#else > +# define machine_cloudbox() (0) > +#endif Hi Fred, I think you can't update this file directly. Pulling the Linux mach-types file is the ARM maintainer job. Note that for the CloudBox board, the mach-types entry has been removed because not needed by Linux. The Linux mainline support is only based on DT. I had the same issue with the ns2 lite and mini. At the time, I have been told to include the machine ID in the board header: http://marc.info/?l=u-boot&m=134694402011372&w=2 Looks in configs/lacie_kw.h and grep for "missing in mach-types.h". Besides, I don't understand why do you need a separate patch to add the legacy boot support. Simon > + > + > /* > * These have not yet been registered > */ > diff --git a/board/LaCie/cloudbox/cloudbox.c b/board/LaCie/cloudbox/cloudbox.c > index e5ee5a3..51b1f96 100644 > --- a/board/LaCie/cloudbox/cloudbox.c > +++ b/board/LaCie/cloudbox/cloudbox.c > @@ -64,7 +64,12 @@ int board_early_init_f(void) > > int board_init(void) > { > - /* Nothing to do with fdt */ > + /* Machine number */ > + gd->bd->bi_arch_number = CONFIG_MACH_TYPE; > + > + /* Boot parameters address */ > + gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100; > + > return 0; > } > > diff --git a/include/configs/lacie_kw.h b/include/configs/lacie_kw.h > index 02e0882..b305bf6 100644 > --- a/include/configs/lacie_kw.h > +++ b/include/configs/lacie_kw.h > @@ -22,6 +22,7 @@ > * Machine number definition > */ > #if defined(CONFIG_CLOUDBOX) > +#define CONFIG_MACH_TYPE MACH_TYPE_CLOUDBOX > #define CONFIG_IDENT_STRING " CloudBox" > #elif defined(CONFIG_D2NET_V2) > #define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2 > -- > 1.8.1.2
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Le 01/07/2013 00:53, Simon Guinot a écrit : > On Sun, Jun 30, 2013 at 12:12:29PM +0200, Frédéric Leroy wrote: > > CloudBox device is device tree compliant, but older LaCie kernel uses > > machine ID method to boot. > > > > Signed-off-by: Frédéric Leroy <fredo@starox.org> > > [...] > > +# define machine_cloudbox() (0) > > +#endif > > Hi Fred, > > I think you can't update this file directly. Pulling the Linux mach-types > file is the ARM maintainer job. > > Note that for the CloudBox board, the mach-types entry has been removed > because not needed by Linux. The Linux mainline support is only based on > DT. I had the same issue with the ns2 lite and mini. At the time, I have > been told to include the machine ID in the board header: > http://marc.info/?l=u-boot&m=134694402011372&w=2 > > Looks in configs/lacie_kw.h and grep for "missing in mach-types.h". There is a doublon for netspace_lite_v2 : $ git grep MACH_TYPE_NETSPACE_ arch/arm/include/asm/mach-types.h:#define MACH_TYPE_NETSPACE_LITE_V2 2983 [...] include/configs/lacie_kw.h:#define MACH_TYPE_NETSPACE_LITE_V2 2983 /* missing in mach-types.h */ > Besides, I don't understand why do you need a separate patch to add the > legacy boot support. Partly because I added CloudBox without it and it seems logical to add it after, partly because I was not sure of the change of mach_types.h :) I am not at ease with sending patch to the ML and with patchwork. How should I send the fix ? A new v3 patch including all but " lacie_kw: sort #ifdef lists by CONFIG_ identifiers" and "LaCie/common: Fix cloudbox ethernet leds", or just a v3 of "arm: add machine ID for CloudBox" ? - -- Frédéric -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQGcBAEBAgAGBQJR0UwZAAoJEJVX96CfzRSesw8MAKpUfwRAwe8beLAuHUf1xWTh XksHGVuWOoI/lyAuz8AxcnE/EjbzliLGV0k0qDsWxlmVga425VxrY8d5/qZL55Z8 F95yo0aZ1q3EPTaSwjKVTUntJm8WOJesf6cK3YQqTO/1b+hrP+NCGBFL4+vNFPPL 9jtKkMjhOSa+f6X/fIhcCiqATUkX22SRheX7osoLxHFOTQ8baJLxf2Bt0L/g2KRA t36WCYAqENx727LUIYdT3+B9tEEpc2fpCma2CRMmDjKgFrdbyOik/B7+mtk6Pyla xoXQs7rV2OBYUYV2CBwQKfqBHIhrqazWcA+a5M13P90xyLjWJ/RoTAs/a9iMHNwO xyvaDCafIJBloq+GXlkwewQfxZ2AkKADP+Q47hGkYYX8YOCOJ4bz+OQ/UT/M+LJK pg0LBwjj8CUI6FpdxJWvDvxORpBFHPxDXjuz/rMenblph0cAEJH4O9BOlVUUkahw E7/W9U0koVaEKg6Uegmuert1SSDSJwBHRdB+tXljMg== =dDRp -----END PGP SIGNATURE-----
On Mon, Jul 01, 2013 at 11:30:01AM +0200, Frédéric Leroy wrote: > > Le 01/07/2013 00:53, Simon Guinot a écrit : > > On Sun, Jun 30, 2013 at 12:12:29PM +0200, Frédéric Leroy wrote: > > > CloudBox device is device tree compliant, but older LaCie kernel uses > > > machine ID method to boot. > > > > > > Signed-off-by: Frédéric Leroy <fredo@starox.org> > > > [...] > > > +# define machine_cloudbox() (0) > > > +#endif > > > > Hi Fred, > > > > I think you can't update this file directly. Pulling the Linux mach-types > > file is the ARM maintainer job. > > > > Note that for the CloudBox board, the mach-types entry has been removed > > because not needed by Linux. The Linux mainline support is only based on > > DT. I had the same issue with the ns2 lite and mini. At the time, I have > > been told to include the machine ID in the board header: > > http://marc.info/?l=u-boot&m=134694402011372&w=2 > > > > Looks in configs/lacie_kw.h and grep for "missing in mach-types.h". > > There is a doublon for netspace_lite_v2 : > $ git grep MACH_TYPE_NETSPACE_ > arch/arm/include/asm/mach-types.h:#define MACH_TYPE_NETSPACE_LITE_V2 > 2983 This one will probably disappear soon because the Linux support for this board is only based on DT... > [...] > include/configs/lacie_kw.h:#define MACH_TYPE_NETSPACE_LITE_V2 2983 /* > missing in mach-types.h */ > > > Besides, I don't understand why do you need a separate patch to add the > > legacy boot support. > > Partly because I added CloudBox without it and it seems logical to add > it after, > partly because I was not sure of the change of mach_types.h :) > > I am not at ease with sending patch to the ML and with patchwork. > How should I send the fix ? > A new v3 patch including all but " lacie_kw: sort #ifdef lists by > CONFIG_ identifiers" > and "LaCie/common: Fix cloudbox ethernet leds", > or just a v3 of "arm: add machine ID for CloudBox" ? I think that you must resend the whole patch series even if you keep some patches unchanged. Regards, Simon
diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index 440b041..071bd11 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -1106,6 +1106,7 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_OMAP5_SEVM 3777 #define MACH_TYPE_ARMADILLO_800EVA 3863 #define MACH_TYPE_KZM9G 4140 +#define MACH_TYPE_CLOUDBOX 4170 #ifdef CONFIG_ARCH_EBSA110 # ifdef machine_arch_type @@ -14235,6 +14236,19 @@ extern unsigned int __machine_arch_type; # define machine_is_kzm9g() (0) #endif +#ifdef CONFIG_MACH_CLOUDBOX +# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type __machine_arch_type +# else +# define machine_arch_type MACH_TYPE_CLOUDBOX +# endif +# define machine_cloudbox() (machine_arch_type == MACH_TYPE_CLOUDBOX) +#else +# define machine_cloudbox() (0) +#endif + + /* * These have not yet been registered */ diff --git a/board/LaCie/cloudbox/cloudbox.c b/board/LaCie/cloudbox/cloudbox.c index e5ee5a3..51b1f96 100644 --- a/board/LaCie/cloudbox/cloudbox.c +++ b/board/LaCie/cloudbox/cloudbox.c @@ -64,7 +64,12 @@ int board_early_init_f(void) int board_init(void) { - /* Nothing to do with fdt */ + /* Machine number */ + gd->bd->bi_arch_number = CONFIG_MACH_TYPE; + + /* Boot parameters address */ + gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100; + return 0; } diff --git a/include/configs/lacie_kw.h b/include/configs/lacie_kw.h index 02e0882..b305bf6 100644 --- a/include/configs/lacie_kw.h +++ b/include/configs/lacie_kw.h @@ -22,6 +22,7 @@ * Machine number definition */ #if defined(CONFIG_CLOUDBOX) +#define CONFIG_MACH_TYPE MACH_TYPE_CLOUDBOX #define CONFIG_IDENT_STRING " CloudBox" #elif defined(CONFIG_D2NET_V2) #define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2
CloudBox device is device tree compliant, but older LaCie kernel uses machine ID method to boot. Signed-off-by: Frédéric Leroy <fredo@starox.org> --- arch/arm/include/asm/mach-types.h | 14 ++++++++++++++ board/LaCie/cloudbox/cloudbox.c | 7 ++++++- include/configs/lacie_kw.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-)