Commit b0e78154 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'mtd/fixes-for-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux

Pull mtd fixes from Miquel Raynal:
 "MTD core:
   - MAINTAINERS: Add Michal as reviewer instead of Naga
   - mtdchar: Mark bits of ioctl handler noinline

  NAND controller drivers:
   - marvell:
       - Don't set the NAND frequency select
       - Ensure timing values are written
   - ingenic: Fix empty stub helper definitions

  SPI-NOR core:
   - Fix divide by zero for spi-nor-generic flashes

  SPI-NOR manufacturer driver:
   - spansion: make sure local struct does not contain garbage"

* tag 'mtd/fixes-for-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
  mtd: rawnand: marvell: don't set the NAND frequency select
  mtd: rawnand: marvell: ensure timing values are written
  mtdchar: mark bits of ioctl handler noinline
  MAINTAINERS: Add myself as reviewer instead of Naga
  mtd: spi-nor: Fix divide by zero for spi-nor-generic flashes
  mtd: rawnand: ingenic: fix empty stub helper definitions
  mtd: spi-nor: spansion: make sure local struct does not contain garbage
parents 714069da c4d28e30
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1601,7 +1601,7 @@ F: drivers/media/i2c/ar0521.c
ARASAN NAND CONTROLLER DRIVER
M:	Miquel Raynal <miquel.raynal@bootlin.com>
M:	Naga Sureshkumar Relli <nagasure@xilinx.com>
R:	Michal Simek <michal.simek@amd.com>
L:	linux-mtd@lists.infradead.org
S:	Maintained
F:	Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml
@@ -1764,7 +1764,7 @@ F: include/linux/amba/mmci.h
ARM PRIMECELL PL35X NAND CONTROLLER DRIVER
M:	Miquel Raynal <miquel.raynal@bootlin.com>
M:	Naga Sureshkumar Relli <nagasure@xilinx.com>
R:	Michal Simek <michal.simek@amd.com>
L:	linux-mtd@lists.infradead.org
S:	Maintained
F:	Documentation/devicetree/bindings/mtd/arm,pl353-nand-r2p1.yaml
@@ -1772,7 +1772,7 @@ F: drivers/mtd/nand/raw/pl35x-nand-controller.c
ARM PRIMECELL PL35X SMC DRIVER
M:	Miquel Raynal <miquel.raynal@bootlin.com>
M:	Naga Sureshkumar Relli <nagasure@xilinx.com>
R:	Michal Simek <michal.simek@amd.com>
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S:	Maintained
F:	Documentation/devicetree/bindings/memory-controllers/arm,pl35x-smc.yaml
+4 −4
Original line number Diff line number Diff line
@@ -590,8 +590,8 @@ static void adjust_oob_length(struct mtd_info *mtd, uint64_t start,
			    (end_page - start_page + 1) * oob_per_page);
}

static int mtdchar_write_ioctl(struct mtd_info *mtd,
		struct mtd_write_req __user *argp)
static noinline_for_stack int
mtdchar_write_ioctl(struct mtd_info *mtd, struct mtd_write_req __user *argp)
{
	struct mtd_info *master = mtd_get_master(mtd);
	struct mtd_write_req req;
@@ -688,8 +688,8 @@ static int mtdchar_write_ioctl(struct mtd_info *mtd,
	return ret;
}

static int mtdchar_read_ioctl(struct mtd_info *mtd,
		struct mtd_read_req __user *argp)
static noinline_for_stack int
mtdchar_read_ioctl(struct mtd_info *mtd, struct mtd_read_req __user *argp)
{
	struct mtd_info *master = mtd_get_master(mtd);
	struct mtd_read_req req;
+4 −4
Original line number Diff line number Diff line
@@ -36,25 +36,25 @@ int ingenic_ecc_correct(struct ingenic_ecc *ecc,
void ingenic_ecc_release(struct ingenic_ecc *ecc);
struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np);
#else /* CONFIG_MTD_NAND_INGENIC_ECC */
int ingenic_ecc_calculate(struct ingenic_ecc *ecc,
static inline int ingenic_ecc_calculate(struct ingenic_ecc *ecc,
			  struct ingenic_ecc_params *params,
			  const u8 *buf, u8 *ecc_code)
{
	return -ENODEV;
}

int ingenic_ecc_correct(struct ingenic_ecc *ecc,
static inline int ingenic_ecc_correct(struct ingenic_ecc *ecc,
			struct ingenic_ecc_params *params, u8 *buf,
			u8 *ecc_code)
{
	return -ENODEV;
}

void ingenic_ecc_release(struct ingenic_ecc *ecc)
static inline void ingenic_ecc_release(struct ingenic_ecc *ecc)
{
}

struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np)
static inline struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np)
{
	return ERR_PTR(-ENODEV);
}
+6 −4
Original line number Diff line number Diff line
@@ -2457,6 +2457,12 @@ static int marvell_nfc_setup_interface(struct nand_chip *chip, int chipnr,
			NDTR1_WAIT_MODE;
	}

	/*
	 * Reset nfc->selected_chip so the next command will cause the timing
	 * registers to be updated in marvell_nfc_select_target().
	 */
	nfc->selected_chip = NULL;

	return 0;
}

@@ -2894,10 +2900,6 @@ static int marvell_nfc_init(struct marvell_nfc *nfc)
		regmap_update_bits(sysctrl_base, GENCONF_CLK_GATING_CTRL,
				   GENCONF_CLK_GATING_CTRL_ND_GATE,
				   GENCONF_CLK_GATING_CTRL_ND_GATE);

		regmap_update_bits(sysctrl_base, GENCONF_ND_CLK_CTRL,
				   GENCONF_ND_CLK_CTRL_EN,
				   GENCONF_ND_CLK_CTRL_EN);
	}

	/* Configure the DMA if appropriate */
+4 −1
Original line number Diff line number Diff line
@@ -2018,6 +2018,7 @@ static const struct spi_nor_manufacturer *manufacturers[] = {

static const struct flash_info spi_nor_generic_flash = {
	.name = "spi-nor-generic",
	.n_banks = 1,
	/*
	 * JESD216 rev A doesn't specify the page size, therefore we need a
	 * sane default.
@@ -2921,7 +2922,8 @@ static void spi_nor_late_init_params(struct spi_nor *nor)
	if (nor->flags & SNOR_F_HAS_LOCK && !nor->params->locking_ops)
		spi_nor_init_default_locking_ops(nor);

	nor->params->bank_size = div64_u64(nor->params->size, nor->info->n_banks);
	if (nor->info->n_banks > 1)
		params->bank_size = div64_u64(params->size, nor->info->n_banks);
}

/**
@@ -2987,6 +2989,7 @@ static void spi_nor_init_default_params(struct spi_nor *nor)
	/* Set SPI NOR sizes. */
	params->writesize = 1;
	params->size = (u64)info->sector_size * info->n_sectors;
	params->bank_size = params->size;
	params->page_size = info->page_size;

	if (!(info->flags & SPI_NOR_NO_FR)) {
Loading