[PATCH v3 11/11] riscv: Don't reserve AI ram in k210 dts

2021-04-08 Thread Sean Anderson
It is no longer necessary to disallow ai ram, since it is enabled by the sram driver. Signed-off-by: Sean Anderson --- (no changes since v1) arch/riscv/dts/k210.dtsi | 12 1 file changed, 12 deletions(-) diff --git a/arch/riscv/dts/k210.dtsi b/arch/riscv/dts/k210.dtsi index

[PATCH v3 10/11] riscv: k210: Use AI as the parent clock of aisram, not PLL1

2021-04-08 Thread Sean Anderson
Testing showed that disabling AI while leaving PLL1 enabled disabled the aisram. This suggests that AI is a more appropriate clock for that ram bank. Signed-off-by: Sean Anderson --- (no changes since v2) Changes in v2: - New arch/riscv/dts/k210.dtsi | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v3 05/11] clk: k210: Move the clint clock to under aclk

2021-04-08 Thread Sean Anderson
On 4/8/21 10:54 PM, Damien Le Moal wrote: On 2021/04/09 11:13, Sean Anderson wrote: No other (real) clocks have the cpu clock as their parent; instead they are children of aclk. Move the clint clock under aclk to match them. Signed-off-by: Sean Anderson --- (no changes since v2) Changes

Re: [PATCH v3 05/11] clk: k210: Move the clint clock to under aclk

2021-04-08 Thread Sean Anderson
On 4/8/21 10:58 PM, Damien Le Moal wrote: On 2021/04/09 11:54, Damien Le Moal wrote: On 2021/04/09 11:13, Sean Anderson wrote: No other (real) clocks have the cpu clock as their parent; instead they are children of aclk. Move the clint clock under aclk to match them. Signed-off-by: Sean

Re: [PATCH 1/4] command: Use a constant pointer for the help

2021-04-08 Thread Sean Anderson
On 4/6/21 12:30 AM, Simon Glass wrote: This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. Signed-off-by: Simon Glass --- include/command.h | 2 +

Re: Running u-boot 2021.04 on Raspberry Pi 4

2021-04-08 Thread Sean Anderson
On 4/8/21 8:18 PM, Roman Shaposhnik wrote: Hi! first time poster, long time lurker here. Over at Project EVE https://github.com/lf-edge/eve I've been trying to migrate from our current u-boot v2020.07 + patches: https://github.com/lf-edge/eve/tree/master/pkg/u-boot/patches/patches-v2020.07 to t

Re: [PATCH v7 16/22] riscv: Enable cpu clock if it is present

2020-05-02 Thread Sean Anderson
On 5/2/20 6:06 AM, Pragnesh Patel wrote: > The cpu clock is probably already enabled if we are executing code (though > we could be executing from a different core). This patch prevents the cpu > clock or its parents from being disabled. > > Signed-off-by: Sean Anderson If you m

Re: [PATCH v9 18/21] riscv: Enable cpu clock if it is present

