Re: [U-Boot] [PATCH 4/4] sandbox: Enable sound

2018-11-29 Thread sjg
Now that the buffer-overflow bug is fixed, we can enable sound on sandbox. Drop the code which exits early. Signed-off-by: Simon Glass --- arch/sandbox/cpu/sdl.c | 19 --- 1 file changed, 19 deletions(-) Applied to u-boot-dm/master, thanks! _

Re: [U-Boot] [PATCH v2 01/10] malloc_simple: Add logging of allocations

2018-11-29 Thread sjg
It is sometimes useful to see what memory is being allocated early during boot. Add logging to support this, using a new LOGC_ALLOC category. Signed-off-by: Simon Glass --- Changes in v2: - Rebase to master - Correct definition of log() when logging is disabled common/malloc_simple.c | 58

Re: [U-Boot] [PATCH v3 2/2] core: ofnode: Add ofnode_get_addr_size_index

2018-11-29 Thread sjg
Add ofnode_get_addr_size_index function to fetch the address and size of the reg space based on index. Signed-off-by: Keerthy --- drivers/core/ofnode.c | 14 ++ include/dm/ofnode.h | 14 ++ 2 files changed, 24 insertions(+), 4 deletions(-) Applied to u-boot-dm/master,

Re: [U-Boot] [PATCH 3/4] sound: sandbox: Use the correct frequency

2018-11-29 Thread sjg
At present we request a particular frequency but we may not get the exact same frequency in response. So use the actual frequency for generation of the square wave. This ensures that the pitch remains accurate on all host machines. Signed-off-by: Simon Glass --- arch/sandbox/cpu/sdl.c | 11

Re: [U-Boot] [PATCH v2 2/5] tpm: Add a constant for the minimum supported digest size

2018-11-29 Thread sjg
When SHA1 is used we need 20 bytes for the digest size. Add a constant so that clients can make use of this, e.g. to allocate local buffers. Signed-off-by: Simon Glass --- Changes in v2: - Split out from main TPM patch include/tpm-common.h | 2 ++ 1 file changed, 2 insertions(+) Applied to u-

Re: [U-Boot] [PATCH 17/25] tpm: Export the open/close functions

2018-11-29 Thread sjg
Hi Miquel, On Wed, 7 Nov 2018 at 00:52, Miquel Raynal wrote: > > Hi Simon, > > Simon Glass wrote on Tue, 6 Nov 2018 15:21:34 -0700: > > > At present these functions are not accessible outside the TPM library, but > > in some cases we need to call them. > > I was not aware, what is the use case?

Re: [U-Boot] [PATCH v3] sandbox: Use memmove() to move overlapping regions

2018-11-29 Thread sjg
On 11/13/2018 11:55 PM, Simon Glass wrote: > The use of strcpy() to remove characters at the start of a string is safe > in U-Boot, since we know the implementation. But in os.c we are using the > C library's strcpy() function, where this behaviour is not permitted. > > Update the code to use memmo

Re: [U-Boot] [PATCH v2 4/5] tpm: Convert to use a device parameter

2018-11-29 Thread sjg
At present many TPM calls assume there is only one TPM in the system and look up this TPM themselves. This is inconsistent with driver model, which expects all driver methods to have a device parameter. Update the code to correct this. Signed-off-by: Simon Glass --- Changes in v2: - Correct miss

Re: [U-Boot] [PATCH] ofnode: fix comment typo

2018-11-29 Thread sjg
Signed-off-by: Baruch Siach --- include/dm/ofnode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm/master, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Re: [U-Boot] [PATCH] dm: (re)sort uclass ids alphabetically

2018-12-05 Thread sjg
The comment in uclass-id.h states that "U-Boot uclasses start here - in alphabetical order" but the subsequent list is not sorted alphabetically. This reestablishes order. Signed-off-by: Philipp Tomsich --- include/dm/uclass-id.h | 8 1 file changed, 4 insertions(+), 4 deletions(-)

Re: [U-Boot] [PATCH v3 1/1] dm: core: add functions to get/remap I/O addresses by name

2018-12-05 Thread sjg
On Mon, 3 Dec 2018 at 11:37, Álvaro Fernández Rojas wrote: > > This functions allow us to get and remap I/O addresses by name, which is > useful when there are multiple reg addresses indexed by reg-names property. > This is needed in bmips dma/eth patch series, but can also be used on many > othe

Re: [U-Boot] [PATCH 17/21] time: Update mdelay() to delay in one large chunk

2018-12-05 Thread sjg
The current function delays in one millisecond at a time. This does not work well on sandbox since it results in lots of calls to usleep(1000) in a tight loop. This makes the sleep duration quite variable since each call results in a sleep of *at least* 1000us, but possibly more. Depending on how b

Re: [U-Boot] [PATCH 16/21] video: backlight: Fix log message in enable_sequence()

2018-12-05 Thread sjg
On Fri, 23 Nov 2018 21:29:39 -0700 Simon Glass s...@chromium.org wrote: > This has an extra argument. Remove it. > > Signed-off-by: Simon Glass Acked-by: Anatolij Gustschin Applied to u-boot-dm/master, thanks! ___ U-Boot mailing list U-Boot@lists.de

