Adding PWM Commands (v4)

2023-06-01 Thread Marc Reilly
Thanks again all for comments so far. Changes in v4: - rework set/get into single command - add more cmd arg checking Changes in v3: - fix minor typos - remove unused 'error' var in pwm_get Changes in v2: - remove '-n' option to specify device by number - fix freeing resources on all return path

[PATCH v4 2/2] include: pwm: minor function doc fix for pwm_set_relative_duty_cycle()

2023-06-01 Thread Marc Reilly
Signed-off-by: Marc Reilly --- include/pwm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pwm.h b/include/pwm.h index 643ef4d7ee..02af7d0a5f 100644 --- a/include/pwm.h +++ b/include/pwm.h @@ -71,7 +71,7 @@ unsigned int pwm_get_period(struct pwm_device *pwm

[PATCH v4 1/2] commands: add pwm manipulation command

2023-06-01 Thread Marc Reilly
This introduces a command to set parameters for a pwm device. Signed-off-by: Marc Reilly --- commands/Kconfig | 12 +++ commands/Makefile | 1 + commands/pwm.c| 199 ++ 3 files changed, 212 insertions(+) create mode 100644 commands/pwm.c

[PATCH v3 2/3] commands: pwm: add pwm_get command

2023-05-29 Thread Marc Reilly
Signed-off-by: Marc Reilly --- commands/Kconfig | 7 ++ commands/pwm.c | 56 2 files changed, 63 insertions(+) diff --git a/commands/Kconfig b/commands/Kconfig index cc7585bbb2..f2a6d22f69 100644 --- a/commands/Kconfig +++ b/commands

[PATCH v3 3/3] include: pwm: minor function doc fix for pwm_set_relative_duty_cycle()

2023-05-29 Thread Marc Reilly
Signed-off-by: Marc Reilly --- include/pwm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pwm.h b/include/pwm.h index 643ef4d7ee..02af7d0a5f 100644 --- a/include/pwm.h +++ b/include/pwm.h @@ -71,7 +71,7 @@ unsigned int pwm_get_period(struct pwm_device *pwm

Adding PWM commands

2023-05-29 Thread Marc Reilly
Thanks again all for comments so far. Changes in v3: - fix minor typos - remove unused 'error' var in pwm_get Changes in v2: - remove '-n' option to specify device by number - fix freeing resources on all return paths - add pwm_get command

[PATCH v3 1/3] commands: add pwm manipulation command

2023-05-29 Thread Marc Reilly
This introduces a command to set parameters for a pwm device. Signed-off-by: Marc Reilly --- commands/Kconfig | 11 commands/Makefile | 1 + commands/pwm.c| 143 ++ 3 files changed, 155 insertions(+) create mode 100644 commands/pwm.c

[PATCH v2 3/3] include: pwm: minor function doc fix for pwm_set_relative_duty_cycle()

2023-05-28 Thread Marc Reilly
Signed-off-by: Marc Reilly --- include/pwm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pwm.h b/include/pwm.h index 643ef4d7ee..02af7d0a5f 100644 --- a/include/pwm.h +++ b/include/pwm.h @@ -71,7 +71,7 @@ unsigned int pwm_get_period(struct pwm_device *pwm

[PATCH v2 1/3] commands: add pwm manipulation command

2023-05-28 Thread Marc Reilly
This introduces a command to set parameters for a pwm device. Signed-off-by: Marc Reilly --- commands/Kconfig | 11 commands/Makefile | 1 + commands/pwm.c| 143 ++ 3 files changed, 155 insertions(+) create mode 100644 commands/pwm.c

[PATCH v2 2/3] commands: pwm: add pwm_get command

2023-05-28 Thread Marc Reilly
Signed-off-by: Marc Reilly --- commands/Kconfig | 7 ++ commands/pwm.c | 57 2 files changed, 64 insertions(+) diff --git a/commands/Kconfig b/commands/Kconfig index cc7585bbb2..f2a6d22f69 100644 --- a/commands/Kconfig +++ b/commands

Adding PWM Commands

2023-05-28 Thread Marc Reilly
Hi, Thanks all for comments so far. Changes in v2: - remove '-n' option to specify device by number - fix freeing resources on all return paths - add pwm_get command Cheers Marc

[PATCH 1/1] commands: add pwm manipulation command

2023-05-27 Thread Marc Reilly
This introduces a command to set parameters for a pwm device. Signed-off-by: Marc Reilly --- commands/Kconfig | 11 commands/Makefile | 1 + commands/pwm.c| 149 ++ 3 files changed, 161 insertions(+) create mode 100644 commands/pwm.c

[RFC PATCH 1/1] commands: add pwm manipulation command

2023-05-26 Thread Marc Reilly
This introduces a command to set parameters for a pwm device. Signed-off-by: Marc Reilly --- commands/Kconfig | 11 + commands/Makefile | 1 + commands/pwm.c| 111 ++ 3 files changed, 123 insertions(+) create mode 100644 commands/pwm.c

Adding a pwm command

2023-05-26 Thread Marc Reilly
Hi all, I've been playing around with adding a new board to barebox, and its been a while so I didn't realise that properties could be set on a driver instance directly (eg 'pwm0.enable=1' or 'pwm0.period_ns=1') I started this pwm_set command, if it's useful (ability to set frequency is help

[PATCH 1/1] Documentation: boards: nxp-imx8mp-evk; clarify firmware folder

2023-05-26 Thread Marc Reilly
The imx8mp-bp31.bin file is expected to be in the firmware/ folder Signed-off-by: Marc Reilly --- Documentation/boards/imx/nxp-imx8mp-evk.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/boards/imx/nxp-imx8mp-evk.rst b/Documentation/boards/imx/nxp-imx8mp

Re: [PATCH 1/4] common: boot: don't return too early in bootscript dryrun

2021-06-15 Thread Marc Reilly
Hi Ahmad, On Monday, 14 June 2021 6:51:27 PM AEST Ahmad Fatoum wrote: > Hi, > > On 14.06.21 00:26, Marc Reilly wrote: > > A dryrun boot will now run the boot script and a then a > > dryrun of the bootm. > > This would change behavior for boot scripts that directly b

[PATCH 1/4] common: boot: don't return too early in bootscript dryrun

2021-06-13 Thread Marc Reilly
A dryrun boot will now run the boot script and a then a dryrun of the bootm. Signed-off-by: Marc Reilly --- common/boot.c | 1 - 1 file changed, 1 deletion(-) diff --git a/common/boot.c b/common/boot.c index 07b67734d..183e6bb43 100644 --- a/common/boot.c +++ b/common/boot.c @@ -77,7 +77,6

[PATCH 4/4] ARM: beaglebone: init MPU speed to 800Mhz

2021-06-13 Thread Marc Reilly
This sets the core processor speed to 800Mhz (from 500). Doing this helps speed the boot up a bit until the CPU freq govenor takes over. Signed-off-by: Marc Reilly --- arch/arm/boards/beaglebone/lowlevel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boards

[PATCH 2/4] ARM: beaglebone: add helper init script for checking if BBBW

2021-06-13 Thread Marc Reilly
This adds a check against the eeprom contents to see if the board is a Beaglebone black wireless. (two bytes at offset 0x12 of eeprom will be "BW"). If it is, the global board.variant is updated to "boneblackwireless" Signed-off-by: Marc Reilly --- .../defaultenv-beaglebone/

[PATCH 3/4] ARM: am33xx: add define for 800Mhz MPU PLL point

2021-06-13 Thread Marc Reilly
Signed-off-by: Marc Reilly --- arch/arm/mach-omap/include/mach/am33xx-clock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap/include/mach/am33xx-clock.h b/arch/arm/mach-omap/include/mach/am33xx-clock.h index e71ecbcd2..3c2143d60 100644 --- a/arch/arm/mach-omap/include

Re: [PATCH 1/3] ARM: dts: am335x: introduce new "stripped" common.dtsi for PBL use

2018-08-20 Thread Marc Reilly
Hi Roland, (and everyone) > > you can use git-send-email's --reroll-count=2 / -v2 parameter to change > the subject line to "PATCH v2", to make clear that a previous variant > for this patch series was already discussed on the list. In that case it > is also good practice to give a short changelo

Re: [PATCH 09/17] ARM: i.MX: boot: Move magic values into small functions

2018-04-14 Thread Marc Reilly
On Sunday, April 15, 2018 3:50:55 AM AEST Andrey Smirnov wrote: > Move code to extract appropiate BOOT_CFG bits to decode booutsource on s/booutsource/bootsource > i.MX53, 6, and 7 into small functions for clarity and to allow sharing > the code between i.MX53 and i.MX6. > Cheers, Marc _

Re: [PATCH 08/17] ARM: i.MX: boot: Remove unnecessary retruns

2018-04-14 Thread Marc Reilly
Nitpick: in subject s/retruns/returns On Sunday, April 15, 2018 3:50:54 AM AEST Andrey Smirnov wrote: > Signed-off-by: Andrey Smirnov > --- > arch/arm/mach-imx/boot.c | 4 > 1 file changed, 4 deletions(-) > > diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c > index 42ea2ccd

Re: [PATCH] of_fix_tree: fo not fail when fixup fails

2015-09-23 Thread Marc Reilly
Hi, Should the subject be "do not fail .." (s/fo/do) ? Cheers, Marc On Wednesday, September 23, 2015 05:23:56 PM Sascha Hauer wrote: > When a device tree fixup fails it is worth printing a warning, but > we should not fail booting. > > Signed-off-by: Sascha Hauer > --- > common/oftree.c | 6

Re: [PATCH 1/5] mfd: mc13xxx: Allow to set callback for mc13xxx

2014-05-18 Thread Marc Reilly
Hi, I'm a bit slow on this one, so sorry if I'm too late to the party. :) Cheers, Marc On Thursday, May 08, 2014 09:31:35 AM Sascha Hauer wrote: > Some boards have to initialize the PMIC before other devices can > be initialized. This requires three levels of initcalls: one level > in which the

Re: handling script/init errors

2013-11-12 Thread Marc Reilly
Hi, > hush used to interpret return values from commands < 0 as 'exit'. This > > changed with this commit: > | commit 16edced39ecf4c316179b72c01af249f85b36218 > | Author: Sascha Hauer > | Date: Fri Aug 10 12:40:01 2012 +0200 > | > | hush: Make exit a shell builtin > | > | 'exit

Re: handling script/init errors

2013-11-12 Thread Marc Reilly
Hi Sasha, > > > > Is there a way to set up an error handler in the scripts? Ideally, a > > command or script that could be called if /bin/sh encounters an error. > > What would you consider an error? Is executing the 'false' command an > error? > Commands in scripts must be allowed to fail. You

handling script/init errors

2013-11-11 Thread Marc Reilly
Hi, Rarely, one of the commands (related to hardware access) in our startup scripts fails, and the unit startup ends up bailing to a console prompt. (Which is only on debug port, so no appropriate user feedback) This would end up appearing to the user that nothing has happened, and will either

[PATCH] commands: mtest: add iteration count parameter for mtest command

2013-01-11 Thread Marc Reilly
The number of test iterations can be specified so that the test does not continue forever without manual intervention. This enables better use of mtest via scripts. Signed-off-by: Marc Reilly --- commands/memtest.c | 30 +++--- 1 files changed, 19 insertions(+), 11

Re: [PATCH 0/2] allow scrubbing (erasing of bad blocks)

2012-12-20 Thread Marc Reilly
Hi, On Thursday, December 13, 2012 05:18:20 PM Wolfram Sang wrote: > This patch series first adds a flag to mtd devices which disables special > treatment for bad blocks. That means, they are handled like every other good > block. The second one then adds a scrub command which is basically a simp

RE: boot init code depending on i2c eeprom value

2012-08-03 Thread Marc Reilly
Hi, >i need to set the pin-mux of the board init code depending on an ID coming from >an i2C EEPROM of the board. >Is it possible to do something like this: >postcore_initcall(ecuv6_postcore_init); > console_initcall(ecuv6_console_init); >Actually this is not working. The i2c_imx:i2c_imx_pro

Re: [PATCH 7/7] drivers/eeprom: at24: add I2C eeprom driver for 24c01/02

2012-07-31 Thread Marc Reilly
t; The platform data fields are all optional, if they are zero they are > > assigned default values. As the device capabilities can not be probed, > > the default assumption is that the device is 256 bytes. > > > > Signed-off-by: Marc Reilly > >

RE: [PATCH 6/7] nand: Prevent drivers setting NAND_USE_FLASH_BBT if BBT config not enabled.

2012-07-29 Thread Marc Reilly
> -Original Message- > From: Jean-Christophe PLAGNIOL-VILLARD [mailto:plagn...@jcrosoft.com] > Sent: Sunday, 29 July 2012 8:01 PM > To: Marc Reilly > Cc: barebox@lists.infradead.org > Subject: Re: [PATCH 6/7] nand: Prevent drivers setting > NAND_USE_FLASH_BBT if B

RE: [PATCH 5/7] nand: fix build error when BBT not enabled.

2012-07-29 Thread Marc Reilly
Hi, > On 17:41 Sun 29 Jul , Marc Reilly wrote: > > This fixes following error when bad blocks config option is not enabled: > > > > drivers/built-in.o: In function `nand_erase_nand': > > drivers/mtd/nand/nand_write.c:721: undefined reference to > `nand_upd

[PATCH 6/7] nand: Prevent drivers setting NAND_USE_FLASH_BBT if BBT config not enabled.

2012-07-29 Thread Marc Reilly
This prevents drivers from setting the options flags to use the flash bab block table when the BBT is not enabled in config. Signed-off-by: Marc Reilly --- drivers/mtd/nand/atmel_nand.c |2 +- drivers/mtd/nand/nand_imx.c |2 +- drivers/mtd/nand/nand_s3c24xx.c |2 +- 3 files

at24 eeprom driver (V2) and misc patches

2012-07-29 Thread Marc Reilly
Hi, These patches add an (improved) at24 eeprom driver and some other fixes. The eeprom driver has improved write handling that polls the device for write completion (rather than fixed 10ms delay). The eeprom driver requires patch 3 and 4. The nand patches fix a build error when BBT is not ena

[PATCH 7/7] drivers/eeprom: at24: add I2C eeprom driver for 24c01/02

2012-07-29 Thread Marc Reilly
bed, the default assumption is that the device is 256 bytes. Signed-off-by: Marc Reilly --- drivers/eeprom/Kconfig |7 ++ drivers/eeprom/Makefile |1 + drivers/eeprom/at24.c | 233 +++ include/i2c/at24.h | 13 +++ 4 files changed, 254 in

[PATCH 5/7] nand: fix build error when BBT not enabled.

2012-07-29 Thread Marc Reilly
nand_write.c:76: undefined reference to `nand_update_bbt' make: *** [barebox] Error 1 Signed-off-by: Marc Reilly --- drivers/mtd/nand/nand_write.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/nand_write.c b/drivers/mtd/nand/nand_w

[PATCH 4/7] i2c: device id default to -1 for auto assignment

2012-07-29 Thread Marc Reilly
Signed-off-by: Marc Reilly --- drivers/i2c/i2c.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c index 15f5507..c0d8fa2 100644 --- a/drivers/i2c/i2c.c +++ b/drivers/i2c/i2c.c @@ -251,6 +251,7 @@ struct i2c_client *i2c_new_device

[PATCH 1/7] imx35: 6-bit divider helper

2012-07-29 Thread Marc Reilly
Signed-off-by: Marc Reilly --- arch/arm/mach-imx/speed-imx35.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/speed-imx35.c b/arch/arm/mach-imx/speed-imx35.c index 684dc14..905ab47 100644 --- a/arch/arm/mach-imx/speed-imx35.c +++ b/arch/arm/mach

[PATCH 3/7] i2c: add platform_data for i2c_board_info

2012-07-29 Thread Marc Reilly
Signed-off-by: Marc Reilly --- drivers/i2c/i2c.c |1 + include/i2c/i2c.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c index 5df0d30..15f5507 100644 --- a/drivers/i2c/i2c.c +++ b/drivers/i2c/i2c.c @@ -250,6 +250,7 @@ struct

[PATCH 2/7] imx35: mmc clock has 6 bit divider, not 3_3

2012-07-29 Thread Marc Reilly
Signed-off-by: Marc Reilly --- arch/arm/mach-imx/speed-imx35.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-imx/speed-imx35.c b/arch/arm/mach-imx/speed-imx35.c index 905ab47..6d4236a 100644 --- a/arch/arm/mach-imx/speed-imx35.c +++ b/arch/arm/mach-imx

Re: Way to clear nand bad block table

2012-07-26 Thread Marc Reilly
Hi Juergen, Thanks for your ideas. I managed to clear the BBT, it was a bit of a hack... the saga is below for anyone who runs into similar problem. On Thursday, July 26, 2012 11:27:48 AM Juergen Beisert wrote: > The flash blocks which contains the "bad block table" are protected by > the "bad

Way to clear nand bad block table

2012-07-26 Thread Marc Reilly
Hi, Is there a way to clear the nand bad block table? I'm not sure what happened, but I was playing around with barebox init and didn't register the nand device - then when I booted the kernel there were a stack of UBI errors. I assume this also did something to the bbt as subsequent barebox sta

RE: Antwort: Re: Antwort: Re: Antwort: Re: Antwort: Re: barebox image size

2012-07-17 Thread Marc Reilly
Hi, >ok i was able to preceed a little. The new error message after booting is: > >Board: RAFI i.MX53 >eth@eth0: got MAC address from EEPROM: >NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit) >Bad block table found at page 65472, version 0x01 >Bad bl

Re: Antwort: Re: Antwort: Re: Antwort: Re: barebox image size

2012-07-16 Thread Marc Reilly
Hi, > I flashed from 0x0 to 0x7 (image size: 479K). > I flashed the environment image (image size: 3K) from 0x8 to 0xF Her you write 512k for env > and changed the config code from barebox/environs/common/config to: > > ... > nand_parts="512k(barebox)ro,768k(bareboxenv),4M(kernel),12

[PATCH 5/5] misc: new driver: isl22316 digital potentiometer

2012-07-15 Thread Marc Reilly
This series adds a driver for the isl22316 digital pot. A new misc config option and folder is added. Signed-off-by: Marc Reilly --- drivers/Kconfig |1 + drivers/Makefile|1 + drivers/misc/Kconfig| 10 +++ drivers/misc/Makefile |1 + drivers/misc/isl22316.c

Various patches for imx35, fec, at24 driver and misc

2012-07-15 Thread Marc Reilly
Hi, I've been meaning to submit these for quite a while. Patch 1 allows setting eth MAC address from alternate source, eg, eeprom Patch 2 & 3 correct clock divider for mmc Patch 4 adds an at24 eeprom driver alongside existing at25 driver. Patch 5 adds a misc driver for a digital potentiometer. P

[PATCH 1/5] imx_fec: Allow driver clients to supply MAC address

2012-07-15 Thread Marc Reilly
This patch adds a handler to the fec platform data to get MAC address. If a handler is not specified the driver uses the existing one. Signed-off-by: Marc Reilly --- drivers/net/fec_imx.c |6 +- include/fec.h |4 2 files changed, 9 insertions(+), 1 deletions(-) diff

[PATCH 4/5] at24: add I2C eeprom for 24cl02

2012-07-15 Thread Marc Reilly
This series adds a driver for at24 eeproms. Much of the guts of the code is taken from the at24 driver in the linux kernel. Signed-off-by: Marc Reilly --- drivers/eeprom/Kconfig |7 +++ drivers/eeprom/Makefile |1 + drivers/eeprom/at24.c | 134

[PATCH 2/5] imx35: 6-bit divider helper

2012-07-15 Thread Marc Reilly
Signed-off-by: Marc Reilly --- arch/arm/mach-imx/speed-imx35.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/speed-imx35.c b/arch/arm/mach-imx/speed-imx35.c index 684dc14..905ab47 100644 --- a/arch/arm/mach-imx/speed-imx35.c +++ b/arch/arm/mach

[PATCH 3/5] imx35: mmc clock has 6 bit divider, not 3_3

2012-07-15 Thread Marc Reilly
Signed-off-by: Marc Reilly --- According to MCIMX35RM rev 3 arch/arm/mach-imx/speed-imx35.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-imx/speed-imx35.c b/arch/arm/mach-imx/speed-imx35.c index 905ab47..6d4236a 100644 --- a/arch/arm/mach-imx/speed

Re: RFC: Force a 2s delay on startup to allow bypassing /dev/env0.

2012-05-06 Thread Marc Reilly
On Monday, May 07, 2012 03:50:14 AM Krzysztof Halasa wrote: > Sascha Hauer writes: > > Being able to interrupt before environment processing is a good thing to > > have, the delay though is not acceptable because it would increase the > > boot time on some systems by 400%. It should work without t

Re: [PATCH 2/7] mfd: add mc34708 driver

2012-02-21 Thread Marc Reilly
Hi, My $0.02 ... > > > for today we have what is inside barebox and this patche is coherent > > > with what is actually inside barebox (please check other drivers in mfd > > > and mx35-3stack for example). > > > For the future we may no more need this if we have a proper PMIC API > > > but as th

Re: i.MX53 QSB

2012-01-25 Thread Marc Reilly
Hi, > > If I am booting from the SD card how do I get it onto the card > > > > dd if=barebox.bin of=/dev/sdc bs=512 seek=2 ?? > > cat barebox.bin > /dev/sdc > > Of course this means that you will overwrite the partition table of the > SD card. I'm still loooking for a good way to make this beha