Gregory Nutt
732bef73a7
include/net/if.h: Fix some macro definitions overlooked in commit d105dc9b5e
. Also corrects the name of a structure: mii_ioctl_notify_s vs mii_iotcl_notify_s.
2019-01-27 16:43:42 -06:00
Gregory Nutt
2992660420
arch/arm/src/imxrt: Fix another newly introduced compilarsion error due to missing inclusion of nuttx/fs/ioctl.h. I think this is a side-effect of removing arch/serial.h which probably provided a sneak inclusion path for nuttx/fs/ioctl.h. We will just have to fix them one at a time as they pop-up in build testing.
2019-01-27 13:25:58 -06:00
Xiang Xiao
d105dc9b5e
drivers/net/phy_notify.c and all network drivers that support PHY notifications: Support the signal notification through SIGEV_THREAD
2019-01-27 08:57:23 -06:00
Xiang Xiao
818d8dda1e
Remove empty seria.h and all references
2019-01-26 15:08:14 -06:00
Gregory Nutt
df64811269
up_initialize(): As noted by Roland Takacs in Bitbucket issue 141, there is a compilation error for STM32 if CONFIG_NET and CONFIG_NETDEV_LATEINIT are selected. That was due in part to commit 19e16cb
which extended up_netinitialize() with a !defined(CONFIG_NETDEV_LATEINIT) guard but did not add the guard to concrete implementations. I say "in part" because I don't think that the original intent of commit 19e16cb
was to enable an alternative initialization of MCU internal Ethernet support but rather to enable support of external Ethernet devices that may have dependencies on, for example, SPI. However, this is still a proper fix to avoid the compilation error that can occur with this combination of configuration options.
2019-01-25 07:21:03 -06:00
David Sidrane
64921a9c57
arch/arm/src/imxrt/imxrt_usdhc.c: Eliminate a warning
2019-01-16 18:15:01 -06:00
David Sidrane
2f1678b7be
arch/arm/src/imxrt/imxrt_periphclks.h: Ensure C++ compatibility.
2019-01-16 18:12:56 -06:00
David Sidrane
8b9014bc1d
arch/arm/src/imxrt/chip/imxrt_adc.h: Fix a typo
2019-01-16 18:11:25 -06:00
David Sidrane
026feadbe3
arch/arm/src/imxrt/imxrt_lpi2c.c: I2C Reset rework
2019-01-16 18:10:13 -06:00
David Sidrane
dbd9172e57
arch/arm/src/imxrt/Make.defs: Include up_systemreset and up_stackcheck.c
2019-01-16 18:08:24 -06:00
David Sidrane
fe4ee29833
arch/arm/src/imxrt/imxrt_lpspi.c: Removed unused clock, that borked he build
2019-01-16 18:06:28 -06:00
Gregory Nutt
fee4432584
arch/arm/src/imxrt/imxrt_usdhc.c: Remove daisy selection hack
2019-01-16 18:04:51 -06:00
David Sidrane
d6fa328d27
arch/arm/src/imxrt: ADD GPIO Support Input daisy selection
2019-01-16 18:03:10 -06:00
David Sidrane
042f057463
arch/arm/src/imxrt/imxrt_usdhc.c and related board.h files: Use single define for USB pin definitions.
2019-01-16 17:49:12 -06:00
David Sidrane
b8bc611676
arch/arm/src/imxrt/imxrt_usdhc.c: Eliminate warnings.
2019-01-16 17:46:08 -06:00
David Sidrane
c38a5af732
arch/arm/src/imxrt/imxrt_serial.c: Support independent input and output flow control.
2019-01-16 17:44:39 -06:00
David Sidrane
c44c30784c
arch/arm/src/imxrt/imxrt_serial.c: Fix TTYS0 defined definitions of higher numbered ports
2019-01-16 17:33:23 -06:00
David Sidrane
178ed12903
arch/arm/src/imxrt/chip/imxrt_flexpwm.h: Correct duplicated definitions
2019-01-16 17:30:32 -06:00
David Sidrane
24db683368
arch/arm/src/imxrt/chip/imxrt106x_pinmux.h: Add FLEXCAN3 to pinmux
2018-12-28 15:08:20 -06:00
Gregory Nutt
6fad6607bf
arch/arm/src: Masayuki Ishikawa's change to go_os_start() should be applied to all MCU-specific start-up functions that support go_os_start().
2018-12-25 08:14:55 -06:00
Ouss4
5de4fef4f2
arch/arm/src: In most I2C drivers, correct upper index value in I2C trace dump. Eliminates the extra NONE event from the trace dump output.
2018-12-08 12:49:58 -06:00
Gregory Nutt
5832c150d7
arch/arc/src: Remove all driver-specific logic to set the interrupt priority. There is no good reason to change the interrupt priority unless you just want to debug a difficult problem. OR is you want to use high priority interrupts. In that case the specific interrupt priorities will need to be set by board-specific logic.
2018-12-06 13:34:41 -06:00
Dave Marples
d0cda60442
In the current implementation we only use very high priority interrupts (levels 0, 0x10 and 0x20 in CORTEX-M speak) but that means there are loads of lower priority ones that are effectively unused. I have *not* changed the semantics of these levels but have 'shifted' them to be based around the midpoint of the available interrupts (0x80) rather than at the top end....that allows for interrupts to be defined above (or, indeed, below) them as needed by the application. This should have no functional effect on existing code but adds in a clean capability to define higher priority interrupts.
2018-12-03 17:41:59 -06:00
Gregory Nutt
7a45fc6f1c
arch/arm/src/max326xx: Add framework for MAX326XX standard DMA support.
2018-11-20 08:09:03 -06:00
David Sidrane
e73228395f
Merged in david_s5/nuttx/master_imxrt_headers (pull request #763 )
...
imxrt:Add ADC chip header
Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-20 00:24:58 +00:00
Gregory Nutt
be1567d924
Trivial changes from review or last PR.
2018-11-15 15:08:02 -06:00
David Sidrane
2a13f13c0f
Merged in david_s5/nuttx/master_imxrt_headers (pull request #761 )
...
imxrt:Add FLEXPWM
Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-15 21:02:38 +00:00
David Sidrane
c6db972702
- imxrt: Add PIT, GPT, and QIMER(TMR) header files
...
Squashed commit of the following:
imxrt: Add QTIMER(TMR)
imxrt: Add GPT
imxrt: Add PIT
2018-11-13 16:34:59 -06:00
Dave Marples
9b68efe251
arch/arm/src/imxrt/imxrt_usdhc.c: Improve SD card handling in the DMA case. For now I think we can consider this complete for both Interrupt and DMA transfers. There is other stuff to add (high speed, low voltage, DDR etc.) later,
2018-11-13 06:41:27 -06:00
Dave Marples
50a1b9eddf
arch/arm/src/imxrt: This commit complete the interrupt driven USDHC1 functionality for the IMXRT EVKB. There is more work to be done to complete DMA mode and further changes will follow.
2018-11-12 13:47:44 -06:00
David Sidrane
f6e21619e2
Merged in david_s5/nuttx/master_imxrt_boards (pull request #751 )
...
imxrt:Clock config fixes and board.h sets sources and divisors
* imxrt:clockconfig bug fix & Board config set clocks
Fixed logic that was not clearing bits as ~ was
mising in &= mask operations.
Use valuse from the board.h file so set the Mux that
selects the clock sources.
Use board defined PODF values to select clock.
Only configure USDHC2 clocks when board defines clocks.
* imxrt1050-evk:Board setting used to set LSPI and USDHC Clocks
Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-09 00:52:50 +00:00
Gregory Nutt
e640635c41
arch/arm/src/imxrt/imxrt_gpioirq.c: Fix some inconsistent spacing and indentation noted in review of previous commit.
2018-11-06 16:51:46 -06:00
David Sidrane
a0745bbef6
Merged in david_s5/nuttx/master_imxrt (pull request #748 )
...
Adding imxrt 106x
* imxrt:Fix comment in imxrt105x_memorymap
* imxrt:Add imxrt1060 memory map
* imxrt:Add imcrt106x to imxrt_memorymap
* imxrt:Add i.MX RT 106x to Kconfig
* imxrt:Moved IMXRT_GPIO_NPORTS to chip.h & fixed comments
* imxrt:105x IRQ fix comment
* imxrt:gpioirq GPIO4,5 using wrong boundry
* imxrt:Add RT106x irq headers & Kconfig
* imxrt:Add rt106x GPIO chip headers
* imxrt:Extend Number of GPIO ports
* imxrt:Add 106x DMAMUX header
* imxrt:iomuxc add 106x
* imxrt:106x iomuxc extend Indexes
* imxrt:pinmux Add 106x
* imxrt:clockconfig use imxrt_memorymap.h
* imxrt:allocateheap use OCRAM2 as BASE when avaialbe
Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-06 22:47:20 +00:00
Dave Marples
ae054b93bb
arch/arm/src/imxrt/imxrt_usdhc.c: Initial commit of the i.MXRT SDHC driver. This driver is partially functional, working in PIO mode. DMA support and additional testing are needed.
2018-11-01 06:26:51 -06:00
Gregory Nutt
6d93658ff8
Add new configuratin CONFIG_NET_MCASTGROUP. This option is selected automatically if either CONFIG_NET_IGMP or CONFIG_NET_MLD are selected. Most conditional logic based on CONFIG_NET_IGMP replaced with conditioning on CONFIG_NET_MCASTGROUP.
2018-10-31 15:03:51 -06:00
Gregory Nutt
a3c67df91d
arch/arm/src/imxrt: Add full support for the LPSPI in poll mode; includes a minor fix for LPI2C.
2018-10-31 12:50:05 -06:00
David Sidrane
92e4a7223c
Merged in david_s5/nuttx/master_imxrt (pull request #737 )
...
Master imxrt
* imxrt:Fix typos bit# and names
* imxrt:wdog Registers are 16 Bits
* imxrt:wdog Update has to be within 255 clocks of unlock
* imxrt:clockconfig Fix comments
* imxrt1050-evk:board.h Fix comments
* imxrt:imxrt_ccm.h Define Mux Selects for board.h use
* imxrt:clockconfig Allow better control from board.h
1) Allows a board config clock setting to be defined
in terms of the /n values shown in Figure 18-2.
Clock Tree of the i.MX RT1050 Processor Reference
Manual, Rev. 1, 03/2018
2) Allows the clock multipelx selection to be made in
The board config.
* imxrt1050-evk:Define board clocking based on divisor and muxes
Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-23 22:54:28 +00:00
Ivan Ucherdzhiev
42f1f8898b
/arch/arm/src/imxrt/imxrt_lpi2c.c: Fixes 2 bugs in the for IMXRT1050: (1) I2C time out and did not send STOP condition when sending single byte, (2) I2C could not receive bytes after repeated start.
2018-10-13 06:38:33 -06:00
Dave Marples
91eb792e56
Corrections for the i.MXRT Ethernet:
...
(1) Now the Ethernet is completely re-initialized when an error occurs by means of taking the interface down and back up but the PHY is _not_ renegotiated for that case because that is very time consuming and an error in the Ethernet is no reflection on the state of the PHY anyway.
(2) Explicitly sets the expected PHY address to zero (this could be moved into the config) rather than searching for it which takes ages, and it's zero anyway for this board (that's the broadcast address, and anything that cannot respond on that has multiple PHYs, so that would be a new board).
(3) Allows for the renegotiation of the PHY to be optional when a reset is needed. If a non-renegotiated reset doesn't result in good comms to the PHY then it'll automatically be escalated to a renegotiated one.
(4) Only performs a reset for errors that need it (the CRITICAL_ERROR define). The list of errors that need reset are somewhat arbitrarily chosen based on my prejudices and might need to be revisited, but certainly the jabber errors don't need reset, the partial packet is thrown away by the layer above anyway.
(5) Re-loads the multicast table on reset.
(6) Adds a bit more logging into the imxrt Ethernet module.
2018-09-28 07:25:48 -06:00
Dave Marples
4eb118afd1
arch/arm/src/imxrt/imxrt_enet.c: Fix a race condition in setting up the Ethernet Tx transfer.
2018-09-26 10:59:47 -06:00
Ivan Ucherdzhiev
910e7a3899
arch/arm/src/imxrt/imxrt_lpsrtc.c: SVNC LPCR register bits 0 & 1 are NOT reserved and are, in fact, needed to enabled the SRTC. Now the SRTC is working.
2018-09-26 10:13:20 -06:00
Ivan Ucherdzhiev
955527b14f
arch/arm/src/imxrt: Add LPI2C driver.
2018-09-26 07:57:45 -06:00
Dave Marples
681609ad51
arch/arm/src/imxrt/imxrt_enet.c: The board would not come up if I ran Nuttx from cold. I dumped the PHY registers to see what the differences were and the PHY was coming up in NANDTree mode. This is a mode for testing connectivity between the PHY and the MAC. Switching this mode off in the PHY registers has fixed the problem.
2018-09-25 06:52:07 -06:00
Gregory Nutt
510b0f7e07
arch/arm/src: Correct all ARMv7-M architectures. Interrupts were not be disabled correctly on power up. Writing zero to the NVIC SET-ENABLE registers has no effect. In order to disable interrupts, it is necessary to write all ones to the NVIC CLEAR-ENABLE register. Noted by David Sidrane.
2018-09-21 21:32:50 -06:00
Gregory Nutt
f8bfbd58c5
arch/arm/src/armv7-m/up_trigger_irq.c: Add logic to trigger ARMv7-M interrupts and exceptions.
2018-08-25 10:23:21 -06:00
Gregory Nutt
9bc951a335
Rename devif_loopback_out to devi_loopback
2018-08-25 08:33:21 -06:00
Xiang Xiao
0074afa0ac
net/netdev: add devif_loopback_out() to check the loopback case where a packet is being sent to itself. Modify the net driver to call this function in this case. This function will simply re-inject the packet back into the network and the network driver will not put anything on the wire.
2018-08-24 09:21:33 -06:00
Xiang Xiao
e1202d2ed3
Replace all ASSERT with DEBUGASSERT to save the code space
2018-08-24 06:58:30 -06:00
Gregory Nutt
bfc8f9dfdb
arch/arm/src/imxrt/imxrt_enet.c: Fix a warning about imxrt_calcethcrc() being defined, but not used.
2018-08-03 10:53:37 -06:00
Jake Choy
bf2a61b8cf
I finally got the CRC32 to work properly after the FAE pointed me in the right direction. Here is a patch for the enet driver:
...
- Added CRC32 functions for multicast address filtering.
- Do not reset PHY settings when doing an ifup
- Use chip's unique id as the device MAC
- Enable discard enet frames with errors at PHY layer
2018-07-26 08:31:40 -06:00