Re: [U-Boot] [PATCH 20/21] Add inttypes.h

2018-12-05 Thread sjg
Even if U-Boot does not use this, some libraries do. Add back this header file so that the build does not fall back to using the host version, which may include stdint.h and break the build due to conflicts with uint64_t, etc. This partially reverts commit dee37fc99d94 ("Remove includes and PRI*

Re: [U-Boot] [PATCH 14/21] cros_ec: Adjust to use v1 vboot context only

2018-12-05 Thread sjg
At present there are no users of the 64-byte v2 context. The v1 context is only 16 bytes long and currently an error is raised if too much data is returned from the EC. Update the code to limit the size to 16 bytes. Signed-off-by: Simon Glass --- drivers/misc/cros_ec_sandbox.c | 10 ++

Re: [U-Boot] [PATCH] dm: rtc: Fix function name in comment

2018-12-05 Thread sjg
On 11/25/18 7:32 PM, Philipp Tomsich wrote: > The documentation comment for dm_rtc_set was referring to dm_rtc_put > instead. Fix it. > > Signed-off-by: Philipp Tomsich > --- > > include/rtc.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Applied to u-boot-dm/master, thanks! _

Re: [U-Boot] [PATCH 11/21] tpm: Add non-volatile index attributes needed for v2

2018-12-05 Thread sjg
Version-2 TPMs support attributes for nvdata. Add definitions to the header file so that clients can use it. Signed-off-by: Simon Glass --- include/tpm-v2.h | 33 + 1 file changed, 33 insertions(+) Applied to u-boot-dm/master, thanks! ___

Re: [U-Boot] [PATCH 03/21] sandbox: physmem: Use mapping to support sandbox

2018-12-05 Thread sjg
Replace the raw cast with a map_sysmem() call so this code works with sandbox. Signed-off-by: Simon Glass --- lib/physmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Applied to u-boot-dm/master, thanks! ___ U-Boot mailing list U-Boot@l

Re: [U-Boot] [PATCH 19/21] Add UINT32_MAX and UINT64_MAX

2018-12-05 Thread sjg
These constants are defined by stdint.h but not by kernel.h, which is its stand-in in U-Boot. Add the definitions so that libraries which expect stdint.h constants can work. Signed-off-by: Simon Glass --- include/linux/kernel.h | 4 1 file changed, 4 insertions(+) Applied to u-boot-dm/mas

Re: [U-Boot] [PATCH 12/21] tpm: Fix a logging warning in unpack_byte_string()

2018-12-05 Thread sjg
Fix the printf() string to avoid a warning. Signed-off-by: Simon Glass --- lib/tpm-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm/master, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/

Re: [U-Boot] [PATCH 09/21] tpm: Remove use of build-time TPM versions

2018-12-05 Thread sjg
There is only one place in the code which assumes at build-time that we are using either a v1 or a v2 TPM. Fix this up and add a new function to return the version of a TPM. Supported TPM versions (v1 and v2) can be enabled independently and it is possible to use both versions at once. This is use

Re: [U-Boot] [PATCH 06/21] sandbox: Zero the ram buffer on startup

2018-12-05 Thread sjg
At present the RAM buffer is not inited unless it is read from a file, likely produced by an earlier phase of U-Boot. This causes valgrind warnings whenever the RAM buffer is used. Correct this by initing it if needed. Signed-off-by: Simon Glass --- arch/sandbox/cpu/start.c | 7 +++

Re: [U-Boot] [PATCH v3 5/7] serial: ns16550: Provide ->getinfo() implementation

2018-12-05 Thread sjg
On Tue, 20 Nov 2018 at 14:52, Andy Shevchenko wrote: > > New callback will supply necessary information, for example, > to ACPI SPCR table. > > Signed-off-by: Andy Shevchenko > --- > drivers/serial/ns16550.c | 20 > 1 file changed, 20 insertions(+) Reviewed-by: Simon Glass

Re: [U-Boot] [PATCH 01/21] sandbox: Fix up the debug message for the image filename

2018-12-05 Thread sjg
This currently prints out the wrong filename. Fix it. Signed-off-by: Simon Glass --- arch/sandbox/cpu/os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm/master, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https:/

Re: [U-Boot] [PATCH 3/3] buildman/toolchain.py: handle inconsistent tarball names

2018-12-05 Thread sjg
On Wed, Nov 28, 2018 at 2:38 PM Simon Glass wrote: > Hi Trevor, > > On Tue, 27 Nov 2018 at 17:51, Trevor Woerner wrote: > > > > On Mon, Nov 26, 2018 at 8:06 PM Simon Glass wrote: > >> > >> Reviewed-by: Simon Glass > >> But please use single quotes for strings. > > > > > > I can send a v2 if yo

Re: [U-Boot] [PATCH v3 3/7] serial: ns16550: Group reg_* members of ns16550_platdata

2018-12-05 Thread sjg
On Tue, 20 Nov 2018 at 14:52, Andy Shevchenko wrote: > > Group reg_* members of struct ns16550_platdata together for better > maintenance. > > No functional change intended. > > Signed-off-by: Andy Shevchenko > --- > include/ns16550.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Rev

Re: [U-Boot] [PATCH 04/21] sandbox: net: Correct name copy in eth_raw_bus_post_bind()

2018-12-05 Thread sjg
We cannot be sure that the interface name takes up the full length of the space available to it. Use strcpy() instead of memcpy() in this case. This corrects a valgrind warning. Signed-off-by: Simon Glass --- drivers/net/sandbox-raw-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) A

Re: [U-Boot] [PATCH 13/21] cros: Correct a printf() string and comment

2018-12-05 Thread sjg
Correct a warning that occurs on sandbox. Also fix the comment style in cros_ec_set_lid_shutdown_mask(). Signed-off-by: Simon Glass --- drivers/misc/cros_ec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Applied to u-boot-dm/master, thanks!

Re: [U-Boot] [PATCH] binman: Add myself as maintainer

2018-12-05 Thread sjg
Add an entry for my maintainership of this tool. Signed-off-by: Simon Glass --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) Applied to u-boot-dm/master, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-

Re: [U-Boot] [PATCH v3 7/7] x86: acpi: Generate SPCR table

2018-12-05 Thread sjg
On Tue, 20 Nov 2018 at 14:52, Andy Shevchenko wrote: > > Microsoft specifies a SPCR (Serial Port Console Redirection Table) [1]. > Let's provide it in U-Boot. > > [1]: > https://docs.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table > > Signed-off-by: And

Re: [U-Boot] [PATCH 15/21] input: i8042: Use remove() instead of exported functions

2018-12-05 Thread sjg
We should not have exported functions in a driver. The i8042_disable() function is used to disable the keyboard. Provide a remove() method instead, which is the standard way of disabling a device. We could potentially add a method to flush input but that does not seem necessary. Signed-off-by: Si

Re: [U-Boot] [PATCH 02/21] sandbox: Check the filename in jump_to_image_no_args()

2018-12-05 Thread sjg
If the filename is NULL this function currently crashes. Update it to fail gracefully. Signed-off-by: Simon Glass --- arch/sandbox/cpu/spl.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) Applied to u-boot-dm/master, thanks! ___ U-Boot

Re: [U-Boot] [PATCH 10/21] tpm: Export tpm_clear_and_reenable()

2018-12-05 Thread sjg
This function is intended to be exported but is not. Add it to the header file. Signed-off-by: Simon Glass --- include/tpm-common.h | 8 1 file changed, 8 insertions(+) Applied to u-boot-dm/master, thanks! ___ U-Boot mailing list U-Boot@list

Re: [U-Boot] [PATCH v3 2/7] dm: serial: Introduce ->getinfo() callback

2018-12-05 Thread sjg
On Tue, 20 Nov 2018 at 14:52, Andy Shevchenko wrote: > > New callback will give a necessary information to fill up ACPI SPCR table, > for example. Maybe used later for other purposes. > > Signed-off-by: Andy Shevchenko > --- > drivers/serial/sandbox.c | 21 ++ > drivers/ser

Re: [U-Boot] [PATCH v3 4/7] serial: ns16550: Read reg-io-width from device tree

2018-12-05 Thread sjg
On Tue, 20 Nov 2018 at 14:52, Andy Shevchenko wrote: > > Cache the value of the reg-io-width property for the future use. > > Signed-off-by: Andy Shevchenko > --- > drivers/serial/ns16550.c | 1 + > include/ns16550.h| 2 ++ > 2 files changed, 3 insertions(+) Reviewed-by: Simon Glass A

Re: [U-Boot] [PATCH 07/21] sandbox: Use 'extras' to specify 'head' files

2018-12-05 Thread sjg
At present sandbox has a start.o in the 'start' target but also includes it in the normal target list. This is not how this is normally handled. It is needed because sandbox does not include the u-boot-init variable in its link rule. Update the rule and move start.o from the normal target list to

Re: [U-Boot] [PATCH v3 6/7] x86: acpi: Add SPCR table description

2018-12-05 Thread sjg
Add SPCR table description as it provided in Linux kernel. Port subtype for ACPI_DBG2_SERIAL_PORT is used as an interface type in SPCR. Thus, provide a set of definitions to be utilized later. Signed-off-by: Andy Shevchenko Reviewed-by: Bin Meng --- arch/x86/include/asm/acpi_table.h | 49 +

Re: [U-Boot] [PATCH v3 1/7] dm: serial: Add ->getconfig() callback

2018-12-05 Thread sjg
Hi Andy, On Wed, 5 Dec 2018 at 07:01, Andy Shevchenko wrote: > > On Wed, Dec 05, 2018 at 05:55:37AM -0700, Simon Glass wrote: > > On Tue, 27 Nov 2018 at 09:03, Andy Shevchenko > > wrote: > > > On Mon, Nov 26, 2018 at 06:02:28PM -0700, Simon Glass wrote: > > > > The rest of similar functions are

