i.MX Processors Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX Processors Knowledge Base

Discussions

Sort by:
The Yocto Project is open-source, so anyone can contribute. No matter what your contribution is (bug fixing or new metadata), contributions are sent through patches to a community list. Many eyes will look into your patch and at some point it is either rejected or accepted. Follow these steps to contribute: Make sure you have previously configured your personal info $ git config --global user.name "Your Name Here" $ git config --global user.email "your_email@example.com" Subscribed to the Freescale Yocto Project Mailing List Download `master` branches fsl-community-bsp $ repo init \   -u https://github.com/Freescale/fsl-community-bsp-platform \   -b master Update fsl-community-bsp $ repo sync Create local branches so your work is *not* done on master fsl-community-bsp $ repo start <branch name> --all Where `<branch name>` is any name you want to give to your local branch (e.g. `fix_uboot_recipe`, `new_gstreamer_recipe`, etc.) Make your changes in any Freescale related folder (e.g. sources/meta-fsl-arm). In case you modified a recipe (.bb) or include (.inc) file, do not forget to *bump* (increase the value by one) either the `PR` or `INC_PR` value Commit your changes using `git`. In this example we assume your change is on `meta-fsl-arm` folder sources/meta-fsl-arm $ git add <file 1> <file 2> sources/meta-fsl-arm $ git commit On the commit's log, the title must start with the filename change or introduced, then a brief description of the patch's goal, following with a long description. Make sure you follow the standards (type ` git log --pretty=oneline` to see previous commits) Create a patch sources/meta-fsl-arm $ git format-patch -s  --subject-prefix='<meta-fsl-arm][PATCH' -1 Where the last parameter (`-1`) indicate to patch last commit. In case you want to create patches for older commits, just indicate the correct index. If your patch is done in other folder, just make sure you change the `--subject-prefix` value. Send your patch or patches with git send-email --to meta-freescale@yoctoproject.org <patch> where `<patch>` is the file created by `git format-patch`. Keep track of patch's responses on the mailing list. In case you need to rework your patch, repeat the steps but this time the patch's subject changes to `--subject-prefix='<meta-fsl-*][PATCH v2'` Once your patch has been approved, you can delete your working branches fsl-community-bsp $ repo abandon <branch name>
View full article
When flashing a Linux System on a SD card using the script mk_mx28_sd on a Ubuntu 12.04 host, one needs to modify it so partitions are created correctly.  Just follow these steps on the console: $ cd $SDK/L2.6.35_10.12.01_SDK_scripts $ cat > first_partition_sector.patch << EOF diff -Naur a/mk_mx28_sd b/mk_mx28_sd --- a/mk_mx28_sd        2010-10-06 09:47:42.000000000 -0500 +++ b/mk_mx28_sd        2012-11-30 13:38:34.508199154 -0600 @@ -178,7 +178,7 @@ n p 1 -1 +2048 +32M t b EOF $ patch -p1 < first_partition_sector.patch then, you can run the mk_mx28_sd command again with the device as parameter                $ cd $LIB $ export PATH=$PATH:$SDK/L2.6.35_10.12.01_SDK_scripts $ mk_mx28_sd /dev/$SDX
View full article
This doc show how to use i.MX8QXP Display Controller GammaCor unit to tune gamma. HW: i.MX8QXP MEK board, HDMI monitor SW: i.MX Linux 4.14.98_2.2.0 BSP release, patch in this doc 1.Introduce gamma The gamma, gamma correction, gamma encoding, gamma compression , these words all related one kind operation , see wiki page of it: The device used for image capture/print/display follow this power-law. For example the camera captured image , to view this image on display device as good as original captured image : gamma encoding when camera saved sensor data to image file,  and  gamma decoding when that image file display on your PC LCD monitor. That is : 2. i.MX8QXP Display Controller Gamma Correction Unit The Gamma Correction unit position is located between Frame Gen unit and TCon unit.   More detail see below contents from i.MX8QXP RM: So GammaCor unit could be used as adjust display gamma , or brightness or contrast. To used it, need follow the steps at RM 15.9.2.4.4.8.3.   Something need to note: You need program 33 sample point value into the register, these sample point value range is from 0 to 1023. Note, first write is start sample point value , then the other is delta value: current sample point minus previous sample point value. You can use GammaCor unit on any channel of R/G/B. If you use normalized function f(x), the following formula should be used to clut[i = 0..32] = round( f(i * 32 / 1023) * 1023) 3. i.MX8QXP Linux device driver patch and test code Apply attached  patch 8qxp_dpu_gammacor_4.14.98_2.2.0.diff on Linux kernel. In the kernel patch, function dpu_gammacor_update, I choose not calculate delta value between each sample pint , let user space application calculate delta value and passed to kernel. Apply 8qxp-dpu-gammacor-modetst.diff on libdrm-imx, to get test application which is based on modetest.  Test app will read one greyscale image file 720P.rgb, put it under same folder of test application , calculate sample point value by pow function  , and calling drmModeCrtcSetGamma to pass related value to kernel,  next loop will change sample point value, and will see that greyscale image will changed on HDMI monitor. After system boot up, run below cmd to check result of test application systemctl stop weston ./gamma_show_rgba.out -P 29@32:1280x720@AB24 Reference: a>https://www.nxp.com/webapp/Download?colCode=IMX8DQXPRM b>https://www.nxp.com/webapp/Download?colCode=L4.14.98_2.2.0_MX8QXP&appType=license c> https://source.codeaurora.org/external/imx/libdrm-imx/ d> https://en.wikipedia.org/wiki/Gamma_correction
View full article
OpenGL OpenGL is the premier environment for developing portable, interactive 2D and 3D graphics applications. Since its introduction in 1992, OpenGL has become the industry's most widely used and supported 2D and 3D graphics application programming interface (API), bringing thousands of applications to a wide variety of computer platforms. OpenGL fosters innovation and speeds application development by incorporating a broad set of rendering, texture mapping, special effects, and other powerful visualization functions. Developers can leverage the power of OpenGL across all popular desktop and workstation platforms, ensuring wide application deployment. Source: http://www.opengl.org/about/overview/ On i.MX processors, OpenGL takes the advantage of GPU (Graphics Processing Unit) block to improve 3D performance. Installing and running Demos Get more information on how to install and run demos using OpenGL on i.MX31 on this application note: AN3723 - Using OpenGL Applications on the i.MX31 ADS Board - http://www.freescale.com/files/dsp/doc/app_note/AN3723.pdf?fsrch=1 Develop a simple OpenGL ES 2.0 application under Linux This tutorial shows how to develop a simple OpenGL ES 2.0 application with LTIB and an i.MX51 EVK board. This tutorial can be adapted to i.MX53 that share the same 3D GPU core (Z430) and API (OpenGL ES 2.0).
View full article
The Linux L4.1.15_2.0.3 Patch for i.MX 6ULL@900MHz Release is now available on www.nxp.com. BSP Updates and Releases -> Linux -> Linux 4.1.15_2.0.3 Patch.   Files available: # Name Description 1 L4.1.15_2.0.3_6ULL_patch_images.tar.gz i.MX 6ULL-EVK@900MHz Linux Binary Demo Files   Information of release, see: README: http://git.freescale.com/git/cgit.cgi/imx/fsl-arm-yocto-bsp.git/tree/README?h=imx-4.1-krogoth ChangeLog: http://git.freescale.com/git/cgit.cgi/imx/fsl-arm-yocto-bsp.git/tree/ChangeLog?h=imx-4.1-krogoth
View full article
The vbs file is a script file in mfgtool. In fsl android lollipop consolidate and later MFGTOOL version, You just need add a new vbs item for new board and have not need to change the ucl2.xml. The below is the example struct. Set wshShell = CreateObject("WScript.shell") wshShell.run "mfgtool2.exe -c ""linux"" -l ""SDCard-Android"" -s ""board=sabresd"" -s ""folder=sabresd"" -s ""soc=6dl"" -s ""mmc=2"" -s ""data_type=-f2fs""" Set wshShell = Nothing Explain for each option: -l: storage type      There three type for android: Nand-Android\eMMC-Android\SDCard-Android -s: extend variable      board: It is used to download uboot and dts in init system.      folder: there are three type: sabresd sabreauto evk                the android image is located in: files/android/%folder%/      soc: Used to define android image name. types: 6q, 6dl, 6sx, 6sl.      mmc: define the storage idex.      data_type: if the type of data partition is f2fs, need define data_type=-f2fs      ldo: if the board is 1.2G, need to define it to -ldo      plus: if the board is 6qp, need too define it to p
View full article
If you are a Windows user and don't want to install Linux on your machine, VMware is a virtual machine used to install Linux under Windows. It's a good way to start with Linux (if you're unfamiliar with it) and also start your i.MX development. Installing VMWare - VMWare Workstation [VMWare Workstation (Click here to go to Download page)] VMWare Workstation is available in commercial and trial versions. With Workstation is possible to create your own installation image—installing a new operating system as you would install it in a new machine. - VMWare Player [VMWare Player (Click here to go to Download page)] VMWare Player is available in a free version. With Player is only possible to run images previously made. - VMWare Images at ThoughtPolice site [ThoughtPolice site (Click here to go to Download page)] This site has many ready VMWare images from many Linux distributions. It just needs to be downloaded, unziped and it's ready to be used with VMware. Workstation or Player.
View full article
NFS Network File System (NFS) is a network file system protocol originally developed by Sun Microsystems in 1984, allowing a user on a client computer to access files over a network as easily as if the network devices were attached to its local disks. The use of NFS makes the development work of user space applications easy and fast since all target root file system is located into host (PC) where the applications can be developed and crosscompiled to target system. The target system will use this file system located on host as if it is located on target. NFS service will be used to transfer the root file system from host to target. NFS resources are listed below: All Boards Deploy NFS All Boards NFS on Fedora NFS on Fedora All Boards NFS on Slackware NFS on Slackware All Boards NFS on Ubuntu NFS on Ubuntu
View full article
  Platform: i.MX8MP EVK , L6.1.22-2.0.0 LT9211 is a chip that can realize the conversion of MIPI DSI signals to LVDS signals. This patch is based on this mainline driver:https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/drivers/gpu/drm/bridge/lontium-lt9211.c Keypoint Move lt9211_host_attach function to lt9211_attach to skip bridge attach error.  
View full article
When to enable CONFIG_DEBUG_LL, choose the debug port and then CONFIG_EARLY_PRINTK on i.MX6, system will hang. There is no error information there as below, Uncompressing Linux... done, booting the kernel. Booting Linux on physical CPU 0x0 Initializing cgroup subsys cpu Initializing cgroup subsys cpuacct Linux version 4.1.15-00001-gd582989-dirty (jay@jay-ubuntu) (gcc version 4.9 20 150123 (prerelease) (GCC) ) #10 SMP PREEMPT Mon Jul 17 15:08:55 CST 2017 CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache Machine model: Freescale i.MX6 Quad SABRE Smart Device Board bootconsole [earlycon0] enabled cma: Reserved 448 MiB at 0x2a000000 Memory policy: Data cache writealloc -------------- hang -----------------‍‍‍‍‍‍‍‍‍‍‍‍‍ The patch fix it on android n7.1.1_1.0.0, kernel: 4.1.15.
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343518 
View full article
The Linux L4.9.51 and SDKv2.3 for i.MX 8MQuad(mScale850D) RFP(GA) release files are now available. Linux on IMX_SW web page, Overview -> BSP Updates and Releases ->Linux L4.9.51 for i.MX 8MQuad GA. SDK on https://mcuxpresso.nxp.com/ web page.   Files available: Linux: # Name Description 1 fsl-yocto-L4.9.51_mx8mq-ga.tar.gz L4.9.51 i.MX 8MQuad GA Linux BSP Documentation. Includes Release Notes, User Guide. 2 L4.9.51-ga_images_mx8mq.tar.gz Linux Binary Demo files for i.MX 8MQuad EVK 3 L4.9.51_8mq-ga_mfg-tools.tar.gz Manufacturing Toolkit for Linux L4.9.51 i.MX8MQuad GA 4 L4.9.51_8mq-ga_gpu-tools.tar.gz VivanteVTK file for L4.9.51 i.MX8MQuad GA 5 imx-aacpcodec-4.3.4.tar.gz AAC Plus Codec for L4.9.51 of iMX 8MQuad GA   SDK:   On https://mcuxpresso.nxp.com/, click the Select Development Board to customize the SDK based on your configuration then download the SDK package. CMSIS pack is also supported.   Target board: i.MX 8MQuad EVK   What’s New/Features: Please consult the Release Notes.   Known issues For known issues and more details please consult the Release Notes.   More information on changes of Yocto, see: README: https://source.codeaurora.org/external/imx/imx-manifest/tree/README?h=imx-linux-morty ChangeLog: https://source.codeaurora.org/external/imx/imx-manifest/tree/ChangeLog?h=imx-linux-morty  
View full article
BSP: L5.15.5_1.0.0 Platform: i.MX8MPlus EVK Background   The function lpddr4_mr_read in BSP always return zero and this casue the customer can't use it to read MR registers in DRAM. This is a simple demo for reading MR registers. Patch Code   diff --git a/arch/arm/include/asm/arch-imx8m/ddr.h b/arch/arm/include/asm/arch-imx8m/ddr.h index 0f1e832c03..fd68996a23 100644 --- a/arch/arm/include/asm/arch-imx8m/ddr.h +++ b/arch/arm/include/asm/arch-imx8m/ddr.h @@ -721,6 +721,8 @@ int wait_ddrphy_training_complete(void); void ddrphy_init_set_dfi_clk(unsigned int drate); void ddrphy_init_read_msg_block(enum fw_type type); +unsigned int lpddr4_mr_read(unsigned int mr_rank, unsigned int mr_addr); + void update_umctl2_rank_space_setting(unsigned int pstat_num); void get_trained_CDD(unsigned int fsp); diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c index 33bbbc09ac..85e40ffbbe 100644 --- a/board/freescale/imx8mp_evk/spl.c +++ b/board/freescale/imx8mp_evk/spl.c @@ -150,6 +150,40 @@ int board_fit_config_name_match(const char *name) return 0; } #endif +void lpddr4_get_info() +{ + int i = 0, attempts = 5; + + unsigned int ddr_info = 0; + unsigned int regs[] = { 5, 6, 7, 8 }; + + for(i = 0; i < ARRAY_SIZE(regs); i++){ + unsigned int data = 0; + data = lpddr4_mr_read(0xF,regs[i]); + ddr_info <<= 8; + ddr_info += (data & 0xFF); + switch (i) + { + case 0: + printf("DRAM INFO : Manufacturer ID = 0x%x",ddr_info); + if(ddr_info & 0Xff) + printf(", Micron\n"); + break; + case 1: + printf("DRAM INFO : Revision ID1 = 0x%x\n",ddr_info); + break; + case 2: + printf("DRAM INFO : Revision ID2 = 0x%x\n",ddr_info); + break; + case 3: + printf("DRAM INFO : I/O Width and Density = 0x%x\n",ddr_info); + break; + default: + break; + } + } + +} void board_init_f(ulong dummy) { @@ -187,6 +221,8 @@ void board_init_f(ulong dummy) /* DDR initialization */ spl_dram_init(); + + lpddr4_get_info(); board_init_r(NULL, 0); } diff --git a/drivers/ddr/imx/imx8m/ddrphy_utils.c b/drivers/ddr/imx/imx8m/ddrphy_utils.c index 326b92d784..f45eeaf552 100644 --- a/drivers/ddr/imx/imx8m/ddrphy_utils.c +++ b/drivers/ddr/imx/imx8m/ddrphy_utils.c @@ -194,8 +194,15 @@ unsigned int lpddr4_mr_read(unsigned int mr_rank, unsigned int mr_addr) tmp = reg32_read(DRC_PERF_MON_MRR0_DAT(0)); } while ((tmp & 0x8) == 0); tmp = reg32_read(DRC_PERF_MON_MRR1_DAT(0)); - tmp = tmp & 0xff; reg32_write(DRC_PERF_MON_MRR0_DAT(0), 0x4); + + while (tmp) { //try to find a significant byte in the word + if (tmp & 0xff) { + tmp &= 0xff; + break; + } + tmp >>= 8; + } return tmp; }     Test Result  
View full article
Some i.MX25 customers reported an issue for the GPT timer, when using 120MHz (240MHz UPLL divided 2) clock source as the GPT per_clk, the timer will not be increased all the time in free-run mode. If using 66.5MHz IPG clock and 133MHz PER clock as the clock source, there are no such issue. There are 4 test cases in the attached test code. Case 0: in CCM_MCR, set bit 5 as 0 for 133MHz HCLK as the gpt_per_clk source;  in GPT_CR bit[8:6], set 0b001 ipg_clk (66.5MHz). There is no issue, the GPT counter is fixed at 4 between old_cnt and new_cnt. Case 1: in CCM_MCR, set bit 5 as 0 for 133MHz HCLK as the gpt_per_clk source;  in GPT_CR bit[8:6], set 0b010 ipg_clk_highfreq (133MHz). There is no issue, the GPT counter is fixed at 8 between old_cnt and new_cnt. Case 2: in CCM_MCR, set bit 5 as 1 for 240MHz UPLL divided by 2 as the gpt_per_clk source;  in GPT_CR bit[8:6], set 0b001 ipg_clk (60MHz). There is no issue, the GPT counter is fixed at 4 between old_cnt and new_cnt. Case 3: in CCM_MCR, set bit 5 as 0 for 240MHz UPLL divided by 2 as the gpt_per_clk source;  in GPT_CR bit[8:6], set 0b010 ipg_clk_highfreq (120MHz). There is issue, the GPT counter is not a fixed value between old_cnt and new_cnt, and sometimes it will be negative. Count 9874: 4 old_cnt: 0x188849dc new_cnt: 0x188849e0 Count 9877: 12 old_cnt: 0x18918400 new_cnt: 0x1891840c Count 9915: 4 old_cnt: 0x189aea90 new_cnt: 0x189aea94 Count 9937: -12 old_cnt: 0x18a42458 new_cnt: 0x18a4244c Count 9967: 4 old_cnt: 0x18adb17c new_cnt: 0x18adb180 In fact, it is not an issue, when using UPLL as the GPT clock source, the maxim frequency should be 60MHz. That's why all other three test case is OK and it only failed on this case.
View full article
Using a USB Touchscreen on Ubuntu   This example uses a XENARC 706TSA monitor http://www.xenarc.com/product/706tsa.html To use a USB touchscreen on i.MX51 EVK, disable all touchscreen drivers on menuconfig and build the kernel: Device Drivers  --->        Input device support  --->        [ ]   Touchscreens  ---> Download xserver-xorg-input-evtouch (0.8.8-ubuntu3 version) from http://launchpadlibrarian.net/24760784/xserver-xorg-input-evtouch_0.8.8-0ubuntu3_armel.deb. X crash is found if using latest 0.8.8-ubuntu6.1 version. For the details. See https://bugs.launchpad.net/ubuntu/+source/xf86-inputevtouch/+bug/511491 On MX51 EVK board, run “sudo dpkg –i xserver-xorg-input-evtouch_0.8.8-0ubuntu3_armel.deb” to install debian package. Add fdi file by "sudo vi ./usr/share/hal/fdi/policy/20thirdparty/50-eGalax.fdi": <?xml version="1.0" encoding="UTF-8"?> <deviceinfo version="0.2">    <device>       <match key="info.product" contains="eGalax">          <match key="info.capabilities" contains="input">             <merge key="input.x11_driver" type="string">evtouch</merge>             <merge key="input.x11_options.minx" type="string">130</merge>             <merge key="input.x11_options.miny" type="string">197</merge>             <merge key="input.x11_options.maxx" type="string">3945</merge>             <merge key="input.x11_options.maxy" type="string">3894</merge>             <merge key="input.x11_options.Rotate" type="string">CCW</merge>             <merge key="input.x11_options.Swapy" type="string">true</merge>             <merge key="input.x11_options.taptimer" type="string">30</merge>             <merge key="input.x11_options.longtouchtimer" type="string">750</merge>             <merge key="input.x11_options.longtouched_action" type="string">click</merge>             <merge key="input.x11_options.longtouched_button" type="string">3</merge>             <merge key="input.x11_options.oneandhalftap_button" type="string">2</merge>             <merge key="input.x11_options.movelimit" type="string">10</merge>             <merge key="input.x11_options.touched_drag" type="string">1</merge>             <merge key="input.x11_options.maybetapped_action" type="string">click</merge>             <merge key="input.x11_options.maybetapped_button" type="string">1</merge>          </match>       </match>    </device> </deviceinfo> Save above configuration. Calibrating Calibration in made by clicking on System -> Administration -> Calibrate Touchscreen Follow the on screen instructions and reboot the system. Calibrating using Xinput Calibrator Xinput_calibrator is another option to calibrate touchscreen. It can be downloaded at: http://www.freedesktop.org/wiki/Software/xinput_calibrator On i.MX5x Ubuntu, unpack the source code: tar -xzvf xinput_calibrator-0.7.5.tar.gz Install xorg-dev, it's required to build xinput_calibrator sudo apt-get install xorg-dev Configure, build and install xinput_calibrator ./configure ./make ./make install Execute xinput_calibrator. A four-point calibration screen will be shown. Follow the instructions on screen and after complete xinput_calibrator will return the calibration parameters. Replace the given calibration parameters on file /usr/share/hal/fdi/policy/20thirdparty/50-eGalax.fdi and reboot the system.
View full article
This example uses the touchscreen that comes with i.MX51 EVK's parallel LCD Download xserver-xorg-input-evtouch (xserver-xorg-input-evtouch_0.8.8-3build1_armel.deb) from https://launchpad.net/ubuntu/lucid/armel/xserver-xorg-input-evtouch/0.8.8-3build1 On i.MX51 EVK board, run “sudo dpkg –i xserver-xorg-input-evtouch_0.8.8-3build1_armel.deb” to install debian package. Remove evdev config file: sudo rm /usr/lib/X11/xorg.conf.d/05-evdev.conf Change the content of 10-evtouch.conf to: sudo vi /usr/lib/X11/xorg.conf.d/10-evtouch.conf Section "InputClass"            Identifier "touchscreen catchall"            MatchIsTouchscreen "on"            Driver "evtouch"            Option "SwapY" "1"            Option "MinX" "32"            Option "MinY" "46"            Option "MaxX" "1001"            Option "MaxY" "967" EndSection   The MinX, MinY, MaxX and MaxY values can be changed to match the exact configuration of your touchscreen Save above configuration and reboot the system.
View full article
The document descript how to use the win32diskimager to create bootable sdcard.  How to resize sdcard mirror rootfs partition. Ex: fsl-image-validation-imx-imx6qpdlsolox.sdcard
View full article
[Brief description] (1)Contents The ducoment introduced how to expand Gigabit Ethernet based on i.MX6 PCI Express, and attached schematics in DSN & pdf format. (2)Binary file for EEROM I have the binary file used to debug intel82574 circuit in this schematic, If customer wants to use it to debug board based on i.MX6+Intel82574, she can submit a case for me to get the file by our Salesforece system. Best Regards, TIC Weidong Sun Email: weidong.sun@nxp.com
View full article
This patch implements (or exposes) routines to poll the imx uarts. The KGDB drivers need these methods to be implemented or the ttymxc driver is not sufficient. The synthetic CONFIG_CONSOLE_POLL value activates these routines (or CONFIG_SERIAL_MXC_CONSOLE for the polled write). There is still no poll routines in -855-ge067785, which is the September 2010 Linux release from Freescale. Also not in Linux 2.6.36 drivers/serial/imx.c either. $ git diff drivers/serial/mxc_uart.c diff --git a/drivers/serial/mxc_uart.c b/drivers/serial/mxc_uart.c index ae6d2e1..728b607 100644 --- a/drivers/serial/mxc_uart.c +++ b/drivers/serial/mxc_uart.c @@ -1551,6 +1551,28 @@ mxcuart_pm(struct uart_port *port, unsigned int state, unsigned int oldstate)                             clk_enable(umxc->clk);    }  +#ifdef CONFIG_CONSOLE_POLL +/* + * Read a character from the UART. + */ +static inline int mxcuart_console_read_char(struct uart_port *port) +{ +       volatile unsigned int status; +    int ch; + +       do { +               status = readl(port->membase + MXC_UARTUSR2); +       } while ((status & MXC_UARTUSR2_RDR) == 0); +       ch = readl(port->membase + MXC_UARTURXD); +/* Ignore parity errors, etc. */ +/*  status = ch | UART_CREAD_BIT; */ +    ch &= 0xff; + +    return ch; +} +static void mxcuart_console_write_char(struct uart_port *port, char ch); +#endif +    /*!     * This structure contains the pointers to the control functions that are     * invoked by the core serial driver to access the UART hardware. The @@ -1575,14 +1597,18 @@ static struct uart_ops mxc_ops = {                 .config_port = mxcuart_config_port,                 .verify_port = mxcuart_verify_port,                 .send_xchar = mxcuart_send_xchar, +#ifdef CONFIG_CONSOLE_POLL +              .poll_put_char = mxcuart_console_write_char, +              .poll_get_char = mxcuart_console_read_char, +#endif };  -#ifdef CONFIG_SERIAL_MXC_CONSOLE +#if defined(CONFIG_SERIAL_MXC_CONSOLE) || defined (CONFIG_CONSOLE_POLL)     /*     * Write out a character once the UART is ready     */ -static inline void mxcuart_console_write_char(struct uart_port *port, char ch) +static void mxcuart_console_write_char(struct uart_port *port, char ch)    {            volatile unsigned int status;  @@ -1592,6 +1618,10 @@ static inline void mxcuart_console_write_char(struct uart_port *port, char ch)                writel(ch, port->membase + MXC_UARTUTXD);     }  +#endif + +#ifdef CONFIG_SERIAL_MXC_CONSOLE +    /*!     * This function is called to write the console messages through the UART port.     *
View full article