From 654548838bebbda54247e122f932b01c3d5c51b3 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Tue, 1 Sep 2020 21:17:24 +0000 Subject: [PATCH] arm: clean up empty lines in .c and .h files --- sys/arm/allwinner/a10/a10_intc.c | 1 - sys/arm/allwinner/a10_ahci.c | 2 +- sys/arm/allwinner/a10_codec.c | 3 - sys/arm/allwinner/a10_hdmiaudio.c | 2 - sys/arm/allwinner/a10_sramc.c | 1 - sys/arm/allwinner/a20/a20_cpu_cfg.c | 1 - sys/arm/allwinner/aw_dwc3.c | 1 - sys/arm/allwinner/aw_machdep.c | 2 - sys/arm/allwinner/aw_mmc.c | 2 - sys/arm/allwinner/aw_rtc.c | 8 +- sys/arm/allwinner/aw_usbphy.c | 1 - sys/arm/allwinner/aw_wdog.c | 2 +- sys/arm/allwinner/aw_wdog.h | 1 - sys/arm/allwinner/axp209.c | 1 - sys/arm/allwinner/axp209reg.h | 1 - sys/arm/allwinner/axp81x.c | 1 - sys/arm/allwinner/clkng/ccu_a10.c | 1 - sys/arm/allwinner/clkng/ccu_a13.c | 1 - sys/arm/allwinner/clkng/ccu_a31.c | 1 - sys/arm/allwinner/clkng/ccu_a83t.c | 1 - sys/arm/allwinner/if_emac.c | 3 +- sys/arm/altera/socfpga/socfpga_a10_manager.c | 1 - sys/arm/altera/socfpga/socfpga_common.c | 1 - sys/arm/amlogic/aml8726/aml8726_ccm.c | 1 - sys/arm/amlogic/aml8726/aml8726_ccm.h | 5 - sys/arm/amlogic/aml8726/aml8726_clkmsr.c | 2 - sys/arm/amlogic/aml8726/aml8726_fb.c | 1 - sys/arm/amlogic/aml8726/aml8726_fb.h | 1 - sys/arm/amlogic/aml8726/aml8726_gpio.c | 1 - sys/arm/amlogic/aml8726/aml8726_i2c.c | 1 - sys/arm/amlogic/aml8726/aml8726_mmc.c | 1 - sys/arm/amlogic/aml8726/aml8726_mmc.h | 1 - sys/arm/amlogic/aml8726/aml8726_mp.c | 3 - sys/arm/amlogic/aml8726/aml8726_pinctrl.c | 2 - sys/arm/amlogic/aml8726/aml8726_pinctrl.h | 2 - sys/arm/amlogic/aml8726/aml8726_rng.c | 1 - sys/arm/amlogic/aml8726/aml8726_rtc.c | 1 - sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c | 1 - sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c | 2 +- sys/arm/amlogic/aml8726/aml8726_wdt.c | 2 - sys/arm/annapurna/alpine/alpine_ccu.c | 1 - sys/arm/annapurna/alpine/alpine_nb_service.c | 1 - sys/arm/arm/autoconf.c | 1 - sys/arm/arm/bus_space_generic.c | 1 - sys/arm/arm/busdma_machdep.c | 4 - sys/arm/arm/cpufunc.c | 3 - sys/arm/arm/cpuinfo.c | 1 - sys/arm/arm/db_interface.c | 2 - sys/arm/arm/db_trace.c | 2 - sys/arm/arm/disassem.c | 3 - sys/arm/arm/elf_machdep.c | 2 - sys/arm/arm/gdb_machdep.c | 1 - sys/arm/arm/generic_timer.c | 1 - sys/arm/arm/gic.c | 3 - sys/arm/arm/identcpu-v4.c | 1 - sys/arm/arm/identcpu-v6.c | 4 - sys/arm/arm/machdep.c | 2 - sys/arm/arm/machdep_boot.c | 2 - sys/arm/arm/machdep_ptrace.c | 3 - sys/arm/arm/mpcore_timer.c | 3 - sys/arm/arm/nexus.c | 2 - sys/arm/arm/nexusvar.h | 1 - sys/arm/arm/ofw_machdep.c | 1 - sys/arm/arm/pl310.c | 5 - sys/arm/arm/pmap-v4.c | 44 --------- sys/arm/arm/pmap-v6.c | 3 - sys/arm/arm/syscall.c | 1 - sys/arm/arm/trap-v4.c | 5 - sys/arm/arm/undefined.c | 6 +- sys/arm/arm/vfp.c | 3 - sys/arm/arm/vm_machdep.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_audio.c | 3 +- sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c | 3 - sys/arm/broadcom/bcm2835/bcm2835_fb.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_gpio.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_intr.c | 2 - sys/arm/broadcom/bcm2835/bcm2835_machdep.c | 2 - sys/arm/broadcom/bcm2835/bcm2835_mbox.c | 7 +- sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h | 2 - sys/arm/broadcom/bcm2835/bcm2835_pwm.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_sdhost.c | 5 - sys/arm/broadcom/bcm2835/bcm2835_systimer.c | 1 - sys/arm/broadcom/bcm2835/bcm2838_pci.c | 2 - sys/arm/broadcom/bcm2835/bcm2838_xhci.c | 1 - sys/arm/freescale/fsl_ocotp.c | 1 - sys/arm/freescale/imx/imx51_ccm.c | 3 - sys/arm/freescale/imx/imx51_ccmreg.h | 1 - sys/arm/freescale/imx/imx51_ipuv3.c | 2 - sys/arm/freescale/imx/imx6_anatop.c | 1 - sys/arm/freescale/imx/imx6_ccm.c | 1 - sys/arm/freescale/imx/imx6_ccmreg.h | 2 +- sys/arm/freescale/imx/imx6_mp.c | 1 - sys/arm/freescale/imx/imx6_ssi.c | 1 - sys/arm/freescale/imx/imx6_usbphy.c | 1 - sys/arm/freescale/imx/imx_console.c | 1 - sys/arm/freescale/imx/imx_gpio.c | 2 +- sys/arm/freescale/imx/imx_iomux.c | 1 - sys/arm/freescale/imx/imx_machdep.c | 1 - sys/arm/freescale/imx/imx_machdep.h | 1 - sys/arm/freescale/imx/imx_nop_usbphy.c | 1 - sys/arm/freescale/imx/imx_wdogreg.h | 1 - sys/arm/freescale/vybrid/vf_ccm.c | 1 - sys/arm/freescale/vybrid/vf_ehci.c | 1 - sys/arm/freescale/vybrid/vf_gpio.c | 2 - sys/arm/freescale/vybrid/vf_i2c.c | 2 - sys/arm/freescale/vybrid/vf_iomuxc.c | 1 - sys/arm/freescale/vybrid/vf_port.c | 1 - sys/arm/freescale/vybrid/vf_sai.c | 1 - sys/arm/include/asm.h | 1 - sys/arm/include/atomic-v4.h | 2 - sys/arm/include/atomic-v6.h | 1 - sys/arm/include/bus.h | 9 -- sys/arm/include/cpu-v4.h | 3 - sys/arm/include/cpufunc.h | 1 - sys/arm/include/cpuinfo.h | 1 - sys/arm/include/elf.h | 1 - sys/arm/include/frame.h | 3 - sys/arm/include/pcb.h | 1 - sys/arm/include/pcpu.h | 1 - sys/arm/include/pl310.h | 1 - sys/arm/include/pmap-v4.h | 1 - sys/arm/include/profile.h | 2 - sys/arm/include/ptrace.h | 1 - sys/arm/include/swi.h | 1 - sys/arm/include/undefined.h | 1 - sys/arm/include/vfp.h | 1 - sys/arm/linux/linux_proto.h | 6 -- sys/arm/mv/a37x0_gpio.c | 1 - sys/arm/mv/armada/wdt.c | 1 - sys/arm/mv/armada38x/armada38x_rtc.c | 2 - sys/arm/mv/armada38x/pmsu.c | 1 - sys/arm/mv/armadaxp/armadaxp.c | 1 - sys/arm/mv/gpio.c | 1 - sys/arm/mv/mv_ap806_clock.c | 3 - sys/arm/mv/mv_ap806_gicp.c | 3 - sys/arm/mv/mv_ap806_sei.c | 8 +- sys/arm/mv/mv_armv7_machdep.c | 1 - sys/arm/mv/mv_common.c | 12 --- sys/arm/mv/mv_cp110_clock.c | 1 - sys/arm/mv/mv_cp110_icu.c | 3 - sys/arm/mv/mv_localbus.c | 6 -- sys/arm/mv/mv_pci_ctrl.c | 1 - sys/arm/mv/mv_spi.c | 1 - sys/arm/mv/mv_thermal.c | 1 - sys/arm/mv/mvebu_gpio.c | 7 -- sys/arm/mv/mvebu_pinctrl.c | 1 - sys/arm/mv/mvwin.h | 2 - sys/arm/mv/timer.c | 1 - sys/arm/nvidia/as3722_gpio.c | 5 - sys/arm/nvidia/as3722_regulators.c | 5 - sys/arm/nvidia/drm2/hdmi.h | 2 - sys/arm/nvidia/drm2/tegra_bo.c | 2 - sys/arm/nvidia/drm2/tegra_dc.c | 6 -- sys/arm/nvidia/drm2/tegra_dc_reg.h | 2 - sys/arm/nvidia/drm2/tegra_drm.h | 1 - sys/arm/nvidia/drm2/tegra_hdmi.c | 6 -- sys/arm/nvidia/drm2/tegra_hdmi_reg.h | 2 - sys/arm/nvidia/drm2/tegra_host1x.c | 5 - sys/arm/nvidia/tegra124/tegra124_car.c | 6 -- sys/arm/nvidia/tegra124/tegra124_car.h | 3 +- sys/arm/nvidia/tegra124/tegra124_clk_per.c | 3 - sys/arm/nvidia/tegra124/tegra124_clk_pll.c | 4 - sys/arm/nvidia/tegra124/tegra124_clk_super.c | 1 - sys/arm/nvidia/tegra124/tegra124_coretemp.c | 5 - sys/arm/nvidia/tegra124/tegra124_cpufreq.c | 4 - sys/arm/nvidia/tegra124/tegra124_mp.c | 2 - sys/arm/nvidia/tegra124/tegra124_mp.h | 2 +- sys/arm/nvidia/tegra124/tegra124_pmc.c | 1 - sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c | 6 -- sys/arm/nvidia/tegra_abpmisc.c | 1 - sys/arm/nvidia/tegra_ahci.c | 4 - sys/arm/nvidia/tegra_efuse.c | 4 - sys/arm/nvidia/tegra_gpio.c | 3 - sys/arm/nvidia/tegra_i2c.c | 1 - sys/arm/nvidia/tegra_lic.c | 2 - sys/arm/nvidia/tegra_mc.c | 1 - sys/arm/nvidia/tegra_pcie.c | 12 --- sys/arm/nvidia/tegra_pinmux.c | 3 - sys/arm/nvidia/tegra_rtc.c | 2 - sys/arm/nvidia/tegra_soctherm.c | 6 -- sys/arm/nvidia/tegra_uart.c | 1 - sys/arm/nvidia/tegra_usbphy.c | 6 -- sys/arm/nvidia/tegra_xhci.c | 4 - sys/arm/rockchip/rk30xx_gpio.c | 2 - sys/arm/rockchip/rk30xx_grf.c | 1 - sys/arm/rockchip/rk30xx_machdep.c | 2 +- sys/arm/rockchip/rk30xx_pmu.c | 1 - sys/arm/rockchip/rk30xx_wdog.h | 1 - sys/arm/samsung/exynos/chrome_kb.c | 3 - sys/arm/samsung/exynos/exynos5_ehci.c | 1 - sys/arm/samsung/exynos/exynos5_i2c.c | 2 - sys/arm/samsung/exynos/exynos5_pad.c | 2 - sys/arm/samsung/exynos/exynos5_spi.c | 2 - sys/arm/samsung/exynos/exynos5_xhci.c | 4 +- sys/arm/samsung/exynos/exynos_uart.c | 1 - sys/arm/ti/aintc.c | 2 - sys/arm/ti/am335x/am3359_cppi41.c | 2 - sys/arm/ti/am335x/am335x_ecap.c | 1 - sys/arm/ti/am335x/am335x_ehrpwm.c | 3 +- sys/arm/ti/am335x/am335x_lcd_syscons.c | 1 - sys/arm/ti/am335x/am335x_reg.h | 1 - sys/arm/ti/am335x/tda19988.c | 2 +- sys/arm/ti/clk/ti_clk_dpll.c | 1 - sys/arm/ti/clk/ti_clk_dpll.h | 1 - sys/arm/ti/clk/ti_clkctrl.c | 1 - sys/arm/ti/cpsw/if_cpsw.c | 2 +- sys/arm/ti/omap4/omap4_prcm_clks.c | 92 +++++++++---------- sys/arm/ti/omap4/omap4_reg.h | 46 ---------- sys/arm/ti/omap4/omap4_scm_padconf.c | 1 - sys/arm/ti/omap4/omap4_wugen.c | 1 - sys/arm/ti/omap4/pandaboard/pandaboard.c | 7 +- sys/arm/ti/omap4/pandaboard/pandaboard.h | 1 - sys/arm/ti/ti_adc.c | 1 - sys/arm/ti/ti_edma3.c | 1 - sys/arm/ti/ti_i2c.c | 1 - sys/arm/ti/ti_omap4_cm.c | 1 - sys/arm/ti/ti_pinmux.c | 3 - sys/arm/ti/ti_pinmux.h | 1 - sys/arm/ti/ti_prcm.c | 1 - sys/arm/ti/ti_scm.c | 2 - sys/arm/ti/ti_scm.h | 1 - sys/arm/ti/ti_scm_syscon.c | 1 - sys/arm/ti/ti_sdhci.c | 3 +- sys/arm/ti/ti_sdma.c | 4 - sys/arm/ti/ti_smc.h | 1 - sys/arm/ti/twl/twl.c | 9 +- sys/arm/ti/twl/twl_clks.c | 31 +------ sys/arm/ti/twl/twl_clks.h | 2 - sys/arm/ti/twl/twl_vreg.c | 38 ++------ sys/arm/ti/twl/twl_vreg.h | 1 - sys/arm/ti/usb/omap_ehci.c | 29 +++--- sys/arm/ti/usb/omap_host.c | 1 - sys/arm/ti/usb/omap_tll.c | 2 - sys/arm/versatile/versatile_clcd.c | 3 +- sys/arm/versatile/versatile_common.c | 1 - sys/arm/versatile/versatile_machdep.c | 1 - sys/arm/xilinx/uart_dev_cdnc.c | 8 +- sys/arm/xilinx/zy7_devcfg.c | 2 +- sys/arm/xilinx/zy7_ehci.c | 7 +- sys/arm/xilinx/zy7_gpio.c | 1 - sys/arm/xilinx/zy7_qspi.c | 9 -- sys/arm/xilinx/zy7_reg.h | 1 - sys/arm/xilinx/zy7_spi.c | 10 -- 243 files changed, 100 insertions(+), 725 deletions(-) diff --git a/sys/arm/allwinner/a10/a10_intc.c b/sys/arm/allwinner/a10/a10_intc.c index f1319e91c025..28cc245c7254 100644 --- a/sys/arm/allwinner/a10/a10_intc.c +++ b/sys/arm/allwinner/a10/a10_intc.c @@ -375,7 +375,6 @@ static device_method_t a10_aintc_methods[] = { DEVMETHOD(pic_post_filter, a10_intr_post_filter), DEVMETHOD(pic_post_ithread, a10_intr_post_ithread), DEVMETHOD(pic_pre_ithread, a10_intr_pre_ithread), - { 0, 0 } }; diff --git a/sys/arm/allwinner/a10_ahci.c b/sys/arm/allwinner/a10_ahci.c index 64afdbf4230b..399f17b079ef 100644 --- a/sys/arm/allwinner/a10_ahci.c +++ b/sys/arm/allwinner/a10_ahci.c @@ -355,7 +355,7 @@ ahci_a10_attach(device_t dev) device_printf(dev, "Cannot enable clk gate\n"); goto fail; } - + /* Reset controller */ if ((error = ahci_a10_ctlr_reset(dev)) != 0) goto fail; diff --git a/sys/arm/allwinner/a10_codec.c b/sys/arm/allwinner/a10_codec.c index ad21ced20cc9..0780a7328bbe 100644 --- a/sys/arm/allwinner/a10_codec.c +++ b/sys/arm/allwinner/a10_codec.c @@ -367,7 +367,6 @@ static kobj_method_t a10_mixer_methods[] = { }; MIXER_DECLARE(a10_mixer); - /* * H3 mixer interface */ @@ -620,7 +619,6 @@ static kobj_method_t h3_mixer_methods[] = { }; MIXER_DECLARE(h3_mixer); - /* * Channel interface */ @@ -1010,7 +1008,6 @@ static kobj_method_t a10codec_chan_methods[] = { }; CHANNEL_DECLARE(a10codec_chan); - /* * Device interface */ diff --git a/sys/arm/allwinner/a10_hdmiaudio.c b/sys/arm/allwinner/a10_hdmiaudio.c index 5defedd9fc8a..13e58ce8642b 100644 --- a/sys/arm/allwinner/a10_hdmiaudio.c +++ b/sys/arm/allwinner/a10_hdmiaudio.c @@ -126,7 +126,6 @@ static kobj_method_t a10hdmiaudio_mixer_methods[] = { }; MIXER_DECLARE(a10hdmiaudio_mixer); - /* * Channel interface */ @@ -345,7 +344,6 @@ static kobj_method_t a10hdmiaudio_chan_methods[] = { }; CHANNEL_DECLARE(a10hdmiaudio_chan); - /* * Device interface */ diff --git a/sys/arm/allwinner/a10_sramc.c b/sys/arm/allwinner/a10_sramc.c index 61e66e0ad27f..2227b12c3674 100644 --- a/sys/arm/allwinner/a10_sramc.c +++ b/sys/arm/allwinner/a10_sramc.c @@ -68,7 +68,6 @@ static struct a10_sramc_softc *a10_sramc_sc; #define sramc_write_4(sc, reg, val) \ bus_space_write_4((sc)->bst, (sc)->bsh, (reg), (val)) - static int a10_sramc_probe(device_t dev) { diff --git a/sys/arm/allwinner/a20/a20_cpu_cfg.c b/sys/arm/allwinner/a20/a20_cpu_cfg.c index 3b340a586268..d26b30cd9449 100644 --- a/sys/arm/allwinner/a20/a20_cpu_cfg.c +++ b/sys/arm/allwinner/a20/a20_cpu_cfg.c @@ -136,4 +136,3 @@ a20_read_counter64(void) return (((uint64_t)hi << 32) | lo); } - diff --git a/sys/arm/allwinner/aw_dwc3.c b/sys/arm/allwinner/aw_dwc3.c index 97ec2cbe21b7..6f15fe18d10e 100644 --- a/sys/arm/allwinner/aw_dwc3.c +++ b/sys/arm/allwinner/aw_dwc3.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include - #include #include diff --git a/sys/arm/allwinner/aw_machdep.c b/sys/arm/allwinner/aw_machdep.c index 45a62d9af7e0..688012d5f14c 100644 --- a/sys/arm/allwinner/aw_machdep.c +++ b/sys/arm/allwinner/aw_machdep.c @@ -291,8 +291,6 @@ static platform_method_t h3_methods[] = { FDT_PLATFORM_DEF(h3, "h3", 0, "allwinner,sun8i-h3", 200); #endif - - u_int allwinner_soc_type(void) { diff --git a/sys/arm/allwinner/aw_mmc.c b/sys/arm/allwinner/aw_mmc.c index dd3992771375..acfd165b5554 100644 --- a/sys/arm/allwinner/aw_mmc.c +++ b/sys/arm/allwinner/aw_mmc.c @@ -951,7 +951,6 @@ aw_mmc_req_ok(struct aw_mmc_softc *sc) aw_mmc_req_done(sc); } - static inline void set_mmc_error(struct aw_mmc_softc *sc, int error_code) { @@ -1500,7 +1499,6 @@ aw_mmc_update_ios(device_t bus, device_t child) return (error); } - return (0); } diff --git a/sys/arm/allwinner/aw_rtc.c b/sys/arm/allwinner/aw_rtc.c index 6310c185009f..5b7c2a18f3e4 100644 --- a/sys/arm/allwinner/aw_rtc.c +++ b/sys/arm/allwinner/aw_rtc.c @@ -235,7 +235,7 @@ aw_rtc_attach(device_t dev) aw_rtc_install_clocks(sc, dev); clock_register(dev, RTC_RES_US); - + return (0); } @@ -290,7 +290,7 @@ aw_rtc_gettime(device_t dev, struct timespec *ts) rdate = RTC_READ(sc, sc->conf->rtc_date); rtime = RTC_READ(sc, sc->conf->rtc_time); - + if ((rtime & TIME_MASK) == 0) rdate = RTC_READ(sc, sc->conf->rtc_date); @@ -303,7 +303,7 @@ aw_rtc_gettime(device_t dev, struct timespec *ts) ct.dow = -1; /* RTC resolution is 1 sec */ ct.nsec = 0; - + return (clock_ct_to_ts(&ct, ts)); } @@ -320,7 +320,7 @@ aw_rtc_settime(device_t dev, struct timespec *ts) ts->tv_nsec = 0; clock_ts_to_ct(ts, &ct); - + if ((ct.year < YEAR_MIN) || (ct.year > YEAR_MAX)) { device_printf(dev, "could not set time, year out of range\n"); return (EINVAL); diff --git a/sys/arm/allwinner/aw_usbphy.c b/sys/arm/allwinner/aw_usbphy.c index f97fa5c1b945..7a4782f6d91a 100644 --- a/sys/arm/allwinner/aw_usbphy.c +++ b/sys/arm/allwinner/aw_usbphy.c @@ -432,7 +432,6 @@ awusbphy_set_mode(struct phynode *phynode, int mode) sc->mode = mode; - out: return (0); } diff --git a/sys/arm/allwinner/aw_wdog.c b/sys/arm/allwinner/aw_wdog.c index 5824fb96062f..0fc5895eff9f 100644 --- a/sys/arm/allwinner/aw_wdog.c +++ b/sys/arm/allwinner/aw_wdog.c @@ -176,7 +176,7 @@ aw_wdog_attach(device_t dev) EVENTHANDLER_REGISTER(watchdog_list, aw_wdog_watchdog_fn, sc, 0); EVENTHANDLER_REGISTER(shutdown_final, aw_wdog_shutdown_fn, sc, SHUTDOWN_PRI_LAST - 1); - + return (0); } diff --git a/sys/arm/allwinner/aw_wdog.h b/sys/arm/allwinner/aw_wdog.h index 7312a203e4c5..1aac03ae8c30 100644 --- a/sys/arm/allwinner/aw_wdog.h +++ b/sys/arm/allwinner/aw_wdog.h @@ -32,4 +32,3 @@ void aw_wdog_watchdog_reset(void); #endif /*__AW_WDOG_H__*/ - diff --git a/sys/arm/allwinner/axp209.c b/sys/arm/allwinner/axp209.c index c741e8b0082a..c4d2181e2ec7 100644 --- a/sys/arm/allwinner/axp209.c +++ b/sys/arm/allwinner/axp209.c @@ -1075,7 +1075,6 @@ axp2xx_gpio_pin_set(device_t dev, uint32_t pin, unsigned int val) return (error); } - static int axp2xx_gpio_pin_toggle(device_t dev, uint32_t pin) { diff --git a/sys/arm/allwinner/axp209reg.h b/sys/arm/allwinner/axp209reg.h index 46b5f9e2305c..d6be123c5281 100644 --- a/sys/arm/allwinner/axp209reg.h +++ b/sys/arm/allwinner/axp209reg.h @@ -204,7 +204,6 @@ #define AXP221_REG_ALDO2_VOLTAGE 0x29 #define AXP221_REG_ALDO3_VOLTAGE 0x2A - enum axp2xx_sensor { AXP209_ACVOLT, AXP209_ACCURRENT, diff --git a/sys/arm/allwinner/axp81x.c b/sys/arm/allwinner/axp81x.c index c701e179c492..85971a7773c4 100644 --- a/sys/arm/allwinner/axp81x.c +++ b/sys/arm/allwinner/axp81x.c @@ -1317,7 +1317,6 @@ axp8xx_gpio_pin_set(device_t dev, uint32_t pin, unsigned int val) return (error); } - static int axp8xx_gpio_pin_toggle(device_t dev, uint32_t pin) { diff --git a/sys/arm/allwinner/clkng/ccu_a10.c b/sys/arm/allwinner/clkng/ccu_a10.c index f727461064b8..288ac10b43f5 100644 --- a/sys/arm/allwinner/clkng/ccu_a10.c +++ b/sys/arm/allwinner/clkng/ccu_a10.c @@ -300,7 +300,6 @@ NM_CLK(apb1_clk, 0, /* gate */ AW_CLK_HAS_MUX); /* flags */ - NKMP_CLK(pll_ddr_other_clk, CLK_PLL_DDR_OTHER, /* id */ "pll_ddr_other", pll_parents, /* name, parents */ diff --git a/sys/arm/allwinner/clkng/ccu_a13.c b/sys/arm/allwinner/clkng/ccu_a13.c index 0b57c4a994aa..dbe4e1364f14 100644 --- a/sys/arm/allwinner/clkng/ccu_a13.c +++ b/sys/arm/allwinner/clkng/ccu_a13.c @@ -498,7 +498,6 @@ static struct aw_clk_nm_def ir_clk = { /* Missing CSI clock */ /* Missing VE clock */ - /* Clocks list */ static struct aw_ccung_clk a13_ccu_clks[] = { { .type = AW_CLK_NKMP, .clk.nkmp = &pll_core}, diff --git a/sys/arm/allwinner/clkng/ccu_a31.c b/sys/arm/allwinner/clkng/ccu_a31.c index 3cfaecf0c268..b19bebfe1786 100644 --- a/sys/arm/allwinner/clkng/ccu_a31.c +++ b/sys/arm/allwinner/clkng/ccu_a31.c @@ -608,7 +608,6 @@ NM_CLK(spi3_clk, 31, /* gate */ AW_CLK_HAS_GATE | AW_CLK_HAS_MUX); /* flags */ - static const char *daudio_parents[] = {"pll_audio-8x", "pll_audio-4x", "pll_audio-2x", "pll_audio"}; MUX_CLK(daudio0mux_clk, 0, diff --git a/sys/arm/allwinner/clkng/ccu_a83t.c b/sys/arm/allwinner/clkng/ccu_a83t.c index d93f53c13ba7..bf8dcb13399a 100644 --- a/sys/arm/allwinner/clkng/ccu_a83t.c +++ b/sys/arm/allwinner/clkng/ccu_a83t.c @@ -81,7 +81,6 @@ __FBSDID("$FreeBSD$"); /* Non-exported fixed clocks */ #define CLK_OSC_12M 150 - static struct aw_ccung_reset a83t_ccu_resets[] = { CCU_RESET(RST_USB_PHY0, 0xcc, 0) CCU_RESET(RST_USB_PHY1, 0xcc, 1) diff --git a/sys/arm/allwinner/if_emac.c b/sys/arm/allwinner/if_emac.c index 3ff252e309f8..73e7e889916a 100644 --- a/sys/arm/allwinner/if_emac.c +++ b/sys/arm/allwinner/if_emac.c @@ -467,7 +467,7 @@ emac_watchdog(struct emac_softc *sc) "(missed link)\n"); } else if_printf(sc->emac_ifp, "watchdog timeout -- resetting\n"); - + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; emac_init_locked(sc); @@ -602,7 +602,6 @@ emac_init_locked(struct emac_softc *sc) callout_reset(&sc->emac_tick_ch, hz, emac_tick, sc); } - static void emac_start(struct ifnet *ifp) { diff --git a/sys/arm/altera/socfpga/socfpga_a10_manager.c b/sys/arm/altera/socfpga/socfpga_a10_manager.c index d76457765737..8ccaa4b6b473 100644 --- a/sys/arm/altera/socfpga/socfpga_a10_manager.c +++ b/sys/arm/altera/socfpga/socfpga_a10_manager.c @@ -141,7 +141,6 @@ fpga_wait_dclk_pulses(struct fpgamgr_a10_softc *sc, int npulses) return (0); } - static int fpga_open(struct cdev *dev, int flags __unused, int fmt __unused, struct thread *td __unused) diff --git a/sys/arm/altera/socfpga/socfpga_common.c b/sys/arm/altera/socfpga/socfpga_common.c index 1017f3e71d00..2d466275ff16 100644 --- a/sys/arm/altera/socfpga/socfpga_common.c +++ b/sys/arm/altera/socfpga/socfpga_common.c @@ -42,4 +42,3 @@ __FBSDID("$FreeBSD$"); #include #include - diff --git a/sys/arm/amlogic/aml8726/aml8726_ccm.c b/sys/arm/amlogic/aml8726/aml8726_ccm.c index 6fbc192a5350..9013b0545ad8 100644 --- a/sys/arm/amlogic/aml8726/aml8726_ccm.c +++ b/sys/arm/amlogic/aml8726/aml8726_ccm.c @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include - struct aml8726_ccm_softc { device_t dev; struct aml8726_ccm_function *soc; diff --git a/sys/arm/amlogic/aml8726/aml8726_ccm.h b/sys/arm/amlogic/aml8726/aml8726_ccm.h index e2edc299639a..95a24b7cf590 100644 --- a/sys/arm/amlogic/aml8726/aml8726_ccm.h +++ b/sys/arm/amlogic/aml8726/aml8726_ccm.h @@ -29,7 +29,6 @@ #ifndef _ARM_AMLOGIC_AML8726_CCM_H #define _ARM_AMLOGIC_AML8726_CCM_H - struct aml8726_ccm_gate { uint32_t addr; uint32_t bits; @@ -40,7 +39,6 @@ struct aml8726_ccm_function { struct aml8726_ccm_gate *gates; }; - /* * aml8726-m3 */ @@ -109,7 +107,6 @@ struct aml8726_ccm_function aml8726_m3_ccm[] = { { NULL } }; - /* * aml8726-m6 */ @@ -178,7 +175,6 @@ struct aml8726_ccm_function aml8726_m6_ccm[] = { { NULL } }; - /* * aml8726-m8 */ @@ -250,7 +246,6 @@ struct aml8726_ccm_function aml8726_m8_ccm[] = { { NULL } }; - /* * aml8726-m8b */ diff --git a/sys/arm/amlogic/aml8726/aml8726_clkmsr.c b/sys/arm/amlogic/aml8726/aml8726_clkmsr.c index 0cfbf775a352..3cce632405a3 100644 --- a/sys/arm/amlogic/aml8726/aml8726_clkmsr.c +++ b/sys/arm/amlogic/aml8726/aml8726_clkmsr.c @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include - static struct aml8726_clkmsr_clk { const char * name; uint32_t mux; @@ -217,7 +216,6 @@ aml8726_clkmsr_detach(device_t dev) return (0); } - static device_method_t aml8726_clkmsr_methods[] = { /* Device interface */ DEVMETHOD(device_probe, aml8726_clkmsr_probe), diff --git a/sys/arm/amlogic/aml8726/aml8726_fb.c b/sys/arm/amlogic/aml8726/aml8726_fb.c index f2fc36de5caa..d6c48b6cd770 100644 --- a/sys/arm/amlogic/aml8726/aml8726_fb.c +++ b/sys/arm/amlogic/aml8726/aml8726_fb.c @@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$"); #include "fb_if.h" - enum aml8726_fb_output { aml8726_unknown_fb_output, aml8726_cvbs_fb_output, diff --git a/sys/arm/amlogic/aml8726/aml8726_fb.h b/sys/arm/amlogic/aml8726/aml8726_fb.h index f6d780ff47ff..7ce58dcd68a7 100644 --- a/sys/arm/amlogic/aml8726/aml8726_fb.h +++ b/sys/arm/amlogic/aml8726/aml8726_fb.h @@ -29,7 +29,6 @@ #ifndef _ARM_AMLOGIC_AML8726_FB_H #define _ARM_AMLOGIC_AML8726_FB_H - #define AML_CAV_OSD1_INDEX 0x40 #define AML_CAV_LUT_DATAL_REG 0 diff --git a/sys/arm/amlogic/aml8726/aml8726_gpio.c b/sys/arm/amlogic/aml8726/aml8726_gpio.c index df26d91ee49a..ff2d6c8ce33f 100644 --- a/sys/arm/amlogic/aml8726/aml8726_gpio.c +++ b/sys/arm/amlogic/aml8726/aml8726_gpio.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" - struct aml8726_gpio_softc { device_t dev; struct resource *res[3]; diff --git a/sys/arm/amlogic/aml8726/aml8726_i2c.c b/sys/arm/amlogic/aml8726/aml8726_i2c.c index 7fd8d71cea43..c7b9e4916fe0 100644 --- a/sys/arm/amlogic/aml8726/aml8726_i2c.c +++ b/sys/arm/amlogic/aml8726/aml8726_i2c.c @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include "iicbb_if.h" - struct aml8726_iic_softc { device_t dev; struct resource *res[1]; diff --git a/sys/arm/amlogic/aml8726/aml8726_mmc.c b/sys/arm/amlogic/aml8726/aml8726_mmc.c index 1a9c8afae4c7..b204ab930946 100644 --- a/sys/arm/amlogic/aml8726/aml8726_mmc.c +++ b/sys/arm/amlogic/aml8726/aml8726_mmc.c @@ -485,7 +485,6 @@ aml8726_mmc_intr(void *arg) CSR_WRITE_4(sc, AML_MMC_MULT_CONFIG_REG, mcfgr); if ((cmdr & AML_MMC_CMD_RESP_CRC7_FROM_8) != 0) { - /* * Controller supplies 135:8 instead of * 127:0 so discard the leading 8 bits diff --git a/sys/arm/amlogic/aml8726/aml8726_mmc.h b/sys/arm/amlogic/aml8726/aml8726_mmc.h index a2dde213ecc1..b24c43c79f36 100644 --- a/sys/arm/amlogic/aml8726/aml8726_mmc.h +++ b/sys/arm/amlogic/aml8726/aml8726_mmc.h @@ -29,7 +29,6 @@ #ifndef _ARM_AMLOGIC_AML8726_MMC_H #define _ARM_AMLOGIC_AML8726_MMC_H - #define AML_MMC_ALIGN_DMA 4 #define AML_MMC_MAX_DMA 4096 diff --git a/sys/arm/amlogic/aml8726/aml8726_mp.c b/sys/arm/amlogic/aml8726/aml8726_mp.c index 858445c8110c..eb536d9c88ee 100644 --- a/sys/arm/amlogic/aml8726/aml8726_mp.c +++ b/sys/arm/amlogic/aml8726/aml8726_mp.c @@ -198,7 +198,6 @@ find_node_for_device(const char *device, const char **compatible) return (0); } - static int alloc_resource_for_node(phandle_t node, struct resource *res, u_long *size) { @@ -221,7 +220,6 @@ alloc_resource_for_node(phandle_t node, struct resource *res, u_long *size) return (err); } - static void power_on_cpu(int cpu) { @@ -375,7 +373,6 @@ platform_mp_setmaxid(void) &aml8726_smp.cpucfg_size) != 0) panic("Could not allocate resource for CPUCONFIG"); - /* * Strictly speaking the aobus and cbus may not be required in * order to start an AP (it depends on the processor), however diff --git a/sys/arm/amlogic/aml8726/aml8726_pinctrl.c b/sys/arm/amlogic/aml8726/aml8726_pinctrl.c index ad608b34fa75..be77f8fb9234 100644 --- a/sys/arm/amlogic/aml8726/aml8726_pinctrl.c +++ b/sys/arm/amlogic/aml8726/aml8726_pinctrl.c @@ -172,7 +172,6 @@ aml8726_pinctrl_detach(device_t dev) return (0); } - static int aml8726_pinctrl_configure_pins(device_t dev, phandle_t cfgxref) { @@ -407,7 +406,6 @@ aml8726_pinctrl_configure_pins(device_t dev, phandle_t cfgxref) return (0); } - static device_method_t aml8726_pinctrl_methods[] = { /* Device interface */ DEVMETHOD(device_probe, aml8726_pinctrl_probe), diff --git a/sys/arm/amlogic/aml8726/aml8726_pinctrl.h b/sys/arm/amlogic/aml8726/aml8726_pinctrl.h index 04d90a532b36..a38f716ef302 100644 --- a/sys/arm/amlogic/aml8726/aml8726_pinctrl.h +++ b/sys/arm/amlogic/aml8726/aml8726_pinctrl.h @@ -525,7 +525,6 @@ struct aml8726_pinctrl_function aml8726_m6_pinctrl[] = { { NULL } }; - /* * aml8726-m8 * @@ -797,7 +796,6 @@ struct aml8726_pinctrl_function aml8726_m8_pinctrl[] = { { NULL } }; - /* * aml8726-m8b * diff --git a/sys/arm/amlogic/aml8726/aml8726_rng.c b/sys/arm/amlogic/aml8726/aml8726_rng.c index d0cc0cf8722e..da8396576b2d 100644 --- a/sys/arm/amlogic/aml8726/aml8726_rng.c +++ b/sys/arm/amlogic/aml8726/aml8726_rng.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include - struct aml8726_rng_softc { device_t dev; struct resource *res[1]; diff --git a/sys/arm/amlogic/aml8726/aml8726_rtc.c b/sys/arm/amlogic/aml8726/aml8726_rtc.c index 6ed8d7b77525..c525d9e4a301 100644 --- a/sys/arm/amlogic/aml8726/aml8726_rtc.c +++ b/sys/arm/amlogic/aml8726/aml8726_rtc.c @@ -290,7 +290,6 @@ aml8726_rtc_initialize(struct aml8726_rtc_softc *sc) if (sc->init.always == TRUE || (CSR_READ_4(sc, AML_RTC_1_REG) & AML_RTC_SRDY) == 0) { - /* * The RTC has a 16 bit initialization register. The upper * bits can be written directly. The lower bits are written diff --git a/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c b/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c index 7874edfb4eb7..3c599cf3579a 100644 --- a/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c +++ b/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c @@ -480,7 +480,6 @@ aml8726_sdxc_finish_command(struct aml8726_sdxc_softc *sc, int mmc_error) stop_cmd = (cmd->mrq->stop != cmd) ? cmd->mrq->stop : NULL; if (stop_cmd != NULL) { - /* * If the original command executed successfully, then * the hardware will also have automatically executed diff --git a/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c b/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c index 5f7b495ec70a..1ac4deadf0ca 100644 --- a/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c +++ b/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c @@ -116,7 +116,7 @@ aml8726_usb_phy_mode(const char *dwcotg_path, uint32_t *mode) char *usb_mode; phandle_t node; ssize_t len; - + if ((node = OF_finddevice(dwcotg_path)) == -1) return (ENXIO); diff --git a/sys/arm/amlogic/aml8726/aml8726_wdt.c b/sys/arm/amlogic/aml8726/aml8726_wdt.c index d3f0eec6b4f1..8219684c0435 100644 --- a/sys/arm/amlogic/aml8726/aml8726_wdt.c +++ b/sys/arm/amlogic/aml8726/aml8726_wdt.c @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include - struct aml8726_wdt_softc { device_t dev; struct resource * res[2]; @@ -115,7 +114,6 @@ aml8726_wdt_watchdog(void *private, u_int cmd, int *error) if (cmd != 0 && tens_of_usec <= (AML_WDT_CTRL_TERMINAL_CNT_MASK >> AML_WDT_CTRL_TERMINAL_CNT_SHIFT)) { - wcr = AML_WDT_CTRL_CPU_WDRESET_MASK | AML_WDT_CTRL_EN | ((uint32_t)tens_of_usec << AML_WDT_CTRL_TERMINAL_CNT_SHIFT); diff --git a/sys/arm/annapurna/alpine/alpine_ccu.c b/sys/arm/annapurna/alpine/alpine_ccu.c index 19dc57a6dc53..1e99cb5bf67e 100644 --- a/sys/arm/annapurna/alpine/alpine_ccu.c +++ b/sys/arm/annapurna/alpine/alpine_ccu.c @@ -62,7 +62,6 @@ static device_method_t al_ccu_methods[] = { DEVMETHOD(device_probe, al_ccu_probe), DEVMETHOD(device_attach, al_ccu_attach), DEVMETHOD(device_detach, al_ccu_detach), - { 0, 0 } }; diff --git a/sys/arm/annapurna/alpine/alpine_nb_service.c b/sys/arm/annapurna/alpine/alpine_nb_service.c index 3725cd340f33..156d8e406df5 100644 --- a/sys/arm/annapurna/alpine/alpine_nb_service.c +++ b/sys/arm/annapurna/alpine/alpine_nb_service.c @@ -61,7 +61,6 @@ static device_method_t nb_service_methods[] = { DEVMETHOD(device_probe, nb_service_probe), DEVMETHOD(device_attach, nb_service_attach), DEVMETHOD(device_detach, nb_service_detach), - { 0, 0 } }; diff --git a/sys/arm/arm/autoconf.c b/sys/arm/arm/autoconf.c index 3b9036200406..672575b75701 100644 --- a/sys/arm/arm/autoconf.c +++ b/sys/arm/arm/autoconf.c @@ -74,7 +74,6 @@ SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_final, NULL); device_t nexus_dev; - /* * Determine i/o configuration for a machine. */ diff --git a/sys/arm/arm/bus_space_generic.c b/sys/arm/arm/bus_space_generic.c index ecca1f65f197..f4bf434d6f5f 100644 --- a/sys/arm/arm/bus_space_generic.c +++ b/sys/arm/arm/bus_space_generic.c @@ -91,7 +91,6 @@ generic_bs_alloc(bus_space_tag_t t, bus_addr_t rstart, bus_addr_t rend, bus_size panic("generic_bs_alloc(): not implemented"); } - void generic_bs_unmap(bus_space_tag_t t, bus_space_handle_t h, bus_size_t size) { diff --git a/sys/arm/arm/busdma_machdep.c b/sys/arm/arm/busdma_machdep.c index 5a7a80074b0d..25af44c17e6e 100644 --- a/sys/arm/arm/busdma_machdep.c +++ b/sys/arm/arm/busdma_machdep.c @@ -644,7 +644,6 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) dmat_copy = dmat; if (dmat != NULL) { - if (dmat->map_count != 0) { error = EBUSY; goto out; @@ -997,7 +996,6 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, pmap_t pmap, bus_dmamap_t map, map->pagesneeded++; } vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)); - } CTR1(KTR_BUSDMA, "pagesneeded= %d", map->pagesneeded); } @@ -1237,7 +1235,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, if (map->sync_count == 0 || (kvaddr != 0 && kvaddr != sl_vend) || (curaddr != sl_pend)) { - if (++map->sync_count > dmat->nsegments) goto cleanup; sl++; @@ -1416,7 +1413,6 @@ bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) * we're able to test direct userland dma, panic on a map mismatch. */ if ((bpage = STAILQ_FIRST(&map->bpages)) != NULL) { - CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x op 0x%x " "performing bounce", __func__, dmat, dmat->flags, op); diff --git a/sys/arm/arm/cpufunc.c b/sys/arm/arm/cpufunc.c index 4aa5a3827a66..a1bdad8037c1 100644 --- a/sys/arm/arm/cpufunc.c +++ b/sys/arm/arm/cpufunc.c @@ -196,7 +196,6 @@ struct cpu_functions sheeva_cpufuncs = { #ifdef CPU_MV_PJ4B struct cpu_functions pj4bv7_cpufuncs = { - /* Cache operations */ .cf_l2cache_wbinv_all = (void *)cpufunc_nullop, .cf_l2cache_wbinv_range = (void *)cpufunc_nullop, @@ -214,7 +213,6 @@ struct cpu_functions pj4bv7_cpufuncs = { #if defined(CPU_ARM1176) struct cpu_functions arm1176_cpufuncs = { - /* Cache operations */ .cf_l2cache_wbinv_all = (void *)cpufunc_nullop, .cf_l2cache_wbinv_range = (void *)cpufunc_nullop, @@ -232,7 +230,6 @@ struct cpu_functions arm1176_cpufuncs = { #if defined(CPU_CORTEXA) || defined(CPU_KRAIT) struct cpu_functions cortexa_cpufuncs = { - /* Cache operations */ /* diff --git a/sys/arm/arm/cpuinfo.c b/sys/arm/arm/cpuinfo.c index 0f1010dacd26..b60ba1bdc866 100644 --- a/sys/arm/arm/cpuinfo.c +++ b/sys/arm/arm/cpuinfo.c @@ -79,7 +79,6 @@ SYSCTL_INT(_hw_cpu_quirks, OID_AUTO, actlr_set, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &cpu_quirks_actlr_set, 0, "Bits to be set in ACTLR"); - /* Read and parse CPU id scheme */ void cpuinfo_init(void) diff --git a/sys/arm/arm/db_interface.c b/sys/arm/arm/db_interface.c index 1ceb29b37c8a..eeedcfcfd159 100644 --- a/sys/arm/arm/db_interface.c +++ b/sys/arm/arm/db_interface.c @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include - static int nil = 0; int db_access_und_sp (struct db_variable *, db_expr_t *, int); @@ -253,7 +252,6 @@ db_write_bytes(vm_offset_t addr, size_t size, char *data) return (0); } - static u_int db_fetch_reg(int reg) { diff --git a/sys/arm/arm/db_trace.c b/sys/arm/arm/db_trace.c index c2b1ed2d63df..195ed0f4e3d9 100644 --- a/sys/arm/arm/db_trace.c +++ b/sys/arm/arm/db_trace.c @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include - #include #include #include @@ -102,7 +101,6 @@ db_stack_trace_cmd(struct unwind_state *state) i = 0; } else sep = " "; - } } db_printf("\n"); diff --git a/sys/arm/arm/disassem.c b/sys/arm/arm/disassem.c index 57a15ce01edb..04d2f4db5a13 100644 --- a/sys/arm/arm/disassem.c +++ b/sys/arm/arm/disassem.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include - #include #include #include @@ -532,7 +531,6 @@ disasm(const disasm_interface_t *di, vm_offset_t loc, int altfmt) return(loc + INSN_SIZE); } - static void disasm_register_shift(const disasm_interface_t *di, u_int insn) { @@ -551,7 +549,6 @@ disasm_register_shift(const disasm_interface_t *di, u_int insn) } } - static void disasm_print_reglist(const disasm_interface_t *di, u_int insn) { diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c index af79a8f6ffe8..f0d2c3308229 100644 --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -190,7 +190,6 @@ store_ptr(Elf_Addr *where, Elf_Addr val) } #undef RELOC_ALIGNED_P - /* Process one elf relocation with addend. */ static int elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, @@ -233,7 +232,6 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, } switch (rtype) { - case R_ARM_NONE: /* none */ break; diff --git a/sys/arm/arm/gdb_machdep.c b/sys/arm/arm/gdb_machdep.c index 21c04341c3f6..e4adbd806691 100644 --- a/sys/arm/arm/gdb_machdep.c +++ b/sys/arm/arm/gdb_machdep.c @@ -29,7 +29,6 @@ #include __FBSDID("$FreeBSD$"); - #include #include #include diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index 83d9390f09d2..e3c54c237967 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -383,7 +383,6 @@ arm_tmr_acpi_probe(device_t dev) } #endif - static int arm_tmr_attach(device_t dev) { diff --git a/sys/arm/arm/gic.c b/sys/arm/arm/gic.c index 9ff0ec110b54..8fcf511fda08 100644 --- a/sys/arm/arm/gic.c +++ b/sys/arm/arm/gic.c @@ -98,7 +98,6 @@ __FBSDID("$FreeBSD$"); #define GIC_SUPPORT_SECEXT(_sc) \ ((_sc->typer & GICD_TYPER_SECURITYEXT) == GICD_TYPER_SECURITYEXT) - #ifndef GIC_DEFAULT_ICFGR_INIT #define GIC_DEFAULT_ICFGR_INIT 0x00000000 #endif @@ -133,7 +132,6 @@ static struct resource_spec arm_gic_spec[] = { { -1, 0 } }; - #if defined(__arm__) && defined(INVARIANTS) static int gic_debug_spurious = 1; #else @@ -1137,7 +1135,6 @@ arm_gicv2m_alloc_msi(device_t dev, device_t child, int count, int maxcount, for (i = 0; i < count; i++) { /* Mark the interrupt as used */ psc->gic_irqs[irq + i].gi_flags |= GI_FLAG_MSI_USED; - } mtx_unlock(&sc->sc_mutex); diff --git a/sys/arm/arm/identcpu-v4.c b/sys/arm/arm/identcpu-v4.c index 72867aafa78a..243880485bc6 100644 --- a/sys/arm/arm/identcpu-v4.c +++ b/sys/arm/arm/identcpu-v4.c @@ -198,7 +198,6 @@ const struct cpuidtab cpuids[] = { { CPU_ID_MV88FR571_VD, CPU_CLASS_MARVELL, "Feroceon 88FR571-VD", generic_steppings }, - { 0, CPU_CLASS_NONE, NULL, NULL } }; diff --git a/sys/arm/arm/identcpu-v6.c b/sys/arm/arm/identcpu-v6.c index c6fa42dbe2c4..ad23d65b6b6f 100644 --- a/sys/arm/arm/identcpu-v6.c +++ b/sys/arm/arm/identcpu-v6.c @@ -107,7 +107,6 @@ static struct { CPU_CLASS_KRAIT}, }; - static void print_v5_cache(void) { @@ -168,7 +167,6 @@ print_v5_cache(void) } pdcache_size = multiplier << (CPU_CT_xSIZE_SIZE(dsize) + 8); - /* Print cache info. */ if (picache_line_size == 0 && pdcache_line_size == 0) return; @@ -272,7 +270,6 @@ add_cap(char *cap) hw_buf_idx += sprintf(hw_buf + hw_buf_idx, ", "); hw_buf_newline = false; - hw_buf_idx += sprintf(hw_buf + hw_buf_idx, "%s", cap); } @@ -298,7 +295,6 @@ identify_arm_cpu(void) printf("CPU: %s\n", cpu_model); break; } - } if (i >= nitems(cpu_names)) printf("unknown CPU (ID = 0x%x)\n", cpuinfo.midr); diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index 629706910185..a6d4b6fe1430 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -427,7 +427,6 @@ exec_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) tf->tf_spsr = PSR_USR32_MODE; } - #ifdef VFP /* * Get machine VFP context. @@ -928,7 +927,6 @@ initarm(struct arm_boot_params *abp) kernel_pt_table[i].pv_pa = kernel_pt_table[i].pv_va - KERNVIRTADDR + abp->abp_physaddr; - } } /* diff --git a/sys/arm/arm/machdep_boot.c b/sys/arm/arm/machdep_boot.c index 1b1b5c77b1dd..b13cf2ef23ea 100644 --- a/sys/arm/arm/machdep_boot.c +++ b/sys/arm/arm/machdep_boot.c @@ -144,7 +144,6 @@ arm_print_kenv(void) debugf(" %x %s\n", (uint32_t)cp, cp); } - #if defined(LINUX_BOOT_ABI) /* Convert the U-Boot command line into FreeBSD kenv and boot options. */ @@ -344,7 +343,6 @@ default_parse_boot_param(struct arm_boot_params *abp) */ __weak_reference(default_parse_boot_param, parse_boot_param); - /* * Fake up a boot descriptor table */ diff --git a/sys/arm/arm/machdep_ptrace.c b/sys/arm/arm/machdep_ptrace.c index 2a64f89441cc..af0cf6ba2997 100644 --- a/sys/arm/arm/machdep_ptrace.c +++ b/sys/arm/arm/machdep_ptrace.c @@ -238,7 +238,6 @@ arm_predict_branch(void *cookie, u_int insn, register_t pc, register_t *new_pc, offset = (insn & 0xff) << (32 - offset) | (insn & 0xff) >> offset; } else { - offset = fetch_reg(cookie, insn & 0x0f); if ((insn & 0x0000ff0) != 0x00000000) { if (insn & 0x10) @@ -258,11 +257,9 @@ arm_predict_branch(void *cookie, u_int insn, register_t pc, register_t *new_pc, default: break; /* XXX */ } - } *new_pc = addr + offset; return (0); - } case 0xa: /* b ... */ diff --git a/sys/arm/arm/mpcore_timer.c b/sys/arm/arm/mpcore_timer.c index b7e76bb815e0..de8dce5dac83 100644 --- a/sys/arm/arm/mpcore_timer.c +++ b/sys/arm/arm/mpcore_timer.c @@ -252,9 +252,6 @@ arm_tmr_intr(void *arg) return (FILTER_HANDLED); } - - - /** * arm_tmr_probe - timer probe routine * @dev: new device diff --git a/sys/arm/arm/nexus.c b/sys/arm/arm/nexus.c index 423e11f42a1d..368a653ea4f9 100644 --- a/sys/arm/arm/nexus.c +++ b/sys/arm/arm/nexus.c @@ -219,7 +219,6 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) return (child); } - /* * Allocate a resource on behalf of child. NB: child is usually going to be a * child of one of our descendants, not a direct child of nexus0. @@ -470,4 +469,3 @@ nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int icells, #endif /* INTRNG */ } #endif /* FDT */ - diff --git a/sys/arm/arm/nexusvar.h b/sys/arm/arm/nexusvar.h index ec2c80838dd3..9e1bd3027687 100644 --- a/sys/arm/arm/nexusvar.h +++ b/sys/arm/arm/nexusvar.h @@ -33,4 +33,3 @@ void nexus_set_dma_tag(bus_dma_tag_t _tag); #endif - diff --git a/sys/arm/arm/ofw_machdep.c b/sys/arm/arm/ofw_machdep.c index 0943397a99e0..0c53a77feda8 100644 --- a/sys/arm/arm/ofw_machdep.c +++ b/sys/arm/arm/ofw_machdep.c @@ -72,4 +72,3 @@ OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *tag, return (bus_space_map(*tag, addr, size, flags, handle)); } - diff --git a/sys/arm/arm/pl310.c b/sys/arm/arm/pl310.c index fb61ae6bc4bd..86e5fb84c7db 100644 --- a/sys/arm/arm/pl310.c +++ b/sys/arm/arm/pl310.c @@ -219,7 +219,6 @@ pl310_wait_background_op(uint32_t off, uint32_t mask) continue; } - /** * pl310_cache_sync - performs a cache sync operation * @@ -251,7 +250,6 @@ pl310_cache_sync(void) pl310_write4(pl310_softc, PL310_CACHE_SYNC, 0xffffffff); } - static void pl310_wbinv_all(void) { @@ -274,7 +272,6 @@ pl310_wbinv_all(void) pl310_cache_sync(); PL310_UNLOCK(pl310_softc); return; - } if (pl310_softc->sc_rtl_revision == CACHE_ID_RELEASE_r3p0) platform_pl310_write_debug(pl310_softc, 3); @@ -306,7 +303,6 @@ pl310_wbinv_range(vm_paddr_t start, vm_size_t size) size += g_l2cache_line_size; } - #ifdef PL310_ERRATA_727915 if (pl310_softc->sc_rtl_revision >= CACHE_ID_RELEASE_r2p0 && pl310_softc->sc_rtl_revision < CACHE_ID_RELEASE_r3p1) @@ -595,4 +591,3 @@ static devclass_t pl310_devclass; EARLY_DRIVER_MODULE(pl310, simplebus, pl310_driver, pl310_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_MIDDLE); - diff --git a/sys/arm/arm/pmap-v4.c b/sys/arm/arm/pmap-v4.c index 76c0188fbd69..5ef8a8e99dd0 100644 --- a/sys/arm/arm/pmap-v4.c +++ b/sys/arm/arm/pmap-v4.c @@ -712,7 +712,6 @@ pmap_free_l2_bucket(pmap_t pm, struct l2_bucket *l2b, u_int count) pt_entry_t *ptep; u_short l1idx; - /* * Update the bucket's reference count according to how many * PTEs the caller has just invalidated. @@ -1057,9 +1056,7 @@ pmap_fix_cache(struct vm_page *pg, pmap_t pm, vm_offset_t va) /* check for user uncachable conditions - order is important */ if (pm != kernel_pmap && (pv->pv_pmap == pm || pv->pv_pmap == kernel_pmap)) { - if ((uentries > 1 && uwritable) || uwritable > 1) { - /* user duplicate mapping */ if (pv->pv_pmap != kernel_pmap) pv->pv_flags |= PVF_MWC; @@ -1083,7 +1080,6 @@ pmap_fix_cache(struct vm_page *pg, pmap_t pm, vm_offset_t va) (pv->pv_pmap == kernel_pmap || (pv->pv_flags & PVF_WRITE) || (pv->pv_flags & PVF_MWC)))) { - if (!(pv->pv_flags & PVF_NC)) { pv->pv_flags |= PVF_NC; pmap_set_cache_entry(pv, pm, va, -1); @@ -1094,7 +1090,6 @@ pmap_fix_cache(struct vm_page *pg, pmap_t pm, vm_offset_t va) /* kernel and user are cachable */ if ((pm == kernel_pmap) && !(pv->pv_flags & PVF_MWC) && (pv->pv_flags & PVF_NC)) { - pv->pv_flags &= ~PVF_NC; if (pg->md.pv_memattr != VM_MEMATTR_UNCACHEABLE) pmap_set_cache_entry(pv, pm, va, 1); @@ -1104,7 +1099,6 @@ pmap_fix_cache(struct vm_page *pg, pmap_t pm, vm_offset_t va) if (pm != kernel_pmap && (pv->pv_pmap == pm || pv->pv_pmap == kernel_pmap) && !pmwc && (pv->pv_flags & PVF_NC)) { - pv->pv_flags &= ~(PVF_NC | PVF_MWC); if (pg->md.pv_memattr != VM_MEMATTR_UNCACHEABLE) pmap_set_cache_entry(pv, pm, va, 1); @@ -1278,7 +1272,6 @@ pmap_clearbit(struct vm_page *pg, u_int maskbits) } PMAP_UNLOCK(pm); - } if (maskbits & PVF_WRITE) @@ -1679,7 +1672,6 @@ pmap_fault_fixup(pmap_t pm, vm_offset_t va, vm_prot_t ftype, int user) pg->md.pvh_attrs |= PVF_REF; pv->pv_flags |= PVF_REF; - *ptep = (pte & ~L2_TYPE_MASK) | L2_S_PROTO; PTE_SYNC(ptep); rv = 1; @@ -1788,7 +1780,6 @@ pmap_postinit(void) pmap_init_l1(l1, pl1pt); } - #ifdef DEBUG printf("pmap_postinit: Allocated %d static L1 descriptor tables\n", needed); @@ -1846,7 +1837,6 @@ pmap_activate(struct thread *td) return; } - /* * We MUST, I repeat, MUST fix up the L1 entry corresponding * to 'vector_page' in the incoming L1 table before switching @@ -1854,7 +1844,6 @@ pmap_activate(struct thread *td) * domain faults!) will jump into hyperspace. */ if (pcb->pcb_pl1vec) { - *pcb->pcb_pl1vec = pcb->pcb_l1vec; /* * Don't need to PTE_SYNC() at this point since @@ -2045,7 +2034,6 @@ pmap_bootstrap(vm_offset_t firstaddr, struct pv_addr *l1pt) } } - /* * Ensure the primary (kernel) L1 has the correct cache mode for * a page table. Bitch if it is not correctly set. @@ -2156,15 +2144,12 @@ pmap_release(pmap_t pmap) curpcb->pcb_l1vec = pcb->pcb_l1vec; curpcb->pcb_dacr = pcb->pcb_dacr; curpcb->pcb_pagedir = pcb->pcb_pagedir; - } pmap_free_l1(pmap); dprintf("pmap_release()\n"); } - - /* * Helper function for pmap_grow_l2_bucket() */ @@ -2290,7 +2275,6 @@ pmap_grow_l2_bucket(pmap_t pm, vm_offset_t va) return (l2b); } - /* * grow the number of kernel page table entries, if needed */ @@ -2321,7 +2305,6 @@ pmap_growkernel(vm_offset_t addr) kernel_vm_end = pmap_curmaxkvaddr; } - /* * Remove all pages from specified address space * this aids process exit speeds. Also, this code @@ -2369,7 +2352,6 @@ pmap_remove_pages(pmap_t pmap) PMAP_UNLOCK(pmap); } - /*************************************************** * Low level mapping routines..... ***************************************************/ @@ -2407,7 +2389,6 @@ pmap_kenter_internal(vm_offset_t va, vm_offset_t pa, int flags) PDEBUG(1, printf("pmap_kenter: va = %08x, pa = %08x\n", (uint32_t) va, (uint32_t) pa)); - l2b = pmap_get_l2_bucket(kernel_pmap, va); if (l2b == NULL) l2b = pmap_grow_l2_bucket(kernel_pmap, va); @@ -2565,7 +2546,6 @@ pmap_kremove(vm_offset_t va) } } - /* * Used to map a range of physical addresses into kernel * virtual address space. @@ -2636,7 +2616,6 @@ pmap_qenter(vm_offset_t va, vm_page_t *m, int count) } } - /* * this routine jerks page mappings from the * kernel -- it is meant only for temporary mappings. @@ -2657,7 +2636,6 @@ pmap_qremove(vm_offset_t va, int count) } } - /* * pmap_object_init_pt preloads the ptes for a given object * into the specified pmap. This eliminates the blast of soft @@ -2673,7 +2651,6 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object, ("pmap_object_init_pt: non-device object")); } - /* * pmap_is_prefaultable: * @@ -2828,7 +2805,6 @@ pmap_remove_all(vm_page_t m) rw_wunlock(&pvh_global_lock); } - /* * Set the physical protection on the * specified range of this map as requested. @@ -2917,7 +2893,6 @@ pmap_protect(pmap_t pm, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) } } - if (flush) { if (PV_BEEN_EXECD(flags)) pmap_tlb_flushID(pm); @@ -2930,7 +2905,6 @@ pmap_protect(pmap_t pm, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) PMAP_UNLOCK(pm); } - /* * Insert the given physical page (p) at * the specified virtual address (v) in the @@ -3109,7 +3083,6 @@ pmap_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, * must remove it from the PV list */ if ((pve = pmap_remove_pv(opg, pmap, va))) { - /* note for patch: the oflags/invalidation was moved * because PG_FICTITIOUS pages could free the pve */ @@ -3223,7 +3196,6 @@ pmap_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, else if (PV_BEEN_REFD(oflags)) pmap_tlb_flushD_SE(pmap, va); - if (m) pmap_fix_cache(m, pmap, va); } @@ -3332,7 +3304,6 @@ pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) PMAP_UNLOCK(pmap); } - /* * Copy the range specified by src_addr/len * from the source map to the range dst_addr/len @@ -3346,7 +3317,6 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, { } - /* * Routine: pmap_extract * Function: @@ -3546,12 +3516,10 @@ pmap_pinit(pmap_t pmap) return (1); } - /*************************************************** * page management routines. ***************************************************/ - static void pmap_free_pv_entry(pv_entry_t pv) { @@ -3559,7 +3527,6 @@ pmap_free_pv_entry(pv_entry_t pv) uma_zfree(pvzone, pv); } - /* * get a new pv_entry, allocating a block from the system * when needed. @@ -3595,7 +3562,6 @@ pmap_remove(pmap_t pm, vm_offset_t sva, vm_offset_t eva) u_int mappings, is_exec, is_refd; int flushall = 0; - /* * we lock in the pmap => pv_head direction */ @@ -3745,7 +3711,6 @@ pmap_zero_page(vm_page_t m) pmap_zero_page_generic(VM_PAGE_TO_PHYS(m), 0, PAGE_SIZE); } - /* * pmap_zero_page_area zeros the specified hardware page by mapping * the page into KVM and using bzero to clear its contents. @@ -3759,7 +3724,6 @@ pmap_zero_page_area(vm_page_t m, int off, int size) pmap_zero_page_generic(VM_PAGE_TO_PHYS(m), off, size); } - #if 0 /* * pmap_clean_page() @@ -4077,7 +4041,6 @@ pmap_ts_referenced(vm_page_t m) return (pmap_clearbit(m, PVF_REF)); } - boolean_t pmap_is_modified(vm_page_t m) { @@ -4090,7 +4053,6 @@ pmap_is_modified(vm_page_t m) return(FALSE); } - /* * Clear the modify bits on the specified physical page. */ @@ -4108,7 +4070,6 @@ pmap_clear_modify(vm_page_t m) pmap_clearbit(m, PVF_MOD); } - /* * pmap_is_referenced: * @@ -4124,7 +4085,6 @@ pmap_is_referenced(vm_page_t m) return ((m->md.pvh_attrs & PVF_REF) != 0); } - /* * Clear the write and modified bits in each of the given page's mappings. */ @@ -4140,7 +4100,6 @@ pmap_remove_write(vm_page_t m) pmap_clearbit(m, PVF_WRITE); } - /* * Perform the pmap work for mincore(2). If the page is not both referenced and * modified by this pmap, returns its physical address so that the caller can @@ -4199,13 +4158,11 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *pap) return (val); } - void pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) { } - /* * Increase the starting virtual address of the given mapping if a * different alignment might result in more superpage mappings. @@ -4277,7 +4234,6 @@ pmap_link_l2pt(vm_offset_t l1pt, vm_offset_t va, struct pv_addr *l2pv) SLIST_INSERT_HEAD(&kernel_pt_list, l2pv, pv_list); - } /* diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index 697d7b0fdd84..8ee677f7da70 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -1461,7 +1461,6 @@ pmap_kenter_temporary(vm_paddr_t pa, int i) return ((void *)crashdumpmap); } - /************************************* * * TLB & cache maintenance routines. @@ -5737,7 +5736,6 @@ pmap_clear_modify(vm_page_t m) rw_wunlock(&pvh_global_lock); } - /* * Sets the memory attribute for the specified page. */ @@ -6309,7 +6307,6 @@ pmap_set_pcb_pagedir(pmap_t pmap, struct pcb *pcb) pcb->pcb_pagedir = pmap_ttb_get(pmap); } - /* * Clean L1 data cache range by physical address. * The range must be within a single page. diff --git a/sys/arm/arm/syscall.c b/sys/arm/arm/syscall.c index 37824b7e1742..16a78868faaa 100644 --- a/sys/arm/arm/syscall.c +++ b/sys/arm/arm/syscall.c @@ -78,7 +78,6 @@ * Created : 28/11/94 */ - #include __FBSDID("$FreeBSD$"); diff --git a/sys/arm/arm/trap-v4.c b/sys/arm/arm/trap-v4.c index 72a97566f16b..8841631a89ad 100644 --- a/sys/arm/arm/trap-v4.c +++ b/sys/arm/arm/trap-v4.c @@ -213,7 +213,6 @@ abort_handler(struct trapframe *tf, int type) td->td_frame = tf; if (td->td_cowgen != td->td_proc->p_cowgen) thread_cow_update(td); - } /* Grab the current pcb */ pcb = td->td_pcb; @@ -225,7 +224,6 @@ abort_handler(struct trapframe *tf, int type) enable_interrupts(PSR_F); } - /* Invoke the appropriate handler, if necessary */ if (__predict_false(data_aborts[fsr & FAULT_TYPE_MASK].func != NULL)) { if ((data_aborts[fsr & FAULT_TYPE_MASK].func)(tf, fsr, far, @@ -293,7 +291,6 @@ abort_handler(struct trapframe *tf, int type) /* Was the fault due to the FPE/IPKDB ? */ if (__predict_false((tf->tf_spsr & PSR_MODE)==PSR_UND32_MODE)) { - /* * Force exit via userret() * This is necessary as the FPE is an extension to @@ -369,7 +366,6 @@ abort_handler(struct trapframe *tf, int type) dab_fatal(tf, fsr, far, td, &ksig); } - do_trapsignal: call_trapsignal(td, signo, ucode); out: @@ -639,7 +635,6 @@ prefetch_abort_handler(struct trapframe *tf) dab_fatal(tf, 0, tf->tf_pc, NULL, &ksig); td->td_pticks = 0; - /* Ok validate the address, can only execute in USER space */ if (__predict_false(fault_pc >= VM_MAXUSER_ADDRESS || (fault_pc < VM_MIN_ADDRESS && vector_page == ARM_VECTORS_LOW))) { diff --git a/sys/arm/arm/undefined.c b/sys/arm/arm/undefined.c index f6fd5bfab266..ef9e72c89163 100644 --- a/sys/arm/arm/undefined.c +++ b/sys/arm/arm/undefined.c @@ -46,7 +46,6 @@ * Created : 06/01/95 */ - #include "opt_ddb.h" #include @@ -106,7 +105,6 @@ static int gdb_trapper(u_int, u_int, struct trapframe *, int); LIST_HEAD(, undefined_handler) undefined_handlers[MAX_COPROCS]; - void * install_coproc_handler(int coproc, undef_handler_t handler) { @@ -138,7 +136,6 @@ remove_coproc_handler(void *cookie) free(uh, M_TEMP); } - static int gdb_trapper(u_int addr, u_int insn, struct trapframe *frame, int code) { @@ -183,7 +180,7 @@ gdb_trapper(u_int addr, u_int insn, struct trapframe *frame, int code) } } } - + return 1; } @@ -203,7 +200,6 @@ undefined_init(void) install_coproc_handler_static(0, &gdb_uh); } - void undefinedinstruction(struct trapframe *frame) { diff --git a/sys/arm/arm/vfp.c b/sys/arm/arm/vfp.c index b9495b36b308..8a929dd75f27 100644 --- a/sys/arm/arm/vfp.c +++ b/sys/arm/arm/vfp.c @@ -100,7 +100,6 @@ set_coprocessorACR(u_int val) isb(); } - /* called for each cpu */ void vfp_init(void) @@ -170,7 +169,6 @@ vfp_init(void) SYSINIT(vfp, SI_SUB_CPU, SI_ORDER_ANY, vfp_init, NULL); - /* start VFP unit, restore the vfp registers from the PCB and retry * the instruction */ @@ -324,4 +322,3 @@ vfp_discard(struct thread *td) } #endif - diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index 3c75f43e5a1c..e13c8f01b0f2 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -148,7 +148,6 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) tf->tf_r0 = 0; tf->tf_r1 = 0; - /* Setup to release spin count in fork_exit(). */ td2->td_md.md_spinlock_count = 1; td2->td_md.md_saved_cspr = PSR_SVC32_MODE; diff --git a/sys/arm/broadcom/bcm2835/bcm2835_audio.c b/sys/arm/broadcom/bcm2835/bcm2835_audio.c index 0610efc9fbfe..ae2c9a14fc62 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_audio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_audio.c @@ -412,7 +412,7 @@ bcm2835_audio_update_params(struct bcm2835_audio_info *sc, uint32_t fmt, uint32_ static bool bcm2835_audio_buffer_should_sleep(struct bcm2835_audio_chinfo *ch) { - + if (ch->playback_state != PLAYBACK_PLAYING) return (true); @@ -953,7 +953,6 @@ static device_method_t bcm2835_audio_methods[] = { DEVMETHOD(device_probe, bcm2835_audio_probe), DEVMETHOD(device_attach, bcm2835_audio_attach), DEVMETHOD(device_detach, bcm2835_audio_detach), - { 0, 0 } }; diff --git a/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c b/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c index 15c1106cf36f..1c767ad629d6 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c @@ -642,8 +642,6 @@ bcm2835_cpufreq_get_temperature(struct bcm2835_cpufreq_softc *sc) return (value); } - - static int sysctl_bcm2835_cpufreq_arm_freq(SYSCTL_HANDLER_ARGS) { @@ -1022,7 +1020,6 @@ sysctl_bcm2835_devcpu_temperature(SYSCTL_HANDLER_ARGS) return (EINVAL); } - static void bcm2835_cpufreq_init(void *arg) { diff --git a/sys/arm/broadcom/bcm2835/bcm2835_fb.c b/sys/arm/broadcom/bcm2835/bcm2835_fb.c index c536aa89cfcc..40c4a29c3e95 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_fb.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_fb.c @@ -191,7 +191,6 @@ static device_method_t bcm_fb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, bcm_fb_probe), DEVMETHOD(device_attach, bcm_fb_attach), - { 0, 0 } }; diff --git a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c index bbac2788a3e6..61513df9c008 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c @@ -598,7 +598,6 @@ bcm_gpio_sysctl_init(struct bcm_gpio_softc *sc) pin_tree = SYSCTL_CHILDREN(pin_node); for (i = 0; i < sc->sc_gpio_npins; i++) { - snprintf(pinbuf, sizeof(pinbuf), "%d", i); pinN_node = SYSCTL_ADD_NODE(ctx, pin_tree, OID_AUTO, pinbuf, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "GPIO Pin"); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_intr.c b/sys/arm/broadcom/bcm2835/bcm2835_intr.c index 24bb7014db55..93c044fe6419 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_intr.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_intr.c @@ -28,7 +28,6 @@ * SUCH DAMAGE. */ - #include __FBSDID("$FreeBSD$"); @@ -439,7 +438,6 @@ static device_method_t bcm_intc_methods[] = { DEVMETHOD(pic_post_filter, bcm_intc_post_filter), DEVMETHOD(pic_post_ithread, bcm_intc_post_ithread), DEVMETHOD(pic_pre_ithread, bcm_intc_pre_ithread), - { 0, 0 } }; diff --git a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c index 5604695a84ce..683fb4986a41 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c @@ -119,8 +119,6 @@ bcm2836_devmap_init(platform_t plat) } #endif - - static void bcm2835_cpu_reset(platform_t plat) { diff --git a/sys/arm/broadcom/bcm2835/bcm2835_mbox.c b/sys/arm/broadcom/bcm2835/bcm2835_mbox.c index 9d71399de861..d31989b7ddeb 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_mbox.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_mbox.c @@ -535,18 +535,18 @@ bcm2835_mbox_fb_get_bpp(struct bcm2835_fb_config *fb) { int err; struct msg_fb_get_bpp msg; - + memset(&msg, 0, sizeof(msg)); msg.hdr.buf_size = sizeof(msg); msg.hdr.code = BCM2835_MBOX_CODE_REQ; BCM2835_MBOX_INIT_TAG(&msg.bpp, GET_DEPTH); msg.bpp.tag_hdr.val_len = 0; msg.end_tag = 0; - + err = bcm2835_mbox_property(&msg, sizeof(msg)); if (err == 0) fb->bpp = msg.bpp.body.resp.bpp; - + return (err); } @@ -592,4 +592,3 @@ bcm2835_mbox_fb_init(struct bcm2835_fb_config *fb) return (err); } - diff --git a/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h b/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h index 92496c5aae92..df8c96d68f25 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h +++ b/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h @@ -60,8 +60,6 @@ struct bcm2835_mbox_tag_hdr { #define BCM2835_MBOX_TAG_FIRMWARE_REVISION 0x00000001 - - #define BCM2835_MBOX_POWER_ID_EMMC 0x00000000 #define BCM2835_MBOX_POWER_ID_UART0 0x00000001 #define BCM2835_MBOX_POWER_ID_UART1 0x00000002 diff --git a/sys/arm/broadcom/bcm2835/bcm2835_pwm.c b/sys/arm/broadcom/bcm2835/bcm2835_pwm.c index db18a67b0b29..348c1435f85d 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_pwm.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_pwm.c @@ -490,7 +490,6 @@ bcm_pwm_get_node(device_t bus, device_t dev) return (ofw_bus_get_node(bus)); } - static device_method_t bcm_pwm_methods[] = { /* Device interface */ DEVMETHOD(device_probe, bcm_pwm_probe), diff --git a/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c b/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c index c92231223528..5eb94c6f360f 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c @@ -105,10 +105,8 @@ __FBSDID("$FreeBSD$"); #include #include "bcm2835_vcbus.h" - /* #define SDHOST_DEBUG */ - /* Registers */ #define HC_COMMAND 0x00 /* Command and flags */ #define HC_ARGUMENT 0x04 @@ -233,7 +231,6 @@ static void bcm_sdhost_intr(void *); static int bcm_sdhost_get_ro(device_t, device_t); - static inline uint32_t RD4(struct bcm_sdhost_softc *sc, bus_size_t off) { @@ -301,7 +298,6 @@ bcm_sdhost_print_regs(struct bcm_sdhost_softc *sc, struct sdhci_slot *slot, { if (bcm2835_sdhost_debug > 0 || error > 0) { - printf("%s: sc=%p slot=%p\n", __func__, sc, slot); printf("HC_COMMAND: 0x%08x\n", @@ -334,7 +330,6 @@ bcm_sdhost_print_regs(struct bcm_sdhost_softc *sc, struct sdhci_slot *slot, RD4(sc, HC_BLOCKCOUNT)); } else { - /* printf("%04d | HC_COMMAND: 0x%08x HC_ARGUMENT: 0x%08x " "HC_HOSTSTATUS: 0x%08x HC_HOSTCONFIG: 0x%08x\n", diff --git a/sys/arm/broadcom/bcm2835/bcm2835_systimer.c b/sys/arm/broadcom/bcm2835/bcm2835_systimer.c index a7c54fd6773c..c5c3435b6ef7 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_systimer.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_systimer.c @@ -138,7 +138,6 @@ bcm_systimer_start(struct eventtimer *et, sbintime_t first, sbintime_t period) register_t s; if (first != 0) { - count = ((uint32_t)et->et_frequency * first) >> 32; s = intr_disable(); diff --git a/sys/arm/broadcom/bcm2835/bcm2838_pci.c b/sys/arm/broadcom/bcm2835/bcm2838_pci.c index 576d3998f30b..a9e32b1a454e 100644 --- a/sys/arm/broadcom/bcm2835/bcm2838_pci.c +++ b/sys/arm/broadcom/bcm2835/bcm2838_pci.c @@ -124,7 +124,6 @@ static struct ofw_compat_data compat_data[] = { {"brcm,bcm2711-pcie", 1}, {"brcm,bcm7211-pcie", 1}, {"brcm,bcm7445-pcie", 1}, - {NULL, 0} }; @@ -740,4 +739,3 @@ DEFINE_CLASS_1(pcib, bcm_pcib_driver, bcm_pcib_methods, static devclass_t bcm_pcib_devclass; DRIVER_MODULE(bcm_pcib, simplebus, bcm_pcib_driver, bcm_pcib_devclass, 0, 0); - diff --git a/sys/arm/broadcom/bcm2835/bcm2838_xhci.c b/sys/arm/broadcom/bcm2835/bcm2838_xhci.c index 29bc73691a47..5805254c0623 100644 --- a/sys/arm/broadcom/bcm2835/bcm2838_xhci.c +++ b/sys/arm/broadcom/bcm2835/bcm2838_xhci.c @@ -214,4 +214,3 @@ DEFINE_CLASS_1(bcm_xhci, bcm_xhci_driver, bcm_xhci_methods, static devclass_t xhci_devclass; DRIVER_MODULE(bcm_xhci, pci, bcm_xhci_driver, xhci_devclass, 0, 0); MODULE_DEPEND(bcm_xhci, usb, 1, 1, 1); - diff --git a/sys/arm/freescale/fsl_ocotp.c b/sys/arm/freescale/fsl_ocotp.c index 6b64686f7869..ddfeedb5e15a 100644 --- a/sys/arm/freescale/fsl_ocotp.c +++ b/sys/arm/freescale/fsl_ocotp.c @@ -204,4 +204,3 @@ static devclass_t ocotp_devclass; EARLY_DRIVER_MODULE(ocotp, simplebus, ocotp_driver, ocotp_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_FIRST); - diff --git a/sys/arm/freescale/imx/imx51_ccm.c b/sys/arm/freescale/imx/imx51_ccm.c index 8f04d3ff2545..3db5c982b59a 100644 --- a/sys/arm/freescale/imx/imx51_ccm.c +++ b/sys/arm/freescale/imx/imx51_ccm.c @@ -249,7 +249,6 @@ imxccm_attach(device_t dev) imx51_get_clock(IMX51CLK_IPG_CLK_ROOT), imx51_get_clock(IMX51CLK_PERCLK_ROOT)); - return (0); noclocks: @@ -438,7 +437,6 @@ imx51_get_clock(enum imx51_clock clk) } } - static uint64_t imx51_get_pll_freq(u_int pll_no) { @@ -661,4 +659,3 @@ imx_ccm_ahb_hz(void) return (imx51_get_clock(IMX51CLK_AHB_CLK_ROOT)); } - diff --git a/sys/arm/freescale/imx/imx51_ccmreg.h b/sys/arm/freescale/imx/imx51_ccmreg.h index d306c0e7acde..f9c75f30f279 100644 --- a/sys/arm/freescale/imx/imx51_ccmreg.h +++ b/sys/arm/freescale/imx/imx51_ccmreg.h @@ -257,4 +257,3 @@ #define CCGR_CLK_MODE_ALWAYS 3 #endif /* _IMX51_CCMREG_H */ - diff --git a/sys/arm/freescale/imx/imx51_ipuv3.c b/sys/arm/freescale/imx/imx51_ipuv3.c index 9daded244a8a..520ace1a1b53 100644 --- a/sys/arm/freescale/imx/imx51_ipuv3.c +++ b/sys/arm/freescale/imx/imx51_ipuv3.c @@ -155,7 +155,6 @@ static uint32_t colors_24[16] = { 0xFFFF00,/* Yellow */ 0xFFFFFF,/* White */ - }; #define IPUV3_READ(ipuv3, module, reg) \ @@ -422,7 +421,6 @@ static device_method_t ipu3_fb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ipu3_fb_probe), DEVMETHOD(device_attach, ipu3_fb_attach), - { 0, 0 } }; diff --git a/sys/arm/freescale/imx/imx6_anatop.c b/sys/arm/freescale/imx/imx6_anatop.c index 3dfbebc4b414..2a1b06bbd6ce 100644 --- a/sys/arm/freescale/imx/imx6_anatop.c +++ b/sys/arm/freescale/imx/imx6_anatop.c @@ -816,4 +816,3 @@ EARLY_DRIVER_MODULE(imx6_anatop, simplebus, imx6_anatop_driver, imx6_anatop_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); EARLY_DRIVER_MODULE(imx6_anatop, ofwbus, imx6_anatop_driver, imx6_anatop_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); - diff --git a/sys/arm/freescale/imx/imx6_ccm.c b/sys/arm/freescale/imx/imx6_ccm.c index 94c0420e6737..5bdb71caa4bd 100644 --- a/sys/arm/freescale/imx/imx6_ccm.c +++ b/sys/arm/freescale/imx/imx6_ccm.c @@ -518,4 +518,3 @@ static devclass_t ccm_devclass; EARLY_DRIVER_MODULE(ccm, simplebus, ccm_driver, ccm_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_EARLY); - diff --git a/sys/arm/freescale/imx/imx6_ccmreg.h b/sys/arm/freescale/imx/imx6_ccmreg.h index cbe107f1fba7..dfa7aad45cd7 100644 --- a/sys/arm/freescale/imx/imx6_ccmreg.h +++ b/sys/arm/freescale/imx/imx6_ccmreg.h @@ -154,7 +154,7 @@ #define CCM_ANALOG_PLL_VIDEO_NUM 0x000040b0 #define CCM_ANALOG_PLL_VIDEO_DENOM 0x000040c0 - + #define CCM_ANALOG_PLL_ENET 0x000040e0 #define CCM_ANALOG_PLL_ENET_LOCK (1u << 31) #define CCM_ANALOG_PLL_ENET_ENABLE_100M (1u << 20) /* SATA */ diff --git a/sys/arm/freescale/imx/imx6_mp.c b/sys/arm/freescale/imx/imx6_mp.c index f890ebf92913..ea7c8cc3a293 100644 --- a/sys/arm/freescale/imx/imx6_mp.c +++ b/sys/arm/freescale/imx/imx6_mp.c @@ -152,7 +152,6 @@ imx6_mp_start_ap(platform_t plat) val |= ((1 << (SRC_CONTROL_C1ENA_SHIFT - 1 + i )) | ( 1 << (SRC_CONTROL_C1RST_SHIFT - 1 + i))); - } bus_space_write_4(fdtbus_bs_tag, src, SRC_CONTROL_REG, val); diff --git a/sys/arm/freescale/imx/imx6_ssi.c b/sys/arm/freescale/imx/imx6_ssi.c index 811bde6b77ce..2330978849e9 100644 --- a/sys/arm/freescale/imx/imx6_ssi.c +++ b/sys/arm/freescale/imx/imx6_ssi.c @@ -279,7 +279,6 @@ static kobj_method_t ssimixer_methods[] = { }; MIXER_DECLARE(ssimixer); - /* * Channel interface. */ diff --git a/sys/arm/freescale/imx/imx6_usbphy.c b/sys/arm/freescale/imx/imx6_usbphy.c index f8ca013aabf6..56d3cce907a6 100644 --- a/sys/arm/freescale/imx/imx6_usbphy.c +++ b/sys/arm/freescale/imx/imx6_usbphy.c @@ -207,4 +207,3 @@ static devclass_t usbphy_devclass; */ EARLY_DRIVER_MODULE(usbphy, simplebus, usbphy_driver, usbphy_devclass, 0, 0, BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE); - diff --git a/sys/arm/freescale/imx/imx_console.c b/sys/arm/freescale/imx/imx_console.c index c89945d999a5..d5ade2decd7b 100644 --- a/sys/arm/freescale/imx/imx_console.c +++ b/sys/arm/freescale/imx/imx_console.c @@ -137,7 +137,6 @@ uart_cnungrab(struct consdev *cp) } - static void uart_cnprobe(struct consdev *cp) { diff --git a/sys/arm/freescale/imx/imx_gpio.c b/sys/arm/freescale/imx/imx_gpio.c index aff4d43234b7..8324d8daa30c 100644 --- a/sys/arm/freescale/imx/imx_gpio.c +++ b/sys/arm/freescale/imx/imx_gpio.c @@ -864,7 +864,7 @@ imx51_gpio_attach(device_t dev) intr_pic_register(dev, OF_xref_from_node(ofw_bus_get_node(dev))); #endif sc->sc_busdev = gpiobus_attach_bus(dev); - + if (sc->sc_busdev == NULL) { imx51_gpio_detach(dev); return (ENXIO); diff --git a/sys/arm/freescale/imx/imx_iomux.c b/sys/arm/freescale/imx/imx_iomux.c index 43b164835c96..f8c7d8e785a6 100644 --- a/sys/arm/freescale/imx/imx_iomux.c +++ b/sys/arm/freescale/imx/imx_iomux.c @@ -328,4 +328,3 @@ static devclass_t imx_iomux_devclass; EARLY_DRIVER_MODULE(imx_iomux, simplebus, imx_iomux_driver, imx_iomux_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_LATE); - diff --git a/sys/arm/freescale/imx/imx_machdep.c b/sys/arm/freescale/imx/imx_machdep.c index 377f39d60dda..d920c41171b7 100644 --- a/sys/arm/freescale/imx/imx_machdep.c +++ b/sys/arm/freescale/imx/imx_machdep.c @@ -130,4 +130,3 @@ imx_wdog_init_last_reset(vm_offset_t wdsr_phys) sysctl___hw_imx_last_reset_reason.oid_arg1 = "PowerOnReset"; } } - diff --git a/sys/arm/freescale/imx/imx_machdep.h b/sys/arm/freescale/imx/imx_machdep.h index 0717246495b5..a030a0791af6 100644 --- a/sys/arm/freescale/imx/imx_machdep.h +++ b/sys/arm/freescale/imx/imx_machdep.h @@ -69,4 +69,3 @@ imx_soc_family(void) } #endif - diff --git a/sys/arm/freescale/imx/imx_nop_usbphy.c b/sys/arm/freescale/imx/imx_nop_usbphy.c index 9b6986b0eca9..200511b2c273 100644 --- a/sys/arm/freescale/imx/imx_nop_usbphy.c +++ b/sys/arm/freescale/imx/imx_nop_usbphy.c @@ -120,4 +120,3 @@ static driver_t usbphy_driver = { static devclass_t usbphy_devclass; DRIVER_MODULE(usbphy, simplebus, usbphy_driver, usbphy_devclass, 0, 0); - diff --git a/sys/arm/freescale/imx/imx_wdogreg.h b/sys/arm/freescale/imx/imx_wdogreg.h index a0c362c50ed2..d192a28bbdc5 100644 --- a/sys/arm/freescale/imx/imx_wdogreg.h +++ b/sys/arm/freescale/imx/imx_wdogreg.h @@ -61,4 +61,3 @@ #define WDOG_MCR_REG 0x08 /* Miscellaneous Control Register */ #define WDOG_MCR_PDE (1u << 0) /* Power-down enable */ - diff --git a/sys/arm/freescale/vybrid/vf_ccm.c b/sys/arm/freescale/vybrid/vf_ccm.c index 35806cae1d9f..bfb957338af7 100644 --- a/sys/arm/freescale/vybrid/vf_ccm.c +++ b/sys/arm/freescale/vybrid/vf_ccm.c @@ -407,7 +407,6 @@ ccm_fdt_set(struct ccm_softc *sc) /* Find 'clock_names' prop in the tree */ for (child = OF_child(parent); child != 0; child = OF_peer(child)) { - /* Find a 'leaf'. Start the search from this node. */ while (OF_child(child)) { parent = child; diff --git a/sys/arm/freescale/vybrid/vf_ehci.c b/sys/arm/freescale/vybrid/vf_ehci.c index d5cddd7a0e5e..8c1ddfc7d79e 100644 --- a/sys/arm/freescale/vybrid/vf_ehci.c +++ b/sys/arm/freescale/vybrid/vf_ehci.c @@ -153,7 +153,6 @@ static device_method_t ehci_methods[] = { /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), - { 0, 0 } }; diff --git a/sys/arm/freescale/vybrid/vf_gpio.c b/sys/arm/freescale/vybrid/vf_gpio.c index f68627cb1924..cfa40693dfbe 100644 --- a/sys/arm/freescale/vybrid/vf_gpio.c +++ b/sys/arm/freescale/vybrid/vf_gpio.c @@ -288,7 +288,6 @@ vf_gpio_pin_toggle(device_t dev, uint32_t pin) return (0); } - static void vf_gpio_pin_configure(struct vf_gpio_softc *sc, struct gpio_pin *pin, unsigned int flags) @@ -314,7 +313,6 @@ vf_gpio_pin_configure(struct vf_gpio_softc *sc, struct gpio_pin *pin, GPIO_UNLOCK(sc); } - static int vf_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) { diff --git a/sys/arm/freescale/vybrid/vf_i2c.c b/sys/arm/freescale/vybrid/vf_i2c.c index ee8ed92e2498..8206dadecf6d 100644 --- a/sys/arm/freescale/vybrid/vf_i2c.c +++ b/sys/arm/freescale/vybrid/vf_i2c.c @@ -560,7 +560,6 @@ i2c_write(device_t dev, const char *buf, int len, int *sent, int timeout) mtx_lock(&sc->mutex); while (*sent < len) { - WRITE1(sc, I2C_IBDR, *buf++); error = wait_for_iif(sc); @@ -598,7 +597,6 @@ static device_method_t i2c_methods[] = { DEVMETHOD(iicbus_read, i2c_read), DEVMETHOD(iicbus_write, i2c_write), DEVMETHOD(iicbus_transfer, iicbus_transfer_gen), - { 0, 0 } }; diff --git a/sys/arm/freescale/vybrid/vf_iomuxc.c b/sys/arm/freescale/vybrid/vf_iomuxc.c index 957da2e41569..e46dd31c2efb 100644 --- a/sys/arm/freescale/vybrid/vf_iomuxc.c +++ b/sys/arm/freescale/vybrid/vf_iomuxc.c @@ -139,7 +139,6 @@ pinmux_set(struct iomuxc_softc *sc) /* Find 'iomux_config' prop in the nodes */ for (child = OF_child(parent); child != 0; child = OF_peer(child)) { - /* Find a 'leaf'. Start the search from this node. */ while (OF_child(child)) { parent = child; diff --git a/sys/arm/freescale/vybrid/vf_port.c b/sys/arm/freescale/vybrid/vf_port.c index 91e35c9da5f7..d04cf4a08b37 100644 --- a/sys/arm/freescale/vybrid/vf_port.c +++ b/sys/arm/freescale/vybrid/vf_port.c @@ -118,7 +118,6 @@ port_intr(void *arg) for (i = 0; i < NGPIO; i++) { reg = READ4(sc, PORT_PCR(i)); if (reg & PCR_ISF) { - /* Clear interrupt */ WRITE4(sc, PORT_PCR(i), reg); diff --git a/sys/arm/freescale/vybrid/vf_sai.c b/sys/arm/freescale/vybrid/vf_sai.c index 84dcf991419b..26ba34df5009 100644 --- a/sys/arm/freescale/vybrid/vf_sai.c +++ b/sys/arm/freescale/vybrid/vf_sai.c @@ -670,7 +670,6 @@ setup_sai(struct sc_info *sc) WRITE4(sc, I2S_TCSR, reg); } - static void sai_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err) { diff --git a/sys/arm/include/asm.h b/sys/arm/include/asm.h index 85764f345eaf..1974908b65c1 100644 --- a/sys/arm/include/asm.h +++ b/sys/arm/include/asm.h @@ -169,7 +169,6 @@ #define __FBSDID(s) /* nothing */ #endif - #define WEAK_ALIAS(alias,sym) \ .weak alias; \ alias = sym diff --git a/sys/arm/include/atomic-v4.h b/sys/arm/include/atomic-v4.h index 7743225e790b..07d1042dd0d0 100644 --- a/sys/arm/include/atomic-v4.h +++ b/sys/arm/include/atomic-v4.h @@ -84,7 +84,6 @@ __swp(uint32_t val, volatile uint32_t *ptr) return (val); } - #ifdef _KERNEL #define ARM_HAVE_ATOMIC64 @@ -254,7 +253,6 @@ atomic_cmpset_64(volatile u_int64_t *p, volatile u_int64_t cmpval, volatile u_in return (ret); } - static __inline uint32_t atomic_fetchadd_32(volatile uint32_t *p, uint32_t v) { diff --git a/sys/arm/include/atomic-v6.h b/sys/arm/include/atomic-v6.h index 79907b75ae50..bc5f0c0cc569 100644 --- a/sys/arm/include/atomic-v6.h +++ b/sys/arm/include/atomic-v6.h @@ -91,7 +91,6 @@ atomic_##NAME##_rel_##WIDTH(__volatile uint##WIDTH##_t *p, uint##WIDTH##_t v)\ atomic_##NAME##_##WIDTH(p, v); \ } - static __inline void atomic_add_32(volatile uint32_t *p, uint32_t val) { diff --git a/sys/arm/include/bus.h b/sys/arm/include/bus.h index 37994f682ad0..62601559f3ec 100644 --- a/sys/arm/include/bus.h +++ b/sys/arm/include/bus.h @@ -279,7 +279,6 @@ extern bus_space_tag_t arm_base_bs_tag; #define __bs_nonsingle_s(type, sz, t, h, o, a, c) \ (*(t)->__bs_opname_s(type,sz))((t), h, o, a, c) - #define __generate_inline_bs_rs(IFN, MBR, TYP) \ static inline TYP \ IFN(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) \ @@ -312,7 +311,6 @@ extern bus_space_tag_t arm_base_bs_tag; #define bus_space_subregion(t, h, o, s, hp) \ (*(t)->bs_subregion)((t), (h), (o), (s), (hp)) - /* * Allocation and deallocation operations. */ @@ -365,7 +363,6 @@ __generate_inline_bs_rs(bus_space_read_stream_8, bs_r_8_s, uint64_t); #define bus_space_read_multi_stream_8(t, h, o, a, c) \ __bs_nonsingle_s(rm,8,(t),(h),(o),(a),(c)) - /* * Bus read region operations. */ @@ -387,7 +384,6 @@ __generate_inline_bs_rs(bus_space_read_stream_8, bs_r_8_s, uint64_t); #define bus_space_read_region_stream_8(t, h, o, a, c) \ __bs_nonsingle_s(rr,8,(t),(h),(o),(a),(c)) - /* * Bus write (single) operations. */ @@ -401,7 +397,6 @@ __generate_inline_bs_ws(bus_space_write_stream_2, bs_w_2_s, uint16_t); __generate_inline_bs_ws(bus_space_write_stream_4, bs_w_4_s, uint32_t); __generate_inline_bs_ws(bus_space_write_stream_8, bs_w_8_s, uint64_t); - /* * Bus write multiple operations. */ @@ -423,7 +418,6 @@ __generate_inline_bs_ws(bus_space_write_stream_8, bs_w_8_s, uint64_t); #define bus_space_write_multi_stream_8(t, h, o, a, c) \ __bs_nonsingle_s(wm,8,(t),(h),(o),(a),(c)) - /* * Bus write region operations. */ @@ -445,7 +439,6 @@ __generate_inline_bs_ws(bus_space_write_stream_8, bs_w_8_s, uint64_t); #define bus_space_write_region_stream_8(t, h, o, a, c) \ __bs_nonsingle_s(wr,8,(t),(h),(o),(a),(c)) - /* * Set multiple operations. */ @@ -458,7 +451,6 @@ __generate_inline_bs_ws(bus_space_write_stream_8, bs_w_8_s, uint64_t); #define bus_space_set_multi_8(t, h, o, v, c) \ __bs_set(sm,8,(t),(h),(o),(v),(c)) - /* * Set region operations. */ @@ -471,7 +463,6 @@ __generate_inline_bs_ws(bus_space_write_stream_8, bs_w_8_s, uint64_t); #define bus_space_set_region_8(t, h, o, v, c) \ __bs_set(sr,8,(t),(h),(o),(v),(c)) - /* * Copy operations. */ diff --git a/sys/arm/include/cpu-v4.h b/sys/arm/include/cpu-v4.h index 2574f47469ae..441234635572 100644 --- a/sys/arm/include/cpu-v4.h +++ b/sys/arm/include/cpu-v4.h @@ -82,12 +82,10 @@ fname(uint32_t reg) \ __asm __volatile("mcr\t" _FX(aname):: "r" (reg)); \ } - /* * Publicly accessible functions */ - /* Various control registers */ _RF0(cp15_cpacr_get, CP15_CPACR(%0)) @@ -111,7 +109,6 @@ _RF0(cp15_sctlr_get, CP15_SCTLR(%0)) #undef _WF0 #undef _WF1 - /* * armv4/5 compatibility shims. * diff --git a/sys/arm/include/cpufunc.h b/sys/arm/include/cpufunc.h index 12030b4aa51b..1810a2e564ba 100644 --- a/sys/arm/include/cpufunc.h +++ b/sys/arm/include/cpufunc.h @@ -58,7 +58,6 @@ breakpoint(void) } struct cpu_functions { - /* CPU functions */ #if __ARM_ARCH < 6 void (*cf_cpwait) (void); diff --git a/sys/arm/include/cpuinfo.h b/sys/arm/include/cpuinfo.h index 35c496db43f8..e503a3f8be49 100644 --- a/sys/arm/include/cpuinfo.h +++ b/sys/arm/include/cpuinfo.h @@ -51,7 +51,6 @@ #define CPU_ARCH_CORTEX_A73 0xD09 #define CPU_ARCH_CORTEX_A75 0xD0A - /* QCOM */ #define CPU_ARCH_KRAIT_300 0x06F diff --git a/sys/arm/include/elf.h b/sys/arm/include/elf.h index 7bcd7b44bbe1..affd4b349163 100644 --- a/sys/arm/include/elf.h +++ b/sys/arm/include/elf.h @@ -105,7 +105,6 @@ __ElfType(Auxinfo); #define HWCAP_LPAE 0x00100000 #define HWCAP_EVTSTRM 0x00200000 /* Not implemented yet. */ - /* Flags passed in AT_HWCAP2. */ #define HWCAP2_AES 0x00000001 #define HWCAP2_PMULL 0x00000002 diff --git a/sys/arm/include/frame.h b/sys/arm/include/frame.h index 7eaf2e67c87e..29e354152ae5 100644 --- a/sys/arm/include/frame.h +++ b/sys/arm/include/frame.h @@ -56,7 +56,6 @@ #include #include - /* * Trap frame. Pushed onto the kernel stack on a trap (synchronous exception). */ @@ -99,7 +98,6 @@ struct sigframe { mcontext_vfp_t sf_vfp; /* actual saved VFP context */ }; - /* * Switch frame. * @@ -126,7 +124,6 @@ struct switchframe #endif }; - /* * Stack frame. Used during stack traces (db_trace.c) */ diff --git a/sys/arm/include/pcb.h b/sys/arm/include/pcb.h index 0d4aca5082f4..078a13c13796 100644 --- a/sys/arm/include/pcb.h +++ b/sys/arm/include/pcb.h @@ -43,7 +43,6 @@ #include #include - /* * WARNING! * Keep pcb_regs first for faster access in switch.S diff --git a/sys/arm/include/pcpu.h b/sys/arm/include/pcpu.h index bc8abd57b03c..cf143d07ec2c 100644 --- a/sys/arm/include/pcpu.h +++ b/sys/arm/include/pcpu.h @@ -111,7 +111,6 @@ set_curthread(struct thread *td) __asm __volatile("mcr p15, 0, %0, c13, c0, 4" : : "r" (td)); } - static inline void * get_tls(void) { diff --git a/sys/arm/include/pl310.h b/sys/arm/include/pl310.h index 536001597a06..39e8434097a7 100644 --- a/sys/arm/include/pl310.h +++ b/sys/arm/include/pl310.h @@ -24,7 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - /* * $FreeBSD$ */ diff --git a/sys/arm/include/pmap-v4.h b/sys/arm/include/pmap-v4.h index aab9dc86b16e..e4102ffe50c8 100644 --- a/sys/arm/include/pmap-v4.h +++ b/sys/arm/include/pmap-v4.h @@ -110,7 +110,6 @@ struct md_page { struct l1_ttable; struct l2_dtable; - /* * The number of L2 descriptor tables which can be tracked by an l2_dtable. * A bucket size of 16 provides for 16MB of contiguous virtual address diff --git a/sys/arm/include/profile.h b/sys/arm/include/profile.h index 6fcbbdc2b83a..cab8f89ddadf 100644 --- a/sys/arm/include/profile.h +++ b/sys/arm/include/profile.h @@ -45,7 +45,6 @@ */ #define FUNCTION_ALIGNMENT 16 - #define _MCOUNT_DECL void mcount typedef u_long fptrdiff_t; @@ -107,7 +106,6 @@ void user(void); ((pc >= (uintfptr_t)bintr) ? (uintfptr_t)bintr : \ (uintfptr_t)btrap) : ~0U) - #ifdef _KERNEL #define MCOUNT_DECL(s) register_t s; diff --git a/sys/arm/include/ptrace.h b/sys/arm/include/ptrace.h index 7aec39cb84f3..44085a3b7079 100644 --- a/sys/arm/include/ptrace.h +++ b/sys/arm/include/ptrace.h @@ -20,4 +20,3 @@ struct vfpreg { #define PT_SETVFPREGS (PT_FIRSTMACH + 1) #endif /* !_MACHINE_PTRACE_H */ - diff --git a/sys/arm/include/swi.h b/sys/arm/include/swi.h index 858ed2368b0d..b2caf5ee1c31 100644 --- a/sys/arm/include/swi.h +++ b/sys/arm/include/swi.h @@ -20,4 +20,3 @@ #define SWI_IMBrange 0xf00001 #endif /* !_MACHINE_SWI_H_ */ - diff --git a/sys/arm/include/undefined.h b/sys/arm/include/undefined.h index 4b2ab474fbf9..139448be4c0e 100644 --- a/sys/arm/include/undefined.h +++ b/sys/arm/include/undefined.h @@ -47,7 +47,6 @@ * $FreeBSD$ */ - #ifndef _MACHINE_UNDEFINED_H_ #define _MACHINE_UNDEFINED_H_ #ifdef _KERNEL diff --git a/sys/arm/include/vfp.h b/sys/arm/include/vfp.h index 15098d9a4c80..b9cc6efb9589 100644 --- a/sys/arm/include/vfp.h +++ b/sys/arm/include/vfp.h @@ -28,7 +28,6 @@ * $FreeBSD$ */ - #ifndef _MACHINE__VFP_H_ #define _MACHINE__VFP_H_ diff --git a/sys/arm/linux/linux_proto.h b/sys/arm/linux/linux_proto.h index 71225320bea1..a82db30a3477 100644 --- a/sys/arm/linux/linux_proto.h +++ b/sys/arm/linux/linux_proto.h @@ -1515,42 +1515,36 @@ int linux_set_tls(struct thread *, struct linux_set_tls_args *); #endif /* COMPAT_43 */ - #ifdef COMPAT_FREEBSD4 #define nosys linux_nosys #endif /* COMPAT_FREEBSD4 */ - #ifdef COMPAT_FREEBSD6 #define nosys linux_nosys #endif /* COMPAT_FREEBSD6 */ - #ifdef COMPAT_FREEBSD7 #define nosys linux_nosys #endif /* COMPAT_FREEBSD7 */ - #ifdef COMPAT_FREEBSD10 #define nosys linux_nosys #endif /* COMPAT_FREEBSD10 */ - #ifdef COMPAT_FREEBSD11 #define nosys linux_nosys #endif /* COMPAT_FREEBSD11 */ - #ifdef COMPAT_FREEBSD12 #define nosys linux_nosys diff --git a/sys/arm/mv/a37x0_gpio.c b/sys/arm/mv/a37x0_gpio.c index 379048223cf5..6e9613b1ef7d 100644 --- a/sys/arm/mv/a37x0_gpio.c +++ b/sys/arm/mv/a37x0_gpio.c @@ -76,7 +76,6 @@ struct a37x0_gpio_softc { #define A37X0_GPIO_OUTPUT(_p) (0x18 + ((_p) / 32) * 4) #define A37X0_GPIO_SEL 0x30 - static struct ofw_compat_data compat_data[] = { { "marvell,armada3710-nb-pinctrl", A37X0_NB_GPIO }, { "marvell,armada3710-sb-pinctrl", A37X0_SB_GPIO }, diff --git a/sys/arm/mv/armada/wdt.c b/sys/arm/mv/armada/wdt.c index edc91e602211..920ff4d506bb 100644 --- a/sys/arm/mv/armada/wdt.c +++ b/sys/arm/mv/armada/wdt.c @@ -131,7 +131,6 @@ static void mv_watchdog_event(void *, unsigned int, int *); static device_method_t mv_wdt_methods[] = { DEVMETHOD(device_probe, mv_wdt_probe), DEVMETHOD(device_attach, mv_wdt_attach), - { 0, 0 } }; diff --git a/sys/arm/mv/armada38x/armada38x_rtc.c b/sys/arm/mv/armada38x/armada38x_rtc.c index 0232ec240aac..ff89094194a7 100644 --- a/sys/arm/mv/armada38x/armada38x_rtc.c +++ b/sys/arm/mv/armada38x/armada38x_rtc.c @@ -92,11 +92,9 @@ __FBSDID("$FreeBSD$"); #define A8K_RTC_READ_OUTPUT_DELAY_MASK 0x000000FFFF #define A8K_RTC_READ_OUTPUT_DELAY_VAL 0x3F - #define RTC_RES 0 #define RTC_SOC_RES 1 - static struct resource_spec res_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_MEMORY, 1, RF_ACTIVE }, diff --git a/sys/arm/mv/armada38x/pmsu.c b/sys/arm/mv/armada38x/pmsu.c index d36218a9a10e..7df368d0c051 100644 --- a/sys/arm/mv/armada38x/pmsu.c +++ b/sys/arm/mv/armada38x/pmsu.c @@ -69,7 +69,6 @@ static device_method_t pmsu_methods[] = { DEVMETHOD(device_probe, pmsu_probe), DEVMETHOD(device_attach, pmsu_attach), DEVMETHOD(device_detach, pmsu_detach), - { 0, 0 } }; diff --git a/sys/arm/mv/armadaxp/armadaxp.c b/sys/arm/mv/armadaxp/armadaxp.c index cf8944b1e233..bfd118d62705 100644 --- a/sys/arm/mv/armadaxp/armadaxp.c +++ b/sys/arm/mv/armadaxp/armadaxp.c @@ -319,4 +319,3 @@ armadaxp_l2_init(void) reg |= (7 << 16); write_coher_fabric(COHER_FABRIC_CIB_CTRL, reg); } - diff --git a/sys/arm/mv/gpio.c b/sys/arm/mv/gpio.c index 04215c05bf6a..397c6542b75e 100644 --- a/sys/arm/mv/gpio.c +++ b/sys/arm/mv/gpio.c @@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" - #define GPIO_MAX_INTR_COUNT 8 #define GPIO_PINS_PER_REG 32 #define GPIO_GENERIC_CAP (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ diff --git a/sys/arm/mv/mv_ap806_clock.c b/sys/arm/mv/mv_ap806_clock.c index 2516ce72d35c..378640633c03 100644 --- a/sys/arm/mv/mv_ap806_clock.c +++ b/sys/arm/mv/mv_ap806_clock.c @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include - #include "syscon_if.h" static struct clk_fixed_def ap806_clk_cluster_0 = { @@ -98,8 +97,6 @@ struct mv_ap806_clock_softc { struct syscon *syscon; }; - - static struct ofw_compat_data compat_data[] = { {"marvell,ap806-clock", 1}, {NULL, 0} diff --git a/sys/arm/mv/mv_ap806_gicp.c b/sys/arm/mv/mv_ap806_gicp.c index c876dda224a5..da93a32f2b23 100644 --- a/sys/arm/mv/mv_ap806_gicp.c +++ b/sys/arm/mv/mv_ap806_gicp.c @@ -167,9 +167,6 @@ mv_ap806_gicp_convert_map_data(struct mv_ap806_gicp_softc *sc, return ((struct intr_map_data *)sc->parent_map_data); } - - - static int mv_ap806_gicp_activate_intr(device_t dev, struct intr_irqsrc *isrc, struct resource *res, struct intr_map_data *data) diff --git a/sys/arm/mv/mv_ap806_sei.c b/sys/arm/mv/mv_ap806_sei.c index 8d3136c2203c..5022e6765d0a 100644 --- a/sys/arm/mv/mv_ap806_sei.c +++ b/sys/arm/mv/mv_ap806_sei.c @@ -68,8 +68,6 @@ __FBSDID("$FreeBSD$"); #define GICP_SEMR(i) (0x20 + (((i)/32) * 0x4)) #define GICP_SEMR_BIT(i) ((i) % 32) - - struct mv_ap806_sei_irqsrc { struct intr_irqsrc isrc; u_int irq; @@ -179,8 +177,6 @@ mv_ap806_sei_map_intr(device_t dev, struct intr_map_data *data, return (rv); } - - static int mv_ap806_sei_setup_intr(device_t dev, struct intr_irqsrc *isrc, struct resource *res, struct intr_map_data *data) @@ -290,7 +286,6 @@ mv_ap806_sei_intr(void *arg) return (FILTER_HANDLED); } - static int mv_ap806_sei_probe(device_t dev) { @@ -365,7 +360,7 @@ mv_ap806_sei_attach(device_t dev) rv = ENXIO; goto fail; } - + OF_device_register_xref(xref, dev); return (0); @@ -387,7 +382,6 @@ mv_ap806_sei_detach(device_t dev) return (EBUSY); } - static device_method_t mv_ap806_sei_methods[] = { /* Device interface */ DEVMETHOD(device_probe, mv_ap806_sei_probe), diff --git a/sys/arm/mv/mv_armv7_machdep.c b/sys/arm/mv/mv_armv7_machdep.c index 810ebd260782..3ecd69f435a6 100644 --- a/sys/arm/mv/mv_armv7_machdep.c +++ b/sys/arm/mv/mv_armv7_machdep.c @@ -480,4 +480,3 @@ static platform_method_t mv_axp_methods[] = { PLATFORMMETHOD_END, }; FDT_PLATFORM_DEF(mv_axp, "mv_axp", 0, "marvell,armadaxp", 100); - diff --git a/sys/arm/mv/mv_common.c b/sys/arm/mv/mv_common.c index 31d0711ad0a8..cef91fac7af4 100644 --- a/sys/arm/mv/mv_common.c +++ b/sys/arm/mv/mv_common.c @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include - MALLOC_DEFINE(M_IDMA, "idma", "idma dma test memory"); #define IDMA_DEBUG @@ -356,7 +355,6 @@ static struct fdt_pm_mask_entry fdt_pm_mask_table[] = { { "mrvl,usb-ehci", CPU_PM_CTRL_USB(2) }, { "mrvl,xor", CPU_PM_CTRL_XOR }, { "mrvl,sata", CPU_PM_CTRL_SATA }, - { NULL, 0 } }; @@ -866,7 +864,6 @@ soc_decode_win(void) if ((err = decode_win_sdram_fixup()) != 0) return(err); - decode_win_cpu_setup(); if (MV_DUMP_WIN) soc_dump_decode_win(); @@ -1218,7 +1215,6 @@ decode_win_cpu_valid(void) rv = 1; for (i = 0; i < cpu_wins_no; i++) { - if (cpu_wins[i].target == 0) { printf("CPU window#%d: DDR target window is not " "supposed to be reprogrammed!\n", i); @@ -1692,7 +1688,6 @@ decode_win_usb3_setup(u_long base) } } - /************************************************************************** * ETH windows routines **************************************************************************/ @@ -1780,7 +1775,6 @@ decode_win_eth_setup(u_long base) /* Disable, clear and revoke protection for all ETH windows */ for (i = 0; i < MV_WIN_ETH_MAX; i++) { - eth_bare_write(base, i, 1); eth_epap_write(base, i, 0); win_eth_br_write(base, i, 0); @@ -1792,7 +1786,6 @@ decode_win_eth_setup(u_long base) /* Only access to active DRAM banks is required */ for (i = 0; i < MV_WIN_DDR_MAX; i++) if (ddr_is_active(i)) { - br = ddr_base(i) | (ddr_attr(i) << 8) | MV_WIN_ETH_DDR_TRGT(i); sz = ((ddr_size(i) - 1) & 0xffff0000); @@ -2003,7 +1996,6 @@ decode_win_idma_setup(u_long base) * Disable and clear all IDMA windows, revoke protection for all channels */ for (i = 0; i < MV_WIN_IDMA_MAX; i++) { - idma_bare_write(base, i, 1); win_idma_br_write(base, i, 0); win_idma_sz_write(base, i, 0); @@ -2025,7 +2017,6 @@ decode_win_idma_setup(u_long base) for (j = 0; j < MV_WIN_IDMA_MAX; j++) if (win_idma_can_remap(j) != 1 && idma_bare_read(base, j) == 1) { - /* Configure window */ win_idma_br_write(base, j, br); win_idma_sz_write(base, j, sz); @@ -2095,7 +2086,6 @@ decode_win_idma_valid(void) wintab = idma_wins; rv = 1; for (i = 0; i < idma_wins_no; i++, wintab++) { - if (wintab->target == 0) { printf("IDMA window#%d: DDR target window is not " "supposed to be reprogrammed!\n", i); @@ -2312,7 +2302,6 @@ decode_win_xor_setup(u_long base) */ m = xor_max_eng(); for (j = 0; j < m; j++, e--) { - /* Number of non-remaped windows */ window = MV_XOR_NON_REMAP - 1; @@ -2389,7 +2378,6 @@ decode_win_xor_valid(void) wintab = xor_wins; rv = 1; for (i = 0; i < xor_wins_no; i++, wintab++) { - if (wintab->target == 0) { printf("XOR window#%d: DDR target window is not " "supposed to be reprogrammed!\n", i); diff --git a/sys/arm/mv/mv_cp110_clock.c b/sys/arm/mv/mv_cp110_clock.c index 753dfaa045f6..84519b870d9a 100644 --- a/sys/arm/mv/mv_cp110_clock.c +++ b/sys/arm/mv/mv_cp110_clock.c @@ -131,7 +131,6 @@ struct mv_cp110_clock_softc { struct mtx mtx; }; - static struct ofw_compat_data compat_data[] = { {"marvell,cp110-clock", 1}, {NULL, 0} diff --git a/sys/arm/mv/mv_cp110_icu.c b/sys/arm/mv/mv_cp110_icu.c index e168b141d9e0..41e727ccc695 100644 --- a/sys/arm/mv/mv_cp110_icu.c +++ b/sys/arm/mv/mv_cp110_icu.c @@ -173,7 +173,6 @@ mv_cp110_icu_convert_map_data(struct mv_cp110_icu_softc *sc, struct intr_map_dat return ((struct intr_map_data *)sc->parent_map_data); } - static int mv_cp110_icu_detach(device_t dev) { @@ -213,8 +212,6 @@ mv_cp110_icu_disable_intr(device_t dev, struct intr_irqsrc *isrc) PIC_DISABLE_INTR(sc->parent, isrc); } - - static int mv_cp110_icu_map_intr(device_t dev, struct intr_map_data *data, struct intr_irqsrc **isrcp) diff --git a/sys/arm/mv/mv_localbus.c b/sys/arm/mv/mv_localbus.c index e2367ceb0a86..a313f9664242 100644 --- a/sys/arm/mv/mv_localbus.c +++ b/sys/arm/mv/mv_localbus.c @@ -136,7 +136,6 @@ static device_method_t localbus_methods[] = { DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), - { 0, 0 } }; @@ -151,7 +150,6 @@ const struct localbus_va_entry localbus_virtmap[] = { { 1, MV_DEV_CS0_BASE, MV_DEV_CS0_SIZE }, { 2, MV_DEV_CS1_BASE, MV_DEV_CS1_SIZE }, { 3, MV_DEV_CS2_BASE, MV_DEV_CS2_SIZE }, - { -1, 0, 0 } }; @@ -184,7 +182,6 @@ fdt_localbus_reg_decode(phandle_t node, struct localbus_softc *sc, regptr = reg; for (i = 0; i < tuples; i++) { - bank = fdt_data_get((void *)regptr, 1); if (bank >= MV_LOCALBUS_MAX_BANKS) { @@ -270,7 +267,6 @@ localbus_attach(device_t dev) dt_node = ofw_bus_get_node(dev); for (dt_child = OF_child(dt_node); dt_child != 0; dt_child = OF_peer(dt_child)) { - /* Check and process 'status' property. */ if (!(ofw_bus_node_status_okay(dt_child))) continue; @@ -366,7 +362,6 @@ localbus_alloc_resource(device_t bus, device_t child, int type, int *rid, count, flags)); } - static struct resource_list * localbus_get_resource_list(device_t bus, device_t child) { @@ -432,7 +427,6 @@ fdt_localbus_devmap(phandle_t dt_node, struct devmap_entry *fdt_devmap, /* Process data from FDT */ for (i = 0; i < dev_num; i++) { - /* First field is bank number */ bank = fdt_data_get((void *)rangesptr, 1); rangesptr += 1; diff --git a/sys/arm/mv/mv_pci_ctrl.c b/sys/arm/mv/mv_pci_ctrl.c index 4071ad40fafd..0b51a5289c9e 100644 --- a/sys/arm/mv/mv_pci_ctrl.c +++ b/sys/arm/mv/mv_pci_ctrl.c @@ -249,7 +249,6 @@ mv_pcib_ctrl_alloc_resource(device_t bus, device_t child, int type, int *rid, int i; if (RMAN_IS_DEFAULT_RANGE(start, end)) { - if ((di = device_get_ivars(child)) == NULL) return (NULL); if (type != SYS_RES_MEMORY) diff --git a/sys/arm/mv/mv_spi.c b/sys/arm/mv/mv_spi.c index 95d7d21e85c3..256c8ff9161c 100644 --- a/sys/arm/mv/mv_spi.c +++ b/sys/arm/mv/mv_spi.c @@ -338,7 +338,6 @@ mv_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) MV_SPI_WRITE(sc, MV_SPI_CONTROL, reg | MV_SPI_CTRL_CS_ACTIVE); while ((resid = sc->sc_len - sc->sc_written) > 0) { - MV_SPI_WRITE(sc, MV_SPI_INTR_STAT, 0); /* diff --git a/sys/arm/mv/mv_thermal.c b/sys/arm/mv/mv_thermal.c index 30c08ce8e930..ed47f25a40c1 100644 --- a/sys/arm/mv/mv_thermal.c +++ b/sys/arm/mv/mv_thermal.c @@ -312,7 +312,6 @@ mv_thermal_attach(device_t dev) mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF); - if (SYSCON_GET_HANDLE(sc->dev, &sc->syscon) != 0 || sc->syscon == NULL) { device_printf(dev, "cannot get syscon for device\n"); diff --git a/sys/arm/mv/mvebu_gpio.c b/sys/arm/mv/mvebu_gpio.c index 21a6243f5689..afc3f177ade3 100644 --- a/sys/arm/mv/mvebu_gpio.c +++ b/sys/arm/mv/mvebu_gpio.c @@ -238,7 +238,6 @@ mvebu_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) if (pin >= sc->gpio_npins) return (EINVAL); - mvebu_gpio_pin_configure(sc, &sc->gpio_pins[pin], flags); return (0); @@ -299,7 +298,6 @@ mvebu_gpio_pin_toggle(device_t dev, uint32_t pin) return (0); } - /* -------------------------------------------------------------------------- * * Interrupts @@ -338,7 +336,6 @@ mvebu_gpio_isrc_eoi(struct mvebu_gpio_softc *sc, intr_modify(sc, GPIO_INT_CAUSE, mgi, 1, 1); } - static int mvebu_gpio_pic_attach(struct mvebu_gpio_softc *sc) { @@ -378,7 +375,6 @@ mvebu_gpio_pic_detach(struct mvebu_gpio_softc *sc) return (EBUSY); } - static void mvebu_gpio_pic_disable_intr(device_t dev, struct intr_irqsrc *isrc) { @@ -419,7 +415,6 @@ mvebu_gpio_pic_map_fdt(struct mvebu_gpio_softc *sc, u_int ncells, if (ncells != 2 || cells[0] >= sc->gpio_npins) return (EINVAL); - switch (cells[1]) { case 1: inverted = false; @@ -448,7 +443,6 @@ mvebu_gpio_pic_map_fdt(struct mvebu_gpio_softc *sc, u_int ncells, return (0); } - static int mvebu_gpio_pic_map_gpio(struct mvebu_gpio_softc *sc, u_int gpio_pin_num, u_int gpio_pin_flags, u_int intr_mode, u_int *irqp, bool *invertedp, @@ -638,7 +632,6 @@ mvebu_gpio_intr(void *arg) struct mvebu_gpio_irqsrc *mgi; struct mvebu_gpio_irq_cookie *cookie; - cookie = (struct mvebu_gpio_irq_cookie *)arg; sc = cookie->sc; tf = curthread->td_intr_frame; diff --git a/sys/arm/mv/mvebu_pinctrl.c b/sys/arm/mv/mvebu_pinctrl.c index 1f9df8fbf3b6..930c6878370f 100644 --- a/sys/arm/mv/mvebu_pinctrl.c +++ b/sys/arm/mv/mvebu_pinctrl.c @@ -103,7 +103,6 @@ struct mv_pinctrl_softc { struct mv_padconf *padconf; }; - static struct ofw_compat_data compat_data[] = { {"marvell,ap806-pinctrl", (uintptr_t)&ap806_padconf}, {NULL, 0} diff --git a/sys/arm/mv/mvwin.h b/sys/arm/mv/mvwin.h index 54c5835eb8f6..967b626200c0 100644 --- a/sys/arm/mv/mvwin.h +++ b/sys/arm/mv/mvwin.h @@ -96,7 +96,6 @@ #define MV_DEV_CS2_BASE 0xFB500000 #define MV_DEV_CS2_SIZE (1024 * 1024) /* 1 MB */ - /* * Integrated SoC peripherals addresses */ @@ -105,7 +104,6 @@ #define MV_DDR_CADR_BASE (MV_BASE + 0x1500) #define MV_MPP_BASE (MV_BASE + 0x10000) - #define MV_MISC_BASE (MV_BASE + 0x18200) #define MV_MBUS_BRIDGE_BASE (MV_BASE + 0x20000) #define MV_INTREGS_BASE (MV_MBUS_BRIDGE_BASE + 0x80) diff --git a/sys/arm/mv/timer.c b/sys/arm/mv/timer.c index 4d8b17ff9aaa..14052ac2ca25 100644 --- a/sys/arm/mv/timer.c +++ b/sys/arm/mv/timer.c @@ -287,7 +287,6 @@ mv_hardclock(void *arg) static device_method_t mv_timer_methods[] = { DEVMETHOD(device_probe, mv_timer_probe), DEVMETHOD(device_attach, mv_timer_attach), - { 0, 0 } }; diff --git a/sys/arm/nvidia/as3722_gpio.c b/sys/arm/nvidia/as3722_gpio.c index 2ec5b5282c16..1afdb8a94f8b 100644 --- a/sys/arm/nvidia/as3722_gpio.c +++ b/sys/arm/nvidia/as3722_gpio.c @@ -124,7 +124,6 @@ struct as3722_gpio_pin { int pin_cfg_flags; }; - /* -------------------------------------------------------------------------- * * Pinmux functions. @@ -141,8 +140,6 @@ as3722_pinmux_get_function(struct as3722_softc *sc, char *name) return (-1); } - - static int as3722_pinmux_config_node(struct as3722_softc *sc, char *pin_name, struct as3722_pincfg *cfg) @@ -276,7 +273,6 @@ int as3722_pinmux_configure(device_t dev, phandle_t cfgxref) rv = as3722_pinmux_process_node(sc, node); if (rv != 0) device_printf(dev, "Failed to process pinmux"); - } return (0); } @@ -553,7 +549,6 @@ as3722_gpio_attach(struct as3722_softc *sc, phandle_t node) sc->gpio_pins = malloc(sizeof(struct as3722_gpio_pin *) * sc->gpio_npins, M_AS3722_GPIO, M_WAITOK | M_ZERO); - sc->gpio_busdev = gpiobus_attach_bus(sc->dev); if (sc->gpio_busdev == NULL) return (ENXIO); diff --git a/sys/arm/nvidia/as3722_regulators.c b/sys/arm/nvidia/as3722_regulators.c index 5347d85cf302..d6cb5c529177 100644 --- a/sys/arm/nvidia/as3722_regulators.c +++ b/sys/arm/nvidia/as3722_regulators.c @@ -71,7 +71,6 @@ enum as3722_reg_id { AS3722_REG_ID_LDO11, }; - /* Regulator HW definition. */ struct reg_def { intptr_t id; /* ID */ @@ -362,7 +361,6 @@ static struct reg_def as3722s_def[] = { }, }; - struct as3722_regnode_init_def { struct regnode_init_def reg_init_def; int ext_control; @@ -487,7 +485,6 @@ as3722_regnode_init(struct regnode *regnode) } if (sc->ext_control) { - rv = as3722_reg_enable(sc); if (rv < 0) { device_printf(sc->base_sc->dev, @@ -529,7 +526,6 @@ struct as3722_regnode_init_def *init_def) if (OF_hasprop(node, "ams,enable-tracking")) init_def->enable_tracking = 1; - /* Get parent supply. */ if (def->supply_name == NULL) return; @@ -619,7 +615,6 @@ as3722_regulator_attach(struct as3722_softc *sc, phandle_t node) sc->regs = malloc(sizeof(struct as3722_reg_sc *) * sc->nregs, M_AS3722_REG, M_WAITOK | M_ZERO); - /* Attach all known regulators if exist in DT. */ for (i = 0; i < sc->nregs; i++) { child = ofw_bus_find_child(rnode, as3722s_def[i].name); diff --git a/sys/arm/nvidia/drm2/hdmi.h b/sys/arm/nvidia/drm2/hdmi.h index 27868e08b436..df9831546428 100644 --- a/sys/arm/nvidia/drm2/hdmi.h +++ b/sys/arm/nvidia/drm2/hdmi.h @@ -26,7 +26,6 @@ #ifndef _HDMI_H_ #define _HDMI_H_ - enum hdmi_infoframe_type { HDMI_INFOFRAME_TYPE_VENDOR = 0x81, HDMI_INFOFRAME_TYPE_AVI = 0x82, @@ -282,7 +281,6 @@ enum hdmi_3d_structure { HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF = 8, }; - struct hdmi_vendor_infoframe { enum hdmi_infoframe_type type; unsigned char version; diff --git a/sys/arm/nvidia/drm2/tegra_bo.c b/sys/arm/nvidia/drm2/tegra_bo.c index f9f230f8765f..7479fd8bc8da 100644 --- a/sys/arm/nvidia/drm2/tegra_bo.c +++ b/sys/arm/nvidia/drm2/tegra_bo.c @@ -232,8 +232,6 @@ tegra_bo_create(struct drm_device *drm, size_t size, struct tegra_bo **res_bo) return (0); } - - static int tegra_bo_create_with_handle(struct drm_file *file, struct drm_device *drm, size_t size, uint32_t *handle, struct tegra_bo **res_bo) diff --git a/sys/arm/nvidia/drm2/tegra_dc.c b/sys/arm/nvidia/drm2/tegra_dc.c index 16d36b69faca..a5e661dab6b2 100644 --- a/sys/arm/nvidia/drm2/tegra_dc.c +++ b/sys/arm/nvidia/drm2/tegra_dc.c @@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$"); #define ASSERT_LOCKED(_sc) mtx_assert(&_sc->mtx, MA_OWNED) #define ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->mtx, MA_NOTOWNED) - #define SYNCPT_VBLANK0 26 #define SYNCPT_VBLANK1 27 @@ -86,7 +85,6 @@ static uint32_t dc_plane_formats[] = { DRM_FORMAT_YUV422, }; - /* Complete description of one window (plane) */ struct dc_window { /* Source (in framebuffer) rectangle, in pixels */ @@ -138,7 +136,6 @@ struct dc_softc { struct drm_gem_object *cursor_gem; }; - static struct ofw_compat_data compat_data[] = { {"nvidia,tegra124-dc", 1}, {NULL, 0}, @@ -655,7 +652,6 @@ dc_crtc_mode_set(struct drm_crtc *drm_crtc, struct drm_display_mode *mode, sc = device_get_softc(crtc->dev); fb = container_of(drm_crtc->fb, struct tegra_fb, drm_fb); - h_ref_to_sync = 1; v_ref_to_sync = 1; /* Setup timing */ @@ -736,7 +732,6 @@ dc_crtc_mode_set_base(struct drm_crtc *drm_crtc, int x, int y, return (rv); } - static void dc_crtc_prepare(struct drm_crtc *drm_crtc) { @@ -915,7 +910,6 @@ dc_finish_page_flip(struct dc_softc *sc) mtx_unlock(&drm->event_lock); } - void tegra_dc_cancel_page_flip(struct drm_crtc *drm_crtc, struct drm_file *file) { diff --git a/sys/arm/nvidia/drm2/tegra_dc_reg.h b/sys/arm/nvidia/drm2/tegra_dc_reg.h index 7006eb71d74c..377f3e210681 100644 --- a/sys/arm/nvidia/drm2/tegra_dc_reg.h +++ b/sys/arm/nvidia/drm2/tegra_dc_reg.h @@ -206,7 +206,6 @@ #define PULSE_END(x) (((x) & 0xfff) << 16) #define PULSE_START(x) (((x) & 0xfff) << 0) - #define DC_DISP_DISP_CLOCK_CONTROL 0x42e #define PIXEL_CLK_DIVIDER(x) (((x) & 0xf) << 8) #define PCD1 0 @@ -360,7 +359,6 @@ #define WIN_PRESCALED_SIZE(h, v) ((((h) & 0x7fff) << 0) | \ (((v) & 0x1fff) << 16)) - #define DC_WIN_H_INITIAL_DDA 0x707 #define DC_WIN_V_INITIAL_DDA 0x708 #define DC_WIN_DDA_INCREMENT 0x709 diff --git a/sys/arm/nvidia/drm2/tegra_drm.h b/sys/arm/nvidia/drm2/tegra_drm.h index 6485761e7224..ada4f4434e65 100644 --- a/sys/arm/nvidia/drm2/tegra_drm.h +++ b/sys/arm/nvidia/drm2/tegra_drm.h @@ -115,7 +115,6 @@ int tegra_drm_fb_create(struct drm_device *drm, struct drm_file *file, int tegra_drm_fb_init(struct drm_device *drm); void tegra_drm_fb_destroy(struct drm_device *drm); - /* tegra_bo.c */ struct tegra_bo; int tegra_bo_create(struct drm_device *drm, size_t size, diff --git a/sys/arm/nvidia/drm2/tegra_hdmi.c b/sys/arm/nvidia/drm2/tegra_hdmi.c index 8c9f55a137ce..0c9315ec31a0 100644 --- a/sys/arm/nvidia/drm2/tegra_hdmi.c +++ b/sys/arm/nvidia/drm2/tegra_hdmi.c @@ -177,7 +177,6 @@ static const struct tmds_config tegra124_tmds_config[] = }, }; - struct hdmi_softc { device_t dev; struct resource *mem_res; @@ -293,7 +292,6 @@ hdmi_setup_clock(struct tegra_drm_encoder *output, clk_t clk, uint64_t pclk) if (rv != 0) { device_printf(output->dev, "Cannot set parent clock\n"); return (rv); - } rv = clk_set_freq(clk, freq, 0); if (rv != 0) { @@ -378,7 +376,6 @@ audio_setup_infoframe(struct hdmi_softc *sc) uint8_t buf[14], *hdr, *pb; ssize_t rv; - rv = hdmi_audio_infoframe_init(&frame); frame.channels = sc->audio_chans; rv = hdmi_audio_infoframe_pack(&frame, buf, sizeof(buf)); @@ -496,7 +493,6 @@ get_hda_cts_n(uint32_t audio_freq_hz, uint32_t pixclk_freq_hz, better_n = abs(n - ideal_n) < abs((int)(*best_n) - ideal_n); if (TO_FFP(aval) == aval_f && (err_f < min_err_f || (err_f == min_err_f && better_n))) { - min_err_f = err_f; *best_n = (uint32_t)n; *best_cts = (uint32_t)cts; @@ -913,7 +909,6 @@ hdmi_connector_mode_valid(struct drm_connector *connector, return (MODE_OK); } - static const struct drm_connector_helper_funcs hdmi_connector_helper_funcs = { .get_modes = tegra_drm_connector_get_modes, .mode_valid = hdmi_connector_mode_valid, @@ -1109,7 +1104,6 @@ enable_fdt_resources(struct hdmi_softc *sc) { int rv; - rv = clk_set_parent_by_clk(sc->clk_hdmi, sc->clk_parent); if (rv != 0) { device_printf(sc->dev, diff --git a/sys/arm/nvidia/drm2/tegra_hdmi_reg.h b/sys/arm/nvidia/drm2/tegra_hdmi_reg.h index 1fd387aa704f..091eb2386773 100644 --- a/sys/arm/nvidia/drm2/tegra_hdmi_reg.h +++ b/sys/arm/nvidia/drm2/tegra_hdmi_reg.h @@ -216,7 +216,6 @@ #define HDMI_NV_PDISP_SOR_LANE_DRIVE_CURRENT 0x07e - #define HDMI_NV_PDISP_AUDIO_N 0x08c #define AUDIO_N_LOOKUP (1 << 28) #define AUDIO_N_GENERATE_ALTERNATE (1 << 24) @@ -281,5 +280,4 @@ #define HDMI_NV_PDISP_SOR_IO_PEAK_CURRENT 0x0d1 #define HDMI_NV_PDISP_SOR_PAD_CTLS0 0x0d2 - #endif /* _TEGRA_HDMI_REG_H_ */ diff --git a/sys/arm/nvidia/drm2/tegra_host1x.c b/sys/arm/nvidia/drm2/tegra_host1x.c index b8271964211c..6d76beb83cd5 100644 --- a/sys/arm/nvidia/drm2/tegra_host1x.c +++ b/sys/arm/nvidia/drm2/tegra_host1x.c @@ -112,7 +112,6 @@ struct host1x_softc { struct tegra_drm *tegra_drm; }; - static void host1x_output_poll_changed(struct drm_device *drm_dev) { @@ -128,7 +127,6 @@ static const struct drm_mode_config_funcs mode_config_funcs = { .output_poll_changed = host1x_output_poll_changed, }; - static int host1x_drm_init(struct host1x_softc *sc) { @@ -310,11 +308,9 @@ host1x_drm_disable_vblank(struct drm_device *drm_dev, int pipe) } } - static struct drm_ioctl_desc host1x_drm_ioctls[] = { }; - struct drm_driver tegra_drm_driver = { .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME, .load = host1x_drm_load, @@ -647,4 +643,3 @@ EARLY_DRIVER_MODULE(host1x, simplebus, host1x_driver, extern devclass_t fbd_devclass; extern driver_t fbd_driver; DRIVER_MODULE(fbd, host1x, fbd_driver, fbd_devclass, 0, 0); - diff --git a/sys/arm/nvidia/tegra124/tegra124_car.c b/sys/arm/nvidia/tegra124/tegra124_car.c index 60a19f8257de..7e776720a2e6 100644 --- a/sys/arm/nvidia/tegra124/tegra124_car.c +++ b/sys/arm/nvidia/tegra124/tegra124_car.c @@ -183,7 +183,6 @@ static uint32_t osc_freqs[16] = { [12] = 260000000, }; - /* Parent lists. */ PLIST(mux_pll_srcs) = {"osc_div_clk", NULL, "pllP_out0", NULL}; /* FIXME */ PLIST(mux_plle_src1) = {"osc_div_clk", "pllP_out0"}; @@ -192,7 +191,6 @@ PLIST(mux_plld_out0_plld2_out0) = {"pllD_out0", "pllD2_out0"}; PLIST(mux_xusb_hs) = {"xusb_ss_div2", "pllU_60"}; PLIST(mux_xusb_ss) = {"pc_xusb_ss", "osc_div_clk"}; - /* Clocks ajusted online. */ static struct clk_fixed_def fixed_clk_m = FRATE(TEGRA124_CLK_CLK_M, "clk_m", 12000000); @@ -226,7 +224,6 @@ static struct clk_fixed_def tegra124_fixed_clks[] = { }; - static struct clk_mux_def tegra124_mux_clks[] = { /* Core clocks. */ MUX(0, "pllD2_src", mux_pll_srcs, PLLD2_BASE, 25, 2), @@ -245,7 +242,6 @@ static struct clk_mux_def tegra124_mux_clks[] = { }; - static struct clk_gate_def tegra124_gate_clks[] = { /* Core clocks. */ GATE_PLL(0, "pllC_out1", "pllC_out1_div", PLLC_OUT, 0), @@ -347,7 +343,6 @@ init_gates(struct tegra124_car_softc *sc, struct clk_gate_def *clks, int nclks) { int i, rv; - for (i = 0; i < nclks; i++) { rv = clknode_gate_register(sc->clkdom, clks + i); if (rv != 0) @@ -360,7 +355,6 @@ init_muxes(struct tegra124_car_softc *sc, struct clk_mux_def *clks, int nclks) { int i, rv; - for (i = 0; i < nclks; i++) { rv = clknode_mux_register(sc->clkdom, clks + i); if (rv != 0) diff --git a/sys/arm/nvidia/tegra124/tegra124_car.h b/sys/arm/nvidia/tegra124/tegra124_car.h index b11742c3d012..2dcf06184aed 100644 --- a/sys/arm/nvidia/tegra124/tegra124_car.h +++ b/sys/arm/nvidia/tegra124/tegra124_car.h @@ -310,7 +310,6 @@ #define PLLP_OUTC 0x67c #define PLLP_MISC1 0x680 - struct tegra124_car_softc { device_t dev; struct resource * mem_res; @@ -334,4 +333,4 @@ void tegra124_super_mux_clock(struct tegra124_car_softc *sc); int tegra124_hwreset_by_idx(struct tegra124_car_softc *sc, intptr_t idx, bool reset); -#endif /*_TEGRA124_CAR_*/ \ No newline at end of file +#endif /*_TEGRA124_CAR_*/ diff --git a/sys/arm/nvidia/tegra124/tegra124_clk_per.c b/sys/arm/nvidia/tegra124/tegra124_clk_per.c index 6fe106587953..f1a36a447c1c 100644 --- a/sys/arm/nvidia/tegra124/tegra124_clk_per.c +++ b/sys/arm/nvidia/tegra124/tegra124_clk_per.c @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #define PERLCK_MUX_SHIFT 29 #define PERLCK_MUX_MASK 0x07 - struct periph_def { struct clknode_init_def clkdef; uint32_t base_reg; @@ -460,7 +459,6 @@ static struct periph_def periph_def[] = { CLK_8_1(0, "pc_tsec", mux_p_c2_c_c3_m_a_clkm, CLK_SOURCE_TSEC, 0), /* SPARE2 */ - CLK_8_1(0, "pc_mselect", mux_p_c2_c_c3_m_clks_clkm, CLK_SOURCE_MSELECT, 0), CLK_8_1(0, "pc_tsensor", mux_p_c2_c_c3_clkm_N_clks, CLK_SOURCE_TSENSOR, 0), CLK_8_1(0, "pc_i2s3", mux_a_N_audio3_N_p_N_clkm, CLK_SOURCE_I2S3, DCF_HAVE_ENA), @@ -592,7 +590,6 @@ periph_set_mux(struct clknode *clk, int idx) struct periph_sc *sc; uint32_t reg; - sc = clknode_get_softc(clk); if (!(sc->flags & DCF_HAVE_MUX)) return (ENXIO); diff --git a/sys/arm/nvidia/tegra124/tegra124_clk_pll.c b/sys/arm/nvidia/tegra124/tegra124_clk_pll.c index ddac84a30f98..7e04c39dcee7 100644 --- a/sys/arm/nvidia/tegra124/tegra124_clk_pll.c +++ b/sys/arm/nvidia/tegra124/tegra124_clk_pll.c @@ -415,7 +415,6 @@ pll_enable(struct pll_sc *sc) { uint32_t reg; - RD4(sc, sc->base_reg, ®); if (sc->type != PLL_E) reg &= ~PLL_BASE_BYPASS; @@ -567,7 +566,6 @@ plle_enable(struct pll_sc *sc) mnp_bits = &sc->mnp_bits; - /* Disable lock override. */ RD4(sc, sc->base_reg, ®); reg &= ~PLLE_BASE_LOCK_OVERRIDE; @@ -647,7 +645,6 @@ plle_enable(struct pll_sc *sc) reg |= XUSBIO_PLL_CFG0_SEQ_ENABLE; WR4(sc, XUSBIO_PLL_CFG0, reg); - /* Enable HW control and unreset SATA PLL. */ RD4(sc, SATA_PLL_CFG0, ®); reg &= ~SATA_PLL_CFG0_PADPLL_RESET_SWCTL; @@ -987,7 +984,6 @@ tegra124_pll_set_freq(struct clknode *clknode, uint64_t fin, uint64_t *fout, return (rv); } - static int tegra124_pll_init(struct clknode *clk, device_t dev) { diff --git a/sys/arm/nvidia/tegra124/tegra124_clk_super.c b/sys/arm/nvidia/tegra124/tegra124_clk_super.c index 1ff81797ed6c..808a262ad653 100644 --- a/sys/arm/nvidia/tegra124/tegra124_clk_super.c +++ b/sys/arm/nvidia/tegra124/tegra124_clk_super.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include "tegra124_car.h" - /* Flags */ #define SMF_HAVE_DIVIDER_2 1 diff --git a/sys/arm/nvidia/tegra124/tegra124_coretemp.c b/sys/arm/nvidia/tegra124/tegra124_coretemp.c index 1d6cd0f017e9..1ed592cc04ba 100644 --- a/sys/arm/nvidia/tegra124/tegra124_coretemp.c +++ b/sys/arm/nvidia/tegra124/tegra124_coretemp.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include "tegra_soctherm_if.h" - enum therm_info { CORETEMP_TEMP, CORETEMP_DELTA, @@ -71,12 +70,10 @@ coretemp_get_val_sysctl(SYSCTL_HANDLER_ARGS) enum therm_info type; char stemp[16]; - dev = (device_t) arg1; sc = device_get_softc(dev); type = arg2; - rv = TEGRA_SOCTHERM_GET_TEMPERATURE(sc->tsens_dev, sc->dev, sc->tsens_id, &temp); if (rv != 0) { @@ -103,7 +100,6 @@ coretemp_get_val_sysctl(SYSCTL_HANDLER_ARGS) break; } - if ((temp > sc->core_max_temp) && !sc->overheat_log) { sc->overheat_log = 1; @@ -262,7 +258,6 @@ static device_method_t tegra124_coretemp_methods[] = { DEVMETHOD(device_attach, tegra124_coretemp_attach), DEVMETHOD(device_detach, tegra124_coretemp_detach), - DEVMETHOD_END }; diff --git a/sys/arm/nvidia/tegra124/tegra124_cpufreq.c b/sys/arm/nvidia/tegra124/tegra124_cpufreq.c index 4de8603dee8a..629d8a7b8cfb 100644 --- a/sys/arm/nvidia/tegra124/tegra124_cpufreq.c +++ b/sys/arm/nvidia/tegra124/tegra124_cpufreq.c @@ -138,7 +138,6 @@ static struct speedo_entry tegra124_speedo_pllx_tbl[] = {2499000000ULL, 1400000, 0, 0}, }; - static struct cpu_volt_def tegra124_cpu_volt_pllx_def = { .min_uvolt = 1000000, /* XXX 0.9 V doesn't work on all boards */ @@ -241,7 +240,6 @@ freq_to_voltage(struct tegra124_cpufreq_softc *sc, uint64_t freq) ent = &sc->cpu_def->speedo_tbl[sc->cpu_def->speedo_nitems - 1]; scale = sc->cpu_def->speedo_scale; - /* uV = (c2 * speedo / scale + c1) * speedo / scale + c0) */ uv = DIV_ROUND_CLOSEST(ent->c2 * sc->speedo_value, scale); uv = DIV_ROUND_CLOSEST((uv + ent->c1) * sc->speedo_value, scale) + @@ -412,7 +410,6 @@ tegra124_cpufreq_get(device_t dev, struct cf_setting *cf) return (0); } - static int tegra124_cpufreq_type(device_t dev, int *type) { @@ -519,7 +516,6 @@ tegra124_cpufreq_attach(device_t dev) else sc->cpu_def = &tegra124_cpu_volt_dpll_def; - rv = get_fdt_resources(sc, sc->node); if (rv != 0) { return (rv); diff --git a/sys/arm/nvidia/tegra124/tegra124_mp.c b/sys/arm/nvidia/tegra124/tegra124_mp.c index 45b22009891e..19a1a2cfc99e 100644 --- a/sys/arm/nvidia/tegra124/tegra124_mp.c +++ b/sys/arm/nvidia/tegra124/tegra124_mp.c @@ -93,7 +93,6 @@ tegra124_mp_start_ap(platform_t plat) pmap_kextract((vm_offset_t)mpentry)); bus_space_read_4(fdtbus_bs_tag, exvec , TEGRA_EXCEPTION_VECTOR_ENTRY); - /* Wait until POWERGATE is ready (max 20 APB cycles). */ do { val = bus_space_read_4(fdtbus_bs_tag, pmc, @@ -119,7 +118,6 @@ tegra124_mp_start_ap(platform_t plat) PMC_PWRGATE_STATUS); } while ((val & mask) == 0); } - } dsb(); sev(); diff --git a/sys/arm/nvidia/tegra124/tegra124_mp.h b/sys/arm/nvidia/tegra124/tegra124_mp.h index 57785aa0b2be..fadf9d1aacea 100644 --- a/sys/arm/nvidia/tegra124/tegra124_mp.h +++ b/sys/arm/nvidia/tegra124/tegra124_mp.h @@ -32,4 +32,4 @@ void tegra124_mp_setmaxid(platform_t plat); void tegra124_mp_start_ap(platform_t plat); -#endif /*_TEGRA124_MP_H_*/ \ No newline at end of file +#endif /*_TEGRA124_MP_H_*/ diff --git a/sys/arm/nvidia/tegra124/tegra124_pmc.c b/sys/arm/nvidia/tegra124/tegra124_pmc.c index 7f40d8219d97..2af3826587cd 100644 --- a/sys/arm/nvidia/tegra124/tegra124_pmc.c +++ b/sys/arm/nvidia/tegra124/tegra124_pmc.c @@ -445,7 +445,6 @@ tegra124_pmc_parse_fdt(struct tegra124_pmc_softc *sc, phandle_t node) rv = OF_getencprop(node, "nvidia,lp0-vec", tmparr, sizeof(tmparr)); if (rv == sizeof(tmparr)) { - sc->lp0_vec_phys = tmparr[0]; sc->core_pmu_time = tmparr[1]; sc->lp0_vec_size = TEGRA_SUSPEND_NONE; diff --git a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c index 16b25483b146..52b3eb6a8962 100644 --- a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c +++ b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #define FUSE_XUSB_CALIB_HS_TERM_RANGE_ADJ(x) (((x) >> 7) & 0x0F); #define FUSE_XUSB_CALIB_HS_CURR_LEVEL_0(x) (((x) >> 0) & 0x3F); - /* Registers. */ #define XUSB_PADCTL_USB2_PAD_MUX 0x004 @@ -105,7 +104,6 @@ __FBSDID("$FreeBSD$"); #define IOPHY_USB3_PAD_CTL2_RX_TERM_CNTL(x) (((x) & 0x0003) << 2) #define IOPHY_USB3_PAD_CTL2_TX_TERM_CNTL(x) (((x) & 0x0003) << 0) - #define XUSB_PADCTL_IOPHY_USB3_PAD_CTL4(x) (0x068 + (x) * 4) #define XUSB_PADCTL_USB2_OTG_PAD_CTL0(x) (0x0A0 + (x) * 4) @@ -151,7 +149,6 @@ __FBSDID("$FreeBSD$"); #define USB3_PAD_MUX_PCIE_IDDQ_DISABLE(x) (1 << (1 + (x))) #define USB3_PAD_MUX_SATA_IDDQ_DISABLE (1 << 6) - #define XUSB_PADCTL_IOPHY_PLL_S0_CTL1 0x138 #define IOPHY_PLL_S0_CTL1_PLL1_LOCKDET (1 << 27) #define IOPHY_PLL_S0_CTL1_PLL1_MODE (1 << 24) @@ -173,11 +170,9 @@ __FBSDID("$FreeBSD$"); #define XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL5 0x158 #define XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL6 0x15C - #define WR4(_sc, _r, _v) bus_write_4((_sc)->mem_res, (_r), (_v)) #define RD4(_sc, _r) bus_read_4((_sc)->mem_res, (_r)) - struct padctl_softc { device_t dev; struct resource *mem_res; @@ -644,7 +639,6 @@ usb2_powerdown(struct padctl_softc *sc, struct padctl_lane *lane) return (0); } - static int phy_powerup(struct padctl_softc *sc) { diff --git a/sys/arm/nvidia/tegra_abpmisc.c b/sys/arm/nvidia/tegra_abpmisc.c index d51ec2e9729c..0841af27f247 100644 --- a/sys/arm/nvidia/tegra_abpmisc.c +++ b/sys/arm/nvidia/tegra_abpmisc.c @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #define PMC_STRAPPING_OPT_A_RAM_CODE_MASK_SHORT \ (0x3 << PMC_STRAPPING_OPT_A_RAM_CODE_SHIFT) - #define ABP_RD4(_sc, _r) bus_read_4((_sc)->abp_misc_res, (_r)) #define STR_RD4(_sc, _r) bus_read_4((_sc)->strap_opt_res, (_r)) diff --git a/sys/arm/nvidia/tegra_ahci.c b/sys/arm/nvidia/tegra_ahci.c index 7fde96309f8d..ceb2c9faadfc 100644 --- a/sys/arm/nvidia/tegra_ahci.c +++ b/sys/arm/nvidia/tegra_ahci.c @@ -134,7 +134,6 @@ static const struct sata_pad_calibration tegra124_pad_calibration[] = { #define T_SATA0_CHX_PHY_CTRL1_GEN1_TX_AMP_MASK 0xff #define T_SATA0_CHX_PHY_CTRL1_GEN1_TX_AMP_SHIFT 0 - #define T_SATA0_CHX_PHY_CTRL1_GEN2 0x694 #define T_SATA0_CHX_PHY_CTRL1_GEN2_TX_PEAK_MASK 0xff #define T_SATA0_CHX_PHY_CTRL1_GEN2_TX_PEAK_SHIFT 12 @@ -150,7 +149,6 @@ static const struct sata_pad_calibration tegra124_pad_calibration[] = { #define FUSE_SATA_CALIB 0x124 #define FUSE_SATA_CALIB_MASK 0x3 - #define SATA_AUX_MISC_CNTL 0x1108 #define SATA_AUX_PAD_PLL_CTRL_0 0x1120 #define SATA_AUX_PAD_PLL_CTRL_1 0x1124 @@ -204,7 +202,6 @@ get_fdt_resources(struct tegra_ahci_sc *sc, phandle_t node) { int rv; - rv = regulator_get_by_ofw_property(sc->dev, 0, "hvdd-supply", &sc->supply_hvdd ); if (rv != 0) { @@ -390,7 +387,6 @@ tegra_ahci_ctrl_init(struct tegra_ahci_sc *sc) val |= SATA_CONFIGURATION_EN_FPCI; SATA_WR4(sc, SATA_CONFIGURATION, val); - /* Pad calibration. */ val = tegra_fuse_read_4(FUSE_SATA_CALIB); calib = tegra124_pad_calibration + (val & FUSE_SATA_CALIB_MASK); diff --git a/sys/arm/nvidia/tegra_efuse.c b/sys/arm/nvidia/tegra_efuse.c index 96bb12e32287..253ae8b6cf36 100644 --- a/sys/arm/nvidia/tegra_efuse.c +++ b/sys/arm/nvidia/tegra_efuse.c @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include - #define RD4(_sc, _r) bus_read_4((_sc)->mem_res, (_sc)->fuse_begin + (_r)) static struct ofw_compat_data compat_data[] = { @@ -180,7 +179,6 @@ tegra124_rev_sku_to_speedo_ids(struct tegra_efuse_softc *sc, } } - static void tegra124_init_speedo(struct tegra_efuse_softc *sc, struct tegra_sku_info *sku) { @@ -228,13 +226,11 @@ tegra124_init_speedo(struct tegra_efuse_softc *sc, struct tegra_sku_info *sku) uint32_t tegra_fuse_read_4(int addr) { - if (dev_sc == NULL) panic("tegra_fuse_read_4 called too early"); return (RD4(dev_sc, addr)); } - static void tegra_efuse_dump_sku(void) { diff --git a/sys/arm/nvidia/tegra_gpio.c b/sys/arm/nvidia/tegra_gpio.c index 7626d3072bee..3cd30ad0dc30 100644 --- a/sys/arm/nvidia/tegra_gpio.c +++ b/sys/arm/nvidia/tegra_gpio.c @@ -425,7 +425,6 @@ tegra_gpio_intr(void *arg) device_printf(sc->dev, "Stray irq %u disabled\n", irq); } - } } @@ -470,7 +469,6 @@ tegra_gpio_pic_detach(struct tegra_gpio_softc *sc) return (EBUSY); } - static void tegra_gpio_pic_disable_intr(device_t dev, struct intr_irqsrc *isrc) { @@ -535,7 +533,6 @@ tegra_gpio_pic_map_fdt(struct tegra_gpio_softc *sc, u_int ncells, return (0); } - static int tegra_gpio_pic_map_gpio(struct tegra_gpio_softc *sc, u_int gpio_pin_num, u_int gpio_pin_flags, u_int intr_mode, u_int *irqp, uint32_t *regp) diff --git a/sys/arm/nvidia/tegra_i2c.c b/sys/arm/nvidia/tegra_i2c.c index ed0074277d02..6e5285808bc7 100644 --- a/sys/arm/nvidia/tegra_i2c.c +++ b/sys/arm/nvidia/tegra_i2c.c @@ -484,7 +484,6 @@ tegra_i2c_start_msg(struct tegra_i2c_softc *sc, struct iic_msg *msg, (1 << PACKET_HEADER0_PACKET_ID_SHIFT); WR4(sc, I2C_TX_PACKET_FIFO, tmp); - /* Packet size. */ WR4(sc, I2C_TX_PACKET_FIFO, msg->len - 1); diff --git a/sys/arm/nvidia/tegra_lic.c b/sys/arm/nvidia/tegra_lic.c index b029913cd074..0ac293f4962d 100644 --- a/sys/arm/nvidia/tegra_lic.c +++ b/sys/arm/nvidia/tegra_lic.c @@ -156,7 +156,6 @@ tegra_lic_pre_ithread(device_t dev, struct intr_irqsrc *isrc) PIC_PRE_ITHREAD(sc->parent, isrc); } - static void tegra_lic_post_ithread(device_t dev, struct intr_irqsrc *isrc) { @@ -232,7 +231,6 @@ tegra_lic_attach(device_t dev) WR4(sc, i, LIC_CPU_IEP_CLASS, 0); } - if (intr_pic_register(dev, OF_xref_from_node(node)) == NULL) { device_printf(dev, "Cannot register PIC\n"); goto fail; diff --git a/sys/arm/nvidia/tegra_mc.c b/sys/arm/nvidia/tegra_mc.c index 82455ab475cb..7612e7bbff6a 100644 --- a/sys/arm/nvidia/tegra_mc.c +++ b/sys/arm/nvidia/tegra_mc.c @@ -300,7 +300,6 @@ static device_method_t tegra_mc_methods[] = { DEVMETHOD(device_attach, tegra_mc_attach), DEVMETHOD(device_detach, tegra_mc_detach), - DEVMETHOD_END }; diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index aae3b67a9e36..710480c146cf 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -71,7 +71,6 @@ __FBSDID("$FreeBSD$"); #include "pcib_if.h" #include "pic_if.h" - #define AFI_AXI_BAR0_SZ 0x000 #define AFI_AXI_BAR1_SZ 0x004 #define AFI_AXI_BAR2_SZ 0x008 @@ -123,7 +122,6 @@ __FBSDID("$FreeBSD$"); #define AFI_INTR_CODE_INT_CODE_RDY4PD_SENSE 13 #define AFI_INTR_CODE_INT_CODE_P2P_ERROR 14 - #define AFI_INTR_SIGNATURE 0x0bc #define AFI_UPPER_FPCI_ADDRESS 0x0c0 #define AFI_SM_INTR_ENABLE 0x0c4 @@ -620,7 +618,6 @@ tegra_pcib_msi_detach(struct tegra_pcib_softc *sc) return (EBUSY); } - static void tegra_pcib_msi_disable_intr(device_t dev, struct intr_irqsrc *isrc) { @@ -693,7 +690,6 @@ tegra_pcib_msi_teardown_intr(device_t dev, struct intr_irqsrc *isrc, return (0); } - static int tegra_pcib_msi_alloc_msi(device_t dev, device_t child, int count, int maxcount, device_t *pic, struct intr_irqsrc **srcs) @@ -740,7 +736,6 @@ tegra_pcib_msi_alloc_msi(device_t dev, device_t child, int count, int maxcount, for (i = 0; i < count; i++) { /* Mark the interrupt as used */ sc->isrcs[irq + i].flags |= TEGRA_FLAG_MSI_USED; - } mtx_unlock(&sc->mtx); @@ -975,7 +970,6 @@ tegra_pcib_parse_port(struct tegra_pcib_softc *sc, phandle_t node) return (NULL); } - static int tegra_pcib_parse_fdt_resources(struct tegra_pcib_softc *sc, phandle_t node) { @@ -1143,7 +1137,6 @@ tegra_pcib_wait_for_link(struct tegra_pcib_softc *sc, uint32_t reg; int i; - /* Setup link detection. */ reg = tegra_pcib_read_config(sc->dev, 0, port->port_idx, 0, RP_PRIV_MISC, 4); @@ -1158,7 +1151,6 @@ tegra_pcib_wait_for_link(struct tegra_pcib_softc *sc, if (reg & RP_VEND_XP_DL_UP) break; DELAY(1); - } if (i <= 0) return (ETIMEDOUT); @@ -1212,7 +1204,6 @@ tegra_pcib_port_enable(struct tegra_pcib_softc *sc, int port_num) rv == 0 ? "up": "down"); } - static void tegra_pcib_port_disable(struct tegra_pcib_softc *sc, uint32_t port_num) { @@ -1319,7 +1310,6 @@ tegra_pcib_enable(struct tegra_pcib_softc *sc) } } - rv = hwreset_deassert(sc->hwreset_pcie_x); if (rv != 0) { device_printf(sc->dev, "Cannot unreset 'pci_x' reset\n"); @@ -1500,7 +1490,6 @@ tegra_pcib_attach(device_t dev) } sc->cfg_base_addr = rman_get_start(sc->cfg_mem_res); - /* Map RP slots */ for (i = 0; i < TEGRA_PCIB_MAX_PORTS; i++) { if (sc->ports[i] == NULL) @@ -1583,7 +1572,6 @@ tegra_pcib_attach(device_t dev) return (rv); } - static device_method_t tegra_pcib_methods[] = { /* Device interface */ DEVMETHOD(device_probe, tegra_pcib_probe), diff --git a/sys/arm/nvidia/tegra_pinmux.c b/sys/arm/nvidia/tegra_pinmux.c index ae8ed5d83e64..17356233306f 100644 --- a/sys/arm/nvidia/tegra_pinmux.c +++ b/sys/arm/nvidia/tegra_pinmux.c @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #define TEGRA_MUX_IORESET_SHIFT 8 #define TEGRA_MUX_RCV_SEL_SHIFT 9 - /* Pin goup register. */ #define TEGRA_GRP_HSM_SHIFT 2 #define TEGRA_GRP_SCHMT_SHIFT 3 @@ -708,7 +707,6 @@ static int pinmux_configure(device_t dev, phandle_t cfgxref) sc = device_get_softc(dev); cfgnode = OF_node_from_xref(cfgxref); - for (node = OF_child(cfgnode); node != 0; node = OF_peer(node)) { if (!ofw_bus_node_status_okay(node)) continue; @@ -779,7 +777,6 @@ pinmux_attach(device_t dev) return (0); } - static device_method_t tegra_pinmux_methods[] = { /* Device interface */ DEVMETHOD(device_probe, pinmux_probe), diff --git a/sys/arm/nvidia/tegra_rtc.c b/sys/arm/nvidia/tegra_rtc.c index 2a783735f4bf..070270367e1d 100644 --- a/sys/arm/nvidia/tegra_rtc.c +++ b/sys/arm/nvidia/tegra_rtc.c @@ -142,7 +142,6 @@ tegra_rtc_gettime(device_t dev, struct timespec *ts) return (0); } - static int tegra_rtc_settime(device_t dev, struct timespec *ts) { @@ -160,7 +159,6 @@ tegra_rtc_settime(device_t dev, struct timespec *ts) return (0); } - static void tegra_rtc_intr(void *arg) { diff --git a/sys/arm/nvidia/tegra_soctherm.c b/sys/arm/nvidia/tegra_soctherm.c index 270e5014ea7f..a329f8e03162 100644 --- a/sys/arm/nvidia/tegra_soctherm.c +++ b/sys/arm/nvidia/tegra_soctherm.c @@ -100,7 +100,6 @@ __FBSDID("$FreeBSD$"); #define READBACK_ADD_HALF (1 << 7) #define READBACK_NEGATE (1 << 0) - /* Fuses */ #define FUSE_TSENSOR_CALIB_CP_TS_BASE_SHIFT 0 #define FUSE_TSENSOR_CALIB_CP_TS_BASE_BITS 13 @@ -119,7 +118,6 @@ __FBSDID("$FreeBSD$"); #define FUSE_SPARE_REALIGNMENT_REG_SHIFT_CP(x) (((x) >> 0) & 0x3f) #define FUSE_SPARE_REALIGNMENT_REG_SHIFT_FT(x) (((x) >> 21) & 0x1f) - #define NOMINAL_CALIB_FT_T124 105 #define NOMINAL_CALIB_CP_T124 25 @@ -186,7 +184,6 @@ static struct tsensor_cfg t124_tsensor_config = { .pdiv_ate = 8 }; - static struct tsensor t124_tsensors[] = { { .name = "cpu0", @@ -312,7 +309,6 @@ get_shared_cal(struct soctherm_softc *sc, struct soctherm_shared_cal *cal) #endif } - static void tsensor_calibration(struct tsensor *sensor, struct soctherm_shared_cal *shared) { @@ -338,7 +334,6 @@ tsensor_calibration(struct tsensor *sensor, struct soctherm_shared_cal *shared) mult = sensor->cfg->pdiv * sensor->cfg->tsample_ate; div = sensor->cfg->tsample * sensor->cfg->pdiv_ate; - temp_a = div64_s64_precise((int64_t) delta_temp * (1LL << 13) * mult, (int64_t) delta_sens * div); @@ -426,7 +421,6 @@ soctherm_read_temp(struct soctherm_softc *sc, struct tsensor *sensor, int *temp) int timeout; uint32_t val; - /* wait for valid sample */ for (timeout = 1000; timeout > 0; timeout--) { val = RD4(sc, sensor->sensor_base + TSENSOR_STATUS1); diff --git a/sys/arm/nvidia/tegra_uart.c b/sys/arm/nvidia/tegra_uart.c index c45a928d3e33..16809378cf69 100644 --- a/sys/arm/nvidia/tegra_uart.c +++ b/sys/arm/nvidia/tegra_uart.c @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); - /* * UART driver for Tegra SoCs. */ diff --git a/sys/arm/nvidia/tegra_usbphy.c b/sys/arm/nvidia/tegra_usbphy.c index bc2349023a9d..b60360efd920 100644 --- a/sys/arm/nvidia/tegra_usbphy.c +++ b/sys/arm/nvidia/tegra_usbphy.c @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); - /* * USB phy driver for Tegra SoCs. */ @@ -66,7 +65,6 @@ __FBSDID("$FreeBSD$"); #define USB_HOSTPC1_DEVLC_STS (1 << 28) #define USB_HOSTPC1_DEVLC_PHCD (1 << 22) - #define IF_USB_SUSP_CTRL 0x400 #define FAST_WAKEUP_RESP (1 << 26) #define UTMIP_SUSPL1_SET (1 << 25) @@ -90,7 +88,6 @@ __FBSDID("$FreeBSD$"); #define B_SESS_END_SW_VALUE (1 << 4) #define B_SESS_END_SW_EN (1 << 3) - #define UTMIP_XCVR_CFG0 0x808 #define UTMIP_XCVR_HSSLEW_MSB(x) ((((x) & 0x1fc) >> 2) << 25) #define UTMIP_XCVR_SETUP_MSB(x) ((((x) & 0x70) >> 4) << 22) @@ -134,7 +131,6 @@ __FBSDID("$FreeBSD$"); #define UTMIP_HSDISCON_LEVEL(x) (((x) & 0x3) << 2) #define UTMIP_HSSQUELCH_LEVEL(x) (((x) & 0x3) << 0) - #define UTMIP_HSRX_CFG0 0x810 #define UTMIP_KEEP_PATT_ON_ACTIVE(x) (((x) & 0x3) << 30) #define UTMIP_ALLOW_CONSEC_UPDN (1 << 29) @@ -361,7 +357,6 @@ usbphy_utmi_enable(struct usbphy_softc *sc) val |= UTMIP_RESET; WR4(sc, IF_USB_SUSP_CTRL, val); - val = RD4(sc, UTMIP_TX_CFG0); val |= UTMIP_FS_PREAMBLE_J; WR4(sc, UTMIP_TX_CFG0, val); @@ -465,7 +460,6 @@ usbphy_utmi_enable(struct usbphy_softc *sc) val |= UTMIP_XCVR_TERM_RANGE_ADJ(sc->term_range_adj); WR4(sc, UTMIP_XCVR_CFG1, val); - val = RD4(sc, UTMIP_BIAS_CFG1); val &= ~UTMIP_BIAS_PDTRK_COUNT(~0); val |= UTMIP_BIAS_PDTRK_COUNT(0x5); diff --git a/sys/arm/nvidia/tegra_xhci.c b/sys/arm/nvidia/tegra_xhci.c index c37caaaf793c..ce03131e6ca2 100644 --- a/sys/arm/nvidia/tegra_xhci.c +++ b/sys/arm/nvidia/tegra_xhci.c @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include - #include #include #include @@ -211,7 +210,6 @@ __FBSDID("$FreeBSD$"); #define MBOX_CMD_ACK (0x80 + 0) #define MBOX_CMD_NAK (0x80 + 1) - #define IPFS_WR4(_sc, _r, _v) bus_write_4((_sc)->mem_res_ipfs, (_r), (_v)) #define IPFS_RD4(_sc, _r) bus_read_4((_sc)->mem_res_ipfs, (_r)) #define FPCI_WR4(_sc, _r, _v) bus_write_4((_sc)->mem_res_fpci, (_r), (_v)) @@ -713,7 +711,6 @@ process_msg(struct tegra_xhci_softc *sc, uint32_t req_cmd, uint32_t req_data, *resp_cmd = MBOX_CMD_ACK; break; - case MBOX_CMD_START_HSIC_IDLE: case MBOX_CMD_STOP_HSIC_IDLE: /* Not implemented yet. */ @@ -908,7 +905,6 @@ init_hw(struct tegra_xhci_softc *sc) IPFS_WR4(sc, XUSB_HOST_CONFIGURATION, reg); IPFS_RD4(sc, XUSB_HOST_CONFIGURATION); - /* Program bar for XHCI base address */ reg = FPCI_RD4(sc, T_XUSB_CFG_4); reg &= ~CFG_4_BASE_ADDRESS(~0); diff --git a/sys/arm/rockchip/rk30xx_gpio.c b/sys/arm/rockchip/rk30xx_gpio.c index 1f4354238725..6d6b92ca2dc1 100644 --- a/sys/arm/rockchip/rk30xx_gpio.c +++ b/sys/arm/rockchip/rk30xx_gpio.c @@ -589,14 +589,12 @@ rk30_gpio_init(void) /* Traverse through entire tree to find nodes with 'gpios' prop */ for (child = OF_child(parent); child != 0; child = OF_peer(child)) { - /* Find a 'leaf'. Start the search from this node. */ while (OF_child(child)) { parent = child; child = OF_child(child); } if ((len = OF_getproplen(child, "gpios")) > 0) { - if (len > sizeof(gpios)) return (ENXIO); diff --git a/sys/arm/rockchip/rk30xx_grf.c b/sys/arm/rockchip/rk30xx_grf.c index 585b9fef07fe..d880ad970dcb 100644 --- a/sys/arm/rockchip/rk30xx_grf.c +++ b/sys/arm/rockchip/rk30xx_grf.c @@ -129,4 +129,3 @@ rk30_grf_gpio_pud(uint32_t bank, uint32_t pin, uint32_t state) pin = (7 - (pin % 8)) * 2; grf_write_4(rk30_grf_sc, offset, (0x3 << (16 + pin)) | (state << pin)); } - diff --git a/sys/arm/rockchip/rk30xx_machdep.c b/sys/arm/rockchip/rk30xx_machdep.c index 3032590750ef..4fca709b4fd8 100644 --- a/sys/arm/rockchip/rk30xx_machdep.c +++ b/sys/arm/rockchip/rk30xx_machdep.c @@ -76,7 +76,7 @@ rk30xx_devmap_init(platform_t plat) devmap_add_entry(0x10000000, 0x00200000); devmap_add_entry(0x20000000, 0x00100000); - + return (0); } diff --git a/sys/arm/rockchip/rk30xx_pmu.c b/sys/arm/rockchip/rk30xx_pmu.c index 38eb64702c33..a0352f1eb377 100644 --- a/sys/arm/rockchip/rk30xx_pmu.c +++ b/sys/arm/rockchip/rk30xx_pmu.c @@ -129,4 +129,3 @@ rk30_pmu_gpio_pud(uint32_t pin, uint32_t state) pin = (pin % 8) * 2; pmu_write_4(rk30_pmu_sc, offset, (0x3 << (16 + pin)) | (state << pin)); } - diff --git a/sys/arm/rockchip/rk30xx_wdog.h b/sys/arm/rockchip/rk30xx_wdog.h index 5c1a85a9d3bf..580c022ea29f 100644 --- a/sys/arm/rockchip/rk30xx_wdog.h +++ b/sys/arm/rockchip/rk30xx_wdog.h @@ -34,4 +34,3 @@ void rk30_wd_watchdog_reset(void); #endif /*__RK30XX_WDOG_H__*/ - diff --git a/sys/arm/samsung/exynos/chrome_kb.c b/sys/arm/samsung/exynos/chrome_kb.c index 0744bedd77c7..972ff81483d6 100644 --- a/sys/arm/samsung/exynos/chrome_kb.c +++ b/sys/arm/samsung/exynos/chrome_kb.c @@ -237,7 +237,6 @@ ckb_set_state(keyboard_t *kbd, void *buf, size_t len) return (EINVAL); } - /* check if data is waiting */ static int ckb_check(keyboard_t *kbd) @@ -429,7 +428,6 @@ ckb_read_char(keyboard_t *kbd, int wait) return (keycode); } - /* some useful control functions */ static int ckb_ioctl_locked(keyboard_t *kbd, u_long cmd, caddr_t arg) @@ -575,7 +573,6 @@ ckb_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) } } - /* * Enable the access to the device; until this function is called, * the client cannot read from the keyboard. diff --git a/sys/arm/samsung/exynos/exynos5_ehci.c b/sys/arm/samsung/exynos/exynos5_ehci.c index 6a9beb780b5c..023730819365 100644 --- a/sys/arm/samsung/exynos/exynos5_ehci.c +++ b/sys/arm/samsung/exynos/exynos5_ehci.c @@ -118,7 +118,6 @@ static device_method_t ehci_methods[] = { /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), - { 0, 0 } }; diff --git a/sys/arm/samsung/exynos/exynos5_i2c.c b/sys/arm/samsung/exynos/exynos5_i2c.c index 756a27d448d9..2ce13a0b7c54 100644 --- a/sys/arm/samsung/exynos/exynos5_i2c.c +++ b/sys/arm/samsung/exynos/exynos5_i2c.c @@ -381,7 +381,6 @@ i2c_read(device_t dev, char *buf, int len, DPRINTF("Read "); while (*read < len) { - /* Do not ack last read */ if (*read == (len - 1)) { reg = READ1(sc, I2CCON); @@ -465,7 +464,6 @@ static device_method_t i2c_methods[] = { DEVMETHOD(iicbus_read, i2c_read), DEVMETHOD(iicbus_write, i2c_write), DEVMETHOD(iicbus_transfer, iicbus_transfer_gen), - { 0, 0 } }; diff --git a/sys/arm/samsung/exynos/exynos5_pad.c b/sys/arm/samsung/exynos/exynos5_pad.c index 2819ac4345fb..3cac62b17cce 100644 --- a/sys/arm/samsung/exynos/exynos5_pad.c +++ b/sys/arm/samsung/exynos/exynos5_pad.c @@ -732,7 +732,6 @@ pad_pin_toggle(device_t dev, uint32_t pin) return (0); } - static void pad_pin_configure(struct pad_softc *sc, struct gpio_pin *pin, unsigned int flags) @@ -775,7 +774,6 @@ pad_pin_configure(struct pad_softc *sc, struct gpio_pin *pin, GPIO_UNLOCK(sc); } - static int pad_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) { diff --git a/sys/arm/samsung/exynos/exynos5_spi.c b/sys/arm/samsung/exynos/exynos5_spi.c index de25b421646d..2cbe43936a3a 100644 --- a/sys/arm/samsung/exynos/exynos5_spi.c +++ b/sys/arm/samsung/exynos/exynos5_spi.c @@ -162,7 +162,6 @@ spi_txrx(struct spi_softc *sc, uint8_t *out_buf, WRITE4(sc, CS_REG, reg); for (i = 0; i < bufsz; i++) { - /* TODO: Implement FIFO operation */ /* Wait all the data shifted out */ @@ -221,7 +220,6 @@ static device_method_t spi_methods[] = { /* SPI interface */ DEVMETHOD(spibus_transfer, spi_transfer), - { 0, 0 } }; diff --git a/sys/arm/samsung/exynos/exynos5_xhci.c b/sys/arm/samsung/exynos/exynos5_xhci.c index dbb8d3c54dea..53751d3845bf 100644 --- a/sys/arm/samsung/exynos/exynos5_xhci.c +++ b/sys/arm/samsung/exynos/exynos5_xhci.c @@ -294,7 +294,7 @@ exynos_xhci_detach(device_t dev) device_delete_children(dev); xhci_halt_controller(&esc->base); - + if (esc->res[2] && esc->base.sc_intr_hdl) { err = bus_teardown_intr(dev, esc->res[2], esc->base.sc_intr_hdl); @@ -308,6 +308,6 @@ exynos_xhci_detach(device_t dev) bus_release_resources(dev, exynos_xhci_spec, esc->res); xhci_uninit(&esc->base); - + return (0); } diff --git a/sys/arm/samsung/exynos/exynos_uart.c b/sys/arm/samsung/exynos/exynos_uart.c index 217440b8aa66..5ede453524f0 100644 --- a/sys/arm/samsung/exynos/exynos_uart.c +++ b/sys/arm/samsung/exynos/exynos_uart.c @@ -227,7 +227,6 @@ static kobj_method_t exynos4210_methods[] = { KOBJMETHOD(uart_receive, exynos4210_bus_receive), KOBJMETHOD(uart_setsig, exynos4210_bus_setsig), KOBJMETHOD(uart_transmit, exynos4210_bus_transmit), - {0, 0 } }; diff --git a/sys/arm/ti/aintc.c b/sys/arm/ti/aintc.c index bb52253f08f1..118a97e9f989 100644 --- a/sys/arm/ti/aintc.c +++ b/sys/arm/ti/aintc.c @@ -28,7 +28,6 @@ * SUCH DAMAGE. */ - #include __FBSDID("$FreeBSD$"); @@ -294,7 +293,6 @@ static device_method_t ti_aintc_methods[] = { DEVMETHOD(pic_post_filter, ti_aintc_post_filter), DEVMETHOD(pic_post_ithread, ti_aintc_post_ithread), DEVMETHOD(pic_pre_ithread, ti_aintc_pre_ithread), - { 0, 0 } }; diff --git a/sys/arm/ti/am335x/am3359_cppi41.c b/sys/arm/ti/am335x/am3359_cppi41.c index a3e4e8bee155..dd5e668776ee 100644 --- a/sys/arm/ti/am335x/am3359_cppi41.c +++ b/sys/arm/ti/am335x/am3359_cppi41.c @@ -171,7 +171,6 @@ ti_am3359_cppi41_attach(device_t dev) return (0); } - static device_method_t ti_am3359_cppi41_methods[] = { DEVMETHOD(device_probe, ti_am3359_cppi41_probe), DEVMETHOD(device_attach, ti_am3359_cppi41_attach), @@ -179,7 +178,6 @@ static device_method_t ti_am3359_cppi41_methods[] = { DEVMETHOD_END }; - DEFINE_CLASS_1(ti_am3359_cppi41, ti_am3359_cppi41_driver, ti_am3359_cppi41_methods,sizeof(struct ti_am3359_cppi41_softc), simplebus_driver); diff --git a/sys/arm/ti/am335x/am335x_ecap.c b/sys/arm/ti/am335x/am335x_ecap.c index 75b845f56e03..31e340a69c33 100644 --- a/sys/arm/ti/am335x/am335x_ecap.c +++ b/sys/arm/ti/am335x/am335x_ecap.c @@ -191,7 +191,6 @@ am335x_ecap_detach(device_t dev) PWM_LOCK_DESTROY(sc); - return (0); } diff --git a/sys/arm/ti/am335x/am335x_ehrpwm.c b/sys/arm/ti/am335x/am335x_ehrpwm.c index 70f043ccc864..619fdae2bcdb 100644 --- a/sys/arm/ti/am335x/am335x_ehrpwm.c +++ b/sys/arm/ti/am335x/am335x_ehrpwm.c @@ -284,11 +284,10 @@ am335x_ehrpwm_cfg_period(struct am335x_ehrpwm_softc *sc, u_int period) */ if (sc->sc_clkfreq != pwmclk || sc->sc_clktick != pwmtick || sc->sc_period != tbprd * pwmtick) { - sc->sc_clkfreq = pwmclk; sc->sc_clktick = pwmtick; sc->sc_period = tbprd * pwmtick; - + PWM_LOCK_ASSERT(sc); regval = EPWM_READ2(sc, EPWM_TBCTL); regval &= ~(TBCTL_CLKDIV_MASK | TBCTL_HSPCLKDIV_MASK); diff --git a/sys/arm/ti/am335x/am335x_lcd_syscons.c b/sys/arm/ti/am335x/am335x_lcd_syscons.c index 0e7399ec236d..9efd872f4ee0 100644 --- a/sys/arm/ti/am335x/am335x_lcd_syscons.c +++ b/sys/arm/ti/am335x/am335x_lcd_syscons.c @@ -441,7 +441,6 @@ am335x_syscons_init(int unit, video_adapter_t *adp, int flags) sc->xmargin = (sc->width - (vi->vi_width * vi->vi_cwidth)) / 2; sc->ymargin = (sc->height - (vi->vi_height * vi->vi_cheight))/2; - adp->va_window = (vm_offset_t) am335x_syscons_static_window; adp->va_flags |= V_ADP_FONT /* | V_ADP_COLOR | V_ADP_MODECHANGE */; diff --git a/sys/arm/ti/am335x/am335x_reg.h b/sys/arm/ti/am335x/am335x_reg.h index cceaa9815e93..962238e7677b 100644 --- a/sys/arm/ti/am335x/am335x_reg.h +++ b/sys/arm/ti/am335x/am335x_reg.h @@ -40,4 +40,3 @@ #define AM335X_CONTROL_DEV_FEATURE 0x0604 #endif - diff --git a/sys/arm/ti/am335x/tda19988.c b/sys/arm/ti/am335x/tda19988.c index 68d92a94bc7c..0796da96bdd7 100644 --- a/sys/arm/ti/am335x/tda19988.c +++ b/sys/arm/ti/am335x/tda19988.c @@ -651,7 +651,7 @@ tda19988_start(struct tda19988_softc *sc) uint16_t version; dev = sc->sc_dev; - + tda19988_cec_write(sc, TDA_CEC_ENAMODS, ENAMODS_RXSENS | ENAMODS_HDMI); DELAY(1000); tda19988_cec_read(sc, 0xfe, &data); diff --git a/sys/arm/ti/clk/ti_clk_dpll.c b/sys/arm/ti/clk/ti_clk_dpll.c index 14e48dc95026..ed1c78b19dcb 100644 --- a/sys/arm/ti/clk/ti_clk_dpll.c +++ b/sys/arm/ti/clk/ti_clk_dpll.c @@ -181,7 +181,6 @@ ti_clk_factor_get_value(struct ti_clk_factor *factor, uint32_t raw) return (val); } - static int ti_dpll_clk_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, int flags, int *stop) diff --git a/sys/arm/ti/clk/ti_clk_dpll.h b/sys/arm/ti/clk/ti_clk_dpll.h index 54bc0b988d6e..7505ac9abd63 100644 --- a/sys/arm/ti/clk/ti_clk_dpll.h +++ b/sys/arm/ti/clk/ti_clk_dpll.h @@ -58,7 +58,6 @@ #define DPLL_EN_IDLE_BYPASS_FAST_RELOCK_MODE 0x06 #define DPLL_EN_LOCK_MODE 0x07 - #define TI_CLK_FACTOR_ZERO_BASED 0x0002 #define TI_CLK_FACTOR_FIXED 0x0008 #define TI_CLK_FACTOR_MIN_VALUE 0x0020 diff --git a/sys/arm/ti/clk/ti_clkctrl.c b/sys/arm/ti/clk/ti_clkctrl.c index 5ba0dbe19b79..ee7d18fb0af8 100644 --- a/sys/arm/ti/clk/ti_clkctrl.c +++ b/sys/arm/ti/clk/ti_clkctrl.c @@ -196,7 +196,6 @@ ti_clkctrl_attach(device_t dev) /* reg property has a pair of (base address, length) */ for (index = 0; index < num_reg; index += 2) { for (reg_offset = 0; reg_offset < reg[index+1]; reg_offset += sizeof(cell_t)) { - err = create_clkctrl(sc, reg, index, reg_offset, parent_offset, org_name, false); if (err) diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c index 9c43419d568b..ebf5644883f7 100644 --- a/sys/arm/ti/cpsw/if_cpsw.c +++ b/sys/arm/ti/cpsw/if_cpsw.c @@ -85,7 +85,7 @@ __FBSDID("$FreeBSD$"); #include #include - + #ifdef CPSW_ETHERSWITCH #include #include "etherswitch_if.h" diff --git a/sys/arm/ti/omap4/omap4_prcm_clks.c b/sys/arm/ti/omap4/omap4_prcm_clks.c index 1ed3a0f6c4d2..56368e44059e 100644 --- a/sys/arm/ti/omap4/omap4_prcm_clks.c +++ b/sys/arm/ti/omap4/omap4_prcm_clks.c @@ -251,9 +251,7 @@ static int omap4_clk_get_arm_fclk_freq(struct ti_clock_dev *clkdev, unsigned int .clk_set_source_freq = NULL \ } - struct ti_clock_dev ti_omap4_clk_devmap[] = { - /* System clocks */ { .id = SYS_CLK, .clk_activate = NULL, @@ -273,13 +271,12 @@ struct ti_clock_dev ti_omap4_clk_devmap[] = { .clk_set_source_freq = NULL, }, - /* UART device clocks */ OMAP4_GENERIC_CLOCK_DEV(UART1_CLK), OMAP4_GENERIC_CLOCK_DEV(UART2_CLK), OMAP4_GENERIC_CLOCK_DEV(UART3_CLK), OMAP4_GENERIC_CLOCK_DEV(UART4_CLK), - + /* Timer device source clocks */ OMAP4_GPTIMER_CLOCK_DEV(TIMER1_CLK), OMAP4_GPTIMER_CLOCK_DEV(TIMER2_CLK), @@ -292,7 +289,7 @@ struct ti_clock_dev ti_omap4_clk_devmap[] = { OMAP4_GPTIMER_CLOCK_DEV(TIMER9_CLK), OMAP4_GPTIMER_CLOCK_DEV(TIMER10_CLK), OMAP4_GPTIMER_CLOCK_DEV(TIMER11_CLK), - + /* MMC device clocks (MMC1 and MMC2 can have different input clocks) */ OMAP4_HSMMC_CLOCK_DEV(MMC1_CLK), OMAP4_HSMMC_CLOCK_DEV(MMC2_CLK), @@ -310,7 +307,7 @@ struct ti_clock_dev ti_omap4_clk_devmap[] = { OMAP4_HSUSBHOST_CLOCK_DEV(USBP2_UTMI_CLK), OMAP4_HSUSBHOST_CLOCK_DEV(USBP1_HSIC_CLK), OMAP4_HSUSBHOST_CLOCK_DEV(USBP2_HSIC_CLK), - + /* GPIO */ OMAP4_GENERIC_CLOCK_DEV(GPIO1_CLK), OMAP4_GENERIC_CLOCK_DEV(GPIO2_CLK), @@ -318,7 +315,7 @@ struct ti_clock_dev ti_omap4_clk_devmap[] = { OMAP4_GENERIC_CLOCK_DEV(GPIO4_CLK), OMAP4_GENERIC_CLOCK_DEV(GPIO5_CLK), OMAP4_GENERIC_CLOCK_DEV(GPIO6_CLK), - + /* sDMA */ OMAP4_GENERIC_CLOCK_DEV(SDMA_CLK), @@ -327,7 +324,6 @@ struct ti_clock_dev ti_omap4_clk_devmap[] = { OMAP4_GENERIC_CLOCK_DEV(I2C2_CLK), OMAP4_GENERIC_CLOCK_DEV(I2C3_CLK), OMAP4_GENERIC_CLOCK_DEV(I2C4_CLK), - { INVALID_CLK_IDENT, NULL, NULL, NULL, NULL } }; @@ -341,12 +337,12 @@ struct ti_clock_dev ti_omap4_clk_devmap[] = { */ struct omap4_clk_details { clk_ident_t id; - + uint32_t instance; uint32_t clksel_reg; - + int32_t src_freq; - + uint32_t enable_mode; }; @@ -359,7 +355,6 @@ struct omap4_clk_details { } static struct omap4_clk_details g_omap4_clk_details[] = { - /* UART */ OMAP4_GENERIC_CLOCK_DETAILS(UART1_CLK, FREQ_48MHZ, CM2_INSTANCE, (L4PER_CM2_OFFSET + 0x0140), CLKCTRL_MODULEMODE_ENABLE), @@ -405,7 +400,7 @@ static struct omap4_clk_details g_omap4_clk_details[] = { (L4PER_CM2_OFFSET + 0x128), /*CLKCTRL_MODULEMODE_ENABLE*/2), OMAP4_GENERIC_CLOCK_DETAILS(MMC5_CLK, FREQ_48MHZ, CM2_INSTANCE, (L4PER_CM2_OFFSET + 0x160), /*CLKCTRL_MODULEMODE_ENABLE*/1), - + /* GPIO modules */ OMAP4_GENERIC_CLOCK_DETAILS(GPIO1_CLK, -1, PRM_INSTANCE, (WKUP_CM_OFFSET + 0x038), CLKCTRL_MODULEMODE_AUTO), @@ -443,7 +438,7 @@ static struct omap4_clk_details g_omap4_clk_details[] = { * */ #define MAX_MODULE_ENABLE_WAIT 100 - + /** * ARRAY_SIZE - Macro to return the number of elements in a static const array. * @@ -493,7 +488,7 @@ omap4_prcm_get_instance_softc(int module_instance) return (NULL); } - + /** * omap4_clk_generic_activate - checks if a module is accessible * @module: identifier for the module to check, see omap3_prcm.h for a list @@ -529,7 +524,7 @@ omap4_clk_generic_activate(struct ti_clock_dev *clkdev) if (clk_mem_res == NULL) return (EINVAL); - + /* All the 'generic' clocks have a CLKCTRL register which is more or less * generic - the have at least two fielda called MODULEMODE and IDLEST. */ @@ -541,7 +536,7 @@ omap4_clk_generic_activate(struct ti_clock_dev *clkdev) /* Now poll on the IDLEST register to tell us if the module has come up. * TODO: We need to take into account the parent clocks. */ - + /* Try MAX_MODULE_ENABLE_WAIT number of times to check if enabled */ for (i = 0; i < MAX_MODULE_ENABLE_WAIT; i++) { clksel = bus_read_4(clk_mem_res, clk_details->clksel_reg); @@ -556,7 +551,7 @@ omap4_clk_generic_activate(struct ti_clock_dev *clkdev) printf("Error: 0x%08x => 0x%08x\n", clk_details->clksel_reg, clksel); return (ETIMEDOUT); } - + return (0); } @@ -595,7 +590,7 @@ omap4_clk_generic_deactivate(struct ti_clock_dev *clkdev) if (clk_mem_res == NULL) return (EINVAL); - + /* All the 'generic' clocks have a CLKCTRL register which is more or less * generic - the have at least two fielda called MODULEMODE and IDLEST. */ @@ -664,13 +659,13 @@ omap4_clk_generic_accessible(struct ti_clock_dev *clkdev) if (clk_mem_res == NULL) return (EINVAL); - + clksel = bus_read_4(clk_mem_res, clk_details->clksel_reg); /* Check the enabled state */ if ((clksel & CLKCTRL_IDLEST_MASK) != CLKCTRL_IDLEST_ENABLED) return (0); - + return (1); } @@ -697,15 +692,14 @@ omap4_clk_generic_get_source_freq(struct ti_clock_dev *clkdev, if (clk_details == NULL) return (ENXIO); - + /* Simply return the stored frequency */ if (freq) *freq = (unsigned int)clk_details->src_freq; - + return (0); } - /** * omap4_clk_gptimer_set_source - checks if a module is accessible * @module: identifier for the module to check, see omap3_prcm.h for a list @@ -741,9 +735,9 @@ omap4_clk_gptimer_set_source(struct ti_clock_dev *clkdev, if (clk_mem_res == NULL) return (EINVAL); - + /* TODO: Implement */ - + return (0); } @@ -785,18 +779,18 @@ omap4_clk_gptimer_get_source_freq(struct ti_clock_dev *clkdev, if (clk_mem_res == NULL) return (EINVAL); - + /* Need to read the CLKSEL field to determine the clock source */ clksel = bus_read_4(clk_mem_res, clk_details->clksel_reg); if (clksel & (0x1UL << 24)) src_freq = FREQ_32KHZ; else omap4_clk_get_sysclk_freq(NULL, &src_freq); - + /* Return the frequency */ if (freq) *freq = src_freq; - + return (0); } @@ -826,7 +820,6 @@ omap4_clk_hsmmc_set_source(struct ti_clock_dev *clkdev, if (clk_details == NULL) return (ENXIO); - sc = omap4_prcm_get_instance_softc(clk_details->instance); if (sc == NULL) return ENXIO; @@ -844,7 +837,6 @@ omap4_clk_hsmmc_set_source(struct ti_clock_dev *clkdev, return 0; } - clksel = bus_read_4(clk_mem_res, clk_details->clksel_reg); /* Bit 24 is set if 96MHz clock or cleared for 64MHz clock */ @@ -856,7 +848,7 @@ omap4_clk_hsmmc_set_source(struct ti_clock_dev *clkdev, return (EINVAL); bus_write_4(clk_mem_res, clk_details->clksel_reg, clksel); - + return (0); } @@ -896,7 +888,7 @@ omap4_clk_hsmmc_get_source_freq(struct ti_clock_dev *clkdev, if (clk_mem_res == NULL) return (EINVAL); - + switch (clkdev->id) { case MMC1_CLK: case MMC2_CLK: @@ -919,7 +911,7 @@ omap4_clk_hsmmc_get_source_freq(struct ti_clock_dev *clkdev, /* Return the frequency */ if (freq) *freq = src_freq; - + return (0); } @@ -940,7 +932,7 @@ omap4_clk_get_sysclk_freq(struct ti_clock_dev *clkdev, uint32_t clksel; uint32_t sysclk; struct omap4_prcm_softc *sc; - + sc = omap4_prcm_get_instance_softc(PRM_INSTANCE); if (sc == NULL) return ENXIO; @@ -1011,12 +1003,10 @@ omap4_clk_get_arm_fclk_freq(struct ti_clock_dev *clkdev, pll_mult = ((clksel >> 8) & 0x7ff); pll_div = (clksel & 0x7f) + 1; - - + /* Get the system clock freq */ omap4_clk_get_sysclk_freq(NULL, &sysclk); - /* Calculate the MPU freq */ mpuclk = ((uint64_t)sysclk * pll_mult) / pll_div; @@ -1099,7 +1089,7 @@ omap4_clk_hsusbhost_activate(struct ti_clock_dev *clkdev) /* We need the CM_L3INIT_HSUSBTLL_CLKCTRL register in CM2 register set */ clk_mem_res = sc->sc_res; clksel_reg_off = L3INIT_CM2_OFFSET + 0x68; - + /* Enable the module and also enable the optional func clocks for * channels 0 & 1 (is this needed ?) */ @@ -1154,13 +1144,13 @@ omap4_clk_hsusbhost_activate(struct ti_clock_dev *clkdev) clksel |= (0x5 << 12); /* HSIC60M_P2_CLK + HSIC480M_P2_CLK */ break; - + default: return (EINVAL); } - + bus_write_4(clk_mem_res, clksel_reg_off, clksel); - + /* Try MAX_MODULE_ENABLE_WAIT number of times to check if enabled */ for (i = 0; i < MAX_MODULE_ENABLE_WAIT; i++) { clksel = bus_read_4(clk_mem_res, clksel_reg_off); @@ -1174,7 +1164,7 @@ omap4_clk_hsusbhost_activate(struct ti_clock_dev *clkdev) printf("Error: 0x%08x => 0x%08x\n", clksel_reg_off, clksel); return (ETIMEDOUT); } - + return (0); } @@ -1208,7 +1198,7 @@ omap4_clk_hsusbhost_deactivate(struct ti_clock_dev *clkdev) /* We need the CM_L3INIT_HSUSBTLL_CLKCTRL register in CM2 register set */ clk_mem_res = sc->sc_res; clksel_reg_off = L3INIT_CM2_OFFSET + 0x68; - + clksel = bus_read_4(clk_mem_res, clksel_reg_off); clksel &= ~CLKCTRL_MODULEMODE_MASK; clksel |= CLKCTRL_MODULEMODE_DISABLE; @@ -1258,11 +1248,11 @@ omap4_clk_hsusbhost_deactivate(struct ti_clock_dev *clkdev) clksel &= ~(0x5 << 12); /* HSIC60M_P2_CLK + HSIC480M_P2_CLK */ break; - + default: return (EINVAL); } - + bus_write_4(clk_mem_res, clksel_reg_off, clksel); return (0); @@ -1313,7 +1303,7 @@ omap4_clk_hsusbhost_accessible(struct ti_clock_dev *clkdev) /* Check the enabled state */ if ((clksel & CLKCTRL_IDLEST_MASK) != CLKCTRL_IDLEST_ENABLED) return (0); - + return (1); } @@ -1351,18 +1341,18 @@ omap4_clk_hsusbhost_set_source(struct ti_clock_dev *clkdev, bit = 25; else return (EINVAL); - + /* We need the CM_L3INIT_HSUSBHOST_CLKCTRL register in CM2 register set */ clk_mem_res = sc->sc_res; clksel_reg_off = L3INIT_CM2_OFFSET + 0x58; clksel = bus_read_4(clk_mem_res, clksel_reg_off); - + /* Set the clock source to either external or internal */ if (clksrc == EXT_CLK) clksel |= (0x1 << bit); else clksel &= ~(0x1 << bit); - + bus_write_4(clk_mem_res, clksel_reg_off, clksel); return (0); @@ -1375,7 +1365,7 @@ static void omap4_prcm_reset(void) { struct omap4_prcm_softc *sc; - + sc = omap4_prcm_get_instance_softc(PRM_INSTANCE); if (sc == NULL) return; diff --git a/sys/arm/ti/omap4/omap4_reg.h b/sys/arm/ti/omap4/omap4_reg.h index 2bf87e11fac5..50cacae6ea9c 100644 --- a/sys/arm/ti/omap4/omap4_reg.h +++ b/sys/arm/ti/omap4/omap4_reg.h @@ -52,10 +52,6 @@ #include /* for uint32_t */ #endif - - - - /* Physical/Virtual address for SDRAM controller */ #define OMAP44XX_SMS_VBASE 0x6C000000UL @@ -66,8 +62,6 @@ #define OMAP44XX_SDRC_HWBASE 0x6D000000UL #define OMAP44XX_SDRC_SIZE 0x01000000UL - - /* Physical/Virtual address for I/O space */ #define OMAP44XX_L3_EMU_VBASE 0xD4000000UL @@ -82,7 +76,6 @@ #define OMAP44XX_L3_EMIF2_HWBASE 0x4D000000UL #define OMAP44XX_L3_EMIF2_SIZE 0x01000000UL - #define OMAP44XX_L4_CORE_VBASE 0xEA000000UL #define OMAP44XX_L4_CORE_HWBASE 0x4A000000UL #define OMAP44XX_L4_CORE_SIZE 0x01000000UL @@ -99,7 +92,6 @@ #define OMAP44XX_L4_ABE_HWBASE 0x49000000UL #define OMAP44XX_L4_ABE_SIZE 0x00100000UL - /* Physical/Virtual address for MPU Subsystem space */ #define OMAP44XX_MPU_SUBSYS_VBASE (OMAP44XX_L4_PERIPH_VBASE + 0x00240000UL) @@ -139,9 +131,6 @@ #define OMAP44XX_PL310_VBASE (OMAP44XX_MPU_SUBSYS_VBASE + OMAP44XX_PL310_OFFSET) #define OMAP44XX_PL310_SIZE 0x00001000UL - - - /* * L4-CORE Physical/Virtual addresss offsets */ @@ -164,8 +153,6 @@ #define OMAP44XX_GPIO1_OFFSET 0x00010000UL #define OMAP44XX_GPTIMER1_OFFSET 0x00018000UL - - /* * L4-PERIPH Physical/Virtual addresss offsets */ @@ -208,7 +195,6 @@ // #define OMAP44XX_GIC_INTR_OFFSET 0x48241000 // #define OMAP44XX_PL310_OFFSET 0x48242000 /* L2 Cache controller */ - /* * L4-ABE Physical/Virtual addresss offsets */ @@ -217,10 +203,6 @@ #define OMAP44XX_GPTIMER7_OFFSET 0x0003C000UL #define OMAP44XX_GPTIMER8_OFFSET 0x0003E000UL - - - - /* * System Control Module */ @@ -228,8 +210,6 @@ #define OMAP44XX_SCM_VBASE (OMAP44XX_L4_CORE_VBASE + OMAP44XX_SCM_OFFSET) #define OMAP44XX_SCM_SIZE 0x00001000UL - - /* * */ @@ -237,7 +217,6 @@ #define OMAP44XX_CM_VBASE (OMAP44XX_L4_CORE_VBASE + OMAP44XX_CM_OFFSET) #define OMAP44XX_CM_SIZE 0x00001500UL - /* * */ @@ -252,8 +231,6 @@ #define OMAP44XX_SCRM_VBASE (OMAP44XX_L4_WAKEUP_VBASE + OMAP44XX_SCRM_OFFSET) #define OMAP44XX_SCRM_SIZE 0x00000800UL - - /* * Uarts */ @@ -270,9 +247,6 @@ #define OMAP44XX_UART4_VBASE (OMAP44XX_L4_PERIPH_VBASE + OMAP44XX_UART4_OFFSET) #define OMAP44XX_UART4_SIZE 0x00001000UL - - - /* * I2C Modules */ @@ -286,8 +260,6 @@ #define OMAP44XX_I2C3_VBASE (OMAP44XX_L4_CORE_VBASE + OMAP44XX_I2C3_OFFSET) #define OMAP44XX_I2C3_SIZE 0x00000080UL - - /* * McBSP Modules */ @@ -307,8 +279,6 @@ #define OMAP44XX_MCBSP5_VBASE (OMAP44XX_L4_CORE_VBASE + OMAP44XX_MCBSP5_OFFSET) #define OMAP44XX_MCBSP5_SIZE 0x00001000UL - - /* * USB TTL Module */ @@ -337,10 +307,6 @@ #define OMAP44XX_USB_EHCI_VBASE (OMAP44XX_L4_CORE_VBASE + OMAP44XX_USB_EHCI_OFFSET) #define OMAP44XX_USB_EHCI_SIZE 0x0000400UL - - - - /* * SDMA Offset * PA 0x4805 6000 @@ -350,8 +316,6 @@ #define OMAP44XX_SDMA_VBASE (OMAP44XX_L4_CORE_VBASE + OMAP44XX_SDMA_OFFSET) #define OMAP44XX_SDMA_SIZE 0x00001000UL - - /* * Interrupt Controller Unit. * @@ -498,8 +462,6 @@ #define OMAP44XX_IRQ_RESERVED126 OMAP44XX_HARDIRQ(126) /* RESERVED */ #define OMAP44XX_IRQ_RESERVED127 OMAP44XX_HARDIRQ(127) /* RESERVED */ - - /* * General Purpose Timers */ @@ -527,8 +489,6 @@ #define OMAP44XX_GPTIMER11_HWBASE (OMAP44XX_L4_PERIPH_HWBASE + OMAP44XX_GPTIMER11_OFFSET) #define OMAP44XX_GPTIMER_SIZE 0x00001000UL - - /* * GPIO - General Purpose IO */ @@ -553,7 +513,6 @@ #define OMAP44XX_GPIO6_VBASE (OMAP44XX_L4_PERIPH_VBASE + OMAP44XX_GPIO6_OFFSET) #define OMAP44XX_GPIO6_SIZE 0x00001000UL - /* * MMC/SD/SDIO */ @@ -571,8 +530,6 @@ #define OMAP44XX_MMCHS5_VBASE (OMAP44XX_L4_PERIPH_VBASE + OMAP44XX_MMCSD5_OFFSET) #define OMAP44XX_MMCHS_SIZE 0x00001000UL - - /* * SCM - System Control Module */ @@ -582,7 +539,4 @@ #define OMAP44XX_SCM_PADCONF_VBASE (OMAP44XX_L4_CORE_VBASE + OMAP44XX_SCM_PADCONF_OFFSET) #define OMAP44XX_SCM_PADCONF_SIZE 0x00001000UL - - - #endif /* _OMAP44XX_REG_H_ */ diff --git a/sys/arm/ti/omap4/omap4_scm_padconf.c b/sys/arm/ti/omap4/omap4_scm_padconf.c index 4e052c991c25..4ae9aa152cc9 100644 --- a/sys/arm/ti/omap4/omap4_scm_padconf.c +++ b/sys/arm/ti/omap4/omap4_scm_padconf.c @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include - /* * This file defines the pin mux configuration for the OMAP4xxx series of * devices. diff --git a/sys/arm/ti/omap4/omap4_wugen.c b/sys/arm/ti/omap4/omap4_wugen.c index 1a420f91447a..539e4f905b30 100644 --- a/sys/arm/ti/omap4/omap4_wugen.c +++ b/sys/arm/ti/omap4/omap4_wugen.c @@ -125,7 +125,6 @@ omap4_wugen_pre_ithread(device_t dev, struct intr_irqsrc *isrc) PIC_PRE_ITHREAD(sc->sc_parent, isrc); } - static void omap4_wugen_post_ithread(device_t dev, struct intr_irqsrc *isrc) { diff --git a/sys/arm/ti/omap4/pandaboard/pandaboard.c b/sys/arm/ti/omap4/pandaboard/pandaboard.c index 848039b2929f..fbf4034933cc 100644 --- a/sys/arm/ti/omap4/pandaboard/pandaboard.c +++ b/sys/arm/ti/omap4/pandaboard/pandaboard.c @@ -132,8 +132,6 @@ pandaboard_usb_hub_init(void) OMAP44XX_SCM_PADCONF_SIZE, 0, &scm_addr) != 0) panic("Couldn't map SCM Padconf registers"); - - /* Need to set FREF_CLK3_OUT to 19.2 MHz and pump it out on pin GPIO_WK31. * We know the SYS_CLK is 38.4Mhz and therefore to get the needed 19.2Mhz, * just use a 2x divider and ensure the SYS_CLK is used as the source. @@ -148,14 +146,12 @@ pandaboard_usb_hub_init(void) */ REG_WRITE16(scm_addr + CONTROL_WKUP_PAD0_FREF_CLK3_OUT, 0x0000); - /* Disable the power to the USB hub, drive GPIO1 low */ REG_WRITE32(gpio1_addr + GPIO1_OE, REG_READ32(gpio1_addr + GPIO1_OE) & ~(1UL << 1)); REG_WRITE32(gpio1_addr + GPIO1_CLEARDATAOUT, (1UL << 1)); REG_WRITE16(scm_addr + CONTROL_CORE_PAD1_KPD_COL2, 0x0003); - - + /* Reset the USB PHY and Hub using GPIO_62 */ REG_WRITE32(gpio2_addr + GPIO2_OE, REG_READ32(gpio2_addr + GPIO2_OE) & ~(1UL << 30)); @@ -164,7 +160,6 @@ pandaboard_usb_hub_init(void) DELAY(10); REG_WRITE32(gpio2_addr + GPIO2_SETDATAOUT, (1UL << 30)); - /* Enable power to the hub (GPIO_1) */ REG_WRITE32(gpio1_addr + GPIO1_SETDATAOUT, (1UL << 1)); bus_space_unmap(fdtbus_bs_tag, scrm_addr, OMAP44XX_SCRM_SIZE); diff --git a/sys/arm/ti/omap4/pandaboard/pandaboard.h b/sys/arm/ti/omap4/pandaboard/pandaboard.h index 8d48d5b80ec1..56f6f0bb8a5a 100644 --- a/sys/arm/ti/omap4/pandaboard/pandaboard.h +++ b/sys/arm/ti/omap4/pandaboard/pandaboard.h @@ -29,4 +29,3 @@ #define _PANDABOARD_H_ void pandaboard_usb_hub_init(void); #endif /* _OMAP4_MP_H_ */ - diff --git a/sys/arm/ti/ti_adc.c b/sys/arm/ti/ti_adc.c index 3c67500f3ebc..6254fddde5fa 100644 --- a/sys/arm/ti/ti_adc.c +++ b/sys/arm/ti/ti_adc.c @@ -686,7 +686,6 @@ ti_adc_tsc_init(struct ti_adc_softc *sc) sc->sc_tsc_enabled |= (1 << i); } - TI_ADC_UNLOCK(sc); } diff --git a/sys/arm/ti/ti_edma3.c b/sys/arm/ti/ti_edma3.c index 7804ee6b1d8d..436f983baa5b 100644 --- a/sys/arm/ti/ti_edma3.c +++ b/sys/arm/ti/ti_edma3.c @@ -190,7 +190,6 @@ ti_edma3_attach(device_t dev) device_printf(dev, "EDMA revision %08x\n", reg); - /* Attach interrupt handlers */ for (i = 0; i < TI_EDMA3_NUM_IRQS; ++i) { err = bus_setup_intr(dev, sc->irq_res[i], INTR_TYPE_MISC | diff --git a/sys/arm/ti/ti_i2c.c b/sys/arm/ti/ti_i2c.c index 526cb45481f0..c9b27436547c 100644 --- a/sys/arm/ti/ti_i2c.c +++ b/sys/arm/ti/ti_i2c.c @@ -387,7 +387,6 @@ ti_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) err = 0; repstart = 0; for (i = 0; i < nmsgs; i++) { - sc->sc_buffer = &msgs[i]; sc->sc_buffer_pos = 0; sc->sc_error = 0; diff --git a/sys/arm/ti/ti_omap4_cm.c b/sys/arm/ti/ti_omap4_cm.c index c9545a612e1f..795bd2b75206 100644 --- a/sys/arm/ti/ti_omap4_cm.c +++ b/sys/arm/ti/ti_omap4_cm.c @@ -148,4 +148,3 @@ ti_omap4_cm_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_FIRST); EARLY_DRIVER_MODULE(ti_omap4_cm, ofwbus, ti_omap4_cm_driver, ti_omap4_cm_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_FIRST); - diff --git a/sys/arm/ti/ti_pinmux.c b/sys/arm/ti/ti_pinmux.c index da4b8a85526c..58d3b93c46b5 100644 --- a/sys/arm/ti/ti_pinmux.c +++ b/sys/arm/ti/ti_pinmux.c @@ -80,7 +80,6 @@ static struct ti_pinmux_softc *ti_pinmux_sc; #define ti_pinmux_write_4(sc, reg, val) \ bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (val)) - /** * ti_padconf_devmap - Array of pins, should be defined one per SoC * @@ -90,7 +89,6 @@ static struct ti_pinmux_softc *ti_pinmux_sc; */ static const struct ti_pinmux_device *ti_pinmux_dev; - /** * ti_pinmux_padconf_from_name - searches the list of pads and returns entry * with matching ball name. @@ -400,7 +398,6 @@ ti_pinmux_probe(device_t dev) return (ENXIO); } - device_set_desc(dev, "TI Pinmux Module"); return (BUS_PROBE_DEFAULT); } diff --git a/sys/arm/ti/ti_pinmux.h b/sys/arm/ti/ti_pinmux.h index c299c494593b..2f31699e4371 100644 --- a/sys/arm/ti/ti_pinmux.h +++ b/sys/arm/ti/ti_pinmux.h @@ -32,7 +32,6 @@ * $FreeBSD$ */ - /** * Functions to configure the PIN multiplexing on the chip. * diff --git a/sys/arm/ti/ti_prcm.c b/sys/arm/ti/ti_prcm.c index ff85e724ada4..2664b8f71ec4 100644 --- a/sys/arm/ti/ti_prcm.c +++ b/sys/arm/ti/ti_prcm.c @@ -284,7 +284,6 @@ EARLY_DRIVER_MODULE(ti_prcm, simplebus, ti_prcm_driver, MODULE_VERSION(ti_prcm, 1); MODULE_DEPEND(ti_prcm, ti_scm, 1, 1, 1); - /* From sys/arm/ti/am335x/am335x_prcm.c * Copyright (c) 2012 Damjan Marion */ diff --git a/sys/arm/ti/ti_scm.c b/sys/arm/ti/ti_scm.c index 896a8d09cbf3..9d3da5e92b3b 100644 --- a/sys/arm/ti/ti_scm.c +++ b/sys/arm/ti/ti_scm.c @@ -30,7 +30,6 @@ #include __FBSDID("$FreeBSD$"); - /* Based on sys/arm/ti/ti_sysc.c */ #include @@ -159,4 +158,3 @@ EARLY_DRIVER_MODULE(ti_scm, simplebus, ti_scm_driver, ti_scm_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_FIRST); MODULE_VERSION(ti_scm, 1); MODULE_DEPEND(ti_scm, ti_sysc, 1, 1, 1); - diff --git a/sys/arm/ti/ti_scm.h b/sys/arm/ti/ti_scm.h index f1df004e2bda..e59901bc97ee 100644 --- a/sys/arm/ti/ti_scm.h +++ b/sys/arm/ti/ti_scm.h @@ -34,7 +34,6 @@ * $FreeBSD$ */ - /** * Functions to configure the PIN multiplexing on the chip. * diff --git a/sys/arm/ti/ti_scm_syscon.c b/sys/arm/ti/ti_scm_syscon.c index 2c3fa9345210..5259b699f490 100644 --- a/sys/arm/ti/ti_scm_syscon.c +++ b/sys/arm/ti/ti_scm_syscon.c @@ -282,7 +282,6 @@ static device_method_t ti_scm_syscon_methods[] = { DEVMETHOD_END }; - DEFINE_CLASS_1(ti_scm_syscon, ti_scm_syscon_driver, ti_scm_syscon_methods, sizeof(struct ti_scm_syscon_softc), simplebus_driver); diff --git a/sys/arm/ti/ti_sdhci.c b/sys/arm/ti/ti_sdhci.c index 958add3919ee..8554a562ad84 100644 --- a/sys/arm/ti/ti_sdhci.c +++ b/sys/arm/ti/ti_sdhci.c @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #include #include - #include "opt_mmccam.h" struct ti_sdhci_softc { @@ -641,7 +640,7 @@ ti_sdhci_attach(device_t dev) * before waiting to see them de-asserted. */ sc->slot.quirks |= SDHCI_QUIRK_WAITFOR_RESET_ASSERTED; - + /* * The controller waits for busy responses. */ diff --git a/sys/arm/ti/ti_sdma.c b/sys/arm/ti/ti_sdma.c index 3df674a33dcd..9da33d47df82 100644 --- a/sys/arm/ti/ti_sdma.c +++ b/sys/arm/ti/ti_sdma.c @@ -78,7 +78,6 @@ __FBSDID("$FreeBSD$"); * */ struct ti_sdma_channel { - /* * The configuration registers for the given channel, these are modified * by the set functions and only written to the actual registers when a @@ -225,7 +224,6 @@ ti_sdma_intr(void *arg) TI_SDMA_LOCK(sc); for (j = 0; j < NUM_DMA_IRQS; j++) { - /* Get the flag interrupts (enabled) */ intr = ti_sdma_read_4(sc, DMA4_IRQSTATUS_L(j)); intr &= ti_sdma_read_4(sc, DMA4_IRQENABLE_L(j)); @@ -1194,7 +1192,6 @@ ti_sdma_attach(device_t dev) /* Soft-reset is only supported on pre-OMAP44xx devices */ if (ti_sdma_is_omap3_rev(sc)) { - /* Soft-reset */ ti_sdma_write_4(sc, DMA4_OCP_SYSCONFIG, 0x0002); @@ -1203,7 +1200,6 @@ ti_sdma_attach(device_t dev) /* Wait for DMA reset to complete */ while ((ti_sdma_read_4(sc, DMA4_SYSSTATUS) & 0x1) == 0x0) { - /* Sleep for a tick */ pause("DMARESET", 1); diff --git a/sys/arm/ti/ti_smc.h b/sys/arm/ti/ti_smc.h index 537df2d3637d..8db0333fc2fb 100644 --- a/sys/arm/ti/ti_smc.h +++ b/sys/arm/ti/ti_smc.h @@ -24,7 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - /* * $FreeBSD$ */ diff --git a/sys/arm/ti/twl/twl.c b/sys/arm/ti/twl/twl.c index 50f2bd9ea513..e1b20cbbaa5f 100644 --- a/sys/arm/ti/twl/twl.c +++ b/sys/arm/ti/twl/twl.c @@ -120,7 +120,6 @@ struct twl_softc { #define TWL_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); #define TWL_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); - /** * twl_is_4030 - returns true if the device is TWL4030 * twl_is_6025 - returns true if the device is TWL6025 @@ -153,7 +152,6 @@ twl_is_6030(device_t dev) return (sc->sc_type == TWL_DEVICE_6030); } - /** * twl_read - read one or more registers from the TWL device * @sc: device soft context @@ -184,7 +182,6 @@ twl_read(device_t dev, uint8_t nsub, uint8_t reg, uint8_t *buf, uint16_t cnt) if (addr == TWL_INVALID_CHIP_ID) return (EIO); - /* Set the address to read from */ msg[0].slave = addr; msg[0].flags = IIC_M_WR | IIC_M_NOSTOP; @@ -244,7 +241,6 @@ twl_write(device_t dev, uint8_t nsub, uint8_t reg, uint8_t *buf, uint16_t cnt) if (addr == TWL_INVALID_CHIP_ID) return (EIO); - /* Setup the transfer and execute it */ msg.slave = addr; msg.flags = IIC_M_WR; @@ -379,7 +375,7 @@ twl_probe(device_t dev) compat += l; len -= l; } - + switch (sc->sc_type) { case TWL_DEVICE_4030: device_set_desc(dev, "TI TWL4030/TPS659x0 Companion IC"); @@ -394,7 +390,7 @@ twl_probe(device_t dev) default: return (ENXIO); } - + return (0); } @@ -437,7 +433,6 @@ twl_detach(device_t dev) device_delete_child(dev, sc->sc_vreg); if (sc->sc_clks) device_delete_child(dev, sc->sc_clks); - TWL_LOCK_DESTROY(sc); diff --git a/sys/arm/ti/twl/twl_clks.c b/sys/arm/ti/twl/twl_clks.c index 206aa67ef810..fee2f2226a32 100644 --- a/sys/arm/ti/twl/twl_clks.c +++ b/sys/arm/ti/twl/twl_clks.c @@ -73,10 +73,8 @@ __FBSDID("$FreeBSD$"); #include "twl.h" #include "twl_clks.h" - static int twl_clks_debug = 1; - /* * Power Groups bits for the 4030 and 6030 devices */ @@ -94,8 +92,6 @@ static int twl_clks_debug = 1; #define TWL_CLKS_GRP 0x00 /* Regulator GRP register */ #define TWL_CLKS_STATE 0x02 /* TWL6030 only */ - - /** * Support voltage regulators for the different IC's */ @@ -154,9 +150,6 @@ struct twl_clks_softc { } while(0) #define TWL_CLKS_LOCK_DOWNGRADE(_sc) sx_downgrade(&(_sc)->sc_sx); - - - /** * twl_clks_read_1 - read single register from the TWL device * twl_clks_write_1 - writes a single register in the TWL device @@ -182,7 +175,6 @@ twl_clks_write_1(struct twl_clks_softc *sc, struct twl_clk_entry *clk, return (twl_write(sc->sc_pdev, clk->sub_dev, clk->reg_off + off, &val, 1)); } - /** * twl_clks_is_enabled - determines if a clock is enabled * @dev: TWL CLK device @@ -218,15 +210,12 @@ twl_clks_is_enabled(device_t dev, const char *name, int *enabled) return (EINVAL); } - if (twl_is_4030(sc->sc_pdev)) { - err = twl_clks_read_1(sc, clk, TWL_CLKS_GRP, &grp); if (!err) *enabled = (grp & TWL4030_P1_GRP); } else if (twl_is_6030(sc->sc_pdev) || twl_is_6025(sc->sc_pdev)) { - TWL_CLKS_LOCK_UPGRADE(sc); /* Check the clock is in the application group */ @@ -260,7 +249,6 @@ twl_clks_is_enabled(device_t dev, const char *name, int *enabled) return (err); } - /** * twl_clks_set_state - enables/disables a clock output * @sc: device context @@ -293,7 +281,6 @@ twl_clks_set_state(struct twl_clks_softc *sc, struct twl_clk_entry *clk, goto done; if (twl_is_4030(sc->sc_pdev)) { - /* On the TWL4030 we just need to ensure the clock is in the right * power domain, don't need to turn on explicitly like TWL6030. */ @@ -305,7 +292,6 @@ twl_clks_set_state(struct twl_clks_softc *sc, struct twl_clk_entry *clk, err = twl_clks_write_1(sc, clk, TWL_CLKS_GRP, grp); } else if (twl_is_6030(sc->sc_pdev) || twl_is_6025(sc->sc_pdev)) { - /* Make sure the clock belongs to at least the APP power group */ if (twl_is_6030(sc->sc_pdev) && !(grp & TWL6030_P1_GRP)) { grp |= TWL6030_P1_GRP; @@ -342,7 +328,6 @@ twl_clks_set_state(struct twl_clks_softc *sc, struct twl_clk_entry *clk, return (err); } - /** * twl_clks_disable - disables a clock output * @dev: TWL clk device @@ -369,7 +354,7 @@ twl_clks_disable(device_t dev, const char *name) break; } } - + TWL_CLKS_SUNLOCK(sc); return (err); } @@ -400,7 +385,7 @@ twl_clks_enable(device_t dev, const char *name) break; } } - + TWL_CLKS_SUNLOCK(sc); return (err); } @@ -426,7 +411,7 @@ twl_clks_sysctl_clock(SYSCTL_HANDLER_ARGS) if ((err = twl_clks_is_enabled(sc->sc_dev, oidp->oid_name, &enabled)) != 0) return err; - + return sysctl_handle_int(oidp, &enabled, 0, req); } @@ -460,15 +445,12 @@ twl_clks_add_clock(struct twl_clks_softc *sc, const char *name, if (new == NULL) return (NULL); - strncpy(new->name, name, TWL_CLKS_MAX_NAMELEN); new->name[TWL_CLKS_MAX_NAMELEN - 1] = '\0'; new->sub_dev = nsub; new->reg_off = regbase; - - /* Add a sysctl entry for the clock */ new->oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, name, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, @@ -509,13 +491,11 @@ twl_clks_add_clocks(struct twl_clks_softc *sc, const struct twl_clock *clks) int len = 0, prop_len; int enable; - TWL_CLKS_XLOCK(sc); /* Add the regulators from the list */ walker = &clks[0]; while (walker->name != NULL) { - /* Add the regulator to the list */ entry = twl_clks_add_clock(sc, walker->name, walker->subdev, walker->regbase); @@ -528,7 +508,6 @@ twl_clks_add_clocks(struct twl_clks_softc *sc, const struct twl_clock *clks) /* Check for any FDT settings that need to be applied */ child = ofw_bus_get_node(sc->sc_pdev); if (child) { - prop_len = OF_getprop(child, "external-clocks", rnames, sizeof(rnames)); while (len < prop_len) { name = rnames + len; @@ -551,10 +530,9 @@ twl_clks_add_clocks(struct twl_clks_softc *sc, const struct twl_clock *clks) } } } - + TWL_CLKS_XUNLOCK(sc); - if (twl_clks_debug) { LIST_FOREACH(entry, &sc->sc_clks_list, link) { err = twl_clks_is_enabled(sc->sc_dev, entry->name, &enable); @@ -620,7 +598,6 @@ twl_clks_attach(device_t dev) LIST_INIT(&sc->sc_clks_list); - sc->sc_init_hook.ich_func = twl_clks_init; sc->sc_init_hook.ich_arg = dev; diff --git a/sys/arm/ti/twl/twl_clks.h b/sys/arm/ti/twl/twl_clks.h index ccc397e3e76b..85aeb4368e4f 100644 --- a/sys/arm/ti/twl/twl_clks.h +++ b/sys/arm/ti/twl/twl_clks.h @@ -31,10 +31,8 @@ #ifndef _TWL_CLKS_H_ #define _TWL_CLKS_H_ - int twl_clks_enable(device_t dev, const char *name); int twl_clks_disable(device_t dev, const char *name); int twl_clks_is_enabled(device_t dev, const char *name, int *enabled); - #endif /* _TWL_CLKS_H_ */ diff --git a/sys/arm/ti/twl/twl_vreg.c b/sys/arm/ti/twl/twl_vreg.c index 316df6fc8a11..6d78f053624b 100644 --- a/sys/arm/ti/twl/twl_vreg.c +++ b/sys/arm/ti/twl/twl_vreg.c @@ -76,7 +76,6 @@ __FBSDID("$FreeBSD$"); static int twl_vreg_debug = 1; - /* * Power Groups bits for the 4030 and 6030 devices */ @@ -232,7 +231,6 @@ struct twl_vreg_softc { LIST_HEAD(twl_regulator_list, twl_regulator_entry) sc_vreg_list; }; - #define TWL_VREG_XLOCK(_sc) sx_xlock(&(_sc)->sc_sx) #define TWL_VREG_XUNLOCK(_sc) sx_xunlock(&(_sc)->sc_sx) #define TWL_VREG_SLOCK(_sc) sx_slock(&(_sc)->sc_sx) @@ -249,9 +247,6 @@ struct twl_vreg_softc { } while(0) #define TWL_VREG_LOCK_DOWNGRADE(_sc) sx_downgrade(&(_sc)->sc_sx); - - - /** * twl_vreg_read_1 - read single register from the TWL device * twl_vreg_write_1 - write a single register in the TWL device @@ -312,7 +307,6 @@ twl_vreg_millivolt_to_vsel(struct twl_vreg_softc *sc, closest_idx = 0; smallest_delta = 0x7fffffff; for (i = 0; i < regulator->num_supp_voltages; i++) { - /* Ignore undefined values */ if (regulator->supp_voltages[i] == UNDF) continue; @@ -357,7 +351,7 @@ twl_vreg_is_regulator_enabled(struct twl_vreg_softc *sc, uint8_t grp; uint8_t state; int xlocked; - + if (enabled == NULL) return (EINVAL); @@ -369,7 +363,6 @@ twl_vreg_is_regulator_enabled(struct twl_vreg_softc *sc, /* The status reading is different for the different devices */ if (twl_is_4030(sc->sc_pdev)) { - err = twl_vreg_read_1(sc, regulator, TWL_VREG_GRP, &state); if (err) goto done; @@ -377,7 +370,6 @@ twl_vreg_is_regulator_enabled(struct twl_vreg_softc *sc, *enabled = (state & TWL4030_P1_GRP); } else if (twl_is_6030(sc->sc_pdev) || twl_is_6025(sc->sc_pdev)) { - /* Check the regulator is in the application group */ if (twl_is_6030(sc->sc_pdev)) { err = twl_vreg_read_1(sc, regulator, TWL_VREG_GRP, &grp); @@ -438,7 +430,6 @@ twl_vreg_disable_regulator(struct twl_vreg_softc *sc, TWL_VREG_LOCK_UPGRADE(sc); if (twl_is_4030(sc->sc_pdev)) { - /* Read the regulator CFG_GRP register */ err = twl_vreg_read_1(sc, regulator, TWL_VREG_GRP, &grp); if (err) @@ -451,7 +442,6 @@ twl_vreg_disable_regulator(struct twl_vreg_softc *sc, err = twl_vreg_write_1(sc, regulator, TWL_VREG_GRP, grp); } else if (twl_is_6030(sc->sc_pdev) || twl_is_6025(sc->sc_pdev)) { - /* On TWL6030 we need to make sure we disable power for all groups */ if (twl_is_6030(sc->sc_pdev)) grp = TWL6030_P1_GRP | TWL6030_P2_GRP | TWL6030_P3_GRP; @@ -465,7 +455,7 @@ twl_vreg_disable_regulator(struct twl_vreg_softc *sc, done: if (!xlocked) TWL_VREG_LOCK_DOWNGRADE(sc); - + return (err); } @@ -500,7 +490,6 @@ twl_vreg_enable_regulator(struct twl_vreg_softc *sc, if (!xlocked) TWL_VREG_LOCK_UPGRADE(sc); - err = twl_vreg_read_1(sc, regulator, TWL_VREG_GRP, &grp); if (err) goto done; @@ -509,7 +498,6 @@ twl_vreg_enable_regulator(struct twl_vreg_softc *sc, * and is in the "on" state. */ if (twl_is_4030(sc->sc_pdev)) { - /* On the TWL4030 we just need to ensure the regulator is in the right * power domain, don't need to turn on explicitly like TWL6030. */ @@ -517,7 +505,6 @@ twl_vreg_enable_regulator(struct twl_vreg_softc *sc, err = twl_vreg_write_1(sc, regulator, TWL_VREG_GRP, grp); } else if (twl_is_6030(sc->sc_pdev) || twl_is_6025(sc->sc_pdev)) { - if (twl_is_6030(sc->sc_pdev) && !(grp & TWL6030_P1_GRP)) { grp |= TWL6030_P1_GRP; err = twl_vreg_write_1(sc, regulator, TWL_VREG_GRP, grp); @@ -532,7 +519,7 @@ twl_vreg_enable_regulator(struct twl_vreg_softc *sc, done: if (!xlocked) TWL_VREG_LOCK_DOWNGRADE(sc); - + return (err); } @@ -581,13 +568,11 @@ twl_vreg_write_regulator_voltage(struct twl_vreg_softc *sc, if (err) return (err); - /* Need to upgrade because writing the voltage and enabling should be atomic */ xlocked = sx_xlocked(&sc->sc_sx); if (!xlocked) TWL_VREG_LOCK_UPGRADE(sc); - /* Set voltage and enable (atomically) */ err = twl_vreg_write_1(sc, regulator, TWL_VREG_VSEL, (vsel & 0x1f)); if (!err) { @@ -626,9 +611,9 @@ twl_vreg_read_regulator_voltage(struct twl_vreg_softc *sc, int en = 0; int xlocked; uint8_t vsel; - + TWL_VREG_ASSERT_LOCKED(sc); - + /* Need to upgrade the lock because checking enabled state and voltage * should be atomic. */ @@ -636,7 +621,6 @@ twl_vreg_read_regulator_voltage(struct twl_vreg_softc *sc, if (!xlocked) TWL_VREG_LOCK_UPGRADE(sc); - /* Check if the regulator is currently enabled */ err = twl_vreg_is_regulator_enabled(sc, regulator, &en); if (err) @@ -646,7 +630,6 @@ twl_vreg_read_regulator_voltage(struct twl_vreg_softc *sc, if (!en) goto done; - /* Not all voltages are adjustable */ if (regulator->supp_voltages == NULL || !regulator->num_supp_voltages) { *millivolts = regulator->fixed_voltage; @@ -669,7 +652,7 @@ twl_vreg_read_regulator_voltage(struct twl_vreg_softc *sc, done: if (!xlocked) TWL_VREG_LOCK_DOWNGRADE(sc); - + if ((twl_vreg_debug > 1) && !err) device_printf(sc->sc_dev, "%s : reading voltage is %dmV (vsel: 0x%x)\n", regulator->name, *millivolts, vsel); @@ -833,7 +816,6 @@ twl_vreg_add_regulator(struct twl_vreg_softc *sc, const char *name, if (new == NULL) return (NULL); - strncpy(new->name, name, TWL_VREG_MAX_NAMELEN); new->name[TWL_VREG_MAX_NAMELEN - 1] = '\0'; @@ -845,7 +827,6 @@ twl_vreg_add_regulator(struct twl_vreg_softc *sc, const char *name, new->supp_voltages = voltages; new->num_supp_voltages = num_voltages; - /* Add a sysctl entry for the voltage */ new->oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, name, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, @@ -885,11 +866,9 @@ twl_vreg_add_regulators(struct twl_vreg_softc *sc, char *name, *voltage; int len = 0, prop_len; - /* Add the regulators from the list */ walker = ®ulators[0]; while (walker->name != NULL) { - /* Add the regulator to the list */ entry = twl_vreg_add_regulator(sc, walker->name, walker->subdev, walker->regbase, walker->fixedvoltage, @@ -900,11 +879,9 @@ twl_vreg_add_regulators(struct twl_vreg_softc *sc, walker++; } - /* Check if the FDT is telling us to set any voltages */ child = ofw_bus_get_node(sc->sc_pdev); if (child) { - prop_len = OF_getprop(child, "voltage-regulators", rnames, sizeof(rnames)); while (len < prop_len) { name = rnames + len; @@ -927,8 +904,7 @@ twl_vreg_add_regulators(struct twl_vreg_softc *sc, } } } - - + if (twl_vreg_debug) { LIST_FOREACH(entry, &sc->sc_vreg_list, entries) { err = twl_vreg_read_regulator_voltage(sc, entry, &millivolts); diff --git a/sys/arm/ti/twl/twl_vreg.h b/sys/arm/ti/twl/twl_vreg.h index 45543705e255..ee7165fce920 100644 --- a/sys/arm/ti/twl/twl_vreg.h +++ b/sys/arm/ti/twl/twl_vreg.h @@ -31,7 +31,6 @@ #ifndef _TWL_VREG_H_ #define _TWL_VREG_H_ - int twl_vreg_get_voltage(device_t dev, const char *name, int *millivolts); int twl_vreg_set_voltage(device_t dev, const char *name, int millivolts); diff --git a/sys/arm/ti/usb/omap_ehci.c b/sys/arm/ti/usb/omap_ehci.c index adc2c122f054..8b1bb700bf43 100644 --- a/sys/arm/ti/usb/omap_ehci.c +++ b/sys/arm/ti/usb/omap_ehci.c @@ -193,7 +193,6 @@ omap_ehci_soft_phy_reset(struct omap_ehci_softc *isc, unsigned int port) /* Wait for ULPI access completion */ while ((omap_ehci_read_4(isc, OMAP_USBHOST_INSNREG05_ULPI) & (1 << OMAP_USBHOST_INSNREG05_ULPI_CONTROL_SHIFT))) { - /* Sleep for a tick */ pause("USBPHY_RESET", 1); @@ -224,7 +223,7 @@ omap_ehci_init(struct omap_ehci_softc *isc) uint32_t reg = 0; int i; device_t uhh_dev; - + uhh_dev = device_get_parent(isc->sc_dev); device_printf(isc->sc_dev, "Starting TI EHCI USB Controller\n"); @@ -241,7 +240,6 @@ omap_ehci_init(struct omap_ehci_softc *isc) for (i = 0; i < OMAP_HS_USB_PORTS; i++) { if (omap_usb_port_mode(uhh_dev, i) == EHCI_HCD_OMAP_MODE_PHY) omap_ehci_soft_phy_reset(isc, i); - } return(0); @@ -269,7 +267,7 @@ omap_ehci_probe(device_t dev) return (ENXIO); device_set_desc(dev, OMAP_EHCI_HC_DEVSTR); - + return (BUS_PROBE_DEFAULT); } @@ -318,13 +316,13 @@ omap_ehci_attach(device_t dev) /* save the device */ isc->sc_dev = dev; - + /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), &ehci_iterate_hw_softc)) { return (ENOMEM); } - + /* Allocate resource for the EHCI register set */ rid = 0; sc->sc_io_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -349,7 +347,7 @@ omap_ehci_attach(device_t dev) device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); device_set_desc(sc->sc_bus.bdev, OMAP_EHCI_HC_DEVSTR); - + /* Initialise the ECHI registers */ err = omap_ehci_init(isc); if (err) { @@ -370,7 +368,7 @@ omap_ehci_attach(device_t dev) sc->sc_intr_hdl = NULL; goto error; } - + /* Finally we are ready to kick off the ECHI host controller */ err = ehci_init(sc); if (err == 0) { @@ -380,9 +378,9 @@ omap_ehci_attach(device_t dev) device_printf(dev, "Error: USB init failed err=%d\n", err); goto error; } - + return (0); - + error: omap_ehci_detach(dev); return (ENXIO); @@ -408,17 +406,17 @@ omap_ehci_detach(device_t dev) struct omap_ehci_softc *isc = device_get_softc(dev); ehci_softc_t *sc = &isc->base; int err; - + /* during module unload there are lots of children leftover */ device_delete_children(dev); - + /* * disable interrupts that might have been switched on in ehci_init */ if (sc->sc_io_res) { EWRITE4(sc, EHCI_USBINTR, 0); } - + if (sc->sc_irq_res && sc->sc_intr_hdl) { /* * only call ehci_detach() after ehci_init() @@ -430,7 +428,7 @@ omap_ehci_detach(device_t dev) device_printf(dev, "Error: could not tear down irq, %d\n", err); sc->sc_intr_hdl = NULL; } - + /* Free the resources stored in the base EHCI handler */ if (sc->sc_irq_res) { bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); @@ -453,10 +451,9 @@ static device_method_t ehci_methods[] = { DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), DEVMETHOD(device_shutdown, bus_generic_shutdown), - + /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), - {0, 0} }; diff --git a/sys/arm/ti/usb/omap_host.c b/sys/arm/ti/usb/omap_host.c index 736ccf17262e..c73ec1319042 100644 --- a/sys/arm/ti/usb/omap_host.c +++ b/sys/arm/ti/usb/omap_host.c @@ -268,7 +268,6 @@ omap_uhh_init(struct omap_uhh_softc *isc) omap_uhh_write_4(isc, OMAP_USBHOST_UHH_HOSTCONFIG, reg); device_printf(isc->sc_dev, "UHH setup done, uhh_hostconfig=0x%08x\n", reg); - /* I found the code and comments in the Linux EHCI driver - thanks guys :) * * "An undocumented "feature" in the OMAP3 EHCI controller, causes suspended diff --git a/sys/arm/ti/usb/omap_tll.c b/sys/arm/ti/usb/omap_tll.c index c5383e3d52d3..6737b23b2d07 100644 --- a/sys/arm/ti/usb/omap_tll.c +++ b/sys/arm/ti/usb/omap_tll.c @@ -223,7 +223,6 @@ omap_tll_init(struct omap_tll_softc *sc) /* Wait for TLL reset to complete */ while ((omap_tll_read_4(sc, OMAP_USBTLL_SYSSTATUS) & TLL_SYSSTATUS_RESETDONE) == 0x00) { - /* Sleep for a tick */ pause("USBRESET", 1); @@ -348,7 +347,6 @@ static device_method_t omap_tll_methods[] = { DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), DEVMETHOD(device_shutdown, bus_generic_shutdown), - {0, 0} }; diff --git a/sys/arm/versatile/versatile_clcd.c b/sys/arm/versatile/versatile_clcd.c index dedcd8db8994..81a0dbcc5256 100644 --- a/sys/arm/versatile/versatile_clcd.c +++ b/sys/arm/versatile/versatile_clcd.c @@ -262,7 +262,7 @@ versatile_clcdc_attach(device_t dev) sc->mode = CLCD_MODE_RGB565; versatile_scm_reg_write_4(SCM_CLCD, reg); dma_size = sc->width*sc->height*2; - + /* * Power on LCD */ @@ -538,7 +538,6 @@ clcdr_draw_cursor(scr_stat* scp, int off, int blink, int on, int flip) /* our cursor consists of simply inverting the char under it */ for (i = 0; i < adp->va_info.vi_cheight; i++) { for (j = 0; j < adp->va_info.vi_cwidth; j++) { - addr[2*j] ^= 0xff; addr[2*j + 1] ^= 0xff; } diff --git a/sys/arm/versatile/versatile_common.c b/sys/arm/versatile/versatile_common.c index 66db84060119..4a1a86d5e372 100644 --- a/sys/arm/versatile/versatile_common.c +++ b/sys/arm/versatile/versatile_common.c @@ -65,7 +65,6 @@ fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, return (0); } - fdt_pic_decode_t fdt_pic_table[] = { &fdt_intc_decode_ic, NULL diff --git a/sys/arm/versatile/versatile_machdep.c b/sys/arm/versatile/versatile_machdep.c index 14275ed61ad0..87f52ceab12b 100644 --- a/sys/arm/versatile/versatile_machdep.c +++ b/sys/arm/versatile/versatile_machdep.c @@ -72,7 +72,6 @@ static struct devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, } }; - /* * Construct devmap table with DT-derived config data. */ diff --git a/sys/arm/xilinx/uart_dev_cdnc.c b/sys/arm/xilinx/uart_dev_cdnc.c index 1dc2b584e97f..50fbfd5c616c 100644 --- a/sys/arm/xilinx/uart_dev_cdnc.c +++ b/sys/arm/xilinx/uart_dev_cdnc.c @@ -35,7 +35,6 @@ * and register definitions are in appendix B.33. */ - #include __FBSDID("$FreeBSD$"); @@ -144,7 +143,6 @@ __FBSDID("$FreeBSD$"); #define CDNC_UART_FLOWDEL_REG 0x38 #define CDNC_UART_TX_WATER_REG 0x44 - /* * Low-level UART interface. */ @@ -373,9 +371,9 @@ cdnc_uart_getc(struct uart_bas *bas, struct mtx *mtx) DELAY(4); uart_lock(mtx); } - + c = RD4(bas, CDNC_UART_FIFO); - + uart_unlock(mtx); c &= 0xff; @@ -413,7 +411,7 @@ static kobj_method_t cdnc_uart_bus_methods[] = { KOBJMETHOD(uart_transmit, cdnc_uart_bus_transmit), KOBJMETHOD(uart_grab, cdnc_uart_bus_grab), KOBJMETHOD(uart_ungrab, cdnc_uart_bus_ungrab), - + KOBJMETHOD_END }; diff --git a/sys/arm/xilinx/zy7_devcfg.c b/sys/arm/xilinx/zy7_devcfg.c index 66b27bf4220d..d10cf1e31c23 100644 --- a/sys/arm/xilinx/zy7_devcfg.c +++ b/sys/arm/xilinx/zy7_devcfg.c @@ -455,7 +455,7 @@ zy7_devcfg_reset_pl(struct zy7_devcfg_softc *sc) if (err != 0) return (err); } - + /* Reassert PROG_B (active low). */ devcfg_ctl &= ~ZY7_DEVCFG_CTRL_PCFG_PROG_B; WR4(sc, ZY7_DEVCFG_CTRL, devcfg_ctl); diff --git a/sys/arm/xilinx/zy7_ehci.c b/sys/arm/xilinx/zy7_ehci.c index 7940d86c5855..28e4705599c7 100644 --- a/sys/arm/xilinx/zy7_ehci.c +++ b/sys/arm/xilinx/zy7_ehci.c @@ -36,7 +36,6 @@ * controller and register definitions are in appendix B.34. */ - #include __FBSDID("$FreeBSD$"); @@ -72,7 +71,6 @@ __FBSDID("$FreeBSD$"); #include #include - /* Register definitions. */ #define ZY7_USB_ID 0x0000 #define ZY7_USB_HWGENERAL 0x0004 @@ -180,7 +178,6 @@ zy7_phy_config(device_t dev, bus_space_tag_t io_tag, bus_space_handle_t bsh) } if (OF_getprop(node, "phy_vbus_ext", buf, sizeof(buf)) >= 0) { - /* Tell PHY that VBUS is supplied externally. */ bus_space_write_4(io_tag, bsh, ZY7_USB_ULPI_VIEWPORT, ZY7_USB_ULPI_VIEWPORT_RUN | @@ -224,7 +221,7 @@ zy7_ehci_attach(device_t dev) ehci_softc_t *sc = device_get_softc(dev); bus_space_handle_t bsh; int err, rid; - + /* initialize some bus fields */ sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; @@ -326,7 +323,7 @@ zy7_ehci_detach(device_t dev) /* during module unload there are lots of children leftover */ device_delete_children(dev); - + if ((sc->sc_flags & EHCI_SCFLG_DONEINIT) != 0) { ehci_detach(sc); sc->sc_flags &= ~EHCI_SCFLG_DONEINIT; diff --git a/sys/arm/xilinx/zy7_gpio.c b/sys/arm/xilinx/zy7_gpio.c index 8f9a1a05af9b..3e31805f19fe 100644 --- a/sys/arm/xilinx/zy7_gpio.c +++ b/sys/arm/xilinx/zy7_gpio.c @@ -98,7 +98,6 @@ struct zy7_gpio_softc { #define WR4(sc, off, val) bus_write_4((sc)->mem_res, (off), (val)) #define RD4(sc, off) bus_read_4((sc)->mem_res, (off)) - /* Xilinx Zynq-7000 GPIO register definitions: */ #define ZY7_GPIO_MASK_DATA_LSW(b) (0x0000+8*(b)) /* maskable wr lo */ diff --git a/sys/arm/xilinx/zy7_qspi.c b/sys/arm/xilinx/zy7_qspi.c index 679685864e07..e94c93db1e36 100644 --- a/sys/arm/xilinx/zy7_qspi.c +++ b/sys/arm/xilinx/zy7_qspi.c @@ -268,7 +268,6 @@ zy7_qspi_write_fifo(struct zy7_qspi_softc *sc, int nbytes) } } - /* Read hardware fifo data into command response and data buffers. */ static void zy7_qspi_read_fifo(struct zy7_qspi_softc *sc) @@ -327,7 +326,6 @@ zy7_qspi_abort_transfer(struct zy7_qspi_softc *sc) ZY7_QSPI_INTR_TX_FIFO_NOT_FULL); } - static void zy7_qspi_intr(void *arg) { @@ -401,7 +399,6 @@ zy7_qspi_intr(void *arg) /* Finished with transfer? */ if (sc->tx_bytes_sent == sc->tx_bytes && sc->rx_bytes_rcvd == sc->rx_bytes) { - /* De-assert CS. */ sc->cfg_reg_shadow |= ZY7_QSPI_CONFIG_PCS; WR4(sc, ZY7_QSPI_CONFIG_REG, sc->cfg_reg_shadow); @@ -490,7 +487,6 @@ zy7_qspi_init_hw(struct zy7_qspi_softc *sc) return (0); } - static void zy7_qspi_add_sysctls(device_t dev) { @@ -517,7 +513,6 @@ zy7_qspi_add_sysctls(device_t dev) &sc->stray_ints, 0, "stray interrupts"); } - static int zy7_qspi_probe(device_t dev) { @@ -533,7 +528,6 @@ zy7_qspi_probe(device_t dev) return (BUS_PROBE_DEFAULT); } - static int zy7_qspi_attach(device_t dev) { @@ -656,7 +650,6 @@ zy7_qspi_detach(device_t dev) return (0); } - static phandle_t zy7_qspi_get_node(device_t bus, device_t dev) { @@ -664,7 +657,6 @@ zy7_qspi_get_node(device_t bus, device_t dev) return (ofw_bus_get_node(bus)); } - static int zy7_qspi_transfer(device_t dev, device_t child, struct spi_command *cmd) { @@ -749,7 +741,6 @@ static device_method_t zy7_qspi_methods[] = { DEVMETHOD_END }; - static driver_t zy7_qspi_driver = { "zy7_qspi", zy7_qspi_methods, diff --git a/sys/arm/xilinx/zy7_reg.h b/sys/arm/xilinx/zy7_reg.h index d790ac35b4a3..855fa0df16d1 100644 --- a/sys/arm/xilinx/zy7_reg.h +++ b/sys/arm/xilinx/zy7_reg.h @@ -56,7 +56,6 @@ #define ZYNQ7_UART1_HWBASE (ZYNQ7_PSIO_HWBASE+0x1000) #define ZYNQ7_UART1_SIZE 0x1000 - /* SMC Memories not mapped for now. */ #define ZYNQ7_SMC_HWBASE 0xE1000000 #define ZYNQ7_SMC_SIZE 0x05000000 diff --git a/sys/arm/xilinx/zy7_spi.c b/sys/arm/xilinx/zy7_spi.c index 5ac03947b835..2f8edfedf7f1 100644 --- a/sys/arm/xilinx/zy7_spi.c +++ b/sys/arm/xilinx/zy7_spi.c @@ -149,7 +149,6 @@ struct zy7_spi_softc { #define ZY7_SPI_TX_THRESH_REG 0x0028 #define ZY7_SPI_RX_THRESH_REG 0x002c - /* Fill hardware fifo with command and data bytes. */ static void zy7_spi_write_fifo(struct zy7_spi_softc *sc, int nbytes) @@ -173,7 +172,6 @@ zy7_spi_write_fifo(struct zy7_spi_softc *sc, int nbytes) } } - /* Read hardware fifo data into command response and data buffers. */ static void zy7_spi_read_fifo(struct zy7_spi_softc *sc) @@ -216,7 +214,6 @@ zy7_spi_abort_transfer(struct zy7_spi_softc *sc) ZY7_SPI_INTR_TX_FIFO_NOT_FULL); } - static void zy7_spi_intr(void *arg) { @@ -285,7 +282,6 @@ zy7_spi_intr(void *arg) /* Finished with transfer? */ if (sc->tx_bytes_sent == sc->tx_bytes && sc->rx_bytes_rcvd == sc->rx_bytes) { - /* De-assert CS. */ sc->cfg_reg_shadow &= ~(ZY7_SPI_CONFIG_CLK_PH | ZY7_SPI_CONFIG_CLK_POL); @@ -338,7 +334,6 @@ zy7_spi_init_hw(struct zy7_spi_softc *sc) return (0); } - static void zy7_spi_add_sysctls(device_t dev) { @@ -365,7 +360,6 @@ zy7_spi_add_sysctls(device_t dev) &sc->stray_ints, 0, "stray interrupts"); } - static int zy7_spi_probe(device_t dev) { @@ -381,7 +375,6 @@ zy7_spi_probe(device_t dev) return (BUS_PROBE_DEFAULT); } - static int zy7_spi_detach(device_t); static int @@ -496,7 +489,6 @@ zy7_spi_detach(device_t dev) return (0); } - static phandle_t zy7_spi_get_node(device_t bus, device_t dev) { @@ -504,7 +496,6 @@ zy7_spi_get_node(device_t bus, device_t dev) return (ofw_bus_get_node(bus)); } - static int zy7_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) { @@ -592,7 +583,6 @@ static device_method_t zy7_spi_methods[] = { DEVMETHOD_END }; - static driver_t zy7_spi_driver = { "zy7_spi", zy7_spi_methods,