Re: [U-Boot] [PATCH v5 006/101] net: Move the checksum functions to lib/

2019-12-02 Thread Joseph Hershberger
> -Original Message-
> From: Simon Glass 
> Sent: Sunday, November 24, 2019 10:09 PM
> To: U-Boot Mailing List 
> Cc: Bin Meng ; Simon Glass ;
> Joseph Hershberger 
> Subject: [EXTERNAL] [PATCH v5 006/101] net: Move the checksum functions
> to lib/
> 
> These functions are used by code outside the network support, so move
> them to lib/ to be more accessible.
> 
> Without this, the functions are only accessible if CONFIG_NET is defined.
> Many boards do not enable that option but still want to do checksums in this
> format.
> 
> Fix up a few code-style nits while we are here.
> 
> Signed-off-by: Simon Glass 

Acked-by: Joe Hershberger 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCHv2 5/5] env: Finish migration of common ENV options

2019-11-19 Thread Joseph Hershberger
> -Original Message-
> From: Tom Rini 
> Sent: Monday, November 18, 2019 7:02 PM
> To: u-boot@lists.denx.de
> Cc: Wolfgang Denk ; Joseph Hershberger
> ; Patrick Delaunay
> ; uboot-st...@st-md-mailman.stormreply.com
> Subject: [EXTERNAL] [PATCHv2 5/5] env: Finish migration of common ENV
> options
> 
> - In ARMv8 NXP Layerscape platforms we also need to make use of
>   CONFIG_SYS_RELOC_GD_ENV_ADDR now, do so.
> - On ENV_IS_IN_REMOTE, CONFIG_ENV_OFFSET is never used, drop the
> define
>   to 0.
> - Add Kconfig entry for ENV_ADDR.
> - Make ENV_ADDR / ENV_OFFSET depend on the env locations that use it.
> - Add ENV_xxx_REDUND options that depend on their primary option and
>   SYS_REDUNDAND_ENVIRONMENT
> - On a number of PowerPC platforms, use SPL_ENV_ADDR not
> CONFIG_ENV_ADDR
>   for the pre-main-U-Boot environment location.
> - On ENV_IS_IN_SPI_FLASH, check not for CONFIG_ENV_ADDR being set but
>   rather it being non-zero, as it will now be zero by default.
> - Rework the env_offset absolute in env/embedded.o to not use
>   CONFIG_ENV_OFFSET as it was the only use of ENV_OFFSET within
>   ENV_IS_IN_FLASH.
> - Migrate all platforms.
> 
> Cc: Wolfgang Denk 
> Cc: Joe Hershberger 
> Cc: Patrick Delaunay 
> Cc: uboot-st...@st-md-mailman.stormreply.com
> Signed-off-by: Tom Rini 

Wow! That was a big one!

Acked-by: Joe Hershberger 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] net: phy: ti: Fix clock output DT property

2019-07-08 Thread Joseph Hershberger
> -Original Message-
> From: Trent Piepho 
> Sent: Friday, May 10, 2019 12:49 PM
> To: u-boot@lists.denx.de
> Cc: Trent Piepho ; Joseph Hershberger
> ; Janine Hagemann
> ; Grygorii Strashko 
> Subject: [EXTERNAL] [PATCH] net: phy: ti: Fix clock output DT property
> 
> The code block reading the DT property for the clock output control was
> before the phy's DT node pointer was set, so it could never work.  Move it
> after the node pointer is set.
> 
> Also store the unsigned 32-bit property into an unsigned value, not a signed
> value, as the former will cause a problem if value overflows.
> For instance, if one were to add 0x as a code to mean the clock output
> should be turned off.
> 
> Cc: Joe Hershberger 
> Cc: Janine Hagemann 
> Cc: Grygorii Strashko 
> Signed-off-by: Trent Piepho 

Acked-by: Joe Hershberger 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] net: phy: ti: Use default values for tx/rx delay and fifo size

2019-07-08 Thread Joseph Hershberger
> -Original Message-
> From: Trent Piepho 
> Sent: Thursday, May 09, 2019 2:42 PM
> To: u-boot@lists.denx.de
> Cc: Trent Piepho ; Joseph Hershberger
> ; Janine Hagemann
> ; Grygorii Strashko 
> Subject: [EXTERNAL] [PATCH] net: phy: ti: Use default values for tx/rx delay
> and fifo size
> 
> When not using DM_ETH, these PHY settings are programmed with default
> values hardcoded into the driver.  When using DM_ETH, they should come
> from the device tree.  However, if the device tree does not have the
> properties, the driver will silent use -1.  Which is entirely out of range,
> programs nonsense into the PHY's registers, and does not work.
> 
> Change this to use the same defaults as non-DM_ETH if the device tree is
> lacking the properties.
> 
> As an alternative, the kernel driver for the phy will display an error message
> and fail if the device tree is lacking.
> 
> Cc: Joe Hershberger 
> Cc: Janine Hagemann 
> Cc: Grygorii Strashko 
> Signed-off-by: Trent Piepho 

Acked-by: Joe Hershberger 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] net: e1000: support 'write_hwaddr' in DM

2018-10-25 Thread Joseph Hershberger
Hi Hannes,

> -Original Message-
> From: Hannes Schmelzer 
> Sent: Thursday, October 11, 2018 12:42 AM
> To: u-boot@lists.denx.de
> Cc: Hannes Schmelzer ; Joseph
> Hershberger 
> Subject: [PATCH] net: e1000: support 'write_hwaddr' in DM
> 
> This commit ports the existing (non-DM) function for writing the MAC-
> address into the shadow ram (and flash) for DM.
> 
> Signed-off-by: Hannes Schmelzer 
> ---

