From 32597a763ad4e0935ad74ff5f550c15e3e6de91e Mon Sep 17 00:00:00 2001 From: Ouss4 Date: Mon, 27 Apr 2020 03:25:22 +0100 Subject: [PATCH] arch/mips: Fix file naming. --- ...{up_allocateheap.c => mips_allocateheap.c} | 6 +- .../src/common/{up_arch.h => mips_arch.h} | 2 +- .../{up_createstack.c => mips_createstack.c} | 6 +- .../{up_etherstub.c => mips_etherstub.c} | 4 +- .../src/common/{up_exit.c => mips_exit.c} | 4 +- .../src/common/{up_idle.c => mips_idle.c} | 4 +- .../{up_initialize.c => mips_initialize.c} | 6 +- .../common/{up_internal.h => mips_internal.h} | 6 +- ...rruptcontext.c => mips_interruptcontext.c} | 4 +- .../common/{up_lowputs.c => mips_lowputs.c} | 4 +- .../src/common/{up_mdelay.c => mips_mdelay.c} | 2 +- .../{up_modifyreg16.c => mips_modifyreg16.c} | 4 +- .../{up_modifyreg32.c => mips_modifyreg32.c} | 4 +- .../{up_modifyreg8.c => mips_modifyreg8.c} | 4 +- .../src/common/{up_puts.c => mips_puts.c} | 4 +- ...{up_releasestack.c => mips_releasestack.c} | 4 +- .../{up_stackframe.c => mips_stackframe.c} | 5 +- .../src/common/{up_udelay.c => mips_udelay.c} | 2 +- .../common/{up_usestack.c => mips_usestack.c} | 4 +- .../src/mips32/{up_assert.c => mips_assert.c} | 6 +- .../{up_blocktask.c => mips_blocktask.c} | 4 +- .../src/mips32/{up_cache.S => mips_cache.S} | 6 +- .../{up_copystate.c => mips_copystate.c} | 4 +- .../src/mips32/{up_doirq.c => mips_doirq.c} | 6 +- .../{up_dumpstate.c => mips_dumpstate.c} | 6 +- ...{up_initialstate.c => mips_initialstate.c} | 6 +- arch/mips/src/mips32/{up_irq.c => mips_irq.c} | 2 +- ...releasepending.c => mips_releasepending.c} | 4 +- ...prioritizertr.c => mips_reprioritizertr.c} | 6 +- ...lesigaction.c => mips_schedulesigaction.c} | 6 +- .../{up_sigdeliver.c => mips_sigdeliver.c} | 9 +- .../src/mips32/{up_swint0.c => mips_swint0.c} | 10 +- .../mips32/{up_syscall0.S => mips_syscall0.S} | 4 +- .../{up_unblocktask.c => mips_unblocktask.c} | 4 +- .../src/mips32/{up_vfork.c => mips_vfork.c} | 6 +- .../src/mips32/{up_vfork.h => mips_vfork.h} | 9 +- arch/mips/src/mips32/vfork.S | 2 +- arch/mips/src/pic32mx/Make.defs | 40 +- arch/mips/src/pic32mx/pic32mx.h | 31 +- .../pic32mx/{pic32mx-adc.h => pic32mx_adc.h} | 5 +- .../pic32mx/{pic32mx-bmx.h => pic32mx_bmx.h} | 5 +- .../pic32mx/{pic32mx-can.h => pic32mx_can.h} | 5 +- .../pic32mx/{pic32mx-che.h => pic32mx_che.h} | 5 +- .../pic32mx/{pic32mx-cm.h => pic32mx_cm.h} | 5 +- .../{pic32mx-config.h => pic32mx_config.h} | 16 +- .../pic32mx/{pic32mx-cvr.h => pic32mx_cvr.h} | 5 +- .../pic32mx/{pic32mx-ddp.h => pic32mx_ddp.h} | 4 +- ...ic32mx-decodeirq.c => pic32mx_decodeirq.c} | 10 +- .../{pic32mx-devcfg.h => pic32mx_devcfg.h} | 4 +- .../pic32mx/{pic32mx-dma.h => pic32mx_dma.h} | 4 +- ...{pic32mx-ethernet.c => pic32mx_ethernet.c} | 41 +- ...{pic32mx-ethernet.h => pic32mx_ethernet.h} | 4 +- ...ic32mx-exception.c => pic32mx_exception.c} | 10 +- .../{pic32mx-flash.h => pic32mx_flash.h} | 4 +- .../{pic32mx-gpio.c => pic32mx_gpio.c} | 6 +- .../{pic32mx-gpioirq.c => pic32mx_gpioirq.c} | 6 +- .../{pic32mx-head.S => pic32mx_head.S} | 8 +- .../pic32mx/{pic32mx-i2c.h => pic32mx_i2c.h} | 4 +- .../pic32mx/{pic32mx-ic.h => pic32mx_ic.h} | 4 +- .../pic32mx/{pic32mx-int.h => pic32mx_int.h} | 4 +- .../{pic32mx-ioport.h => pic32mx_ioport.h} | 4 +- .../pic32mx/{pic32mx-irq.c => pic32mx_irq.c} | 24 +- ...32mx-lowconsole.c => pic32mx_lowconsole.c} | 10 +- .../{pic32mx-lowinit.c => pic32mx_lowinit.c} | 11 +- ...ic32mx-memorymap.h => pic32mx_memorymap.h} | 2 +- .../pic32mx/{pic32mx-oc.h => pic32mx_oc.h} | 4 +- .../pic32mx/{pic32mx-osc.h => pic32mx_osc.h} | 4 +- .../pic32mx/{pic32mx-pmp.h => pic32mx_pmp.h} | 4 +- .../pic32mx/{pic32mx-pps.h => pic32mx_pps.h} | 4 +- .../{pic32mx-reset.h => pic32mx_reset.h} | 4 +- .../{pic32mx-rtcc.h => pic32mx_rtcc.h} | 4 +- .../{pic32mx-serial.c => pic32mx_serial.c} | 12 +- .../pic32mx/{pic32mx-spi.c => pic32mx_spi.c} | 22 +- .../pic32mx/{pic32mx-spi.h => pic32mx_spi.h} | 4 +- .../{pic32mx-timer.h => pic32mx_timer.h} | 4 +- ...{pic32mx-timerisr.c => pic32mx_timerisr.c} | 12 +- .../{pic32mx-uart.h => pic32mx_uart.h} | 4 +- .../{pic32mx-usbdev.c => pic32mx_usbdev.c} | 4 +- .../{pic32mx-usbotg.h => pic32mx_usbotg.h} | 4 +- .../pic32mx/{pic32mx-wdt.h => pic32mx_wdt.h} | 4 +- arch/mips/src/pic32mz/Make.defs | 54 +-- .../hardware/{pic32mz-dma.h => pic32mz_dma.h} | 4 +- ...{pic32mz-ethernet.h => pic32mz_ethernet.h} | 4 +- ...{pic32mz-features.h => pic32mz_features.h} | 6 +- .../hardware/{pic32mz-i2c.h => pic32mz_i2c.h} | 4 +- .../hardware/{pic32mz-int.h => pic32mz_int.h} | 4 +- .../{pic32mz-ioport.h => pic32mz_ioport.h} | 4 +- ...ic32mz-memorymap.h => pic32mz_memorymap.h} | 6 +- .../hardware/{pic32mz-osc.h => pic32mz_osc.h} | 4 +- .../hardware/{pic32mz-pps.h => pic32mz_pps.h} | 6 +- ...{pic32mz-prefetch.h => pic32mz_prefetch.h} | 4 +- .../hardware/{pic32mz-spi.h => pic32mz_spi.h} | 4 +- .../{pic32mz-timer.h => pic32mz_timer.h} | 4 +- .../{pic32mz-uart.h => pic32mz_uart.h} | 4 +- ...32mzec-features.h => pic32mzec_features.h} | 0 ...mzec-memorymap.h => pic32mzec_memorymap.h} | 0 .../{pic32mzec-pps.h => pic32mzec_pps.h} | 2 +- ...32mzef-features.h => pic32mzef_features.h} | 0 ...mzef-memorymap.h => pic32mzef_memorymap.h} | 0 .../{pic32mzef-pps.h => pic32mzef_pps.h} | 2 +- .../{pic32mz-config.h => pic32mz_config.h} | 2 +- ...ic32mz-decodeirq.c => pic32mz_decodeirq.c} | 12 +- .../pic32mz/{pic32mz-dma.c => pic32mz_dma.c} | 10 +- .../pic32mz/{pic32mz-dma.h => pic32mz_dma.h} | 18 +- ...{pic32mz-ethernet.c => pic32mz_ethernet.c} | 51 ++- ...ic32mz-exception.c => pic32mz_exception.c} | 12 +- ...mz-excptmacros.h => pic32mz_excptmacros.h} | 2 +- .../{pic32mz-freerun.c => pic32mz_freerun.c} | 4 +- .../{pic32mz-freerun.h => pic32mz_freerun.h} | 4 +- .../{pic32mz-gpio.c => pic32mz_gpio.c} | 8 +- .../{pic32mz-gpio.h => pic32mz_gpio.h} | 2 +- .../{pic32mz-gpioirq.c => pic32mz_gpioirq.c} | 10 +- .../{pic32mz-head.S => pic32mz_head.S} | 10 +- .../pic32mz/{pic32mz-i2c.c => pic32mz_i2c.c} | 10 +- .../pic32mz/{pic32mz-i2c.h => pic32mz_i2c.h} | 2 +- .../pic32mz/{pic32mz-irq.c => pic32mz_irq.c} | 26 +- ...32mz-lowconsole.c => pic32mz_lowconsole.c} | 20 +- ...32mz-lowconsole.h => pic32mz_lowconsole.h} | 2 +- .../{pic32mz-lowinit.c => pic32mz_lowinit.c} | 20 +- .../{pic32mz-lowinit.h => pic32mz_lowinit.h} | 2 +- ...owerhalf.c => pic32mz_oneshot-lowerhalf.c} | 4 +- .../{pic32mz-oneshot.c => pic32mz_oneshot.c} | 7 +- .../{pic32mz-oneshot.h => pic32mz_oneshot.h} | 4 +- .../src/pic32mz/pic32mz_oneshot_lowerhalf.c | 353 ++++++++++++++++++ .../{pic32mz-serial.c => pic32mz_serial.c} | 21 +- .../pic32mz/{pic32mz-spi.c => pic32mz_spi.c} | 14 +- .../pic32mz/{pic32mz-spi.h => pic32mz_spi.h} | 2 +- .../{pic32mz-timer.c => pic32mz_timer.c} | 18 +- .../{pic32mz-timer.h => pic32mz_timer.h} | 2 +- ...-lowerhalf.c => pic32mz_timer_lowerhalf.c} | 4 +- ...{pic32mz-timerisr.c => pic32mz_timerisr.c} | 12 +- .../{pic32mz-usbdev.h => pic32mz_usbdev.h} | 2 +- boards/mips/pic32mx/mirtoo/README.txt | 2 +- boards/mips/pic32mx/mirtoo/src/pic32_boot.c | 6 +- boards/mips/pic32mx/mirtoo/src/pic32_spi2.c | 4 +- .../pic32mx-starterkit/src/pic32mx_boot.c | 4 +- .../pic32mx-starterkit/src/pic32mx_leds.c | 6 +- .../pic32mx-starterkit/src/pic32mx_spi.c | 2 +- boards/mips/pic32mx/pic32mx7mmb/README.txt | 2 +- .../mips/pic32mx/pic32mx7mmb/src/pic32_boot.c | 17 +- .../pic32mx/pic32mx7mmb/src/pic32_mio283qt2.c | 13 +- .../mips/pic32mx/pic32mx7mmb/src/pic32_spi.c | 21 +- .../pic32mx7mmb/src/pic32_touchscreen.c | 18 +- .../sure-pic32mx/src/pic32mx_autoleds.c | 6 +- .../pic32mx/sure-pic32mx/src/pic32mx_boot.c | 4 +- .../sure-pic32mx/src/pic32mx_buttons.c | 6 +- .../sure-pic32mx/src/pic32mx_lcd1602.c | 6 +- .../pic32mx/sure-pic32mx/src/pic32mx_spi.c | 2 +- boards/mips/pic32mx/ubw32/src/pic32_boot.c | 7 +- boards/mips/pic32mx/ubw32/src/pic32_buttons.c | 16 +- boards/mips/pic32mx/ubw32/src/pic32_leds.c | 4 +- .../flipnclick-pic32mz/src/pic32mz_autoleds.c | 6 +- .../flipnclick-pic32mz/src/pic32mz_buttons.c | 2 +- .../flipnclick-pic32mz/src/pic32mz_spi.c | 4 +- .../flipnclick-pic32mz/src/pic32mz_ssd1306.c | 4 +- .../flipnclick-pic32mz/src/pic32mz_userleds.c | 6 +- .../pic32mz-starterkit/src/pic32mz_autoleds.c | 6 +- .../pic32mz-starterkit/src/pic32mz_buttons.c | 2 +- .../pic32mz-starterkit/src/pic32mz_spi.c | 2 +- .../pic32mz-starterkit/src/pic32mz_userleds.c | 6 +- 160 files changed, 984 insertions(+), 540 deletions(-) rename arch/mips/src/common/{up_allocateheap.c => mips_allocateheap.c} (97%) rename arch/mips/src/common/{up_arch.h => mips_arch.h} (98%) rename arch/mips/src/common/{up_createstack.c => mips_createstack.c} (98%) rename arch/mips/src/common/{up_etherstub.c => mips_etherstub.c} (98%) rename arch/mips/src/common/{up_exit.c => mips_exit.c} (99%) rename arch/mips/src/common/{up_idle.c => mips_idle.c} (98%) rename arch/mips/src/common/{up_initialize.c => mips_initialize.c} (98%) rename arch/mips/src/common/{up_internal.h => mips_internal.h} (99%) rename arch/mips/src/common/{up_interruptcontext.c => mips_interruptcontext.c} (97%) rename arch/mips/src/common/{up_lowputs.c => mips_lowputs.c} (97%) rename arch/mips/src/common/{up_mdelay.c => mips_mdelay.c} (98%) rename arch/mips/src/common/{up_modifyreg16.c => mips_modifyreg16.c} (98%) rename arch/mips/src/common/{up_modifyreg32.c => mips_modifyreg32.c} (98%) rename arch/mips/src/common/{up_modifyreg8.c => mips_modifyreg8.c} (98%) rename arch/mips/src/common/{up_puts.c => mips_puts.c} (97%) rename arch/mips/src/common/{up_releasestack.c => mips_releasestack.c} (98%) rename arch/mips/src/common/{up_stackframe.c => mips_stackframe.c} (98%) rename arch/mips/src/common/{up_udelay.c => mips_udelay.c} (99%) rename arch/mips/src/common/{up_usestack.c => mips_usestack.c} (98%) rename arch/mips/src/mips32/{up_assert.c => mips_assert.c} (98%) rename arch/mips/src/mips32/{up_blocktask.c => mips_blocktask.c} (98%) rename arch/mips/src/mips32/{up_cache.S => mips_cache.S} (99%) rename arch/mips/src/mips32/{up_copystate.c => mips_copystate.c} (98%) rename arch/mips/src/mips32/{up_doirq.c => mips_doirq.c} (98%) rename arch/mips/src/mips32/{up_dumpstate.c => mips_dumpstate.c} (98%) rename arch/mips/src/mips32/{up_initialstate.c => mips_initialstate.c} (98%) rename arch/mips/src/mips32/{up_irq.c => mips_irq.c} (99%) rename arch/mips/src/mips32/{up_releasepending.c => mips_releasepending.c} (98%) rename arch/mips/src/mips32/{up_reprioritizertr.c => mips_reprioritizertr.c} (97%) rename arch/mips/src/mips32/{up_schedulesigaction.c => mips_schedulesigaction.c} (98%) rename arch/mips/src/mips32/{up_sigdeliver.c => mips_sigdeliver.c} (96%) rename arch/mips/src/mips32/{up_swint0.c => mips_swint0.c} (98%) rename arch/mips/src/mips32/{up_syscall0.S => mips_syscall0.S} (98%) rename arch/mips/src/mips32/{up_unblocktask.c => mips_unblocktask.c} (98%) rename arch/mips/src/mips32/{up_vfork.c => mips_vfork.c} (99%) rename arch/mips/src/mips32/{up_vfork.h => mips_vfork.h} (97%) rename arch/mips/src/pic32mx/{pic32mx-adc.h => pic32mx_adc.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-bmx.h => pic32mx_bmx.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-can.h => pic32mx_can.h} (97%) rename arch/mips/src/pic32mx/{pic32mx-che.h => pic32mx_che.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-cm.h => pic32mx_cm.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-config.h => pic32mx_config.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-cvr.h => pic32mx_cvr.h} (98%) rename arch/mips/src/pic32mx/{pic32mx-ddp.h => pic32mx_ddp.h} (98%) rename arch/mips/src/pic32mx/{pic32mx-decodeirq.c => pic32mx_decodeirq.c} (98%) rename arch/mips/src/pic32mx/{pic32mx-devcfg.h => pic32mx_devcfg.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-dma.h => pic32mx_dma.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-ethernet.c => pic32mx_ethernet.c} (99%) rename arch/mips/src/pic32mx/{pic32mx-ethernet.h => pic32mx_ethernet.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-exception.c => pic32mx_exception.c} (98%) rename arch/mips/src/pic32mx/{pic32mx-flash.h => pic32mx_flash.h} (98%) rename arch/mips/src/pic32mx/{pic32mx-gpio.c => pic32mx_gpio.c} (99%) rename arch/mips/src/pic32mx/{pic32mx-gpioirq.c => pic32mx_gpioirq.c} (99%) rename arch/mips/src/pic32mx/{pic32mx-head.S => pic32mx_head.S} (99%) rename arch/mips/src/pic32mx/{pic32mx-i2c.h => pic32mx_i2c.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-ic.h => pic32mx_ic.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-int.h => pic32mx_int.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-ioport.h => pic32mx_ioport.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-irq.c => pic32mx_irq.c} (98%) rename arch/mips/src/pic32mx/{pic32mx-lowconsole.c => pic32mx_lowconsole.c} (98%) rename arch/mips/src/pic32mx/{pic32mx-lowinit.c => pic32mx_lowinit.c} (97%) rename arch/mips/src/pic32mx/{pic32mx-memorymap.h => pic32mx_memorymap.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-oc.h => pic32mx_oc.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-osc.h => pic32mx_osc.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-pmp.h => pic32mx_pmp.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-pps.h => pic32mx_pps.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-reset.h => pic32mx_reset.h} (98%) rename arch/mips/src/pic32mx/{pic32mx-rtcc.h => pic32mx_rtcc.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-serial.c => pic32mx_serial.c} (99%) rename arch/mips/src/pic32mx/{pic32mx-spi.c => pic32mx_spi.c} (99%) rename arch/mips/src/pic32mx/{pic32mx-spi.h => pic32mx_spi.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-timer.h => pic32mx_timer.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-timerisr.c => pic32mx_timerisr.c} (98%) rename arch/mips/src/pic32mx/{pic32mx-uart.h => pic32mx_uart.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-usbdev.c => pic32mx_usbdev.c} (99%) rename arch/mips/src/pic32mx/{pic32mx-usbotg.h => pic32mx_usbotg.h} (99%) rename arch/mips/src/pic32mx/{pic32mx-wdt.h => pic32mx_wdt.h} (98%) rename arch/mips/src/pic32mz/hardware/{pic32mz-dma.h => pic32mz_dma.h} (99%) rename arch/mips/src/pic32mz/hardware/{pic32mz-ethernet.h => pic32mz_ethernet.h} (99%) rename arch/mips/src/pic32mz/hardware/{pic32mz-features.h => pic32mz_features.h} (94%) rename arch/mips/src/pic32mz/hardware/{pic32mz-i2c.h => pic32mz_i2c.h} (99%) rename arch/mips/src/pic32mz/hardware/{pic32mz-int.h => pic32mz_int.h} (99%) rename arch/mips/src/pic32mz/hardware/{pic32mz-ioport.h => pic32mz_ioport.h} (99%) rename arch/mips/src/pic32mz/hardware/{pic32mz-memorymap.h => pic32mz_memorymap.h} (94%) rename arch/mips/src/pic32mz/hardware/{pic32mz-osc.h => pic32mz_osc.h} (99%) rename arch/mips/src/pic32mz/hardware/{pic32mz-pps.h => pic32mz_pps.h} (97%) rename arch/mips/src/pic32mz/hardware/{pic32mz-prefetch.h => pic32mz_prefetch.h} (98%) rename arch/mips/src/pic32mz/hardware/{pic32mz-spi.h => pic32mz_spi.h} (99%) rename arch/mips/src/pic32mz/hardware/{pic32mz-timer.h => pic32mz_timer.h} (99%) rename arch/mips/src/pic32mz/hardware/{pic32mz-uart.h => pic32mz_uart.h} (99%) rename arch/mips/src/pic32mz/hardware/{pic32mzec-features.h => pic32mzec_features.h} (100%) rename arch/mips/src/pic32mz/hardware/{pic32mzec-memorymap.h => pic32mzec_memorymap.h} (100%) rename arch/mips/src/pic32mz/hardware/{pic32mzec-pps.h => pic32mzec_pps.h} (99%) rename arch/mips/src/pic32mz/hardware/{pic32mzef-features.h => pic32mzef_features.h} (100%) rename arch/mips/src/pic32mz/hardware/{pic32mzef-memorymap.h => pic32mzef_memorymap.h} (100%) rename arch/mips/src/pic32mz/hardware/{pic32mzef-pps.h => pic32mzef_pps.h} (99%) rename arch/mips/src/pic32mz/{pic32mz-config.h => pic32mz_config.h} (99%) rename arch/mips/src/pic32mz/{pic32mz-decodeirq.c => pic32mz_decodeirq.c} (97%) rename arch/mips/src/pic32mz/{pic32mz-dma.c => pic32mz_dma.c} (99%) rename arch/mips/src/pic32mz/{pic32mz-dma.h => pic32mz_dma.h} (97%) rename arch/mips/src/pic32mz/{pic32mz-ethernet.c => pic32mz_ethernet.c} (99%) rename arch/mips/src/pic32mz/{pic32mz-exception.c => pic32mz_exception.c} (97%) rename arch/mips/src/pic32mz/{pic32mz-excptmacros.h => pic32mz_excptmacros.h} (99%) rename arch/mips/src/pic32mz/{pic32mz-freerun.c => pic32mz_freerun.c} (99%) rename arch/mips/src/pic32mz/{pic32mz-freerun.h => pic32mz_freerun.h} (98%) rename arch/mips/src/pic32mz/{pic32mz-gpio.c => pic32mz_gpio.c} (98%) rename arch/mips/src/pic32mz/{pic32mz-gpio.h => pic32mz_gpio.h} (99%) rename arch/mips/src/pic32mz/{pic32mz-gpioirq.c => pic32mz_gpioirq.c} (99%) rename arch/mips/src/pic32mz/{pic32mz-head.S => pic32mz_head.S} (99%) rename arch/mips/src/pic32mz/{pic32mz-i2c.c => pic32mz_i2c.c} (99%) rename arch/mips/src/pic32mz/{pic32mz-i2c.h => pic32mz_i2c.h} (98%) rename arch/mips/src/pic32mz/{pic32mz-irq.c => pic32mz_irq.c} (97%) rename arch/mips/src/pic32mz/{pic32mz-lowconsole.c => pic32mz_lowconsole.c} (97%) rename arch/mips/src/pic32mz/{pic32mz-lowconsole.h => pic32mz_lowconsole.h} (98%) rename arch/mips/src/pic32mz/{pic32mz-lowinit.c => pic32mz_lowinit.c} (97%) rename arch/mips/src/pic32mz/{pic32mz-lowinit.h => pic32mz_lowinit.h} (98%) rename arch/mips/src/pic32mz/{pic32mz-oneshot-lowerhalf.c => pic32mz_oneshot-lowerhalf.c} (99%) rename arch/mips/src/pic32mz/{pic32mz-oneshot.c => pic32mz_oneshot.c} (98%) rename arch/mips/src/pic32mz/{pic32mz-oneshot.h => pic32mz_oneshot.h} (99%) create mode 100644 arch/mips/src/pic32mz/pic32mz_oneshot_lowerhalf.c rename arch/mips/src/pic32mz/{pic32mz-serial.c => pic32mz_serial.c} (99%) rename arch/mips/src/pic32mz/{pic32mz-spi.c => pic32mz_spi.c} (99%) rename arch/mips/src/pic32mz/{pic32mz-spi.h => pic32mz_spi.h} (99%) rename arch/mips/src/pic32mz/{pic32mz-timer.c => pic32mz_timer.c} (98%) rename arch/mips/src/pic32mz/{pic32mz-timer.h => pic32mz_timer.h} (99%) rename arch/mips/src/pic32mz/{pic32mz-timer-lowerhalf.c => pic32mz_timer_lowerhalf.c} (99%) rename arch/mips/src/pic32mz/{pic32mz-timerisr.c => pic32mz_timerisr.c} (97%) rename arch/mips/src/pic32mz/{pic32mz-usbdev.h => pic32mz_usbdev.h} (99%) diff --git a/arch/mips/src/common/up_allocateheap.c b/arch/mips/src/common/mips_allocateheap.c similarity index 97% rename from arch/mips/src/common/up_allocateheap.c rename to arch/mips/src/common/mips_allocateheap.c index 7bcb04de73..73e4de573a 100644 --- a/arch/mips/src/common/up_allocateheap.c +++ b/arch/mips/src/common/mips_allocateheap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_allocateheap.c + * arch/mips/src/common/mips_allocateheap.c * * Copyright (C) 2010, 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -46,8 +46,8 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/common/up_arch.h b/arch/mips/src/common/mips_arch.h similarity index 98% rename from arch/mips/src/common/up_arch.h rename to arch/mips/src/common/mips_arch.h index aad859ea47..62ccfbb4fc 100644 --- a/arch/mips/src/common/up_arch.h +++ b/arch/mips/src/common/mips_arch.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_arch.h + * arch/mips/src/common/mips_arch.h * * Copyright (C) 2010, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/common/up_createstack.c b/arch/mips/src/common/mips_createstack.c similarity index 98% rename from arch/mips/src/common/up_createstack.c rename to arch/mips/src/common/mips_createstack.c index d15790fc2e..cd43235e9c 100644 --- a/arch/mips/src/common/up_createstack.c +++ b/arch/mips/src/common/mips_createstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_createstack.c + * arch/mips/src/common/mips_createstack.c * * Copyright (C) 2011, 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -49,8 +49,8 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" /**************************************************************************** * Pre-processor Macros diff --git a/arch/mips/src/common/up_etherstub.c b/arch/mips/src/common/mips_etherstub.c similarity index 98% rename from arch/mips/src/common/up_etherstub.c rename to arch/mips/src/common/mips_etherstub.c index 7a42d703e7..ff669b1d83 100644 --- a/arch/mips/src/common/up_etherstub.c +++ b/arch/mips/src/common/mips_etherstub.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_etherstub.c + * arch/mips/src/common/mips_etherstub.c * * Copyright (C) 2011-2012, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -39,7 +39,7 @@ #include -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/common/up_exit.c b/arch/mips/src/common/mips_exit.c similarity index 99% rename from arch/mips/src/common/up_exit.c rename to arch/mips/src/common/mips_exit.c index 8fc968a0dd..a6fc5eebef 100644 --- a/arch/mips/src/common/up_exit.c +++ b/arch/mips/src/common/mips_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_exit.c + * arch/mips/src/common/mips_exit.c * * Copyright (C) 2011, 2013-2014, 2017-2018 Gregory Nutt. All rights * reserved. @@ -54,7 +54,7 @@ #include "task/task.h" #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/common/up_idle.c b/arch/mips/src/common/mips_idle.c similarity index 98% rename from arch/mips/src/common/up_idle.c rename to arch/mips/src/common/mips_idle.c index 977661d082..196a7ece33 100644 --- a/arch/mips/src/common/up_idle.c +++ b/arch/mips/src/common/mips_idle.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_idle.c + * arch/mips/src/common/mips_idle.c * * Copyright (C) 2011-2012, 2016, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -41,7 +41,7 @@ #include #include -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/mips/src/common/up_initialize.c b/arch/mips/src/common/mips_initialize.c similarity index 98% rename from arch/mips/src/common/up_initialize.c rename to arch/mips/src/common/mips_initialize.c index 2bab501228..b801f7d6bf 100644 --- a/arch/mips/src/common/up_initialize.c +++ b/arch/mips/src/common/mips_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_initialize.c + * arch/mips/src/common/mips_initialize.c * * Copyright (C) 2011-2013, 2015-2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -56,8 +56,8 @@ #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/mips/src/common/up_internal.h b/arch/mips/src/common/mips_internal.h similarity index 99% rename from arch/mips/src/common/up_internal.h rename to arch/mips/src/common/mips_internal.h index 11916eb06e..df0d113688 100644 --- a/arch/mips/src/common/up_internal.h +++ b/arch/mips/src/common/mips_internal.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/common/up_internal.h + * arch/mips/common/mips_internal.h * * Copyright (C) 2011, 2012, 2015, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -144,8 +144,8 @@ extern void g_intstackbase; * * - The linker script defines, for example, the symbol_sdata. * - The declaration extern uint32_t _sdata; makes C happy. C will believe - * that the value _sdata is the address of a uint32_t variable _data (it is - * not!). + * that the value _sdata is the address of a uint32_t variable _data (it + * is not!). * - We can recoved the linker value then by simply taking the address of * of _data. like: uint32_t *pdata = &_sdata; */ diff --git a/arch/mips/src/common/up_interruptcontext.c b/arch/mips/src/common/mips_interruptcontext.c similarity index 97% rename from arch/mips/src/common/up_interruptcontext.c rename to arch/mips/src/common/mips_interruptcontext.c index ab0807ee96..7361fb40f5 100644 --- a/arch/mips/src/common/up_interruptcontext.c +++ b/arch/mips/src/common/mips_interruptcontext.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_interruptcontext.c + * arch/mips/src/common/mips_interruptcontext.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Private Types diff --git a/arch/mips/src/common/up_lowputs.c b/arch/mips/src/common/mips_lowputs.c similarity index 97% rename from arch/mips/src/common/up_lowputs.c rename to arch/mips/src/common/mips_lowputs.c index 396edeb1bd..eb4cb015ac 100644 --- a/arch/mips/src/common/up_lowputs.c +++ b/arch/mips/src/common/mips_lowputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_lowputs.c + * arch/mips/src/common/mips_lowputs.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -39,7 +39,7 @@ #include -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/common/up_mdelay.c b/arch/mips/src/common/mips_mdelay.c similarity index 98% rename from arch/mips/src/common/up_mdelay.c rename to arch/mips/src/common/mips_mdelay.c index d2cb5d05b3..4c3bfc87b0 100644 --- a/arch/mips/src/common/up_mdelay.c +++ b/arch/mips/src/common/mips_mdelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_mdelay.c + * arch/mips/src/common/mips_mdelay.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/common/up_modifyreg16.c b/arch/mips/src/common/mips_modifyreg16.c similarity index 98% rename from arch/mips/src/common/up_modifyreg16.c rename to arch/mips/src/common/mips_modifyreg16.c index 6dfe1c2a49..c01cd86d6b 100644 --- a/arch/mips/src/common/up_modifyreg16.c +++ b/arch/mips/src/common/mips_modifyreg16.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_modifyreg16.c + * arch/mips/src/common/mips_modifyreg16.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -45,7 +45,7 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/common/up_modifyreg32.c b/arch/mips/src/common/mips_modifyreg32.c similarity index 98% rename from arch/mips/src/common/up_modifyreg32.c rename to arch/mips/src/common/mips_modifyreg32.c index af680343df..9ebfda8675 100644 --- a/arch/mips/src/common/up_modifyreg32.c +++ b/arch/mips/src/common/mips_modifyreg32.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_modifyreg32.c + * arch/mips/src/common/mips_modifyreg32.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -45,7 +45,7 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/common/up_modifyreg8.c b/arch/mips/src/common/mips_modifyreg8.c similarity index 98% rename from arch/mips/src/common/up_modifyreg8.c rename to arch/mips/src/common/mips_modifyreg8.c index 7f63a580b8..298ba985d0 100644 --- a/arch/mips/src/common/up_modifyreg8.c +++ b/arch/mips/src/common/mips_modifyreg8.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_modifyreg8.c + * arch/mips/src/common/mips_modifyreg8.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -45,7 +45,7 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/common/up_puts.c b/arch/mips/src/common/mips_puts.c similarity index 97% rename from arch/mips/src/common/up_puts.c rename to arch/mips/src/common/mips_puts.c index 1b9f31f84e..f794f10f50 100644 --- a/arch/mips/src/common/up_puts.c +++ b/arch/mips/src/common/mips_puts.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_puts.c + * arch/mips/src/common/mips_puts.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -40,7 +40,7 @@ #include #include -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/common/up_releasestack.c b/arch/mips/src/common/mips_releasestack.c similarity index 98% rename from arch/mips/src/common/up_releasestack.c rename to arch/mips/src/common/mips_releasestack.c index 3569adf5e6..21a66b7f5f 100644 --- a/arch/mips/src/common/up_releasestack.c +++ b/arch/mips/src/common/mips_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_releasestack.c + * arch/mips/src/common/mips_releasestack.c * * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -45,7 +45,7 @@ #include #include -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Private Types diff --git a/arch/mips/src/common/up_stackframe.c b/arch/mips/src/common/mips_stackframe.c similarity index 98% rename from arch/mips/src/common/up_stackframe.c rename to arch/mips/src/common/mips_stackframe.c index 48e44ac81d..7c0185be16 100644 --- a/arch/mips/src/common/up_stackframe.c +++ b/arch/mips/src/common/mips_stackframe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_stackframe.c + * arch/mips/src/common/mips_stackframe.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -46,11 +46,12 @@ #include -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Pre-processor Macros ****************************************************************************/ + /* MIPS requires at least a 4-byte stack alignment. For floating point use, * however, the stack must be aligned to 8-byte addresses. */ diff --git a/arch/mips/src/common/up_udelay.c b/arch/mips/src/common/mips_udelay.c similarity index 99% rename from arch/mips/src/common/up_udelay.c rename to arch/mips/src/common/mips_udelay.c index cdea99e10a..3dea137787 100644 --- a/arch/mips/src/common/up_udelay.c +++ b/arch/mips/src/common/mips_udelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_udelay.c + * arch/mips/src/common/mips_udelay.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/common/up_usestack.c b/arch/mips/src/common/mips_usestack.c similarity index 98% rename from arch/mips/src/common/up_usestack.c rename to arch/mips/src/common/mips_usestack.c index 041057a40e..fcfd184dff 100644 --- a/arch/mips/src/common/up_usestack.c +++ b/arch/mips/src/common/mips_usestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/common/up_usestack.c + * arch/mips/src/common/mips_usestack.c * * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -47,7 +47,7 @@ #include #include -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/mips32/up_assert.c b/arch/mips/src/mips32/mips_assert.c similarity index 98% rename from arch/mips/src/mips32/up_assert.c rename to arch/mips/src/mips32/mips_assert.c index 696dd3bd08..e761558ce8 100644 --- a/arch/mips/src/mips32/up_assert.c +++ b/arch/mips/src/mips32/mips_assert.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_assert.c + * arch/mips/src/mips32/mips_assert.c * * Copyright (C) 2011-2015, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -52,9 +52,9 @@ #include -#include "up_arch.h" +#include "mips_arch.h" #include "sched/sched.h" -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/mips32/up_blocktask.c b/arch/mips/src/mips32/mips_blocktask.c similarity index 98% rename from arch/mips/src/mips32/up_blocktask.c rename to arch/mips/src/mips32/mips_blocktask.c index 181e5647c9..b9b3db0447 100644 --- a/arch/mips/src/mips32/up_blocktask.c +++ b/arch/mips/src/mips32/mips_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_blocktask.c + * arch/mips/src/mips32/mips_blocktask.c * * Copyright (C) 2011, 2013-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -49,7 +49,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/mips/src/mips32/up_cache.S b/arch/mips/src/mips32/mips_cache.S similarity index 99% rename from arch/mips/src/mips32/up_cache.S rename to arch/mips/src/mips32/mips_cache.S index 1ecf717ddc..bea47094ac 100644 --- a/arch/mips/src/mips32/up_cache.S +++ b/arch/mips/src/mips32/mips_cache.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_cache.S + * arch/mips/src/mips32/mips_cache.S * * Copyright (C) 2019 Gregory Nutt. All rights reserved. * Author: Abdelatif Guettouche @@ -43,7 +43,7 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" /**************************************************************************** * Pre-processor Definitions @@ -70,7 +70,7 @@ * Public Symbols ****************************************************************************/ - .file "up_cache.S" + .file "mips_cache.S" /**************************************************************************** * Assembly Language Macros diff --git a/arch/mips/src/mips32/up_copystate.c b/arch/mips/src/mips32/mips_copystate.c similarity index 98% rename from arch/mips/src/mips32/up_copystate.c rename to arch/mips/src/mips32/mips_copystate.c index a152e8b14a..68fdc82b85 100644 --- a/arch/mips/src/mips32/up_copystate.c +++ b/arch/mips/src/mips32/mips_copystate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_copystate.c + * arch/mips/src/mips32/mips_copystate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include #include -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/mips32/up_doirq.c b/arch/mips/src/mips32/mips_doirq.c similarity index 98% rename from arch/mips/src/mips32/up_doirq.c rename to arch/mips/src/mips32/mips_doirq.c index ed05acf85b..e5f9237df2 100644 --- a/arch/mips/src/mips32/up_doirq.c +++ b/arch/mips/src/mips32/mips_doirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_doirq.c + * arch/mips/src/mips32/mips_doirq.c * * Copyright (C) 2011, 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -47,8 +47,8 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" #include "group/group.h" diff --git a/arch/mips/src/mips32/up_dumpstate.c b/arch/mips/src/mips32/mips_dumpstate.c similarity index 98% rename from arch/mips/src/mips32/up_dumpstate.c rename to arch/mips/src/mips32/mips_dumpstate.c index e1dce51589..d6e249fc5d 100644 --- a/arch/mips/src/mips32/up_dumpstate.c +++ b/arch/mips/src/mips32/mips_dumpstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_dumpstate.c + * arch/mips/src/mips32/mips_dumpstate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -48,9 +48,9 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" #include "sched/sched.h" -#include "up_internal.h" +#include "mips_internal.h" #ifdef CONFIG_ARCH_STACKDUMP diff --git a/arch/mips/src/mips32/up_initialstate.c b/arch/mips/src/mips32/mips_initialstate.c similarity index 98% rename from arch/mips/src/mips32/up_initialstate.c rename to arch/mips/src/mips32/mips_initialstate.c index 516a68acf5..7a7c242f0f 100644 --- a/arch/mips/src/mips32/up_initialstate.c +++ b/arch/mips/src/mips32/mips_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_initialstate.c + * arch/mips/src/mips32/mips_initialstate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -47,8 +47,8 @@ #include #include -#include "up_internal.h" -#include "up_arch.h" +#include "mips_internal.h" +#include "mips_arch.h" /**************************************************************************** * Public Functions diff --git a/arch/mips/src/mips32/up_irq.c b/arch/mips/src/mips32/mips_irq.c similarity index 99% rename from arch/mips/src/mips32/up_irq.c rename to arch/mips/src/mips32/mips_irq.c index 010909bf9a..6a71e6153e 100644 --- a/arch/mips/src/mips32/up_irq.c +++ b/arch/mips/src/mips32/mips_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_irq.c + * arch/mips/src/mips32/mips_irq.c * * Copyright (C) 2011, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/mips32/up_releasepending.c b/arch/mips/src/mips32/mips_releasepending.c similarity index 98% rename from arch/mips/src/mips32/up_releasepending.c rename to arch/mips/src/mips32/mips_releasepending.c index bf50bfb407..45ea59b009 100644 --- a/arch/mips/src/mips32/up_releasepending.c +++ b/arch/mips/src/mips32/mips_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_releasepending.c + * arch/mips/src/mips32/mips_releasepending.c * * Copyright (C) 2011, 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -48,7 +48,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/mips/src/mips32/up_reprioritizertr.c b/arch/mips/src/mips32/mips_reprioritizertr.c similarity index 97% rename from arch/mips/src/mips32/up_reprioritizertr.c rename to arch/mips/src/mips32/mips_reprioritizertr.c index d9fdffc16d..f905bf3ef3 100644 --- a/arch/mips/src/mips32/up_reprioritizertr.c +++ b/arch/mips/src/mips32/mips_reprioritizertr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_reprioritizertr.c + * arch/mips/src/mips32/mips_reprioritizertr.c * * Copyright (C) 2011, 2013-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,7 +50,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Public Functions @@ -194,7 +194,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* up_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the - * normal sense. When it does return, it is because the blocked + * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. */ } diff --git a/arch/mips/src/mips32/up_schedulesigaction.c b/arch/mips/src/mips32/mips_schedulesigaction.c similarity index 98% rename from arch/mips/src/mips32/up_schedulesigaction.c rename to arch/mips/src/mips32/mips_schedulesigaction.c index 265caff5bd..f0f77cfc55 100644 --- a/arch/mips/src/mips32/up_schedulesigaction.c +++ b/arch/mips/src/mips32/mips_schedulesigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_schedulesigaction.c + * arch/mips/src/mips32/mips_schedulesigaction.c * * Copyright (C) 2011, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -48,8 +48,8 @@ #include #include "sched/sched.h" -#include "up_internal.h" -#include "up_arch.h" +#include "mips_internal.h" +#include "mips_arch.h" /**************************************************************************** * Public Functions diff --git a/arch/mips/src/mips32/up_sigdeliver.c b/arch/mips/src/mips32/mips_sigdeliver.c similarity index 96% rename from arch/mips/src/mips32/up_sigdeliver.c rename to arch/mips/src/mips32/mips_sigdeliver.c index 43aa481705..12437367d4 100644 --- a/arch/mips/src/mips32/up_sigdeliver.c +++ b/arch/mips/src/mips32/mips_sigdeliver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_sigdeliver.c + * arch/mips/src/mips32/mips_sigdeliver.c * * Copyright (C) 2011, 2015, 2018-2019 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,8 +50,8 @@ #include #include "sched/sched.h" -#include "up_internal.h" -#include "up_arch.h" +#include "mips_internal.h" +#include "mips_arch.h" /**************************************************************************** * Public Functions @@ -106,7 +106,8 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sinfo("Resuming EPC: %08x STATUS: %08x\n", regs[REG_EPC], regs[REG_STATUS]); + sinfo("Resuming EPC: %08x STATUS: %08x\n", + regs[REG_EPC], regs[REG_STATUS]); up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/mips/src/mips32/up_swint0.c b/arch/mips/src/mips32/mips_swint0.c similarity index 98% rename from arch/mips/src/mips32/up_swint0.c rename to arch/mips/src/mips32/mips_swint0.c index a1e80240af..bd497468d2 100644 --- a/arch/mips/src/mips32/up_swint0.c +++ b/arch/mips/src/mips32/mips_swint0.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_swint0.c + * arch/mips/src/mips32/mips_swint0.c * * Copyright (C) 2011-2012, 2015, 2019 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -51,7 +51,7 @@ #include #include "signal/signal.h" -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Private Functions @@ -156,7 +156,7 @@ int up_swint0(int irq, FAR void *context, FAR void *arg) { /* R4=SYS_restore_context: This a restore context command: * - * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; + * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; * * At this point, the following values are saved in context: * @@ -285,7 +285,9 @@ int up_swint0(int irq, FAR void *context, FAR void *arg) break; } - /* Report what happened. That might difficult in the case of a context switch */ + /* Report what happened. That might difficult in the case of a context + * switch + */ #ifdef CONFIG_DEBUG_SYSCALL_INFO if (regs != CURRENT_REGS) diff --git a/arch/mips/src/mips32/up_syscall0.S b/arch/mips/src/mips32/mips_syscall0.S similarity index 98% rename from arch/mips/src/mips32/up_syscall0.S rename to arch/mips/src/mips32/mips_syscall0.S index 35fa3639a4..6e7ffbd64b 100644 --- a/arch/mips/src/mips32/up_syscall0.S +++ b/arch/mips/src/mips32/mips_syscall0.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_syscall0.S + * arch/mips/src/mips32/mips_syscall0.S * * Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -46,7 +46,7 @@ * Public Symbols ****************************************************************************/ - .file "up_syscall0.S" + .file "mips_syscall0.S" .global sys_call0 .global sys_call1 .global sys_call2 diff --git a/arch/mips/src/mips32/up_unblocktask.c b/arch/mips/src/mips32/mips_unblocktask.c similarity index 98% rename from arch/mips/src/mips32/up_unblocktask.c rename to arch/mips/src/mips32/mips_unblocktask.c index 56e62357e6..ca9f08fcbf 100644 --- a/arch/mips/src/mips32/up_unblocktask.c +++ b/arch/mips/src/mips32/mips_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_unblocktask.c + * arch/mips/src/mips32/mips_unblocktask.c * * Copyright (C) 2011, 2013-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -49,7 +49,7 @@ #include "sched/sched.h" #include "group/group.h" #include "clock/clock.h" -#include "up_internal.h" +#include "mips_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/mips/src/mips32/up_vfork.c b/arch/mips/src/mips32/mips_vfork.c similarity index 99% rename from arch/mips/src/mips32/up_vfork.c rename to arch/mips/src/mips32/mips_vfork.c index 375a906593..77a31a7b67 100644 --- a/arch/mips/src/mips32/up_vfork.c +++ b/arch/mips/src/mips32/mips_vfork.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips32/up_vfork.c + * arch/mips/src/mips32/mips_vfork.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -49,7 +49,7 @@ #include #include -#include "up_vfork.h" +#include "mips_vfork.h" #include "sched/sched.h" /**************************************************************************** @@ -98,7 +98,7 @@ * 5) up_vfork() then calls nxtask_vforkstart() * 6) nxtask_vforkstart() then executes the child thread. * - * nxtask_vforkabort() may be called if an error occurs between steps 3 and 6. + * nxtask_vforkabort() may be called if an error occurs between steps 3 and 6 * * Input Parameters: * context - Caller context information saved by vfork() diff --git a/arch/mips/src/mips32/up_vfork.h b/arch/mips/src/mips32/mips_vfork.h similarity index 97% rename from arch/mips/src/mips32/up_vfork.h rename to arch/mips/src/mips32/mips_vfork.h index 079a744c83..bebb689c2d 100644 --- a/arch/mips/src/mips32/up_vfork.h +++ b/arch/mips/src/mips32/mips_vfork.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/mips/up_vfork.h + * arch/mips/src/mips/mips_vfork.h * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -46,6 +46,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Register r30 may be a frame pointer in some ABIs. Or may just be saved * register s8. It makes a difference for vfork handling. */ @@ -60,7 +61,7 @@ * preserved across function calls. * r8-r15 t0-t7 Temporary registers used for expression evaluation; values * are not preserved across function calls. - * r16-r23 s0-s7 Saved registers; values are preserved across function calls. + * r16-r23 s0-s7 Saved registers; values are preserved across function calls * r24-r25 t8-t9 Temporary registers used for expression evaluations; values * are not preserved across function calls. When calling * position independent functions r25 must contain the address @@ -119,8 +120,8 @@ struct vfork_s #else uint32_t s8; /* Saved register s8 */ #endif - uint32_t sp; /* Stack pointer*/ - uint32_t ra; /* Return address*/ + uint32_t sp; /* Stack pointer */ + uint32_t ra; /* Return address */ #ifdef MIPS32_SAVE_GP uint32_t gp; /* Global pointer */ #endif diff --git a/arch/mips/src/mips32/vfork.S b/arch/mips/src/mips32/vfork.S index 87509da207..3a108d4b50 100644 --- a/arch/mips/src/mips32/vfork.S +++ b/arch/mips/src/mips32/vfork.S @@ -39,7 +39,7 @@ #include -#include "up_vfork.h" +#include "mips_vfork.h" /************************************************************************************ * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/Make.defs b/arch/mips/src/pic32mx/Make.defs index 82d7bbcce0..377a5e4048 100644 --- a/arch/mips/src/pic32mx/Make.defs +++ b/arch/mips/src/pic32mx/Make.defs @@ -36,51 +36,51 @@ # The start-up, "head", file -HEAD_ASRC = pic32mx-head.S +HEAD_ASRC = pic32mx_head.S # Common MIPS files -CMN_ASRCS = up_syscall0.S vfork.S -CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c -CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_initialize.c -CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_irq.c up_lowputs.c -CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c -CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c -CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c up_sigdeliver.c -CMN_CSRCS += up_stackframe.c up_swint0.c up_udelay.c up_unblocktask.c -CMN_CSRCS += up_usestack.c up_vfork.c +CMN_ASRCS = mips_syscall0.S vfork.S +CMN_CSRCS = mips_allocateheap.c mips_assert.c mips_blocktask.c mips_copystate.c +CMN_CSRCS += mips_createstack.c mips_doirq.c mips_exit.c mips_initialize.c +CMN_CSRCS += mips_initialstate.c mips_interruptcontext.c mips_irq.c mips_lowputs.c +CMN_CSRCS += mips_mdelay.c mips_modifyreg8.c mips_modifyreg16.c mips_modifyreg32.c +CMN_CSRCS += mips_puts.c mips_releasepending.c mips_releasestack.c +CMN_CSRCS += mips_reprioritizertr.c mips_schedulesigaction.c mips_sigdeliver.c +CMN_CSRCS += mips_stackframe.c mips_swint0.c mips_udelay.c mips_unblocktask.c +CMN_CSRCS += mips_usestack.c mips_vfork.c # Configuration dependent common files ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) -CMN_CSRCS += up_idle.c +CMN_CSRCS += mips_idle.c endif -# Use of common/up_etherstub.c is deprecated. The preferred mechanism is to +# Use of common/mips_etherstub.c is deprecated. The preferred mechanism is to # use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in # up_initialize(). Then this stub would not be needed. ifneq ($(CONFIG_PIC32MX_ETHERNET),y) ifeq ($(CONFIG_NET),y) -CMN_CSRCS += up_etherstub.c +CMN_CSRCS += mips_etherstub.c endif endif ifeq ($(CONFIG_ARCH_STACKDUMP),y) -CMN_CSRCS += up_dumpstate.c +CMN_CSRCS += mips_dumpstate.c endif # Required PIC32MX files CHIP_ASRCS = -CHIP_CSRCS = pic32mx-irq.c pic32mx-decodeirq.c pic32mx-exception.c -CHIP_CSRCS += pic32mx-gpio.c pic32mx-lowconsole.c pic32mx-lowinit.c -CHIP_CSRCS += pic32mx-serial.c pic32mx-spi.c +CHIP_CSRCS = pic32mx_irq.c pic32mx_decodeirq.c pic32mx_exception.c +CHIP_CSRCS += pic32mx_gpio.c pic32mx_lowconsole.c pic32mx_lowinit.c +CHIP_CSRCS += pic32mx_serial.c pic32mx_spi.c # Configuration-dependent PIC32MX files ifneq ($(CONFIG_SCHED_TICKLESS),y) -CHIP_CSRCS += pic32mx-timerisr.c +CHIP_CSRCS += pic32mx_timerisr.c endif ifeq ($(CONFIG_PIC32MX_GPIOIRQ),y) @@ -88,9 +88,9 @@ CHIP_CSRCS += pic32mx_gpioirq.c endif ifeq ($(CONFIG_PIC32MX_USBDEV),y) -CHIP_CSRCS += pic32mx-usbdev.c +CHIP_CSRCS += pic32mx_usbdev.c endif ifeq ($(CONFIG_PIC32MX_ETHERNET),y) -CHIP_CSRCS += pic32mx-ethernet.c +CHIP_CSRCS += pic32mx_ethernet.c endif diff --git a/arch/mips/src/pic32mx/pic32mx.h b/arch/mips/src/pic32mx/pic32mx.h index 6056376d6b..c336212d38 100644 --- a/arch/mips/src/pic32mx/pic32mx.h +++ b/arch/mips/src/pic32mx/pic32mx.h @@ -49,13 +49,14 @@ #include -#include "up_internal.h" +#include "mips_internal.h" #include "chip.h" -#include "pic32mx-config.h" +#include "pic32mx_config.h" /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ + /* GPIO settings used in the configport, readport, writeport, etc. * * General encoding: @@ -128,7 +129,9 @@ typedef FAR void *DMA_HANDLE; typedef void (*dma_callback_t)(DMA_HANDLE handle, void *arg, int result); -/* The following is used for sampling DMA registers when CONFIG DEBUG_DMA is selected */ +/* The following is used for sampling DMA registers when CONFIG DEBUG_DMA + * is selected. + */ #ifdef CONFIG_DEBUG_DMA struct pic32mx_dmaglobalregs_s @@ -204,25 +207,25 @@ void pic32mx_consoleinit(void); # define pic32mx_consoleinit() #endif -/**************************************************************************** +/************************************************************************************ * Name: pic32mx_uartreset * * Description: * Reset a UART. * - ****************************************************************************/ + ************************************************************************************/ #ifdef HAVE_UART_DEVICE void pic32mx_uartreset(uintptr_t uart_base); #endif -/**************************************************************************** +/************************************************************************************ * Name: pic32mx_uartconfigure * * Description: * Configure a UART as a RS-232 UART. * - ****************************************************************************/ + ************************************************************************************/ #ifdef HAVE_UART_DEVICE void pic32mx_uartconfigure(uintptr_t uart_base, uint32_t baudrate, @@ -334,7 +337,7 @@ void pic32mx_gpioirqinitialize(void); * Zero (OK) is returned on success. A negated error value is returned on * any failure to indicate the nature of the failure. * - ****************************************************************************/ + ************************************************************************************/ #ifdef CONFIG_PIC32MX_GPIOIRQ int pic32mx_gpioattach(uint32_t pinset, unsigned int cn, xcpt_t handler, @@ -385,7 +388,7 @@ void pic32mx_dumpgpio(uint32_t pinset, const char *msg); # define pic32mx_dumpgpio(p,m) #endif -/**************************************************************************** +/************************************************************************************ * Name: pic32mx_spibus_initialize * * Description: @@ -397,7 +400,7 @@ void pic32mx_dumpgpio(uint32_t pinset, const char *msg); * Returned Value: * Valid SPI device structure reference on success; a NULL on failure * - ****************************************************************************/ + ************************************************************************************/ struct spi_dev_s; /* Forward reference */ FAR struct spi_dev_s *pic32mx_spibus_initialize(int port); @@ -409,8 +412,8 @@ FAR struct spi_dev_s *pic32mx_spibus_initialize(int port); * These external functions must be provided by board-specific logic. They are * implementations of the select, status, and cmddata methods of the SPI interface * defined by struct spi_ops_s (see include/nuttx/spi/spi.h). All other methods - * including pic32mx_spibus_initialize()) are provided by common PIC32MX logic. To use - * this common SPI logic on your board: + * including pic32mx_spibus_initialize()) are provided by common PIC32MX logic. + * To use this common SPI logic on your board: * * 1. Provide logic in pic32mx_boardinitialize() to configure SPI/SSP chip select * pins. @@ -423,8 +426,8 @@ FAR struct spi_dev_s *pic32mx_spibus_initialize(int port); * your board is configured. * 3. Add a call to pic32mx_spibus_initialize() in your low level application * initialization logic - * 4. The handle returned by pic32mx_spibus_initialize() may then be used to bind the - * SPI driver to higher level logic (e.g., calling + * 4. The handle returned by pic32mx_spibus_initialize() may then be used to bind + * the SPI driver to higher level logic (e.g., calling * mmcsd_spislotinitialize(), for example, will bind the SPI driver to * the SPI MMC/SD driver). * diff --git a/arch/mips/src/pic32mx/pic32mx-adc.h b/arch/mips/src/pic32mx/pic32mx_adc.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-adc.h rename to arch/mips/src/pic32mx/pic32mx_adc.h index fc6bde0a45..14ac2684fd 100644 --- a/arch/mips/src/pic32mx/pic32mx-adc.h +++ b/arch/mips/src/pic32mx/pic32mx_adc.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-adc.h + * arch/mips/src/pic32mx/pic32mx_adc.h * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,11 +42,12 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ + /* Register Offsets *****************************************************************/ #define PIC32MX_ADC_CON1_OFFSET 0x0000 /* ADC control register 1 */ diff --git a/arch/mips/src/pic32mx/pic32mx-bmx.h b/arch/mips/src/pic32mx/pic32mx_bmx.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-bmx.h rename to arch/mips/src/pic32mx/pic32mx_bmx.h index fc46cd8158..33310df9a3 100644 --- a/arch/mips/src/pic32mx/pic32mx-bmx.h +++ b/arch/mips/src/pic32mx/pic32mx_bmx.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/mips/src/pic32mx/pic32mx-bmx.h + * arch/mips/src/pic32mx/pic32mx_bmx.h * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,11 +42,12 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /******************************************************************************************** * Pre-processor Definitions ********************************************************************************************/ + /* Register Offsets *************************************************************************/ #define PIC32MX_BMX_CON_OFFSET 0x0000 /* Configuration Register */ diff --git a/arch/mips/src/pic32mx/pic32mx-can.h b/arch/mips/src/pic32mx/pic32mx_can.h similarity index 97% rename from arch/mips/src/pic32mx/pic32mx-can.h rename to arch/mips/src/pic32mx/pic32mx_can.h index edc8d1e6b9..3f775232df 100644 --- a/arch/mips/src/pic32mx/pic32mx-can.h +++ b/arch/mips/src/pic32mx/pic32mx_can.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-can.h + * arch/mips/src/pic32mx/pic32mx_can.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,11 +42,12 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Register Offsets *********************************************************/ #warning "To be provided" diff --git a/arch/mips/src/pic32mx/pic32mx-che.h b/arch/mips/src/pic32mx/pic32mx_che.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-che.h rename to arch/mips/src/pic32mx/pic32mx_che.h index 3ea57056bc..f443697584 100644 --- a/arch/mips/src/pic32mx/pic32mx-che.h +++ b/arch/mips/src/pic32mx/pic32mx_che.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/mips/src/pic32mx/pic32mx-che.h + * arch/mips/src/pic32mx/pic32mx_che.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /******************************************************************************************** * Pre-processor Definitions @@ -105,7 +105,6 @@ /* Pre-fetch cache control register */ - #define CHE_CON_PFMWS_SHIFT (0) /* Bits 0-2: PFM access time (SYSCLK wait states) */ #define CHE_CON_PFMWS_MASK (7 << CHE_CON_PFMWS_SHIFT) # define CHE_CON_PFMWS(n) ((n) << CHE_CON_PFMWS_SHIFT) /* n wait states, n=0-7 */ diff --git a/arch/mips/src/pic32mx/pic32mx-cm.h b/arch/mips/src/pic32mx/pic32mx_cm.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-cm.h rename to arch/mips/src/pic32mx/pic32mx_cm.h index 7346761e52..e2420aaa8c 100644 --- a/arch/mips/src/pic32mx/pic32mx-cm.h +++ b/arch/mips/src/pic32mx/pic32mx_cm.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-cm.h + * arch/mips/src/pic32mx/pic32mx_cm.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,13 +43,14 @@ #include #include "chip.h" -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" #if CHIP_NCM > 0 /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ + /* Register Offsets *****************************************************************/ #define PIC32MX_CM_CON_OFFSET 0x0000 /* Comparator control register */ diff --git a/arch/mips/src/pic32mx/pic32mx-config.h b/arch/mips/src/pic32mx/pic32mx_config.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-config.h rename to arch/mips/src/pic32mx/pic32mx_config.h index a2cc140ae9..3f57ea0ecc 100644 --- a/arch/mips/src/pic32mx/pic32mx-config.h +++ b/arch/mips/src/pic32mx/pic32mx_config.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-config.h + * arch/mips/src/pic32mx/pic32mx_config.h * * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -44,14 +44,15 @@ #include #include "chip.h" -#include "pic32mx-memorymap.h" -#include "pic32mx-uart.h" -#include "pic32mx-int.h" -#include "pic32mx-devcfg.h" +#include "pic32mx_memorymap.h" +#include "pic32mx_uart.h" +#include "pic32mx_int.h" +#include "pic32mx_devcfg.h" /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ + /* Interrupt Priorities *************************************************************/ #ifndef CONFIG_PIC32MX_CTPRIO /* Core Timer Interrupt */ @@ -485,6 +486,7 @@ #endif /* SYS calls ************************************************************************/ + /* SYS call 1 and 2 are defined for internal use by the PIC32MX port (see * arch/mips/include/mips32/syscall.h). In addition, SYS call 3 is the return from * a SYS call in kernel mode. The first four syscall values must, therefore, be @@ -500,6 +502,7 @@ #endif /* UARTs ****************************************************************************/ + /* Don't enable UARTs not supported by the chip. */ #if CHIP_NUARTS < 1 @@ -597,6 +600,7 @@ #endif /* Device Configuration *************************************************************/ + /* DEVCFG3 */ #ifndef CONFIG_PIC32MX_USERID /* User ID */ @@ -916,7 +920,7 @@ ************************************************************************************/ /************************************************************************************ - * Public Functions + * Public Functions Prototypes ************************************************************************************/ #endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_PIC32_H */ diff --git a/arch/mips/src/pic32mx/pic32mx-cvr.h b/arch/mips/src/pic32mx/pic32mx_cvr.h similarity index 98% rename from arch/mips/src/pic32mx/pic32mx-cvr.h rename to arch/mips/src/pic32mx/pic32mx_cvr.h index 51ef90d49f..a35d414cac 100644 --- a/arch/mips/src/pic32mx/pic32mx-cvr.h +++ b/arch/mips/src/pic32mx/pic32mx_cvr.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-cvr.h + * arch/mips/src/pic32mx/pic32mx_cvr.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,11 +43,12 @@ #include #include "chip.h" -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ + /* Register Offsets *****************************************************************/ #define PIC32MX_CVR_CON_OFFSET 0x0000 /* Comparator voltage reference control register */ diff --git a/arch/mips/src/pic32mx/pic32mx-ddp.h b/arch/mips/src/pic32mx/pic32mx_ddp.h similarity index 98% rename from arch/mips/src/pic32mx/pic32mx-ddp.h rename to arch/mips/src/pic32mx/pic32mx_ddp.h index d7ba7c7318..f3053aab47 100644 --- a/arch/mips/src/pic32mx/pic32mx-ddp.h +++ b/arch/mips/src/pic32mx/pic32mx_ddp.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-ddp.h + * arch/mips/src/pic32mx/pic32mx_ddp.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /************************************************************************************ * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-decodeirq.c b/arch/mips/src/pic32mx/pic32mx_decodeirq.c similarity index 98% rename from arch/mips/src/pic32mx/pic32mx-decodeirq.c rename to arch/mips/src/pic32mx/pic32mx_decodeirq.c index 82c9ec4498..23a238839b 100644 --- a/arch/mips/src/pic32mx/pic32mx-decodeirq.c +++ b/arch/mips/src/pic32mx/pic32mx_decodeirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-decodeirq.c + * arch/mips/src/pic32mx/pic32mx_decodeirq.c * * Copyright (C) 2011, 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -49,9 +49,9 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" -#include "pic32mx-int.h" +#include "pic32mx_int.h" #include "pic32mx.h" #include "group/group.h" @@ -111,7 +111,9 @@ uint32_t *pic32mx_decodeirq(uint32_t *regs) #endif CURRENT_REGS = regs; - /* Loop while there are pending interrupts with priority greater than zero */ + /* Loop while there are pending interrupts with priority greater than + * zero + */ for (; ; ) { diff --git a/arch/mips/src/pic32mx/pic32mx-devcfg.h b/arch/mips/src/pic32mx/pic32mx_devcfg.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-devcfg.h rename to arch/mips/src/pic32mx/pic32mx_devcfg.h index 506a77ad5e..e95c583812 100644 --- a/arch/mips/src/pic32mx/pic32mx-devcfg.h +++ b/arch/mips/src/pic32mx/pic32mx_devcfg.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-devcfg.h + * arch/mips/src/pic32mx/pic32mx_devcfg.h * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-dma.h b/arch/mips/src/pic32mx/pic32mx_dma.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-dma.h rename to arch/mips/src/pic32mx/pic32mx_dma.h index e41c80f810..58c16925f5 100644 --- a/arch/mips/src/pic32mx/pic32mx-dma.h +++ b/arch/mips/src/pic32mx/pic32mx_dma.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/mips/src/pic32mx/pic32mx-dma.h + * arch/mips/src/pic32mx/pic32mx_dma.h * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include "chip.h" -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" #if CHIP_NDMACH > 0 diff --git a/arch/mips/src/pic32mx/pic32mx-ethernet.c b/arch/mips/src/pic32mx/pic32mx_ethernet.c similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-ethernet.c rename to arch/mips/src/pic32mx/pic32mx_ethernet.c index 8f6df2bb27..f9395665cc 100644 --- a/arch/mips/src/pic32mx/pic32mx-ethernet.c +++ b/arch/mips/src/pic32mx/pic32mx_ethernet.c @@ -69,9 +69,9 @@ #include #include "chip.h" -#include "up_arch.h" -#include "pic32mx-config.h" -#include "pic32mx-ethernet.h" +#include "mips_arch.h" +#include "pic32mx_config.h" +#include "pic32mx_ethernet.h" #include "pic32mx.h" /* Does this chip have and Ethernet controller? */ @@ -152,9 +152,12 @@ #define PIC32MX_ALIGNED_BUFSIZE ((CONFIG_NET_ETH_PKTSIZE + 3) & ~3) -/* The number of buffers will, then, be one for each descriptor plus one extra */ +/* The number of buffers will, then, be one for each descriptor plus one + * extra + */ -#define PIC32MX_NBUFFERS (CONFIG_PIC32MX_ETH_NRXDESC + CONFIG_PIC32MX_ETH_NTXDESC + 1) +#define PIC32MX_NBUFFERS (CONFIG_PIC32MX_ETH_NRXDESC + \ + CONFIG_PIC32MX_ETH_NTXDESC + 1) /* Debug Configuration *****************************************************/ @@ -174,7 +177,9 @@ /* Timing *******************************************************************/ -/* TX poll deley = 1 seconds. CLK_TCK is the number of clock ticks per second */ +/* TX poll deley = 1 seconds. CLK_TCK is the number of clock ticks per + * second + */ #define PIC32MX_WDDELAY (1*CLK_TCK) @@ -222,7 +227,9 @@ /* Misc. Helpers ***********************************************************/ -/* This is a helper pointer for accessing the contents of the Ethernet header */ +/* This is a helper pointer for accessing the contents of the Ethernet + * header + */ #define BUF ((struct eth_hdr_s *)priv->pd_dev.d_buf) @@ -1090,7 +1097,9 @@ static int pic32mx_transmit(struct pic32mx_driver_s *priv) pic32mx_txnext(priv); - /* Enable the transmission of the message by setting the TXRTS bit (ETHCON1:9). */ + /* Enable the transmission of the message by setting the TXRTS bit + * (ETHCON1:9). + */ pic32mx_putreg(ETH_CON1_TXRTS | ETH_CON1_ON, PIC32MX_ETH_CON1SET); @@ -1189,7 +1198,9 @@ static int pic32mx_txpoll(struct net_driver_s *dev) priv->pd_dev.d_buf = pic32mx_allocbuffer(priv); if (priv->pd_dev.d_buf == NULL) { - /* We have no more buffers available for the nex Tx.. stop the poll */ + /* We have no more buffers available for the nex Tx.. stop the + * poll + */ return -ENOMEM; } @@ -1423,7 +1434,9 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv) pic32mx_rxreturn(rxdesc); } - /* We don't have any logic here for reassembling packets from fragments. */ + /* We don't have any logic here for reassembling packets from + * fragments. + */ else if ((rxdesc->status & (RXDESC_STATUS_EOP | RXDESC_STATUS_SOP)) != (RXDESC_STATUS_EOP | RXDESC_STATUS_SOP)) @@ -1462,7 +1475,9 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv) pkt_input(&priv->pd_dev); #endif - /* We only accept IP packets of the configured type and ARP packets */ + /* We only accept IP packets of the configured type and ARP + * packets + */ #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) @@ -1665,7 +1680,9 @@ static void pic32mx_txdone(struct pic32mx_driver_s *priv) if (priv->pd_txpending) { - /* Clear the pending condition, send the packet, and restore Rx interrupts */ + /* Clear the pending condition, send the packet, and restore Rx + * interrupts + */ priv->pd_txpending = false; diff --git a/arch/mips/src/pic32mx/pic32mx-ethernet.h b/arch/mips/src/pic32mx/pic32mx_ethernet.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-ethernet.h rename to arch/mips/src/pic32mx/pic32mx_ethernet.h index fa85b782ce..c4a76449c1 100644 --- a/arch/mips/src/pic32mx/pic32mx-ethernet.h +++ b/arch/mips/src/pic32mx/pic32mx_ethernet.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/mips/src/pic32mx/pic32mx-ethernet.h + * arch/mips/src/pic32mx/pic32mx_ethernet.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /******************************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-exception.c b/arch/mips/src/pic32mx/pic32mx_exception.c similarity index 98% rename from arch/mips/src/pic32mx/pic32mx-exception.c rename to arch/mips/src/pic32mx/pic32mx_exception.c index 332c70f207..f3176fa5fb 100644 --- a/arch/mips/src/pic32mx/pic32mx-exception.c +++ b/arch/mips/src/pic32mx/pic32mx_exception.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-exception.c + * arch/mips/src/pic32mx/pic32mx_exception.c * * Copyright (C) 2011-2012, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,9 +50,9 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" -#include "pic32mx-int.h" +#include "pic32mx_int.h" #include "pic32mx.h" /**************************************************************************** @@ -175,7 +175,9 @@ uint32_t *pic32mx_exception(uint32_t *regs) #endif #endif - /* Crash with currents_regs set so that we can dump the register contents. */ + /* Crash with currents_regs set so that we can dump the register + * contents. + */ CURRENT_REGS = regs; PANIC(); diff --git a/arch/mips/src/pic32mx/pic32mx-flash.h b/arch/mips/src/pic32mx/pic32mx_flash.h similarity index 98% rename from arch/mips/src/pic32mx/pic32mx-flash.h rename to arch/mips/src/pic32mx/pic32mx_flash.h index 852ad5439d..6331c539da 100644 --- a/arch/mips/src/pic32mx/pic32mx-flash.h +++ b/arch/mips/src/pic32mx/pic32mx_flash.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/mips/src/pic32mx/pic32mx-flash.h + * arch/mips/src/pic32mx/pic32mx_flash.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /******************************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-gpio.c b/arch/mips/src/pic32mx/pic32mx_gpio.c similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-gpio.c rename to arch/mips/src/pic32mx/pic32mx_gpio.c index 59c46b92dd..9f2492372d 100644 --- a/arch/mips/src/pic32mx/pic32mx-gpio.c +++ b/arch/mips/src/pic32mx/pic32mx_gpio.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-gpio.c + * arch/mips/src/pic32mx/pic32mx_gpio.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -47,9 +47,9 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" #include "chip.h" -#include "pic32mx-ioport.h" +#include "pic32mx_ioport.h" #include "pic32mx.h" /**************************************************************************** diff --git a/arch/mips/src/pic32mx/pic32mx-gpioirq.c b/arch/mips/src/pic32mx/pic32mx_gpioirq.c similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-gpioirq.c rename to arch/mips/src/pic32mx/pic32mx_gpioirq.c index 9000618c7f..67a43f8e7c 100644 --- a/arch/mips/src/pic32mx/pic32mx-gpioirq.c +++ b/arch/mips/src/pic32mx/pic32mx_gpioirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-gpio.c + * arch/mips/src/pic32mx/pic32mx_gpio.c * * Copyright (C) 2011, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -46,8 +46,8 @@ #include #include -#include "up_arch.h" -#include "pic32mx-gpio.h" +#include "mips_arch.h" +#include "pic32mx_gpio.h" #include "pic32mx.h" #ifdef CONFIG_PIC32MX_GPIOIRQ diff --git a/arch/mips/src/pic32mx/pic32mx-head.S b/arch/mips/src/pic32mx/pic32mx_head.S similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-head.S rename to arch/mips/src/pic32mx/pic32mx_head.S index 8854b90b9a..1939fa1658 100644 --- a/arch/mips/src/pic32mx/pic32mx-head.S +++ b/arch/mips/src/pic32mx/pic32mx_head.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-head.S + * arch/mips/src/pic32mx/pic32mx_head.S * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,8 +42,8 @@ #include #include -#include "pic32mx-config.h" -#include "pic32mx-bmx.h" +#include "pic32mx_config.h" +#include "pic32mx_bmx.h" #include "excptmacros.h" /**************************************************************************** @@ -108,7 +108,7 @@ * Public Symbols ****************************************************************************/ - .file "pic32mx-head.S" + .file "pic32mx_head.S" /* Exported symbols */ diff --git a/arch/mips/src/pic32mx/pic32mx-i2c.h b/arch/mips/src/pic32mx/pic32mx_i2c.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-i2c.h rename to arch/mips/src/pic32mx/pic32mx_i2c.h index 6475caba49..bb7d3b3225 100644 --- a/arch/mips/src/pic32mx/pic32mx-i2c.h +++ b/arch/mips/src/pic32mx/pic32mx_i2c.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-i2c.h + * arch/mips/src/pic32mx/pic32mx_i2c.h * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include "chip.h" -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /************************************************************************************ * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-ic.h b/arch/mips/src/pic32mx/pic32mx_ic.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-ic.h rename to arch/mips/src/pic32mx/pic32mx_ic.h index d1b3070f52..04a7ecfe9b 100644 --- a/arch/mips/src/pic32mx/pic32mx-ic.h +++ b/arch/mips/src/pic32mx/pic32mx_ic.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-ic.h + * arch/mips/src/pic32mx/pic32mx_ic.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include "chip.h" -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" #if CHIP_NIC > 0 diff --git a/arch/mips/src/pic32mx/pic32mx-int.h b/arch/mips/src/pic32mx/pic32mx_int.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-int.h rename to arch/mips/src/pic32mx/pic32mx_int.h index 3443640c91..c9b7f4542d 100644 --- a/arch/mips/src/pic32mx/pic32mx-int.h +++ b/arch/mips/src/pic32mx/pic32mx_int.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-int.h + * arch/mips/src/pic32mx/pic32mx_int.h * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include "chip.h" -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-ioport.h b/arch/mips/src/pic32mx/pic32mx_ioport.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-ioport.h rename to arch/mips/src/pic32mx/pic32mx_ioport.h index 07dc1b88c0..92498793b3 100644 --- a/arch/mips/src/pic32mx/pic32mx-ioport.h +++ b/arch/mips/src/pic32mx/pic32mx_ioport.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/mips/src/pic32mx/pic32mx-ioport.h + * arch/mips/src/pic32mx/pic32mx_ioport.h * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include "chip.h" -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /******************************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-irq.c b/arch/mips/src/pic32mx/pic32mx_irq.c similarity index 98% rename from arch/mips/src/pic32mx/pic32mx-irq.c rename to arch/mips/src/pic32mx/pic32mx_irq.c index 98d11b40a7..a8df13ee79 100644 --- a/arch/mips/src/pic32mx/pic32mx-irq.c +++ b/arch/mips/src/pic32mx/pic32mx_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-irq.c + * arch/mips/src/pic32mx/pic32mx_irq.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -49,10 +49,10 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "pic32mx-int.h" +#include "pic32mx_int.h" #include "pic32mx.h" /**************************************************************************** @@ -168,7 +168,9 @@ void up_irqinitialize(void) /* And finally, enable interrupts */ - /* Interrupts are enabled by setting the IE bit in the CP0 status register */ + /* Interrupts are enabled by setting the IE bit in the CP0 status + * register + */ regval = 0; asm volatile("ei %0" : "=r"(regval)); @@ -197,7 +199,9 @@ void up_disable_irq(int irq) uint32_t regaddr; int bitno; - /* Disable the interrupt by clearing the associated bit in the IEC register */ + /* Disable the interrupt by clearing the associated bit in the IEC + * register + */ DEBUGASSERT(irq >= PIC32MX_IRQSRC_FIRST && irq <= PIC32MX_IRQSRC_LAST); if (irq >= PIC32MX_IRQSRC_FIRST) @@ -465,15 +469,15 @@ int up_prioritize_irq(int irq, int priority) /* Don't allow this function to be used for disabling interrupts. There is * no good reason for this restriction other than I want to make sure that - * the 5-bit priority values passed to this function are *not* confused with - * the 3-bit hardware priority values. + * the 5-bit priority values passed to this function are *not* confused + * with the 3-bit hardware priority values. */ DEBUGASSERT((unsigned)irq < NR_IRQS && (unsigned)(priority >> 2) > 0); if (irq < NR_IRQS) { - /* Get the index to the IPC register and the shift to the 5-bit priority - * field for this IRQ. + /* Get the index to the IPC register and the shift to the 5-bit + * priority field for this IRQ. */ regndx = irq >> 2; /* Range: 0-11 */ diff --git a/arch/mips/src/pic32mx/pic32mx-lowconsole.c b/arch/mips/src/pic32mx/pic32mx_lowconsole.c similarity index 98% rename from arch/mips/src/pic32mx/pic32mx-lowconsole.c rename to arch/mips/src/pic32mx/pic32mx_lowconsole.c index 492bc54b6c..ae6b353390 100644 --- a/arch/mips/src/pic32mx/pic32mx-lowconsole.c +++ b/arch/mips/src/pic32mx/pic32mx_lowconsole.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-lowconsole.c + * arch/mips/src/pic32mx/pic32mx_lowconsole.c * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -45,10 +45,10 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "pic32mx-config.h" +#include "pic32mx_config.h" #include "pic32mx.h" /**************************************************************************** @@ -260,7 +260,7 @@ void pic32mx_uartconfigure(uintptr_t uart_base, uint32_t baudrate, * The FIFO not full might generate better through-put but with a higher * interrupt rate. FIFO empty should lower the interrupt rate but result * in a burstier output. If you change this, please read the comment for - * acknowledging the interrupt in pic32mx-serial.c + * acknowledging the interrupt in pic32mx_serial.c */ #ifdef UART_STA_URXISEL_RXB6 diff --git a/arch/mips/src/pic32mx/pic32mx-lowinit.c b/arch/mips/src/pic32mx/pic32mx_lowinit.c similarity index 97% rename from arch/mips/src/pic32mx/pic32mx-lowinit.c rename to arch/mips/src/pic32mx/pic32mx_lowinit.c index 5df4012da4..2e894a2506 100644 --- a/arch/mips/src/pic32mx/pic32mx-lowinit.c +++ b/arch/mips/src/pic32mx/pic32mx_lowinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32/pic32mx-lowinit.c + * arch/mips/src/pic32/pic32mx_lowinit.c * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,17 +43,18 @@ #include -#include "up_internal.h" -#include "up_arch.h" +#include "mips_internal.h" +#include "mips_arch.h" #include "chip.h" #include "pic32mx.h" -#include "pic32mx-bmx.h" -#include "pic32mx-che.h" +#include "pic32mx_bmx.h" +#include "pic32mx_che.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Maximum Frequencies ******************************************************/ #define MAX_FLASH_HZ 30000000 /* Maximum FLASH speed (Hz) */ diff --git a/arch/mips/src/pic32mx/pic32mx-memorymap.h b/arch/mips/src/pic32mx/pic32mx_memorymap.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-memorymap.h rename to arch/mips/src/pic32mx/pic32mx_memorymap.h index dd403c8587..a7dff4f08b 100644 --- a/arch/mips/src/pic32mx/pic32mx-memorymap.h +++ b/arch/mips/src/pic32mx/pic32mx_memorymap.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-memorymap.h + * arch/mips/src/pic32mx/pic32mx_memorymap.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/pic32mx/pic32mx-oc.h b/arch/mips/src/pic32mx/pic32mx_oc.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-oc.h rename to arch/mips/src/pic32mx/pic32mx_oc.h index 3e77f9630f..c9f7cac0da 100644 --- a/arch/mips/src/pic32mx/pic32mx-oc.h +++ b/arch/mips/src/pic32mx/pic32mx_oc.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-oc.h + * arch/mips/src/pic32mx/pic32mx_oc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include "chip.h" -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" #if CHIP_NOC > 0 diff --git a/arch/mips/src/pic32mx/pic32mx-osc.h b/arch/mips/src/pic32mx/pic32mx_osc.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-osc.h rename to arch/mips/src/pic32mx/pic32mx_osc.h index b81d757442..585e930527 100644 --- a/arch/mips/src/pic32mx/pic32mx-osc.h +++ b/arch/mips/src/pic32mx/pic32mx_osc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-osc.h + * arch/mips/src/pic32mx/pic32mx_osc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-pmp.h b/arch/mips/src/pic32mx/pic32mx_pmp.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-pmp.h rename to arch/mips/src/pic32mx/pic32mx_pmp.h index 637480e549..3b61590cd4 100644 --- a/arch/mips/src/pic32mx/pic32mx-pmp.h +++ b/arch/mips/src/pic32mx/pic32mx_pmp.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-pmp.h + * arch/mips/src/pic32mx/pic32mx_pmp.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /************************************************************************************ * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-pps.h b/arch/mips/src/pic32mx/pic32mx_pps.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-pps.h rename to arch/mips/src/pic32mx/pic32mx_pps.h index 950792702f..3c55c1ec5d 100644 --- a/arch/mips/src/pic32mx/pic32mx-pps.h +++ b/arch/mips/src/pic32mx/pic32mx_pps.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-pps.h + * arch/mips/src/pic32mx/pic32mx_pps.h * * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" #if defined(CHIP_PIC32MX1) || defined(CHIP_PIC32MX2) diff --git a/arch/mips/src/pic32mx/pic32mx-reset.h b/arch/mips/src/pic32mx/pic32mx_reset.h similarity index 98% rename from arch/mips/src/pic32mx/pic32mx-reset.h rename to arch/mips/src/pic32mx/pic32mx_reset.h index 5cddd8bfc3..c173a036c4 100644 --- a/arch/mips/src/pic32mx/pic32mx-reset.h +++ b/arch/mips/src/pic32mx/pic32mx_reset.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-reset.h + * arch/mips/src/pic32mx/pic32mx_reset.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /************************************************************************************ * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-rtcc.h b/arch/mips/src/pic32mx/pic32mx_rtcc.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-rtcc.h rename to arch/mips/src/pic32mx/pic32mx_rtcc.h index 93618ce7d2..5bccd7808c 100644 --- a/arch/mips/src/pic32mx/pic32mx-rtcc.h +++ b/arch/mips/src/pic32mx/pic32mx_rtcc.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/mips/src/pic32mx/pic32mx-rtcc.h + * arch/mips/src/pic32mx/pic32mx_rtcc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /******************************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-serial.c b/arch/mips/src/pic32mx/pic32mx_serial.c similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-serial.c rename to arch/mips/src/pic32mx/pic32mx_serial.c index f2d06873c1..b60ee4f491 100644 --- a/arch/mips/src/pic32mx/pic32mx-serial.c +++ b/arch/mips/src/pic32mx/pic32mx_serial.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-serial.c + * arch/mips/src/pic32mx/pic32mx_serial.c * * Copyright (C) 2011-2012, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -57,12 +57,12 @@ #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "pic32mx-config.h" +#include "pic32mx_config.h" #include "chip.h" -#include "pic32mx-uart.h" +#include "pic32mx_uart.h" #include "pic32mx.h" /**************************************************************************** @@ -142,7 +142,7 @@ struct up_dev_s { - uintptr_t uartbase; /* Base address of UART registers */ + uintptr_t uartbase; /* Base address of UART registers */ uint32_t baud; /* Configured baud */ uint8_t irq; /* IRQ associated with this UART (for attachment) */ uint8_t irqe; /* Error IRQ associated with this UART (for enable) */ diff --git a/arch/mips/src/pic32mx/pic32mx-spi.c b/arch/mips/src/pic32mx/pic32mx_spi.c similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-spi.c rename to arch/mips/src/pic32mx/pic32mx_spi.c index 01b61888b3..c60bc26ec0 100644 --- a/arch/mips/src/pic32mx/pic32mx-spi.c +++ b/arch/mips/src/pic32mx/pic32mx_spi.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-spi.c + * arch/mips/src/pic32mx/pic32mx_spi.c * * Copyright (C) 2012, 2015-2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -51,12 +51,12 @@ #include #include -#include "up_internal.h" -#include "up_arch.h" +#include "mips_internal.h" +#include "mips_arch.h" #include "chip.h" #include "pic32mx.h" -#include "pic32mx-spi.h" +#include "pic32mx_spi.h" #if defined(CONFIG_PIC32MX_SPI1) || defined(CONFIG_PIC32MX_SPI2) || \ defined(CONFIG_PIC32MX_SPI3) || defined(CONFIG_PIC32MX_SPI4) @@ -68,7 +68,7 @@ /* Configuration */ #ifdef CONFIG_SPI_EXCHANGE - /* See arch/mips/src/pic32mz/pic32mz-spi.c for an implementation */ + /* See arch/mips/src/pic32mz/pic32mz_spi.c for an implementation */ # error CONFIG_SPI_EXCHANGE not supported by this driver #endif @@ -478,7 +478,9 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, spiinfo("Old frequency: %d actual: %d New frequency: %d\n", priv->frequency, priv->actual, frequency); - /* Check if the requested frequency is the same as the frequency selection */ + /* Check if the requested frequency is the same as the frequency + * selection + */ if (priv->frequency == frequency) { @@ -674,7 +676,9 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) regval = spi_getreg(priv, PIC32MX_SPI_CON_OFFSET); spiinfo("CON: %08x\n", regval); - /* Save the selection so the subsequence re-configurations will be faster */ + /* Save the selection so the subsequence re-configurations will be + * faster + */ priv->nbits = nbits; } @@ -919,7 +923,9 @@ FAR struct spi_dev_s *pic32mx_spibus_initialize(int port) up_disable_irq(priv->rxirq); #endif - /* Stop and reset the SPI module by clearing the ON bit in the CON register. */ + /* Stop and reset the SPI module by clearing the ON bit in the CON + * register. + */ spi_putreg(priv, PIC32MX_SPI_CON_OFFSET, 0); diff --git a/arch/mips/src/pic32mx/pic32mx-spi.h b/arch/mips/src/pic32mx/pic32mx_spi.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-spi.h rename to arch/mips/src/pic32mx/pic32mx_spi.h index cccafd5edd..6d1a1390b7 100644 --- a/arch/mips/src/pic32mx/pic32mx-spi.h +++ b/arch/mips/src/pic32mx/pic32mx_spi.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-spi.h + * arch/mips/src/pic32mx/pic32mx_spi.h * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include "chip.h" -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-timer.h b/arch/mips/src/pic32mx/pic32mx_timer.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-timer.h rename to arch/mips/src/pic32mx/pic32mx_timer.h index 47c78f1138..27b7965dbd 100644 --- a/arch/mips/src/pic32mx/pic32mx-timer.h +++ b/arch/mips/src/pic32mx/pic32mx_timer.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-timer.h + * arch/mips/src/pic32mx/pic32mx_timer.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include "chip.h" -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" #if CHIP_NTIMERS > 0 diff --git a/arch/mips/src/pic32mx/pic32mx-timerisr.c b/arch/mips/src/pic32mx/pic32mx_timerisr.c similarity index 98% rename from arch/mips/src/pic32mx/pic32mx-timerisr.c rename to arch/mips/src/pic32mx/pic32mx_timerisr.c index fce64d7ef0..30ad48de52 100644 --- a/arch/mips/src/pic32mx/pic32mx-timerisr.c +++ b/arch/mips/src/pic32mx/pic32mx_timerisr.c @@ -47,18 +47,20 @@ #include #include "clock/clock.h" -#include "up_internal.h" -#include "up_arch.h" +#include "mips_internal.h" +#include "mips_arch.h" -#include "pic32mx-config.h" -#include "pic32mx-timer.h" -#include "pic32mx-int.h" +#include "pic32mx_config.h" +#include "pic32mx_timer.h" +#include "pic32mx_int.h" #include "pic32mx.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Timer Setup **************************************************************/ + /* Timer 1 is a type A timer. Setting the TCS bit in the timer control * register will select the SOSC as the clock source. Otherwise, PBCLOCK * is the clock source. diff --git a/arch/mips/src/pic32mx/pic32mx-uart.h b/arch/mips/src/pic32mx/pic32mx_uart.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-uart.h rename to arch/mips/src/pic32mx/pic32mx_uart.h index c348c6c10a..33ddac3926 100644 --- a/arch/mips/src/pic32mx/pic32mx-uart.h +++ b/arch/mips/src/pic32mx/pic32mx_uart.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-uart.h + * arch/mips/src/pic32mx/pic32mx_uart.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include "chip.h" -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /************************************************************************************ * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-usbdev.c b/arch/mips/src/pic32mx/pic32mx_usbdev.c similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-usbdev.c rename to arch/mips/src/pic32mx/pic32mx_usbdev.c index 46cfe1f19c..47da535500 100644 --- a/arch/mips/src/pic32mx/pic32mx-usbdev.c +++ b/arch/mips/src/pic32mx/pic32mx_usbdev.c @@ -64,9 +64,9 @@ #include -#include "up_arch.h" +#include "mips_arch.h" #include "pic32mx.h" -#include "pic32mx-usbotg.h" +#include "pic32mx_usbotg.h" #if defined(CONFIG_USBDEV) && defined(CONFIG_PIC32MX_USBDEV) diff --git a/arch/mips/src/pic32mx/pic32mx-usbotg.h b/arch/mips/src/pic32mx/pic32mx_usbotg.h similarity index 99% rename from arch/mips/src/pic32mx/pic32mx-usbotg.h rename to arch/mips/src/pic32mx/pic32mx_usbotg.h index 11b3231886..01d75a6707 100644 --- a/arch/mips/src/pic32mx/pic32mx-usbotg.h +++ b/arch/mips/src/pic32mx/pic32mx_usbotg.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-usbotg.h + * arch/mips/src/pic32mx/pic32mx_usbotg.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /************************************************************************************ * Pre-processor Definitions diff --git a/arch/mips/src/pic32mx/pic32mx-wdt.h b/arch/mips/src/pic32mx/pic32mx_wdt.h similarity index 98% rename from arch/mips/src/pic32mx/pic32mx-wdt.h rename to arch/mips/src/pic32mx/pic32mx_wdt.h index abbb49c981..c5a9e50af3 100644 --- a/arch/mips/src/pic32mx/pic32mx-wdt.h +++ b/arch/mips/src/pic32mx/pic32mx_wdt.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-wdt.h + * arch/mips/src/pic32mx/pic32mx_wdt.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mx-memorymap.h" +#include "pic32mx_memorymap.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mz/Make.defs b/arch/mips/src/pic32mz/Make.defs index 7e05e96fa0..4dd96c98e3 100644 --- a/arch/mips/src/pic32mz/Make.defs +++ b/arch/mips/src/pic32mz/Make.defs @@ -35,83 +35,83 @@ # The start-up, "head", file -HEAD_ASRC = pic32mz-head.S +HEAD_ASRC = pic32mz_head.S # Common MIPS files -CMN_ASRCS = up_syscall0.S vfork.S up_cache.S -CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c -CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_initialize.c -CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_irq.c up_lowputs.c -CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c -CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c -CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c up_sigdeliver.c -CMN_CSRCS += up_stackframe.c up_swint0.c up_udelay.c up_unblocktask.c -CMN_CSRCS += up_usestack.c up_vfork.c +CMN_ASRCS = mips_syscall0.S vfork.S mips_cache.S +CMN_CSRCS = mips_allocateheap.c mips_assert.c mips_blocktask.c mips_copystate.c +CMN_CSRCS += mips_createstack.c mips_doirq.c mips_exit.c mips_initialize.c +CMN_CSRCS += mips_initialstate.c mips_interruptcontext.c mips_irq.c mips_lowputs.c +CMN_CSRCS += mips_mdelay.c mips_modifyreg8.c mips_modifyreg16.c mips_modifyreg32.c +CMN_CSRCS += mips_puts.c mips_releasepending.c mips_releasestack.c +CMN_CSRCS += mips_reprioritizertr.c mips_schedulesigaction.c mips_sigdeliver.c +CMN_CSRCS += mips_stackframe.c mips_swint0.c mips_udelay.c mips_unblocktask.c +CMN_CSRCS += mips_usestack.c mips_vfork.c # Configuration dependent common files ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) -CMN_CSRCS += up_idle.c +CMN_CSRCS += mips_idle.c endif -# Use of common/up_etherstub.c is deprecated. The preferred mechanism is to +# Use of common/mips_etherstub.c is deprecated. The preferred mechanism is to # use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in # up_initialize(). Then this stub would not be needed. ifneq ($(CONFIG_PIC32MZ_ETHERNET),y) ifeq ($(CONFIG_NET),y) -CMN_CSRCS += up_etherstub.c +CMN_CSRCS += mips_etherstub.c endif endif ifeq ($(CONFIG_ARCH_STACKDUMP),y) -CMN_CSRCS += up_dumpstate.c +CMN_CSRCS += mips_dumpstate.c endif # Required PIC32MZ files CHIP_ASRCS = -CHIP_CSRCS = pic32mz-lowinit.c pic32mz-exception.c pic32mz-decodeirq.c -CHIP_CSRCS += pic32mz-irq.c pic32mz-timerisr.c pic32mz-gpio.c -CHIP_CSRCS += pic32mz-lowconsole.c pic32mz-serial.c +CHIP_CSRCS = pic32mz_lowinit.c pic32mz_exception.c pic32mz_decodeirq.c +CHIP_CSRCS += pic32mz_irq.c pic32mz_timerisr.c pic32mz_gpio.c +CHIP_CSRCS += pic32mz_lowconsole.c pic32mz_serial.c # Configuration-dependent PIC32MZ files ifeq ($(CONFIG_PIC32MZ_GPIOIRQ),y) -CHIP_CSRCS += pic32mz-gpioirq.c +CHIP_CSRCS += pic32mz_gpioirq.c endif ifeq ($(CONFIG_PIC32MZ_SPI),y) -CHIP_CSRCS += pic32mz-spi.c +CHIP_CSRCS += pic32mz_spi.c endif ifeq ($(CONFIG_PIC32MZ_I2C),y) -CHIP_CSRCS += pic32mz-i2c.c +CHIP_CSRCS += pic32mz_i2c.c endif ifeq ($(CONFIG_PIC32MZ_TIMER),y) -CHIP_CSRCS += pic32mz-timer.c +CHIP_CSRCS += pic32mz_timer.c ifeq ($(CONFIG_TIMER),y) -CHIP_CSRCS += pic32mz-timer-lowerhalf.c +CHIP_CSRCS += pic32mz_timer_lowerhalf.c endif endif ifeq ($(CONFIG_PIC32MZ_FREERUN),y) -CHIP_CSRCS += pic32mz-freerun.c +CHIP_CSRCS += pic32mz_freerun.c endif ifeq ($(CONFIG_PIC32MZ_ONESHOT),y) -CHIP_CSRCS += pic32mz-oneshot.c +CHIP_CSRCS += pic32mz_oneshot.c ifeq ($(CONFIG_ONESHOT),y) -CHIP_CSRCS += pic32mz-oneshot-lowerhalf.c +CHIP_CSRCS += pic32mz_oneshot_lowerhalf.c endif endif ifeq ($(CONFIG_PIC32MZ_ETHERNET),y) -CHIP_CSRCS += pic32mz-ethernet.c +CHIP_CSRCS += pic32mz_ethernet.c endif ifeq ($(CONFIG_PIC32MZ_DMA),y) -CHIP_CSRCS += pic32mz-dma.c +CHIP_CSRCS += pic32mz_dma.c endif diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-dma.h b/arch/mips/src/pic32mz/hardware/pic32mz_dma.h similarity index 99% rename from arch/mips/src/pic32mz/hardware/pic32mz-dma.h rename to arch/mips/src/pic32mz/hardware/pic32mz_dma.h index 9d8e597cdb..b0a86ea6b1 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-dma.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_dma.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/mips/src/pic32mz/hardware/pic32mz-dma.h + * arch/mips/src/pic32mz/hardware/pic32mz_dma.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include -#include "hardware/pic32mz-memorymap.h" +#include "hardware/pic32mz_memorymap.h" #if CHIP_NDMACH > 0 diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-ethernet.h b/arch/mips/src/pic32mz/hardware/pic32mz_ethernet.h similarity index 99% rename from arch/mips/src/pic32mz/hardware/pic32mz-ethernet.h rename to arch/mips/src/pic32mz/hardware/pic32mz_ethernet.h index 0b497a991c..09a51abffe 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-ethernet.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_ethernet.h @@ -1,5 +1,5 @@ /**************************************************************************************************** - * arch/mips/src/pic32mz/hardware/pic32mz-ethernet.h + * arch/mips/src/pic32mz/hardware/pic32mz_ethernet.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include -#include "hardware/pic32mz-memorymap.h" +#include "hardware/pic32mz_memorymap.h" #if CHIP_NETHERNET > 0 diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-features.h b/arch/mips/src/pic32mz/hardware/pic32mz_features.h similarity index 94% rename from arch/mips/src/pic32mz/hardware/pic32mz-features.h rename to arch/mips/src/pic32mz/hardware/pic32mz_features.h index 96bb7d6218..08ed47a100 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-features.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_features.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mz/hardware/pic32mz-features.h + * arch/mips/src/pic32mz/hardware/pic32mz_features.h * * Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,9 +43,9 @@ #include #if defined(CONFIG_ARCH_CHIP_PIC32MZEC) -# include "hardware/pic32mzec-features.h" +# include "hardware/pic32mzec_features.h" #elif defined(CONFIG_ARCH_CHIP_PIC32MZEF) -# include "hardware/pic32mzef-features.h" +# include "hardware/pic32mzef_features.h" #else # error Unknown PIC32MZ family #endif diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-i2c.h b/arch/mips/src/pic32mz/hardware/pic32mz_i2c.h similarity index 99% rename from arch/mips/src/pic32mz/hardware/pic32mz-i2c.h rename to arch/mips/src/pic32mz/hardware/pic32mz_i2c.h index d59c6c9ec2..b4ee97e143 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-i2c.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_i2c.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mz/hardware/pic32mz-i2c.h + * arch/mips/src/pic32mz/hardware/pic32mz_i2c.h * * Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include -#include "hardware/pic32mz-memorymap.h" +#include "hardware/pic32mz_memorymap.h" #if CHIP_NI2C > 0 diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-int.h b/arch/mips/src/pic32mz/hardware/pic32mz_int.h similarity index 99% rename from arch/mips/src/pic32mz/hardware/pic32mz-int.h rename to arch/mips/src/pic32mz/hardware/pic32mz_int.h index 51e655e983..2b12d1fc31 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-int.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_int.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/hardware/pic32mz-int.h + * arch/mips/src/pic32mz/hardware/pic32mz_int.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mz-memorymap.h" +#include "pic32mz_memorymap.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-ioport.h b/arch/mips/src/pic32mz/hardware/pic32mz_ioport.h similarity index 99% rename from arch/mips/src/pic32mz/hardware/pic32mz-ioport.h rename to arch/mips/src/pic32mz/hardware/pic32mz_ioport.h index 60adef40fa..4b3e5ed2ba 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-ioport.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_ioport.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/mips/src/pic32mz/hardware/pic32mz-ioport.h + * arch/mips/src/pic32mz/hardware/pic32mz_ioport.h * * Copyright (C) 2015, 2019 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include #include -#include "pic32mz-memorymap.h" +#include "pic32mz_memorymap.h" #if CHIP_NPORTS > 0 diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-memorymap.h b/arch/mips/src/pic32mz/hardware/pic32mz_memorymap.h similarity index 94% rename from arch/mips/src/pic32mz/hardware/pic32mz-memorymap.h rename to arch/mips/src/pic32mz/hardware/pic32mz_memorymap.h index 850648661f..5aaca37848 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-memorymap.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_memorymap.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mz/hardware/pic32mz-memorymap.h + * arch/mips/src/pic32mz/hardware/pic32mz_memorymap.h * * Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,9 +43,9 @@ #include #if defined(CONFIG_ARCH_CHIP_PIC32MZEC) -# include "hardware/pic32mzec-memorymap.h" +# include "hardware/pic32mzec_memorymap.h" #elif defined(CONFIG_ARCH_CHIP_PIC32MZEF) -# include "hardware/pic32mzef-memorymap.h" +# include "hardware/pic32mzef_memorymap.h" #else # error "Unknown PIC32MZ family" #endif diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-osc.h b/arch/mips/src/pic32mz/hardware/pic32mz_osc.h similarity index 99% rename from arch/mips/src/pic32mz/hardware/pic32mz-osc.h rename to arch/mips/src/pic32mz/hardware/pic32mz_osc.h index bffe84c93e..3ba7763161 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-osc.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_osc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/hardware/pic32mz-osc.h + * arch/mips/src/pic32mz/hardware/pic32mz_osc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mz-memorymap.h" +#include "pic32mz_memorymap.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-pps.h b/arch/mips/src/pic32mz/hardware/pic32mz_pps.h similarity index 97% rename from arch/mips/src/pic32mz/hardware/pic32mz-pps.h rename to arch/mips/src/pic32mz/hardware/pic32mz_pps.h index d20815ba1b..7246b93683 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-pps.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_pps.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/mips/src/pic32mz/hardware/pic32mz-pps.h + * arch/mips/src/pic32mz/hardware/pic32mz_pps.h * * Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,9 +50,9 @@ /* Depends on the peripherals supported by the particular device */ #if defined(CONFIG_ARCH_CHIP_PIC32MZEC) -# include "hardware/pic32mzec-pps.h" +# include "hardware/pic32mzec_pps.h" #elif defined(CONFIG_ARCH_CHIP_PIC32MZEF) -# include "hardware/pic32mzef-pps.h" +# include "hardware/pic32mzef_pps.h" #else # error Unknown PIC32MZ family #endif diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-prefetch.h b/arch/mips/src/pic32mz/hardware/pic32mz_prefetch.h similarity index 98% rename from arch/mips/src/pic32mz/hardware/pic32mz-prefetch.h rename to arch/mips/src/pic32mz/hardware/pic32mz_prefetch.h index 5d3f380b0c..082a38b1c9 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-prefetch.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_prefetch.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/mips/src/pic32mz/hardware/pic32mz-prefetch.h + * arch/mips/src/pic32mz/hardware/pic32mz_prefetch.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,7 +42,7 @@ #include -#include "pic32mz-memorymap.h" +#include "pic32mz_memorymap.h" /******************************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-spi.h b/arch/mips/src/pic32mz/hardware/pic32mz_spi.h similarity index 99% rename from arch/mips/src/pic32mz/hardware/pic32mz-spi.h rename to arch/mips/src/pic32mz/hardware/pic32mz_spi.h index 78f4ecf2f1..06add56a1a 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-spi.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_spi.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/hardware/pic32mz-spi.h + * arch/mips/src/pic32mz/hardware/pic32mz_spi.h * * Copyright (C) 2015, 2019 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include -#include "hardware/pic32mz-memorymap.h" +#include "hardware/pic32mz_memorymap.h" #if CHIP_NSPI > 0 diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-timer.h b/arch/mips/src/pic32mz/hardware/pic32mz_timer.h similarity index 99% rename from arch/mips/src/pic32mz/hardware/pic32mz-timer.h rename to arch/mips/src/pic32mz/hardware/pic32mz_timer.h index 9350d0c3b6..a6d9f6a856 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-timer.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_timer.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mz/hardware/pic32mz-timer.h + * arch/mips/src/pic32mz/hardware/pic32mz_timer.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include -#include "pic32mz-memorymap.h" +#include "pic32mz_memorymap.h" #if CHIP_NTIMERS > 0 diff --git a/arch/mips/src/pic32mz/hardware/pic32mz-uart.h b/arch/mips/src/pic32mz/hardware/pic32mz_uart.h similarity index 99% rename from arch/mips/src/pic32mz/hardware/pic32mz-uart.h rename to arch/mips/src/pic32mz/hardware/pic32mz_uart.h index 7f035e5668..6272db4486 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mz-uart.h +++ b/arch/mips/src/pic32mz/hardware/pic32mz_uart.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mz/hardware/pic32mz-uart.h + * arch/mips/src/pic32mz/hardware/pic32mz_uart.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include -#include "hardware/pic32mz-memorymap.h" +#include "hardware/pic32mz_memorymap.h" /************************************************************************************ * Pre-processor Definitions diff --git a/arch/mips/src/pic32mz/hardware/pic32mzec-features.h b/arch/mips/src/pic32mz/hardware/pic32mzec_features.h similarity index 100% rename from arch/mips/src/pic32mz/hardware/pic32mzec-features.h rename to arch/mips/src/pic32mz/hardware/pic32mzec_features.h diff --git a/arch/mips/src/pic32mz/hardware/pic32mzec-memorymap.h b/arch/mips/src/pic32mz/hardware/pic32mzec_memorymap.h similarity index 100% rename from arch/mips/src/pic32mz/hardware/pic32mzec-memorymap.h rename to arch/mips/src/pic32mz/hardware/pic32mzec_memorymap.h diff --git a/arch/mips/src/pic32mz/hardware/pic32mzec-pps.h b/arch/mips/src/pic32mz/hardware/pic32mzec_pps.h similarity index 99% rename from arch/mips/src/pic32mz/hardware/pic32mzec-pps.h rename to arch/mips/src/pic32mz/hardware/pic32mzec_pps.h index 6c44ed9af1..00388d4abd 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mzec-pps.h +++ b/arch/mips/src/pic32mz/hardware/pic32mzec_pps.h @@ -40,7 +40,7 @@ * Included Files ********************************************************************************************/ -#include "pic32mz-memorymap.h" +#include "pic32mz_memorymap.h" /******************************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mz/hardware/pic32mzef-features.h b/arch/mips/src/pic32mz/hardware/pic32mzef_features.h similarity index 100% rename from arch/mips/src/pic32mz/hardware/pic32mzef-features.h rename to arch/mips/src/pic32mz/hardware/pic32mzef_features.h diff --git a/arch/mips/src/pic32mz/hardware/pic32mzef-memorymap.h b/arch/mips/src/pic32mz/hardware/pic32mzef_memorymap.h similarity index 100% rename from arch/mips/src/pic32mz/hardware/pic32mzef-memorymap.h rename to arch/mips/src/pic32mz/hardware/pic32mzef_memorymap.h diff --git a/arch/mips/src/pic32mz/hardware/pic32mzef-pps.h b/arch/mips/src/pic32mz/hardware/pic32mzef_pps.h similarity index 99% rename from arch/mips/src/pic32mz/hardware/pic32mzef-pps.h rename to arch/mips/src/pic32mz/hardware/pic32mzef_pps.h index d26e24c844..b679c4f925 100644 --- a/arch/mips/src/pic32mz/hardware/pic32mzef-pps.h +++ b/arch/mips/src/pic32mz/hardware/pic32mzef_pps.h @@ -40,7 +40,7 @@ * Included Files ********************************************************************************************/ -#include "pic32mz-memorymap.h" +#include "pic32mz_memorymap.h" /******************************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mz/pic32mz-config.h b/arch/mips/src/pic32mz/pic32mz_config.h similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-config.h rename to arch/mips/src/pic32mz/pic32mz_config.h index 86f00144e2..8c8ccdb7ba 100644 --- a/arch/mips/src/pic32mz/pic32mz-config.h +++ b/arch/mips/src/pic32mz/pic32mz_config.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mz/pic32mz-config.h + * arch/mips/src/pic32mz/pic32mz_config.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/pic32mz/pic32mz-decodeirq.c b/arch/mips/src/pic32mz/pic32mz_decodeirq.c similarity index 97% rename from arch/mips/src/pic32mz/pic32mz-decodeirq.c rename to arch/mips/src/pic32mz/pic32mz_decodeirq.c index fa909db805..e70e440c68 100644 --- a/arch/mips/src/pic32mz/pic32mz-decodeirq.c +++ b/arch/mips/src/pic32mz/pic32mz_decodeirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/pic32mz-decodeirq.c + * arch/mips/src/pic32mz/pic32mz_decodeirq.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -49,10 +49,10 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "hardware/pic32mz-int.h" +#include "hardware/pic32mz_int.h" #include "group/group.h" @@ -111,7 +111,9 @@ uint32_t *pic32mz_decodeirq(uint32_t *regs) #endif CURRENT_REGS = regs; - /* Loop while there are pending interrupts with priority greater than zero */ + /* Loop while there are pending interrupts with priority greater than + * zero + */ for (; ; ) { diff --git a/arch/mips/src/pic32mz/pic32mz-dma.c b/arch/mips/src/pic32mz/pic32mz_dma.c similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-dma.c rename to arch/mips/src/pic32mz/pic32mz_dma.c index f97e86ed36..e45b128849 100644 --- a/arch/mips/src/pic32mz/pic32mz-dma.c +++ b/arch/mips/src/pic32mz/pic32mz_dma.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/chip/pic32mz-dma.c + * arch/mips/src/pic32mz/chip/pic32mz_dma.c * * Copyright (C) 2019 Abdelatif Guettouche. All rights reserved. * Author: Abdelatif Guettouche @@ -51,12 +51,12 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" #include "sched/sched.h" -#include "hardware/pic32mz-dma.h" -#include "pic32mz-dma.h" +#include "hardware/pic32mz_dma.h" +#include "pic32mz_dma.h" #ifdef CONFIG_PIC32MZ_DMA diff --git a/arch/mips/src/pic32mz/pic32mz-dma.h b/arch/mips/src/pic32mz/pic32mz_dma.h similarity index 97% rename from arch/mips/src/pic32mz/pic32mz-dma.h rename to arch/mips/src/pic32mz/pic32mz_dma.h index 329684022c..cb08a6ea1e 100644 --- a/arch/mips/src/pic32mz/pic32mz-dma.h +++ b/arch/mips/src/pic32mz/pic32mz_dma.h @@ -1,5 +1,5 @@ -/************************************************************************************ - * arch/mips/src/pic32mz/pic32mz-dma.h +/***************************************************************************** + * arch/mips/src/pic32mz/pic32mz_dma.h * * Copyright (C) 2015, 2019 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************************************/ + *****************************************************************************/ #ifndef __ARCH_MIPS_SRC_PIC32MZ_PIC32MZ_DMA_H #define __ARCH_MIPS_SRC_PIC32MZ_PIC32MZ_DMA_H @@ -70,9 +70,9 @@ * pic32mz_dma_free will free the channel and make it available. */ -/************************************************************************************ +/***************************************************************************** * Included Files - ************************************************************************************/ + *****************************************************************************/ #include #include @@ -88,9 +88,9 @@ #define PIC32MZ_DMA_NOIRQ (NR_IRQS + 1) -/******************************************************************************* +/************************************************************************************ * Public Types - ******************************************************************************/ + ************************************************************************************/ #ifndef __ASSEMBLY__ @@ -202,7 +202,7 @@ struct pic32mz_dmaregs_s }; #endif -/******************************************************************************* + /***************************************************************************** * Public Data ******************************************************************************/ @@ -215,7 +215,7 @@ extern "C" #define EXTERN extern #endif -/******************************************************************************* +/****************************************************************************** * Public Function Prototypes ******************************************************************************/ diff --git a/arch/mips/src/pic32mz/pic32mz-ethernet.c b/arch/mips/src/pic32mz/pic32mz_ethernet.c similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-ethernet.c rename to arch/mips/src/pic32mz/pic32mz_ethernet.c index 2d4692d823..fe83dfb3f7 100644 --- a/arch/mips/src/pic32mz/pic32mz-ethernet.c +++ b/arch/mips/src/pic32mz/pic32mz_ethernet.c @@ -68,11 +68,11 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "pic32mz-config.h" -#include "hardware/pic32mz-ethernet.h" +#include "pic32mz_config.h" +#include "hardware/pic32mz_ethernet.h" /* Does this chip have and Ethernet controller? */ @@ -173,9 +173,12 @@ #define PIC32MZ_ALIGNED_BUFSIZE DMA_ALIGN_UP(CONFIG_NET_ETH_PKTSIZE) -/* The number of buffers will, then, be one for each descriptor plus one extra */ +/* The number of buffers will, then, be one for each descriptor plus one + * extra + */ -#define PIC32MZ_NBUFFERS (CONFIG_PIC32MZ_ETH_NRXDESC + CONFIG_PIC32MZ_ETH_NTXDESC + 1) +#define PIC32MZ_NBUFFERS (CONFIG_PIC32MZ_ETH_NRXDESC + \ + CONFIG_PIC32MZ_ETH_NTXDESC + 1) /* Debug Configuration ******************************************************/ @@ -205,7 +208,9 @@ /* Timing *******************************************************************/ -/* TX poll deley = 1 seconds. CLK_TCK is the number of clock ticks per second */ +/* TX poll deley = 1 seconds. CLK_TCK is the number of clock ticks per + * second + */ #define PIC32MZ_WDDELAY (1*CLK_TCK) @@ -262,7 +267,9 @@ /* Misc. Helpers ************************************************************/ -/* This is a helper pointer for accessing the contents of the Ethernet header */ +/* This is a helper pointer for accessing the contents of the Ethernet + * header + */ #define BUF ((struct eth_hdr_s *)priv->pd_dev.d_buf) @@ -1197,7 +1204,9 @@ static int pic32mz_transmit(struct pic32mz_driver_s *priv) pic32mz_txnext(priv); - /* Enable the transmission of the message by setting the TXRTS bit (ETHCON1:9). */ + /* Enable the transmission of the message by setting the TXRTS bit + * (ETHCON1:9). + */ pic32mz_putreg(ETH_CON1_TXRTS | ETH_CON1_ON, PIC32MZ_ETH_CON1SET); @@ -1521,8 +1530,8 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv) } /* If the packet length is greater then the buffer, then we cannot - * accept the packet. Also, since the DMA packet buffers are set up to - * be the same size as our max packet size, any fragments also + * accept the packet. Also, since the DMA packet buffers are set up + * to be the same size as our max packet size, any fragments also * imply that the packet is too big. */ @@ -1534,7 +1543,9 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv) pic32mz_rxreturn(rxdesc); } - /* We don't have any logic here for reassembling packets from fragments. */ + /* We don't have any logic here for reassembling packets from + * fragments. + */ else if ((rxdesc->status & (RXDESC_STATUS_EOP | RXDESC_STATUS_SOP)) != (RXDESC_STATUS_EOP | RXDESC_STATUS_SOP)) @@ -1582,7 +1593,9 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv) pkt_input(&priv->pd_dev); #endif - /* We only accept IP packets of the configured type and ARP packets */ + /* We only accept IP packets of the configured type and ARP + * packets + */ #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) @@ -1604,7 +1617,9 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv) if (priv->pd_dev.d_len > 0) { - /* Update the Ethernet header with the correct MAC address */ + /* Update the Ethernet header with the correct MAC + * address + */ #ifdef CONFIG_NET_IPv6 if (IFF_IS_IPv4(priv->pd_dev.d_flags)) @@ -1643,7 +1658,9 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv) if (priv->pd_dev.d_len > 0) { - /* Update the Ethernet header with the correct MAC address */ + /* Update the Ethernet header with the correct MAC + * address + */ #ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->pd_dev.d_flags)) @@ -1802,7 +1819,9 @@ static void pic32mz_txdone(struct pic32mz_driver_s *priv) if (priv->pd_txpending) { - /* Clear the pending condition, send the packet, and restore Rx interrupts */ + /* Clear the pending condition, send the packet, and restore Rx + * interrupts + */ priv->pd_txpending = false; diff --git a/arch/mips/src/pic32mz/pic32mz-exception.c b/arch/mips/src/pic32mz/pic32mz_exception.c similarity index 97% rename from arch/mips/src/pic32mz/pic32mz-exception.c rename to arch/mips/src/pic32mz/pic32mz_exception.c index 433c518326..81eb1b8131 100644 --- a/arch/mips/src/pic32mz/pic32mz-exception.c +++ b/arch/mips/src/pic32mz/pic32mz_exception.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/pic32mz-exception.c + * arch/mips/src/pic32mz/pic32mz_exception.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,10 +50,10 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "hardware/pic32mz-int.h" +#include "hardware/pic32mz_int.h" /**************************************************************************** * Public Functions @@ -175,7 +175,9 @@ uint32_t *pic32mz_exception(uint32_t *regs) #endif #endif - /* Crash with currents_regs set so that we can dump the register contents. */ + /* Crash with currents_regs set so that we can dump the register + * contents. + */ CURRENT_REGS = regs; PANIC(); diff --git a/arch/mips/src/pic32mz/pic32mz-excptmacros.h b/arch/mips/src/pic32mz/pic32mz_excptmacros.h similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-excptmacros.h rename to arch/mips/src/pic32mz/pic32mz_excptmacros.h index 8c9b4c075f..8662017e27 100644 --- a/arch/mips/src/pic32mz/pic32mz-excptmacros.h +++ b/arch/mips/src/pic32mz/pic32mz_excptmacros.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/mips/src/pic32mz/pic32mz-excptmacros.h + * arch/mips/src/pic32mz/pic32mz_excptmacros.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/pic32mz/pic32mz-freerun.c b/arch/mips/src/pic32mz/pic32mz_freerun.c similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-freerun.c rename to arch/mips/src/pic32mz/pic32mz_freerun.c index f92d9e8429..15b1f7b61a 100644 --- a/arch/mips/src/pic32mz/pic32mz-freerun.c +++ b/arch/mips/src/pic32mz/pic32mz_freerun.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/chip/pic32mz-freerun.c + * arch/mips/src/pic32mz/chip/pic32mz_freerun.c * * Copyright (C) 2019 Abdelatif Guettouche. All rights reserved. * Author: Abdelatif Guettouche @@ -52,7 +52,7 @@ #include #include -#include "pic32mz-freerun.h" +#include "pic32mz_freerun.h" #ifdef CONFIG_PIC32MZ_FREERUN diff --git a/arch/mips/src/pic32mz/pic32mz-freerun.h b/arch/mips/src/pic32mz/pic32mz_freerun.h similarity index 98% rename from arch/mips/src/pic32mz/pic32mz-freerun.h rename to arch/mips/src/pic32mz/pic32mz_freerun.h index 65c1345d28..a8128b8146 100644 --- a/arch/mips/src/pic32mz/pic32mz-freerun.h +++ b/arch/mips/src/pic32mz/pic32mz_freerun.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/chip/pic32mz-freerun.h + * arch/mips/src/pic32mz/chip/pic32mz_freerun.h * * Copyright (C) 2019 Abdelatif Guettouche. All rights reserved. * Author: Abdelatif Guettouche @@ -50,7 +50,7 @@ #include #include -#include "pic32mz-timer.h" +#include "pic32mz_timer.h" #ifdef CONFIG_PIC32MZ_FREERUN diff --git a/arch/mips/src/pic32mz/pic32mz-gpio.c b/arch/mips/src/pic32mz/pic32mz_gpio.c similarity index 98% rename from arch/mips/src/pic32mz/pic32mz-gpio.c rename to arch/mips/src/pic32mz/pic32mz_gpio.c index b7da1ac2a0..bbd1fe0f54 100644 --- a/arch/mips/src/pic32mz/pic32mz-gpio.c +++ b/arch/mips/src/pic32mz/pic32mz_gpio.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/pic32mz-gpio.c + * arch/mips/src/pic32mz/pic32mz_gpio.c * * Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -47,10 +47,10 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" -#include "hardware/pic32mz-ioport.h" -#include "pic32mz-gpio.h" +#include "hardware/pic32mz_ioport.h" +#include "pic32mz_gpio.h" #if CHIP_NPORTS > 0 diff --git a/arch/mips/src/pic32mz/pic32mz-gpio.h b/arch/mips/src/pic32mz/pic32mz_gpio.h similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-gpio.h rename to arch/mips/src/pic32mz/pic32mz_gpio.h index 76ab10e79e..5e875584ee 100644 --- a/arch/mips/src/pic32mz/pic32mz-gpio.h +++ b/arch/mips/src/pic32mz/pic32mz_gpio.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mz/pic32mz-gpio.h + * arch/mips/src/pic32mz/pic32mz_gpio.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/pic32mz/pic32mz-gpioirq.c b/arch/mips/src/pic32mz/pic32mz_gpioirq.c similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-gpioirq.c rename to arch/mips/src/pic32mz/pic32mz_gpioirq.c index 8277b0dccc..297fc0d64b 100644 --- a/arch/mips/src/pic32mz/pic32mz-gpioirq.c +++ b/arch/mips/src/pic32mz/pic32mz_gpioirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/pic32mz-gpio.c + * arch/mips/src/pic32mz/pic32mz_gpio.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -47,10 +47,10 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" -#include "hardware/pic32mz-ioport.h" -#include "pic32mz-gpio.h" +#include "mips_arch.h" +#include "mips_internal.h" +#include "hardware/pic32mz_ioport.h" +#include "pic32mz_gpio.h" #ifdef CONFIG_PIC32MZ_GPIOIRQ diff --git a/arch/mips/src/pic32mz/pic32mz-head.S b/arch/mips/src/pic32mz/pic32mz_head.S similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-head.S rename to arch/mips/src/pic32mz/pic32mz_head.S index b67559df7a..b8f54474d8 100644 --- a/arch/mips/src/pic32mz/pic32mz-head.S +++ b/arch/mips/src/pic32mz/pic32mz_head.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/pic32mz-head.S + * arch/mips/src/pic32mz/pic32mz_head.S * * Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,9 +42,9 @@ #include #include -#include "pic32mz-config.h" -#include "hardware/pic32mz-features.h" -#include "pic32mz-excptmacros.h" +#include "pic32mz_config.h" +#include "hardware/pic32mz_features.h" +#include "pic32mz_excptmacros.h" /**************************************************************************** * Pre-processor Definitions @@ -173,7 +173,7 @@ * Public Symbols ****************************************************************************/ - .file "pic32mz-head.S" + .file "pic32mz_head.S" /* Exported symbols */ diff --git a/arch/mips/src/pic32mz/pic32mz-i2c.c b/arch/mips/src/pic32mz/pic32mz_i2c.c similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-i2c.c rename to arch/mips/src/pic32mz/pic32mz_i2c.c index 2662b850f5..119d143637 100644 --- a/arch/mips/src/pic32mz/pic32mz-i2c.c +++ b/arch/mips/src/pic32mz/pic32mz_i2c.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/chip/pic32mz-i2c.c + * arch/mips/src/pic32mz/chip/pic32mz_i2c.c * * Copyright (C) 2018 Abdelatif Guettouche. All rights reserved. * Author: Abdelatif Guettouche @@ -55,11 +55,11 @@ #include -#include "up_internal.h" -#include "up_arch.h" +#include "mips_internal.h" +#include "mips_arch.h" -#include "hardware/pic32mz-i2c.h" -#include "pic32mz-i2c.h" +#include "hardware/pic32mz_i2c.h" +#include "pic32mz_i2c.h" /* At least one I2C peripheral must be enabled */ diff --git a/arch/mips/src/pic32mz/pic32mz-i2c.h b/arch/mips/src/pic32mz/pic32mz_i2c.h similarity index 98% rename from arch/mips/src/pic32mz/pic32mz-i2c.h rename to arch/mips/src/pic32mz/pic32mz_i2c.h index f6483b3ea1..1408e579bf 100644 --- a/arch/mips/src/pic32mz/pic32mz-i2c.h +++ b/arch/mips/src/pic32mz/pic32mz_i2c.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mz/chip/pic32mz-i2c.h + * arch/mips/src/pic32mz/chip/pic32mz_i2c.h * * Copyright (C) 2018 Abdelatif Guettouche. All rights reserved. * Author: Abdelatif Guettouche diff --git a/arch/mips/src/pic32mz/pic32mz-irq.c b/arch/mips/src/pic32mz/pic32mz_irq.c similarity index 97% rename from arch/mips/src/pic32mz/pic32mz-irq.c rename to arch/mips/src/pic32mz/pic32mz_irq.c index e3e84e6ed3..9852a1a264 100644 --- a/arch/mips/src/pic32mz/pic32mz-irq.c +++ b/arch/mips/src/pic32mz/pic32mz_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/pic32mz-irq.c + * arch/mips/src/pic32mz/pic32mz_irq.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -49,11 +49,11 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "hardware/pic32mz-int.h" -#include "pic32mz-gpio.h" +#include "hardware/pic32mz_int.h" +#include "pic32mz_gpio.h" /**************************************************************************** * Pre-processor Definitions @@ -257,7 +257,9 @@ void up_irqinitialize(void) /* And finally, enable interrupts */ - /* Interrupts are enabled by setting the IE bit in the CP0 status register */ + /* Interrupts are enabled by setting the IE bit in the CP0 status + * register + */ regval = 0; asm volatile("ei %0" : "=r"(regval)); @@ -286,7 +288,9 @@ void up_disable_irq(int irq) uint32_t regaddr; int bitno; - /* Disable the interrupt by clearing the associated bit in the IEC register */ + /* Disable the interrupt by clearing the associated bit in the IEC + * register + */ DEBUGASSERT((unsigned)irq < NR_IRQS); regaddr = pic32mz_iecclr(irq); @@ -449,15 +453,15 @@ int up_prioritize_irq(int irq, int priority) /* Don't allow this function to be used for disabling interrupts. There is * no good reason for this restriction other than I want to make sure that - * the 5-bit priority values passed to this function are *not* confused with - * the 3-bit hardware priority values. + * the 5-bit priority values passed to this function are *not* confused + * with the 3-bit hardware priority values. */ DEBUGASSERT((unsigned)irq < NR_IRQS && (unsigned)(priority >> 2) > 0); if (irq < NR_IRQS) { - /* Get the index to the IPC register and the shift to the 5-bit priority - * field for this IRQ. + /* Get the index to the IPC register and the shift to the 5-bit + * priority field for this IRQ. */ regndx = irq >> 2; /* Range: 0-11 */ diff --git a/arch/mips/src/pic32mz/pic32mz-lowconsole.c b/arch/mips/src/pic32mz/pic32mz_lowconsole.c similarity index 97% rename from arch/mips/src/pic32mz/pic32mz-lowconsole.c rename to arch/mips/src/pic32mz/pic32mz_lowconsole.c index 6c3fa90cc2..4408e42d69 100644 --- a/arch/mips/src/pic32mz/pic32mz-lowconsole.c +++ b/arch/mips/src/pic32mz/pic32mz_lowconsole.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/pic32mz-lowconsole.c + * arch/mips/src/pic32mz/pic32mz_lowconsole.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -44,12 +44,12 @@ #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "pic32mz-config.h" -#include "hardware/pic32mz-uart.h" -#include "hardware/pic32mz-pps.h" +#include "pic32mz_config.h" +#include "hardware/pic32mz_uart.h" +#include "hardware/pic32mz_pps.h" #include @@ -261,7 +261,7 @@ void pic32mz_uartconfigure(uintptr_t uart_base, uint32_t baudrate, * The FIFO not full might generate better through-put but with a higher * interrupt rate. FIFO empty should lower the interrupt rate but result * in a burstier output. If you change this, please read the comment for - * acknowledging the interrupt in pic32mz-serial.c + * acknowledging the interrupt in pic32mz_serial.c */ pic32mz_putreg(uart_base, PIC32MZ_UART_STACLR_OFFSET, @@ -321,9 +321,9 @@ void pic32mz_uartconfigure(uintptr_t uart_base, uint32_t baudrate, * Name: pic32mz_consoleinit * * Description: - * Initialize a low-level console for debug output. This function is called - * very early in the initialization sequence to configure the serial console - * UART (only). + * Initialize a low-level console for debug output. This function is + * called very early in the initialization sequence to configure the serial + * console UART (only). * ****************************************************************************/ diff --git a/arch/mips/src/pic32mz/pic32mz-lowconsole.h b/arch/mips/src/pic32mz/pic32mz_lowconsole.h similarity index 98% rename from arch/mips/src/pic32mz/pic32mz-lowconsole.h rename to arch/mips/src/pic32mz/pic32mz_lowconsole.h index 0fb2679977..178e27f5a7 100644 --- a/arch/mips/src/pic32mz/pic32mz-lowconsole.h +++ b/arch/mips/src/pic32mz/pic32mz_lowconsole.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mz/pic32mz-lowconsole.h + * arch/mips/src/pic32mz/pic32mz_lowconsole.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/pic32mz/pic32mz-lowinit.c b/arch/mips/src/pic32mz/pic32mz_lowinit.c similarity index 97% rename from arch/mips/src/pic32mz/pic32mz-lowinit.c rename to arch/mips/src/pic32mz/pic32mz_lowinit.c index c0a73edc2e..6f8357433f 100644 --- a/arch/mips/src/pic32mz/pic32mz-lowinit.c +++ b/arch/mips/src/pic32mz/pic32mz_lowinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32/pic32mz-lowinit.c + * arch/mips/src/pic32/pic32mz_lowinit.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -44,17 +44,17 @@ #include #include -#include "up_internal.h" -#include "up_arch.h" +#include "mips_internal.h" +#include "mips_arch.h" -#include "hardware/pic32mz-features.h" -#include "hardware/pic32mz-prefetch.h" -#include "hardware/pic32mz-osc.h" -#include "hardware/pic32mz-ioport.h" +#include "hardware/pic32mz_features.h" +#include "hardware/pic32mz_prefetch.h" +#include "hardware/pic32mz_osc.h" +#include "hardware/pic32mz_ioport.h" -#include "pic32mz-config.h" -#include "pic32mz-lowconsole.h" -#include "pic32mz-lowinit.h" +#include "pic32mz_config.h" +#include "pic32mz_lowconsole.h" +#include "pic32mz_lowinit.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mz/pic32mz-lowinit.h b/arch/mips/src/pic32mz/pic32mz_lowinit.h similarity index 98% rename from arch/mips/src/pic32mz/pic32mz-lowinit.h rename to arch/mips/src/pic32mz/pic32mz_lowinit.h index ee84aee6c2..202d094166 100644 --- a/arch/mips/src/pic32mz/pic32mz-lowinit.h +++ b/arch/mips/src/pic32mz/pic32mz_lowinit.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mz/pic32mz-lowinit.h + * arch/mips/src/pic32mz/pic32mz_lowinit.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/pic32mz/pic32mz-oneshot-lowerhalf.c b/arch/mips/src/pic32mz/pic32mz_oneshot-lowerhalf.c similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-oneshot-lowerhalf.c rename to arch/mips/src/pic32mz/pic32mz_oneshot-lowerhalf.c index 9840046404..0dd776f3df 100644 --- a/arch/mips/src/pic32mz/pic32mz-oneshot-lowerhalf.c +++ b/arch/mips/src/pic32mz/pic32mz_oneshot-lowerhalf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/chip/pic32mz-oneshot-lowerhalf.c + * arch/mips/src/pic32mz/chip/pic32mz_oneshot_lowerhalf.c * * Copyright (C) 2019 Abdelatif Guettouche. All rights reserved. * Author: Abdelatif Guettouche @@ -52,7 +52,7 @@ #include #include -#include "pic32mz-oneshot.h" +#include "pic32mz_oneshot.h" /**************************************************************************** * Private Types diff --git a/arch/mips/src/pic32mz/pic32mz-oneshot.c b/arch/mips/src/pic32mz/pic32mz_oneshot.c similarity index 98% rename from arch/mips/src/pic32mz/pic32mz-oneshot.c rename to arch/mips/src/pic32mz/pic32mz_oneshot.c index 0cb5f7b79d..3792d29732 100644 --- a/arch/mips/src/pic32mz/pic32mz-oneshot.c +++ b/arch/mips/src/pic32mz/pic32mz_oneshot.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/chip/pic32mz-oneshot.c + * arch/mips/src/pic32mz/chip/pic32mz_oneshot.c * * Copyright (C) 2019 Abdelatif Guettouche. All rights reserved. * Author: Abdelatif Guettouche @@ -54,7 +54,7 @@ #include #include -#include "pic32mz-oneshot.h" +#include "pic32mz_oneshot.h" #ifdef CONFIG_PIC32MZ_ONESHOT @@ -296,7 +296,8 @@ int pic32mz_oneshot_start(struct pic32mz_oneshot_s *oneshot, irqstate_t flags; tmrinfo("handler=%p arg=%p, ts=(%lu, %lu)\n", - handler, arg, (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); + handler, arg, (unsigned long)ts->tv_sec, + (unsigned long)ts->tv_nsec); DEBUGASSERT(oneshot && handler && ts); DEBUGASSERT(oneshot->timer); diff --git a/arch/mips/src/pic32mz/pic32mz-oneshot.h b/arch/mips/src/pic32mz/pic32mz_oneshot.h similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-oneshot.h rename to arch/mips/src/pic32mz/pic32mz_oneshot.h index 15a61ddd41..9c94768c0c 100644 --- a/arch/mips/src/pic32mz/pic32mz-oneshot.h +++ b/arch/mips/src/pic32mz/pic32mz_oneshot.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/chip/pic32mz-oneshort.h + * arch/mips/src/pic32mz/chip/pic32mz_oneshort.h * * Copyright (C) 2019 Abdelatif Guettouche. All rights reserved. * Author: Abdelatif Guettouche @@ -51,7 +51,7 @@ #include -#include "pic32mz-timer.h" +#include "pic32mz_timer.h" #ifdef CONFIG_PIC32MZ_ONESHOT diff --git a/arch/mips/src/pic32mz/pic32mz_oneshot_lowerhalf.c b/arch/mips/src/pic32mz/pic32mz_oneshot_lowerhalf.c new file mode 100644 index 0000000000..2fcb345d8e --- /dev/null +++ b/arch/mips/src/pic32mz/pic32mz_oneshot_lowerhalf.c @@ -0,0 +1,353 @@ +/**************************************************************************** + * arch/mips/src/pic32mz/chip/pic32mz_oneshot-lowerhalf.c + * + * Copyright (C) 2019 Abdelatif Guettouche. All rights reserved. + * Author: Abdelatif Guettouche + * + * This file is a part of NuttX: + * + * Copyright (C) 2019 Gregory Nutt. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "pic32mz_oneshot.h" + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure describes the state of the oneshot lower-half driver */ + +struct pic32mz_oneshot_lowerhalf_s +{ + /* This is the part of the lower half driver that is visible to the upper- + * half client of the driver. This must be the first thing in this + * structure so that pointers to struct oneshot_lowerhalf_s are cast + * compatible to struct pic32mz_oneshot_lowerhalf_s and vice versa. + */ + + struct oneshot_lowerhalf_s lh; /* Common lower-half driver fields */ + + /* Private lower half data follows */ + + struct pic32mz_oneshot_s oneshot; /* PIC32MZ-specific oneshot state */ + oneshot_callback_t callback; /* Handler that receives callback */ + FAR void *arg; /* Argument passed to the handler */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void pic32mz_oneshot_handler(void *arg); + +static int pic32mz_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); +static int pic32mz_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts); +static int pic32mz_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* Lower half operations */ + +static const struct oneshot_operations_s g_oneshot_ops = +{ + .max_delay = pic32mz_max_delay, + .start = pic32mz_start, + .cancel = pic32mz_cancel, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: pic32mz_oneshot_handler + * + * Description: + * Timer expiration handler + * + * Input Parameters: + * arg Should be the same argument provided when pic32mz_oneshot_start() + * was called. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void pic32mz_oneshot_handler(void *arg) +{ + FAR struct pic32mz_oneshot_lowerhalf_s *priv = + (FAR struct pic32mz_oneshot_lowerhalf_s *)arg; + oneshot_callback_t callback; + FAR void *cbarg; + + DEBUGASSERT(priv != NULL); + + /* Perhaps the callback was nullified in a race condition with + * pic32mz_cancel? + */ + + if (priv->callback) + { + /* Sample and nullify BEFORE executing callback (in case the callback + * restarts the oneshot). + */ + + callback = priv->callback; + cbarg = priv->arg; + priv->callback = NULL; + priv->arg = NULL; + + /* Then perform the callback */ + + callback(&priv->lh, cbarg); + } +} + +/**************************************************************************** + * Name: pic32mz_max_delay + * + * Description: + * Determine the maximum delay of the one-shot timer (in microseconds) + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the maximum delay. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int pic32mz_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct pic32mz_oneshot_lowerhalf_s *priv = + (FAR struct pic32mz_oneshot_lowerhalf_s *)lower; + uint64_t usecs; + int ret; + + DEBUGASSERT(priv != NULL && ts != NULL); + + ret = pic32mz_oneshot_max_delay(&priv->oneshot, &usecs); + tmrinfo("max delay %lu\n", usecs); + + if (ret >= 0) + { + uint64_t sec = usecs / 1000000; + usecs -= 1000000 * sec; + + ts->tv_sec = (time_t)sec; + ts->tv_nsec = (long)(usecs * 1000); + } + + return ret; +} + +/**************************************************************************** + * Name: pic32mz_start + * + * Description: + * Start the oneshot timer + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * handler The function to call when when the oneshot timer expires. + * arg An opaque argument that will accompany the callback. + * ts Provides the duration of the one shot timer. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int pic32mz_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts) +{ + FAR struct pic32mz_oneshot_lowerhalf_s *priv = + (FAR struct pic32mz_oneshot_lowerhalf_s *)lower; + irqstate_t flags; + int ret; + + DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL); + + /* Save the callback information and start the timer */ + + flags = enter_critical_section(); + priv->callback = callback; + priv->arg = arg; + ret = pic32mz_oneshot_start(&priv->oneshot, + pic32mz_oneshot_handler, + priv, ts); + leave_critical_section(flags); + + if (ret < 0) + { + tmrerr("ERROR: pic32mz_oneshot_start failed: %d\n", flags); + } + + return ret; +} + +/**************************************************************************** + * Name: pic32mz_cancel + * + * Description: + * Cancel the oneshot timer and return the time remaining on the timer. + * + * NOTE: This function may execute at a high rate with no timer running (as + * when pre-emption is enabled and disabled). + * + * Input Parameters: + * lower Caller allocated instance of the oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the time remaining on the + * oneshot timer. A time of zero is returned if the timer is + * not running. + * + * Returned Value: + * Zero (OK) is returned on success. A call to up_timer_cancel() when + * the timer is not active should also return success; a negated errno + * value is returned on any failure. + * + ****************************************************************************/ + +static int pic32mz_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct pic32mz_oneshot_lowerhalf_s *priv = + (FAR struct pic32mz_oneshot_lowerhalf_s *)lower; + irqstate_t flags; + int ret; + + DEBUGASSERT(priv != NULL); + + /* Cancel the timer */ + + flags = enter_critical_section(); + ret = pic32mz_oneshot_cancel(&priv->oneshot, ts); + priv->callback = NULL; + priv->arg = NULL; + leave_critical_section(flags); + + if (ret < 0) + { + tmrerr("ERROR: pic32mz_oneshot_cancel failed: %d\n", flags); + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: oneshot_initialize + * + * Description: + * Initialize the oneshot timer and return a oneshot lower half driver + * instance. + * + * Input Parameters: + * chan Timer counter channel to be used. + * resolution The required resolution of the timer in units of + * microseconds. NOTE that the range is restricted to the + * range of uint16_t (excluding zero). + * + * Returned Value: + * On success, a non-NULL instance of the oneshot lower-half driver is + * returned. NULL is return on any failure. + * + ****************************************************************************/ + +FAR struct oneshot_lowerhalf_s *oneshot_initialize(int chan, + uint16_t resolution) +{ + FAR struct pic32mz_oneshot_lowerhalf_s *priv; + int ret; + + /* Allocate an instance of the lower half driver */ + + priv = (FAR struct pic32mz_oneshot_lowerhalf_s *) + kmm_zalloc(sizeof(struct pic32mz_oneshot_lowerhalf_s)); + + if (priv == NULL) + { + tmrerr("ERROR: Failed to initialized state structure\n"); + return NULL; + } + + /* Initialize the lower-half driver structure */ + + priv->lh.ops = &g_oneshot_ops; + + /* Initialize the contained PIC32MZ oneshot timer */ + + ret = pic32mz_oneshot_initialize(&priv->oneshot, chan, resolution); + if (ret < 0) + { + tmrerr("ERROR: pic32mz_oneshot_initialize failed: %d\n", ret); + kmm_free(priv); + return NULL; + } + + return &priv->lh; +} diff --git a/arch/mips/src/pic32mz/pic32mz-serial.c b/arch/mips/src/pic32mz/pic32mz_serial.c similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-serial.c rename to arch/mips/src/pic32mz/pic32mz_serial.c index a6e96a7f4b..92c9ebc1f3 100644 --- a/arch/mips/src/pic32mz/pic32mz-serial.c +++ b/arch/mips/src/pic32mz/pic32mz_serial.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/pic32mz-serial.c + * arch/mips/src/pic32mz/pic32mz_serial.c * * Copyright (C) 2015, 2017-2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -57,16 +57,17 @@ #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "pic32mz-config.h" -#include "hardware/pic32mz-uart.h" -#include "pic32mz-lowconsole.h" +#include "pic32mz_config.h" +#include "hardware/pic32mz_uart.h" +#include "pic32mz_lowconsole.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* If we are not using the serial driver for the console, then we still must * provide some minimal implementation of up_putc. */ @@ -558,7 +559,9 @@ static void up_restoreuartint(struct uart_dev_s *dev, uint8_t im) { irqstate_t flags; - /* Re-enable/re-disable interrupts corresponding to the state of bits in im */ + /* Re-enable/re-disable interrupts corresponding to the state of bits + * in im + */ flags = enter_critical_section(); up_rxint(dev, RX_ENABLED(im)); @@ -634,7 +637,7 @@ static void up_shutdown(struct uart_dev_s *dev) * Name: up_attach * * Description: - * Configure the UART to operation in interrupt driven mode. This method is + * Configure the UART to operation in interrupt driven mode. This method is * called when the serial port is opened. Normally, this is just after the * the setup() method is called, however, the serial console may operate in * a non-interrupt driven mode during the boot phase. @@ -674,7 +677,7 @@ static int up_attach(struct uart_dev_s *dev) * * Description: * Detach UART interrupts. This method is called when the serial port is - * closed normally just before the shutdown method is called. The exception + * closed normally just before the shutdown method is called. The exception * is the serial console which is never shutdown. * ****************************************************************************/ diff --git a/arch/mips/src/pic32mz/pic32mz-spi.c b/arch/mips/src/pic32mz/pic32mz_spi.c similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-spi.c rename to arch/mips/src/pic32mz/pic32mz_spi.c index f0e9e6376b..35e19544ae 100644 --- a/arch/mips/src/pic32mz/pic32mz-spi.c +++ b/arch/mips/src/pic32mz/pic32mz_spi.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/pic32mz-spi.c + * arch/mips/src/pic32mz/pic32mz_spi.c * * Copyright (C) 2015-2017, 2019 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -52,13 +52,13 @@ #include #include -#include "up_internal.h" -#include "up_arch.h" +#include "mips_internal.h" +#include "mips_arch.h" -#include "hardware/pic32mz-spi.h" -#include "hardware/pic32mz-pps.h" -#include "pic32mz-spi.h" -#include "pic32mz-dma.h" +#include "hardware/pic32mz_spi.h" +#include "hardware/pic32mz_pps.h" +#include "pic32mz_spi.h" +#include "pic32mz_dma.h" #ifdef CONFIG_PIC32MZ_SPI diff --git a/arch/mips/src/pic32mz/pic32mz-spi.h b/arch/mips/src/pic32mz/pic32mz_spi.h similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-spi.h rename to arch/mips/src/pic32mz/pic32mz_spi.h index 378e1756d9..3c70a3af7d 100644 --- a/arch/mips/src/pic32mz/pic32mz-spi.h +++ b/arch/mips/src/pic32mz/pic32mz_spi.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mz/pic32mz-spi.h + * arch/mips/src/pic32mz/pic32mz_spi.h * * Copyright (C) 2015, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/pic32mz/pic32mz-timer.c b/arch/mips/src/pic32mz/pic32mz_timer.c similarity index 98% rename from arch/mips/src/pic32mz/pic32mz-timer.c rename to arch/mips/src/pic32mz/pic32mz_timer.c index 3e2516812e..af6275513d 100644 --- a/arch/mips/src/pic32mz/pic32mz-timer.c +++ b/arch/mips/src/pic32mz/pic32mz_timer.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/chip/pic32mz-timer.c + * arch/mips/src/pic32mz/chip/pic32mz_timer.c * * Copyright (C) 2019 Abdelatif Guettouche. All rights reserved. * Author: Abdelatif Guettouche @@ -55,12 +55,12 @@ #include -#include "up_internal.h" -#include "up_arch.h" +#include "mips_internal.h" +#include "mips_arch.h" -#include "hardware/pic32mz-timer.h" -#include "pic32mz-timer.h" -#include "pic32mz-gpio.h" +#include "hardware/pic32mz_timer.h" +#include "pic32mz_timer.h" +#include "pic32mz_gpio.h" /**************************************************************************** * Pre-processor Definitions @@ -679,8 +679,8 @@ static void pic32mz_timer_stopinidle(FAR struct pic32mz_timer_dev_s *dev, if (pic32mz_timer_mode32(dev)) { pic32mz_putreg(dev, - pic32mz_timer_oddoffset(PIC32MZ_TIMER_CONCLR_OFFSET), - TIMER_CON_SIDL); + pic32mz_timer_oddoffset(PIC32MZ_TIMER_CONCLR_OFFSET), + TIMER_CON_SIDL); } } @@ -891,7 +891,7 @@ static uint32_t pic32mz_timer_getcounter(FAR struct pic32mz_timer_dev_s *dev) lsw = pic32mz_getreg(dev, PIC32MZ_TIMER_CNT_OFFSET); msw = pic32mz_getreg(dev, - pic32mz_timer_oddoffset(PIC32MZ_TIMER_CNT_OFFSET)); + pic32mz_timer_oddoffset(PIC32MZ_TIMER_CNT_OFFSET)); return lsw | (msw << 16); } diff --git a/arch/mips/src/pic32mz/pic32mz-timer.h b/arch/mips/src/pic32mz/pic32mz_timer.h similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-timer.h rename to arch/mips/src/pic32mz/pic32mz_timer.h index ddb4604b95..3aa5a09372 100644 --- a/arch/mips/src/pic32mz/pic32mz-timer.h +++ b/arch/mips/src/pic32mz/pic32mz_timer.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/chip/pic32mz-timer.h + * arch/mips/src/pic32mz/chip/pic32mz_timer.h * * Copyright (C) 2019 Abdelatif Guettouche. All rights reserved. * Author: Abdelatif Guettouche diff --git a/arch/mips/src/pic32mz/pic32mz-timer-lowerhalf.c b/arch/mips/src/pic32mz/pic32mz_timer_lowerhalf.c similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-timer-lowerhalf.c rename to arch/mips/src/pic32mz/pic32mz_timer_lowerhalf.c index 4fca045467..d8f5145743 100644 --- a/arch/mips/src/pic32mz/pic32mz-timer-lowerhalf.c +++ b/arch/mips/src/pic32mz/pic32mz_timer_lowerhalf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/mips/src/pic32mz/chip/pic32mz-timer-lowerhalf.c + * arch/mips/src/pic32mz/chip/pic32mz_timer-lowerhalf.c * * Copyright (C) 2019 Abdelatif Guettouche. All rights reserved. * Author: Abdelatif Guettouche @@ -56,7 +56,7 @@ #include -#include "pic32mz-timer.h" +#include "pic32mz_timer.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/mips/src/pic32mz/pic32mz-timerisr.c b/arch/mips/src/pic32mz/pic32mz_timerisr.c similarity index 97% rename from arch/mips/src/pic32mz/pic32mz-timerisr.c rename to arch/mips/src/pic32mz/pic32mz_timerisr.c index fbc32c7956..36c128cb63 100644 --- a/arch/mips/src/pic32mz/pic32mz-timerisr.c +++ b/arch/mips/src/pic32mz/pic32mz_timerisr.c @@ -47,17 +47,19 @@ #include #include "clock/clock.h" -#include "up_internal.h" -#include "up_arch.h" +#include "mips_internal.h" +#include "mips_arch.h" -#include "pic32mz-config.h" -#include "hardware/pic32mz-timer.h" -#include "hardware/pic32mz-int.h" +#include "pic32mz_config.h" +#include "hardware/pic32mz_timer.h" +#include "hardware/pic32mz_int.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Timer Setup **************************************************************/ + /* Timer 1 is a type A timer. Setting the TCS bit in the timer control * register will select the SOSC as the clock source. Otherwise, PBCLK3 * is the clock source. diff --git a/arch/mips/src/pic32mz/pic32mz-usbdev.h b/arch/mips/src/pic32mz/pic32mz_usbdev.h similarity index 99% rename from arch/mips/src/pic32mz/pic32mz-usbdev.h rename to arch/mips/src/pic32mz/pic32mz_usbdev.h index 575f5498c6..eb2b3b1c2c 100644 --- a/arch/mips/src/pic32mz/pic32mz-usbdev.h +++ b/arch/mips/src/pic32mz/pic32mz_usbdev.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/mips/src/pic32mz/pic32mz-usbdev.h + * arch/mips/src/pic32mz/pic32mz_usbdev.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/boards/mips/pic32mx/mirtoo/README.txt b/boards/mips/pic32mx/mirtoo/README.txt index 8704948e44..ef78ccd9e8 100644 --- a/boards/mips/pic32mx/mirtoo/README.txt +++ b/boards/mips/pic32mx/mirtoo/README.txt @@ -627,7 +627,7 @@ Analog Input and ADC driver that can be used with standard open, close, read, and write interfaces. To complete this driver, the following is needed: - (1) arch/mips/src/pic32mx/pic32mx-adc.c. The ADC driver that implements + (1) arch/mips/src/pic32mx/pic32mx_adc.c. The ADC driver that implements the ADC interfaces defined in include/nuttx/analog/adc.h and must be built when CONFIG_PIC32MX_ADC is defined. diff --git a/boards/mips/pic32mx/mirtoo/src/pic32_boot.c b/boards/mips/pic32mx/mirtoo/src/pic32_boot.c index 7acf2a9198..98bc939bde 100644 --- a/boards/mips/pic32mx/mirtoo/src/pic32_boot.c +++ b/boards/mips/pic32mx/mirtoo/src/pic32_boot.c @@ -43,11 +43,11 @@ #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" #include "pic32mx.h" -#include "pic32mx-pps.h" +#include "pic32mx_pps.h" #include "mirtoo.h" /**************************************************************************** diff --git a/boards/mips/pic32mx/mirtoo/src/pic32_spi2.c b/boards/mips/pic32mx/mirtoo/src/pic32_spi2.c index 25ebcd9e86..dbdc49ac6b 100644 --- a/boards/mips/pic32mx/mirtoo/src/pic32_spi2.c +++ b/boards/mips/pic32mx/mirtoo/src/pic32_spi2.c @@ -46,10 +46,10 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" #include "chip.h" #include "pic32mx.h" -#include "pic32mx-pps.h" +#include "pic32mx_pps.h" #include "mirtoo.h" #ifdef CONFIG_PIC32MX_SPI2 diff --git a/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_boot.c b/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_boot.c index 9bed1f77df..b941f827af 100644 --- a/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_boot.c +++ b/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_boot.c @@ -43,8 +43,8 @@ #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" #include "pic32mx.h" #include "pic32mx-starterkit.h" diff --git a/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_leds.c b/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_leds.c index 13630364c6..6ed21cda02 100644 --- a/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_leds.c +++ b/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_leds.c @@ -47,11 +47,11 @@ #include #include "chip.h" -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" #include "pic32mx.h" -#include "pic32mx-ioport.h" +#include "pic32mx_ioport.h" #include "pic32mx-starterkit.h" /**************************************************************************** diff --git a/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_spi.c b/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_spi.c index d6ff36a778..5da1edd30b 100644 --- a/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_spi.c +++ b/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_spi.c @@ -46,7 +46,7 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" #include "chip.h" #include "pic32mx.h" #include "pic32mx-starterkit.h" diff --git a/boards/mips/pic32mx/pic32mx7mmb/README.txt b/boards/mips/pic32mx/pic32mx7mmb/README.txt index 76f325c1c4..650ec778a2 100644 --- a/boards/mips/pic32mx/pic32mx7mmb/README.txt +++ b/boards/mips/pic32mx/pic32mx7mmb/README.txt @@ -237,7 +237,7 @@ Toolchains $ find . -name xc32-* ./mirtoo/scripts/xc32-debug.ld ./mirtoo/scripts/xc32-release.ld - ./pic32mz-starterkit/scripts/xc32-debug.ld + ./pic32mz_starterkit/scripts/xc32-debug.ld Windows Native Toolchains ------------------------- diff --git a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_boot.c b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_boot.c index 87c65411c5..7e37b2c8d6 100644 --- a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_boot.c +++ b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_boot.c @@ -43,8 +43,8 @@ #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" #include "pic32mx.h" #include "pic32mx7mmb.h" @@ -87,8 +87,8 @@ void pic32mx_boardinitialize(void) } #endif -/* Initialize the LCD. The LCD initialization function should be called early - * in the boot sequence -- even if the LCD is not enabled. +/* Initialize the LCD. The LCD initialization function should be called + * early in the boot sequence -- even if the LCD is not enabled. * In that case we should at a minimum at least disable the LCD backlight. */ @@ -108,10 +108,11 @@ void pic32mx_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be - * called immediately after up_initialize() is called and just before the - * initial application is started. This additional initialization phase - * may be used, for example, to initialize board-specific device drivers. + * function called board_late_initialize(). board_late_initialize() will + * be called immediately after up_initialize() is called and just before + * the initial application is started. This additional initialization + * phae may be used, for example, to initialize board-specific device + * drivers. * ****************************************************************************/ diff --git a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_mio283qt2.c b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_mio283qt2.c index c1a3d88a45..21b97584b5 100644 --- a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_mio283qt2.c +++ b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_mio283qt2.c @@ -56,9 +56,9 @@ #include -#include "up_arch.h" +#include "mips_arch.h" #include "pic32mx.h" -#include "pic32mx-pmp.h" +#include "pic32mx_pmp.h" #include "pic32mx7mmb.h" /**************************************************************************** @@ -159,7 +159,9 @@ static void pic32mx_backlight(FAR struct mio283qt2_lcd_s *dev, int power); * Private Data ****************************************************************************/ -/* This is the driver state structure (there is no retained state information) */ +/* This is the driver state structure (there is no retained state + * information) + */ static struct pic32mx7mmb_dev_s g_pic32mx7mmb_lcd = { @@ -394,7 +396,7 @@ static void pic32mx_backlight(FAR struct mio283qt2_lcd_s *dev, int power) * Name: board_lcd_initialize * * Description: - * Initialize the LCD video hardware. The initial state of the LCD is fully + * Initialize the LCD video hardware. The initial state of the LCD is fully * initialized, display memory cleared, and the LCD ready to use, but with * the power setting at 0 (full off). * @@ -449,7 +451,8 @@ int board_lcd_initialize(void) /* Configure and enable the LCD */ up_mdelay(50); - g_pic32mx7mmb_lcd.drvr = mio283qt2_lcdinitialize(&g_pic32mx7mmb_lcd.dev); + g_pic32mx7mmb_lcd.drvr = + mio283qt2_lcdinitialize(&g_pic32mx7mmb_lcd.dev); if (!g_pic32mx7mmb_lcd.drvr) { lcderr("ERROR: mio283qt2_lcdinitialize failed\n"); diff --git a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_spi.c b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_spi.c index 9ef7f2df65..7ed62ca845 100644 --- a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_spi.c +++ b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_spi.c @@ -46,7 +46,7 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" #include "chip.h" #include "pic32mx.h" #include "pic32mx7mmb.h" @@ -60,16 +60,16 @@ /* SPI1 and SD Card * - * ------ -------- ------------------------- -------------------------------- - * GPIO SIGNAL BOARD CONNECTION NOTES - * ------ -------- ------------------------- -------------------------------- - * RC4 SPI1 SD card slot SPI1 data IN - * RD0 SPO1 SD card slot SPI1 data OUT - * RD10 SCK1 SD card slot SD card, SPI clock + * ------ -------- -------------------- -------------------------------- + * GPIO SIGNAL BOARD CONNECTION NOTES + * ------ -------- -------------------- -------------------------------- + * RC4 SPI1 SD card slot SPI1 data IN + * RD0 SPO1 SD card slot SPI1 data OUT + * RD10 SCK1 SD card slot SD card, SPI clock * - * RA9 SD_CS# SD card slot SD card, SPI chip select (active low) - * RG6 SD_WP SD card slot SD card, write protect - * RG7 SD_CD# SD card slot SD card, card detect (not) + * RA9 SD_CS# SD card slot SD card, SPI chip select (active low) + * RG6 SD_WP SD card slot SD card, write protect + * RG7 SD_CD# SD card slot SD card, card detect (not) */ #define GPIO_SD_CS (GPIO_OUTPUT|GPIO_VALUE_ONE|GPIO_PORTA|GPIO_PIN9) @@ -170,6 +170,7 @@ uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) spiinfo("Returning %02x\n", ret); return ret; } + #ifdef CONFIG_SPI_CMDDATA int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { diff --git a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c index 115b783ff2..2f227ed110 100644 --- a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c +++ b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c @@ -55,12 +55,12 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" #include "pic32mx.h" -#include "pic32mx-adc.h" -#include "pic32mx-ioport.h" +#include "pic32mx_adc.h" +#include "pic32mx_ioport.h" #include "pic32mx7mmb.h" #ifdef CONFIG_INPUT @@ -135,7 +135,9 @@ #define LCD_YMINUS_BIT (1 << LCD_YMINUS_PIN) #define LCD_ALL_BITS (LCD_XPLUS_BIT | LCD_YPLUS_BIT | LCD_XMINUS_BIT | LCD_YMINUS_BIT) -/* Conversions are performed as 10-bit samples represented as 16-bit unsigned integers: */ +/* Conversions are performed as 10-bit samples represented as 16-bit + * unsigned integers: + */ #define MAX_ADC (1023) @@ -495,8 +497,8 @@ static void tc_notify(FAR struct tc_dev_s *priv) if (priv->nwaiters > 0) { - /* After posting this semaphore, we need to exit because the touchscreen - * is no longer available. + /* After posting this semaphore, we need to exit because the + * touchscreen is no longer available. */ nxsem_post(&priv->waitsem); @@ -610,7 +612,7 @@ static int tc_waitsample(FAR struct tc_dev_s *priv, } /* Re-acquire the semaphore that manages mutually exclusive access to - * the device structure. We may have to wait here. But we have our sample. + * the device structure. We may have to wait here. But we have our sample. * Interrupts and pre-emption will be re-enabled while we wait. */ diff --git a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_autoleds.c b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_autoleds.c index 7c2426b29c..241ad64cff 100644 --- a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_autoleds.c +++ b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_autoleds.c @@ -47,11 +47,11 @@ #include #include "chip.h" -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" #include "pic32mx.h" -#include "pic32mx-ioport.h" +#include "pic32mx_ioport.h" #include "sure-pic32mx.h" #ifdef CONFIG_ARCH_LEDS diff --git a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_boot.c b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_boot.c index b435ea7ea3..8f54f7c0d1 100644 --- a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_boot.c +++ b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_boot.c @@ -43,8 +43,8 @@ #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" #include "pic32mx.h" #include "sure-pic32mx.h" diff --git a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_buttons.c b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_buttons.c index f9a0ecf0a9..d217cb798f 100644 --- a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_buttons.c +++ b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_buttons.c @@ -48,11 +48,11 @@ #include #include "chip.h" -#include "up_arch.h" +#include "mips_arch.h" #include "pic32mx.h" -#include "pic32mx-ioport.h" -#include "pic32mx-adc.h" +#include "pic32mx_ioport.h" +#include "pic32mx_adc.h" #include "sure-pic32mx.h" #ifdef CONFIG_ARCH_BUTTONS diff --git a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c index f814f747dd..67c6dc9cf2 100644 --- a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c +++ b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c @@ -88,9 +88,9 @@ #include #include -#include "up_arch.h" -#include "pic32mx-ioport.h" -#include "pic32mx-int.h" +#include "mips_arch.h" +#include "pic32mx_ioport.h" +#include "pic32mx_int.h" #include "pic32mx.h" #include "sure-pic32mx.h" diff --git a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_spi.c b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_spi.c index f1b44584cc..393bec7d99 100644 --- a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_spi.c +++ b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_spi.c @@ -46,7 +46,7 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" #include "chip.h" #include "pic32mx.h" #include "sure-pic32mx.h" diff --git a/boards/mips/pic32mx/ubw32/src/pic32_boot.c b/boards/mips/pic32mx/ubw32/src/pic32_boot.c index 7ac4fc7f1c..227f826826 100644 --- a/boards/mips/pic32mx/ubw32/src/pic32_boot.c +++ b/boards/mips/pic32mx/ubw32/src/pic32_boot.c @@ -43,8 +43,8 @@ #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" #include "pic32mx.h" #include "ubw32.h" @@ -74,7 +74,8 @@ void pic32mx_boardinitialize(void) { /* Configure SPI chip selects if 1) at least one SPI is enabled, and 2) the - * weak function pic32mx_spidev_initialize() has been brought into the link. + * weak function pic32mx_spidev_initialize() has been brought into the + * link. */ #if defined(CONFIG_PIC32MX_SPI1) || defined(CONFIG_PIC32MX_SPI2) diff --git a/boards/mips/pic32mx/ubw32/src/pic32_buttons.c b/boards/mips/pic32mx/ubw32/src/pic32_buttons.c index 845c119fab..4e3b2f5ba1 100644 --- a/boards/mips/pic32mx/ubw32/src/pic32_buttons.c +++ b/boards/mips/pic32mx/ubw32/src/pic32_buttons.c @@ -48,7 +48,7 @@ #include #include "chip.h" -#include "up_arch.h" +#include "mips_arch.h" #include "pic32mx.h" #include "ubw32.h" @@ -111,8 +111,8 @@ static const uint8_t g_buttoncn[NUM_BUTTONS] = * * Description: * board_button_initialize() must be called to initialize button resources. - * After that, board_buttons() may be called to collect the current state of - * all buttons or board_button_irq() may be called to register button + * After that, board_buttons() may be called to collect the current state + * of all buttons or board_button_irq() may be called to register button * interrupt handlers. * ****************************************************************************/ @@ -156,18 +156,18 @@ uint32_t board_buttons(void) * * Description: * board_button_initialize() must be called to initialize button resources. - * After that, board_buttons() may be called to collect the current state of - * all buttons or board_button_irq() may be called to register button + * After that, board_buttons() may be called to collect the current state + * of all buttons or board_button_irq() may be called to register button * interrupt handlers. * * After board_button_initialize() has been called, board_buttons() may be * called to collect the state of all buttons. board_buttons() returns an * 32-bit bit set with each bit associated with a button. - * See the BUTTON_*_BIT definitions in board.h for the meaning of each bit. + * See the BUTTON_*_BIT definitions in board.h for the meaning of each bit. * * board_button_irq() may be called to register an interrupt handler that - * will be called when a button is depressed or released. The ID value is a - * button enumeration value that uniquely identifies a button resource. + * will be called when a button is depressed or released. The ID value is + * a button enumeration value that uniquely identifies a button resource. * See the BUTTON_* definitions in board.h for the meaning of enumeration * value. * diff --git a/boards/mips/pic32mx/ubw32/src/pic32_leds.c b/boards/mips/pic32mx/ubw32/src/pic32_leds.c index 9d0819ae3e..c446883205 100644 --- a/boards/mips/pic32mx/ubw32/src/pic32_leds.c +++ b/boards/mips/pic32mx/ubw32/src/pic32_leds.c @@ -47,8 +47,8 @@ #include #include "chip.h" -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" #include "pic32mx.h" #include "ubw32.h" diff --git a/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_autoleds.c b/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_autoleds.c index 4a96f39e3e..a1cf675920 100644 --- a/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_autoleds.c +++ b/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_autoleds.c @@ -46,10 +46,10 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "pic32mz-gpio.h" +#include "pic32mz_gpio.h" #include "flipnclick-pic32mz.h" #ifdef CONFIG_ARCH_LEDS diff --git a/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_buttons.c b/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_buttons.c index 45c27406ef..93e08b0da9 100644 --- a/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_buttons.c +++ b/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_buttons.c @@ -46,7 +46,7 @@ #include #include -#include "pic32mz-gpio.h" +#include "pic32mz_gpio.h" #include "flipnclick-pic32mz.h" #ifdef CONFIG_ARCH_BUTTONS diff --git a/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_spi.c b/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_spi.c index 711d93430d..05721111fb 100644 --- a/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_spi.c +++ b/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_spi.c @@ -47,8 +47,8 @@ #include -#include "up_arch.h" -#include "pic32mz-gpio.h" +#include "mips_arch.h" +#include "pic32mz_gpio.h" #include "flipnclick-pic32mz.h" diff --git a/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_ssd1306.c b/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_ssd1306.c index ff1ea39bf1..2f18112f18 100644 --- a/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_ssd1306.c +++ b/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_ssd1306.c @@ -67,8 +67,8 @@ # include #endif -#include "pic32mz-gpio.h" -#include "pic32mz-spi.h" +#include "pic32mz_gpio.h" +#include "pic32mz_spi.h" #include "flipnclick-pic32mz.h" diff --git a/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_userleds.c b/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_userleds.c index 0bebb3e68f..edfdef0f23 100644 --- a/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_userleds.c +++ b/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_userleds.c @@ -60,10 +60,10 @@ #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "pic32mz-gpio.h" +#include "pic32mz_gpio.h" #include "flipnclick-pic32mz.h" #ifndef CONFIG_ARCH_LEDS diff --git a/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_autoleds.c b/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_autoleds.c index afd94cdad5..ec3a9dcd52 100644 --- a/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_autoleds.c +++ b/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_autoleds.c @@ -46,10 +46,10 @@ #include #include -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "pic32mz-gpio.h" +#include "pic32mz_gpio.h" #include "pic32mz-starterkit.h" #ifdef CONFIG_ARCH_LEDS diff --git a/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_buttons.c b/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_buttons.c index a2e7619d19..04113b275a 100644 --- a/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_buttons.c +++ b/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_buttons.c @@ -46,7 +46,7 @@ #include #include -#include "pic32mz-gpio.h" +#include "pic32mz_gpio.h" #include "pic32mz-starterkit.h" #ifdef CONFIG_ARCH_BUTTONS diff --git a/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_spi.c b/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_spi.c index 22fc336eab..9f59276842 100644 --- a/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_spi.c +++ b/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_spi.c @@ -46,7 +46,7 @@ #include #include -#include "up_arch.h" +#include "mips_arch.h" #include "pic32mz-starterkit.h" diff --git a/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_userleds.c b/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_userleds.c index 34ddba7450..b3d8375436 100644 --- a/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_userleds.c +++ b/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_userleds.c @@ -46,10 +46,10 @@ #include #include "chip.h" -#include "up_arch.h" -#include "up_internal.h" +#include "mips_arch.h" +#include "mips_internal.h" -#include "pic32mz-gpio.h" +#include "pic32mz_gpio.h" #include "pic32mz-starterkit.h" #ifndef CONFIG_ARCH_LEDS