2020-05-02 Thread Sean Anderson
On 4/25/20 3:54 AM, Pragnesh Patel wrote: > Hi Sean, > >> -Original Message- >> From: U-Boot On Behalf Of Sean Anderson >> Sent: 23 April 2020 08:03 >> To: u-boot@lists.denx.de >> Cc: Rick Chen ; Bin Meng ; >> Sean Anderson >> Subject: [

[PATCH v9 02/21] clk: Check that ops of composite clock components exist before calling

2020-05-02 Thread Sean Anderson
to exist, since clk_composite_get_parent was used to determine the parent for clk_register. Signed-off-by: Sean Anderson Acked-by: Lukasz Majewski --- Changes in v4: - Return ENOTSUPP not ENOSYS with no set_parent Changes in v3: - Don't return an error code where a no-op would be

[PATCH v9 04/21] clk: Fix clk_get_by_* handling of index

2020-05-02 Thread Sean Anderson
clk_get_by_index_nodev only ever fetched clock 1, due to passing a boolean predicate instead of the index. Other clk_get_by_* functions got the clock correctly, but passed a predicate instead of the index to clk_get_by_tail. This could lead to confusing error messages. Signed-off-by: Sean

[PATCH v9 01/21] clk: Always use the supplied struct clk

2020-05-02 Thread Sean Anderson
problem is to just always use the supplied struct clock. The composite clock now fills in the ->dev pointer of its child clocks. This allows child clocks to make calls like clk_get_parent() without issue. imx avoided the above problem by using a custom get_rate function with composite clocks.

[PATCH v9 03/21] clk: Unconditionally recursively en-/dis-able clocks

2020-05-02 Thread Sean Anderson
traverse up the tree when enabling. Previously, CCF clocks without id set would be skipped, stopping the traversal too early. Signed-off-by: Sean Anderson CC: Lukasz Majewski --- Changes in v6: - Fix disable incorrectly recursing into non-clock devices Changes in v5: - Clear enable_count on

[PATCH v9 00/21] riscv: Add Sipeed Maix support

2020-05-02 Thread Sean Anderson
build without errors - Add support for keeping internal PLL frequencies in-range - Fix several rebase-induced artifacts Sean Anderson (21): clk: Always use the supplied struct clk clk: Check that ops of composite clock components exist before calling clk: Unconditionally recursively en-/

[PATCH v9 10/21] reset: Add generic reset driver

2020-05-02 Thread Sean Anderson
. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v5: - Reorder includes - Include linux/err.h explicitly Changes in v4: - Added basic test - Fix incorrect usage of regmap_update_bits Changes in v3: - New arch/sandbox/dts/test.dts | 15 configs

[PATCH v9 05/21] clk: Add K210 pll support

2020-05-02 Thread Sean Anderson
This pll code is primarily based on the code from the kendryte standalone sdk in lib/drivers/sysctl.c. k210_pll_calc_config is roughly analogous to the algorithm used to set the pll frequency, but it has been completely rewritten to be fixed-point based. Signed-off-by: Sean Anderson CC: Lukasz

[PATCH v9 06/21] clk: Add a bypass clock for K210

2020-05-02 Thread Sean Anderson
so that the CPU keeps on working. Signed-off-by: Sean Anderson CC: Lukasz Majewski --- Changes in v5: - Add function to register from a struct bypass Changes in v4: - New drivers/clk/kendryte/Makefile | 2 +- drivers/clk/kendryte/bypass.c | 270 ++ include

[PATCH v9 08/21] dm: Add support for simple-pm-bus

2020-05-02 Thread Sean Anderson
j-$(CONFIG_$(SPL_TPL_)SYSCON)+= syscon-uclass.o diff --git a/drivers/core/simple-pm-bus.c b/drivers/core/simple-pm-bus.c new file mode 100644 index 00..51dc9b206f --- /dev/null +++ b/drivers/core/simple-pm-bus.c @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyr

[PATCH v9 09/21] dm: Fix error handling for dev_read_addr_ptr

2020-05-02 Thread Sean Anderson
have dev_remap_addr* for those semantics. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v10: - Explicitly cast fdt_addr_t to uintptr_t before casting to void * Changes in v5: - New drivers/clk/imx/clk-imx8mp.c | 2 +- drivers/core

[PATCH v9 13/21] riscv: Clear pending interrupts before enabling IPIs

2020-05-02 Thread Sean Anderson
one hart modifies shared memory at once. Signed-off-by: Sean Anderson Reviewed-by: Rick Chen --- Changes in v7: - Split of into its own patch arch/riscv/cpu/start.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S index 6b3ff99c38..e8740c8568

[PATCH v9 12/21] riscv: Add headers for asm/global_data.h

2020-05-02 Thread Sean Anderson
This header depended on bd_t and ulong, but did not include the appropriate headers. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v4: - Include compiler.h not linux/compiler.h arch/riscv/include/asm/global_data.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch

[PATCH v9 11/21] lib: Always set errno in hcreate_r

2020-05-02 Thread Sean Anderson
This could give a confusing error message if it failed and didn't set errno. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v5: - New lib/hashtable.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/hashtable.c b/lib/hashtable.c

[PATCH v9 16/21] riscv: Allow use of reset drivers

2020-05-02 Thread Sean Anderson
Currently, one cannot use a reset driver on RISC-V. Follow the MIPS example, and disable the default reset handler when the sysreset driver is enabled. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v3: - New arch/riscv/lib/reset.c | 2 ++ 1 file changed, 2 insertions

[PATCH v9 15/21] riscv: Add option to support RISC-V privileged spec 1.9

2020-05-02 Thread Sean Anderson
instruction exception. This patch adds an option to use the old CSRs instead of the new one. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v6: - Reformat so chechpatch errors less Changes in v5: - Rename to 1.9 to reflect the spec as implemented by the k210 Changes in v4

[PATCH v9 17/21] riscv: Try to get cpu frequency from a "clocks" node if it exists

2020-05-02 Thread Sean Anderson
Instead of always using the "clock-frequency" property to determine cpu frequency, try using a clock in "clocks" if it exists. This patch also fixes a bug where there could be spurious higher frequencies if sizeof(u32) != sizeof(ulong). Signed-off-by: Sean Anderson R

[PATCH v9 14/21] riscv: Clean up IPI initialization code

2020-05-02 Thread Sean Anderson
riscv_*_ipi functions should be called. Signed-off-by: Sean Anderson Reviewed-by: Rick Chen --- Changes in v9: - Fix type of ret variable in riscv_ipi_init Changes in v7: - Split IPI clearing off into its own patch Changes in v6: - Fix some formatting - Clear IPIs before enabling interrupts

[PATCH v9 07/21] clk: Add K210 clock support

2020-05-02 Thread Sean Anderson
: Sean Anderson CC: Lukasz Majewski --- Changes in v8: - Rework code to not need a new CCF api - Add some documentation Changes in v7: - Add numbering to some sysctl registers Changes in v6: - Reformat code so checkpatch generates fewer warnings - Give "fictional" clocks their own id

[PATCH v9 20/21] doc: riscv: Add documentation for Sipeed Maix Bit

2020-05-02 Thread Sean Anderson
This patch adds documentation for the Sipeed Maix bit, and more generally for the Kendryte K210 processor. Signed-off-by: Sean Anderson --- Changes in v9: - Mark dts code block as "none" explicitly Changes in v7: - Split off into its own patch - Fix size of clint doc/board

[PATCH v9 18/21] riscv: Enable cpu clock if it is present

2020-05-02 Thread Sean Anderson
The cpu clock is probably already enabled if we are executing code (though we could be executing from a different core). This patch prevents the cpu clock or its parents from being disabled. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- This patch was previously submitted on its own as

[PATCH v9 21/21] riscv: Add Sipeed Maix support

2020-05-02 Thread Sean Anderson
/dl.sipeed.com/MAIX/HDK/>. Documentation for the Kendryte K210 is located at <https://kendryte.com/downloads/>. However, hardware details are rather lacking, so most technical reference has been taken from the standalone sdk located at <https://github.com/kendryte/kendryte-standalone-

[PATCH v9 19/21] riscv: Add device tree for K210 and Sipeed Maix BitM

2020-05-02 Thread Sean Anderson
. Signed-off-by: Sean Anderson --- Changes in v7: - Move clocks node to be just before soc node, matching linux's tree - Merge memory nodes into one node with different registers - Add aliases for uclasses which use them - Fix size of clint Changes in v6: - Remove spi, gpio, pinmux, wdt, an

Re: [PATCH v9 00/21] riscv: Add Sipeed Maix support

2020-05-02 Thread Sean Anderson
...and I forgot to bump the version. Sorry, will resend with the proper v10 revision. On 5/2/20 10:35 PM, Sean Anderson wrote: > This patch series adds support for Sipeed Maix boards and the Kendryte > K210 CPU. Currently, only the Maix Bit V2.0 is supported, however other > models ar

[PATCH v10 01/21] clk: Always use the supplied struct clk

2020-05-02 Thread Sean Anderson
problem is to just always use the supplied struct clock. The composite clock now fills in the ->dev pointer of its child clocks. This allows child clocks to make calls like clk_get_parent() without issue. imx avoided the above problem by using a custom get_rate function with composite clocks.

[PATCH v10 00/21] riscv: Add Sipeed Maix support

2020-05-02 Thread Sean Anderson
build without errors - Add support for keeping internal PLL frequencies in-range - Fix several rebase-induced artifacts Sean Anderson (21): clk: Always use the supplied struct clk clk: Check that ops of composite clock components exist before calling clk: Unconditionally recursively en-/

[PATCH v10 02/21] clk: Check that ops of composite clock components exist before calling

2020-05-02 Thread Sean Anderson
to exist, since clk_composite_get_parent was used to determine the parent for clk_register. Signed-off-by: Sean Anderson Acked-by: Lukasz Majewski --- Changes in v4: - Return ENOTSUPP not ENOSYS with no set_parent Changes in v3: - Don't return an error code where a no-op would be

[PATCH v10 04/21] clk: Fix clk_get_by_* handling of index

2020-05-02 Thread Sean Anderson
clk_get_by_index_nodev only ever fetched clock 1, due to passing a boolean predicate instead of the index. Other clk_get_by_* functions got the clock correctly, but passed a predicate instead of the index to clk_get_by_tail. This could lead to confusing error messages. Signed-off-by: Sean

[PATCH v10 03/21] clk: Unconditionally recursively en-/dis-able clocks

2020-05-02 Thread Sean Anderson
traverse up the tree when enabling. Previously, CCF clocks without id set would be skipped, stopping the traversal too early. Signed-off-by: Sean Anderson CC: Lukasz Majewski --- Changes in v6: - Fix disable incorrectly recursing into non-clock devices Changes in v5: - Clear enable_count on

[PATCH v10 06/21] clk: Add a bypass clock for K210

2020-05-02 Thread Sean Anderson
so that the CPU keeps on working. Signed-off-by: Sean Anderson CC: Lukasz Majewski --- Changes in v5: - Add function to register from a struct bypass Changes in v4: - New drivers/clk/kendryte/Makefile | 2 +- drivers/clk/kendryte/bypass.c | 270 ++ include

[PATCH v10 08/21] dm: Add support for simple-pm-bus

2020-05-02 Thread Sean Anderson
j-$(CONFIG_$(SPL_TPL_)SYSCON)+= syscon-uclass.o diff --git a/drivers/core/simple-pm-bus.c b/drivers/core/simple-pm-bus.c new file mode 100644 index 00..51dc9b206f --- /dev/null +++ b/drivers/core/simple-pm-bus.c @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyr

[PATCH v10 09/21] dm: Fix error handling for dev_read_addr_ptr

2020-05-02 Thread Sean Anderson
have dev_remap_addr* for those semantics. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v10: - Explicitly cast fdt_addr_t to uintptr_t before casting to void * Changes in v5: - New drivers/clk/imx/clk-imx8mp.c | 2 +- drivers/core

[PATCH v10 05/21] clk: Add K210 pll support

2020-05-02 Thread Sean Anderson
This pll code is primarily based on the code from the kendryte standalone sdk in lib/drivers/sysctl.c. k210_pll_calc_config is roughly analogous to the algorithm used to set the pll frequency, but it has been completely rewritten to be fixed-point based. Signed-off-by: Sean Anderson CC: Lukasz

[PATCH v10 07/21] clk: Add K210 clock support

2020-05-02 Thread Sean Anderson
: Sean Anderson CC: Lukasz Majewski --- Changes in v8: - Rework code to not need a new CCF api - Add some documentation Changes in v7: - Add numbering to some sysctl registers Changes in v6: - Reformat code so checkpatch generates fewer warnings - Give "fictional" clocks their own id

[PATCH v10 11/21] lib: Always set errno in hcreate_r

2020-05-02 Thread Sean Anderson
This could give a confusing error message if it failed and didn't set errno. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v5: - New lib/hashtable.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/hashtable.c b/lib/hashtable.c

[PATCH v10 12/21] riscv: Add headers for asm/global_data.h

2020-05-02 Thread Sean Anderson
This header depended on bd_t and ulong, but did not include the appropriate headers. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v4: - Include compiler.h not linux/compiler.h arch/riscv/include/asm/global_data.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch

[PATCH v10 10/21] reset: Add generic reset driver

2020-05-02 Thread Sean Anderson
. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v5: - Reorder includes - Include linux/err.h explicitly Changes in v4: - Added basic test - Fix incorrect usage of regmap_update_bits Changes in v3: - New arch/sandbox/dts/test.dts | 15 configs

[PATCH v10 14/21] riscv: Clean up IPI initialization code

2020-05-02 Thread Sean Anderson
riscv_*_ipi functions should be called. Signed-off-by: Sean Anderson Reviewed-by: Rick Chen --- Changes in v9: - Fix type of ret variable in riscv_ipi_init Changes in v7: - Split IPI clearing off into its own patch Changes in v6: - Fix some formatting - Clear IPIs before enabling interrupts

[PATCH v10 13/21] riscv: Clear pending interrupts before enabling IPIs

2020-05-02 Thread Sean Anderson
one hart modifies shared memory at once. Signed-off-by: Sean Anderson Reviewed-by: Rick Chen --- Changes in v7: - Split of into its own patch arch/riscv/cpu/start.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S index 6b3ff99c38..e8740c8568

[PATCH v10 18/21] riscv: Enable cpu clock if it is present

2020-05-02 Thread Sean Anderson
The cpu clock is probably already enabled if we are executing code (though we could be executing from a different core). This patch prevents the cpu clock or its parents from being disabled. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- This patch was previously submitted on its own as

[PATCH v10 17/21] riscv: Try to get cpu frequency from a "clocks" node if it exists

2020-05-02 Thread Sean Anderson
Instead of always using the "clock-frequency" property to determine cpu frequency, try using a clock in "clocks" if it exists. This patch also fixes a bug where there could be spurious higher frequencies if sizeof(u32) != sizeof(ulong). Signed-off-by: Sean Anderson R

[PATCH v10 20/21] doc: riscv: Add documentation for Sipeed Maix Bit

2020-05-02 Thread Sean Anderson
This patch adds documentation for the Sipeed Maix bit, and more generally for the Kendryte K210 processor. Signed-off-by: Sean Anderson --- Changes in v9: - Mark dts code block as "none" explicitly Changes in v7: - Split off into its own patch - Fix size of clint doc/board

[PATCH v10 15/21] riscv: Add option to support RISC-V privileged spec 1.9

2020-05-02 Thread Sean Anderson
instruction exception. This patch adds an option to use the old CSRs instead of the new one. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v6: - Reformat so chechpatch errors less Changes in v5: - Rename to 1.9 to reflect the spec as implemented by the k210 Changes in v4

[PATCH v10 16/21] riscv: Allow use of reset drivers

2020-05-02 Thread Sean Anderson
Currently, one cannot use a reset driver on RISC-V. Follow the MIPS example, and disable the default reset handler when the sysreset driver is enabled. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v3: - New arch/riscv/lib/reset.c | 2 ++ 1 file changed, 2 insertions

[PATCH v10 19/21] riscv: Add device tree for K210 and Sipeed Maix BitM

2020-05-02 Thread Sean Anderson
. Signed-off-by: Sean Anderson --- Changes in v7: - Move clocks node to be just before soc node, matching linux's tree - Merge memory nodes into one node with different registers - Add aliases for uclasses which use them - Fix size of clint Changes in v6: - Remove spi, gpio, pinmux, wdt, an

[PATCH v10 21/21] riscv: Add Sipeed Maix support

2020-05-02 Thread Sean Anderson
/dl.sipeed.com/MAIX/HDK/>. Documentation for the Kendryte K210 is located at <https://kendryte.com/downloads/>. However, hardware details are rather lacking, so most technical reference has been taken from the standalone sdk located at <https://github.com/kendryte/kendryte-standalone-

Re: [PATCH v7 16/22] riscv: Enable cpu clock if it is present

2020-05-03 Thread Sean Anderson
On 5/3/20 3:12 AM, Pragnesh Patel wrote: > Hi Sean, > >> -Original Message----- >> From: Sean Anderson >> Sent: 02 May 2020 23:46 >> To: Pragnesh Patel ; u-boot@lists.denx.de >> Cc: atish.pa...@wdc.com; palmerdabb...@google.com; >>

[PATCH v3 0/4] patman: Add changelog customization options

2020-05-03 Thread Sean Anderson
changelogs - Switch to using commit tags for changelog control, instead of command-line options Sean Anderson (4): patman: Modify functional tests for new behavior patman: Suppress empty changelog entries patman: Add new tags for finer-grained changelog control patman: Support multi-line

[PATCH v3 1/4] patman: Modify functional tests for new behavior

2020-05-03 Thread Sean Anderson
n addition to testing the existing code paths. Signed-off-by: Sean Anderson --- Changes in v3: - New tools/patman/func_test.py | 58 --- .../0001-pci-Correct-cast-for-sandbox.patch | 3 + ...-for-sandbox-in-fdtdec_setup_mem_siz.patch | 12 +++- tools/p

[PATCH v3 3/4] patman: Add new tags for finer-grained changelog control

2020-05-03 Thread Sean Anderson
quot;Commit-changes" will only appear in the commit, and will not appear in the cover letter. Changes documented with "Cover-changes" will not appear in any commit, and will only appear in the cover letter. Signed-off-by: Sean Anderson --- (no changes since v2) Changes in v2: - Ad

[PATCH v3 2/4] patman: Suppress empty changelog entries

2020-05-03 Thread Sean Anderson
: - New This is entirely aesthetic, but I think it reduces clutter, especially for patches added later on in a series. Signed-off-by: Sean Anderson --- Changes in v3: - Document empty changelog suppression in README - Fix KeyError when running tests - Fix no changes message being output for

[PATCH v3 4/4] patman: Support multi-line changes in changelogs

2020-05-03 Thread Sean Anderson
the change before it. Signed-off-by: Sean Anderson --- (no changes since v2) Changes in v2: - New tools/patman/README | 10 -- tools/patman/patchstream.py | 35 +++ 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/tools/patman

Re: [PATCH v3 2/4] patman: Suppress empty changelog entries

2020-05-04 Thread Sean Anderson
On 5/4/20 10:39 AM, Simon Glass wrote: > Hi Sean, > > On Sun, 3 May 2020 at 15:55, Sean Anderson wrote: >> >> Patman outputs a line for every edition of the series in every patch, >> regardless of whether any changes were made. This can result in many >> re

[PATCH v4 0/4] patman: Add changelog customization options

2020-05-04 Thread Sean Anderson
- Update commit subjects Changes in v2: - Add a note when there are no changes in the current revision - Add documentation for new tags - Add patch for multi-line changes in changelogs - Switch to using commit tags for changelog control, instead of command-line options Sean Anderson (4): patman

[PATCH v4 3/4] patman: Support multi-line changes in changelogs

2020-05-04 Thread Sean Anderson
the change before it. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - New tools/patman/README | 10 -- tools/patman/patchstream.py | 35 +++ 2 files changed, 35 insertions(+), 10 deletions(-) diff

[PATCH v4 4/4] patman: Modify functional tests for new behavior

2020-05-04 Thread Sean Anderson
n addition to testing the existing code paths. Signed-off-by: Sean Anderson --- (no changes since v3) Changes in v3: - New tools/patman/func_test.py | 58 --- .../0001-pci-Correct-cast-for-sandbox.patch | 3 + ...-for-sandbox-in-fdtdec_setup_mem_siz.

[PATCH v4 2/4] patman: Add new tags for finer-grained changelog control

2020-05-04 Thread Sean Anderson
quot;Commit-changes" will only appear in the commit, and will not appear in the cover letter. Changes documented with "Cover-changes" will not appear in any commit, and will only appear in the cover letter. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in

[PATCH v4 1/4] patman: Suppress empty changelog entries

2020-05-04 Thread Sean Anderson
: - New This is entirely aesthetic, but I think it reduces clutter, especially for patches added later on in a series. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v4: - Fix need_blank not always reflecting the need for a blank - Refactor newest_version logic Changes in

Re: [PATCH v10 20/21] doc: riscv: Add documentation for Sipeed Maix Bit

2020-05-05 Thread Sean Anderson
On 5/5/20 5:01 AM, Rick Chen wrote: > Hi Sean > >> This patch adds documentation for the Sipeed Maix bit, and more generally >> for the Kendryte K210 processor. >> >> Signed-off-by: Sean Anderson >> --- >> >> Changes in v9: >> - Mar

Re: [PATCH v10 20/21] doc: riscv: Add documentation for Sipeed Maix Bit

2020-05-05 Thread Sean Anderson
>> [1] https://travis-ci.org/github/Forty-Bot/u-boot/jobs/682461390 > > I just remove your v10 patchs and run again today, it will pass (Build #53) > https://travis-ci.org/github/rickchen36/u-boot-riscv/builds/683645440 > > Please check about 52 and 53. > > Thanks, > Rick > Yes, those were the

Re: [PATCH 3/3] cmd: dm: Fixed/Added DM driver listing subcommands

2020-03-17 Thread Sean Anderson
On 3/17/20 10:09 AM, Niel Fourie wrote: > Renamed dm "drivers" subcommand to "compat" (as it listed > compatibility strings) and prevent it from segfaulting when > drivers have no of_match populated. > > Added a new "drivers" subcommand to dump a list of all known DM > drivers and for each, their

Re: [PATCH v6 04/19] clk: Add functions to register CCF clock structs

2020-03-17 Thread Sean Anderson
g. This >> increases the size of the binary, but should not affect ram usage (since >> the clocks now no longer live on the heap). >> >> Signed-off-by: Sean Anderson >> --- >> > > This is a new patch since v5 and still lack of tag of MAINTAINERs. >

Re: [PATCH v6 13/19] riscv: Fix race conditions when initializing IPI

2020-03-17 Thread Sean Anderson
function riscv_init_ipi is introduced. It >>>> is called once during arch_cpu_init_dm. Before this point, no riscv_*_ipi >>>> functions may be called. Access is synchronized by gd->arch->ipi_ready. >>>> >>>> Signed-off-by: Sean Anderson >>&

Re: [PATCH v2 3/3] cmd: dm: Fixed/Added DM driver listing subcommands

2020-03-19 Thread Sean Anderson
of all known DM > drivers and for each, their uclass id, uclass driver and names of > attached devices. > > Added a new "static" subcommand to dump a list of DM drivers with > statically defined platform data. > > Signed-off-by: Niel Fourie > CC: Simon Gla

[PATCH v7 00/22] riscv: Add Sipeed Maix support

2020-03-19 Thread Sean Anderson
or v2: - Many bugfixes for the device tree - Modify the config to build without errors - Add support for keeping internal PLL frequencies in-range - Fix several rebase-induced artifacts Sean Anderson (22): clk: Always use the supplied struct clk clk: Check that ops of composite clock components

[PATCH v7 01/22] clk: Always use the supplied struct clk

2020-03-19 Thread Sean Anderson
problem is to just always use the supplied struct clock. The composite clock now fills in the ->dev pointer of its child clocks. This allows child clocks to make calls like clk_get_parent() without issue. imx avoided the above problem by using a custom get_rate function with composite clocks.

[PATCH v7 05/22] clk: Add functions to register CCF clock structs

2020-03-19 Thread Sean Anderson
clocks now no longer live on the heap). Signed-off-by: Sean Anderson --- Changes in v5: - New drivers/clk/clk-composite.c | 103 +++ drivers/clk/clk-divider.c| 56 +-- drivers/clk/clk-gate.c | 38 - include/linux/clk

