mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] command.h: drop unused Struct_Section attribute
From: Antony Pavlov @ 2016-11-07  9:04 UTC (permalink / raw)
  To: barebox

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 include/command.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/command.h b/include/command.h
index 2e72780..43ee454 100644
--- a/include/command.h
+++ b/include/command.h
@@ -89,8 +89,6 @@ int run_command(const char *cmd);
 
 #endif	/* __ASSEMBLY__ */
 
-#define Struct_Section  __attribute__ ((unused,section (".barebox_cmd")))
-
 #define BAREBOX_CMD_START(_name)							\
 extern const struct command __barebox_cmd_##_name;					\
 const struct command __barebox_cmd_##_name						\
-- 
2.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply related

* [PATCH] MIPS: drop redundant start_barebox() declaration
From: Antony Pavlov @ 2016-11-07  9:02 UTC (permalink / raw)
  To: barebox

The start_barebox() function is defined in the <common.h> header file.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/mips/boot/main_entry.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/mips/boot/main_entry.c b/arch/mips/boot/main_entry.c
index 015150bf..43a78c2 100644
--- a/arch/mips/boot/main_entry.c
+++ b/arch/mips/boot/main_entry.c
@@ -25,7 +25,6 @@
 #include <asm/mipsregs.h>
 #include <asm/addrspace.h>
 
-extern void start_barebox(void);
 extern void handle_reserved(void);
 
 void main_entry(void);
-- 
2.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply related

* Re: Fwd: boot kernel with append device tree
From: Alex Vazquez @ 2016-11-07  8:25 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox
In-Reply-To: <20161107074924.blkryleb2eb5bkhy@pengutronix.de>

Hi Sasha!

> Which version are you using. Is it something older?

I am using barebox-2016.03.0


Regards!

2016-11-07 8:49 GMT+01:00 Sascha Hauer <s.hauer@pengutronix.de>:
> Hi Alex,
>
> Added the list to Cc
>
> Please configure your mailer to send plain text, then the server won't
> reject your mails.
>
> On Fri, Nov 04, 2016 at 01:10:30PM +0100, Alex Vazquez wrote:
>>    Hi, all!
>>    I have create a zImage with the device tree appended.
>>    I have removed oftree_loc in the configuration file.
>>    My problem is when I try to launch the kernel, it indicates that it has
>>    the device tree added but fails to boot.
>>
>>      barebox:/# boot
>>      booting kernel from /dev/[1]nand0.kernel.bb
>>      Loading ARM Linux zImage '/dev/[2]nand0.kernel.bb'
>>      zImage: concatenated oftree detected
>>      commandline: console=ttyS0,115200 rw ip=none ...
>>      arch_number: 0
>>
>>    If I don't removed oftree_loc in the configuration file. Load oftree
>>    (nand) and boot fine.
>>
>>      barebox:/# boot
>>      booting kernel from /dev/[3]nand0.kernel.bb
>>      Loading ARM Linux zImage '/dev/[4]nand0.kernel.bb'
>>      zImage: concatenated oftree detected
>>      Loading devicetree from '/dev/[5]nand0.oftree.bb'
>>      commandline: console=ttyS0,115200 rw ip=none ...
>>      Booting Linux on physical CPU 0x0
>>
>>    Do I have to configure something more in Barebox?
>
> Which version are you using. Is it something older?
>
>>    Thanks!
>>    Regards!
>>    P.D
>>    I have enabled CONFIG_ARM_APPENDED_DTB and I create the new zimage with
>>    (cat zImage <filename>.dtb > zImage_w_dtb )
>>    P.D.2.
>>    I have a little problem and i can't send email to list.
>>
>>       Delivery to the following recipient failed permanently:
>>           [6]barebox@lists.infradead.org
>>      Technical details of permanent failure:
>>      Google tried to deliver your message, but it was rejected by the server
>>      for the recipient domain [7]lists.infradead.org by
>>      [8]bombadil.infradead.org. [2001:1868:205::9].
>>      The error that the other server returned was:
>>      550-Mailing lists do not accept HTML mail. See
>        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Sascha
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: [PATCH] mtd: spi-nor: add MX25U2033E
From: Sascha Hauer @ 2016-11-07  7:58 UTC (permalink / raw)
  To: Alexander Kurz; +Cc: barebox
In-Reply-To: <1478197480-27488-1-git-send-email-akurz@blala.de>

On Thu, Nov 03, 2016 at 07:24:40PM +0100, Alexander Kurz wrote:
> This chip can be found in 4th generation Kindle devices
> 
> Signed-off-by: Alexander Kurz <akurz@blala.de>
> ---
>  drivers/mtd/spi-nor/spi-nor.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks

Sascha

