Use generic is_cortex_a() functions instead of open-coded midr_el1 read.
No functional change.
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
(cherry picked from commit 46a7999160)
[Cherry-pick fix-up: Dropped changes to gen3-common.c which was deleted in target branch]
Turn the core type check macros into inline functions to perform
better type checking on them. The inline functions get optimized
out in case they are not used. Indent the MIDR_PARTNUM_CORTEX_An
macros in preparation for addition of future three-digit cores
and use MIDR_PARTNUM_SHIFT in MIDR_PARTNUM_MASK to be consistent.
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
(cherry picked from commit ddb0f26dc4)
i.MX95 uses the same USB IP as i.MX8MM. It can then reuse the ehci-mx6
driver.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
(cherry picked from commit 801b5fafd3)
With the commit 4fcba5d556 ("regulator: implement basic reference
counter") the return value of regulator_set_enable may be EALREADY or
EBUSY for fixed/gpio regulators.
Change to use the more relaxed regulator_set_enable_if_allowed to
continue if regulator already was enabled or disabled.
Based on 335799b725 ("usb: dwc2: Use regulator_set_enable_if_allowed")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
(cherry picked from commit addcb09fd5)
With the commit 4fcba5d556 ("regulator: implement basic reference
counter") the return value of regulator_set_enable may be EALREADY or
EBUSY for fixed/gpio regulators.
Change to use the more relaxed regulator_set_enable_if_allowed to
continue if regulator already was enabled or disabled.
Based on 335799b725 ("usb: dwc2: Use regulator_set_enable_if_allowed")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
(cherry picked from commit b20c51bc45)
Convert most of the stub macros in timer.h and workqueue.h to static
inline functions for better type checking. Keep macros for functions
that take callback pointers (setup_timer, timer_setup, INIT_WORK,
INIT_DELAYED_WORK, del_timer_sync) since some callers pass functions
that are conditionally compiled out.
Fixes: 3b4667ed88 ("ext4l: Add super.c to build")
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
The new definition causes a build failure on some boards, such as
vexpress_ca9x4
Use a static inline function to resolve this.
Signed-off-by: Simon Glass <simon.glass@canonical.com>
The hack itself seems to be copied from Linux rti_wdt.c, but the WDT reset
principle is different in U-Boot. While Linux relies on correct frequencies
and timers and doesn't check the actual WDT counter value U-Boot driver
seems to be more robust: it does compare RTIDWDCNTR vs RTIDWDPRLD.
Now the root cause of the original motivation to manipulate the clock rate
is said to be understood and fixed in Linux commit cae58516534e
("watchdog: rti_wdt: Set min_hw_heartbeat_ms to accommodate a safety margin")
which simultaneously removed the hack itself.
While is fix part of the mentioned patch is neither applicable nor requried
for the U-Boot driver just drop the hack setting WDT clock rate to 90% of
the real rate. This has a nice effect that the WDT timeout is now as
requested and not 10% shorter.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Stefan Roese <sr@denx.de>
(cherry picked from commit 5964f24f15)
If the RTI watchdog has been enabled in SPL, enabling it in U-Boot proper
fails because it can only be enabled once in HW and never stopped. This
however leads to a situation that wdt_cyclic() watchdog trigger is not
being started any longer and the WDT fires at some point.
Allow for WDT re-start by not bailing out if the [previously] configured
period matches the one to be configured.
Enabling in [A53] SPL has been tested on AM62x-based HW (where [A53] SPL is
responsible for loading R5 DM firmware and not this driver).
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Stefan Roese <sr@denx.de>
(cherry picked from commit 5b5124e3d5)
Add super.c to the ext4l Makefile and provide the infrastructure
needed to compile it:
- Add stubs for block device operations (bdev_file_open_by_dev,
bdev_fput, bdev_getblk, submit_bh, trylock_buffer)
- Add stubs for NFS export helpers (generic_fh_to_dentry/parent)
- Add stubs for filesystem operations (sync_filesystem, dquot_suspend)
- Add stubs for string operations (strreplace, strtomem_pad)
- Add stubs for memory allocation (alloc_inode_sb, kvzalloc)
- Add stubs for ratelimit, workqueue, and trace functions
- Add fs_context and fs_parameter structures for mount options
- Add blk_holder_ops structure for block device holder operations
- Add pragma to suppress unused function/variable warnings
- Add __maybe_unused to __init/__exit macros in init.h
The only change to super.c itself is replacing the Linux kernel
includes with the U-Boot compatibility header ext4_uboot.h.
Series-to: concept
Cover-letter:
ext4l: Add more ext4 files to the build (part D)
This series continues the ext4l port by adding super.c to the build. The
super.c file contains the superblock operations and filesystem
registration code from the kernel's ext4 driver.
To support this effort compilation, this series adds numerous stubs and
compatibility shims for Linux kernel interfaces not available in
U-Boot, including block device operations, filesystem context
handling, NFS export helpers, and various utility functions.
In particular, fs/ext4l/ext4_uboot.h contains a lot of U-Boot specific
declarations and stubs, with fs/ext4l/stub.c containing various others.
The goal is to eventually have a fully functional ext4 implementation
ported from Linux that can be used for both reading and writing ext4
filesystems in U-Boot.
END
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add dir.c to the Makefile and provide necessary stubs:
- Replace Linux includes with ext4_uboot.h
- Add fscrypt directory operation stubs
- Add readahead, inode version, and dir_emit stubs
- Add struct file_operations with needed members
- Add generic_read_dir, ext4_llseek, ext4_htree_fill_tree stubs
- Add ext4_ioctl, ext4_sync_file, ext4_dirblock_csum_verify stubs
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add a stub header for linux/utsname.h needed by mmp.c and other
ext4 files.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add xattr_user.c and xattr_hurd.c to the ext4l build:
- Update includes to use ext4_uboot.h
- Add d_sb member to struct dentry
- Add XATTR_HURD_PREFIX to linux/xattr.h
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add xattr_trusted.c to the ext4l build with necessary changes:
- Update xattr_trusted.c includes to use ext4_uboot.h
- Add xattr.h include to ialloc.c for ext4_init_security
- Remove duplicate ext4_init_security declaration from ext4_uboot.h
(now provided by xattr.h inline stub)
- Add ext4_xattr_get and ext4_xattr_set stubs
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add orphan.c to the ext4l build and fix various build issues:
- Add atomic_inc/atomic_dec macros to ext4_uboot.h
- Add s_flags member to struct super_block and SB_RDONLY constant
- Add bdev_read_only() stub function
- Add kvfree() and kvmalloc_array() to linux/slab.h
- Add stub functions for orphan.c: ext4_reserve_inode_write,
ext4_superblock_csum_set, ext4_mark_iloc_dirty, ext4_truncate,
ext4_feature_set_ok, ext4_bread
- Fix orphan.c to use U-Boot include pattern
- Remove linux/atomic.h include from buffer_head.h (types provided
by ext4_uboot.h)
- Add kunit/static_stub.h and linux/nospec.h stub headers
- Simplify seq_file.h macros
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add stub declarations and implementations for xattr functions that
ialloc.c calls but which are defined in xattr.c (not yet compiled):
- __ext4_xattr_set_credits
- ext4_init_security
Add declarations to ext4_uboot.h and implementations to stub.c.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Mark variables as __maybe_unused where they are only used in macro
calls that expand to no-ops in U-Boot's single-threaded environment:
- tree in ext4_es_try_to_merge_left/right
- es_stats in ext4_seq_es_shrinker_info_show
- ei in ext4_clear_inode_es, ext4_remove_pending, ext4_is_pending
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add support for pushing branches using the GitLab API token, so commits
appear as coming from the token owner (e.g., a bot account) rather than
the user's configured git credentials.
Add get_push_url() function that creates a token-authenticated URL in
the format https://oauth2:TOKEN@host/project.git. Update push_branch()
to use this URL when available.
Add a new 'push-branch' command that the agent can use for pushing:
./tools/pickman/pickman push-branch <branch> -r <remote> [-f]
Update the review agent prompt to use this command instead of direct
git push, ensuring all pickman commits come from the same account.
Series-to: concept
Cover-letter:
pickman: Improvements for robustness and automation
These changes improve pickman's robustness when interrupted, add the
ability to skip problematic MRs during review, support multiple
concurrent MRs, and ensure all commits come from the pickman bot
account.
This series adds several improvements to pickman:
- Fix rebase-detection for open MRs
- Add skip/unskip support via review comments (pickman: skip/unskip)
- Skip already-processed commits to handle interruptions gracefully
- Handle 409 errors when MR already exists
- Document the commit-selection algorithm and skip feature
- Add --max-mrs option for parallel MR creation
- Run a CI pipeline after review-comment changes
- Use GitLab API token for push authentication (bot-account support)
END
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Remove ci.skip from the push command in the review agent prompt. When
pushing changes after addressing review comments, a new pipeline should
run to verify the changes.
The ci.skip option is still used in gitlab_api.push_branch() for
initial MR creation, since the MR creation itself triggers a pipeline.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude <noreply@anthropic.com>
Add a --max-mrs option to the step and poll commands to allow multiple
MRs to be open simultaneously. Previously, step would block creating
new MRs if any were pending. Now it checks if the count of active
(non-skipped) MRs is below the limit before creating a new one.
The default is 5 MRs, allowing parallel review of multiple cherry-pick
sets while still preventing unbounded growth.
Each MR targets master independently, so there's no complex retargeting
needed when earlier MRs merge.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add two new sections to README.rst:
- Commit Selection: Explain how pickman groups commits into MRs
based on merge commits, with a concrete example
- Skipping MRs: Document the skip/unskip comment commands
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
If pickman crashes or is interrupted after pushing a branch but before
recording the MR, the next run would try to create an MR for the same
branch and receive a 409 Conflict error. Handle this gracefully by
finding the existing MR and returning its URL.
Add MrCreateError exception class to allow testing without importing
the gitlab module.
Co-developed-by: Claude <noreply@anthropic.com>
When determining the next commits to cherry-pick in get_next_commits(),
check the database and skip commits that are already tracked. This
prevents re-processing if pickman is interrupted after adding commits to
the database but before updating the source position.
The key changes:
- Build list of all merge commits on first-parent chain
- For each merge, get its commits and filter out those in database
- If any unprocessed commits remain, return them
- Otherwise skip to the next merge
- Finally check for remaining commits after all merges
Co-developed-by: Claude <noreply@anthropic.com>
Split the for loop body into a separate function to reduce complexity
and improve readability. The new process_single_mr() function handles
all processing for a single MR including skip/unskip handling, rebase,
and comment addressing.
Co-developed-by: Claude <noreply@anthropic.com>
Allow reviewers to skip an MR by commenting "pickman skip" (or
"pickman: skip", "@pickman skip"). When skipped, the MR title is
updated to include "[skipped]" and pickman continues creating new
MRs for subsequent cherry-picks.
To resume processing a skipped MR, comment "pickman unskip" which
removes the [skipped] tag from the title.
Skipped MRs are ignored for rebase processing and don't block
creation of new MRs.
Fix some double-quotes while here.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
The GitLab list() API returns inaccurate detailed_merge_status values.
Fetch the full MR details for open MRs to get accurate rebase status.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add pylint disable comments for too-many-arguments, too-many-locals,
and too-many-branches warnings on functions that necessarily have
complex logic due to the nature of building agent prompts and
processing MR reviews.
Co-developed-by: Claude <noreply@anthropic.com>
Extract build_review_context() and build_review_prompt() from
run_review_agent() to reduce function complexity and improve
readability.
Fix the use of 'crosfw' while we are here.
Co-developed-by: Claude <noreply@anthropic.com>