s5j: remove redundant code for booting from non-flash
authorHeesub Shin <heesub.shin@samsung.com>
Sat, 11 Mar 2017 08:38:39 +0000 (17:38 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Mon, 17 Apr 2017 10:00:55 +0000 (19:00 +0900)
Given that we always boot from flash, we do not need to consider the
cases of CONFIG_BOOT_RUNFROMFLASH=n. Let's remove them.

Change-Id: I2e2aba487ee7f61bfe0c51dab6e4cc1133ec79a7
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
os/arch/arm/src/s5j/s5j_boot.c
os/arch/arm/src/s5j/s5j_serial.c

index 748b4c0..8b1182e 100644 (file)
@@ -111,7 +111,6 @@ int s5j_mpu_initialize(void)
        uint32_t size;
        int region = 0;
 
-#ifdef CONFIG_BOOT_RUNFROMFLASH
        /* flash region
         * region 0 : 0x0400_0000 ++ 4MB  BL1 + TinyAra OS + SSS F/W
         */
@@ -133,12 +132,6 @@ int s5j_mpu_initialize(void)
 
        mpu_priv_noncache(0x020E0000, 0x20000, region++);       // priority higher than region 0, allows overlapping
        mpu_priv_noncache(0x02100000, 0x80000, region++);       // priority higher than region 0, allows overlapping
-#else
-       /* access permission for available area */
-       /* Region 0, for ISRAM(0x0200_0000++2048KB, RW-WBWA */
-
-       mpu_user_intsram_wb(0x02000000, 0x200000, region++);
-#endif
 
        /*
         * Region 4 for RO in Flash : 0x0400_0000 ++ 4MB, RO-WT
index 279d9a5..25613a9 100644 (file)
@@ -527,18 +527,8 @@ void up_uart_set_gpio(UART_CHANNEL eCh, bool bEnable)
        s32 gpio_rxd, gpio_txd;
 
        if (eCh == UARTDBG) {
-#ifdef CONFIG_BOOT_RUNFROMFLASH
                HW_REG32(0x80040000, 0x160) = 0x22;     //GPA3_CON Xdebug_TXD, Xdebug_RXD
                HW_REG32(0x80040000, 0x168) = 0x00;     // PULLUP/DOWN disabled
-#else
-               gpio_rxd = s5j_gpio(GPA3, 0);
-               gpio_txd = s5j_gpio(GPA3, 1);
-
-               gpio_cfg_pin(gpio_rxd, GPIO_FUNC(2));
-               gpio_set_pull(gpio_rxd, GPIO_PULL_NONE);
-               gpio_cfg_pin(gpio_txd, GPIO_FUNC(2));
-               gpio_set_pull(gpio_txd, GPIO_PULL_NONE);
-#endif
        } else if (eCh == UART0) {
                gpio_rxd = s5j_gpio(GPA2, 0);
                gpio_txd = s5j_gpio(GPA2, 1);