> 
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index 748b328..45be586 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -526,6 +526,7 @@ static const struct spi_device_id spi_nor_ids[] = {
>  	{ "mx25l3205d",  INFO(0xc22016, 0, 64 * 1024,  64, 0) },
>  	{ "mx25l3255e",  INFO(0xc29e16, 0, 64 * 1024,  64, SECT_4K) },
>  	{ "mx25l6405d",  INFO(0xc22017, 0, 64 * 1024, 128, 0) },
> +	{ "mx25u2033e",  INFO(0xc22532, 0, 64 * 1024,   4, SECT_4K) },
>  	{ "mx25u4035",   INFO(0xc22533, 0, 64 * 1024,   8, SECT_4K) },
>  	{ "mx25u8035",   INFO(0xc22534, 0, 64 * 1024,  16, SECT_4K) },
>  	{ "mx25u6435f",  INFO(0xc22537, 0, 64 * 1024, 128, SECT_4K) },
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: [PATCH] scripts imx-image: add DCD NOP command support
From: Sascha Hauer @ 2016-11-07  7:56 UTC (permalink / raw)
  To: Alexander Kurz; +Cc: barebox
In-Reply-To: <1478197957-27579-1-git-send-email-akurz@blala.de>

Hi Alexander,

On Thu, Nov 03, 2016 at 07:32:37PM +0100, Alexander Kurz wrote:
> The DCD NOP command is available for all flash header v2 devices (i.MX28,
> 50, 53, 6 and 7).
> 
> Signed-off-by: Alexander Kurz <akurz@blala.de>
> ---
>  scripts/imx/README      |  1 +
>  scripts/imx/imx-image.c | 28 ++++++++++++++++++++++++++++
>  scripts/imx/imx.c       | 11 +++++++++++
>  scripts/imx/imx.h       |  1 +
>  4 files changed, 41 insertions(+)

Applied, but ... out of curiosity, what do we need this for?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: [PATCH] mfd: mc13892: more descriptive charger register defines
From: Sascha Hauer @ 2016-11-07  7:54 UTC (permalink / raw)
  To: Alexander Kurz; +Cc: barebox
In-Reply-To: <1478251146-32717-1-git-send-email-akurz@blala.de>

On Fri, Nov 04, 2016 at 10:19:06AM +0100, Alexander Kurz wrote:
> Make access to the mc13892 charger parameter voltage, current and max power
> dissipation readable in terms of millivolts, milliamps and milliwatts.
> 
> Signed-off-by: Alexander Kurz <akurz@blala.de>

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: Fwd: boot kernel with append device tree
From: Sascha Hauer @ 2016-11-07  7:49 UTC (permalink / raw)
  To: Alex Vazquez; +Cc: barebox
In-Reply-To: <CAOTEMUQt95XDorid8sj9FHkpCpUJYnqNeRbBU+33aLYz2oM+gw@mail.gmail.com>

Hi Alex,

Added the list to Cc

Please configure your mailer to send plain text, then the server won't
reject your mails.

On Fri, Nov 04, 2016 at 01:10:30PM +0100, Alex Vazquez wrote:
>    Hi, all!
>    I have create a zImage with the device tree appended. 
>    I have removed oftree_loc in the configuration file.
>    My problem is when I try to launch the kernel, it indicates that it has
>    the device tree added but fails to boot.
> 
>      barebox:/# boot
>      booting kernel from /dev/[1]nand0.kernel.bb
>      Loading ARM Linux zImage '/dev/[2]nand0.kernel.bb'
>      zImage: concatenated oftree detected
>      commandline: console=ttyS0,115200 rw ip=none ...
>      arch_number: 0
> 
>    If I don't removed oftree_loc in the configuration file. Load oftree
>    (nand) and boot fine.
> 
>      barebox:/# boot
>      booting kernel from /dev/[3]nand0.kernel.bb
>      Loading ARM Linux zImage '/dev/[4]nand0.kernel.bb'
>      zImage: concatenated oftree detected
>      Loading devicetree from '/dev/[5]nand0.oftree.bb'
>      commandline: console=ttyS0,115200 rw ip=none ...
>      Booting Linux on physical CPU 0x0
> 
>    Do I have to configure something more in Barebox?

Which version are you using. Is it something older?

>    Thanks!
>    Regards!
>    P.D
>    I have enabled CONFIG_ARM_APPENDED_DTB and I create the new zimage with
>    (cat zImage <filename>.dtb > zImage_w_dtb )
>    P.D.2.
>    I have a little problem and i can't send email to list.
> 
>       Delivery to the following recipient failed permanently:
>           [6]barebox@lists.infradead.org
>      Technical details of permanent failure:
>      Google tried to deliver your message, but it was rejected by the server
>      for the recipient domain [7]lists.infradead.org by
>      [8]bombadil.infradead.org. [2001:1868:205::9].
>      The error that the other server returned was:
>      550-Mailing lists do not accept HTML mail. See
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: Configure RAM size on iMX53 board
From: Sascha Hauer @ 2016-11-07  7:43 UTC (permalink / raw)
  To: Jose Luis Zabalza; +Cc: barebox
In-Reply-To: <CAKZffXHVZ9tvhcgVz=fWciYQr98wrZjZbxiL4QQJEP8DzGuz7Q@mail.gmail.com>

On Sat, Nov 05, 2016 at 07:39:53AM +0100, Jose Luis Zabalza wrote:
> Thanks Sascha, but something I do wrong
> 
> I tried set fixed size to 512M, but neither works.
> 
> With these changes does not work or 512MB board  or 1GB board.
> 
> =========<cut lowlevel.c>===============
> 
> #include <common.h>
> #include <mach/imx53-regs.h>
> #include <mach/esdctl.h>
> #include <mach/generic.h>
> #include <asm/barebox-arm-head.h>
> #include <asm/barebox-arm.h>
> 
> void __naked barebox_arm_reset_vector(void)
> {
>     imx5_cpu_lowlevel_init();
>     arm_setup_stack(MX53_IRAM_BASE_ADDR + MX53_IRAM_SIZE - 8);
> //    imx53_barebox_entry(NULL);
>     barebox_arm_entry(MX53_CSD0_BASE_ADDR,SZ_512M,NULL);
> }

Hm, it should work like this, but maybe the memory layout is not what we
expect. Could you apply the following and see what we get for both
memory variants (still using imx53_barebox_entry() above so that you
actually get to that point)?

Sascha

--------------------------------8<--------------------------------------

From c3024dcd0e9c494adeb3f9ffbb6ec41ee4787b2d Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Mon, 7 Nov 2016 08:41:01 +0100
Subject: [PATCH] ARM: i.MX53: Add some memory debug

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-imx/esdctl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-imx/esdctl.c b/arch/arm/mach-imx/esdctl.c
index 106e648..d217495 100644
--- a/arch/arm/mach-imx/esdctl.c
+++ b/arch/arm/mach-imx/esdctl.c
@@ -276,6 +276,9 @@ static void imx_esdctl_v3_add_mem(void *esdctlbase, struct imx_esdctl_data *data
 
 static void imx_esdctl_v4_add_mem(void *esdctlbase, struct imx_esdctl_data *data)
 {
+	printf("CS0: 0x%08lx\n", imx_v4_sdram_size(esdctlbase, 0));
+	printf("CS1: 0x%08lx\n", imx_v4_sdram_size(esdctlbase, 1));
+
 	add_mem(data->base0, imx_v4_sdram_size(esdctlbase, 0),
 			data->base1, imx_v4_sdram_size(esdctlbase, 1));
 }
-- 
2.10.1

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply related

* Re: Configure RAM size on iMX53 board
From: Jose Luis Zabalza @ 2016-11-05  6:39 UTC (permalink / raw)
  To: barebox
In-Reply-To: <20161104071821.jqrhtfmgz3432527@pengutronix.de>

Thanks Sascha, but something I do wrong

I tried set fixed size to 512M, but neither works.

With these changes does not work or 512MB board  or 1GB board.

=========<cut lowlevel.c>===============

#include <common.h>
#include <mach/imx53-regs.h>
#include <mach/esdctl.h>
#include <mach/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>

void __naked barebox_arm_reset_vector(void)
{
    imx5_cpu_lowlevel_init();
    arm_setup_stack(MX53_IRAM_BASE_ADDR + MX53_IRAM_SIZE - 8);
//    imx53_barebox_entry(NULL);
    barebox_arm_entry(MX53_CSD0_BASE_ADDR,SZ_512M,NULL);
}
=========================================

==========<cut board.c>==================
#include <common.h>
#include <environment.h>
#include <fcntl.h>
#include <platform_data/eth-fec.h>
#include <fs.h>
#include <init.h>
#include <nand.h>
#include <net.h>
#include <partition.h>
#include <linux/sizes.h>
#include <gpio.h>
#include <mci.h>

#include <generated/mach-types.h>

#include <mach/imx53-regs.h>
#include <mach/iomux-mx53.h>
#include <mach/devices-imx53.h>
#include <mach/generic.h>
#include <mach/imx-nand.h>
#include <mach/iim.h>
#include <mach/imx5.h>
#include <mach/esdctl.h>

#include <asm/armlinux.h>
#include <io.h>
#include <asm/mmu.h>

........ other device init functions ......

static int myboard_init(void)
{
        imx_esdctl_disable();

        arm_add_mem_device("ram0", MX53_CSD0_BASE_ADDR, SZ_512M);

        return 0;
}
core_initcall(myboard_init);
========================================

Thanks in advanced.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* [PATCH] mfd: mc13892: more descriptive charger register defines
From: Alexander Kurz @ 2016-11-04  9:19 UTC (permalink / raw)
  To: barebox; +Cc: Alexander Kurz

Make access to the mc13892 charger parameter voltage, current and max power
dissipation readable in terms of millivolts, milliamps and milliwatts.

Signed-off-by: Alexander Kurz <akurz@blala.de>
---
 arch/arm/boards/efika-mx-smartbook/board.c |  4 +--
 include/mfd/mc13892.h                      | 40 +++++++++++++++++++++++-------
 2 files changed, 32 insertions(+), 12 deletions(-)

diff --git a/arch/arm/boards/efika-mx-smartbook/board.c b/arch/arm/boards/efika-mx-smartbook/board.c
index d7c11dc..d7c5681 100644
--- a/arch/arm/boards/efika-mx-smartbook/board.c
+++ b/arch/arm/boards/efika-mx-smartbook/board.c
@@ -74,9 +74,7 @@ static void efikamx_power_init(struct mc13xxx *mc)
 
 	/* Externally powered */
 	mc13xxx_reg_read(mc, MC13892_REG_CHARGE, &val);
-	val |= MC13782_CHARGE_ICHRG0 | MC13782_CHARGE_ICHRG1 |
-		MC13782_CHARGE_ICHRG2 | MC13782_CHARGE_ICHRG3 |
-		MC13782_CHARGE_CHGAUTOB;
+	val |= MC13782_CHARGE_ICHRG_FULL | MC13782_CHARGE_CHGAUTOB;
 	mc13xxx_reg_write(mc, MC13892_REG_CHARGE, val);
 
 	/* power up the system first */
diff --git a/include/mfd/mc13892.h b/include/mfd/mc13892.h
index c92a462..8b52239 100644
--- a/include/mfd/mc13892.h
+++ b/include/mfd/mc13892.h
@@ -29,21 +29,43 @@
 
 /* REG_CHARGE */
 
-#define MC13782_CHARGE_VCHRG0		(1 << 0)
-#define MC13782_CHARGE_VCHRG1		(1 << 1)
-#define MC13782_CHARGE_VCHRG2		(1 << 2)
-#define MC13782_CHARGE_ICHRG0		(1 << 3)
-#define MC13782_CHARGE_ICHRG1		(1 << 4)
-#define MC13782_CHARGE_ICHRG2		(1 << 5)
-#define MC13782_CHARGE_ICHRG3		(1 << 6)
+#define MC13782_CHARGE_VCHRG_3800	(0 << 0)
+#define MC13782_CHARGE_VCHRG_4100	(1 << 0)
+#define MC13782_CHARGE_VCHRG_4150	(2 << 0)
+#define MC13782_CHARGE_VCHRG_4200	(3 << 0)
+#define MC13782_CHARGE_VCHRG_4250	(4 << 0)
+#define MC13782_CHARGE_VCHRG_4300	(5 << 0)
+#define MC13782_CHARGE_VCHRG_4375	(6 << 0)
+#define MC13782_CHARGE_VCHRG_4450	(7 << 0)
+#define MC13782_CHARGE_VCHRG_MASK	(7 << 0)
+#define MC13782_CHARGE_ICHRG_0		(0 << 3)
+#define MC13782_CHARGE_ICHRG_80		(1 << 3)
+#define MC13782_CHARGE_ICHRG_240	(2 << 3)
+#define MC13782_CHARGE_ICHRG_320	(3 << 3)
+#define MC13782_CHARGE_ICHRG_400	(4 << 3)
+#define MC13782_CHARGE_ICHRG_480	(5 << 3)
+#define MC13782_CHARGE_ICHRG_560	(6 << 3)
+#define MC13782_CHARGE_ICHRG_640	(7 << 3)
+#define MC13782_CHARGE_ICHRG_720	(8 << 3)
+#define MC13782_CHARGE_ICHRG_800	(9 << 3)
+#define MC13782_CHARGE_ICHRG_880	(10 << 3)
+#define MC13782_CHARGE_ICHRG_960	(11 << 3)
+#define MC13782_CHARGE_ICHRG_1040	(12 << 3)
+#define MC13782_CHARGE_ICHRG_1200	(13 << 3)
+#define MC13782_CHARGE_ICHRG_1600	(14 << 3)
+#define MC13782_CHARGE_ICHRG_FULL	(15 << 3)
+#define MC13782_CHARGE_ICHRG_MASK	(15 << 3)
 #define MC13782_CHARGE_TREN		(1 << 7)
 #define MC13782_CHARGE_ACKLPB		(1 << 8)
 #define MC13782_CHARGE_THCHKB		(1 << 9)
 #define MC13782_CHARGE_FETOVRD		(1 << 10)
 #define MC13782_CHARGE_FETCTRL		(1 << 11)
 #define MC13782_CHARGE_RVRSMODE		(1 << 13)
-#define MC13782_CHARGE_PLIM0		(1 << 15)
-#define MC13782_CHARGE_PLIM1		(1 << 16)
+#define MC13782_CHARGE_PLIM_600		(0 << 15)
+#define MC13782_CHARGE_PLIM_800		(1 << 15)
+#define MC13782_CHARGE_PLIM_1000	(2 << 15)
+#define MC13782_CHARGE_PLIM_1200	(3 << 15)
+#define MC13782_CHARGE_PLIM_MASK	(3 << 15)
 #define MC13782_CHARGE_PLIMDIS		(1 << 17)
 #define MC13782_CHARGE_CHRGLEDEN	(1 << 18)
 #define MC13782_CHARGE_CHGTMRRST	(1 << 19)
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply related

* Re: Configure RAM size on iMX53 board
From: Sascha Hauer @ 2016-11-04  7:18 UTC (permalink / raw)
  To: Jose Luis Zabalza; +Cc: barebox
In-Reply-To: <CAKZffXFSfTJJiwj2ZOB7nT-DWZ7_AqyysZkavNM++c4LSp6tZg@mail.gmail.com>

Hi,

On Thu, Nov 03, 2016 at 09:30:03PM +0100, Jose Luis Zabalza wrote:
> Hello everybody
> 
> I have two iMX53 custom boards. They are the same board but 512MB vs
> 1GB RAM version.  Both boards are working with the same Uboot binary
> but I would like use Barebox.
> 
> I have to be able to run Barebox on 1GB version but the same Barebox
> binary don't work on 512MB version.
> 
> I use imx-usb-loader to put Barebox on the board. On 1GB version
> Barebox are working OK and load Linux kernel successfully. On 512MB
> Barebox are loaded successfully but don't work. lsusb tell me the
> board is working on Serial Download mode yet. No message is printed on
> the console.
> 
> Do I have to set Barebox for work with different RAM size?

Just like Andrey already said, barebox detects the RAM size by reading
back the values from the SDRAM controller to determine its memory
layout, so the configured values must be correct. In your case they can
only be correct for the 1GB version.

What you can do in this case is:

- in your boards lowlevel.c detect your actual RAM size by testing for
  mirrors in the SDRAM Address space.
- Instead of imx53_barebox_entry() call barebox_arm_entry() with the
  actual RAM size.

This should already bring you through the lowlevel setup succesfully.

Then in your board file add this:

#include <mach/esdctl.h>

static int myboard_init(void)
{
	imx_esdctl_disable();

	arm_add_mem_device("ram0", MX53_CSD0_BASE_ADDR, size);

	return 0;
}
core_initcall(myboard_init);

Note you can't use a variable to safe the calculated SDRAM size from
lowlevel.c to your board file. It's probably best to do the same test
again.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: Configure RAM size on iMX53 board
From: Andrey Smirnov @ 2016-11-03 22:42 UTC (permalink / raw)
  To: Jose Luis Zabalza; +Cc: barebox@lists.infradead.org
In-Reply-To: <CAKZffXFSfTJJiwj2ZOB7nT-DWZ7_AqyysZkavNM++c4LSp6tZg@mail.gmail.com>

On Thu, Nov 3, 2016 at 1:30 PM, Jose Luis Zabalza <jlz.3008@gmail.com> wrote:
> Hello everybody
>
> I have two iMX53 custom boards. They are the same board but 512MB vs
> 1GB RAM version.  Both boards are working with the same Uboot binary
> but I would like use Barebox.
>
> I have to be able to run Barebox on 1GB version but the same Barebox
> binary don't work on 512MB version.
>
> I use imx-usb-loader to put Barebox on the board. On 1GB version
> Barebox are working OK and load Linux kernel successfully. On 512MB
> Barebox are loaded successfully but don't work. lsusb tell me the
> board is working on Serial Download mode yet. No message is printed on
> the console.
>
> Do I have to set Barebox for work with different RAM size?
>

One of the first things Barebox does when it start is placing itself
at the end of RAM as well as reserving adjacent areas for stack and
heap. So while you don't strictly have to configure it for different
RAM sizes it _does_ need to know actual RAM size to be able to
calculate various addresses correctly.

To the best of my knowledge there are two ways that knowledge is passed along:

     1) Hardcore that knowledge in entry point code as a part of PBL
     2) Implement additional memory size detection logic

