mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
This pull request contains the following core changes:
* 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 and the following driver changes: * 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 -----BEGIN PGP SIGNATURE----- iQJABAABCAAqBQJZpwMZIxxib3Jpcy5icmV6aWxsb25AZnJlZS1lbGVjdHJvbnMu Y29tAAoJEGXtNgF+CLcAJEoP/jRnEjPznWT3+ngw6k/rnykkn/wexKV3iyX/6b71 MQT/ZFuT3HsHnUjyprPvyRWJeKun6XyIH5fk7FlXIei9TaWCt6/UGTKousaPKeR2 maggGeEjxGVpHJM/jpIYCyjt83zpezBqTupv52XhXxPaU7ROSpuHCd92YcPzIaT5 tcn8JrI7TGuGlBrBbA2y8ZrPtuug3IKqUfpIiQmoqr0jzQR+AbZKHg0kk5a8piOn OguK67uhxeOvq831bGPehCPDbuE0loNi4CssayJ1HrisfS95kH/cqrveapgKsUG/ fxaHh1i65I0lxa8sgUgeUiU04Zsy1YcgNbCj41AY4AHnjJ0+Qp1cV6KAB/x5/wH9 ES/fW06how+1BLEeLvOr+rIQ41WeP0qV2H3r/PtkeswKKAV3gSERBXVHmg1E7Yum HkmPqzhu+nSk3mP7p3yxpd7EwWQh2xpvVYrfQ5vQbtdfm8Uw9n6S8x+O89ch9wWi +KbMWFsmF78nuRWW3WTsaiOFKcTRLBT5RoU2z4i9hCvQT2Pnx3SBhHrIj6xqBI1S 8MpeDdlXHmRQfZxj+jDqU77JYqVEmy/5it9OjhjMpOqxfCf4K6Nlb75TEdR5Nh/9 BA1qqTBEslg3UqS8ofGFHGFZWrW3JHf02SYo2zU9IvBninh3HrqHiFhBc3p1xNDE 7GwD =bC1+ -----END PGP SIGNATURE----- Merge tag 'nand/for-4.14' of git://git.infradead.org/l2-mtd into mtd/next From Boris: " This pull request contains the following core changes: * 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 and the following driver changes: * 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 "
This commit is contained in:
commit
d1f936d736
134 changed files with 1113 additions and 594 deletions
|
@ -1,7 +1,7 @@
|
|||
#ifndef __LINUX_MTD_NAND_GPIO_H
|
||||
#define __LINUX_MTD_NAND_GPIO_H
|
||||
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/mtd/rawnand.h>
|
||||
|
||||
struct gpio_nand_platdata {
|
||||
int gpio_nce;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
/*
|
||||
* linux/include/linux/mtd/nand.h
|
||||
*
|
||||
* Copyright © 2000-2010 David Woodhouse <dwmw2@infradead.org>
|
||||
* Steven J. Hill <sjhill@realitydiluted.com>
|
||||
* Thomas Gleixner <tglx@linutronix.de>
|
||||
|
@ -15,8 +13,8 @@
|
|||
* Changelog:
|
||||
* See git changelog.
|
||||
*/
|
||||
#ifndef __LINUX_MTD_NAND_H
|
||||
#define __LINUX_MTD_NAND_H
|
||||
#ifndef __LINUX_MTD_RAWNAND_H
|
||||
#define __LINUX_MTD_RAWNAND_H
|
||||
|
||||
#include <linux/wait.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
@ -44,12 +42,6 @@ void nand_release(struct mtd_info *mtd);
|
|||
/* Internal helper for board drivers which need to override command function */
|
||||
void nand_wait_ready(struct mtd_info *mtd);
|
||||
|
||||
/* locks all blocks present in the device */
|
||||
int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
|
||||
|
||||
/* unlocks specified locked blocks */
|
||||
int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
|
||||
|
||||
/* The maximum number of NAND chips in an array */
|
||||
#define NAND_MAX_CHIPS 8
|
||||
|
||||
|
@ -89,10 +81,6 @@ int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
|
|||
#define NAND_CMD_SET_FEATURES 0xef
|
||||
#define NAND_CMD_RESET 0xff
|
||||
|
||||
#define NAND_CMD_LOCK 0x2a
|
||||
#define NAND_CMD_UNLOCK1 0x23
|
||||
#define NAND_CMD_UNLOCK2 0x24
|
||||
|
||||
/* Extended commands for large page devices */
|
||||
#define NAND_CMD_READSTART 0x30
|
||||
#define NAND_CMD_RNDOUTSTART 0xE0
|
||||
|
@ -449,14 +437,16 @@ struct nand_jedec_params {
|
|||
__le16 crc;
|
||||
} __packed;
|
||||
|
||||
/* The maximum expected count of bytes in the NAND ID sequence */
|
||||
#define NAND_MAX_ID_LEN 8
|
||||
|
||||
/**
|
||||
* struct nand_id - NAND id structure
|
||||
* @data: buffer containing the id bytes. Currently 8 bytes large, but can
|
||||
* be extended if required.
|
||||
* @data: buffer containing the id bytes.
|
||||
* @len: ID length.
|
||||
*/
|
||||
struct nand_id {
|
||||
u8 data[8];
|
||||
u8 data[NAND_MAX_ID_LEN];
|
||||
int len;
|
||||
};
|
||||
|
||||
|
@ -1028,8 +1018,6 @@ static inline void *nand_get_manufacturer_data(struct nand_chip *chip)
|
|||
#define NAND_MFR_ATO 0x9b
|
||||
#define NAND_MFR_WINBOND 0xef
|
||||
|
||||
/* The maximum expected count of bytes in the NAND ID sequence */
|
||||
#define NAND_MAX_ID_LEN 8
|
||||
|
||||
/*
|
||||
* A helper for defining older NAND chips where the second ID byte fully
|
||||
|
@ -1246,6 +1234,8 @@ int onfi_init_data_interface(struct nand_chip *chip,
|
|||
*/
|
||||
static inline bool nand_is_slc(struct nand_chip *chip)
|
||||
{
|
||||
WARN(chip->bits_per_cell == 0,
|
||||
"chip->bits_per_cell is used uninitialized\n");
|
||||
return chip->bits_per_cell == 1;
|
||||
}
|
||||
|
||||
|
@ -1328,4 +1318,4 @@ void nand_cleanup(struct nand_chip *chip);
|
|||
|
||||
/* Default extended ID decoding function */
|
||||
void nand_decode_ext_id(struct nand_chip *chip);
|
||||
#endif /* __LINUX_MTD_NAND_H */
|
||||
#endif /* __LINUX_MTD_RAWNAND_H */
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <linux/completion.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/mtd/rawnand.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/pm_qos.h>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/mtd/rawnand.h>
|
||||
#include <linux/mtd/nand_ecc.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
|
||||
|
@ -17,4 +17,5 @@ struct sharpsl_nand_platform_data {
|
|||
const struct mtd_ooblayout_ops *ecc_layout;
|
||||
struct mtd_partition *partitions;
|
||||
unsigned int nr_partitions;
|
||||
const char *const *part_parsers;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue