* Stephen Warren wrote: > Pass the GPIO numbers for power and card detect to tegra2_mmc_init(), and > modify that function to perform all required GPIO initialization. This > removes the need for board files to perform these operations. > > Move board_mmc_getcd() into tegra2_mmc.c now that the driver knows which > GPIOs to use. > > Update affected call-sites in seaboard.c and harmony.c. Note that this > change should make all SD ports work on Harmony, since the required GPIO > setup is now being performed. > > v4: Fix prototype of tegra2_mmc_init() in board.h to match driver change. > Remove prototype of gpio_config_mmc() from board.h > > Signed-off-by: Stephen Warren <[email protected]> > Tested-by: Simon Glass <[email protected]> > --- > board/nvidia/common/board.h | 3 +- > board/nvidia/harmony/harmony.c | 27 ++--------------------- > board/nvidia/seaboard/seaboard.c | 33 +---------------------------- > drivers/mmc/tegra2_mmc.c | 42 ++++++++++++++++++++++++++++++++----- > drivers/mmc/tegra2_mmc.h | 4 ++- > 5 files changed, 45 insertions(+), 64 deletions(-) > > diff --git a/board/nvidia/common/board.h b/board/nvidia/common/board.h > index 344e702..35acbca 100644 > --- a/board/nvidia/common/board.h > +++ b/board/nvidia/common/board.h > @@ -26,7 +26,6 @@ > > void tegra2_start(void); > void gpio_config_uart(void); > -void gpio_config_mmc(void); > -int tegra2_mmc_init(int dev_index, int bus_width); > +int tegra2_mmc_init(int dev_index, int bus_width, int pwr_gpio, int cd_gpio); [...]
Can we move tegra2_start() and tegra2_mmc_init() into a common Tegra2 header instead of a board-specific one, please? Both functions are not implemented below board/nvidia/common, so there is no need to make their prototype only visible for board/nvidia. Otherwise other boards will have to duplicate this prototype and need to keep it in sync. tegra2_start() can probably go into arch/arm/include/asm/arch-tegra2/tegra2.h and tegra2_mmc_init() could for example go into a new mmc.h in the same directory. Thierry
pgpEGrSX4DtHI.pgp
Description: PGP signature
_______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