AFAIK all i.MX variants in latest master should fall under second
category, so different RAM sizes should be accounted for.

You might gain some additional insight into the problem if you enable
CONFIG_DEBUG_LL (and route it to appropriate port) in "Debugging" menu
of menuconfig.

Hope this helps.

Regards,
Andrey Smirnov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Configure RAM size on iMX53 board
From: Jose Luis Zabalza @ 2016-11-03 20:30 UTC (permalink / raw)
  To: barebox

Hello everybody

I have two iMX53 custom boards. They are the same board but 512MB vs
1GB RAM version.  Both boards are working with the same Uboot binary
but I would like use Barebox.

I have to be able to run Barebox on 1GB version but the same Barebox
binary don't work on 512MB version.

I use imx-usb-loader to put Barebox on the board. On 1GB version
Barebox are working OK and load Linux kernel successfully. On 512MB
Barebox are loaded successfully but don't work. lsusb tell me the
board is working on Serial Download mode yet. No message is printed on
the console.

Do I have to set Barebox for work with different RAM size?

Thanks in advance.

P.D. I don't use (yet) device tree with Barebox. The DCD table are the
same on both board.


-- 
jlz.3008  a t  gmail.com
Linux Counter 172551
https://linuxcounter.net/cert/172551.png

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* [PATCH] scripts imx-image: add DCD NOP command support
From: Alexander Kurz @ 2016-11-03 18:32 UTC (permalink / raw)
  To: barebox; +Cc: Alexander Kurz

The DCD NOP command is available for all flash header v2 devices (i.MX28,
50, 53, 6 and 7).

Signed-off-by: Alexander Kurz <akurz@blala.de>
---
 scripts/imx/README      |  1 +
 scripts/imx/imx-image.c | 28 ++++++++++++++++++++++++++++
 scripts/imx/imx.c       | 11 +++++++++++
 scripts/imx/imx.h       |  1 +
 4 files changed, 41 insertions(+)

diff --git a/scripts/imx/README b/scripts/imx/README
index 474b387..b5cdb48 100644
--- a/scripts/imx/README
+++ b/scripts/imx/README
@@ -32,6 +32,7 @@ check <width> <cond> <addr> <mask>    Poll until condition becomes true.
                                       while_any_bit_set
 set_bits <width> <addr> <bits>        set <bits> in register <addr>
 clear_bits <width> <addr> <bits>      clear <bits> in register <addr>
+nop                                   do nothing
 
 the i.MX SoCs support a wide range of fancy things doing with the flash header.
 We limit ourselves to a very simple case, that is the flash header has a fixed
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index 650a67f..dd5799c 100644
--- a/scripts/imx/imx-image.c
+++ b/scripts/imx/imx-image.c
@@ -482,6 +482,33 @@ static int write_mem(const struct config_data *data, uint32_t addr,
 	}
 }
 
