mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-07 07:46:59 +02:00
ram: renesas: dbsc5: Pass udevice and MODEMR0 to dbsc5_get_board_data()
Pass DBSC5 udevice and MODEMR0 register values to board specific function dbsc5_get_board_data(). The board specific implementation of dbsc5_get_board_data() can return struct renesas_dbsc5_board_config which matches the board based on the content of MODEMR0 or content of DT accessible via the udevice. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
This commit is contained in:
parent
401c268e1d
commit
47dad5cc61
@ -4333,10 +4333,13 @@ static u32 dbsc5_init_ddr(struct udevice *dev)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* dbsc5_get_board_data() - Obtain board specific DRAM configuration
|
* dbsc5_get_board_data() - Obtain board specific DRAM configuration
|
||||||
|
* @dev: DBSC5 device
|
||||||
|
* @modemr0: MODEMR0 register content
|
||||||
*
|
*
|
||||||
* Return board specific DRAM configuration structure pointer.
|
* Return board specific DRAM configuration structure pointer.
|
||||||
*/
|
*/
|
||||||
__weak const struct renesas_dbsc5_board_config *dbsc5_get_board_data(void)
|
__weak const struct renesas_dbsc5_board_config *
|
||||||
|
dbsc5_get_board_data(struct udevice *dev, const u32 modemr0)
|
||||||
{
|
{
|
||||||
return &renesas_v4h_dbsc5_board_config;
|
return &renesas_v4h_dbsc5_board_config;
|
||||||
}
|
}
|
||||||
@ -4372,7 +4375,7 @@ static int renesas_dbsc5_dram_probe(struct udevice *dev)
|
|||||||
u32 ch, cs;
|
u32 ch, cs;
|
||||||
|
|
||||||
/* Get board data */
|
/* Get board data */
|
||||||
priv->dbsc5_board_config = dbsc5_get_board_data();
|
priv->dbsc5_board_config = dbsc5_get_board_data(dev, modemr0);
|
||||||
priv->ddr_phyvalid = (u32)(priv->dbsc5_board_config->bdcfg_phyvalid);
|
priv->ddr_phyvalid = (u32)(priv->dbsc5_board_config->bdcfg_phyvalid);
|
||||||
priv->max_density = 0;
|
priv->max_density = 0;
|
||||||
priv->cpg_regs = (void __iomem *)ofnode_get_addr(cnode);
|
priv->cpg_regs = (void __iomem *)ofnode_get_addr(cnode);
|
||||||
|
Loading…
Reference in New Issue
Block a user