[U-Boot] [PATCH 3/3] video, lg4573: make spi bus and cs configurable

Heiko Schocher hs at denx.de
Tue Aug 11 08:09:46 CEST 2015


make the spi bus and the spi chipselect configurable
for the lg4573 driver. Use it on the aristainetos
boards.

Signed-off-by: Heiko Schocher <hs at denx.de>
---

 drivers/video/lg4573.c           | 3 ++-
 include/configs/aristainetos2.h  | 2 ++
 include/configs/aristainetos2b.h | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/video/lg4573.c b/drivers/video/lg4573.c
index 43670fc..11fef27 100644
--- a/drivers/video/lg4573.c
+++ b/drivers/video/lg4573.c
@@ -220,7 +220,8 @@ err_claim_bus:
 static int do_lgset(cmd_tbl_t *cmdtp, int flag, int argc,
 		       char * const argv[])
 {
-	lg4573_spi_startup(0, 0, 10000000, SPI_MODE_0);
+	lg4573_spi_startup(CONFIG_LG4573_BUS, CONFIG_LG4573_CS, 10000000,
+			   SPI_MODE_0);
 	return 0;
 }
 
diff --git a/include/configs/aristainetos2.h b/include/configs/aristainetos2.h
index cdbbcc0..152f5e9 100644
--- a/include/configs/aristainetos2.h
+++ b/include/configs/aristainetos2.h
@@ -49,6 +49,8 @@
 /* Framebuffer */
 #define CONFIG_SYS_LDB_CLOCK 33246000
 #define CONFIG_LG4573
+#define CONFIG_LG4573_BUS 0
+#define CONFIG_LG4573_CS 0
 
 #define CONFIG_CMD_BMP
 
diff --git a/include/configs/aristainetos2b.h b/include/configs/aristainetos2b.h
index e77e5c7..78791db 100644
--- a/include/configs/aristainetos2b.h
+++ b/include/configs/aristainetos2b.h
@@ -49,6 +49,8 @@
 /* Framebuffer */
 #define CONFIG_SYS_LDB_CLOCK 33246000
 #define CONFIG_LG4573
+#define CONFIG_LG4573_BUS 0
+#define CONFIG_LG4573_CS 1
 
 #define CONFIG_CMD_BMP
 
-- 
2.1.0



More information about the U-Boot mailing list