+static int nop(const struct config_data *data)
+{
+	const struct imx_ivt_header nop_header = {
+		.tag = TAG_NOP,
+		.length = htobe16(4),
+		.version = 0,
+	};
+
+	switch (data->header_version) {
+	case 1:
+		fprintf(stderr, "DCD command NOP not implemented on DCD v1\n");
+		return -EINVAL;
+	case 2:
+		if (curdcd > MAX_DCD - 1) {
+			fprintf(stderr, "At maximum %d DCD entries allowed\n",
+				MAX_DCD);
+			return -ENOMEM;
+		}
+
+		check_last_dcd(*((uint32_t *) &nop_header));
+		dcdtable[curdcd++] = *((uint32_t *) &nop_header);
+		return 0;
+	default:
+		return -EINVAL;
+	}
+}
+
 /*
  * This uses the Freescale Code Signing Tool (CST) to sign the image.
  * The cst is expected to be executable as 'cst' or if exists, the content
@@ -653,6 +680,7 @@ int main(int argc, char *argv[])
 		.image_dcd_offset = 0xffffffff,
 		.write_mem = write_mem,
 		.check = check,
+		.nop = nop,
 	};
 
 	prgname = argv[0];
diff --git a/scripts/imx/imx.c b/scripts/imx/imx.c
index c8ee309..fba049e 100644
--- a/scripts/imx/imx.c
+++ b/scripts/imx/imx.c
@@ -131,6 +131,14 @@ static int do_cmd_check(struct config_data *data, int argc, char *argv[])
 	return data->check(data, cmd, addr, mask);
 }
 
+static int do_cmd_nop(struct config_data *data, int argc, char *argv[])
+{
+	if (!data->nop)
+		return -ENOSYS;
+
+	return data->nop(data);
+}
+
 static int write_mem(struct config_data *data, int argc, char *argv[],
 		     int set_bits, int clear_bits)
 {
@@ -365,6 +373,9 @@ struct command cmds[] = {
 		.name = "check",
 		.parse = do_cmd_check,
 	}, {
+		.name = "nop",
+		.parse = do_cmd_nop,
+	}, {
 		.name = "loadaddr",
 		.parse = do_loadaddr,
 	}, {
diff --git a/scripts/imx/imx.h b/scripts/imx/imx.h
index ae3702c..57c7525 100644
--- a/scripts/imx/imx.h
+++ b/scripts/imx/imx.h
@@ -77,6 +77,7 @@ struct config_data {
 		     uint32_t addr, uint32_t mask);
 	int (*write_mem)(const struct config_data *data, uint32_t addr,
 			 uint32_t val, int width, int set_bits, int clear_bits);
+	int (*nop)(const struct config_data *data);
 	int csf_space;
 	char *csf;
 };
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply related

* [PATCH] mtd: spi-nor: add MX25U2033E
From: Alexander Kurz @ 2016-11-03 18:24 UTC (permalink / raw)
  To: barebox; +Cc: Alexander Kurz

This chip can be found in 4th generation Kindle devices

Signed-off-by: Alexander Kurz <akurz@blala.de>
---
 drivers/mtd/spi-nor/spi-nor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 748b328..45be586 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -526,6 +526,7 @@ static const struct spi_device_id spi_nor_ids[] = {
 	{ "mx25l3205d",  INFO(0xc22016, 0, 64 * 1024,  64, 0) },
 	{ "mx25l3255e",  INFO(0xc29e16, 0, 64 * 1024,  64, SECT_4K) },
 	{ "mx25l6405d",  INFO(0xc22017, 0, 64 * 1024, 128, 0) },
+	{ "mx25u2033e",  INFO(0xc22532, 0, 64 * 1024,   4, SECT_4K) },
 	{ "mx25u4035",   INFO(0xc22533, 0, 64 * 1024,   8, SECT_4K) },
 	{ "mx25u8035",   INFO(0xc22534, 0, 64 * 1024,  16, SECT_4K) },
 	{ "mx25u6435f",  INFO(0xc22537, 0, 64 * 1024, 128, SECT_4K) },
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply related

* Re: [PATCH upstream 1/4] state: use packet attribute for on storage structs
From: Stefan Lengfeld @ 2016-11-03  8:38 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox
In-Reply-To: <20161103062134.dqkssqmjzp624mb2@pengutronix.de>

Hi Sascha,

On Thu, Nov 03, 2016 at 07:21:34AM +0100, Sascha Hauer wrote:
> On Wed, Nov 02, 2016 at 08:54:27AM +0100, Stefan Lengfeld wrote:
> > These structs are used for on-storage data layouts. They should be not
> > affected by different integer precisions and alignment optimizations of
> > 32bit or 64bit machines. Using the architecture independent integer data
> > types, like uint32_t, achieves the former, using the packet attribute
> > the later.
> > 
> > Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de>
> 
> Applied all, thanks. 3/4 went to master, the rest to next. Also fixed
> s/packet/packed/ while applying.
> 
> Sascha

thanks for fixing my typo :-)

Mit freundlichen Grüßen / Kind regards,
	Stefan Lengfeld

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: [PATCH upstream 1/4] state: use packet attribute for on storage structs
From: Sascha Hauer @ 2016-11-03  6:21 UTC (permalink / raw)
  To: Stefan Lengfeld; +Cc: barebox
In-Reply-To: <1478073270-3527-1-git-send-email-s.lengfeld@phytec.de>

On Wed, Nov 02, 2016 at 08:54:27AM +0100, Stefan Lengfeld wrote:
> These structs are used for on-storage data layouts. They should be not
> affected by different integer precisions and alignment optimizations of
> 32bit or 64bit machines. Using the architecture independent integer data
> types, like uint32_t, achieves the former, using the packet attribute
> the later.
> 
> Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de>

Applied all, thanks. 3/4 went to master, the rest to next. Also fixed
s/packet/packed/ while applying.

Sascha

> ---
>  common/state/backend_bucket_circular.c | 2 +-
>  common/state/backend_bucket_direct.c   | 2 +-
>  common/state/backend_format_raw.c      | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c
> index 72e165e..d8504e0 100644
> --- a/common/state/backend_bucket_circular.c
> +++ b/common/state/backend_bucket_circular.c
> @@ -47,7 +47,7 @@ struct state_backend_storage_bucket_circular {
>  	struct device_d *dev;
>  };
>  
> -struct state_backend_storage_bucket_circular_meta {
> +struct __attribute__((__packed__)) state_backend_storage_bucket_circular_meta {
>  	uint32_t magic;
>  	uint32_t written_length;
>  };
> diff --git a/common/state/backend_bucket_direct.c b/common/state/backend_bucket_direct.c
> index 08892f0..5225433 100644
> --- a/common/state/backend_bucket_direct.c
> +++ b/common/state/backend_bucket_direct.c
> @@ -32,7 +32,7 @@ struct state_backend_storage_bucket_direct {
>  	struct device_d *dev;
>  };
>  
> -struct state_backend_storage_bucket_direct_meta {
> +struct __attribute__((__packed__)) state_backend_storage_bucket_direct_meta {
>  	uint32_t magic;
>  	uint32_t written_length;
>  };
> diff --git a/common/state/backend_format_raw.c b/common/state/backend_format_raw.c
> index 4209424..e028ea6 100644
> --- a/common/state/backend_format_raw.c
> +++ b/common/state/backend_format_raw.c
> @@ -37,7 +37,7 @@ struct state_backend_format_raw {
>  	struct device_d *dev;
>  };
>  
> -struct backend_raw_header {
> +struct __attribute__((__packed__)) backend_raw_header {
>  	uint32_t magic;
>  	uint16_t reserved;
>  	uint16_t data_len;
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: [PATCH 1/2] fixup! watchdog: add designware driver
From: Sascha Hauer @ 2016-11-03  6:13 UTC (permalink / raw)
  To: Steffen Trumtrar; +Cc: barebox
In-Reply-To: <20161101095227.2087-1-s.trumtrar@pengutronix.de>

On Tue, Nov 01, 2016 at 10:52:26AM +0100, Steffen Trumtrar wrote:
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---
>  drivers/watchdog/dw_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Squashed into the original commits, thanks

Sascha

> 
> diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
> index fa2752896c2f..8fd8c81e6c38 100644
> --- a/drivers/watchdog/dw_wdt.c
> +++ b/drivers/watchdog/dw_wdt.c
> @@ -151,7 +151,7 @@ static int dw_wdt_drv_probe(struct device_d *dev)
>  	if (ret)
>  		return ret;
>  
> -	dw_wdt->rst = reset_control_get(dev, "dw-wdt");
> +	dw_wdt->rst = reset_control_get(dev, NULL);
>  	if (IS_ERR(dw_wdt->rst))
>  		dev_warn(dev, "No reset lines. Will not be able to stop once started.\n");
>  
> -- 
> 2.10.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: [PATCH 1/5] PCI: add some useful debug output
From: Sascha Hauer @ 2016-11-03  6:12 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox
In-Reply-To: <20161101085855.953-1-l.stach@pengutronix.de>

On Tue, Nov 01, 2016 at 09:58:51AM +0100, Lucas Stach wrote:
> This makes diagnosing problems in address space allocation
> much easier.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/pci/pci.c | 6 ++++++
>  1 file changed, 6 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 191561da0368..46f5d5f7de36 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -179,6 +179,7 @@ static void setup_device(struct pci_dev *dev, int max_bar)
>  				pr_debug("BAR does not fit within bus IO res\n");
>  				return;
>  			}
> +			pr_debug("pbar%d: allocated at 0x%08x\n", bar, last_io);
>  			pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + bar * 4, last_io);
>  			dev->resource[bar].flags = IORESOURCE_IO;
>  			last_addr = last_io;
> @@ -197,6 +198,7 @@ static void setup_device(struct pci_dev *dev, int max_bar)
>  				pr_debug("BAR does not fit within bus p-mem res\n");
>  				return;
>  			}
> +			pr_debug("pbar%d: allocated at 0x%08x\n", bar, last_mem_pref);
>  			pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + bar * 4, last_mem_pref);
>  			dev->resource[bar].flags = IORESOURCE_MEM |
>  			                           IORESOURCE_PREFETCH;
> @@ -215,6 +217,7 @@ static void setup_device(struct pci_dev *dev, int max_bar)
>  				pr_debug("BAR does not fit within bus np-mem res\n");
>  				return;
>  			}
> +			pr_debug("pbar%d: allocated at 0x%08x\n", bar, last_mem);
>  			pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + bar * 4, last_mem);
>  			dev->resource[bar].flags = IORESOURCE_MEM;
>  			last_addr = last_mem;
> @@ -286,18 +289,21 @@ static void postscan_setup_bridge(struct pci_dev *dev)
>  
>  	if (last_mem) {
>  		last_mem = ALIGN(last_mem, SZ_1M);
> +		pr_debug("bridge NP limit at 0x%08x\n", last_mem);
>  		pci_write_config_word(dev, PCI_MEMORY_LIMIT,
>  				      ((last_mem - 1) & 0xfff00000) >> 16);
>  	}
>  
>  	if (last_mem_pref) {
>  		last_mem_pref = ALIGN(last_mem_pref, SZ_1M);
> +		pr_debug("bridge P limit at 0x%08x\n", last_mem_pref);
>  		pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT,
>  				      ((last_mem_pref - 1) & 0xfff00000) >> 16);
>  	}
>  
>  	if (last_io) {
>  		last_io = ALIGN(last_io, SZ_4K);
> +		pr_debug("bridge IO limit at 0x%08x\n", last_io);
>  		pci_write_config_byte(dev, PCI_IO_LIMIT,
>  				((last_io - 1) & 0x0000f000) >> 8);
>  		pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16,
> -- 
> 2.10.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: [PATCH] net: e1000: set edev parent pointer
From: Sascha Hauer @ 2016-11-03  6:11 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox
In-Reply-To: <20161101085742.20390-1-l.stach@pengutronix.de>

On Tue, Nov 01, 2016 at 09:57:42AM +0100, Lucas Stach wrote:
> This way the ethernet device will show up at the correct point
> in the device hierarchy.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/net/e1000/main.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks

Sascha

> 
> diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
> index 77bcd179a824..6f9dddaf232a 100644
> --- a/drivers/net/e1000/main.c
> +++ b/drivers/net/e1000/main.c
> @@ -3600,6 +3600,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  	e1000_get_ethaddr(edev, edev->ethaddr);
>  
>  	/* Set up the function pointers and register the device */
> +	edev->parent = &pdev->dev;
>  	edev->init = e1000_init;
>  	edev->recv = e1000_poll;
>  	edev->send = e1000_transmit;
> -- 
> 2.10.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: [PATCH] ARM: riotboard: fix barebox partition size
From: Sascha Hauer @ 2016-11-03  6:10 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox
In-Reply-To: <1477948819-13931-1-git-send-email-dev@lynxeye.de>