Re: [U-Boot] [PATCH 05/21] sandbox: sysreset: Update to support power-on reset

2018-12-05 Thread sjg
If U-Boot is started from SPL or TPL, then those earlier phases deal with the reset cause. On real hardware this cause may be lost once it is read. Emulate that behaviour in sandbox by reporting a warm reset when a previous phase has run since start-up. Signed-off-by: Simon Glass --- drivers/sy

Re: [U-Boot] [PATCH 17/30] dm: sound: wm8994: Drop wm8994_i2c_init()

2018-12-09 Thread sjg
This function has only one line in it. Drop it. Signed-off-by: Simon Glass --- drivers/sound/wm8994.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) Applied to u-boot-dm/master ___ U-Boot mailing list U-Boot@lists.denx.de https://

Re: [U-Boot] [PATCH 15/30] dm: sound: wm8994: Drop g_codec_info and g_wm8994_info

2018-12-09 Thread sjg
These are only used in two functions so can be made local. Signed-off-by: Simon Glass --- drivers/sound/wm8994.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) Applied to u-boot-dm/master ___ U-Boot mailing list U-Boot@lists.d

Re: [U-Boot] [PATCH 18/30] dm: sound: Fix up header ordering

2018-12-09 Thread sjg
Tidy up the ordering of header files in the sounds files. Signed-off-by: Simon Glass --- drivers/sound/max98095.c| 11 +-- drivers/sound/samsung-i2s.c | 36 ++-- drivers/sound/wm8994.c | 8 3 files changed, 27 insertions(+), 28 deletion

Re: [U-Boot] [PATCH 07/30] dm: sound: Drop codec_type

2018-12-09 Thread sjg
This field is not really used. It is always set to a known value. Drop it to simplify the code. Signed-off-by: Simon Glass --- drivers/sound/max98095.c | 14 -- drivers/sound/wm8994.c | 10 -- include/sound.h | 9 - 3 files changed, 33 deletions(-) Appli

Re: [U-Boot] [PATCH 14/30] dm: sound: max98095: Drop global i2c-address variable

2018-12-09 Thread sjg
We can put this in the private structure and avoid a global. Signed-off-by: Simon Glass --- drivers/sound/max98095.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) Applied to u-boot-dm/master ___ U-Boot mailing list U-Boot@lists.denx.d

Re: [U-Boot] [PATCH 11/30] dm: sound: wm899c: Split out interface setup code

2018-12-09 Thread sjg
With driver model we want to do a minimal probe when the device is probed and then set up the codec interface later when a sound is actully played. Split this setup code out into its own function to help with this. Signed-off-by: Simon Glass --- drivers/sound/wm8994.c | 34

Re: [U-Boot] [PATCH 08/30] dm: sound: wm8994: Pass private data to internal functions

2018-12-09 Thread sjg
At present the driver-private data is global. To allow this code to be used with driver model, change it to pass the data down to each function. Use the name 'priv' consistently throughout. Also rename wm8994_update_bits() to wm8994_bic_or() which is more descriptive and shorter, thus breaking few

Re: [U-Boot] [PATCH 16/30] dm: sound: max98095: Drop g_codec_info and g_max98095_info

2018-12-09 Thread sjg
These are only used in two functions so can be made local. Also change the first argument of max98095_do_init() to suit. Signed-off-by: Simon Glass --- drivers/sound/max98095.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) Applied to u-boot-dm/master

Re: [U-Boot] [PATCH 12/30] dm: sound: max98095: Split out interface setup code

2018-12-09 Thread sjg
With driver model we want to do a minimal probe when the device is probed and then set up the codec interface later when a sound is actully played. Split this setup code out into its own function to help with this. Signed-off-by: Simon Glass --- drivers/sound/max98095.c | 36 ++

Re: [U-Boot] [PATCH 10/30] dm: sound: wm8994: Create a new common init function

2018-12-09 Thread sjg
With driver model we cannot pass in the global struct, but instead want to pass in the driver-private data. Split some of the code out of wm8994_init() to handle this. Signed-off-by: Simon Glass --- drivers/sound/wm8994.c | 56 +- 1 file changed, 33 inser

Re: [U-Boot] [PATCH 06/30] dm: sound: samsung: Rename i2stx_info to samsung_i2s_priv

2018-12-09 Thread sjg
This struct is only used by the Samsung I2C driver and should move into that driver. For now, rename it so it is clear that is driver-private info. Signed-off-by: Simon Glass --- drivers/sound/samsung-i2s.c | 6 +++--- drivers/sound/sound-i2s.c | 10 +- include/i2s.h |

Re: [U-Boot] [PATCH 02/30] snow: Expand U-Boot size

2018-12-09 Thread sjg
Now that we have EFI, etc. enabled, U-Boot is larger than it was. Expand the region allocated for it. Signed-off-by: Simon Glass --- arch/arm/dts/exynos5250-snow.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm/master __

Re: [U-Boot] [PATCH 09/30] dm: sound: max98095: Pass private data to internal functions

2018-12-09 Thread sjg
At present the driver-private data is global. To allow this code to be used with driver model, change it to pass the data down to each function. Use the name 'priv' consistently throughout. Also rename max98095_update_bits() to max98095_bic_or() which is more descriptive and shorter, thus breaking

Re: [U-Boot] [PATCH 13/30] dm: sound: wm8994: Drop global i2c-address variable

2018-12-09 Thread sjg
We can put this in the private structure and avoid a global. Signed-off-by: Simon Glass --- drivers/sound/wm8994.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) Applied to u-boot-dm/master ___ U-Boot mailing list U-Boot@lists.denx.de

Re: [U-Boot] [PATCH 05/30] dm: sound: Drop unused pre-device-tree code

2018-12-09 Thread sjg
CONFIG_OF_CONTROL is enabled for all boards that use sound, so remove the dead code. Signed-off-by: Simon Glass --- drivers/sound/max98095.c | 6 -- drivers/sound/wm8994.c | 6 -- 2 files changed, 12 deletions(-) Applied to u-boot-dm/master ___

Re: [U-Boot] [PATCH 03/30] dm: sound: samsung: Make local function static

2018-12-09 Thread sjg
Several functions are not exported from this file. Make them static so this is clear. Signed-off-by: Simon Glass --- drivers/sound/samsung-i2s.c | 8 drivers/sound/wm8994.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) Applied to u-boot-dm/master __

Re: [U-Boot] [PATCH 04/30] dm: sound: Rename en_sound_codec to sound_codec

2018-12-09 Thread sjg
The en_ prefix is confusing and not needed. Drop it. Signed-off-by: Simon Glass --- include/sound.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Applied to u-boot-dm/master ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.

Re: [U-Boot] [PATCH 01/30] sandbox: Increase the pre-relocation memory

2018-12-09 Thread sjg
This is close to full now, so increase it to avoid problems with adding more devices. Signed-off-by: Simon Glass --- Kconfig| 2 ++ configs/sandbox64_defconfig| 1 - configs/sandbox_defconfig | 1 - configs/sandbox_flattree_defconfig | 1 - configs/s

Re: [U-Boot] [PATCH v2 22/22] dm: sound: Use the correct number of channels for sound

2018-12-14 Thread sjg
At present the 'beep' sound generates a waveform for only one channel even if two are being used. This means that the beep is twice the frequency it should be. Correct this by making it a parameter. The fix in a previous commit was correct for sandbox but not for other boards. Fixes: 03f11e87a8 (

Re: [U-Boot] [PATCH v2 21/22] dm: sandbox: Allow selection of sample rate and channels

2018-12-14 Thread sjg
At present these parameters are hard-coded in the sdl interface code. Allow them to be specified by the driver instead. Signed-off-by: Simon Glass --- Changes in v2: None arch/sandbox/cpu/sdl.c | 10 +++--- arch/sandbox/include/asm/sdl.h | 6 -- drivers/sound/sandbox.c

Re: [U-Boot] [PATCH v2 17/22] dm: exynos: Drop CONFIG_DM_I2C_COMPAT

2018-12-14 Thread sjg
This option is not needed anymore for all exynos boards except arndale. Update the config. Signed-off-by: Simon Glass --- Changes in v2: None configs/peach-pi_defconfig | 1 - configs/peach-pit_defconfig | 1 - configs/smdk5250_defconfig | 1 - configs/smdk5420_defconfig | 1 - configs/snow

Re: [U-Boot] [PATCH v2 20/22] dm: sound: max98095: Tidy up error codes

2018-12-14 Thread sjg
Return a valid error code instead of -1. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to tidy up error codes in max98095 drivers/sound/max98095.c | 47 1 file changed, 23 insertions(+), 24 deletions(-) Applied to u-boot-dm/master _

Re: [U-Boot] [PATCH v2 14/22] dm: sound: exynos: Add support for max98090

2018-12-14 Thread sjg
Add support for this new codec which is used by pit. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch with support for max98090 drivers/sound/Kconfig| 8 + drivers/sound/Makefile | 1 + drivers/sound/max98090.c | 377 ++ drivers/sound/max98090.h | 663

Re: [U-Boot] [PATCH v2 12/22] exynos: Add support for exynos5420 i2s pinmux

2018-12-14 Thread sjg
Allow setting the i2s pinmux correctly on exyno5420 so that i2c can be used on that SoC. Also rename EXYNOS_AUDSS to something consistent with other naming. Signed-off-by: Simon Glass --- Changes in v2: None arch/arm/mach-exynos/clock.c | 21 +++-- arch/arm/mach-ex

Re: [U-Boot] [PATCH v2 16/22] dm: sandbox: sound: Convert to use driver model

2018-12-14 Thread sjg
Update sandbox's device tree and config to use driver model for sound. Use the double buffer for sound output so that we don't need to wait for the sound to complete before returning. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to convert sandbox to use driver model arch/sand

Re: [U-Boot] [PATCH v2 09/22] dm: sound: Start i2c IDs from 0

2018-12-14 Thread sjg
The current ID enums start from 1 but there does not seem to be any reason that they cannot start with 0. Adjust the code to avoid the +1 in codec_init(). Signed-off-by: Simon Glass --- Changes in v2: None drivers/sound/max98095.h | 2 +- drivers/sound/sound-i2s.c | 6 ++ drivers/sound/wm

Re: [U-Boot] [PATCH v2 18/22] dm: sound: Complete migration to driver model

2018-12-14 Thread sjg
All users of sound are converted to use driver model. Drop the old code and the CONFIG_DM_SOUND option. Signed-off-by: Simon Glass --- Changes in v2: - Drop CONFIG_DM_SOUND from all defconfig files - Fix up sandbox files to remove old code - Update the rest of the samsung boards - Remove unused

Re: [U-Boot] [PATCH v2 19/22] dm: sound: Fix license headers

2018-12-14 Thread sjg
Fix a few files whos license headers were not converted to SPDX. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to fix license headers drivers/sound/max98095.c | 7 ++- drivers/sound/max98095.h | 5 + 2 files changed, 3 insertions(+), 9 deletions(-) Applied to u-boot-dm

Re: [U-Boot] [PATCH v2 10/22] dm: sound: Add conversion to driver model

2018-12-14 Thread sjg
Move the existing hardware drivers over to use driver model. Signed-off-by: Simon Glass --- Changes in v2: - Correct conversion for pit - Use void * for i2c and sound data arch/arm/dts/exynos5250-smdk5250.dts | 1 + arch/arm/dts/exynos5420-smdk5420.dts | 1 + drivers/sound/Makefile

Re: [U-Boot] [PATCH v2 08/22] dm: core: Add a function to read into a unsigned int

2018-12-14 Thread sjg
The current dev_read...() functions use s32 and u32 which are convenient for device tree but not so useful for normal code, which often wants to use normal integers for values. Add a helper which supports returning an unsigned int. Also add signed versions of the unsigned readers. Signed-off-by:

Re: [U-Boot] [PATCH v2 06/22] dm: sandbox: Update sound to use two buffers

2018-12-14 Thread sjg
At present we use a single buffer for sound which means we cannot be playing one sound while queueing up the next. This wouldn't matter except that a long sound (more than a second) has to be created as a single buffer, thus using a lot of memory. To better mimic what real sound drivers do, add sup

Re: [U-Boot] [PATCH v2 05/22] dm: sound: Create a uclass for i2s

2018-12-14 Thread sjg
The i2s bus is commonly used with audio codecs. It provides a way to stream digital data sychronously in both directions. U-Boot only supports audio output, so this uclass is very simple, with a single tx_data() method. Add a uclass and a test for i2s. Signed-off-by: Simon Glass --- Changes in

Re: [U-Boot] [PATCH v2 03/22] dm: sound: Rename samsung_i2s_priv to i2s_uc_priv

2018-12-14 Thread sjg
This structure contains information that is likely needed by any i2s driver so it seems useful to attach it to the (forthcoming) i2c uclass. For now, just rename it. Signed-off-by: Simon Glass --- Changes in v2: None drivers/sound/samsung-i2s.c | 4 ++-- drivers/sound/sound-i2s.c | 10 +

Re: [U-Boot] [PATCH v2 11/22] exynos: Add proid_is_exynos542x() for common 542x

2018-12-14 Thread sjg
Add a convenience function for any Exynos 542x chip. Signed-off-by: Simon Glass --- Changes in v2: None arch/arm/mach-exynos/clock.c | 10 +- arch/arm/mach-exynos/clock_init_exynos5.c | 2 +- arch/arm/mach-exynos/common_setup.h | 4 ++-- arch/arm/mach-exynos/includ

Re: [U-Boot] [PATCH v2 07/22] dm: sound: Create a uclass for sound

2018-12-14 Thread sjg
The sound driver pulls together the audio codec and i2s drivers in order to actually make sounds. It supports setup() and play() methods. The sound_find_codec_i2s() function allows locating the linked codec and i2s devices. They can be referred to from uclass-private data. Add a uclass and a test

Re: [U-Boot] [PATCH v2 13/22] dm: sound: Move common code out of maxim98095

2018-12-14 Thread sjg
The register-access code is useful for any maxim codec. Move it out into its own file. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to move common code out of maxim98095 drivers/sound/Makefile | 2 +- drivers/sound/max98095.c| 181 ++-

Re: [U-Boot] [PATCH v2 15/22] dm: exynos: sound: Convert to use driver model

2018-12-14 Thread sjg
Update snow's device tree and config to use driver model for sound. Also update the others as best we can. Spring does not appear to have audio support in the kernel. The smdk5250 and smdk5420 boards use a wolfson codec which I cannot test with. So the only boards that is tested and known to work

Re: [U-Boot] [PATCH v2 02/22] dm: sound: Create an option to use driver model for sound

2018-12-14 Thread sjg
The U-Boot sound system provides basic support for beeping. At present it does not use driver model, but it needs to be converted. Add an option to enable driver model for sound. For now it is not connected to anything. Future work will add drivers which use this option. It will then be removed onc

Re: [U-Boot] [PATCH v2 01/22] dm: sound: exynos: Correct codec bus addresses

2018-12-14 Thread sjg
For snow the codec is at address 0x11 on the i2c bus, in 7-bit format. The device tree and code are in 8-bit format (i.e. shifted left one bit). Fix both. Fix pit in a similar way. Signed-off-by: Simon Glass --- Changes in v2: - Add fix for pit and pi also - Fix up tabs in this commit instead of

Re: [U-Boot] [PATCH v2 04/22] dm: sound: Create a uclass for audio codecs

2018-12-14 Thread sjg
An audio codec provides a way to convert digital data to sound and vice versa. Add a simple uclass which just supports setting the parameters for the codec. Signed-off-by: Simon Glass --- Changes in v2: None arch/sandbox/dts/test.dts | 7 - arch/sandbox/include/asm/test.h | 10 +

Re: [U-Boot] [PATCH] buildman: fix typo

2019-01-21 Thread sjg
On Fri, 18 Jan 2019 at 20:40, Chris Packham wrote: > > Fix a typo in the error message from CheckOutputDir(). > > Signed-off-by: Chris Packham > --- > > tools/buildman/control.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Simon Glass Applied to u-boot-dm, thanks! ___

Re: [U-Boot] [PATCH v2] of-platdata: improve documentation

2019-01-21 Thread sjg
On Wed, 16 Jan 2019 at 12:40, Simon Goldschmidt wrote: > > Improve some things in the documentation of OF_PLATDATA that I found > while porting socfgpa_gen5 to it. > > Signed-off-by: Simon Goldschmidt > --- > > Changes in v2: > - further fixes noted by Simon Glass > - added info about missing nod

Re: [U-Boot] [PATCH v3 01/10] Convert CONFIG_BOARD_TYPES to Kconfig

2019-01-21 Thread sjg
On 12/01/19 10:37, Simon Glass wrote: > This converts the following to Kconfig: >CONFIG_BOARD_TYPES > > Signed-off-by: Simon Glass > Reviewed-by: Lukasz Majewski > --- > > Changes in v3: None > Changes in v2: > - Remove stranded comments in the header files > > common/Kconfig |

Re: [U-Boot] [PATCH v3 05/10] spring: Update sound to use max98088 codec

2019-01-21 Thread sjg
Update the spring settings to use this codec, which is what it actually shipped with. Signed-off-by: Simon Glass Reviewed-by: Lukasz Majewski --- Changes in v3: None Changes in v2: None arch/arm/dts/exynos5250-spring.dts | 36 +++--- configs/spring_defconfig

Re: [U-Boot] [PATCH v3 09/10] fdt: samsung: Drop unused fdt_compat_id values

2019-01-21 Thread sjg
This enum still exists but we can shrink it a little based on recent driver-model conversions with samsung. Update it to remove unused items. Signed-off-by: Simon Glass Reviewed-by: Lukasz Majewski --- Changes in v3: None Changes in v2: None include/fdtdec.h | 6 -- lib/fdtdec.c | 6 -

Re: [U-Boot] [PATCH v3 07/10] samsung: Drop board_enable_audio_codec()

2019-01-21 Thread sjg
On 12/01/19 10:37, Simon Glass wrote: > This function is not needed now since the audio codecs have been converted > to proper drivers. The codec-enable GPIO is handled there. > > Signed-off-by: Simon Glass > Reviewed-by: Lukasz Majewski > --- > > Changes in v3: None > Changes in v2: None > > bo

Re: [U-Boot] [PATCH v3 08/10] samsung: mmc: Drop old MMC init code

2019-01-21 Thread sjg
On 12/01/19 10:37, Simon Glass wrote: > Now that these boards use driver model we can drop the old code. At > present s5p_mmc_init() is still used by goni and smdkv310 so cannot be > removed unless we remove those boards. > > Signed-off-by: Simon Glass > Reviewed-by: Lukasz Majewski > --- > > Cha

Re: [U-Boot] [PATCH v3 10/10] fdt: tegra: Drop COMPAT_AMS_AS3722

2019-01-21 Thread sjg
This is no-longer used. Drop it. Signed-off-by: Simon Glass Reviewed-by: Lukasz Majewski --- Changes in v3: - Drop patch 1, previously applied Changes in v2: - Add new patches as per the cover letter include/fdtdec.h | 1 - lib/fdtdec.c | 1 - 2 files changed, 2 deletions(-) Applied to

Re: [U-Boot] [PATCH v3 03/10] exynos: Convert to use CONFIG_BLK

2019-01-21 Thread sjg
On 12/01/19 10:37, Simon Glass wrote: > Move all exynos boards over to use CONFIG_BLK. > > This converts s5p_goni also, but adding dummy functions for pinmux and > peripheral ID. This will not function correctly, but gives the maintainer > more time to convert the board if desired. > > Signed-off-b

Re: [U-Boot] [PATCH v2 6/7] buildman: Write the environment out to an 'env' file

2019-01-21 Thread sjg
Sometimes it is useful to see the environment that was used to build U-Boot. Write this out to a file in the build directory. Signed-off-by: Simon Glass --- Changes in v2: None tools/buildman/builderthread.py | 3 +++ 1 file changed, 3 insertions(+) Applied to u-boot-dm, thanks! _

Re: [U-Boot] [PATCH v3 06/10] spring: Update flashmap details

2019-01-21 Thread sjg
Update the flashmap so that this board can be started over USB A-A. It is slightly different from snow. Signed-off-by: Simon Glass Reviewed-by: Lukasz Majewski --- Changes in v3: None Changes in v2: None arch/arm/dts/exynos5250-spring.dts | 41 -- 1 file changed, 3

Re: [U-Boot] [PATCH v3 04/10] sound: Add a driver for max98088

2019-01-21 Thread sjg
This chip is used by spring. Add a driver for it and update the samsung_sound driver to pick it up. Signed-off-by: Simon Glass --- Changes in v3: - Fix remaining 'return -1' statements to use a real error Changes in v2: None drivers/sound/Kconfig | 8 + drivers/sound/Makefile

Re: [U-Boot] [PATCH v3 02/10] exynos: Drop duplicate 'model' line

2019-01-21 Thread sjg
On 12/01/19 10:37, Simon Glass wrote: > At present the model is shown twice, once in the generic code and once > in the exynos code. Drop the latter. > > Signed-off-by: Simon Glass > Reviewed-by: Lukasz Majewski > --- > > Changes in v3: None > Changes in v2: None > > board/samsung/common/board.c

Re: [U-Boot] [PATCH v2 2/3] power: regulator: Introduce regulator_set_enable_if_allowed api

2019-01-21 Thread sjg
On Fri, 11 Jan 2019 at 02:46, Lokesh Vutla wrote: > > regulator_set_enable() api throws an error in the following three cases: > - when requested to disable an always-on regulator > - when set_enable() ops not provided by regulator driver > - when enabling is actually failed.(Error returned by the

Re: [U-Boot] [PATCH v2 3/3] mmc: omap_hsmmc: Use regulator_set_enable_if_allowed for enabling regulator

2019-01-21 Thread sjg
Use regulator_set_enable_if_allowed() api instead of regulator_set_enable() while enabling io regulators. This way the driver doesn't see an error when disabling an always-on regulator and when enabling is not supported. Reviewed-by: Simon Glass Signed-off-by: Lokesh Vutla --- drivers/mmc/omap_

Re: [U-Boot] [PATCH 04/11] sound: Allow audio codecs to be used by other SoCs

2019-01-21 Thread sjg
At present there is still some samsung-specific code in the audio codecs. Remove it so that these can be used by other SoCs. Signed-off-by: Simon Glass --- drivers/sound/Kconfig | 8 drivers/sound/max98088.c | 7 --- drivers/sound/max98090.c | 7 --- drivers/s

Re: [U-Boot] [PATCH 02/11] sound: samsung: Fix 'regiter' typo

2019-01-21 Thread sjg
Fix a typo that appears many times in this file. Signed-off-by: Simon Glass --- drivers/sound/samsung-i2s.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx

Re: [U-Boot] [PATCH 03/11] sound: i2s: Tidy up a few comments

2019-01-21 Thread sjg
Fix a struct typo and drop a comment (and function prototype) which is not actually used. Signed-off-by: Simon Glass --- include/i2s.h | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing

Re: [U-Boot] [PATCH 01/11] misc: Allow child devices

2019-01-21 Thread sjg
Allow misc devices to have children, so that we can use this uclass for cases where a child device (e.g. I2S) needs to access a misc driver for transferring data. Signed-off-by: Simon Glass --- drivers/misc/misc-uclass.c | 1 + 1 file changed, 1 insertion(+) Applied to u-boot-dm, thanks! _

Re: [U-Boot] [PATCH] test: dm: regmap: Fix the long test delay

2018-12-28 Thread sjg
Hi Neil, On Tue, 11 Dec 2018 at 01:27, Neil Armstrong wrote: > > On 10/12/2018 01:11, Simon Glass wrote: > > At present one of the regmap tests takes 5 seconds to run since it waits > > for a timeout. This should be handled using sandbox_timer_add_offset() > > which advances time for test purpose

Re: [U-Boot] [PATCH] dm: Tidy up 'dm tree' output when there are many devices

2018-12-28 Thread sjg
On Wed, Dec 05, 2018 at 06:42:52PM -0700, Simon Glass wrote: > At present the 'Index' column assumes there is only one digit. But on some > devices (e.g. snow) there are a lot of regulators and GPIO banks. Adjust > the output to allow for two digits without messing up the display. > > Also capatali

<    1   2   3   4   5   6   7   8   9   10   >