arm: socfpga: implement proper peripheral reset
authorSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Fri, 1 Mar 2019 19:12:36 +0000 (20:12 +0100)
committerMarek Vasut <marex@denx.de>
Wed, 17 Apr 2019 20:20:17 +0000 (22:20 +0200)
This commit removes ad-hoc reset handling for peripheral resets from SPL
for socfpga gen5.

This is done because as U-Boot drivers support reset handling by now.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
arch/arm/mach-socfpga/misc_gen5.c
arch/arm/mach-socfpga/spl_gen5.c

index 6e11ba6cb24e00c4a93e0e5d672be6c82c23e98c..9865f5b5b12065cf739e5669d7843ed51c6635ec 100644 (file)
@@ -201,16 +201,6 @@ int arch_early_init_r(void)
        /* Add device descriptor to FPGA device table */
        socfpga_fpga_add(&altera_fpga[0]);
 
-#ifdef CONFIG_DESIGNWARE_SPI
-       /* Get Designware SPI controller out of reset */
-       socfpga_per_reset(SOCFPGA_RESET(SPIM0), 0);
-       socfpga_per_reset(SOCFPGA_RESET(SPIM1), 0);
-#endif
-
-#ifdef CONFIG_NAND_DENALI
-       socfpga_per_reset(SOCFPGA_RESET(NAND), 0);
-#endif
-
        return 0;
 }
 
index c5399bb69792c40e64b636c47d1b585dbcd39f6d..9dd0afb4bcacd905e2287a52acdd011d09182b26 100644 (file)
@@ -39,16 +39,12 @@ u32 spl_boot_device(void)
                return BOOT_DEVICE_RAM;
        case 0x2:       /* NAND Flash (1.8V) */
        case 0x3:       /* NAND Flash (3.0V) */
-               socfpga_per_reset(SOCFPGA_RESET(NAND), 0);
                return BOOT_DEVICE_NAND;
        case 0x4:       /* SD/MMC External Transceiver (1.8V) */
        case 0x5:       /* SD/MMC Internal Transceiver (3.0V) */
-               socfpga_per_reset(SOCFPGA_RESET(SDMMC), 0);
-               socfpga_per_reset(SOCFPGA_RESET(DMA), 0);
                return BOOT_DEVICE_MMC1;
        case 0x6:       /* QSPI Flash (1.8V) */
        case 0x7:       /* QSPI Flash (3.0V) */
-               socfpga_per_reset(SOCFPGA_RESET(QSPI), 0);
                return BOOT_DEVICE_SPI;
        default:
                printf("Invalid boot device (bsel=%08x)!\n", bsel);
@@ -157,9 +153,7 @@ void board_init_f(ulong dummy)
                socfpga_bridges_reset(1);
        }
 
-       socfpga_per_reset(SOCFPGA_RESET(UART0), 0);
        socfpga_per_reset(SOCFPGA_RESET(OSC1TIMER0), 0);
-
        timer_init();
 
        debug("Reconfigure Clock Manager\n");
@@ -181,8 +175,7 @@ void board_init_f(ulong dummy)
        sysmgr_pinmux_init();
        sysmgr_config_warmrstcfgio(0);
 
-       /* De-assert reset for peripherals and bridges based on handoff */
-       reset_deassert_peripherals_handoff();
+       /* De-assert reset for bridges based on handoff */
        socfpga_bridges_reset(0);
 
        debug("Unfreezing/Thaw all I/O banks\n");