On Mon, Oct 31, 2016 at 10:20:19PM +0100, Lucas Stach wrote:
> This was missed when updating all the partition sizes. The
> environment partition has been moved to the correct location,
> but the barebox partition size remained unchanged.
> 
> Signed-off-by: Lucas Stach <dev@lynxeye.de>
> ---
>  arch/arm/dts/imx6s-riotboard.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/dts/imx6s-riotboard.dts b/arch/arm/dts/imx6s-riotboard.dts
> index 7193f28..5758872 100644
> --- a/arch/arm/dts/imx6s-riotboard.dts
> +++ b/arch/arm/dts/imx6s-riotboard.dts
> @@ -29,7 +29,7 @@
>  
>  	partition@0 {
>  		label = "barebox";
> -		reg = <0x0 0x80000>;
> +		reg = <0x0 0xe0000>;
>  	};
>  
>  	environment_usdhc4: partition@e0000 {
> -- 
> 2.7.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: [PATCH v2] net: e1000: fix i210 register remapping
From: Sascha Hauer @ 2016-11-03  6:09 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox
In-Reply-To: <20161031165812.9958-1-l.stach@pengutronix.de>

On Mon, Oct 31, 2016 at 05:58:12PM +0100, Lucas Stach wrote:
> Don't mask out the remapping flag before checking the register offset,
> otherwise none of the switch statements will ever match.
> 
> Fixes: ff6a64d42ffc (e1000: Consolidate register offset fixups)
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> v2: don't break it the other way around
> ---

Applied, thanks

Sascha

>  drivers/net/e1000/regio.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/e1000/regio.c b/drivers/net/e1000/regio.c
> index b2e9d7b6a7df..1610d5851f05 100644
> --- a/drivers/net/e1000/regio.c
> +++ b/drivers/net/e1000/regio.c
> @@ -5,8 +5,6 @@
>  static uint32_t e1000_true_offset(struct e1000_hw *hw, uint32_t reg)
>  {
>  	if (reg & E1000_MIGHT_BE_REMAPPED) {
> -		reg &= ~E1000_MIGHT_BE_REMAPPED;
> -
>  		if (hw->mac_type == e1000_igb) {
>  			switch (reg) {
>  			case E1000_EEWR:
> @@ -19,7 +17,8 @@ static uint32_t e1000_true_offset(struct e1000_hw *hw, uint32_t reg)
>  				reg = E1000_I210_EEMNGCTL;
>  				break;
>  			}
> -		};
> +		}
> +		reg &= ~E1000_MIGHT_BE_REMAPPED;
>  	}
>  
>  	return reg;
> -- 
> 2.10.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: [PATCH upstream 1/4] state: use packet attribute for on storage structs
From: Andrey Smirnov @ 2016-11-02 14:17 UTC (permalink / raw)
  To: Stefan Lengfeld; +Cc: barebox@lists.infradead.org
In-Reply-To: <1478073270-3527-1-git-send-email-s.lengfeld@phytec.de>

On Wed, Nov 2, 2016 at 12:54 AM, Stefan Lengfeld <s.lengfeld@phytec.de> wrote:
> These structs are used for on-storage data layouts. They should be not
> affected by different integer precisions and alignment optimizations of
> 32bit or 64bit machines. Using the architecture independent integer data
> types, like uint32_t, achieves the former, using the packet attribute

 "packed" instead of "packet"?

> the later.
>
> Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de>
> ---
>  common/state/backend_bucket_circular.c | 2 +-
>  common/state/backend_bucket_direct.c   | 2 +-
>  common/state/backend_format_raw.c      | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c
> index 72e165e..d8504e0 100644
> --- a/common/state/backend_bucket_circular.c
> +++ b/common/state/backend_bucket_circular.c
> @@ -47,7 +47,7 @@ struct state_backend_storage_bucket_circular {
>         struct device_d *dev;
>  };
>
> -struct state_backend_storage_bucket_circular_meta {
> +struct __attribute__((__packed__)) state_backend_storage_bucket_circular_meta {

#include <linux/compiler.h> defines "__packed" macro which might make
things less verbose. Ditto for the rest of the changes in this patch.

>         uint32_t magic;
>         uint32_t written_length;
>  };
> diff --git a/common/state/backend_bucket_direct.c b/common/state/backend_bucket_direct.c
> index 08892f0..5225433 100644
> --- a/common/state/backend_bucket_direct.c
> +++ b/common/state/backend_bucket_direct.c
> @@ -32,7 +32,7 @@ struct state_backend_storage_bucket_direct {
>         struct device_d *dev;
>  };
>
> -struct state_backend_storage_bucket_direct_meta {
> +struct __attribute__((__packed__)) state_backend_storage_bucket_direct_meta {
>         uint32_t magic;
>         uint32_t written_length;
>  };
> diff --git a/common/state/backend_format_raw.c b/common/state/backend_format_raw.c
> index 4209424..e028ea6 100644
> --- a/common/state/backend_format_raw.c
> +++ b/common/state/backend_format_raw.c
> @@ -37,7 +37,7 @@ struct state_backend_format_raw {
>         struct device_d *dev;
>  };
>
> -struct backend_raw_header {
> +struct __attribute__((__packed__)) backend_raw_header {
>         uint32_t magic;
>         uint16_t reserved;
>         uint16_t data_len;
> --
> 1.9.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* Re: [PATCH v2] net: e1000: fix i210 register remapping
From: Andrey Smirnov @ 2016-11-02 14:08 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox@lists.infradead.org
In-Reply-To: <20161031165812.9958-1-l.stach@pengutronix.de>

On Mon, Oct 31, 2016 at 9:58 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Don't mask out the remapping flag before checking the register offset,
> otherwise none of the switch statements will ever match.
>
> Fixes: ff6a64d42ffc (e1000: Consolidate register offset fixups)
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

FWIW, as an author of the bug (sorry!):

Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com>

> ---
> v2: don't break it the other way around
> ---
>  drivers/net/e1000/regio.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/e1000/regio.c b/drivers/net/e1000/regio.c
> index b2e9d7b6a7df..1610d5851f05 100644
> --- a/drivers/net/e1000/regio.c
> +++ b/drivers/net/e1000/regio.c
> @@ -5,8 +5,6 @@
>  static uint32_t e1000_true_offset(struct e1000_hw *hw, uint32_t reg)
>  {
>         if (reg & E1000_MIGHT_BE_REMAPPED) {
> -               reg &= ~E1000_MIGHT_BE_REMAPPED;
> -
>                 if (hw->mac_type == e1000_igb) {
>                         switch (reg) {
>                         case E1000_EEWR:
> @@ -19,7 +17,8 @@ static uint32_t e1000_true_offset(struct e1000_hw *hw, uint32_t reg)
>                                 reg = E1000_I210_EEMNGCTL;
>                                 break;
>                         }
> -               };
> +               }
> +               reg &= ~E1000_MIGHT_BE_REMAPPED;
>         }
>
>         return reg;
> --
> 2.10.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply

* [PATCH upstream 1/4] state: use packet attribute for on storage structs
From: Stefan Lengfeld @ 2016-11-02  7:54 UTC (permalink / raw)
  To: barebox

These structs are used for on-storage data layouts. They should be not
affected by different integer precisions and alignment optimizations of
32bit or 64bit machines. Using the architecture independent integer data
types, like uint32_t, achieves the former, using the packet attribute
the later.

Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de>
---
 common/state/backend_bucket_circular.c | 2 +-
 common/state/backend_bucket_direct.c   | 2 +-
 common/state/backend_format_raw.c      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c
index 72e165e..d8504e0 100644
--- a/common/state/backend_bucket_circular.c
+++ b/common/state/backend_bucket_circular.c
@@ -47,7 +47,7 @@ struct state_backend_storage_bucket_circular {
 	struct device_d *dev;
 };
 
-struct state_backend_storage_bucket_circular_meta {
+struct __attribute__((__packed__)) state_backend_storage_bucket_circular_meta {
 	uint32_t magic;
 	uint32_t written_length;
 };
diff --git a/common/state/backend_bucket_direct.c b/common/state/backend_bucket_direct.c
index 08892f0..5225433 100644
--- a/common/state/backend_bucket_direct.c
+++ b/common/state/backend_bucket_direct.c
@@ -32,7 +32,7 @@ struct state_backend_storage_bucket_direct {
 	struct device_d *dev;
 };
 
-struct state_backend_storage_bucket_direct_meta {
+struct __attribute__((__packed__)) state_backend_storage_bucket_direct_meta {
 	uint32_t magic;
 	uint32_t written_length;
 };
diff --git a/common/state/backend_format_raw.c b/common/state/backend_format_raw.c
index 4209424..e028ea6 100644
--- a/common/state/backend_format_raw.c
+++ b/common/state/backend_format_raw.c
@@ -37,7 +37,7 @@ struct state_backend_format_raw {
 	struct device_d *dev;
 };
 
-struct backend_raw_header {
+struct __attribute__((__packed__)) backend_raw_header {
 	uint32_t magic;
 	uint16_t reserved;
 	uint16_t data_len;
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox