[PATCH 1/1] Squashed 'dts/upstream/' changes from 7e08733c96c8..20e0f0897ea2 2
[snip] I've now pushed the v6.10-dts sync to master. -- Tom
Розпочато Tom Rini @ · Останніх @
[PATCH] ARM: dts: remove leftover Amlogic GX/G12 bindings headers 2
Remove the leftover Amlogic GX/G12 bindings headers that maked the v6.10 upstream DT fail to build. Signed-off-by: Neil Armstrong <neil.armstrong@...> --- include/dt-bindings/clock/axg-aoclkc.h | 31 ------- include/dt-bindings/clock/g12a-aoclkc.h | 36 -------- include/dt-bindings/clock/g12a-clkc.h | 153 -------------------------------- include/dt-bindings/clock/gxbb-aoclkc.h | 74 --------------- include/dt-bindings/clock/gxbb-clkc.h | 151 ------------------------------- include/dt-bindings/reset/axg-aoclkc.h | 20 ----- include/dt-bindings/reset/g12a-aoclkc.h | 18 ---- include/dt-bindings/reset/gxbb-aoclkc.h | 66 -------------- 8 files changed, 549 deletions(-) diff --git a/include/dt-bindings/clock/axg-aoclkc.h b/include/dt-bindings/clock/axg-aoclkc.h deleted file mode 100644 index 8ec4a269c7..0000000000 --- a/include/dt-bindings/clock/axg-aoclkc.h +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ -/* - * Copyright (c) 2016 BayLibre, SAS - * Author: Neil Armstrong <narmstrong@...> - * - * Copyright (c) 2018 Amlogic, inc. - * Author: Qiufang Dai <qiufang.dai@...> - */ - -#ifndef DT_BINDINGS_CLOCK_AMLOGIC_MESON_AXG_AOCLK -#define DT_BINDINGS_CLOCK_AMLOGIC_MESON_AXG_AOCLK - -#define CLKID_AO_REMOTE 0 -#define CLKID_AO_I2C_MASTER 1 -#define CLKID_AO_I2C_SLAVE 2 -#define CLKID_AO_UART1 3 -#define CLKID_AO_UART2 4 -#define CLKID_AO_IR_BLASTER 5 -#define CLKID_AO_SAR_ADC 6 -#define CLKID_AO_CLK81 7 -#define CLKID_AO_SAR_ADC_SEL 8 -#define CLKID_AO_SAR_ADC_DIV 9 -#define CLKID_AO_SAR_ADC_CLK 10 -#define CLKID_AO_CTS_OSCIN 11 -#define CLKID_AO_32K_PRE 12 -#define CLKID_AO_32K_DIV 13 -#define CLKID_AO_32K_SEL 14 -#define CLKID_AO_32K 15 -#define CLKID_AO_CTS_RTC_OSCIN 16 - -#endif diff --git a/include/dt-bindings/clock/g12a-aoclkc.h b/include/dt-bindings/clock/g12a-aoclkc.h deleted file mode 100644 index e916e49ff2..0000000000 --- a/include/dt-bindings/clock/g12a-aoclkc.h +++ /dev/null @@ -1,36 +0,0 @@ -/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ -/* - * Copyright (c) 2016 BayLibre, SAS - * Author: Neil Armstrong <narmstrong@...> - * - * Copyright (c) 2018 Amlogic, inc. - * Author: Qiufang Dai <qiufang.dai@...> - */ - -#ifndef DT_BINDINGS_CLOCK_AMLOGIC_MESON_G12A_AOCLK -#define DT_BINDINGS_CLOCK_AMLOGIC_MESON_G12A_AOCLK - -#define CLKID_AO_AHB 0 -#define CLKID_AO_IR_IN 1 -#define CLKID_AO_I2C_M0 2 -#define CLKID_AO_I2C_S0 3 -#define CLKID_AO_UART 4 -#define CLKID_AO_PROD_I2C 5 -#define CLKID_AO_UART2 6 -#define CLKID_AO_IR_OUT 7 -#define CLKID_AO_SAR_ADC 8 -#define CLKID_AO_MAILBOX 9 -#define CLKID_AO_M3 10 -#define CLKID_AO_AHB_SRAM 11 -#define CLKID_AO_RTI 12 -#define CLKID_AO_M4_FCLK 13 -#define CLKID_AO_M4_HCLK 14 -#define CLKID_AO_CLK81 15 -#define CLKID_AO_SAR_ADC_SEL 16 -#define CLKID_AO_SAR_ADC_CLK 18 -#define CLKID_AO_CTS_OSCIN 19 -#define CLKID_AO_32K 23 -#define CLKID_AO_CEC 27 -#define CLKID_AO_CTS_RTC_OSCIN 28 - -#endif diff --git a/include/dt-bindings/clock/g12a-clkc.h b/include/dt-bindings/clock/g12a-clkc.h deleted file mode 100644 index a93b58c5e1..0000000000 --- a/include/dt-bindings/clock/g12a-clkc.h +++ /dev/null @@ -1,153 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ OR MIT */ -/* - * Meson-G12A clock tree IDs - * - * Copyright (c) 2018 Amlogic, Inc. All rights reserved. - */ - -#ifndef __G12A_CLKC_H -#define __G12A_CLKC_H - -#define CLKID_SYS_PLL 0 -#define CLKID_FIXED_PLL 1 -#define CLKID_FCLK_DIV2 2 -#define CLKID_FCLK_DIV3 3 -#define CLKID_FCLK_DIV4 4 -#define CLKID_FCLK_DIV5 5 -#define CLKID_FCLK_DIV7 6 -#define CLKID_GP0_PLL 7 -#define CLKID_CLK81 10 -#define CLKID_MPLL0 11 -#define CLKID_MPLL1 12 -#define CLKID_MPLL2 13 -#define CLKID_MPLL3 14 -#define CLKID_DDR 15 -#define CLKID_DOS 16 -#define CLKID_AUDIO_LOCKER 17 -#define CLKID_MIPI_DSI_HOST 18 -#define CLKID_ETH_PHY 19 -#define CLKID_ISA 20 -#define CLKID_PL301 21 -#define CLKID_PERIPHS 22 -#define CLKID_SPICC0 23 -#define CLKID_I2C 24 -#define CLKID_SANA 25 -#define CLKID_SD 26 -#define CLKID_RNG0 27 -#define CLKID_UART0 28 -#define CLKID_SPICC1 29 -#define CLKID_HIU_IFACE 30 -#define CLKID_MIPI
Розпочато Neil Armstrong @ · Останніх @
[PATCH v2 1/3] mtd: rawnand: nand_base: support for 'NAND_IS_BOOT_MEDIUM' flag
Based on Linux kernel: commit f922bd798bb9 ("mtd: rawnand: add an option to specify NAND chip as a boot device") Allow to define a NAND chip as a boot device. This can be helpful for the selection of the ECC algorithm and strength in case the boot ROM supports only a subset of controller provided options. Signed-off-by: Arseniy Krasnov <avkrasnov@...> --- Changelog: v1 -> v2: * Place 'NAND_IS_BOOT_MEDIUM' according its numerical value. drivers/mtd/nand/raw/nand_base.c | 3 +++ include/linux/mtd/rawnand.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index c40a0f23d7..ed605b4af5 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -4458,6 +4458,9 @@ static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode nod if (ret == 16) chip->options |= NAND_BUSWIDTH_16; + if (ofnode_read_bool(node, "nand-is-boot-medium")) + chip->options |= NAND_IS_BOOT_MEDIUM; + if (ofnode_read_bool(node, "nand-on-flash-bbt")) chip->bbt_options |= NAND_BBT_USE_FLASH; diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index fb002ae641..61690e816f 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h @@ -248,6 +248,11 @@ enum nand_ecc_algo { * kmap'ed, vmalloc'ed highmem buffers being passed from upper layers */ #define NAND_USE_BOUNCE_BUFFER 0x00100000 +/* + * Whether the NAND chip is a boot medium. Drivers might use this information + * to select ECC algorithms supported by the boot ROM or similar restrictions. + */ +#define NAND_IS_BOOT_MEDIUM 0x00400000 /* Options set by nand scan */ /* bbt has already been read */ -- 2.30.1
Розпочато Arseniy Krasnov @
[PATCH v2 2/3] mtd: rawnand: meson: refactor use of 'meson_nfc_cmd_access()'
Move call 'meson_nfc_cmd_seed()' and check for 'NAND_NEED_SCRAMBLING' to 'meson_nfc_cmd_access()', thus removing code duplication. Signed-off-by: Arseniy Krasnov <avkrasnov@...> --- drivers/mtd/nand/raw/meson_nand.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c index 5d411c4594..19f005202b 100644 --- a/drivers/mtd/nand/raw/meson_nand.c +++ b/drivers/mtd/nand/raw/meson_nand.c @@ -229,14 +229,19 @@ static void meson_nfc_cmd_seed(const struct meson_nfc *nfc, u32 seed) nfc->reg_base + NFC_REG_CMD); } -static void meson_nfc_cmd_access(struct nand_chip *nand, bool raw, bool dir, - int scrambler) +static void meson_nfc_cmd_access(struct nand_chip *nand, bool raw, bool dir, int page) { struct mtd_info *mtd = nand_to_mtd(nand); const struct meson_nfc *nfc = nand_get_controller_data(mtd_to_nand(mtd)); const struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand); u32 bch = meson_chip->bch_mode, cmd; int len = mtd->writesize, pagesize, pages; + int scrambler; + + if (nand->options & NAND_NEED_SCRAMBLING) + scrambler = NFC_CMD_SCRAMBLER_ENABLE; + else + scrambler = NFC_CMD_SCRAMBLER_DISABLE; pagesize = nand->ecc.size; @@ -252,6 +257,9 @@ static void meson_nfc_cmd_access(struct nand_chip *nand, bool raw, bool dir, cmd = CMDRWGEN(DMA_DIR(dir), scrambler, bch, NFC_CMD_SHORTMODE_DISABLE, pagesize, pages); + if (scrambler == NFC_CMD_SCRAMBLER_ENABLE) + meson_nfc_cmd_seed(nfc, page); + writel(cmd, nfc->reg_base + NFC_REG_CMD); } @@ -566,14 +574,7 @@ static int meson_nfc_write_page_sub(struct nand_chip *nand, return ret; } - if (nand->options & NAND_NEED_SCRAMBLING) { - meson_nfc_cmd_seed(nfc, page); - meson_nfc_cmd_access(nand, raw, DIRWRITE, - NFC_CMD_SCRAMBLER_ENABLE); - } else { - meson_nfc_cmd_access(nand, raw, DIRWRITE, - NFC_CMD_SCRAMBLER_DISABLE); - } + meson_nfc_cmd_access(nand, raw, DIRWRITE, page); cmd = nfc->param.chip_select | NFC_CMD_CLE | NAND_CMD_PAGEPROG; writel(cmd, nfc->reg_base + NFC_REG_CMD); @@ -644,14 +645,7 @@ static int meson_nfc_read_page_sub(struct nand_chip *nand, if (ret) return ret; - if (nand->options & NAND_NEED_SCRAMBLING) { - meson_nfc_cmd_seed(nfc, page); - meson_nfc_cmd_access(nand, raw, DIRREAD, - NFC_CMD_SCRAMBLER_ENABLE); - } else { - meson_nfc_cmd_access(nand, raw, DIRREAD, - NFC_CMD_SCRAMBLER_DISABLE); - } + meson_nfc_cmd_access(nand, raw, DIRREAD, page); meson_nfc_wait_dma_finish(nfc); meson_nfc_check_ecc_pages_valid(nfc, nand, raw); -- 2.30.1
Розпочато Arseniy Krasnov @
[PATCH v2 0/3] Meson: R/W support for pages used by boot ROM
Patchset is based on patchset for Linux (today merged to nand-next): https://lore.kernel.org/linux-mtd/20240507230903.3399594-1-avkrasnov@.../ Here is description from it: > Amlogic's boot ROM code needs that some pages on NAND must be written > in special "short" ECC mode with scrambling enabled. Such pages: > 1) Contain some metadata about hardware. > 2) Located with some interval starting from 0 offset, until some > specified offset. Interval and second offset are set in the > device tree. > > This patchset adds R/W support for such pages. To enable it we can setup > it in dts: > > nand-is-boot-medium; > amlogic,boot-pages = <1024>; > amlogic,boot-page-step = <128>; > > It means that each 128th page in range 0 to 1024 pages will be accessed > in special mode ("short" ECC + scrambling). In practice this feature is > needed when we want to update first block of NAND - driver will enable > required mode by itself using value from device tree. The only difference is that patchset for Linux updates DT bindings, while this adds NAND_IS_BOOT_MEDIUM flag support. Changelog: v1 -> v2: * Pls see per-patch changelog. Arseniy Krasnov (3): mtd: rawnand: nand_base: support for 'NAND_IS_BOOT_MEDIUM' flag mtd: rawnand: meson: refactor use of 'meson_nfc_cmd_access()' mtd: rawnand: meson: read/write access for boot ROM pages drivers/mtd/nand/raw/meson_nand.c | 84 +++++++++++++++++++++---------- drivers/mtd/nand/raw/nand_base.c | 3 ++ include/linux/mtd/rawnand.h | 5 ++ 3 files changed, 65 insertions(+), 27 deletions(-) -- 2.30.1
Розпочато Arseniy Krasnov @
(subset) [PATCH 00/14] testb: Various tweaks and fixes for Labgrid
Applied to u-boot/master, thanks! -- Tom
Розпочато Tom Rini @
[PATCH v2 3/3] mtd: rawnand: meson: read/write access for boot ROM pages
Boot ROM on Meson needs some pages to be read/written in a special mode: 384 byte ECC mode (so called "short" by Amlogic) and with scrambling enabled. Such pages are located on the chip in the following way (for example): [ p0 ][ p1 ][ p2 ][ p3 ][ p4 ][ p5 ][ p6 ][ p7 ] ... [ pN ] ^ ^ ^ ^ pX is page number "X". "^" means "special" page used by boot ROM - e.g. every 2nd page in the range of [0, 7]. Step (2 here) and last page in range is read from the device tree. Signed-off-by: Arseniy Krasnov <avkrasnov@...> --- drivers/mtd/nand/raw/meson_nand.c | 56 +++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c index 19f005202b..54ea035d8d 100644 --- a/drivers/mtd/nand/raw/meson_nand.c +++ b/drivers/mtd/nand/raw/meson_nand.c @@ -40,6 +40,7 @@ #define NFC_CMD_RB BIT(20) #define NFC_CMD_SCRAMBLER_ENABLE BIT(19) #define NFC_CMD_SCRAMBLER_DISABLE 0 +#define NFC_CMD_SHORTMODE_ENABLE 1 #define NFC_CMD_SHORTMODE_DISABLE 0 #define NFC_CMD_RB_INT BIT(14) #define NFC_CMD_RB_INT_NO_PIN ((0xb << 10) | BIT(18) | BIT(16)) @@ -78,6 +79,8 @@ #define DMA_DIR(dir) ((dir) ? NFC_CMD_N2M : NFC_CMD_M2N) +#define NFC_SHORT_MODE_ECC_SZ 384 + #define ECC_CHECK_RETURN_FF -1 #define NAND_CE0 (0xe << 10) @@ -141,6 +144,8 @@ struct meson_nfc_nand_chip { struct list_head node; struct nand_chip nand; + u32 boot_pages; + u32 boot_page_step; u32 bch_mode; u8 *data_buf; @@ -229,33 +234,46 @@ static void meson_nfc_cmd_seed(const struct meson_nfc *nfc, u32 seed) nfc->reg_base + NFC_REG_CMD); } +static int meson_nfc_is_boot_page(struct nand_chip *nand, int page) +{ + const struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand); + + return (nand->options & NAND_IS_BOOT_MEDIUM) && + !(page % meson_chip->boot_page_step) && + (page < meson_chip->boot_pages); +} + static void meson_nfc_cmd_access(struct nand_chip *nand, bool raw, bool dir, int page) { + const struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand); struct mtd_info *mtd = nand_to_mtd(nand); const struct meson_nfc *nfc = nand_get_controller_data(mtd_to_nand(mtd)); - const struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand); - u32 bch = meson_chip->bch_mode, cmd; int len = mtd->writesize, pagesize, pages; int scrambler; + u32 cmd; if (nand->options & NAND_NEED_SCRAMBLING) scrambler = NFC_CMD_SCRAMBLER_ENABLE; else scrambler = NFC_CMD_SCRAMBLER_DISABLE; - pagesize = nand->ecc.size; - if (raw) { len = mtd->writesize + mtd->oobsize; cmd = len | scrambler | DMA_DIR(dir); - writel(cmd, nfc->reg_base + NFC_REG_CMD); - return; - } + } else if (meson_nfc_is_boot_page(nand, page)) { + pagesize = NFC_SHORT_MODE_ECC_SZ >> 3; + pages = mtd->writesize / 512; - pages = len / nand->ecc.size; + scrambler = NFC_CMD_SCRAMBLER_ENABLE; + cmd = CMDRWGEN(DMA_DIR(dir), scrambler, NFC_ECC_BCH8_1K, + NFC_CMD_SHORTMODE_ENABLE, pagesize, pages); + } else { + pagesize = nand->ecc.size >> 3; + pages = len / nand->ecc.size; - cmd = CMDRWGEN(DMA_DIR(dir), scrambler, bch, - NFC_CMD_SHORTMODE_DISABLE, pagesize, pages); + cmd = CMDRWGEN(DMA_DIR(dir), scrambler, meson_chip->bch_mode, + NFC_CMD_SHORTMODE_DISABLE, pagesize, pages); + } if (scrambler == NFC_CMD_SCRAMBLER_ENABLE) meson_nfc_cmd_seed(nfc, page); @@ -1132,6 +1150,24 @@ static int meson_nfc_nand_chip_init(struct udevice *dev, struct meson_nfc *nfc, goto err_chip_buf_free; } + if (nand->options & NAND_IS_BOOT_MEDIUM) { + ret = ofnode_read_u32(node, "amlogic,boot-pages", + &meson_chip->boot_pages); + if (ret) { + dev_err(dev, "could not retrieve 'amlogic,boot-pages' property: %d", + ret); + goto err_chip_buf_free; + } + + ret = ofnode_read_u32(node, "amlogic,boot-page-step", + &meson_chip->boot_page_step); + if (ret) { + dev_err(dev, "could not retrieve 'amlogic,boot-page-step' property: %d", + ret); + goto err_chip_buf_free; + } + } + ret = nand_register(0, mtd); if (ret) { dev_err(dev, "'nand_register()' failed: %d\n", ret); -- 2.30.1
Розпочато Arseniy Krasnov @
[GIT PULL] Please pull u-boot-amlogic-next-20240404 2
Hi Tom, A set of changes to switch meson dwc3/usb PHY to set_mode callback for switching USB mode, and a driver declaration fixup for meson_axg_gpio. Thanks, Neil The following changes since commit a7eada24327a40f7ef6c55c220e119839c9d4227: Merge tag 'v2024.07-rc5' into next (2024-06-24 13:34:52 -0600) are available in the Git repository at: https://source.denx.de/u-boot/custodians/u-boot-amlogic.git tags/u-boot-amlogic-20240701 for you to fetch changes up to 96e1a156e90a0674b21c56e7121b17a9211176ec: meson: Correct driver declaration for meson_axg_gpio (2024-06-26 11:19:57 +0200) ---------------------------------------------------------------- - Switch meson dwc3/usb PHY to set_mode callback for switching USB mode ---------------------------------------------------------------- Neil Armstrong (5): phy: meson-gxl-usb2: add set_mode callback usb: dwc3: meson-gxl: switch to generic_phy_set_mode phy: meson-gxl-usb2: remove phy_meson_gxl_usb2_set_mode usb: dwc3: meson-gxl: drop usb-gx.h and make dwc3_meson_gxl_force_mode static usb: dwc3: meson-g12a: drop usb.h and make dwc3_meson_g12a_force_mode static Simon Glass (1): meson: Correct driver declaration for meson_axg_gpio arch/arm/include/asm/arch-meson/usb-gx.h | 17 --------------- arch/arm/include/asm/arch-meson/usb.h | 12 ----------- drivers/phy/meson-gxl-usb2.c | 30 ++++++++++++++++----------- drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c | 2 +- drivers/pinctrl/meson/pinctrl-meson-axg.c | 4 ++-- drivers/pinctrl/meson/pinctrl-meson-axg.h | 2 +- drivers/pinctrl/meson/pinctrl-meson-g12a.c | 4 ++-- drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +- drivers/usb/dwc3/dwc3-meson-gxl.c | 18 +++++++++------- 9 files changed, 35 insertions(+), 56 deletions(-) delete mode 100644 arch/arm/include/asm/arch-meson/usb-gx.h delete mode 100644 arch/arm/include/asm/arch-meson/usb.h
Розпочато Neil Armstrong @ · Останніх @
[PATCH 1/4] power: regulator: Trigger probe of regulators which are always-on or boot-on 14
In case a regulator DT node contains regulator-always-on or regulator-boo= t-on property, make sure the regulator gets correctly configured by U-Boot on = start up. Unconditionally probe such regulator drivers. This is a preparatory p= atch for introduction of .regulator_post_probe() which would trigger the regul= ator configuration. Parsing of regulator-always-on and regulator-boot-on DT property has been moved to regulator_post_bind() as the information is required early, the rest of the DT parsing has been kept in regulator_pre_probe() to avoid slowing down the boot process. Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Kostya Porotchkin <kostap@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: u-boot-amlogic@groups.io Cc: u-boot-qcom@groups.io Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- drivers/power/regulator/regulator-uclass.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/r= egulator/regulator-uclass.c index 66fd531da04..ccc4ef33d83 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -433,6 +433,8 @@ static int regulator_post_bind(struct udevice *dev) const char *property =3D "regulator-name"; =20 uc_pdata =3D dev_get_uclass_plat(dev); + uc_pdata->always_on =3D dev_read_bool(dev, "regulator-always-on"); + uc_pdata->boot_on =3D dev_read_bool(dev, "regulator-boot-on"); =20 /* Regulator's mandatory constraint */ uc_pdata->name =3D dev_read_string(dev, property); @@ -444,13 +446,21 @@ static int regulator_post_bind(struct udevice *dev) return -EINVAL; } =20 - if (regulator_name_is_unique(dev, uc_pdata->name)) - return 0; + if (!regulator_name_is_unique(dev, uc_pdata->name)) { + debug("'%s' of dev: '%s', has nonunique value: '%s\n", + property, dev->name, uc_pdata->name); + return -EINVAL; + } =20 - debug("'%s' of dev: '%s', has nonunique value: '%s\n", - property, dev->name, uc_pdata->name); + /* + * In case the regulator has regulator-always-on or + * regulator-boot-on DT property, trigger probe() to + * configure its default state during startup. + */ + if (uc_pdata->always_on && uc_pdata->boot_on) + dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND); =20 - return -EINVAL; + return 0; } =20 static int regulator_pre_probe(struct udevice *dev) @@ -473,8 +483,6 @@ static int regulator_pre_probe(struct udevice *dev) -ENODATA); uc_pdata->max_uA =3D dev_read_u32_default(dev, "regulator-max-microamp"= , -ENODATA); - uc_pdata->always_on =3D dev_read_bool(dev, "regulator-always-on"); - uc_pdata->boot_on =3D dev_read_bool(dev, "regulator-boot-on"); uc_pdata->ramp_delay =3D dev_read_u32_default(dev, "regulator-ramp-dela= y", 0); uc_pdata->force_off =3D dev_read_bool(dev, "regulator-force-boot-off"); --=20 2.43.0
Розпочато Marek Vasut @ · Останніх @
[PATCH 2/4] power: regulator: Convert regulators_enable_boot_on/off() to regulator_post_probe 2
Turn regulators_enable_boot_on() and regulators_enable_boot_off() into empty functions. Implement matching functionality in regulator_post_probe= () instead. The regulator_post_probe() is called for all regulators after th= ey probe, and regulators that have regulator-always-on or regulator-boot-on = DT properties now always probe due to DM_FLAG_PROBE_AFTER_BIND being set on such regulators in regulator_post_bind(). Finally, fold regulator_unset() functionality into regulator_autoset(). Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Kostya Porotchkin <kostap@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: u-boot-amlogic@groups.io Cc: u-boot-qcom@groups.io Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- drivers/power/regulator/regulator-uclass.c | 60 +++++++--------------- 1 file changed, 19 insertions(+), 41 deletions(-) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/r= egulator/regulator-uclass.c index ccc4ef33d83..d52f273042f 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -308,6 +308,11 @@ int regulator_autoset(struct udevice *dev) return ret; } =20 + if (uc_pdata->force_off) { + ret =3D regulator_set_enable(dev, false); + goto out; + } + if (!uc_pdata->always_on && !uc_pdata->boot_on) { ret =3D -EMEDIUMTYPE; goto out; @@ -512,56 +517,28 @@ static int regulator_pre_probe(struct udevice *dev) return 0; } =20 -int regulators_enable_boot_on(bool verbose) +static int regulator_post_probe(struct udevice *dev) { - struct udevice *dev; - struct uclass *uc; int ret; =20 - ret =3D uclass_get(UCLASS_REGULATOR, &uc); - if (ret) + ret =3D regulator_autoset(dev); + if (ret && ret !=3D -EMEDIUMTYPE && ret !=3D ENOSYS) return ret; - for (uclass_first_device(UCLASS_REGULATOR, &dev); - dev; - uclass_next_device(&dev)) { - ret =3D regulator_autoset(dev); - if (ret =3D=3D -EMEDIUMTYPE) { - ret =3D 0; - continue; - } - if (verbose) - regulator_show(dev, ret); - if (ret =3D=3D -ENOSYS) - ret =3D 0; - } =20 - return ret; + if (_DEBUG) + regulator_show(dev, ret); + + return 0; } =20 -int regulators_enable_boot_off(bool verbose) +int regulators_enable_boot_on(bool verbose) { - struct udevice *dev; - struct uclass *uc; - int ret; - - ret =3D uclass_get(UCLASS_REGULATOR, &uc); - if (ret) - return ret; - for (uclass_first_device(UCLASS_REGULATOR, &dev); - dev; - uclass_next_device(&dev)) { - ret =3D regulator_unset(dev); - if (ret =3D=3D -EMEDIUMTYPE) { - ret =3D 0; - continue; - } - if (verbose) - regulator_show(dev, ret); - if (ret =3D=3D -ENOSYS) - ret =3D 0; - } + return 0; +} =20 - return ret; +int regulators_enable_boot_off(bool verbose) +{ + return 0; } =20 UCLASS_DRIVER(regulator) =3D { @@ -569,5 +546,6 @@ UCLASS_DRIVER(regulator) =3D { .name =3D "regulator", .post_bind =3D regulator_post_bind, .pre_probe =3D regulator_pre_probe, + .post_probe =3D regulator_post_probe, .per_device_plat_auto =3D sizeof(struct dm_regulator_uclass_plat), }; --=20 2.43.0
Розпочато Marek Vasut @ · Останніх @
[PATCH 3/4] power: regulator: Drop regulator_unset()
This function is never called, drop it. Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Kostya Porotchkin <kostap@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: u-boot-amlogic@groups.io Cc: u-boot-qcom@groups.io Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- drivers/power/regulator/regulator-uclass.c | 11 ----------- include/power/regulator.h | 14 +------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/r= egulator/regulator-uclass.c index d52f273042f..bcbcec1567e 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -339,17 +339,6 @@ out: return ret; } =20 -int regulator_unset(struct udevice *dev) -{ - struct dm_regulator_uclass_plat *uc_pdata; - - uc_pdata =3D dev_get_uclass_plat(dev); - if (uc_pdata && uc_pdata->force_off) - return regulator_set_enable(dev, false); - - return -EMEDIUMTYPE; -} - static void regulator_show(struct udevice *dev, int ret) { struct dm_regulator_uclass_plat *uc_pdata; diff --git a/include/power/regulator.h b/include/power/regulator.h index bb07a814c79..5363483d02a 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -430,7 +430,7 @@ int regulators_enable_boot_on(bool verbose); * * This disables all regulators which are marked to be off at boot time. * - * This effectively calls regulator_unset() for every regulator. + * This effectively does nothing. */ int regulators_enable_boot_off(bool verbose); =20 @@ -453,18 +453,6 @@ int regulators_enable_boot_off(bool verbose); */ int regulator_autoset(struct udevice *dev); =20 -/** - * regulator_unset: turn off a regulator - * - * The setup depends on constraints found in device's uclass's platform = data - * (struct dm_regulator_uclass_platdata): - * - * - Disable - will set - if 'force_off' is set to true, - * - * The function returns on the first-encountered error. - */ -int regulator_unset(struct udevice *dev); - /** * regulator_autoset_by_name: setup the regulator given by its uclass's * platform data name field. The setup depends on constraints found in d= evice's --=20 2.43.0
Розпочато Marek Vasut @
[PATCH 4/4] power: regulator: Drop regulators_enable_boot_on/off()
Both regulators_enable_boot_on/off() are unused and superseded by regulator uclass regulator_post_probe(). Remove both functions. Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Kostya Porotchkin <kostap@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: u-boot-amlogic@groups.io Cc: u-boot-qcom@groups.io Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- arch/arm/mach-rockchip/board.c | 8 -------- arch/arm/mach-snapdragon/board.c | 1 - arch/arm/mach-tegra/board2.c | 3 --- board/Marvell/octeontx2_cn913x/board.c | 5 ----- .../amlogic/odroid-go-ultra/odroid-go-ultra.c | 2 -- board/dhelectronics/dh_stm32mp1/board.c | 2 -- board/engicam/stm32mp1/stm32mp1.c | 3 --- board/google/veyron/veyron.c | 6 ------ board/samsung/common/exynos5-dt.c | 4 ---- board/st/stm32mp1/stm32mp1.c | 2 -- drivers/power/regulator/regulator-uclass.c | 10 ---------- include/power/regulator.h | 20 ------------------- 12 files changed, 66 deletions(-) diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/boar= d.c index 8a57b8217ff..a1933300653 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -202,14 +202,6 @@ int board_late_init(void) =20 int board_init(void) { - int ret; - -#ifdef CONFIG_DM_REGULATOR - ret =3D regulators_enable_boot_on(false); - if (ret) - debug("%s: Cannot enable boot on regulator\n", __func__); -#endif - return 0; } =20 diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/= board.c index b439a19ec7e..feb2a1157de 100644 --- a/arch/arm/mach-snapdragon/board.c +++ b/arch/arm/mach-snapdragon/board.c @@ -162,7 +162,6 @@ void __weak qcom_board_init(void) =20 int board_init(void) { - regulators_enable_boot_on(false); show_psci_version(); qcom_of_fixup_nodes(); qcom_board_init(); diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index 479137e457c..193220f29c9 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -187,9 +187,6 @@ int board_init(void) warmboot_prepare_code(TEGRA_LP0_ADDR, TEGRA_LP0_SIZE); #endif =20 - /* Set up boot-on regulators */ - regulators_enable_boot_on(_DEBUG); - return nvidia_board_init(); } =20 diff --git a/board/Marvell/octeontx2_cn913x/board.c b/board/Marvell/octeo= ntx2_cn913x/board.c index 3d20cfb2fab..3ffe15d42b8 100644 --- a/board/Marvell/octeontx2_cn913x/board.c +++ b/board/Marvell/octeontx2_cn913x/board.c @@ -23,11 +23,6 @@ int board_early_init_f(void) =20 int board_early_init_r(void) { - if (CONFIG_IS_ENABLED(DM_REGULATOR)) { - /* Check if any existing regulator should be turned down */ - regulators_enable_boot_off(false); - } - return 0; } =20 diff --git a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c b/board/amlo= gic/odroid-go-ultra/odroid-go-ultra.c index 8f3f2045d74..f9412071737 100644 --- a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c +++ b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c @@ -16,7 +16,5 @@ int mmc_get_env_dev(void) =20 int board_init(void) { - regulators_enable_boot_on(_DEBUG); - return 0; } diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronic= s/dh_stm32mp1/board.c index 4f4f537fee5..24c5f37c12f 100644 --- a/board/dhelectronics/dh_stm32mp1/board.c +++ b/board/
Розпочато Marek Vasut @
(subset) [PATCH 00/14] testb: Various tweaks and fixes for Labgrid
Hi, Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-amlogic (u-boot-amlogic-next) [07/14] meson: Correct driver declaration for meson_axg_gpio https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/96e1a156e90a0674b21c56e7121b17a9211176ec -- Neil
Розпочато Neil Armstrong @
[PATCH v2 0/5] usb: meson: switch to set_mode callback and other cleanup 4
Switch to set_mode callback now it's available and in the same time make public functions static and drop useless mach-meson headers that are no more needed. Signed-off-by: Neil Armstrong <neil.armstrong@...> --- Changes in v2: - Update commit message in patch 1 to specify why we use _ in the set_mode callback - Link to v1: https://lore.kernel.org/r/20240618-u-boot-usb-gxl-phy-set-mode-v1-0-6b41efa46e35@... --- Neil Armstrong (5): phy: meson-gxl-usb2: add set_mode callback usb: dwc3: meson-gxl: switch to generic_phy_set_mode phy: meson-gxl-usb2: remove phy_meson_gxl_usb2_set_mode usb: dwc3: meson-gxl: drop usb-gx.h and make dwc3_meson_gxl_force_mode static usb: dwc3: meson-g12a: drop usb.h and make dwc3_meson_g12a_force_mode static arch/arm/include/asm/arch-meson/usb-gx.h | 17 ----------------- arch/arm/include/asm/arch-meson/usb.h | 12 ------------ drivers/phy/meson-gxl-usb2.c | 30 ++++++++++++++++++------------ drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +- drivers/usb/dwc3/dwc3-meson-gxl.c | 18 ++++++++++-------- 5 files changed, 29 insertions(+), 50 deletions(-) --- base-commit: f1de28e67aa9b66bfca0fad3dc18446a6ec0b504 change-id: 20240618-u-boot-usb-gxl-phy-set-mode-c3991c5f1da2 Best regards, -- Neil Armstrong <neil.armstrong@...>
Розпочато Neil Armstrong @ · Останніх @
(subset) [PATCH 00/42] labgrid: Provide an integration with Labgrid
Hi, Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-amlogic (u-boot-amlogic-next) [18/42] meson: Correct driver declaration for meson_axg_gpio https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/96e1a156e90a0674b21c56e7121b17a9211176ec -- Neil
Розпочато Neil Armstrong @
[PATCH v1 1/3] mtd: rawnand: nand_base: support for 'NAND_IS_BOOT_MEDIUM' flag 6
Based on Linux kernel: commit f922bd798bb9 ("mtd: rawnand: add an option to specify NAND chip as a boot device") Allow to define a NAND chip as a boot device. This can be helpful for the selection of the ECC algorithm and strength in case the boot ROM supports only a subset of controller provided options. Signed-off-by: Arseniy Krasnov <avkrasnov@...> --- drivers/mtd/nand/raw/nand_base.c | 3 +++ include/linux/mtd/rawnand.h | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index c40a0f23d7..ed605b4af5 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -4458,6 +4458,9 @@ static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode nod if (ret == 16) chip->options |= NAND_BUSWIDTH_16; + if (ofnode_read_bool(node, "nand-is-boot-medium")) + chip->options |= NAND_IS_BOOT_MEDIUM; + if (ofnode_read_bool(node, "nand-on-flash-bbt")) chip->bbt_options |= NAND_BBT_USE_FLASH; diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index fb002ae641..4eb880d8fb 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h @@ -218,6 +218,12 @@ enum nand_ecc_algo { /* Device needs 3rd row address cycle */ #define NAND_ROW_ADDR_3 0x00004000 +/* + * Whether the NAND chip is a boot medium. Drivers might use this information + * to select ECC algorithms supported by the boot ROM or similar restrictions. + */ +#define NAND_IS_BOOT_MEDIUM 0x00400000 + /* Options valid for Samsung large page devices */ #define NAND_SAMSUNG_LP_OPTIONS NAND_CACHEPRG -- 2.35.0
Розпочато Arseniy Krasnov @ · Останніх @
[PATCH 07/14] meson: Correct driver declaration for meson_axg_gpio
This should use the driver macros so that the driver appears in the linker list. Fix this. Fixes: 8587839f19d ("pinctrl: meson: add axg support") Reviewed-by: Neil Armstrong <neil.armstrong@...> Signed-off-by: Simon Glass <sjg@...> --- (no changes since v1) drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c | 2 +- drivers/pinctrl/meson/pinctrl-meson-axg.c | 4 ++-- drivers/pinctrl/meson/pinctrl-meson-axg.h | 2 +- drivers/pinctrl/meson/pinctrl-meson-g12a.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c index 52c726cf038..15ebd574ef1 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c +++ b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c @@ -179,7 +179,7 @@ static const struct dm_gpio_ops meson_axg_gpio_ops = { .direction_output = meson_gpio_direction_output, }; -const struct driver meson_axg_gpio_driver = { +U_BOOT_DRIVER(meson_axg_gpio) = { .name = "meson-axg-gpio", .id = UCLASS_GPIO, .probe = meson_gpio_probe, diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg.c b/drivers/pinctrl/meson/pinctrl-meson-axg.c index 94e09cd3f8a..ed3f92b2d75 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-axg.c +++ b/drivers/pinctrl/meson/pinctrl-meson-axg.c @@ -939,7 +939,7 @@ struct meson_pinctrl_data meson_axg_periphs_pinctrl_data = { .num_groups = ARRAY_SIZE(meson_axg_periphs_groups), .num_funcs = ARRAY_SIZE(meson_axg_periphs_functions), .num_banks = ARRAY_SIZE(meson_axg_periphs_banks), - .gpio_driver = &meson_axg_gpio_driver, + .gpio_driver = DM_DRIVER_REF(meson_axg_gpio), .pmx_data = &meson_axg_periphs_pmx_banks_data, }; @@ -953,7 +953,7 @@ struct meson_pinctrl_data meson_axg_aobus_pinctrl_data = { .num_groups = ARRAY_SIZE(meson_axg_aobus_groups), .num_funcs = ARRAY_SIZE(meson_axg_aobus_functions), .num_banks = ARRAY_SIZE(meson_axg_aobus_banks), - .gpio_driver = &meson_axg_gpio_driver, + .gpio_driver = DM_DRIVER_REF(meson_axg_gpio), .pmx_data = &meson_axg_aobus_pmx_banks_data, }; diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg.h b/drivers/pinctrl/meson/pinctrl-meson-axg.h index c8d2b3af036..a6581bab500 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-axg.h +++ b/drivers/pinctrl/meson/pinctrl-meson-axg.h @@ -61,6 +61,6 @@ struct meson_pmx_axg_data { } extern const struct pinctrl_ops meson_axg_pinctrl_ops; -extern const struct driver meson_axg_gpio_driver; +extern U_BOOT_DRIVER(meson_axg_gpio); #endif /* __PINCTRL_MESON_AXG_H__ */ diff --git a/drivers/pinctrl/meson/pinctrl-meson-g12a.c b/drivers/pinctrl/meson/pinctrl-meson-g12a.c index 24f47f82558..67114df6824 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-g12a.c +++ b/drivers/pinctrl/meson/pinctrl-meson-g12a.c @@ -1253,7 +1253,7 @@ static struct meson_pinctrl_data meson_g12a_periphs_pinctrl_data = { .num_groups = ARRAY_SIZE(meson_g12a_periphs_groups), .num_funcs = ARRAY_SIZE(meson_g12a_periphs_functions), .num_banks = ARRAY_SIZE(meson_g12a_periphs_banks), - .gpio_driver = &meson_axg_gpio_driver, + .gpio_driver = DM_DRIVER_REF(meson_axg_gpio), .pmx_data = &meson_g12a_periphs_pmx_banks_data, }; @@ -1267,7 +1267,7 @@ static struct meson_pinctrl_data meson_g12a_aobus_pinctrl_data = { .num_groups = ARRAY_SIZE(meson_g12a_aobus_groups), .num_funcs = ARRAY_SIZE(meson_g12a_aobus_functions), .num_banks = ARRAY_SIZE(meson_g12a_aobus_banks), - .gpio_driver = &meson_axg_gpio_driver, + .gpio_driver = DM_DRIVER_REF(meson_axg_gpio), .pmx_data = &meson_g12a_aobus_pmx_banks_data, }; -- 2.34.1
Розпочато Simon Glass @
[PATCH 00/14] testb: Various tweaks and fixes for Labgrid
This series includes a number of mostly unrelated changes which are in service of running U-Boot on a lab using Labgrid. Changes in v2: - Add new patch to update u-boot.cfg with CFG_... options Simon Glass (14): trace: Update test to tolerate different trace-cmd version dm: core: Enhance comments on bind_drivers_pass() initcall: Correct use of relocation offset am33xx: Provide a function to set up the debug UART sunxi: Mark scp as optional google: Disable TPMv2 on most Chromebooks meson: Correct driver declaration for meson_axg_gpio test: Make bootstd init run only on sandbox log: Allow tests to pass with CONFIG_LOGF_FUNC_PAD set test: dm: Show failing driver name test: Decode exceptions only with sandbox test: Check help output Update u-boot.cfg to include CFG also smbios: Correct error handling when writing tables arch/arm/dts/sunxi-u-boot.dtsi | 1 + arch/arm/mach-omap2/am33xx/board.c | 18 +++++++++++++++--- configs/chromebook_link64_defconfig | 1 + configs/chromebook_link_defconfig | 1 + configs/chromebook_samus_defconfig | 1 + configs/chromebook_samus_tpl_defconfig | 1 + configs/nyan-big_defconfig | 4 +--- configs/snow_defconfig | 1 + drivers/core/lists.c | 16 ++++++++++++++++ drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c | 2 +- drivers/pinctrl/meson/pinctrl-meson-axg.c | 4 ++-- drivers/pinctrl/meson/pinctrl-meson-axg.h | 2 +- drivers/pinctrl/meson/pinctrl-meson-g12a.c | 4 ++-- lib/initcall.c | 6 ++++-- lib/smbios.c | 10 ++++++++-- scripts/Makefile.autoconf | 2 +- test/py/tests/test_dm.py | 5 ++++- test/py/tests/test_help.py | 6 +++++- test/py/tests/test_log.py | 11 +++++++---- test/py/tests/test_trace.py | 6 +++--- test/py/tests/test_ut.py | 1 + test/py/u_boot_console_sandbox.py | 2 +- test/py/u_boot_spawn.py | 10 ++++++---- 23 files changed, 84 insertions(+), 31 deletions(-) -- 2.34.1
Розпочато Simon Glass @
[PATCH v2 5/5] usb: dwc3: meson-g12a: drop usb.h and make dwc3_meson_g12a_force_mode static 2
Drop this useless usb.h and now make dwc3_meson_g12a_force_mode static since only used in the dwc3-meson-g12a.c file. Signed-off-by: Neil Armstrong <neil.armstrong@...> --- arch/arm/include/asm/arch-meson/usb.h | 12 ------------ drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/arch/arm/include/asm/arch-meson/usb.h b/arch/arm/include/asm/arch-meson/usb.h deleted file mode 100644 index b794b5ce77..0000000000 --- a/arch/arm/include/asm/arch-meson/usb.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 BayLibre, SAS - * Author: Neil Armstrong <narmstrong@...> - */ - -#ifndef __MESON_USB_H__ -#define __MESON_USB_H__ - -int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode); - -#endif /* __MESON_USB_H__ */ diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index 21e4f637bb..41d15996e5 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -270,7 +270,7 @@ static int dwc3_meson_g12a_usb_init(struct dwc3_meson_g12a *priv) return 0; } -int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode) +static int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode) { struct dwc3_meson_g12a *priv = dev_get_plat(dev); -- 2.34.1
Розпочато Neil Armstrong @ · Останніх @
[PATCH v2 4/5] usb: dwc3: meson-gxl: drop usb-gx.h and make dwc3_meson_gxl_force_mode static 2
Drop this useless usb-gx.h and now make dwc3_meson_gxl_force_mode static since only used in the dwc3-meson-gxl.c file. Signed-off-by: Neil Armstrong <neil.armstrong@...> --- arch/arm/include/asm/arch-meson/usb-gx.h | 14 -------------- drivers/usb/dwc3/dwc3-meson-gxl.c | 3 +-- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/arch/arm/include/asm/arch-meson/usb-gx.h b/arch/arm/include/asm/arch-meson/usb-gx.h deleted file mode 100644 index 966d401730..0000000000 --- a/arch/arm/include/asm/arch-meson/usb-gx.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright 2019 BayLibre SAS - * Author: Neil Armstrong <narmstrong@...> - */ -#ifndef _ARCH_MESON_USB_GX_H_ -#define _ARCH_MESON_USB_GX_H_ - -#include <generic-phy.h> -#include <linux/usb/otg.h> - -int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode); - -#endif diff --git a/drivers/usb/dwc3/dwc3-meson-gxl.c b/drivers/usb/dwc3/dwc3-meson-gxl.c index 290ac03a37..5fb9b477ad 100644 --- a/drivers/usb/dwc3/dwc3-meson-gxl.c +++ b/drivers/usb/dwc3/dwc3-meson-gxl.c @@ -26,7 +26,6 @@ #include <linux/bitfield.h> #include <linux/bitops.h> #include <linux/compat.h> -#include <asm/arch/usb-gx.h> /* USB Glue Control Registers */ @@ -193,7 +192,7 @@ static int dwc3_meson_gxl_usb_init(struct dwc3_meson_gxl *priv) return 0; } -int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode) +static int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode) { struct dwc3_meson_gxl *priv = dev_get_plat(dev); -- 2.34.1
Розпочато Neil Armstrong @ · Останніх @
Current Image
Image Name
Sat 8:39am