This seems to break many boards. Please build boards that failed and address 
the break.

https://travis-ci.org/jhershbe/u-boot/builds/444858982

Thanks,
-Joe
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-boot UBI environment

2016-05-11 Thread Joseph Hershberger
Hi Kevin,

Am 09.05.2016 um 23:16 schrieb Kevin Smith:
> Hello,
>
> I would appreciate some UBI help/advice if you are able to provide it.
> I am trying to use UBI to store my u-boot environment, but when I try 
> to 'saveenv', it is corrupting another volume of my UBI.  I can image 
> the rootfs volume and boot Linux from it without a problem.  However, 
> the first time that I save the u-boot environment, the rootfs becomes 
> unreadable.  When the rootfs is corrupted, I have booted Linux from 
> another source and tried to attach UBI and dd out the data.  It 
> appears as all 0xFF.  Both u-boot and Linux can read the env volume correctly.
>
> I do not think that there is a board in U-boot that uses UBI env, so I 
> do not have anything to compare to.  I have included some details of 
> my setup below.  Do you have any suggestion about what might be wrong?  
> I saw the recent patch b1d6590d35, and thought it might fix it, but am
> still having the problem even with this.  Maybe there is another bug?  
> I am glad to provide more info as needed.
> Thank you,
> Kevin
>
> DTS:
> flash@d {
>   num-cs = <1>;
>   marvell,nand-keep-config;
>   marvell,nand-enable-arbiter;
>   nand-on-flash-bbt;
>   nand-ecc-strength = <4>;
>   nand-ecc-step-size = <512>;
>   status = "okay";
>
>   partition@0 {
>   label = "mvboot";
>   reg = <0 0x20>;
>   };
>   partition@20 {
>   label = "ubi";
>   reg = <0x20 0x1fe0>;
>   };
> };
> Config:
> #define MTDIDS_DEFAULT"nand0=pxa3xx_nand-0"
> #define MTDPARTS_DEFAULT "mtdparts=pxa3xx_nand-0:2m(mvboot),-(ubi)"
> #define CONFIG_CMD_UBI
> #define CONFIG_CMD_UBIFS

> #define CONFIG_MTD_UBI_FASTMAP
> #define CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT1

I don’t define these 2, not sure if it matters.

> #define CONFIG_ENV_IS_IN_UBI
> #define CONFIG_ENV_UBI_PART"ubi"
> #define CONFIG_ENV_UBI_VOLUME"u-boot-env"
> #define CONFIG_ENV_SIZE(64 * 1024)

My config looks like this:

#define MTDIDS_DEFAULT "nand0=xilinx_nand"
#define MTDPARTS_DEFAULT \
"mtdparts=xilinx_nand:" \
"128k(fsbl)ro," \
"11M(u-boot)ro," \
"70M(boot-config)," \
"-(root)" 
#define CONFIG_ENV_IS_IN_UBI
#define CONFIG_ENV_UBI_PART "boot-config"
#define CONFIG_ENV_UBI_VOLUME "u-boot-env1"
#define CONFIG_ENV_UBI_VOLUME_REDUND "u-boot-env2"
#define CONFIG_ENV_SIZE 0x2

I create volumes like this:

"writepartitions=" \
"if ubi part boot-config && " \
"ubi read $verifyaddr u-boot-env1 1 && " \
"ubi read $verifyaddr u-boot-env2 1; " \
"then " \
"ubi remove bootfs && " \
"ubi remove config; " \
"else " \
"nand erase.part boot-config && " \
"ubi part boot-config && " \
"ubi create u-boot-env1 " __stringify(CONFIG_ENV_SIZE) 
" dynamic && " \
"ubi create u-boot-env2 " __stringify(CONFIG_ENV_SIZE) 
" dynamic; " \
"fi && " \
"ubi create bootfs " __stringify(CONFIG_BOOTFS_VOLUME_SIZE) " 
dynamic && " \
"ubi create config - dynamic && " \
"if ubi part root && " \
"ubi read $verifyaddr rootfs 1; " \
"then " \
"ubi remove rootfs; " \
"else " \
"nand erase.part root && " \
"ubi part root; " \
"fi && " \
"ubi create rootfs - dynamic;\0" \


> => ubi info
> UBI: MTD device name:"mtd=1"
> UBI: MTD device size:510 MiB
> UBI: physical eraseblock size:   131072 bytes (128 KiB)
> UBI: logical eraseblock size:126976 bytes
> UBI: number of good PEBs:4072
> UBI: number of bad PEBs: 8
> UBI: smallest flash I/O unit:2048
> UBI: VID header offset:  2048 (aligned 2048)
> UBI: data offset:4096
> UBI: max. allowed volumes:   128
> UBI: wear-leveling threshold:4096
> UBI: number of internal volumes: 1
> UBI: number of user volumes: 2
> UBI: available PEBs: 0
> UBI: total number of reserved PEBs: 4072
> UBI: number of PEBs reserved for bad PEB handling: 72
> UBI: max/mean erase counter: 18/4
>
> => ubi info l
> Volume information dump:
>   vol_id  0
>   reserved_pebs   1
>   alignment   1
>   data_pad0
>   vol_type3
>   name_len10
>   usable_leb_size 126976
>   used_ebs1
>   used_bytes  126976
>   last_eb_bytes   126976
>   corrupted   0
>   upd_marker  0
>   nameu-boot-env
> Volume information dump:
>   vol_id