aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
...
* ENGR00320098 hwmon: mma8451: Add a new mma8451 driver from android team updateluweizhou2014-06-26
| | | | | | | | | | | | | | | | | The android app has its own interface for mma8451 data. The inerface isn't a regular input dev interface. Since it is difficult to maintain the code within one file, one new file and configure will be added. It would not be compiled in the default config. If want to use this driver, need to follow: *Disable the CONFIG_MXC_MMA8451. *Enable the CONFIG_MXC_MMA8x5x and make. The code is from branch imx_3.10.y_android. The main modification is : *Using device to pass into parameters related with platform not hard code. *Codeing style issues Signed-off-by: Luwei Zhou <b45643@freescale.com> (cherry picked from commit e3faf9d404fcd3663c47cd1183e01a71c53b9eb8)
* ENGR00320136 net: fec: fix rcv is not last issue when do suspend/resume testFugang Duan2014-06-26
| | | | | | | | | | When do suspend/resume stress test, some log shows "rcv is not +last". The issue is that enet suspend will disable phy clock, phy link down, after resume back, enet MAC redo initial and ready to tx/rx packet, but phy still is not ready which is doing auto-negotiation. When phy link is not up, don't schdule napi soft irq. Signed-off-by: Fugang Duan <B38611@freescale.com>
* ENGR00320120 net: fec: remove unnecessary condition for magic packet setFugang Duan2014-06-26
| | | | | | Remove unnecessary condition for magic packet setting. Signed-off-by: Fugang Duan <B38611@freescale.com>
* n_tty: Fix n_tty_write crash when echoing in raw modePeter Hurley2014-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tty atomic_write_lock does not provide an exclusion guarantee for the tty driver if the termios settings are LECHO & !OPOST. And since it is unexpected and not allowed to call TTY buffer helpers like tty_insert_flip_string concurrently, this may lead to crashes when concurrect writers call pty_write. In that case the following two writers: * the ECHOing from a workqueue and * pty_write from the process race and can overflow the corresponding TTY buffer like follows. If we look into tty_insert_flip_string_fixed_flag, there is: int space = __tty_buffer_request_room(port, goal, flags); struct tty_buffer *tb = port->buf.tail; ... memcpy(char_buf_ptr(tb, tb->used), chars, space); ... tb->used += space; so the race of the two can result in something like this: A B __tty_buffer_request_room __tty_buffer_request_room memcpy(buf(tb->used), ...) tb->used += space; memcpy(buf(tb->used), ...) ->BOOM B's memcpy is past the tty_buffer due to the previous A's tb->used increment. Since the N_TTY line discipline input processing can output concurrently with a tty write, obtain the N_TTY ldisc output_lock to serialize echo output with normal tty writes. This ensures the tty buffer helper tty_insert_flip_string is not called concurrently and everything is fine. Note that this is nicely reproducible by an ordinary user using forkpty and some setup around that (raw termios + ECHO). And it is present in kernels at least after commit d945cb9cce20ac7143c2de8d88b187f62db99bdc (pty: Rework the pty layer to use the normal buffering logic) in 2.6.31-rc3. js: add more info to the commit log js: switch to bool js: lock unconditionally js: lock only the tty->ops->write call References: CVE-2014-0196 Reported-and-tested-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/tty/hvc: don't free hvc_console_setup after initTomoki Sekiyama2014-06-26
| | | | | | | | | | | | When 'console=hvc0' is specified to the kernel parameter in x86 KVM guest, hvc console is setup within a kthread. However, that will cause SEGV and the boot will fail when the driver is builtin to the kernel, because currently hvc_console_setup() is annotated with '__init'. This patch removes '__init' to boot the guest successfully with 'console=hvc0'. Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: Set correct tty name in 'active' sysfs attributeHannes Reinecke2014-06-26
| | | | | | | | | | | | | | | | | | | | | | | | The 'active' sysfs attribute should refer to the currently active tty devices the console is running on, not the currently active console. The console structure doesn't refer to any device in sysfs, only the tty the console is running on has. So we need to print out the tty names in 'active', not the console names. There is one special-case, which is tty0. If the console is directed to it, we want 'tty0' to show up in the file, so user-space knows that the messages get forwarded to the active VT. The ->device() callback would resolve tty0, though. Hence, treat it special and don't call into the VT layer to resolve it (plymouth is known to depend on it). Cc: Lennart Poettering <lennart@poettering.net> Cc: Kay Sievers <kay@vrfy.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.cz> Cc: stable <stable@vger.kernel.org> Signed-off-by: Werner Fink <werner@suse.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: n_gsm: Fix for modems with brk in modem status controlLars Poeschel2014-06-26
| | | | | | | | | | | | | | | | | | | | | | 3GPP TS 07.10 states in section 5.4.6.3.7: "The length byte contains the value 2 or 3 ... depending on the break signal." The break byte is optional and if it is sent, the length is 3. In fact the driver was not able to work with modems that send this break byte in their modem status control message. If the modem just sends the break byte if it is really set, then weird things might happen. The code for deconding the modem status to the internal linux presentation in gsm_process_modem has already a big comment about this 2 or 3 byte length thing and it is already able to decode the brk, but the code calling the gsm_process_modem function in gsm_control_modem does not encode it and hand it over the right way. This patch fixes this. Without this fix if the modem sends the brk byte in it's modem status control message the driver will hang when opening a muxed channel. Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ENGR00320099 usb: chipidea: add vbus glitch handlingLi Jun2014-06-26
| | | | | | | | We add vbus glitch handling for both BSV rise and drop interruptes. If it is a vbus glitch (higher than BSV but cannot reach AVV), ignore it. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <b47624@freescale.com>
* ENGR00319720-9 Documentation: usb: chipidea: Update test procedure for HNP ↵Li Jun2014-06-26
| | | | | | | | polling support Update HNP test procedure as HNP polling is supported. Signed-off-by: Li Jun <b47624@freescale.com>
* ENGR00318485-8 usb: chipidea: add condition for wakeup by SRPLi Jun2014-06-26
| | | | | | | | This patch adds condition of wakeup irq for handling wakeup by SRP when in otg fsm mode. Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <b47624@freescale.com>
* ENGR00319720-7 usb: chipidea: otg_fsm: set host request flag via sys inputLi Jun2014-06-26
| | | | | | | This patch sets host request flag with sys input when a A device sets a_bus_req or a B device sets b_bus_req as peripheral role. Signed-off-by: Li Jun <b47624@freescale.com>
* ENGR00319720-6 usb: chipidea: otg_fsm: add HNP polling supportLi Jun2014-06-26
| | | | | | | This patch adds HNP polling support for chipidea otg fsm driver, which adds a SW timer to send HNP polling request. Signed-off-by: Li Jun <b47624@freescale.com>
* ENGR00319720-5 usb: chipidea: udc: add OTG status request handlingLi Jun2014-06-26
| | | | | | | | Peripheral answers OTG status selector request from host according to host request flag of gadget, length is 1. this flag may be set by application via sysfs. Signed-off-by: Li Jun <b47624@freescale.com>
* ENGR00319720-4 usb: common: otg-fsm: clear host_request_flag when leave host ↵Li Jun2014-06-26
| | | | | | | | state. clear host_request_flag when otg leaves host state. Signed-off-by: Li Jun <b47624@freescale.com>
* ENGR00319720-3 usb: common: otg-fsm: add HNP polling request sending funcitonLi Jun2014-06-26
| | | | | | | This patch adds OTG status selector request sending function, can be used to poll peripheral if it wants to be host. Signed-off-by: Li Jun <b47624@freescale.com>
* ENGR00319720-2 usb: common: otg-fsm: start HNP polling timer in host stateLi Jun2014-06-26
| | | | | | | This patch starts HNP polling timer when otg is set to be a_host or b_host. Signed-off-by: Li Jun <b47624@freescale.com>
* ENGR00319720-1 usb: gadget: add host_request_flag in usb_gadget for OTGLi Jun2014-06-26
| | | | | | | This patch adds host_request_flag in usb_gadget to store host request information from application. Signed-off-by: Li Jun <b47624@freescale.com>
* ENGR00319406-3 PXP: refine rotation feature to support more cases for ↵Fancy Fang2014-06-26
| | | | | | | | | | | multimedia usage After dropping the output offset calculating step, the rotation coordinates should be calculated to make it work properly. Signed-off-by: Fancy Fang <chen.fang@freescale.com> (cherry picked from commit cf975a339015797707fc471b0526b4089631943a)
* ENGR00319406-2 PXP: remove the rot_pos=1 support temporarilyFancy Fang2014-06-26
| | | | | | | | | Remove the rotation operation support before composite, since this function has several big limitations and it is almost useless in the real applcations. Signed-off-by: Fancy Fang <chen.fang@freescale.com> (cherry picked from commit 18cbd7c5f12ff0be2b75634dfeb2af7827b6811b)
* ENGR00319406-1 PXP: don't need to calculate the offset for output bufferFancy Fang2014-06-26
| | | | | | | | | The original copy operation done by PXP can be replaced by alpha blending + colorkey. And this is more reasonable in the view of PXP hardware. Signed-off-by: Fancy Fang <chen.fang@freescale.com> (cherry picked from commit e8c0cd431108ae9cac2af33f99e4aeae900984a4)
* Revert "ENGR00318063-5: ARM: imx: set CLK_SET_PARENT_GATE flag for glitchy ↵Shawn Guo2014-06-26
| | | | | | | | | | | | | | | | | mux clocks" This reverts commit cf56832a5ddf3a7caf3641bc272f59c7033f0b88. The change has a much bigger impact than we initially thought. It basically requires client drivers to check return of every single clk_set_parent() and clk_set_rate() call to know if they're doing something that clock driver prohibits for sake of glitch. The client drivers haven't been so ready for this change, so let's revert it from release branch and keep developing it on main branch for a while. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
* ENGR00320088 ARM: imx: disable Mega/Fast mix off featureAnson Huang2014-06-26
| | | | | | | As some modules in M/F domain are not ready for this feature, so need to disable it until every driver are ready for it. Signed-off-by: Anson Huang <b20788@freescale.com>
* ENGR00319792 ARM: imx: need to make sure MMDC auto self refresh is enabledAnson Huang2014-06-26
| | | | | | | | | | | When there is busfreq scaling between low power mode and audio bus mode, the enabling of MMDC auto self-refresh code will be skipped as they are both DLL off mode, it will cause DDR power increase, so we just move the enabling of the MMDC auto self-refresh mode to the end of busfreq change to make sure it is enabled after a DDR freq change. Signed-off-by: Anson Huang <b20788@freescale.com>
* ENGR00316496 ARM: imx: fix random failure for ddr3 freq scaling on i.mx6sxAnson Huang2014-06-26
| | | | | | | | | | | Improve DDR3 freq scaling procedure of i.MX6SX: 1. some code of condition check is incorrect; 2. better to keep MMDC command same as ddr script; 3. improve the clock tree change of mmdc path; 4. remove CON_REG req for MMDC. Signed-off-by: Anson Huang <b20788@freescale.com>
* usb: gadget: udc-core: move sysfs_notify() to a workqueueFelipe Balbi2014-06-26
| | | | | | | | | | | | | | | | usb_gadget_set_state() will call sysfs_notify() which might sleep. Some users might want to call usb_gadget_set_state() from the very IRQ handler which actually changes the gadget state. Instead of having every UDC driver add their own workqueue for such a simple notification, we're adding it generically to our struct usb_gadget, so the details are hidden from all UDC drivers. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Felipe Balbi <balbi@ti.com> (cherry picked from commit 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15)
* usb: chipidea: imx: Use dev_name() for ci_hdrc name to distinguish USBsAlexander Shiyan2014-06-26
| | | | | | | | | Use dev_name() for ci_hdrc name to distinguish USBs Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 5c1b9fcc6598ee492100ad2a19fdb74b35448023)
* usb: chipidea: core: Add missing module owner fieldAlexander Shiyan2014-06-26
| | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 35d0313a6d4ffb396b1dad2d62a90ddbb52215bd)
* usb: chipidea: udc: update gadget states according to ch9Peter Chen2014-06-26
| | | | | | | | Update device states according to ch9 in USB 2.0 specification Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 2d189909ecaafe5764609b664d7502b0e68f909b)
* Doc: usb: chipidea: need to build both kernel Image and modulesPeter Chen2014-06-26
| | | | | | | | | | When tried to enable OTG FSM, we need to rebuild both kernel Image and modules, since there are some codes at gadget modules which are controlled by related configurations. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit d5b9d41f94a17af4c39b519703451c07a6a5ea9b)
* chipidea: usbmisc_imx: Allow USB OTG to work on mx51Fabio Estevam2014-06-26
| | | | | | | | | | | | | | | | | | | | | | | The field PLLDIVVALUE of register PHY_CTRL_1 selects the reference clock source for the PHY: 00 = sysclock uses 19.2 MHz 01 = sysclock uses 24 MHz 10 = sysclock uses 26 MHz 11 = sysclock uses 27 MHz The reset value for this field is 10 according to the reference manual, and even though this reset value works for mx53, it does not work for mx51. So instead of relying on the reset value for the PLLDIVVALUE field, explicitly set it to 01 so that a 24MHz clock can be selected for the PHY and allowing both mx51 and mx53 to have USB OTG port functional. Succesfully tested 'g_ether' on a imx51-babbage and on a imx53-qsb boards. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit c93dad6e3a2204627fa5e7a3f1782007f378b32e)
* usb: chipidea: using one inline function to cover queue work operationsPeter Chen2014-06-26
| | | | | | | | | | The otg queue work include operations: one is disable interrupt, another one is call kernel queue work API. Many codes do this operation, using one inline function to instead of them. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit c8b188d2900a7a9c833f67585cc11e47b47ad6b2)
* usb: chipidea: udc: delete useless codePeter Chen2014-06-26
| | | | | | | | Delete useless code Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 27d47c96c84efa1dc5712c928a6938cf43b5de78)
* usb: chipidea: update TODO listPeter Chen2014-06-26
| | | | | | | | Update TODO list Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit f7eaea58cdbde6e0f4b9ad37c34a59d5c6071464)
* usb: udc-core: set gadget state as not attached after unloading modulePeter Chen2014-06-26
| | | | | | | | | Set gadget state as "not attached" after unloading gadget module, or its state will be unchanged after we unload gadget module. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com> (cherry picked from commit 55331010baeb71bf8eb1d37e4a9cdffca8c34add)
* usb: gadget: set gadget state as configuredPeter Chen2014-06-26
| | | | | | | | | Set gadget device state as configurated after set configuration has finished. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com> (cherry picked from commit e0d0bb68ea0fcff89f121f64ac9ec953d15ddaa1)
* usb: common: rename phy-fsm-usb.c to usb-otg-fsm.cPeter Chen2014-06-26
| | | | | | | | | | | Since usb otg fsm implementation is not related to usb phy. We move it from usb/phy/ to usb/common/, and rename it to reflect its real meaning. Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 8dc0fda6e5246450c688e2d3e09f9834a4323e01)
* usb: move usb/usb-common.c to usb/common/usb-common.cPeter Chen2014-06-26
| | | | | | | | | | | Since we will have more usb-common things, and it will let usb-common.c be larger and larger, we create a folder named usb/common for all usb common things. Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 04257b0cf4f3f3e4d57ffc0e7731ba1478927da7)
* usb: gadget: remove __init from gadget driver bind functionPeter Chen2014-06-26
| | | | | | | | | Since the .bind may not be called at the driver's initialization routine due to the udc is not ready, we remove __init marker for it. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> (cherry picked from commit 2f12561502a0dab918ff47dfa5bd75236817581a)
* drivers: usb: udc-core: add deferred bind for gadget driverRobert Baldyga2014-06-26
| | | | | | | | | | | | | | | | This patch adds support for deferred gadget driver bind as a remedy for situation when UDC drivers and gadget drivers are builded into the kernel, and gadget driver is loaded as first. Till now, in that case gadget driver loading failed with "No such device" and gadget driver didn't start. Now gadget drivers are added to driver_list and binded later, when UDC drivers will register in udc-core. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> (cherry picked from commit 3e84ec6493941e6608dca4a7efec68dee8609111)
* usb: chipidea: udc: delete td from req's td list at ep_dequeuePeter Chen2014-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to delete un-finished td from current request's td list at ep_dequeue API, otherwise, this non-user td will be remained at td list before this request is freed. So if we do ep_queue-> ep_dequeue->ep_queue sequence, when the complete interrupt for the second ep_queue comes, we search td list for this request, the first td (added by the first ep_queue) will be handled, and its status is still active, so we will consider the this transfer still not be completed, but in fact, it has completed. It causes the peripheral side considers it never receives current data for this transfer. We met this problem when do "Error Recovery Test - Device Configured" test item for USBCV2 MSC test, the host has never received ACK for the IN token for CSW due to peripheral considers it does not get this CBW, the USBCV test log like belows: -------------------------------------------------------------------------- INFO Issuing BOT MSC Reset, reset should always succeed INFO Retrieving status on CBW endpoint INFO CBW endpoint status = 0x0 INFO Retrieving status on CSW endpoint INFO CSW endpoint status = 0x0 INFO Issuing required command (Test Unit Ready) to verify device has recovered INFO Issuing CBW (attempt #1): INFO |----- CBW LUN = 0x0 INFO |----- CBW Flags = 0x0 INFO |----- CBW Data Transfer Length = 0x0 INFO |----- CBW CDB Length = 0x6 INFO |----- CBW CDB-00 = 0x0 INFO |----- CBW CDB-01 = 0x0 INFO |----- CBW CDB-02 = 0x0 INFO |----- CBW CDB-03 = 0x0 INFO |----- CBW CDB-04 = 0x0 INFO |----- CBW CDB-05 = 0x0 INFO Issuing CSW : try 1 INFO CSW Bulk Request timed out! ERROR Failed CSW phase : should have been success or stall FAIL (5.3.4) The CSW status value must be 0x00, 0x01, or 0x02. ERROR BOTCommonMSCRequest failed: error=80004000 Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> (cherry picked from commit b2a4b1a887548906c4d28a86ce3a1c7bcfb8406f)
* kbuild: unconditionally clobber include/linux/version.h on distcleanPaul Gortmaker2014-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As of v3.7, the UAPI changes relocated headers around such that the kernel version header lived in a new place. If a person is bisecting and if you go back to pre-UAPI days, you will create an include/linux/version.h -- then if you checkout a post-UAPI kernel, and even run "make distclean" it still won't delete that old version file. So you get a situation like this: $ grep -R LINUX_VERSION_CODE include/ include/generated/uapi/linux/version.h:#define LINUX_VERSION_CODE 200192 include/linux/version.h:#define LINUX_VERSION_CODE 132646 The value in that second line is representative of a v2.6.38 version. And it will be sourced/used, hence leading to strange behaviours, such as drivers/staging content (which typically hasn't been purged of version ifdefs) failing to build. Since it is a subtle mode of failure, lets always clobber the old file when doing a distclean. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Michal Marek <mmarek@suse.cz> [shawn.guo: cherry-pick commit 9c8cdb71644a from upstream] Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
* ENGR00318063-9: clk: do not allow parent switching with another mux being childShawn Guo2014-06-25
| | | | | | | | | | | | | When switching parent clock with another basic mux clock being its child, a glitch might be generated and propagated to downstream clocks through this child mux. The patch adds a flag CLK_IS_BASIC_MUX to identify the basic mux clocks, and prohibit the parent switching when the clock itself is the parent of any basic mux clock. With this check, the parent switching of a clock has to happen before the child mux switches to this clock path. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
* ENGR00318063-8: ARM: imx6q: hide buggy ldb_di_sel from clk APIShawn Guo2014-06-25
| | | | | | | | | | | | | | | | | | | | | | | | The clk_set_parent() on the buggy mux ldb_di0_sel and ldb_di1_sel can possibly lock up the downstream divider and result in no clock output. Let's hard-code the parent to be pll2_pfd0_352m at boot time, and hide these two buggy muxes from clk API. Then no clk_set_parent() can be called on these muxes to switch parent clock at run-time. Kernel parameter 'ldb_di_clk_sel' is created to select parent of ldb_di_clk among the following clocks at boot time. 'pll5_video_div' 'pll2_pfd0_352m' 'pll2_pfd2_396m' 'mmdc_ch1_axi' 'pll3_usb_otg' Example format: ldb_di_clk_sel=pll5_video_div If the kernel parameter is absent or invalid, pll2_pfd0_352m will be selected by default. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
* ENGR00318063-7: ARM: imx6q: mmdc_ch_axi clock should be non-gateableShawn Guo2014-06-25
| | | | | | | | | | | | | Per the updated CCM chapter, there is no gate for clock mmdc_ch1_axi. And there is a gate for mmdc_ch0_axi, but the gate also controls FABRIC clock, which means the gate cannot be gated anyway. That said, implementing these two clocks as gate does not make too much sense. Since the clocks are already referenced in quite some places, to minimize the impact of dropping the gate, instead of removing the clocks completely, we choose to point the clocks to their dividers. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
* ENGR00318063-6: ARM: imx6: add CLK_SET_RATE_GATE flag for PLL clocksShawn Guo2014-06-25
| | | | | | | | | | The i.MX6 Reference Manual requires PLLs to be powered down before changing its rate. Let's add flag CLK_SET_RATE_GATE for PLLs and audio/video dividers to enforce the check at clock core level. So any clk_set_rate() call from clients on these clocks will fail if the clocks are not disabled and unprepared. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
* ENGR00318063-5: ARM: imx: set CLK_SET_PARENT_GATE flag for glitchy mux clocksShawn Guo2014-06-25
| | | | | | | | | | | | | | | | | | | The mux clocks found on imx6 SoCs are all glitchy ones except pll1_sw_clk_sel, axi_sel, periph_clk_sel and periph2_clk_sel. When switching parent clock of a glitchy mux without gating, a glitch could be generated and propagated into the downstream divider, and hence locks up the divider and results in no clock output. To avoid the situation, the parent switching should happen only when the clock is gated. Add CLK_SET_PARENT_GATE flag for i.MX mux clocks, so that clock core will make that check during clk_set_parent() call. Since glitchless clocks do not need this flag, we create imx_clk_mux_glitchless() without this flag for them. The periph_clk_sel and periph2_clk_sel are registered by imx_clk_busy_mux() which does not set this flag anyway, so they need no change. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
* ENGR00318063-4: ARM: imx: drop flag CLK_SET_RATE_NO_REPARENT for ↵Shawn Guo2014-06-25
| | | | | | | | | | | | | | imx_clk_mux_flags All the users of function imx_clk_mux_flags() set CLK_SET_RATE_PARENT to request rate change propagatiopn up to parent. In this case, it should be good to clear flag CLK_SET_RATE_NO_REPARENT to let clk core find the best parent clock for the requested rate. Let's drop flag CLK_SET_RATE_NO_REPARENT for imx_clk_mux_flags(), so that function imx_clk_mux_flags_reparent() can just be saved. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
* ENGR00318063-3: ARM: imx6sx: fix ocram_sels mux settingShawn Guo2014-06-25
| | | | | | | | | | | | | | | The current imx6sx clock driver combines two mux clocks ocram_alt_sel and ocram_sel into one, while ocram_alt_sel is a glitchy mux and ocram_sel is a glitchless one. Fix it to match the clock tree in Reference Manual. One thing clk API clients need to take care is that clk_set_parent() can be called on glitchy ocram_alt_sel only when ocram_sel selects the other path, i.e. periph. Otherwise, a glitch could be generated on ocram_alt_sel and get propagated into the divider ocram_podf. In that case, ocram_podf gets locked up and ocram clock has no output. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
* ENGR00318063-2: ARM: imx6q: fix axi_sels mux settingShawn Guo2014-06-25
| | | | | | | | | | | | | | | | | | The current imx6q clock driver combines two mux clocks axi_alt_sel and axi_sel into one, while axi_alt_sel is a glitchy mux and axi_sel is a glitchless one. Fix it to match the clock tree in Reference Manual, and update busfreq driver regarding parent switching on that. Note, the parent checking before calling clk_set_parent() in busfreq driver isn't really necessary, because clk API will make the check and do nothing if the new parent is the same one as the old. One thing clk API clients need to take care is that clk_set_parent() can be called on glitchy axi_alt_sel only when axi_sel selects the other path, i.e. periph. Otherwise, a glitch could be generated on axi_alt_sel and get propagated into the divider axi_podf. In that case, axi_podf gets locked up and axi clock has no output. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
* ENGR00318063-1: ARM: imx6sl: fix clock name in ocram_selsShawn Guo2014-06-25
| | | | | | | | The clock IMX6SL_CLK_OCRAM_ALT_SEL is registered with name "ocram_alt_sel", so the name in ocram_sels should be "ocram_alt_sel" than "ocram_alt_sels". Signed-off-by: Shawn Guo <shawn.guo@freescale.com>