summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2016-10-25 15:26:43 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2016-10-26 16:32:48 +0000
commit573ba5c5039f85fd7ce57d244caadf836457feee (patch)
tree01b0b149f0d704659e7ca5a865ef098ae9f083d5
parent1e51ee7f23f9e9d6c5a089116a62136aaa0b4a72 (diff)
downloadchrome-ec-573ba5c5039f85fd7ce57d244caadf836457feee.tar.gz
npcx: flash: Remove tristate-related console commands for RAM savings
These commands aren't useful for our project. BUG=None TEST=`make buildall -j` BRANCH=gru Change-Id: Id8f12d6aed0760fd5b80f1b621bc0461ab1ac671 Reviewed-on: https://chromium-review.googlesource.com/403117 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org>
-rw-r--r--chip/npcx/flash.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/chip/npcx/flash.c b/chip/npcx/flash.c
index 2387a3a958..be899b783d 100644
--- a/chip/npcx/flash.c
+++ b/chip/npcx/flash.c
@@ -52,12 +52,6 @@ static void flash_pinmux(int enable)
}
}
-static void flash_tristate(int enable)
-{
- /* Enable/Disable FIU pins to tri-state */
- UPDATE_BIT(NPCX_DEVCNT, NPCX_DEVCNT_F_SPI_TRIS, enable);
-}
-
static void flash_execute_cmd(uint8_t code, uint8_t cts)
{
/* set UMA_CODE */
@@ -453,16 +447,6 @@ static int flash_uma_lock(int enable)
return EC_SUCCESS;
}
-static int flash_spi_sel_lock(int enable)
-{
- /*
- * F_SPI_QUAD, F_SPI_CS1_1/2, F_SPI_TRIS become read-only
- * if this bit is set
- */
- UPDATE_BIT(NPCX_DEV_CTL4, NPCX_DEV_CTL4_F_SPI_SLLK, enable);
- return IS_BIT_SET(NPCX_DEV_CTL4, NPCX_DEV_CTL4_F_SPI_SLLK);
-}
-
/*****************************************************************************/
int flash_physical_read(int offset, int size, char *data)
@@ -740,40 +724,3 @@ void flash_lock_mapped_storage(int lock)
else
mutex_unlock(&flash_lock);
}
-
-/*****************************************************************************/
-/* Console commands */
-
-static int command_flash_spi_sel_lock(int argc, char **argv)
-{
- int ena;
-
- if (argc > 1) {
- if (!parse_bool(argv[1], &ena))
- return EC_ERROR_PARAM1;
- ena = flash_spi_sel_lock(ena);
- ccprintf("Enabled: %d\n", ena);
- }
- return EC_SUCCESS;
-}
-DECLARE_CONSOLE_COMMAND(flash_spi_lock, command_flash_spi_sel_lock,
- "[0 | 1]",
- "Lock spi flash interface selection");
-
-static int command_flash_tristate(int argc, char **argv)
-{
- int ena;
-
- if (argc > 1) {
- if (!parse_bool(argv[1], &ena))
- return EC_ERROR_PARAM1;
- flash_tristate(ena);
- ccprintf("Enabled: %d\n", ena);
- }
-
- return EC_SUCCESS;
-}
-DECLARE_CONSOLE_COMMAND(flash_tristate, command_flash_tristate,
- "[0 | 1]",
- "Tristate spi flash pins");
-