[coreboot-gerrit] Change in coreboot[master]: mediatek/mt8183: Remove temporary hack of flash code.

Tristan Hsieh (Code Review) gerrit at coreboot.org
Fri Jun 15 09:03:27 CEST 2018


Tristan Hsieh has uploaded this change for review. ( https://review.coreboot.org/27114


Change subject: mediatek/mt8183: Remove temporary hack of flash code.
......................................................................

mediatek/mt8183: Remove temporary hack of flash code.

BUG=b:80501386
BRANCH=none
TEST=work fine on Kukui

Change-Id: If29869461fc8c2efe26bb8c901737ee85935d27f
Signed-off-by: Tristan Shieh <tristan.shieh at mediatek.com>
---
M src/soc/mediatek/mt8183/Makefile.inc
D src/soc/mediatek/mt8183/flash_controller.c
M src/soc/mediatek/mt8183/spi.c
3 files changed, 0 insertions(+), 64 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/27114/1

diff --git a/src/soc/mediatek/mt8183/Makefile.inc b/src/soc/mediatek/mt8183/Makefile.inc
index 9f80500..a0e4a60 100644
--- a/src/soc/mediatek/mt8183/Makefile.inc
+++ b/src/soc/mediatek/mt8183/Makefile.inc
@@ -1,24 +1,20 @@
 ifeq ($(CONFIG_SOC_MEDIATEK_MT8183),y)
 
-bootblock-$(CONFIG_SPI_FLASH) += flash_controller.c
 bootblock-$(CONFIG_SPI_FLASH) += spi.c
 bootblock-y += ../common/timer.c
 ifeq ($(CONFIG_BOOTBLOCK_CONSOLE),y)
 bootblock-$(CONFIG_DRIVERS_UART) += ../common/uart.c
 endif
 
-verstage-$(CONFIG_SPI_FLASH) += flash_controller.c
 verstage-$(CONFIG_SPI_FLASH) += spi.c
 verstage-y += ../common/timer.c
 verstage-$(CONFIG_DRIVERS_UART) += ../common/uart.c
 
-romstage-$(CONFIG_SPI_FLASH) += flash_controller.c
 romstage-$(CONFIG_SPI_FLASH) += spi.c
 romstage-y += ../common/timer.c
 romstage-$(CONFIG_DRIVERS_UART) += ../common/uart.c
 
 ramstage-y += ../common/cbmem.c emi.c
-ramstage-$(CONFIG_SPI_FLASH) += flash_controller.c
 ramstage-$(CONFIG_SPI_FLASH) += spi.c
 ramstage-y += ../common/timer.c
 ramstage-$(CONFIG_DRIVERS_UART) += ../common/uart.c
diff --git a/src/soc/mediatek/mt8183/flash_controller.c b/src/soc/mediatek/mt8183/flash_controller.c
deleted file mode 100644
index a6a816f..0000000
--- a/src/soc/mediatek/mt8183/flash_controller.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2018 MediaTek Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-/* this is a spi driver which adapts emmc to fake spi flash */
-
-#include <soc/flash_controller.h>
-#include <spi_flash.h>
-
-static void init_io(void)
-{
-}
-
-static int emmc_adapter_read(const struct spi_flash *flash, u32 addr,
-		size_t len, void *buf)
-{
-	return 0;
-}
-
-static int emmc_adapter_write(const struct spi_flash *flash, u32 addr,
-		size_t len, const void *buf)
-{
-	return 0;
-}
-
-static int emmc_adapter_erase(const struct spi_flash *flash, u32 offset,
-		size_t len)
-{
-	return 0;
-}
-
-const struct spi_flash_ops spi_emmc_flash_ops = {
-	.read = emmc_adapter_read,
-	.write = emmc_adapter_write,
-	.erase = emmc_adapter_erase,
-};
-
-int mtk_spi_flash_probe(const struct spi_slave *spi, struct spi_flash *flash)
-{
-	init_io();
-
-	flash->name = "spi emmc flash controller";
-	flash->sector_size = 0x800;
-	flash->size = CONFIG_ROM_SIZE;
-
-	flash->ops = &spi_emmc_flash_ops;
-	return 0;
-}
diff --git a/src/soc/mediatek/mt8183/spi.c b/src/soc/mediatek/mt8183/spi.c
index 78821d1..d85138c 100644
--- a/src/soc/mediatek/mt8183/spi.c
+++ b/src/soc/mediatek/mt8183/spi.c
@@ -18,7 +18,6 @@
 
 static const struct spi_ctrlr spi_flash_ctrlr = {
 	.max_xfer_size = 65535,
-	.flash_probe = mtk_spi_flash_probe,
 };
 
 const struct spi_ctrlr_buses spi_ctrlr_bus_map[] = {

-- 
To view, visit https://review.coreboot.org/27114
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If29869461fc8c2efe26bb8c901737ee85935d27f
Gerrit-Change-Number: 27114
Gerrit-PatchSet: 1
Gerrit-Owner: Tristan Hsieh <tristan.shieh at mediatek.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180615/36a65323/attachment.html>


More information about the coreboot-gerrit mailing list