summaryrefslogtreecommitdiff
path: root/drivers/serial/serial_mxc.c
AgeCommit message (Collapse)AuthorFilesLines
2023-01-31serial: mxc: Speed-up character transmissionLoic Poulain1-4/+4
Instead of waiting for empty FIFO condition before writing a character, wait for non-full FIFO condition. This helps in saving several tens of milliseconds during boot (depending verbosity). Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Tested-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Pali Rohár <pali@kernel.org> Reviewed-by: Fabio Estevam <festevam@denx.de> Tested-by: Fabio Estevam <festevam@denx.de>
2023-01-31serial: mxc: Wait for TX completion before resetLoic Poulain1-1/+25
The u-boot console may show some corrupted characters when printing in board_init() due to reset or baudrate change of the UART (probe) before the TX FIFO has been completely drained. To fix this issue, and in case UART is still running, we now try to flush the FIFO before proceeding to UART reinitialization. For this we're waiting for Transmitter Complete bit, indicating that the FIFO and the shift register are empty. flushing has a 4ms timeout guard, which is normally more than enough to consume the FIFO @ low baudrate (9600bps). Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Tested-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Pali Rohár <pali@kernel.org> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-12-23global: Migrate CONFIG_MXC_UART_BASE to CFGTom Rini1-3/+3
Perform a simple rename of CONFIG_MXC_UART_BASE to CFG_MXC_UART_BASE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-11-12Revert "serial: mxc: have putc use the TXFIFO"Fabio Estevam1-1/+1
This reverts commit c7878a0483c59c48a730123bc0f4659fd40921bf. Since commit c7878a0483c5 ("serial: mxc: have putc use the TXFIFO"), serial console corruption can be seen when priting inside board_init(). Revert it to avoid the regression. Reported-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Fabio Estevam <festevam@denx.de> Acked-by: Tim Harvey <tharvey@gateworks.com>
2022-09-19Merge branch 'master' into nextTom Rini1-1/+14
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-09-18serial: mxc: have putc use the TXFIFOJohannes Schneider1-1/+1
only waiting for TXEMPTY leads to corrupted messages going over the wire - which is fixed by making use of the FIFO this change is following the linux kernel uart driver (drivers/tty/serial/imx.c), which also checks UTS_TXFULL instead of UTS_TXEMPTY Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-09-18serial: mxc: enable the RX pipelineJohannes Schneider1-0/+13
on imx8(mm) the RXDMUXSEL needs to be set for data going over the wire (as observable on a connected 'scope) to actually make it into the RXFIFO the reference manual is not overly clear about this, and only mentiones that "UCR3_RXDMUXSEL should always be set." - and since the CR3 register reverts to its reset values after setting the baudrate, setting this bit is done during '_mxc_serial_setbgr' Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-09-18cyclic: Use schedule() instead of WATCHDOG_RESET()Stefan Roese1-3/+3
Globally replace all occurances of WATCHDOG_RESET() with schedule(), which handles the HW_WATCHDOG functionality and the cyclic infrastructure. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
2022-06-07serial: Replace CONFIG_DEBUG_UART_BASE by CONFIG_VAL(DEBUG_UART_BASE)Pali Rohár1-2/+2
CONFIG_VAL(DEBUG_UART_BASE) expands to CONFIG_DEBUG_UART_BASE or CONFIG_SPL_DEBUG_UART_BASE or CONFIG_TPL_DEBUG_UART_BASE and allows boards to set different values for SPL, TPL and U-Boot Proper. For ns16550 driver this support is there since commit d293759d55cc ("serial: ns16550: Add support for SPL_DEBUG_UART_BASE"). Signed-off-by: Pali Rohár <pali@kernel.org>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass1-0/+1
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-05dm: Use access methods for dev/uclass private dataSimon Glass1-6/+6
Most drivers use these access methods but a few do not. Update them. In some cases the access is not permitted, so mark those with a FIXME tag for the maintainer to check. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Pratyush Yadav <p.yadav@ti.com>
2020-12-14dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass1-7/+7
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-14dm: treewide: Rename ofdata_to_platdata() to of_to_plat()Simon Glass1-2/+2
This name is far too long. Rename it to remove the 'data' bits. This makes it consistent with the platdata->plat rename. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-14dm: treewide: Rename 'platdata' variables to just 'plat'Simon Glass1-7/+7
We use 'priv' for private data but often use 'platdata' for platform data. We can't really use 'pdata' since that is ambiguous (it could mean private or platform data). Rename some of the latter variables to end with 'plat' for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename auto_alloc_size members to be shorterSimon Glass1-1/+1
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-25treewide: convert devfdt_get_addr() to dev_read_addr()Masahiro Yamada1-1/+1
When you enable CONFIG_OF_LIVE, you will end up with a lot of conversions. To generate this commit, I used coccinelle excluding drivers/core/, include/dm/, and test/ The semantic patch that makes this change is as follows: <smpl> @@ expression dev; @@ -devfdt_get_addr(dev) +dev_read_addr(dev) </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-07-24Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"Tom Rini1-1/+1
This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing changes made to 56d37f1c564107e27d873181d838571b7d7860e7. Unfortunately this is causing CI failures: https://travis-ci.org/github/trini/u-boot/jobs/711313649 Signed-off-by: Tom Rini <trini@konsulko.com>
2020-07-20treewide: convert devfdt_get_addr() to dev_read_addr()Masahiro Yamada1-1/+1
When you enable CONFIG_OF_LIVE, you will end up with a lot of conversions. To generate this commit, I used coccinelle excluding drivers/core/, include/dm/, and test/ The semantic patch that makes this change is as follows: <smpl> @@ expression dev; @@ -devfdt_get_addr(dev) +dev_read_addr(dev) </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-19serial: mxc: Add compatibles to NXP's serial driver (for imx21 and imx53)Lukasz Majewski1-0/+2
This patch fixes not enabled uart2 (and hence serial console) on i.MX53 devices. After following commit 1d255904c306 ("ARM: dts: imx: imx53: Synchronize iMX53 DT with Linux") from the uart2 compatible the 'fsl,imx7d-uart' has been removed (which was correct). However, the root cause of the problem was the commit 98d62e618bb9 ("arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC") which introduced this compatible. Moreover, without this patch all i.MX53 UARTs are not usable as neither 'fsl,imx53-uart' nor 'fsl,imx21-uart' are in compatible IDs in drivers/serial/serial_mxc.c file. The fix is to add 'fsl,imx53-uart' and 'fsl,imx21-uart' as compatibles for the aforementioned serial driver (those are also defined in the Linux kernel). Signed-off-by: Lukasz Majewski <lukma@denx.de> Acked-by: Marek Vasut <marex@denx.de>
2019-07-19IMX: serial: dm: Set DM_FLAG_PRE_RELOC in the IMX uart driverLukasz Majewski1-2/+0
The DM_FLAG_PRE_RELOC shall be set unconditionally as this driver is going to be re-used in both early SPL and U-Boot proper's pre-reloc. For i.MX based devices it is crucial to have available the serial console before relocation (otherwise the board may hand). The device definition may be provided either via device tree description or with U_BOOT_DEVICE(mxc_serial) definition. In the latter case the device will not bind in U-Boot proper when DM_FLAG_PRE_RELOC is not set. The !CONFIG_IS_ENABLED(OF_CONTROL) #if check was set as a "workaround" for DM problem described in following commit 4687919684e0 ("serial: Remove DM_FLAG_PRE_RELOC flag in various drivers"). Let's look on this check more thoroughly - we add this flag if the board doesn't support OF_CONTROL. This is a bit strange as the serial_mxc.c can be used with CONFIG_DM_SERIAL but without corresponding device tree description (OF_CONTROL). In such case the aforementioned U_BOOT_DEVICE(mxc_serial) definition is used. Other boards/SoCs have this flag set unconditionally for serial driver. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-06-11serial: mxc: Add iMX6SX compatible stringMarek Vasut1-0/+1
Add compatible string for iMX6SX. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Silvio Fricke <silvio.fricke@softing.com> Cc: Stefano Babic <sbabic@denx.de>
2019-03-13imx: serial_mxc: use CONFIG_IS_ENABLED instead of ifdefAdam Ford1-2/+2
Kconfig allows boards to configured with DM_SERIAL and still have SPL_DM_SERIAL disabled. This patch changes the ifdef's to CONFIG_IS_ENABLED to allow the modes to differ between SPL and U-Boot. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-02-16imx: serial_mxc: disable ri and dcd irq in dte modeMax Krummenacher1-4/+9
If the UART is used in DTE mode the RI and DCD bits in UCR3 become irq enable bits. Both are set to enabled after reset and both likely are pending. Disable the bits to prevent an interrupt storm when Linux enables the UART interrupts. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-11-14serial: Remove DM_FLAG_PRE_RELOC flag in various driversBin Meng1-0/+2
When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before relocation. However due to a bug in the DM core, the flag only takes effect when devices are statically declared via U_BOOT_DEVICE(). This bug has been fixed recently by commit "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()", but with the fix, it has a side effect that all existing drivers that declared DM_FLAG_PRE_RELOC flag will be bound before relocation now. This may expose potential boot failure on some boards due to insufficient memory during the pre-relocation stage. To mitigate this potential impact, the following changes are implemented: - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver only supports configuration from device tree (OF_CONTROL) - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device is statically declared via U_BOOT_DEVICE() - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device tree Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-10-22serial: mxc: Add match string for i.mx6 quad/dual lite serialBernhard Messerklinger1-0/+1
Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at> Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-12serial: mxc: Add debug uart supportJagan Teki1-0/+26
Add support for the debug UART to assist with early debugging. Enable it for i.CoreM6 as an example. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-12serial: mxc: Code cleanupJagan Teki1-97/+94
- Remove space between #define to macro - Add tab between macro and value Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-12serial: mxc: Move common baud gen into _mxc_serial_setbrgJagan Teki1-26/+24
Move the common baud generation code into _mxc_serial_setbrg so-that dm and non-dm can call this func. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-12serial: mxc: Move common init into _mxc_serial_initJagan Teki1-20/+17
Move the common initialization code into _mxc_serial_init so-that dm and non-dm can call this func. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-12serial: mxc: Move cr1 and cr2 write to mxc_serial_setbrgJagan Teki1-5/+3
Control reg write should be part of setbrg for better buadrate generation, so move cr1 and cr2 write to mxc_serial_setbrg Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-12serial: mxc: Use RFDIV in dm-codeJagan Teki1-3/+3
Use RFDIV in dm-code instead of numeric value, so-that it can be common for dm and non-dm. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-12serial: mxc: Add common mxc_uart reg spaceJagan Teki1-66/+49
This patch will add common reg space for non-dm and dm code and non-dm reg space can be accessed using mxc_base. This will - get rid of __REG volatile assignments - Make common reg_space by removing unneeded macros Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-01dm: Rename dev_addr..() functionsSimon Glass1-1/+1
These support the flat device tree. We want to use the dev_read_..() prefix for functions that support both flat tree and live tree. So rename the existing functions to avoid confusion. In the end we will have: 1. dev_read_addr...() - works on devices, supports flat/live tree 2. devfdt_get_addr...() - current functions, flat tree only 3. of_get_address() etc. - new functions, live tree only All drivers will be written to use 1. That function will in turn call either 2 or 3 depending on whether the flat or live tree is in use. Note this involves changing some dead code - the imx_lpi2c.c file. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-03-19dm: imx: serial: add i.MX6UL supportSébastien Szymanski1-0/+1
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2017-02-08dm: core: Replace of_offset with accessorSimon Glass1-1/+1
At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-10-07dm: imx: serial: support device treeStefan Agner1-2/+30
Support instatiation through device tree. Also parse the fsl,dte-mode property to determine whether DTE mode shall be used. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-07-21serial_mxc: Remove unconditional DCE settingBreno Lima1-1/+0
Commit 83fd908f28c ("dm: imx: serial: Support DTE mode when using driver model") breaks the serial output for the imx boards that do not use the serial driver model. The reason for the breakage is that it's setting UFCR_DCEDTE unconditionally for the non-dm case. So keep the original behavior by removing UFCR_DCEDTE setting in the non-dm case. Tested on mx7sabresd and mx6wandboard. Signed-off-by: Breno Lima <breno.lima@nxp.com> Acked-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2016-07-19dm: imx: serial: Support DTE mode when using driver modelStefan Agner1-1/+8
The MXC UART IP can be run in DTE or DCE mode. This depends on the board wiring and the pinmux used and hence is board specific. This extends platform data with a new field to choose wheather DTE mode shall be used. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-03-15serial: Move carriage return before line feed for some serial driversAlison Wang1-4/+4
In general, a carriage return needs to execute before a line feed. The patch is to change some serial drivers based on this rule, such as serial_mxc.c, serial_pxa.c, serial_s3c24x0.c and usbtty.c. Signed-off-by: Alison Wang <alison.wang@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-01-03serial_mxc: Fix setup of UARTx_UFCR registerMaximilian Schwerin1-1/+8
This patch writes the default values for TXTL and RXTL to UARTx_UFCR. Without this patch some older kernel versions crash as UARTx_UFCR was not always correctly initialized. Signed-off-by: Maximilian Schwerin <maximilian.schwerin@tigris.de>
2014-10-24dm: move platform data headers to include/dm/platform_dataMasahiro Yamada1-1/+1
The platform_data definitions are generally referenced from both drivers and board files. That is why header files defining platform_data sturectures are placed in "include" directory, but our top level "include" directory is already too cluttered. Let's collect platform_data definitions under the directory "include/dm/platform_data" like Linux gathers ones around under "include/linux/platform_data". This commit moves two header files: include/serial_mxc.h -> include/dm/platform_data/serial_mxc.h include/serial_pl01x.h -> include/dm/platform_data/serial_pl01x.h Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-10-22dm: imx: serial: Support driver model in the MXC serial driverSimon Glass1-25/+145
Add driver model support with this driver. Boards which use this driver should define platform data in their board files. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-05-28serial_mxc: disable new features of autobaud detectionEric Nelson1-2/+2
Bit 7 of UCR3 is described in the i.MX3x/i.MX5x/i.MX6x reference manuals as follows: Autobaud Detection Not Improved-. Disables new features of autobaud detection (See Baud Rate Automatic Detection Protocol, for more details). 0 Autobaud detection new features selected 1 Keep old autobaud detection mechanism On at least i.MX6DQ, i.MX6DLS and i.MX53, the "new features" occasionally cause the receiver to get out of sync and continuously produce received characters of '\xff'. This patch disables the "new feature" on all boards, since there's no support for auto-baud in U-Boot on any of them. More details are available in this post on i.MX Community: https://community.freescale.com/message/403254 Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Tested-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk1-14/+1
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2012-10-17serial: Use default_serial_puts() in driversMarek Vasut1-8/+1
Replace the in-place ad-hoc implementation of serial_puts() within the drivers with default_serial_puts() call. This cuts down on the code duplication quite a bit. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
2012-10-15serial: Remove CONFIG_SERIAL_MULTI from serial driversMarek Vasut1-36/+0
Remove the support for not-CONFIG_SERIAL_MULTI part from serial port drivers and some board files. Since CONFIG_SERIAL_MULTI is now enabled by default, that part is a dead code. Remove it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
2012-10-15serial: arm: Implement CONFIG_SERIAL_MULTI into mxc serial driverMarek Vasut1-7/+61
Implement support for CONFIG_SERIAL_MULTI into mxc serial driver. This driver was so far only usable directly, but this patch also adds support for the multi method. This allows using more than one serial driver alongside the mxc driver. Also, add a weak implementation of default_serial_console() returning this driver. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com> Cc: Stefano Babic <sbabic@denx.de>
2011-12-07MX: serial_mxc: cleanup removing nasty #ifdefStefano Babic1-33/+4
The serial driver for iMX SOCs is continuosly changed if a new SOC or not yet used port is used. CONFIG_SYS_<SOC>_<UART Port> defines were used only to find the base address for the selected UART. Instead of that, move the base address to the board configuration file and drop all #ifdef from driver. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Marek Vasut <marek.vasut@gmail.com> CC: Wolfgang Denk <wd@denx.de> CC: Fabio Estevam <fabio.estevam@freescale.com> CC: Helmut Raiger <helmut.raiger@hale.at> CC: John Rigby <jcrigby@gmail.com> CC: Matthias Weisser <weisserm@arcor.de> CC: Jason Liu <jason.hui@linaro.org> Acked-by: Jason Liu <jason.hui@linaro.org>
2011-04-27IMX: MX31: Cleanup include files and drop nasty #ifdef in driversStefano Babic1-4/+0
As exception among the i.MX processors, the i.MX31 has headers without general names (mx31-regs.h, mx31.h instead of imx-regs.h and clock.h). This requires several nasty #ifdef in the drivers to include the correct header. The patch cleans up the driver and renames the header files as for the other i.MX processors. Signed-off-by: Stefano Babic <sbabic@denx.de>