diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/am335x_evm.h | 9 | ||||
-rw-r--r-- | include/linux/mtd/spinand.h | 2 | ||||
-rw-r--r-- | include/regmap.h | 28 | ||||
-rw-r--r-- | include/spi.h | 12 |
4 files changed, 45 insertions, 6 deletions
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 19d3c72a6f1..cf43fc05025 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -138,11 +138,10 @@ "setenv fdtfile am335x-evm.dtb; fi; " \ "if test $board_name = A335X_SK; then " \ "setenv fdtfile am335x-evmsk.dtb; fi; " \ - "if test $board_name = A335_ICE; then " \ - "setenv fdtfile am335x-icev2.dtb; " \ - "if test $ice_mii = mii; then " \ - "setenv pxe_label_override Pruss; fi;" \ - "fi; " \ + "if test $board_name = A335_ICE && test $ice_mii = rmii; then " \ + "setenv fdtfile am335x-icev2.dtb; fi; " \ + "if test $board_name = A335_ICE && test $ice_mii = mii; then " \ + "setenv fdtfile am335x-icev2-prueth.dtb; fi; " \ "if test $fdtfile = undefined; then " \ "echo WARNING: Could not determine device tree to use; fi; \0" \ "init_console=" \ diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h index 13b5a52f8b9..6fe6fd520a4 100644 --- a/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h @@ -17,7 +17,7 @@ #include <linux/spi/spi.h> #include <linux/spi/spi-mem.h> #else -#include <spi.h> +#include <linux/bitops.h> #include <spi-mem.h> #include <linux/mtd/nand.h> #endif diff --git a/include/regmap.h b/include/regmap.h index 22b043408ac..8c6f7c1c9b1 100644 --- a/include/regmap.h +++ b/include/regmap.h @@ -362,6 +362,34 @@ int regmap_raw_read_range(struct regmap *map, uint range_num, uint offset, int regmap_update_bits(struct regmap *map, uint offset, uint mask, uint val); /** + * regmap_set_bits() - Set bits to a regmap + * + * @map: Regmap to write bits to + * @offset: Offset in the regmap to write to + * @bits: Bits to set to the regmap at the specified offset + * + * Return: 0 if OK, -ve on error + */ +static inline int regmap_set_bits(struct regmap *map, uint offset, uint bits) +{ + return regmap_update_bits(map, offset, bits, bits); +} + +/** + * regmap_clear_bits() - Clear bits to a regmap + * + * @map: Regmap to write bits to + * @offset: Offset in the regmap to write to + * @bits: Bits to clear to the regmap at the specified offset + * + * Return: 0 if OK, -ve on error + */ +static inline int regmap_clear_bits(struct regmap *map, uint offset, uint bits) +{ + return regmap_update_bits(map, offset, bits, 0); +} + +/** * regmap_init_mem() - Set up a new register map that uses memory access * * @node: Device node that uses this map diff --git a/include/spi.h b/include/spi.h index 6944773b596..2783200d663 100644 --- a/include/spi.h +++ b/include/spi.h @@ -11,6 +11,8 @@ #include <linux/bitops.h> +struct spinand_info; + /* SPI mode flags */ #define SPI_CPHA BIT(0) /* clock phase (1 = SPI_CLOCK_PHASE_SECOND) */ #define SPI_CPOL BIT(1) /* clock polarity (1 = SPI_POLARITY_HIGH) */ @@ -537,6 +539,16 @@ struct dm_spi_ops { */ int (*get_mmap)(struct udevice *dev, ulong *map_basep, uint *map_sizep, uint *offsetp); + + /** + * setup_for_spinand() - Setup the SPI for attached SPI NAND + * + * @dev: The SPI flash slave device + * @spinand_info: The SPI NAND info to configure for + * @return 0 if OK, -ve value on error + */ + int (*setup_for_spinand)(struct spi_slave *slave, + const struct spinand_info *spinand_info); }; struct dm_spi_emul_ops { |