- 23 9月, 2016 19 次提交
-
-
由 Boris Brezillon 提交于
The NAND framework provides several helpers to query timing modes supported by a NAND chip, but this implies that all NAND controller drivers have to implement the same timings selection dance. Also currently NAND devices can be resetted at arbitrary places which also resets the timing for ONFI chips to timing mode 0. Provide a common logic to select the best timings based on ONFI or ->onfi_timing_mode_default information. Hook this into nand_reset() to make sure the new timing is applied each time during a reset. NAND controller willing to support timings adjustment should just implement the ->setup_data_interface() method. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
-
由 Sascha Hauer 提交于
The nand layer will need ONFI mode 0 to use it as timing mode before and right after reset. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Sascha Hauer 提交于
onfi_init_data_interface() initializes a data interface with values from a given ONFI mode. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Sascha Hauer 提交于
struct nand_data_interface is the designated type to pass to the NAND drivers to configure the timing. To simplify further patches convert the onfi_sdr_timings array from type struct nand_sdr_timings nand_data_interface. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Sascha Hauer 提交于
When NAND devices are resetted some initialization may have to be done, like for example they have to be configured for the timing mode that shall be used. To get a common place where this initialization can be implemented create a nand_reset() function. This currently only issues a NAND_CMD_RESET to the NAND device. The places issuing this command manually are replaced with a call to nand_reset(). Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Roger Quadros 提交于
Some Keystone devices (e.g. K2G) include a OMAP NAND IP. Allow the NAND driver to be usable for both Keystone and OMAP devices. Signed-off-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Ray Jui 提交于
This patch adds big endian and ONFI support for various iProc based SoCs that use the core brcmstb NAND controller This patch was originally implemented by Prafulla Kota <prafulla.kota@broadcom.com> and fully tested on iProc based NS2 SVK Signed-off-by: NPrafulla Kota <prafulla.kota@broadcom.com> Signed-off-by: NRay Jui <ray.jui@broadcom.com> Reviewed-by: NKamal Dasu <kdasu.kdev@gmail.com> Acked-by: NKamal Dasu <kdasu.kdev@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Kyle Roeschley 提交于
If erasing or writing the BBT fails, we should mark the current BBT block as bad and use the BBT descriptor to scan for the next available unused block in the BBT. We should only return a failure if there isn't any space left. Signed-off-by: NKyle Roeschley <kyle.roeschley@ni.com> Suggested-by: NJeff Westfahl <jeff.westfahl@ni.com> Tested-by: NKyle Roeschley <kyle.roeschley@ni.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Boris Brezillon 提交于
This clarifies the write_bbt() function by removing the write label and simplifying the error/exit path. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Tested-by: NKyle Roeschley <kyle.roeschley@ni.com>
-
由 Boris Brezillon 提交于
In the ONFI spec, the tRR_min entry is defined before the tRST_max one. Reoder the definition to make it easier to review. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Boris Brezillon 提交于
ONFI 4.0 spec defines different values for the tADL_min timing. Since we don't want to have different timings depending on the ONFI version, we just set tADL_min to the maximum value (the one specified in the ONFI 4.0 spec). Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Han Xu 提交于
change the way to calculate pagesize to get correct free oob space for legacy_set_geometry function. Signed-off-by: NHan Xu <han.xu@nxp.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Brian Norris 提交于
Some build tools noticed that 'cookie' is being set but not used. Might as well catch the errors here and handle them the same way we handle other DMA prep steps. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Krzysztof Kozlowski 提交于
The driver registered for CPU frequency transitions to recalculate its clock when ARM clock frequency changes (ratio between frequencies of ARM's parent clock (fclk) and clock for peripherals remains fixed). This is needed only on S3C24xx platform when cpufreq driver is enabled so limit the ifdef to respective cpufreq Kconfig. Suggested-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Andrey Smirnov 提交于
Using "goto" and "switch" statement only makes it harder to follow control flow and doesn't bring any advantages. Rewrite the code to avoid using "goto". Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Andrey Smirnov 提交于
If no user specified chip->select_chip() function is provided, code in nand_base.c will automatically set this hook to nand_select_chip(), which in turn depends on chip->cmd_ctrl() hook being valid. Not providing both of those functions in NAND controller driver (for example by mistake) will result in a bit cryptic segfault. Same is true for chip->cmdfunc(). To avoid the above scenario add a check in nand_scan_dent and error out if cmd_ctrl() is not provided. Suggested-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Suggested-by: NBrian Norris <computersforpeace@gmail.com> Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Andrey Smirnov 提交于
Config MTD_NAND_FSL_IFC is already located inside 'if MTD_NAND' statment, so there's no need to explicitly specify it as a dependency. Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Andrey Smirnov 提交于
MTD_NAND_FSL_ELBC selects FSL_LBC that in turn depends on FSL_SOC, so depending on PPC instead of FSL_SOC leads to this message: warning: (MPC836x_RDK && MTD_NAND_FSL_ELBC && MTD_NAND_FSL_UPM) selects FSL_LBC which has unmet direct dependencies (FSL_SOC) when doing make ARCH=powerpc \ CROSS_COMPILE=powerpc-e500v2-linux-gnuspe- \ allmodconfig" Changing dependency to FSL_SOC fixes that. Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Marc Gonzalez 提交于
The code to initialize a struct nand_hw_control is duplicated across several drivers. Factorize it using an inline function. Signed-off-by: NMarc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 08 8月, 2016 3 次提交
-
-
由 Jens Axboe 提交于
Since commit 63a4cc24, bio->bi_rw contains flags in the lower portion and the op code in the higher portions. This means that old code that relies on manually setting bi_rw is most likely going to be broken. Instead of letting that brokeness linger, rename the member, to force old and out-of-tree code to break at compile time instead of at runtime. No intended functional changes in this commit. Signed-off-by: NJens Axboe <axboe@fb.com>
-
由 Jens Axboe 提交于
The original commit missed this function, it needs to mark it a write flush. Cc: Mike Christie <mchristi@redhat.com> Fixes: e742fc32 ("target: use bio op accessors") Signed-off-by: NJens Axboe <axboe@fb.com>
-
由 Jens Axboe 提交于
Commit abf54548 changed it from an 'rw' flags type to the newer ops based interface, but now we're effectively leaking some bdev internals to the rest of the kernel. Since we only care about whether it's a read or a write at that level, just pass in a bool 'is_write' parameter instead. Then we can also move op_is_write() and friends back under CONFIG_BLOCK protection. Reviewed-by: NMike Christie <mchristi@redhat.com> Signed-off-by: NJens Axboe <axboe@fb.com>
-
- 06 8月, 2016 1 次提交
-
-
由 Kees Cook 提交于
Instead of a ramoops-specific node, use a child node of /reserved-memory. This requires that of_platform_device_create() be explicitly called for the node, though, since "/reserved-memory" does not have its own "compatible" property. Suggested-by: NRob Herring <robh@kernel.org> Signed-off-by: NKees Cook <keescook@chromium.org> Acked-by: NRob Herring <robh@kernel.org>
-
- 05 8月, 2016 17 次提交
-
-
由 Allen Hubbe 提交于
Clean up duplicated expression by replacing it with the equivalent local variable pdev. Signed-off-by: NAllen Hubbe <Allen.Hubbe@emc.com> Acked-by: NDave Jiang <dave.jiang@intel.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Allen Hubbe 提交于
It will be useful to know the hardware configured BAR size to diagnose issues with NTB memory windows. Signed-off-by: NAllen Hubbe <Allen.Hubbe@emc.com> Acked-by: NDave Jiang <dave.jiang@intel.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
When the link goes down, the link_is_up flag did not return to false. This could have caused some subtle corner case bugs when the link goes up and down quickly. Once that was fixed, there was found to be a race if the link was brought down then immediately up. The link_cleanup work would occasionally be scheduled after the next link up event. This would cancel the link_work that was supposed to occur and leave ntb_perf in an unusable state. To fix this we get rid of the link_cleanup work and put the actions directly in the link_down event. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NDave Jiang <dave.jiang@intel.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
This commit adds a debugfs 'count' file to ntb_pingpong. This is so testing with ntb_pingpong can be automated beyond just checking the logs for pong messages. The count file returns a number which increments every pong. The counter can be cleared by writing a zero. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NAllen Hubbe <Allen.Hubbe@emc.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
In order to more successfully script with ntb_tool it's useful to have a link file to check the link status so that the script doesn't use the other files until the link is up. This commit adds a 'link' file to the debugfs directory which reads boolean (Y or N) depending on the link status. Writing to the file change the link state using ntb_link_enable or ntb_link_disable. A 'link_event' file is also provided so an application can block until the link changes to the desired state. If the user writes a 1, it will block until the link is up. If the user writes a 0, it will block until the link is down. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NAllen Hubbe <Allen.Hubbe@emc.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
In order to make the interface closer to the raw NTB API, this commit changes memory windows so they are not initialized on link up. Instead, the 'peer_trans*' debugfs files are introduced. When read, they return information provided by ntb_mw_get_range. When written, they create a buffer and initialize the memory window. The value written is taken as the requested size of the buffer (which is then rounded for alignment). Writing a value of zero frees the buffer and tears down the memory window translation. The 'peer_mw*' file is only created once the memory window translation is setup by the user. Additionally, it was noticed that the read and write functions for the 'peer_mw*' files should have checked for a NULL pointer. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NAllen Hubbe <Allen.Hubbe@emc.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
Instead of returning immediately with an error when the link is down, wait for the link to come up (or the user sends a SIGINT). This is to make scripting ntb_perf easier. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NDave Jiang <dave.jiang@intel.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
Instead of having to watch logs, allow the results to be retrieved by reading back the run file. This file will return "running" when the test is running and nothing if no tests have been run yet. It returns 1 line per thread, and will display an error message if the corresponding thread returns an error. With the above change, the pr_info calls that returned the results are then changed to pr_debug calls. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NDave Jiang <dave.jiang@intel.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
This commit accomplishes a few things: 1) Properly prevent multiple sets of threads from running at once using a mutex. Lots of race issues existed with the thread_cleanup. 2) The mutex allows us to ensure that threads are finished before tearing down the device or module. 3) Don't use kthread_stop when the threads can exit by themselves, as this is counter-indicated by the kthread_create documentation. Threads now wait for kthread_stop to occur. 4) Writing to the run file now blocks until the threads are complete. The test can then be safely interrupted by a SIGINT. Also, while I was at it: 5) debugfs_run_write shouldn't return 0 in the early check cases as this could cause debugfs_run_write to loop undesirably. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NDave Jiang <dave.jiang@intel.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
When debugging performance problems, if some issue causes the ntb hardware to be significantly slower than expected, ntb_perf will hang requiring a reboot because it only schedules once every 4GB. Instead, schedule based on jiffies so it will not hang the CPU if the transfer is slow. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NDave Jiang <dave.jiang@intel.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
I'm working on hardware that currently has a limited number of scratchpad registers and ntb_ndev fails with no clue as to why. I feel it is better to fail early and provide a reasonable error message then to fail later on. The same is done to ntb_perf, but it doesn't currently require enough spads to actually fail. I've also removed the unused SPAD_MSG and SPAD_ACK enums so that MAX_SPAD accurately reflects the number of spads used. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NDave Jiang <dave.jiang@intel.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
We allocate some memory window buffers when the link comes up, then we provide debugfs files to read/write each side of the link. This is useful for debugging the mapping when writing new drivers. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NAllen Hubbe <Allen.Hubbe@emc.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
On my system, dma_alloc_coherent won't produce memory anywhere near the size of the BAR. So I needed a way to limit this. It's pretty much copied straight from ntb_transport. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NDave Jiang <dave.jiang@intel.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Dave Jiang 提交于
Currently we only allocate a fixed default number of descriptors for the tx and rx side. We should dynamically resize it to the number of descriptors resides in the transport rings. We should know the number of transmit descriptors at initializaiton. We will allocate the default number of descriptors for receive side and allocate additional ones when we know the actual max entries for receive. Signed-off-by: NDave Jiang <dave.jiang@intel.com> Acked-by: NAllen Hubbe <allen.hubbe@emc.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
On hardware with 32 scratchpad registers the spad field in ntb tool could chop off the end. The maximum buffer size is increased from 256 to 15 times the number or scratchpads. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NAllen Hubbe <Allen.Hubbe@emc.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
If you tried to write two spads in one line, as per the example: root@peer# echo '0 0x01010101 1 0x7f7f7f7f' > $DBG_DIR/peer_spad then the CPU would freeze in an infinite loop. This wasn't immediately obvious but 'pos' was not incrementing the buffer, so after reading the second pair of values, 'pos' would once again be 3 and it would re-read the second pair of values ad infinitum. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NAllen Hubbe <Allen.Hubbe@emc.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Rafael J. Wysocki 提交于
If a PCI bridge (or PCIe port) that is runtime-suspended gets an ACPI hotplug notification, such as a bus check, it has to be resumed before re-scanning the devices below it, or those devices will not be accessible and will be treated as hot-removed. Make that happen and let the bridge suspend again after the bus below it has been re-scanned. This is a replacement for commit 16468c78 ("ACPI / hotplug / PCI: Runtime resume bridge before rescan") that has been reverted, because it introduced a system resume regression (due to missing bridge->pci_dev checks that are necessary in case the notification is targeted at the host bridge) and it is necessary for the code added by commit 006d44e4 ("PCI: Add runtime PM support for PCIe ports") to work as expected. Tested-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-