mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-30 08:30:50 +09:00
socfpga: cleanup socfpga_dw_mmc
Cleanups as suggested by wd on mailing list. Signed-off-by: Pavel Machek <pavel@denx.de> Acked-by: Chin Liang See <clsee@altera.com>
This commit is contained in:
parent
99b97106f3
commit
7860649716
@ -16,8 +16,6 @@ static const struct socfpga_clock_manager *clock_manager_base =
|
|||||||
static const struct socfpga_system_manager *system_manager_base =
|
static const struct socfpga_system_manager *system_manager_base =
|
||||||
(void *)SOCFPGA_SYSMGR_ADDRESS;
|
(void *)SOCFPGA_SYSMGR_ADDRESS;
|
||||||
|
|
||||||
static char *SOCFPGA_NAME = "SOCFPGA DWMMC";
|
|
||||||
|
|
||||||
static void socfpga_dwmci_clksel(struct dwmci_host *host)
|
static void socfpga_dwmci_clksel(struct dwmci_host *host)
|
||||||
{
|
{
|
||||||
unsigned int drvsel;
|
unsigned int drvsel;
|
||||||
@ -45,14 +43,16 @@ static void socfpga_dwmci_clksel(struct dwmci_host *host)
|
|||||||
|
|
||||||
int socfpga_dwmmc_init(u32 regbase, int bus_width, int index)
|
int socfpga_dwmmc_init(u32 regbase, int bus_width, int index)
|
||||||
{
|
{
|
||||||
struct dwmci_host *host = NULL;
|
struct dwmci_host *host;
|
||||||
|
|
||||||
|
/* calloc for zero init */
|
||||||
host = calloc(sizeof(struct dwmci_host), 1);
|
host = calloc(sizeof(struct dwmci_host), 1);
|
||||||
if (!host) {
|
if (!host) {
|
||||||
printf("dwmci_host calloc fail!\n");
|
printf("dwmci_host calloc fail!\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
host->name = SOCFPGA_NAME;
|
host->name = "SOCFPGA DWMMC";
|
||||||
host->ioaddr = (void *)regbase;
|
host->ioaddr = (void *)regbase;
|
||||||
host->buswidth = bus_width;
|
host->buswidth = bus_width;
|
||||||
host->clksel = socfpga_dwmci_clksel;
|
host->clksel = socfpga_dwmci_clksel;
|
||||||
|
Loading…
Reference in New Issue
Block a user