[PATCH v7 04/22] clk: Fix clk_get_by_* handling of index

2020-03-19 Thread Sean Anderson
clk_get_by_index_nodev only ever fetched clock 1, due to passing a boolean predicate instead of the index. Other clk_get_by_* functions got the clock correctly, but passed a predicate instead of the index to clk_get_by_tail. This could lead to confusing error messages. Signed-off-by: Sean

[PATCH v7 02/22] clk: Check that ops of composite clock components exist before calling

2020-03-19 Thread Sean Anderson
to exist, since clk_composite_get_parent was used to determine the parent for clk_register. Signed-off-by: Sean Anderson Acked-by: Lukasz Majewski --- Changes in v4: - Return ENOTSUPP not ENOSYS with no set_parent Changes in v3: - Don't return an error code where a no-op would be

[PATCH v7 07/22] clk: Add a bypass clock for K210

2020-03-19 Thread Sean Anderson
so that the CPU keeps on working. Signed-off-by: Sean Anderson --- Changes in v5: - Add function to register from a struct bypass Changes in v4: - New drivers/clk/kendryte/Makefile | 2 +- drivers/clk/kendryte/bypass.c | 270 ++ include/kendryte/bypass.h

[PATCH v7 03/22] clk: Unconditionally recursively en-/dis-able clocks

