forked from Minki/linux
MTD changes for 4.14:
General updates: * Constify pci_device_id in various drivers * Constify device_type * Remove pad control code from the Gemini driver * Use %pOF to print OF node full_name * Various fixes in the physmap_of driver * Remove unused vars in mtdswap * Check devm_kzalloc() return value in the spear_smi driver * Check clk_prepare_enable() return code in the st_spi_fsm driver * Create per MTD device debugfs enties NAND updates, from Boris Brezillon: * Fix memory leaks in the core * Remove unused NAND locking support * Rename nand.h into rawnand.h (preparing support for spi NANDs) * Use NAND_MAX_ID_LEN where appropriate * Fix support for 20nm Hynix chips * Fix support for Samsung and Hynix SLC NANDs * Various cleanup, improvements and fixes in the qcom driver * Fixes for bugs detected by various static code analysis tools * Fix mxc ooblayout definition * Add a new part_parsers to tmio and sharpsl platform data in order to define a custom list of partition parsers * Request the reset line in exclusive mode in the sunxi driver * Fix a build error in the orion-nand driver when compiled for ARMv4 * Allow 64-bit mvebu platforms to select the PXA3XX driver SPI NOR updates, from Cyrille Pitchen and Marek Vasut: * add support to the JEDEC JESD216B specification (SFDP tables). * add support to the Intel Denverton SPI flash controller. * fix error recovery for Spansion/Cypress SPI NOR memories. * fix 4-byte address management for the Aspeed SPI controller. * add support to some Microchip SST26 memory parts * remove unneeded pinctrl header Write a message for tag: -----BEGIN PGP SIGNATURE----- iQJABAABCAAqBQJZrav6Ixxib3Jpcy5icmV6aWxsb25AZnJlZS1lbGVjdHJvbnMu Y29tAAoJEGXtNgF+CLcABwkP/joDrq09RIC9n5gP+ubJe6O1jKvNWDd6bIVXD3Ke 73R0a0ANwwWlNYWTChTdrb8UeewVS1bzutyy5O2Sbdb6Jc6s7xkfQDTsbET2HWOK S7Lt/zjlC6/6cow59B6h43PGS6wmIFaZD3K+70sGhvFnV8epVUzS2Aa783xS8LXm so2djZOdUYnW+yE0eho24VQR6nS4YP4Vc+7Mm9skjU0ifjB9mJiWRkzoQnqIgORO M+Iab+qjDs9KR/edWh6mZtnvjps0VSW4I40YsClpcgIn550w1DSXe4u6/8Nk+2Bp gfrALls91gob0ocxmEdIyLID+M0410HcN/Lvh36nw+tkkGTaXf0D6mkqzdKNrZ3w yz+UV9uf19kr1c6zFGcCvUlD0btn9KT+F2legnhgURtwUyDFQcaYQlkpDIeEzUMV ZrtzKbSE2v9810YKXjtCnseewdP+Eph/ewN6ODX5yg/fs8K0fyQYTRtYYM50U69X md8zznBBDPhJVu5T2Of7my9V1SxvCP8a7LrKjAXuFHpZ/CHiPe+QOWBgG2L+zXXT e10/rTg7T2pcyKpBvL/3/mCYeJ+Iup3lKT1EHGCXcKnLGecVgOsbvdG+JnvQMI2J FLmu1exvrzi0Gcrs/05hqwyUvkHZ5FB1a+heNOtmQ+h1U0ElXqILyu7brzghupRe 3phO =UgCd -----END PGP SIGNATURE----- Merge tag 'for-linus-20170904' of git://git.infradead.org/linux-mtd Pull MTD updates from Boris Brezillon: "General updates: - Constify pci_device_id in various drivers - Constify device_type - Remove pad control code from the Gemini driver - Use %pOF to print OF node full_name - Various fixes in the physmap_of driver - Remove unused vars in mtdswap - Check devm_kzalloc() return value in the spear_smi driver - Check clk_prepare_enable() return code in the st_spi_fsm driver - Create per MTD device debugfs enties NAND updates, from Boris Brezillon: - Fix memory leaks in the core - Remove unused NAND locking support - Rename nand.h into rawnand.h (preparing support for spi NANDs) - Use NAND_MAX_ID_LEN where appropriate - Fix support for 20nm Hynix chips - Fix support for Samsung and Hynix SLC NANDs - Various cleanup, improvements and fixes in the qcom driver - Fixes for bugs detected by various static code analysis tools - Fix mxc ooblayout definition - Add a new part_parsers to tmio and sharpsl platform data in order to define a custom list of partition parsers - Request the reset line in exclusive mode in the sunxi driver - Fix a build error in the orion-nand driver when compiled for ARMv4 - Allow 64-bit mvebu platforms to select the PXA3XX driver SPI NOR updates, from Cyrille Pitchen and Marek Vasut: - add support to the JEDEC JESD216B specification (SFDP tables). - add support to the Intel Denverton SPI flash controller. - fix error recovery for Spansion/Cypress SPI NOR memories. - fix 4-byte address management for the Aspeed SPI controller. - add support to some Microchip SST26 memory parts - remove unneeded pinctrl header Write a message for tag:" * tag 'for-linus-20170904' of git://git.infradead.org/linux-mtd: (74 commits) mtd: nand: complain loudly when chip->bits_per_cell is not correctly initialized mtd: nand: make Samsung SLC NAND usable again mtd: nand: tmio: Register partitions using the parsers mfd: tmio: Add partition parsers platform data mtd: nand: sharpsl: Register partitions using the parsers mtd: nand: sharpsl: Add partition parsers platform data mtd: nand: qcom: Support for IPQ8074 QPIC NAND controller mtd: nand: qcom: support for IPQ4019 QPIC NAND controller dt-bindings: qcom_nandc: IPQ8074 QPIC NAND documentation dt-bindings: qcom_nandc: IPQ4019 QPIC NAND documentation dt-bindings: qcom_nandc: fix the ipq806x device tree example mtd: nand: qcom: support for different DEV_CMD register offsets mtd: nand: qcom: QPIC data descriptors handling mtd: nand: qcom: enable BAM or ADM mode mtd: nand: qcom: erased codeword detection configuration mtd: nand: qcom: support for read location registers mtd: nand: qcom: support for passing flags in DMA helper functions mtd: nand: qcom: add BAM DMA descriptor handling mtd: nand: qcom: allocate BAM transaction mtd: nand: qcom: DMA mapping support for register read buffer ...
This commit is contained in:
commit
a59e57da49
@ -1,11 +1,20 @@
|
|||||||
* Qualcomm NAND controller
|
* Qualcomm NAND controller
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible: should be "qcom,ipq806x-nand"
|
- compatible: must be one of the following:
|
||||||
|
* "qcom,ipq806x-nand" - for EBI2 NAND controller being used in IPQ806x
|
||||||
|
SoC and it uses ADM DMA
|
||||||
|
* "qcom,ipq4019-nand" - for QPIC NAND controller v1.4.0 being used in
|
||||||
|
IPQ4019 SoC and it uses BAM DMA
|
||||||
|
* "qcom,ipq8074-nand" - for QPIC NAND controller v1.5.0 being used in
|
||||||
|
IPQ8074 SoC and it uses BAM DMA
|
||||||
|
|
||||||
- reg: MMIO address range
|
- reg: MMIO address range
|
||||||
- clocks: must contain core clock and always on clock
|
- clocks: must contain core clock and always on clock
|
||||||
- clock-names: must contain "core" for the core clock and "aon" for the
|
- clock-names: must contain "core" for the core clock and "aon" for the
|
||||||
always on clock
|
always on clock
|
||||||
|
|
||||||
|
EBI2 specific properties:
|
||||||
- dmas: DMA specifier, consisting of a phandle to the ADM DMA
|
- dmas: DMA specifier, consisting of a phandle to the ADM DMA
|
||||||
controller node and the channel number to be used for
|
controller node and the channel number to be used for
|
||||||
NAND. Refer to dma.txt and qcom_adm.txt for more details
|
NAND. Refer to dma.txt and qcom_adm.txt for more details
|
||||||
@ -16,6 +25,12 @@ Required properties:
|
|||||||
- qcom,data-crci: must contain the ADM data type CRCI block instance
|
- qcom,data-crci: must contain the ADM data type CRCI block instance
|
||||||
number specified for the NAND controller on the given
|
number specified for the NAND controller on the given
|
||||||
platform
|
platform
|
||||||
|
|
||||||
|
QPIC specific properties:
|
||||||
|
- dmas: DMA specifier, consisting of a phandle to the BAM DMA
|
||||||
|
and the channel number to be used for NAND. Refer to
|
||||||
|
dma.txt, qcom_bam_dma.txt for more details
|
||||||
|
- dma-names: must contain all 3 channel names : "tx", "rx", "cmd"
|
||||||
- #address-cells: <1> - subnodes give the chip-select number
|
- #address-cells: <1> - subnodes give the chip-select number
|
||||||
- #size-cells: <0>
|
- #size-cells: <0>
|
||||||
|
|
||||||
@ -26,7 +41,6 @@ chip-selects which (may) contain NAND flash chips. Their properties are as
|
|||||||
follows.
|
follows.
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible: should contain "qcom,nandcs"
|
|
||||||
- reg: a single integer representing the chip-select
|
- reg: a single integer representing the chip-select
|
||||||
number (e.g., 0, 1, 2, etc.)
|
number (e.g., 0, 1, 2, etc.)
|
||||||
- #address-cells: see partition.txt
|
- #address-cells: see partition.txt
|
||||||
@ -43,8 +57,8 @@ partition.txt for more detail.
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
nand@1ac00000 {
|
nand-controller@1ac00000 {
|
||||||
compatible = "qcom,ebi2-nandc";
|
compatible = "qcom,ipq806x-nand";
|
||||||
reg = <0x1ac00000 0x800>;
|
reg = <0x1ac00000 0x800>;
|
||||||
|
|
||||||
clocks = <&gcc EBI2_CLK>,
|
clocks = <&gcc EBI2_CLK>,
|
||||||
@ -59,8 +73,7 @@ nand@1ac00000 {
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
|
||||||
nandcs@0 {
|
nand@0 {
|
||||||
compatible = "qcom,nandcs";
|
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
|
|
||||||
nand-ecc-strength = <4>;
|
nand-ecc-strength = <4>;
|
||||||
@ -84,3 +97,43 @@ nand@1ac00000 {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nand-controller@79b0000 {
|
||||||
|
compatible = "qcom,ipq4019-nand";
|
||||||
|
reg = <0x79b0000 0x1000>;
|
||||||
|
|
||||||
|
clocks = <&gcc GCC_QPIC_CLK>,
|
||||||
|
<&gcc GCC_QPIC_AHB_CLK>;
|
||||||
|
clock-names = "core", "aon";
|
||||||
|
|
||||||
|
dmas = <&qpicbam 0>,
|
||||||
|
<&qpicbam 1>,
|
||||||
|
<&qpicbam 2>;
|
||||||
|
dma-names = "tx", "rx", "cmd";
|
||||||
|
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
nand@0 {
|
||||||
|
reg = <0>;
|
||||||
|
nand-ecc-strength = <4>;
|
||||||
|
nand-ecc-step-size = <512>;
|
||||||
|
nand-bus-width = <8>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "boot-nand";
|
||||||
|
reg = <0 0x58a0000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@58a0000 {
|
||||||
|
label = "fs-nand";
|
||||||
|
reg = <0x58a0000 0x4000000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@ -516,7 +516,7 @@ mirrored table is performed.
|
|||||||
|
|
||||||
The most important field in the nand_bbt_descr structure is the
|
The most important field in the nand_bbt_descr structure is the
|
||||||
options field. The options define most of the table properties. Use the
|
options field. The options define most of the table properties. Use the
|
||||||
predefined constants from nand.h to define the options.
|
predefined constants from rawnand.h to define the options.
|
||||||
|
|
||||||
- Number of bits per block
|
- Number of bits per block
|
||||||
|
|
||||||
@ -843,7 +843,7 @@ Chip option constants
|
|||||||
Constants for chip id table
|
Constants for chip id table
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
These constants are defined in nand.h. They are OR-ed together to
|
These constants are defined in rawnand.h. They are OR-ed together to
|
||||||
describe the chip functionality::
|
describe the chip functionality::
|
||||||
|
|
||||||
/* Buswitdh is 16 bit */
|
/* Buswitdh is 16 bit */
|
||||||
@ -865,7 +865,7 @@ describe the chip functionality::
|
|||||||
Constants for runtime options
|
Constants for runtime options
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
These constants are defined in nand.h. They are OR-ed together to
|
These constants are defined in rawnand.h. They are OR-ed together to
|
||||||
describe the functionality::
|
describe the functionality::
|
||||||
|
|
||||||
/* The hw ecc generator provides a syndrome instead a ecc value on read
|
/* The hw ecc generator provides a syndrome instead a ecc value on read
|
||||||
@ -956,7 +956,7 @@ developer. Each struct member has a short description which is marked
|
|||||||
with an [XXX] identifier. See the chapter "Documentation hints" for an
|
with an [XXX] identifier. See the chapter "Documentation hints" for an
|
||||||
explanation.
|
explanation.
|
||||||
|
|
||||||
.. kernel-doc:: include/linux/mtd/nand.h
|
.. kernel-doc:: include/linux/mtd/rawnand.h
|
||||||
:internal:
|
:internal:
|
||||||
|
|
||||||
Public Functions Provided
|
Public Functions Provided
|
||||||
|
@ -9184,7 +9184,7 @@ T: git git://git.infradead.org/linux-mtd.git nand/fixes
|
|||||||
T: git git://git.infradead.org/l2-mtd.git nand/next
|
T: git git://git.infradead.org/l2-mtd.git nand/next
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/mtd/nand/
|
F: drivers/mtd/nand/
|
||||||
F: include/linux/mtd/nand*.h
|
F: include/linux/mtd/*nand*.h
|
||||||
|
|
||||||
NATIVE INSTRUMENTS USB SOUND INTERFACE DRIVER
|
NATIVE INSTRUMENTS USB SOUND INTERFACE DRIVER
|
||||||
M: Daniel Mack <zonque@gmail.com>
|
M: Daniel Mack <zonque@gmail.com>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <linux/input/tps6507x-ts.h>
|
#include <linux/input/tps6507x-ts.h>
|
||||||
#include <linux/mfd/tps6507x.h>
|
#include <linux/mfd/tps6507x.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <linux/spi/eeprom.h>
|
#include <linux/spi/eeprom.h>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <linux/platform_data/pcf857x.h>
|
#include <linux/platform_data/pcf857x.h>
|
||||||
#include <linux/platform_data/at24.h>
|
#include <linux/platform_data/at24.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/phy.h>
|
#include <linux/phy.h>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <media/i2c/adv7343.h>
|
#include <media/i2c/adv7343.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
#include <linux/platform_data/at24.h>
|
#include <linux/platform_data/at24.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/timer.h>
|
#include <linux/timer.h>
|
||||||
#include <linux/ata_platform.h>
|
#include <linux/ata_platform.h>
|
||||||
#include <linux/mv643xx_eth.h>
|
#include <linux/mv643xx_eth.h>
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include <linux/fb.h>
|
#include <linux/fb.h>
|
||||||
|
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <linux/platform_data/video-ep93xx.h>
|
#include <linux/platform_data/video-ep93xx.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <linux/memory.h>
|
#include <linux/memory.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
|
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <linux/i2c-gpio.h>
|
#include <linux/i2c-gpio.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include <linux/smc91x.h>
|
#include <linux/smc91x.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/platform_data/mv_usb.h>
|
#include <linux/platform_data/mv_usb.h>
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <linux/workqueue.h>
|
#include <linux/workqueue.h>
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/timer.h>
|
#include <linux/timer.h>
|
||||||
#include <linux/mv643xx_eth.h>
|
#include <linux/mv643xx_eth.h>
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mv643xx_eth.h>
|
#include <linux/mv643xx_eth.h>
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
#include <linux/serial_reg.h>
|
#include <linux/serial_reg.h>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mv643xx_eth.h>
|
#include <linux/mv643xx_eth.h>
|
||||||
#include <linux/gpio_keys.h>
|
#include <linux/gpio_keys.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mv643xx_eth.h>
|
#include <linux/mv643xx_eth.h>
|
||||||
#include <linux/ata_platform.h>
|
#include <linux/ata_platform.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/timeriomem-rng.h>
|
#include <linux/timeriomem-rng.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/platform_data/pcf857x.h>
|
#include <linux/platform_data/pcf857x.h>
|
||||||
#include <linux/i2c/pxa-i2c.h>
|
#include <linux/i2c/pxa-i2c.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/regulator/max1586.h>
|
#include <linux/regulator/max1586.h>
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include <linux/dm9000.h>
|
#include <linux/dm9000.h>
|
||||||
#include <linux/platform_data/rtc-v3020.h>
|
#include <linux/platform_data/rtc-v3020.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <linux/mfd/tc6387xb.h>
|
#include <linux/mfd/tc6387xb.h>
|
||||||
#include <linux/mfd/tc6393xb.h>
|
#include <linux/mfd/tc6393xb.h>
|
||||||
#include <linux/mfd/t7l66xb.h>
|
#include <linux/mfd/t7l66xb.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/usb/gpio_vbus.h>
|
#include <linux/usb/gpio_vbus.h>
|
||||||
#include <linux/memblock.h>
|
#include <linux/memblock.h>
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <linux/wm97xx.h>
|
#include <linux/wm97xx.h>
|
||||||
#include <linux/power_supply.h>
|
#include <linux/power_supply.h>
|
||||||
#include <linux/usb/gpio_vbus.h>
|
#include <linux/usb/gpio_vbus.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <linux/mmc/host.h>
|
#include <linux/mmc/host.h>
|
||||||
#include <linux/mfd/tc6393xb.h>
|
#include <linux/mfd/tc6393xb.h>
|
||||||
#include <linux/mfd/tmio.h>
|
#include <linux/mfd/tmio.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/pm.h>
|
#include <linux/pm.h>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include <linux/platform_data/i2c-s3c2410.h>
|
#include <linux/platform_data/i2c-s3c2410.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
#include <linux/platform_data/i2c-s3c2410.h>
|
#include <linux/platform_data/i2c-s3c2410.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <linux/serial_8250.h>
|
#include <linux/serial_8250.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
#include <linux/mfd/pcf50633/pmic.h>
|
#include <linux/mfd/pcf50633/pmic.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
#include <linux/platform_data/usb-s3c2410_udc.h>
|
#include <linux/platform_data/usb-s3c2410_udc.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include <linux/platform_data/i2c-s3c2410.h>
|
#include <linux/platform_data/i2c-s3c2410.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include <linux/spi/spi_gpio.h>
|
#include <linux/spi/spi_gpio.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include <linux/serial.h>
|
#include <linux/serial.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/memblock.h>
|
#include <linux/memblock.h>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/plat-ram.h>
|
#include <linux/mtd/plat-ram.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/plat-ram.h>
|
#include <linux/mtd/plat-ram.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/plat-ram.h>
|
#include <linux/mtd/plat-ram.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <linux/spi/flash.h>
|
#include <linux/spi/flash.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <arch/memmap.h>
|
#include <arch/memmap.h>
|
||||||
#include <hwregs/reg_map.h>
|
#include <hwregs/reg_map.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <arch/memmap.h>
|
#include <arch/memmap.h>
|
||||||
#include <hwregs/reg_map.h>
|
#include <hwregs/reg_map.h>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <linux/leds.h>
|
#include <linux/leds.h>
|
||||||
#include <linux/mmc/host.h>
|
#include <linux/mmc/host.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/serial_8250.h>
|
#include <linux/serial_8250.h>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <linux/mmc/host.h>
|
#include <linux/mmc/host.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/smsc911x.h>
|
#include <linux/smsc911x.h>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/pm.h>
|
#include <linux/pm.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#ifndef __ASM_MACH_JZ4740_JZ4740_NAND_H__
|
#ifndef __ASM_MACH_JZ4740_JZ4740_NAND_H__
|
||||||
#define __ASM_MACH_JZ4740_JZ4740_NAND_H__
|
#define __ASM_MACH_JZ4740_JZ4740_NAND_H__
|
||||||
|
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
#define JZ_NAND_NUM_BANKS 4
|
#define JZ_NAND_NUM_BANKS 4
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
#include <asm/netlogic/haldefs.h>
|
#include <asm/netlogic/haldefs.h>
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <linux/resource.h>
|
#include <linux/resource.h>
|
||||||
#include <linux/serial.h>
|
#include <linux/serial.h>
|
||||||
#include <linux/serial_pnx8xxx.h>
|
#include <linux/serial_pnx8xxx.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
#include <irq.h>
|
#include <irq.h>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <linux/ctype.h>
|
#include <linux/ctype.h>
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include <linux/mmc/host.h>
|
#include <linux/mmc/host.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/mfd/tmio.h>
|
#include <linux/mfd/tmio.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
#include <linux/regulator/fixed.h>
|
#include <linux/regulator/fixed.h>
|
||||||
#include <linux/regulator/machine.h>
|
#include <linux/regulator/machine.h>
|
||||||
|
@ -1809,37 +1809,22 @@ static int dbg_protection_show(struct seq_file *s, void *p)
|
|||||||
}
|
}
|
||||||
DEBUGFS_RO_ATTR(protection, dbg_protection_show);
|
DEBUGFS_RO_ATTR(protection, dbg_protection_show);
|
||||||
|
|
||||||
static int __init doc_dbg_register(struct docg3 *docg3)
|
static void __init doc_dbg_register(struct mtd_info *floor)
|
||||||
{
|
{
|
||||||
struct dentry *root, *entry;
|
struct dentry *root = floor->dbg.dfs_dir;
|
||||||
|
struct docg3 *docg3 = floor->priv;
|
||||||
|
|
||||||
root = debugfs_create_dir("docg3", NULL);
|
if (IS_ERR_OR_NULL(root))
|
||||||
if (!root)
|
return;
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
entry = debugfs_create_file("flashcontrol", S_IRUSR, root, docg3,
|
debugfs_create_file("docg3_flashcontrol", S_IRUSR, root, docg3,
|
||||||
&flashcontrol_fops);
|
&flashcontrol_fops);
|
||||||
if (entry)
|
debugfs_create_file("docg3_asic_mode", S_IRUSR, root, docg3,
|
||||||
entry = debugfs_create_file("asic_mode", S_IRUSR, root,
|
&asic_mode_fops);
|
||||||
docg3, &asic_mode_fops);
|
debugfs_create_file("docg3_device_id", S_IRUSR, root, docg3,
|
||||||
if (entry)
|
&device_id_fops);
|
||||||
entry = debugfs_create_file("device_id", S_IRUSR, root,
|
debugfs_create_file("docg3_protection", S_IRUSR, root, docg3,
|
||||||
docg3, &device_id_fops);
|
&protection_fops);
|
||||||
if (entry)
|
|
||||||
entry = debugfs_create_file("protection", S_IRUSR, root,
|
|
||||||
docg3, &protection_fops);
|
|
||||||
if (entry) {
|
|
||||||
docg3->debugfs_root = root;
|
|
||||||
return 0;
|
|
||||||
} else {
|
|
||||||
debugfs_remove_recursive(root);
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void doc_dbg_unregister(struct docg3 *docg3)
|
|
||||||
{
|
|
||||||
debugfs_remove_recursive(docg3->debugfs_root);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2114,6 +2099,8 @@ static int __init docg3_probe(struct platform_device *pdev)
|
|||||||
0);
|
0);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_probe;
|
goto err_probe;
|
||||||
|
|
||||||
|
doc_dbg_register(cascade->floors[floor]);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = doc_register_sysfs(pdev, cascade);
|
ret = doc_register_sysfs(pdev, cascade);
|
||||||
@ -2121,7 +2108,6 @@ static int __init docg3_probe(struct platform_device *pdev)
|
|||||||
goto err_probe;
|
goto err_probe;
|
||||||
|
|
||||||
platform_set_drvdata(pdev, cascade);
|
platform_set_drvdata(pdev, cascade);
|
||||||
doc_dbg_register(cascade->floors[0]->priv);
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
notfound:
|
notfound:
|
||||||
@ -2148,7 +2134,6 @@ static int docg3_release(struct platform_device *pdev)
|
|||||||
int floor;
|
int floor;
|
||||||
|
|
||||||
doc_unregister_sysfs(pdev, cascade);
|
doc_unregister_sysfs(pdev, cascade);
|
||||||
doc_dbg_unregister(docg3);
|
|
||||||
for (floor = 0; floor < DOC_MAX_NBFLOORS; floor++)
|
for (floor = 0; floor < DOC_MAX_NBFLOORS; floor++)
|
||||||
if (cascade->floors[floor])
|
if (cascade->floors[floor])
|
||||||
doc_release_device(cascade->floors[floor]);
|
doc_release_device(cascade->floors[floor]);
|
||||||
|
@ -299,7 +299,6 @@ struct docg3_cascade {
|
|||||||
* @oob_autoecc: if 1, use only bytes 0-7, 15, and fill the others with HW ECC
|
* @oob_autoecc: if 1, use only bytes 0-7, 15, and fill the others with HW ECC
|
||||||
* if 0, use all the 16 bytes.
|
* if 0, use all the 16 bytes.
|
||||||
* @oob_write_buf: prepared OOB for next page_write
|
* @oob_write_buf: prepared OOB for next page_write
|
||||||
* @debugfs_root: debugfs root node
|
|
||||||
*/
|
*/
|
||||||
struct docg3 {
|
struct docg3 {
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
@ -312,7 +311,6 @@ struct docg3 {
|
|||||||
loff_t oob_write_ofs;
|
loff_t oob_write_ofs;
|
||||||
int oob_autoecc;
|
int oob_autoecc;
|
||||||
u8 oob_write_buf[DOC_LAYOUT_OOB_SIZE];
|
u8 oob_write_buf[DOC_LAYOUT_OOB_SIZE];
|
||||||
struct dentry *debugfs_root;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define doc_err(fmt, arg...) dev_err(docg3->dev, (fmt), ## arg)
|
#define doc_err(fmt, arg...) dev_err(docg3->dev, (fmt), ## arg)
|
||||||
|
@ -775,6 +775,8 @@ static int spear_smi_probe_config_dt(struct platform_device *pdev,
|
|||||||
pdata->board_flash_info = devm_kzalloc(&pdev->dev,
|
pdata->board_flash_info = devm_kzalloc(&pdev->dev,
|
||||||
sizeof(*pdata->board_flash_info),
|
sizeof(*pdata->board_flash_info),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
if (!pdata->board_flash_info)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
/* Fill structs for each subnode (flash device) */
|
/* Fill structs for each subnode (flash device) */
|
||||||
while ((pp = of_get_next_child(np, pp))) {
|
while ((pp = of_get_next_child(np, pp))) {
|
||||||
|
@ -2073,15 +2073,17 @@ static int stfsm_probe(struct platform_device *pdev)
|
|||||||
ret = stfsm_init(fsm);
|
ret = stfsm_init(fsm);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "Failed to initialise FSM Controller\n");
|
dev_err(&pdev->dev, "Failed to initialise FSM Controller\n");
|
||||||
return ret;
|
goto err_clk_unprepare;
|
||||||
}
|
}
|
||||||
|
|
||||||
stfsm_fetch_platform_configs(pdev);
|
stfsm_fetch_platform_configs(pdev);
|
||||||
|
|
||||||
/* Detect SPI FLASH device */
|
/* Detect SPI FLASH device */
|
||||||
info = stfsm_jedec_probe(fsm);
|
info = stfsm_jedec_probe(fsm);
|
||||||
if (!info)
|
if (!info) {
|
||||||
return -ENODEV;
|
ret = -ENODEV;
|
||||||
|
goto err_clk_unprepare;
|
||||||
|
}
|
||||||
fsm->info = info;
|
fsm->info = info;
|
||||||
|
|
||||||
/* Use device size to determine address width */
|
/* Use device size to determine address width */
|
||||||
@ -2095,11 +2097,11 @@ static int stfsm_probe(struct platform_device *pdev)
|
|||||||
if (info->config) {
|
if (info->config) {
|
||||||
ret = info->config(fsm);
|
ret = info->config(fsm);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto err_clk_unprepare;
|
||||||
} else {
|
} else {
|
||||||
ret = stfsm_prepare_rwe_seqs_default(fsm);
|
ret = stfsm_prepare_rwe_seqs_default(fsm);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto err_clk_unprepare;
|
||||||
}
|
}
|
||||||
|
|
||||||
fsm->mtd.name = info->name;
|
fsm->mtd.name = info->name;
|
||||||
@ -2124,6 +2126,10 @@ static int stfsm_probe(struct platform_device *pdev)
|
|||||||
fsm->mtd.erasesize, (fsm->mtd.erasesize >> 10));
|
fsm->mtd.erasesize, (fsm->mtd.erasesize >> 10));
|
||||||
|
|
||||||
return mtd_device_register(&fsm->mtd, NULL, 0);
|
return mtd_device_register(&fsm->mtd, NULL, 0);
|
||||||
|
|
||||||
|
err_clk_unprepare:
|
||||||
|
clk_disable_unprepare(fsm->clk);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int stfsm_remove(struct platform_device *pdev)
|
static int stfsm_remove(struct platform_device *pdev)
|
||||||
@ -2147,9 +2153,7 @@ static int stfsmfsm_resume(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct stfsm *fsm = dev_get_drvdata(dev);
|
struct stfsm *fsm = dev_get_drvdata(dev);
|
||||||
|
|
||||||
clk_prepare_enable(fsm->clk);
|
return clk_prepare_enable(fsm->clk);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nftl.h>
|
#include <linux/mtd/nftl.h>
|
||||||
#include <linux/mtd/inftl.h>
|
#include <linux/mtd/inftl.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include <asm/errno.h>
|
#include <asm/errno.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
@ -296,7 +296,7 @@ static void amd76xrom_remove_one(struct pci_dev *pdev)
|
|||||||
amd76xrom_cleanup(window);
|
amd76xrom_cleanup(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id amd76xrom_pci_tbl[] = {
|
static const struct pci_device_id amd76xrom_pci_tbl[] = {
|
||||||
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410,
|
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410,
|
||||||
PCI_ANY_ID, PCI_ANY_ID, },
|
PCI_ANY_ID, PCI_ANY_ID, },
|
||||||
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7440,
|
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7440,
|
||||||
@ -319,7 +319,7 @@ static struct pci_driver amd76xrom_driver = {
|
|||||||
static int __init init_amd76xrom(void)
|
static int __init init_amd76xrom(void)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev;
|
struct pci_dev *pdev;
|
||||||
struct pci_device_id *id;
|
const struct pci_device_id *id;
|
||||||
pdev = NULL;
|
pdev = NULL;
|
||||||
for(id = amd76xrom_pci_tbl; id->vendor; id++) {
|
for(id = amd76xrom_pci_tbl; id->vendor; id++) {
|
||||||
pdev = pci_get_device(id->vendor, id->device, NULL);
|
pdev = pci_get_device(id->vendor, id->device, NULL);
|
||||||
|
@ -326,7 +326,7 @@ static void ck804xrom_remove_one(struct pci_dev *pdev)
|
|||||||
ck804xrom_cleanup(window);
|
ck804xrom_cleanup(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id ck804xrom_pci_tbl[] = {
|
static const struct pci_device_id ck804xrom_pci_tbl[] = {
|
||||||
{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0051), .driver_data = DEV_CK804 },
|
{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0051), .driver_data = DEV_CK804 },
|
||||||
{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0360), .driver_data = DEV_MCP55 },
|
{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0360), .driver_data = DEV_MCP55 },
|
||||||
{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0361), .driver_data = DEV_MCP55 },
|
{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0361), .driver_data = DEV_MCP55 },
|
||||||
@ -353,7 +353,7 @@ static struct pci_driver ck804xrom_driver = {
|
|||||||
static int __init init_ck804xrom(void)
|
static int __init init_ck804xrom(void)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev;
|
struct pci_dev *pdev;
|
||||||
struct pci_device_id *id;
|
const struct pci_device_id *id;
|
||||||
int retVal;
|
int retVal;
|
||||||
pdev = NULL;
|
pdev = NULL;
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@ static void esb2rom_remove_one(struct pci_dev *pdev)
|
|||||||
esb2rom_cleanup(window);
|
esb2rom_cleanup(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id esb2rom_pci_tbl[] = {
|
static const struct pci_device_id esb2rom_pci_tbl[] = {
|
||||||
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0,
|
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0,
|
||||||
PCI_ANY_ID, PCI_ANY_ID, },
|
PCI_ANY_ID, PCI_ANY_ID, },
|
||||||
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,
|
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,
|
||||||
@ -414,7 +414,7 @@ static struct pci_driver esb2rom_driver = {
|
|||||||
static int __init init_esb2rom(void)
|
static int __init init_esb2rom(void)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev;
|
struct pci_dev *pdev;
|
||||||
struct pci_device_id *id;
|
const struct pci_device_id *id;
|
||||||
int retVal;
|
int retVal;
|
||||||
|
|
||||||
pdev = NULL;
|
pdev = NULL;
|
||||||
|
@ -323,7 +323,7 @@ static void ichxrom_remove_one(struct pci_dev *pdev)
|
|||||||
ichxrom_cleanup(window);
|
ichxrom_cleanup(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id ichxrom_pci_tbl[] = {
|
static const struct pci_device_id ichxrom_pci_tbl[] = {
|
||||||
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0,
|
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0,
|
||||||
PCI_ANY_ID, PCI_ANY_ID, },
|
PCI_ANY_ID, PCI_ANY_ID, },
|
||||||
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,
|
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,
|
||||||
@ -351,7 +351,7 @@ static struct pci_driver ichxrom_driver = {
|
|||||||
static int __init init_ichxrom(void)
|
static int __init init_ichxrom(void)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev;
|
struct pci_dev *pdev;
|
||||||
struct pci_device_id *id;
|
const struct pci_device_id *id;
|
||||||
|
|
||||||
pdev = NULL;
|
pdev = NULL;
|
||||||
for (id = ichxrom_pci_tbl; id->vendor; id++) {
|
for (id = ichxrom_pci_tbl; id->vendor; id++) {
|
||||||
|
@ -170,7 +170,7 @@ static int vr_nor_init_maps(struct vr_nor_mtd *p)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id vr_nor_pci_ids[] = {
|
static const struct pci_device_id vr_nor_pci_ids[] = {
|
||||||
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x500D)},
|
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x500D)},
|
||||||
{0,}
|
{0,}
|
||||||
};
|
};
|
||||||
|
@ -228,7 +228,7 @@ static struct mtd_pci_info intel_dc21285_info = {
|
|||||||
* PCI device ID table
|
* PCI device ID table
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct pci_device_id mtd_pci_ids[] = {
|
static const struct pci_device_id mtd_pci_ids[] = {
|
||||||
{
|
{
|
||||||
.vendor = PCI_VENDOR_ID_INTEL,
|
.vendor = PCI_VENDOR_ID_INTEL,
|
||||||
.device = 0x530d,
|
.device = 0x530d,
|
||||||
|
@ -178,8 +178,8 @@ static int of_flash_probe(struct platform_device *dev)
|
|||||||
*/
|
*/
|
||||||
p = of_get_property(dp, "reg", &count);
|
p = of_get_property(dp, "reg", &count);
|
||||||
if (!p || count % reg_tuple_size != 0) {
|
if (!p || count % reg_tuple_size != 0) {
|
||||||
dev_err(&dev->dev, "Malformed reg property on %s\n",
|
dev_err(&dev->dev, "Malformed reg property on %pOF\n",
|
||||||
dev->dev.of_node->full_name);
|
dev->dev.of_node);
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto err_flash_remove;
|
goto err_flash_remove;
|
||||||
}
|
}
|
||||||
@ -235,10 +235,10 @@ static int of_flash_probe(struct platform_device *dev)
|
|||||||
|
|
||||||
err = of_flash_probe_gemini(dev, dp, &info->list[i].map);
|
err = of_flash_probe_gemini(dev, dp, &info->list[i].map);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
goto err_out;
|
||||||
err = of_flash_probe_versatile(dev, dp, &info->list[i].map);
|
err = of_flash_probe_versatile(dev, dp, &info->list[i].map);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
goto err_out;
|
||||||
|
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
info->list[i].map.virt = ioremap(info->list[i].map.phys,
|
info->list[i].map.virt = ioremap(info->list[i].map.phys,
|
||||||
|
@ -43,13 +43,6 @@
|
|||||||
|
|
||||||
#define FLASH_PARALLEL_HIGH_PIN_CNT (1 << 20) /* else low pin cnt */
|
#define FLASH_PARALLEL_HIGH_PIN_CNT (1 << 20) /* else low pin cnt */
|
||||||
|
|
||||||
/* Miscellaneous Control Register */
|
|
||||||
#define GLOBAL_MISC_CTRL 0x30
|
|
||||||
#define FLASH_PADS_MASK 0x07
|
|
||||||
#define NAND_PADS_DISABLE BIT(2)
|
|
||||||
#define PFLASH_PADS_DISABLE BIT(1)
|
|
||||||
#define SFLASH_PADS_DISABLE BIT(0)
|
|
||||||
|
|
||||||
static const struct of_device_id syscon_match[] = {
|
static const struct of_device_id syscon_match[] = {
|
||||||
{ .compatible = "cortina,gemini-syscon" },
|
{ .compatible = "cortina,gemini-syscon" },
|
||||||
{ },
|
{ },
|
||||||
@ -102,15 +95,6 @@ int of_flash_probe_gemini(struct platform_device *pdev,
|
|||||||
map->bankwidth * 8);
|
map->bankwidth * 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Activate parallel (NOR flash) mode */
|
|
||||||
ret = regmap_update_bits(rmap, GLOBAL_MISC_CTRL,
|
|
||||||
FLASH_PADS_MASK,
|
|
||||||
SFLASH_PADS_DISABLE | NAND_PADS_DISABLE);
|
|
||||||
if (ret) {
|
|
||||||
dev_err(dev, "unable to set up physmap pads\n");
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
dev_info(&pdev->dev, "initialized Gemini-specific physmap control\n");
|
dev_info(&pdev->dev, "initialized Gemini-specific physmap control\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -97,7 +97,7 @@ static const struct of_device_id ebi_match[] = {
|
|||||||
static int ap_flash_init(struct platform_device *pdev)
|
static int ap_flash_init(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device_node *ebi;
|
struct device_node *ebi;
|
||||||
static void __iomem *ebi_base;
|
void __iomem *ebi_base;
|
||||||
u32 val;
|
u32 val;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@ int uflash_devinit(struct platform_device *op, struct device_node *dp)
|
|||||||
/* Non-CFI userflash device-- once I find one we
|
/* Non-CFI userflash device-- once I find one we
|
||||||
* can work on supporting it.
|
* can work on supporting it.
|
||||||
*/
|
*/
|
||||||
printk(KERN_ERR PFX "Unsupported device at %s, 0x%llx\n",
|
printk(KERN_ERR PFX "Unsupported device at %pOF, 0x%llx\n",
|
||||||
dp->full_name, (unsigned long long)op->resource[0].start);
|
dp, (unsigned long long)op->resource[0].start);
|
||||||
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/reboot.h>
|
#include <linux/reboot.h>
|
||||||
#include <linux/leds.h>
|
#include <linux/leds.h>
|
||||||
|
#include <linux/debugfs.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
@ -339,7 +340,7 @@ static struct attribute *mtd_attrs[] = {
|
|||||||
};
|
};
|
||||||
ATTRIBUTE_GROUPS(mtd);
|
ATTRIBUTE_GROUPS(mtd);
|
||||||
|
|
||||||
static struct device_type mtd_devtype = {
|
static const struct device_type mtd_devtype = {
|
||||||
.name = "mtd",
|
.name = "mtd",
|
||||||
.groups = mtd_groups,
|
.groups = mtd_groups,
|
||||||
.release = mtd_release,
|
.release = mtd_release,
|
||||||
@ -477,6 +478,8 @@ int mtd_pairing_groups(struct mtd_info *mtd)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mtd_pairing_groups);
|
EXPORT_SYMBOL_GPL(mtd_pairing_groups);
|
||||||
|
|
||||||
|
static struct dentry *dfs_dir_mtd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add_mtd_device - register an MTD device
|
* add_mtd_device - register an MTD device
|
||||||
* @mtd: pointer to new MTD device info structure
|
* @mtd: pointer to new MTD device info structure
|
||||||
@ -552,6 +555,14 @@ int add_mtd_device(struct mtd_info *mtd)
|
|||||||
if (error)
|
if (error)
|
||||||
goto fail_added;
|
goto fail_added;
|
||||||
|
|
||||||
|
if (!IS_ERR_OR_NULL(dfs_dir_mtd)) {
|
||||||
|
mtd->dbg.dfs_dir = debugfs_create_dir(dev_name(&mtd->dev), dfs_dir_mtd);
|
||||||
|
if (IS_ERR_OR_NULL(mtd->dbg.dfs_dir)) {
|
||||||
|
pr_debug("mtd device %s won't show data in debugfs\n",
|
||||||
|
dev_name(&mtd->dev));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
device_create(&mtd_class, mtd->dev.parent, MTD_DEVT(i) + 1, NULL,
|
device_create(&mtd_class, mtd->dev.parent, MTD_DEVT(i) + 1, NULL,
|
||||||
"mtd%dro", i);
|
"mtd%dro", i);
|
||||||
|
|
||||||
@ -594,6 +605,8 @@ int del_mtd_device(struct mtd_info *mtd)
|
|||||||
|
|
||||||
mutex_lock(&mtd_table_mutex);
|
mutex_lock(&mtd_table_mutex);
|
||||||
|
|
||||||
|
debugfs_remove_recursive(mtd->dbg.dfs_dir);
|
||||||
|
|
||||||
if (idr_find(&mtd_idr, mtd->index) != mtd) {
|
if (idr_find(&mtd_idr, mtd->index) != mtd) {
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto out_error;
|
goto out_error;
|
||||||
@ -1811,6 +1824,8 @@ static int __init init_mtd(void)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto out_procfs;
|
goto out_procfs;
|
||||||
|
|
||||||
|
dfs_dir_mtd = debugfs_create_dir("mtd", NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_procfs:
|
out_procfs:
|
||||||
@ -1826,6 +1841,7 @@ err_reg:
|
|||||||
|
|
||||||
static void __exit cleanup_mtd(void)
|
static void __exit cleanup_mtd(void)
|
||||||
{
|
{
|
||||||
|
debugfs_remove_recursive(dfs_dir_mtd);
|
||||||
cleanup_mtdchar();
|
cleanup_mtdchar();
|
||||||
if (proc_mtd)
|
if (proc_mtd)
|
||||||
remove_proc_entry("mtd", NULL);
|
remove_proc_entry("mtd", NULL);
|
||||||
|
@ -138,8 +138,6 @@ struct mtdswap_dev {
|
|||||||
|
|
||||||
char *page_buf;
|
char *page_buf;
|
||||||
char *oob_buf;
|
char *oob_buf;
|
||||||
|
|
||||||
struct dentry *debugfs_root;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mtdswap_oobdata {
|
struct mtdswap_oobdata {
|
||||||
@ -1315,29 +1313,19 @@ static const struct file_operations mtdswap_fops = {
|
|||||||
|
|
||||||
static int mtdswap_add_debugfs(struct mtdswap_dev *d)
|
static int mtdswap_add_debugfs(struct mtdswap_dev *d)
|
||||||
{
|
{
|
||||||
struct gendisk *gd = d->mbd_dev->disk;
|
struct dentry *root = d->mtd->dbg.dfs_dir;
|
||||||
struct device *dev = disk_to_dev(gd);
|
|
||||||
|
|
||||||
struct dentry *root;
|
|
||||||
struct dentry *dent;
|
struct dentry *dent;
|
||||||
|
|
||||||
root = debugfs_create_dir(gd->disk_name, NULL);
|
if (!IS_ENABLED(CONFIG_DEBUG_FS))
|
||||||
if (IS_ERR(root))
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!root) {
|
if (IS_ERR_OR_NULL(root))
|
||||||
dev_err(dev, "failed to initialize debugfs\n");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
d->debugfs_root = root;
|
dent = debugfs_create_file("mtdswap_stats", S_IRUSR, root, d,
|
||||||
|
|
||||||
dent = debugfs_create_file("stats", S_IRUSR, root, d,
|
|
||||||
&mtdswap_fops);
|
&mtdswap_fops);
|
||||||
if (!dent) {
|
if (!dent) {
|
||||||
dev_err(d->dev, "debugfs_create_file failed\n");
|
dev_err(d->dev, "debugfs_create_file failed\n");
|
||||||
debugfs_remove_recursive(root);
|
|
||||||
d->debugfs_root = NULL;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1540,7 +1528,6 @@ static void mtdswap_remove_dev(struct mtd_blktrans_dev *dev)
|
|||||||
{
|
{
|
||||||
struct mtdswap_dev *d = MTDSWAP_MBD_TO_MTDSWAP(dev);
|
struct mtdswap_dev *d = MTDSWAP_MBD_TO_MTDSWAP(dev);
|
||||||
|
|
||||||
debugfs_remove_recursive(d->debugfs_root);
|
|
||||||
del_mtd_blktrans_dev(dev);
|
del_mtd_blktrans_dev(dev);
|
||||||
mtdswap_cleanup(d);
|
mtdswap_cleanup(d);
|
||||||
kfree(d);
|
kfree(d);
|
||||||
|
@ -315,7 +315,7 @@ config MTD_NAND_ATMEL
|
|||||||
|
|
||||||
config MTD_NAND_PXA3xx
|
config MTD_NAND_PXA3xx
|
||||||
tristate "NAND support on PXA3xx and Armada 370/XP"
|
tristate "NAND support on PXA3xx and Armada 370/XP"
|
||||||
depends on PXA3xx || ARCH_MMP || PLAT_ORION
|
depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU
|
||||||
help
|
help
|
||||||
This enables the driver for the NAND flash device found on
|
This enables the driver for the NAND flash device found on
|
||||||
PXA3xx processors (NFCv1) and also on Armada 370/XP (NFCv2).
|
PXA3xx processors (NFCv1) and also on Armada 370/XP (NFCv2).
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/platform_data/gpio-omap.h>
|
#include <linux/platform_data/gpio-omap.h>
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
#include <linux/mfd/syscon/atmel-matrix.h>
|
#include <linux/mfd/syscon/atmel-matrix.h>
|
||||||
#include <linux/mfd/syscon/atmel-smc.h>
|
#include <linux/mfd/syscon/atmel-smc.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/of_address.h>
|
#include <linux/of_address.h>
|
||||||
#include <linux/of_irq.h>
|
#include <linux/of_irq.h>
|
||||||
#include <linux/of_platform.h>
|
#include <linux/of_platform.h>
|
||||||
@ -2091,8 +2091,8 @@ atmel_hsmc_nand_controller_legacy_init(struct atmel_hsmc_nand_controller *nc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
nc->irq = of_irq_get(nand_np, 0);
|
nc->irq = of_irq_get(nand_np, 0);
|
||||||
if (nc->irq < 0) {
|
if (nc->irq <= 0) {
|
||||||
ret = nc->irq;
|
ret = nc->irq ?: -ENXIO;
|
||||||
if (ret != -EPROBE_DEFER)
|
if (ret != -EPROBE_DEFER)
|
||||||
dev_err(dev, "Failed to get IRQ number (err = %d)\n",
|
dev_err(dev, "Failed to get IRQ number (err = %d)\n",
|
||||||
ret);
|
ret);
|
||||||
@ -2183,11 +2183,12 @@ atmel_hsmc_nand_controller_init(struct atmel_hsmc_nand_controller *nc)
|
|||||||
|
|
||||||
nc->irq = of_irq_get(np, 0);
|
nc->irq = of_irq_get(np, 0);
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
if (nc->irq < 0) {
|
if (nc->irq <= 0) {
|
||||||
if (nc->irq != -EPROBE_DEFER)
|
ret = nc->irq ?: -ENXIO;
|
||||||
|
if (ret != -EPROBE_DEFER)
|
||||||
dev_err(dev, "Failed to get IRQ number (err = %d)\n",
|
dev_err(dev, "Failed to get IRQ number (err = %d)\n",
|
||||||
nc->irq);
|
ret);
|
||||||
return nc->irq;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
np = of_parse_phandle(dev->of_node, "atmel,nfc-io", 0);
|
np = of_parse_phandle(dev->of_node, "atmel,nfc-io", 0);
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#include <linux/genalloc.h>
|
#include <linux/genalloc.h>
|
||||||
#include <linux/iopoll.h>
|
#include <linux/iopoll.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/of_irq.h>
|
#include <linux/of_irq.h>
|
||||||
#include <linux/of_platform.h>
|
#include <linux/of_platform.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
|
|
||||||
struct bcm47xxnflash {
|
struct bcm47xxnflash {
|
||||||
struct bcma_drv_cc *cc;
|
struct bcma_drv_cc *cc;
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/of_platform.h>
|
#include <linux/of_platform.h>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#undef DEBUG
|
#undef DEBUG
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/rslib.h>
|
#include <linux/rslib.h>
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* CM-X270 board.
|
* CM-X270 board.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/of_device.h>
|
#include <linux/of_device.h>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#define __DENALI_H__
|
#define __DENALI_H__
|
||||||
|
|
||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
|
|
||||||
#define DEVICE_RESET 0x0
|
#define DEVICE_RESET 0x0
|
||||||
#define DEVICE_RESET__BANK(bank) BIT(bank)
|
#define DEVICE_RESET__BANK(bank) BIT(bank)
|
||||||
|
@ -118,7 +118,9 @@ static int denali_dt_probe(struct platform_device *pdev)
|
|||||||
dev_err(&pdev->dev, "no clk available\n");
|
dev_err(&pdev->dev, "no clk available\n");
|
||||||
return PTR_ERR(dt->clk);
|
return PTR_ERR(dt->clk);
|
||||||
}
|
}
|
||||||
clk_prepare_enable(dt->clk);
|
ret = clk_prepare_enable(dt->clk);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
denali->clk_x_rate = clk_get_rate(dt->clk);
|
denali->clk_x_rate = clk_get_rate(dt->clk);
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/doc2000.h>
|
#include <linux/mtd/doc2000.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/inftl.h>
|
#include <linux/mtd/inftl.h>
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/bch.h>
|
#include <linux/bch.h>
|
||||||
#include <linux/bitrev.h>
|
#include <linux/bitrev.h>
|
||||||
#include <linux/jiffies.h>
|
#include <linux/jiffies.h>
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <linux/of_address.h>
|
#include <linux/of_address.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/fsl_ifc.h>
|
#include <linux/fsl_ifc.h>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/nand_ecc.h>
|
#include <linux/mtd/nand_ecc.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/nand-gpio.h>
|
#include <linux/mtd/nand-gpio.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#ifndef __DRIVERS_MTD_NAND_GPMI_NAND_H
|
#ifndef __DRIVERS_MTD_NAND_GPMI_NAND_H
|
||||||
#define __DRIVERS_MTD_NAND_GPMI_NAND_H
|
#define __DRIVERS_MTD_NAND_GPMI_NAND_H
|
||||||
|
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/dmaengine.h>
|
#include <linux/dmaengine.h>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
|
||||||
#include <linux/jz4780-nemc.h>
|
#include <linux/jz4780-nemc.h>
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
@ -705,7 +705,9 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
|
|||||||
res = -ENOENT;
|
res = -ENOENT;
|
||||||
goto err_exit1;
|
goto err_exit1;
|
||||||
}
|
}
|
||||||
clk_prepare_enable(host->clk);
|
res = clk_prepare_enable(host->clk);
|
||||||
|
if (res)
|
||||||
|
goto err_exit1;
|
||||||
|
|
||||||
nand_chip->cmd_ctrl = lpc32xx_nand_cmd_ctrl;
|
nand_chip->cmd_ctrl = lpc32xx_nand_cmd_ctrl;
|
||||||
nand_chip->dev_ready = lpc32xx_nand_device_ready;
|
nand_chip->dev_ready = lpc32xx_nand_device_ready;
|
||||||
@ -846,9 +848,12 @@ static int lpc32xx_nand_remove(struct platform_device *pdev)
|
|||||||
static int lpc32xx_nand_resume(struct platform_device *pdev)
|
static int lpc32xx_nand_resume(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct lpc32xx_nand_host *host = platform_get_drvdata(pdev);
|
struct lpc32xx_nand_host *host = platform_get_drvdata(pdev);
|
||||||
|
int ret;
|
||||||
|
|
||||||
/* Re-enable NAND clock */
|
/* Re-enable NAND clock */
|
||||||
clk_prepare_enable(host->clk);
|
ret = clk_prepare_enable(host->clk);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
/* Fresh init of NAND controller */
|
/* Fresh init of NAND controller */
|
||||||
lpc32xx_nand_setup(host);
|
lpc32xx_nand_setup(host);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
@ -840,7 +840,9 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
|
|||||||
res = -ENOENT;
|
res = -ENOENT;
|
||||||
goto err_exit1;
|
goto err_exit1;
|
||||||
}
|
}
|
||||||
clk_prepare_enable(host->clk);
|
res = clk_prepare_enable(host->clk);
|
||||||
|
if (res)
|
||||||
|
goto err_exit1;
|
||||||
|
|
||||||
/* Set NAND IO addresses and command/ready functions */
|
/* Set NAND IO addresses and command/ready functions */
|
||||||
chip->IO_ADDR_R = SLC_DATA(host->io_base);
|
chip->IO_ADDR_R = SLC_DATA(host->io_base);
|
||||||
@ -972,9 +974,12 @@ static int lpc32xx_nand_remove(struct platform_device *pdev)
|
|||||||
static int lpc32xx_nand_resume(struct platform_device *pdev)
|
static int lpc32xx_nand_resume(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct lpc32xx_nand_host *host = platform_get_drvdata(pdev);
|
struct lpc32xx_nand_host *host = platform_get_drvdata(pdev);
|
||||||
|
int ret;
|
||||||
|
|
||||||
/* Re-enable NAND clock */
|
/* Re-enable NAND clock */
|
||||||
clk_prepare_enable(host->clk);
|
ret = clk_prepare_enable(host->clk);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
/* Fresh init of NAND controller */
|
/* Fresh init of NAND controller */
|
||||||
lpc32xx_nand_setup(host);
|
lpc32xx_nand_setup(host);
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/nand.h>
|
#include <linux/mtd/rawnand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/of_address.h>
|
#include <linux/of_address.h>
|
||||||
#include <linux/of_device.h>
|
#include <linux/of_device.h>
|
||||||
|
@ -464,8 +464,8 @@ static int mtk_ecc_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq < 0) {
|
if (irq < 0) {
|
||||||
dev_err(dev, "failed to get irq\n");
|
dev_err(dev, "failed to get irq: %d\n", irq);
|
||||||
return -EINVAL;
|
return irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = dma_set_mask(dev, DMA_BIT_MASK(32));
|
ret = dma_set_mask(dev, DMA_BIT_MASK(32));
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user