treewide: convert bd_t to struct bd_info manually
Some code was not converted by coccinelle, somehow. I manually fixed up the remaining, and comments, README docs. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> [trini: Add arch/arm/mach-davinci/include/mach/sdmmc_defs.h and include/fdt_support.h] Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
b75d8dc564
commit
bb5a2cf9f9
17 changed files with 22 additions and 22 deletions
|
@ -159,6 +159,6 @@ struct davinci_mmc_plat {
|
||||||
struct mmc mmc;
|
struct mmc mmc;
|
||||||
};
|
};
|
||||||
|
|
||||||
int davinci_mmc_init(bd_t *bis, struct davinci_mmc *host);
|
int davinci_mmc_init(struct bd_info *bis, struct davinci_mmc *host);
|
||||||
|
|
||||||
#endif /* _SDMMC_DEFS_H */
|
#endif /* _SDMMC_DEFS_H */
|
||||||
|
|
|
@ -105,7 +105,7 @@ int watchdog_init(void)
|
||||||
#if defined(CONFIG_MCFFEC)
|
#if defined(CONFIG_MCFFEC)
|
||||||
/* Default initializations for MCFFEC controllers. To override,
|
/* Default initializations for MCFFEC controllers. To override,
|
||||||
* create a board-specific function called:
|
* create a board-specific function called:
|
||||||
* int board_eth_init(bd_t *bis)
|
* int board_eth_init(struct bd_info *bis)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int cpu_eth_init(struct bd_info *bis)
|
int cpu_eth_init(struct bd_info *bis)
|
||||||
|
|
|
@ -420,7 +420,7 @@ int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
#if defined(CONFIG_MCFFEC)
|
#if defined(CONFIG_MCFFEC)
|
||||||
/* Default initializations for MCFFEC controllers. To override,
|
/* Default initializations for MCFFEC controllers. To override,
|
||||||
* create a board-specific function called:
|
* create a board-specific function called:
|
||||||
* int board_eth_init(bd_t *bis)
|
* int board_eth_init(struct bd_info *bis)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int cpu_eth_init(struct bd_info *bis)
|
int cpu_eth_init(struct bd_info *bis)
|
||||||
|
|
|
@ -147,7 +147,7 @@ int watchdog_init(void)
|
||||||
#if defined(CONFIG_MCFFEC)
|
#if defined(CONFIG_MCFFEC)
|
||||||
/* Default initializations for MCFFEC controllers. To override,
|
/* Default initializations for MCFFEC controllers. To override,
|
||||||
* create a board-specific function called:
|
* create a board-specific function called:
|
||||||
* int board_eth_init(bd_t *bis)
|
* int board_eth_init(struct bd_info *bis)
|
||||||
*/
|
*/
|
||||||
int cpu_eth_init(struct bd_info *bis)
|
int cpu_eth_init(struct bd_info *bis)
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,7 +109,7 @@ int print_cpuinfo(void)
|
||||||
#if defined(CONFIG_MCFFEC)
|
#if defined(CONFIG_MCFFEC)
|
||||||
/* Default initializations for MCFFEC controllers. To override,
|
/* Default initializations for MCFFEC controllers. To override,
|
||||||
* create a board-specific function called:
|
* create a board-specific function called:
|
||||||
* int board_eth_init(bd_t *bis)
|
* int board_eth_init(struct bd_info *bis)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int cpu_eth_init(struct bd_info *bis)
|
int cpu_eth_init(struct bd_info *bis)
|
||||||
|
|
|
@ -136,7 +136,7 @@ int watchdog_init(void)
|
||||||
#if defined(CONFIG_FSLDMAFEC) || defined(CONFIG_MCFFEC)
|
#if defined(CONFIG_FSLDMAFEC) || defined(CONFIG_MCFFEC)
|
||||||
/* Default initializations for MCFFEC controllers. To override,
|
/* Default initializations for MCFFEC controllers. To override,
|
||||||
* create a board-specific function called:
|
* create a board-specific function called:
|
||||||
* int board_eth_init(bd_t *bis)
|
* int board_eth_init(struct bd_info *bis)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int cpu_eth_init(struct bd_info *bis)
|
int cpu_eth_init(struct bd_info *bis)
|
||||||
|
|
|
@ -185,7 +185,7 @@ static char bootm_help_text[] =
|
||||||
"\tfdt - relocate flat device tree\n"
|
"\tfdt - relocate flat device tree\n"
|
||||||
#endif
|
#endif
|
||||||
"\tcmdline - OS specific command line processing/setup\n"
|
"\tcmdline - OS specific command line processing/setup\n"
|
||||||
"\tbdt - OS specific bd_t processing\n"
|
"\tbdt - OS specific bd_info processing\n"
|
||||||
"\tprep - OS specific prep before relocation or go\n"
|
"\tprep - OS specific prep before relocation or go\n"
|
||||||
#if defined(CONFIG_TRACE)
|
#if defined(CONFIG_TRACE)
|
||||||
"\tfake - OS specific fake start without go\n"
|
"\tfake - OS specific fake start without go\n"
|
||||||
|
|
|
@ -126,7 +126,7 @@ The following flags will be defined:
|
||||||
|
|
||||||
The POST layer will export the following interface routines:
|
The POST layer will export the following interface routines:
|
||||||
|
|
||||||
o) int post_run(bd_t *bd, char *name, int flags);
|
o) int post_run(struct bd_info *bd, char *name, int flags);
|
||||||
|
|
||||||
This routine will run the test (or the group of tests) specified
|
This routine will run the test (or the group of tests) specified
|
||||||
by the name and flag arguments. More specifically, if the name
|
by the name and flag arguments. More specifically, if the name
|
||||||
|
@ -175,7 +175,7 @@ struct post_test {
|
||||||
char *cmd;
|
char *cmd;
|
||||||
char *desc;
|
char *desc;
|
||||||
int flags;
|
int flags;
|
||||||
int (*test)(bd_t *bd, int flags);
|
int (*test)(struct bd_info *bd, int flags);
|
||||||
};
|
};
|
||||||
|
|
||||||
o) name
|
o) name
|
||||||
|
@ -364,7 +364,7 @@ declaration/body:
|
||||||
...
|
...
|
||||||
|
|
||||||
...
|
...
|
||||||
int watchdog_post_test(bd_t *bd, int flags)
|
int watchdog_post_test(struct bd_info *bd, int flags)
|
||||||
{
|
{
|
||||||
unsigned long start_time;
|
unsigned long start_time;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ At board level:
|
||||||
|
|
||||||
TODO: move also dram initialization there on boards where it is possible.
|
TODO: move also dram initialization there on boards where it is possible.
|
||||||
|
|
||||||
Setup of the the bd_t dram bank info is done in the new function
|
Setup of the bd_info dram bank info is done in the new function
|
||||||
dram_init_banksize() called after bd is accessible.
|
dram_init_banksize() called after bd is accessible.
|
||||||
|
|
||||||
At lib level:
|
At lib level:
|
||||||
|
@ -65,7 +65,7 @@ in f) could be saved.
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
|
|
||||||
- fill in bd_t infos (check)
|
- fill in struct bd_info infos (check)
|
||||||
- adapt all boards
|
- adapt all boards
|
||||||
|
|
||||||
- maybe adapt CONFIG_SYS_TEXT_BASE (this must be checked from board maintainers)
|
- maybe adapt CONFIG_SYS_TEXT_BASE (this must be checked from board maintainers)
|
||||||
|
|
|
@ -47,7 +47,7 @@ the board specific file need added:
|
||||||
...
|
...
|
||||||
#ifdef CONFIG_GENERIC_ATMEL_MCI
|
#ifdef CONFIG_GENERIC_ATMEL_MCI
|
||||||
/* this is a weak define that we are overriding */
|
/* this is a weak define that we are overriding */
|
||||||
int board_mmc_init(bd_t *bd)
|
int board_mmc_init(struct bd_info *bd)
|
||||||
{
|
{
|
||||||
/* Enable clock */
|
/* Enable clock */
|
||||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_MCI);
|
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_MCI);
|
||||||
|
|
|
@ -62,7 +62,7 @@ U-Boot relocation (done in 'board_init_r' in arch/*/lib/board.c).
|
||||||
HOW CAN I USE STANDARD FILE INTO APPLICATIONS?
|
HOW CAN I USE STANDARD FILE INTO APPLICATIONS?
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
|
|
||||||
Use the 'bd_mon_fnc' field of the bd_t structure passed to the
|
Use the 'bd_mon_fnc' field of the bd_info structure passed to the
|
||||||
application to do everything you want with the console.
|
application to do everything you want with the console.
|
||||||
|
|
||||||
But REMEMBER that that will work only if you have not overwritten any
|
But REMEMBER that that will work only if you have not overwritten any
|
||||||
|
|
|
@ -22,7 +22,7 @@ The main change is that the arch/<arch>/lib/board.c file is removed in
|
||||||
favour of common/board_f.c (for pre-relocation init) and common/board_r.c
|
favour of common/board_f.c (for pre-relocation init) and common/board_r.c
|
||||||
(for post-relocation init).
|
(for post-relocation init).
|
||||||
|
|
||||||
Related to this, the global_data and bd_t structures now have a core set of
|
Related to this, the global_data and bd_info structures now have a core set of
|
||||||
fields which are common to all architectures. Architecture-specific fields
|
fields which are common to all architectures. Architecture-specific fields
|
||||||
have been moved to separate structures.
|
have been moved to separate structures.
|
||||||
|
|
||||||
|
|
|
@ -250,7 +250,7 @@ register function. The pseudo code would look something like:
|
||||||
|
|
||||||
.. code-block:: c
|
.. code-block:: c
|
||||||
|
|
||||||
int ape_register(bd_t *bis, int iobase)
|
int ape_register(struct bd_info *bis, int iobase)
|
||||||
{
|
{
|
||||||
struct ape_priv *priv;
|
struct ape_priv *priv;
|
||||||
struct eth_device *dev;
|
struct eth_device *dev;
|
||||||
|
|
|
@ -588,7 +588,7 @@ static int fec_open(struct eth_device *edev)
|
||||||
#ifdef CONFIG_DM_ETH
|
#ifdef CONFIG_DM_ETH
|
||||||
static int fecmxc_init(struct udevice *dev)
|
static int fecmxc_init(struct udevice *dev)
|
||||||
#else
|
#else
|
||||||
static int fec_init(struct eth_device *dev, bd_t *bd)
|
static int fec_init(struct eth_device *dev, struct bd_info *bd)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DM_ETH
|
#ifdef CONFIG_DM_ETH
|
||||||
|
@ -1105,7 +1105,7 @@ struct mii_dev *fec_get_miibus(ulong base_addr, int dev_id)
|
||||||
int fec_probe(struct bd_info *bd, int dev_id, uint32_t base_addr,
|
int fec_probe(struct bd_info *bd, int dev_id, uint32_t base_addr,
|
||||||
struct mii_dev *bus, struct phy_device *phydev)
|
struct mii_dev *bus, struct phy_device *phydev)
|
||||||
#else
|
#else
|
||||||
static int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
|
static int fec_probe(struct bd_info *bd, int dev_id, uint32_t base_addr,
|
||||||
struct mii_dev *bus, int phy_id)
|
struct mii_dev *bus, int phy_id)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
|
@ -514,7 +514,7 @@ static int ldpaa_eth_open(struct udevice *dev)
|
||||||
struct eth_pdata *plat = dev_get_platdata(dev);
|
struct eth_pdata *plat = dev_get_platdata(dev);
|
||||||
struct ldpaa_eth_priv *priv = dev_get_priv(dev);
|
struct ldpaa_eth_priv *priv = dev_get_priv(dev);
|
||||||
#else
|
#else
|
||||||
static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd)
|
static int ldpaa_eth_open(struct eth_device *net_dev, struct bd_info *bd)
|
||||||
{
|
{
|
||||||
struct ldpaa_eth_priv *priv = (struct ldpaa_eth_priv *)net_dev->priv;
|
struct ldpaa_eth_priv *priv = (struct ldpaa_eth_priv *)net_dev->priv;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -455,7 +455,7 @@ static int smc911x_initialize_mii(struct smc911x_priv *priv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int smc911x_init(struct eth_device *dev, bd_t *bd)
|
static int smc911x_init(struct eth_device *dev, struct bd_info *bd)
|
||||||
{
|
{
|
||||||
struct smc911x_priv *priv = container_of(dev, struct smc911x_priv, dev);
|
struct smc911x_priv *priv = container_of(dev, struct smc911x_priv, dev);
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ int fdt_find_or_add_subnode(void *fdt, int parentoffset, const char *name);
|
||||||
* This function is called if CONFIG_OF_BOARD_SETUP is defined
|
* This function is called if CONFIG_OF_BOARD_SETUP is defined
|
||||||
*
|
*
|
||||||
* @param blob FDT blob to update
|
* @param blob FDT blob to update
|
||||||
* @param bd_t Pointer to board data
|
* @param bd Pointer to board data
|
||||||
* @return 0 if ok, or -FDT_ERR_... on error
|
* @return 0 if ok, or -FDT_ERR_... on error
|
||||||
*/
|
*/
|
||||||
int ft_board_setup(void *blob, struct bd_info *bd);
|
int ft_board_setup(void *blob, struct bd_info *bd);
|
||||||
|
@ -202,7 +202,7 @@ void ft_pci_setup(void *blob, struct bd_info *bd);
|
||||||
* This function is called if CONFIG_OF_SYSTEM_SETUP is defined
|
* This function is called if CONFIG_OF_SYSTEM_SETUP is defined
|
||||||
*
|
*
|
||||||
* @param blob FDT blob to update
|
* @param blob FDT blob to update
|
||||||
* @param bd_t Pointer to board data
|
* @param bd Pointer to board data
|
||||||
* @return 0 if ok, or -FDT_ERR_... on error
|
* @return 0 if ok, or -FDT_ERR_... on error
|
||||||
*/
|
*/
|
||||||
int ft_system_setup(void *blob, struct bd_info *bd);
|
int ft_system_setup(void *blob, struct bd_info *bd);
|
||||||
|
|
Loading…
Reference in a new issue