2020-03-19 Thread Sean Anderson
traverse up the tree when enabling. Previously, CCF clocks without id set would be skipped, stopping the traversal too early. Signed-off-by: Sean Anderson --- Changes in v6: - Fix disable incorrectly recursing into non-clock devices Changes in v5: - Clear enable_count on request Changes in v4

[PATCH v7 06/22] clk: Add K210 pll support

2020-03-19 Thread Sean Anderson
This pll code is primarily based on the code from the kendryte standalone sdk in lib/drivers/sysctl.c. k210_pll_calc_params is roughly analogous to the algorithm used to set the pll frequency, but it has been completely rewritten to be fixed-point based. Signed-off-by: Sean Anderson --- Changes

[PATCH v7 10/22] dm: Fix error handling for dev_read_addr_ptr

2020-03-19 Thread Sean Anderson
have dev_remap_addr* for those semantics. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v5: - New drivers/clk/imx/clk-imx8mp.c | 2 +- drivers/core/read.c | 2 +- drivers/pinctrl/broadcom/pinctrl-bcm283x.c

[PATCH v7 09/22] dm: Add support for simple-pm-bus

2020-03-19 Thread Sean Anderson
-$(CONFIG_$(SPL_)DM_DEVICE_REMOVE) += device-remove.o obj-$(CONFIG_$(SPL_)SIMPLE_BUS)+= simple-bus.o +obj-$(CONFIG_SIMPLE_PM_BUS)+= simple-pm-bus.o obj-$(CONFIG_DM) += dump.o obj-$(CONFIG_$(SPL_TPL_)REGMAP)+= regmap.o obj-$(CONFIG_$(SPL_TPL_)SYSCON)+= syscon-ucla

