Driver model: make some udevice fields private

Driver model: Rename U_BOOT_DEVICE et al.
 dtoc: Tidy up and add more tests
 ns16550 code clean-up
 x86 and sandbox minor fixes for of-platdata
 dtoc prepration for adding build-time instantiation
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAl/09LURHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIrebjwwf/fHRjYsAY/Yj/+y1xgo3L3sphIvQUqTDF
 KkLl+kHdV5r8W/HJULxLQcF2r7pcPEI6TAQxuj3qQ5SUvm2HviS8GHGPawDEwyht
 HgBp9VD56+HUadMfnbG//DVS73ycbL4XSKlYqpkINEejtnlttsCIawUXX5cTyGM/
 59VkgnKrKvJQRUXvYLa8MTugTs4fkPJGDqhActBk/7SP1SImj+rfalNSqA2/dx6y
 2RnPCSzB1x2231KSj+B1NgGlR3Xb8P8zgh20ijcEU/hrlXBTZyi7K7f4SJR30Efu
 LYkkuj4VbxcV/25RozR0fmknqCs0QyAI+/dql6TNtbTSPC/jAfj0jQ==
 =9kN3
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-5jan21' of git://git.denx.de/u-boot-dm into next

Driver model: make some udevice fields private
Driver model: Rename U_BOOT_DEVICE et al.
dtoc: Tidy up and add more tests
ns16550 code clean-up
x86 and sandbox minor fixes for of-platdata
dtoc prepration for adding build-time instantiation
This commit is contained in:
Tom Rini 2021-01-05 22:34:43 -05:00
commit b11f634b1c
410 changed files with 2798 additions and 1955 deletions

View file

@ -332,15 +332,14 @@ struct mtd_info {
};
#if IS_ENABLED(CONFIG_DM)
static inline void mtd_set_of_node(struct mtd_info *mtd,
const struct device_node *np)
static inline void mtd_set_ofnode(struct mtd_info *mtd, ofnode node)
{
mtd->dev->node.np = np;
dev_set_ofnode(mtd->dev, node);
}
static inline const struct device_node *mtd_get_of_node(struct mtd_info *mtd)
static inline const ofnode mtd_get_ofnode(struct mtd_info *mtd)
{
return mtd->dev->node.np;
return dev_ofnode(mtd->dev);
}
#else
struct device_node;

View file

@ -389,6 +389,7 @@ static inline int nanddev_unregister(struct nand_device *nand)
return mtd_device_unregister(nand->mtd);
}
#ifndef __UBOOT__
/**
* nanddev_set_of_node() - Attach a DT node to a NAND device
* @nand: NAND device
@ -412,6 +413,19 @@ static inline const struct device_node *nanddev_get_of_node(struct nand_device *
{
return mtd_get_of_node(nand->mtd);
}
#else
/**
* nanddev_set_of_node() - Attach a DT node to a NAND device
* @nand: NAND device
* @node: ofnode
*
* Attach a DT node to a NAND device.
*/
static inline void nanddev_set_ofnode(struct nand_device *nand, ofnode node)
{
mtd_set_ofnode(nand->mtd, node);
}
#endif /* __UBOOT__ */
/**
* nanddev_offs_to_pos() - Convert an absolute NAND offset into a NAND position

View file

@ -258,11 +258,13 @@ struct flash_info;
/*
* TODO: Remove, once all users of spi_flash interface are moved to MTD
*
* struct spi_flash {
struct spi_flash {
* Defined below (keep this text to enable searching for spi_flash decl)
* }
*/
#ifndef DT_PLAT_C
#define spi_flash spi_nor
#endif
/**
* struct spi_nor - Structure for defining a the SPI NOR layer
@ -352,6 +354,7 @@ struct spi_nor {
u32 erase_size;
};
#ifndef __UBOOT__
static inline void spi_nor_set_flash_node(struct spi_nor *nor,
const struct device_node *np)
{
@ -363,6 +366,7 @@ device_node *spi_nor_get_flash_node(struct spi_nor *nor)
{
return mtd_get_of_node(&nor->mtd);
}
#endif /* __UBOOT__ */
/**
* struct spi_nor_hwcaps - Structure for describing the hardware capabilies

View file

@ -412,6 +412,7 @@ spinand_to_nand(struct spinand_device *spinand)
return &spinand->base;
}
#ifndef __UBOOT__
/**
* spinand_set_of_node - Attach a DT node to a SPI NAND device
* @spinand: SPI NAND device
@ -424,6 +425,20 @@ static inline void spinand_set_of_node(struct spinand_device *spinand,
{
nanddev_set_of_node(&spinand->base, np);
}
#else
/**
* spinand_set_of_node - Attach a DT node to a SPI NAND device
* @spinand: SPI NAND device
* @node: ofnode
*
* Attach a DT node to a SPI NAND device.
*/
static inline void spinand_set_ofnode(struct spinand_device *spinand,
ofnode node)
{
nanddev_set_ofnode(&spinand->base, node);
}
#endif /* __UBOOT__ */
int spinand_match_and_init(struct spinand_device *dev,
const struct spinand_info *table,