]> git.dujemihanovic.xyz Git - u-boot.git/commit
reset: Remove addr parameter from reset_cpu()
authorHarald Seiler <hws@denx.de>
Tue, 15 Dec 2020 15:47:52 +0000 (16:47 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 2 Mar 2021 19:03:02 +0000 (14:03 -0500)
commit35b65dd8ef3d37a088ee9169763a4d891aed618d
treec99fa5faa4f958d693f1deb2de9356064e78e437
parent3394f398b5f37d930b9ae1b6638fe26b0cc735d8
reset: Remove addr parameter from reset_cpu()

Historically, the reset_cpu() function had an `addr` parameter which was
meant to pass in an address of the reset vector location, where the CPU
should reset to.  This feature is no longer used anywhere in U-Boot as
all reset_cpu() implementations now ignore the passed value.  Generic
code has been added which always calls reset_cpu() with `0` which means
this feature can no longer be used easily anyway.

Over time, many implementations seem to have "misunderstood" the
existence of this parameter as a way to customize/parameterize the reset
(e.g.  COLD vs WARM resets).  As this is not properly supported, the
code will almost always not do what it is intended to (because all
call-sites just call reset_cpu() with 0).

To avoid confusion and to clean up the codebase from unused left-overs
of the past, remove the `addr` parameter entirely.  Code which intends
to support different kinds of resets should be rewritten as a sysreset
driver instead.

This transformation was done with the following coccinelle patch:

    @@
    expression argvalue;
    @@
    - reset_cpu(argvalue)
    + reset_cpu()

    @@
    identifier argname;
    type argtype;
    @@
    - reset_cpu(argtype argname)
    + reset_cpu(void)
    { ... }

Signed-off-by: Harald Seiler <hws@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
134 files changed:
arch/arc/lib/reset.c
arch/arm/cpu/arm920t/ep93xx/cpu.c
arch/arm/cpu/arm920t/imx/timer.c
arch/arm/cpu/arm926ejs/armada100/timer.c
arch/arm/cpu/arm926ejs/mx25/reset.c
arch/arm/cpu/arm926ejs/mx27/reset.c
arch/arm/cpu/arm926ejs/mxs/mxs.c
arch/arm/cpu/arm926ejs/spear/reset.c
arch/arm/cpu/arm946es/cpu.c
arch/arm/cpu/armv7/bcm281xx/reset.c
arch/arm/cpu/armv7/bcmcygnus/reset.c
arch/arm/cpu/armv7/bcmnsp/reset.c
arch/arm/cpu/armv7/ls102xa/cpu.c
arch/arm/cpu/armv7/s5p4418/cpu.c
arch/arm/cpu/armv7/stv0991/reset.c
arch/arm/cpu/armv7m/cpu.c
arch/arm/cpu/armv8/fsl-layerscape/cpu.c
arch/arm/cpu/armv8/s32v234/generic.c
arch/arm/cpu/pxa/pxa2xx.c
arch/arm/cpu/sa1100/cpu.c
arch/arm/lib/interrupts.c
arch/arm/lib/interrupts_m.c
arch/arm/lib/reset.c
arch/arm/mach-at91/arm920t/reset.c
arch/arm/mach-at91/arm926ejs/reset.c
arch/arm/mach-at91/armv7/reset.c
arch/arm/mach-bcm283x/reset.c
arch/arm/mach-davinci/reset.c
arch/arm/mach-exynos/soc.c
arch/arm/mach-imx/imx8m/soc.c
arch/arm/mach-imx/mx7ulp/soc.c
arch/arm/mach-k3/common.c
arch/arm/mach-keystone/ddr3.c
arch/arm/mach-keystone/init.c
arch/arm/mach-kirkwood/cpu.c
arch/arm/mach-lpc32xx/cpu.c
arch/arm/mach-mediatek/mt7622/init.c
arch/arm/mach-mediatek/mt8512/init.c
arch/arm/mach-mediatek/mt8516/init.c
arch/arm/mach-mediatek/mt8518/init.c
arch/arm/mach-meson/board-common.c
arch/arm/mach-mvebu/armada3700/cpu.c
arch/arm/mach-mvebu/armada8k/cpu.c
arch/arm/mach-mvebu/cpu.c
arch/arm/mach-octeontx/cpu.c
arch/arm/mach-octeontx2/cpu.c
arch/arm/mach-omap2/omap5/hwinit.c
arch/arm/mach-omap2/reset.c
arch/arm/mach-orion5x/cpu.c
arch/arm/mach-owl/soc.c
arch/arm/mach-socfpga/include/mach/reset_manager.h
arch/arm/mach-sunxi/board.c
arch/arm/mach-tegra/cmd_enterrcm.c
arch/arm/mach-tegra/pmc.c
arch/arm/mach-uniphier/arm32/psci.c
arch/arm/mach-uniphier/reset.c
arch/arm/mach-zynq/cpu.c
arch/arm/mach-zynqmp-r5/cpu.c
arch/nds32/cpu/n1213/ag101/cpu.c
arch/nds32/lib/interrupts.c
arch/sandbox/cpu/sdl.c
arch/sh/cpu/sh4/cpu.c
arch/sh/cpu/sh4/watchdog.c
arch/x86/cpu/ivybridge/cpu.c
board/BuR/brppt2/board.c
board/abilis/tb100/tb100.c
board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
board/armltd/total_compute/total_compute.c
board/armltd/vexpress/vexpress_common.c
board/armltd/vexpress64/vexpress64.c
board/atmark-techno/armadillo-800eva/armadillo-800eva.c
board/beacon/beacon-rzg2m/beacon-rzg2m.c
board/bosch/shc/board.c
board/broadcom/bcmns2/northstar2.c
board/broadcom/bcmns3/ns3.c
board/broadcom/bcmstb/bcmstb.c
board/cavium/thunderx/thunderx.c
board/compulab/cm_t335/spl.c
board/cortina/presidio-asic/presidio.c
board/freescale/imx8qm_mek/imx8qm_mek.c
board/freescale/imx8qxp_mek/imx8qxp_mek.c
board/freescale/mx6memcal/spl.c
board/ge/b1x5v2/spl.c
board/highbank/highbank.c
board/hisilicon/hikey/hikey.c
board/hisilicon/hikey960/hikey960.c
board/hisilicon/poplar/poplar.c
board/kmc/kzm9g/kzm9g.c
board/liebherr/display5/spl.c
board/phytium/durian/durian.c
board/qualcomm/dragonboard410c/dragonboard410c.c
board/qualcomm/dragonboard820c/dragonboard820c.c
board/renesas/alt/alt.c
board/renesas/alt/alt_spl.c
board/renesas/blanche/blanche.c
board/renesas/condor/condor.c
board/renesas/draak/draak.c
board/renesas/eagle/eagle.c
board/renesas/ebisu/ebisu.c
board/renesas/gose/gose.c
board/renesas/gose/gose_spl.c
board/renesas/grpeach/grpeach.c
board/renesas/koelsch/koelsch.c
board/renesas/koelsch/koelsch_spl.c
board/renesas/lager/lager.c
board/renesas/lager/lager_spl.c
board/renesas/porter/porter.c
board/renesas/porter/porter_spl.c
board/renesas/rcar-common/gen3-spl.c
board/renesas/salvator-x/salvator-x.c
board/renesas/silk/silk.c
board/renesas/silk/silk_spl.c
board/renesas/stout/cpld.c
board/renesas/stout/stout_spl.c
board/siemens/capricorn/board.c
board/synopsys/emsdp/emsdp.c
board/synopsys/iot_devkit/iot_devkit.c
board/technexion/pico-imx6ul/spl.c
board/technexion/pico-imx7d/spl.c
board/toradex/apalis-imx8/apalis-imx8.c
board/toradex/apalis-imx8x/apalis-imx8x.c
board/toradex/apalis_imx6/apalis_imx6.c
board/toradex/colibri-imx8x/colibri-imx8x.c
board/toradex/colibri_imx6/colibri_imx6.c
board/toradex/colibri_imx7/colibri_imx7.c
board/xen/xenguest_arm64/xenguest_arm64.c
board/xilinx/versal/board.c
board/xilinx/zynqmp/zynqmp.c
cmd/tpm_test.c
drivers/sysreset/sysreset-uclass.c
drivers/watchdog/imx_watchdog.c
drivers/watchdog/ulp_wdog.c
include/cpu_func.h
include/sysreset.h