[PATCH v7 11/22] reset: Add generic reset driver

2020-03-19 Thread Sean Anderson
. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v5: - Reorder includes - Include linux/err.h explicitly Changes in v4: - Added basic test - Fix incorrect usage of regmap_update_bits Changes in v3: - New arch/sandbox/dts/test.dts | 15 configs

[PATCH v7 08/22] clk: Add K210 clock support

2020-03-19 Thread Sean Anderson
need, instead of the whole CCF struct. Signed-off-by: Sean Anderson --- Changes in v7: - Add numbering to some sysctl registers Changes in v6: - Reformat code so checkpatch generates fewer warnings - Give "fictional" clocks their own ids - Rename sysctl CLK_FREQ register to UART_BAUD

[PATCH v7 13/22] riscv: Add headers for asm/global_data.h

2020-03-19 Thread Sean Anderson
This header depended on bd_t and ulong, but did not include the appropriate headers. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v4: - Include compiler.h not linux/compiler.h arch/riscv/include/asm/global_data.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch

[PATCH v7 12/22] lib: Always set errno in hcreate_r

2020-03-19 Thread Sean Anderson
This could give a confusing error message if it failed and didn't set errno. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v5: - New lib/hashtable.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/hashtable.c b/lib/hashtable.c

[PATCH v7 14/22] riscv: Clear pending interrupts before enabling IPIs

2020-03-19 Thread Sean Anderson
one hart modifies shared memory at once. Signed-off-by: Sean Anderson --- Changes in v7: - Split of into its own patch arch/riscv/cpu/start.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S index 6b3ff99c38..e8740c8568 100644 --- a/arch/riscv

[PATCH v7 18/22] riscv: Try to get cpu frequency from a "clocks" node if it exists

2020-03-19 Thread Sean Anderson
Instead of always using the "clock-frequency" property to determine cpu frequency, try using a clock in "clocks" if it exists. This patch also fixes a bug where there could be spurious higher frequencies if sizeof(u32) != sizeof(ulong). Signed-off-by: Sean Anderson R

[PATCH v7 16/22] riscv: Add option to support RISC-V privileged spec 1.9

2020-03-19 Thread Sean Anderson
instruction exception. This patch adds an option to use the old CSRs instead of the new one. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v6: - Reformat so chechpatch errors less Changes in v5: - Rename to 1.9 to reflect the spec as implemented by the k210 Changes in v4

[PATCH v7 15/22] riscv: Clean up IPI initialization code

2020-03-19 Thread Sean Anderson
riscv_*_ipi functions should be called. Signed-off-by: Sean Anderson --- Changes in v7: - Split IPI clearing off into its own patch Changes in v6: - Fix some formatting - Clear IPIs before enabling interrupts instead of using a ipi_ready flag - Only print messages on error in smp code Changes in

[PATCH v7 19/22] riscv: Enable cpu clock if it is present

2020-03-19 Thread Sean Anderson
The cpu clock is probably already enabled if we are executing code (though we could be executing from a different core). This patch prevents the cpu clock or its parents from being disabled. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- This patch was previously submitted on its own as

[PATCH v7 22/22] riscv: Add Sipeed Maix support

2020-03-19 Thread Sean Anderson
/dl.sipeed.com/MAIX/HDK/>. Documentation for the Kendryte K210 is located at <https://kendryte.com/downloads/>. However, hardware details are rather lacking, so most technical reference has been taken from the standalone sdk located at <https://github.com/kendryte/kendryte-standalone-sdk>.

[PATCH v7 17/22] riscv: Allow use of reset drivers

2020-03-19 Thread Sean Anderson
Currently, one cannot use a reset driver on RISC-V. Follow the MIPS example, and disable the default reset handler when the sysreset driver is enabled. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v3: - New arch/riscv/lib/reset.c | 2 ++ 1 file changed, 2 insertions

[PATCH v7 20/22] riscv: Add device tree for K210 and Sipeed Maix BitM

2020-03-19 Thread Sean Anderson
. Signed-off-by: Sean Anderson --- Changes in v7: - Move clocks node to be just before soc node, matching linux's tree - Merge memory nodes into one node with different registers - Add aliases for uclasses which use them - Fix size of clint Changes in v6: - Remove spi, gpio, pinmux, wdt, an

[PATCH v7 21/22] doc: riscv: Add documentation for Sipeed Maix Bit

2020-03-19 Thread Sean Anderson
This patch adds documentation for the Sipeed Maix bit, and more generally for the Kendryte K210 processor. Signed-off-by: Sean Anderson --- Changes in v7: - Split off into its own patch - Fix size of clint doc/board/index.rst| 1 + doc/board/sipeed/index.rst | 9 ++ doc/board

[PATCH 0/2] patman: Add changelog customization options

2020-03-19 Thread Sean Anderson
This series adds a few changes I have been using locally as options for patman. Sean Anderson (2): patman: Add option to suppress empty changelog entries patman: Add option to disable combined changelogs tools/patman/func_test.py | 4 ++-- tools/patman/patchstream.py | 22

[PATCH 2/2] patman: Add option to disable combined changelogs

2020-03-19 Thread Sean Anderson
n the cover letter, while documenting all the details in the appropriate patches. I think this make it easier to get a good feel for what has changed, without making it difficult to wade through every change in the whole series. For these reasons, this patch adds an option to disable the automatic

[PATCH 1/2] patman: Add option to suppress empty changelog entries

2020-03-19 Thread Sean Anderson
This is entirely aesthetic, but I think it reduces clutter, especially for patches added later on in a series. Signed-off-by: Sean Anderson --- tools/patman/func_test.py | 2 +- tools/patman/patchstream.py | 15 --- tools/patman/patman.py | 7 +-- tools/patman/series.py

[PATCH] clk: Add more information to debug messages

2020-03-19 Thread Sean Anderson
Some of the debug messages in the clock subsystem can be made more informative by adding the clock name or adding the explicit error. Signed-off-by: Sean Anderson --- drivers/clk/clk-uclass.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers

[PATCH] docs: Fix conf.py for Sphinx 2.0

2020-03-19 Thread Sean Anderson
-off-by: Jonathan Corbet [rebase for u-boot] Signed-off-by: Sean Anderson --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 0772fb6f0c..8bb27ad9e2 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -37,7 +37,7 @@ needs_sphinx = 

Re: [PATCH 1/2] patman: Add option to suppress empty changelog entries

2020-03-21 Thread Sean Anderson
On 3/21/20 10:42 AM, Simon Glass wrote: > Hi Sean, > > I can see the value here, particularly for the 'new' case. But I > actually appreciate the positive confirmation that nothing changed. > Sometimes people send patches and fail to add a change log. Hm, I don't know if this patch would affect t

<    5   6   7   8   9   10   11   12   13   14   >