Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/814052/?format=api
{ "id": 814052, "url": "http://patchwork.ozlabs.org/api/patches/814052/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170915051519.25327-2-wenyou.yang@microchip.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170915051519.25327-2-wenyou.yang@microchip.com>", "list_archive_url": null, "date": "2017-09-15T05:15:15", "name": "[U-Boot,v2,1/5] board: sama5d2_xplained: Convert to CONFIG_DM_VIDEO", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "7da80c4e03906711ab1a784fe40eee0aab9a972c", "submitter": { "id": 69532, "url": "http://patchwork.ozlabs.org/api/people/69532/?format=api", "name": "Wenyou Yang", "email": "Wenyou.Yang@microchip.com" }, "delegate": { "id": 1700, "url": "http://patchwork.ozlabs.org/api/users/1700/?format=api", "username": "ag", "first_name": "Anatolij", "last_name": "Gustschin", "email": "agust@denx.de" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170915051519.25327-2-wenyou.yang@microchip.com/mbox/", "series": [ { "id": 3214, "url": "http://patchwork.ozlabs.org/api/series/3214/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=3214", "date": "2017-09-15T05:15:14", "name": "board: atmel: Convert to support video driver model", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/3214/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/814052/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/814052/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xtkDF4wYBz9t2Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 15:17:17 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 72498C21EA9; Fri, 15 Sep 2017 05:16:56 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 9B00CC21F54;\n\tFri, 15 Sep 2017 05:16:53 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 41C2DC21F3A; Fri, 15 Sep 2017 05:16:42 +0000 (UTC)", "from eusmtp01.atmel.com (eusmtp01.atmel.com [212.144.249.243])\n\tby lists.denx.de (Postfix) with ESMTPS id 34BEBC21EF2\n\tfor <u-boot@lists.denx.de>; Fri, 15 Sep 2017 05:16:39 +0000 (UTC)", "from apsmtp01.atmel.com (10.168.254.30) by eusmtp01.atmel.com\n\t(10.145.145.31) with Microsoft SMTP Server id 14.3.235.1;\n\tFri, 15 Sep 2017 07:15:48 +0200", "from shaarm01.corp.atmel.com (10.168.254.13) by\n\tapsmtp01.corp.atmel.com (10.168.254.30) with Microsoft SMTP Server id\n\t14.3.235.1; Fri, 15 Sep 2017 13:20:47 +0800" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED\n\tautolearn=unavailable autolearn_force=no version=3.4.0", "From": "Wenyou Yang <wenyou.yang@microchip.com>", "To": "U-Boot Mailing List <u-boot@lists.denx.de>", "Date": "Fri, 15 Sep 2017 13:15:15 +0800", "Message-ID": "<20170915051519.25327-2-wenyou.yang@microchip.com>", "X-Mailer": "git-send-email 2.13.0", "In-Reply-To": "<20170915051519.25327-1-wenyou.yang@microchip.com>", "References": "<20170915051519.25327-1-wenyou.yang@microchip.com>", "MIME-Version": "1.0", "Cc": "Tom Rini <trini@konsulko.com>", "Subject": "[U-Boot] [PATCH v2 1/5] board: sama5d2_xplained: Convert to\n\tCONFIG_DM_VIDEO", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "Convert the board to support the video driver model, add the device\ntree node, and remove the unnecessary code.\n\nSigned-off-by: Wenyou Yang <wenyou.yang@microchip.com>\n---\n\nChanges in v2: None\n\n arch/arm/dts/at91-sama5d2_xplained.dts | 60 ++++++++++++++++\n arch/arm/dts/sama5d2.dtsi | 7 ++\n arch/arm/mach-at91/Kconfig | 1 +\n board/atmel/sama5d2_xplained/sama5d2_xplained.c | 95 ++-----------------------\n configs/sama5d2_xplained_mmc_defconfig | 2 +\n configs/sama5d2_xplained_spiflash_defconfig | 2 +\n include/configs/sama5d2_xplained.h | 12 ----\n 7 files changed, 79 insertions(+), 100 deletions(-)", "diff": "diff --git a/arch/arm/dts/at91-sama5d2_xplained.dts b/arch/arm/dts/at91-sama5d2_xplained.dts\nindex b00aaa2c79..01326a1ee0 100644\n--- a/arch/arm/dts/at91-sama5d2_xplained.dts\n+++ b/arch/arm/dts/at91-sama5d2_xplained.dts\n@@ -41,6 +41,31 @@\n \t\t};\n \n \t\tapb {\n+\t\t\thlcdc: hlcdc@f0000000 {\n+\t\t\t\tatmel,vl-bpix = <4>;\n+\t\t\t\tatmel,guard-time = <1>;\n+\t\t\t\tpinctrl-names = \"default\";\n+\t\t\t\tpinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_pwm &pinctrl_lcd_rgb666>;\n+\t\t\t\tstatus = \"okay\";\n+\t\t\t\tu-boot,dm-pre-reloc;\n+\n+\t\t\t\tdisplay-timings {\n+\t\t\t\t\tu-boot,dm-pre-reloc;\n+\t\t\t\t\t480x272 {\n+\t\t\t\t\t\tclock-frequency = <9000000>;\n+\t\t\t\t\t\thactive = <480>;\n+\t\t\t\t\t\tvactive = <272>;\n+\t\t\t\t\t\thsync-len = <41>;\n+\t\t\t\t\t\thfront-porch = <2>;\n+\t\t\t\t\t\thback-porch = <2>;\n+\t\t\t\t\t\tvfront-porch = <2>;\n+\t\t\t\t\t\tvback-porch = <2>;\n+\t\t\t\t\t\tvsync-len = <11>;\n+\t\t\t\t\t\tu-boot,dm-pre-reloc;\n+\t\t\t\t\t};\n+\t\t\t\t};\n+\t\t\t};\n+\n \t\t\tqspi0: spi@f0020000 {\n \t\t\t\tstatus = \"okay\";\n \n@@ -117,6 +142,41 @@\n \t\t\t\t\t\tbias-disable;\n \t\t\t\t\t};\n \n+\t\t\t\t\tpinctrl_lcd_base: pinctrl_lcd_base {\n+\t\t\t\t\t\tpinmux = <PIN_PC30__LCDVSYNC>,\n+\t\t\t\t\t\t\t<PIN_PC31__LCDHSYNC>,\n+\t\t\t\t\t\t\t<PIN_PD1__LCDDEN>,\n+\t\t\t\t\t\t\t<PIN_PD0__LCDPCK>;\n+\t\t\t\t\t\tbias-disable;\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tpinctrl_lcd_pwm: pinctrl_lcd_pwm {\n+\t\t\t\t\t\tpinmux = <PIN_PC28__LCDPWM>;\n+\t\t\t\t\t\tbias-disable;\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tpinctrl_lcd_rgb666: pinctrl_lcd_rgb666 {\n+\t\t\t\t\t\tpinmux = <PIN_PC10__LCDDAT2>,\n+\t\t\t\t\t\t\t<PIN_PC11__LCDDAT3>,\n+\t\t\t\t\t\t\t<PIN_PC12__LCDDAT4>,\n+\t\t\t\t\t\t\t<PIN_PC13__LCDDAT5>,\n+\t\t\t\t\t\t\t<PIN_PC14__LCDDAT6>,\n+\t\t\t\t\t\t\t<PIN_PC15__LCDDAT7>,\n+\t\t\t\t\t\t\t<PIN_PC16__LCDDAT10>,\n+\t\t\t\t\t\t\t<PIN_PC17__LCDDAT11>,\n+\t\t\t\t\t\t\t<PIN_PC18__LCDDAT12>,\n+\t\t\t\t\t\t\t<PIN_PC19__LCDDAT13>,\n+\t\t\t\t\t\t\t<PIN_PC20__LCDDAT14>,\n+\t\t\t\t\t\t\t<PIN_PC21__LCDDAT15>,\n+\t\t\t\t\t\t\t<PIN_PC22__LCDDAT18>,\n+\t\t\t\t\t\t\t<PIN_PC23__LCDDAT19>,\n+\t\t\t\t\t\t\t<PIN_PC24__LCDDAT20>,\n+\t\t\t\t\t\t\t<PIN_PC25__LCDDAT21>,\n+\t\t\t\t\t\t\t<PIN_PC26__LCDDAT22>,\n+\t\t\t\t\t\t\t<PIN_PC27__LCDDAT23>;\n+\t\t\t\t\t\tbias-disable;\n+\t\t\t\t\t};\n+\n \t\t\t\t\tpinctrl_macb0_phy_irq: macb0_phy_irq {\n \t\t\t\t\t\tpinmux = <PIN_PC9__GPIO>;\n \t\t\t\t\t\tbias-disable;\ndiff --git a/arch/arm/dts/sama5d2.dtsi b/arch/arm/dts/sama5d2.dtsi\nindex b02a602378..7520446dc1 100644\n--- a/arch/arm/dts/sama5d2.dtsi\n+++ b/arch/arm/dts/sama5d2.dtsi\n@@ -69,6 +69,13 @@\n \t\t\t#size-cells = <1>;\n \t\t\tu-boot,dm-pre-reloc;\n \n+\t\t\thlcdc: hlcdc@f0000000 {\n+\t\t\t\tcompatible = \"atmel,at91sam9x5-hlcdc\";\n+\t\t\t\treg = <0xf0000000 0x2000>;\n+\t\t\t\tclocks = <&lcdc_clk>;\n+\t\t\t\tstatus = \"disabled\";\n+\t\t\t};\n+\n \t\t\tpmc: pmc@f0014000 {\n \t\t\t\tcompatible = \"atmel,sama5d2-pmc\", \"syscon\";\n \t\t\t\treg = <0xf0014000 0x160>;\ndiff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig\nindex 0e71b69a19..abc79d9637 100644\n--- a/arch/arm/mach-at91/Kconfig\n+++ b/arch/arm/mach-at91/Kconfig\n@@ -153,6 +153,7 @@ config TARGET_SAMA5D2_XPLAINED\n \tselect SAMA5D2\n \tselect SUPPORT_SPL\n \tselect BOARD_EARLY_INIT_F\n+\tselect BOARD_LATE_INIT\n \n config TARGET_SAMA5D27_SOM1_EK\n \tbool \"SAMA5D27 SOM1 EK board\"\ndiff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c\nindex 5758653030..778142ac71 100644\n--- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c\n+++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c\n@@ -6,10 +6,7 @@\n */\n \n #include <common.h>\n-#include <atmel_hlcdc.h>\n #include <debug_uart.h>\n-#include <lcd.h>\n-#include <version.h>\n #include <asm/io.h>\n #include <asm/arch/at91_common.h>\n #include <asm/arch/atmel_pio4.h>\n@@ -26,90 +23,15 @@ static void board_usb_hw_init(void)\n \tatmel_pio4_set_pio_output(AT91_PIO_PORTB, 10, 1);\n }\n \n-#ifdef CONFIG_LCD\n-vidinfo_t panel_info = {\n-\t.vl_col = 480,\n-\t.vl_row = 272,\n-\t.vl_clk = 9000000,\n-\t.vl_bpix = LCD_BPP,\n-\t.vl_tft = 1,\n-\t.vl_hsync_len = 41,\n-\t.vl_left_margin = 2,\n-\t.vl_right_margin = 2,\n-\t.vl_vsync_len = 11,\n-\t.vl_upper_margin = 2,\n-\t.vl_lower_margin = 2,\n-\t.mmio = ATMEL_BASE_LCDC,\n-};\n-\n-/* No power up/down pin for the LCD pannel */\n-void lcd_enable(void)\t{ /* Empty! */ }\n-void lcd_disable(void)\t{ /* Empty! */ }\n-\n-unsigned int has_lcdc(void)\n+#ifdef CONFIG_BOARD_LATE_INIT\n+int board_late_init(void)\n {\n-\treturn 1;\n-}\n-\n-static void board_lcd_hw_init(void)\n-{\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 28, 0);\t/* LCDPWM */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 29, 0);\t/* LCDDISP */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 30, 0);\t/* LCDVSYNC */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 31, 0);\t/* LCDHSYNC */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTD, 0, 0);\t/* LCDPCK */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTD, 1, 0);\t/* LCDDEN */\n-\n-\t/* LCDDAT0 */\n-\t/* LCDDAT1 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 10, 0);\t/* LCDDAT2 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 11, 0);\t/* LCDDAT3 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 12, 0);\t/* LCDDAT4 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 13, 0);\t/* LCDDAT5 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 14, 0);\t/* LCDDAT6 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 15, 0);\t/* LCDDAT7 */\n-\n-\t/* LCDDAT8 */\n-\t/* LCDDAT9 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 16, 0);\t/* LCDDAT10 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 17, 0);\t/* LCDDAT11 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 18, 0);\t/* LCDDAT12 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 19, 0);\t/* LCDDAT13 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 20, 0);\t/* LCDDAT14 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 21, 0);\t/* LCDDAT15 */\n-\n-\t/* LCDD16 */\n-\t/* LCDD17 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 22, 0);\t/* LCDDAT18 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 23, 0);\t/* LCDDAT19 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 24, 0);\t/* LCDDAT20 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 25, 0);\t/* LCDDAT21 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 26, 0);\t/* LCDDAT22 */\n-\tatmel_pio4_set_a_periph(AT91_PIO_PORTC, 27, 0);\t/* LCDDAT23 */\n-\n-\tat91_periph_clk_enable(ATMEL_ID_LCDC);\n-}\n-\n-#ifdef CONFIG_LCD_INFO\n-void lcd_show_board_info(void)\n-{\n-\tulong dram_size;\n-\tint i;\n-\tchar temp[32];\n-\n-\tlcd_printf(\"%s\\n\", U_BOOT_VERSION);\n-\tlcd_printf(\"2015 ATMEL Corp\\n\");\n-\tlcd_printf(\"%s CPU at %s MHz\\n\", get_cpu_name(),\n-\t\t strmhz(temp, get_cpu_clk_rate()));\n-\n-\tdram_size = 0;\n-\tfor (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)\n-\t\tdram_size += gd->bd->bi_dram[i].size;\n-\n-\tlcd_printf(\"%ld MB SDRAM\\n\", dram_size >> 20);\n+#ifdef CONFIG_DM_VIDEO\n+\tat91_video_show_board_info();\n+#endif\n+\treturn 0;\n }\n-#endif /* CONFIG_LCD_INFO */\n-#endif /* CONFIG_LCD */\n+#endif\n \n #ifdef CONFIG_DEBUG_UART_BOARD_INIT\n static void board_uart1_hw_init(void)\n@@ -142,9 +64,6 @@ int board_init(void)\n \t/* address of boot parameters */\n \tgd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;\n \n-#ifdef CONFIG_LCD\n-\tboard_lcd_hw_init();\n-#endif\n #ifdef CONFIG_CMD_USB\n \tboard_usb_hw_init();\n #endif\ndiff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig\nindex 215961a65c..87fc049b6d 100644\n--- a/configs/sama5d2_xplained_mmc_defconfig\n+++ b/configs/sama5d2_xplained_mmc_defconfig\n@@ -82,3 +82,5 @@ CONFIG_USB_EHCI_HCD=y\n CONFIG_USB_STORAGE=y\n CONFIG_USB_GADGET=y\n CONFIG_USB_GADGET_ATMEL_USBA=y\n+CONFIG_DM_VIDEO=y\n+CONFIG_ATMEL_HLCD=y\ndiff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig\nindex 869d405838..37572489e2 100644\n--- a/configs/sama5d2_xplained_spiflash_defconfig\n+++ b/configs/sama5d2_xplained_spiflash_defconfig\n@@ -79,3 +79,5 @@ CONFIG_USB_EHCI_HCD=y\n CONFIG_USB_STORAGE=y\n CONFIG_USB_GADGET=y\n CONFIG_USB_GADGET_ATMEL_USBA=y\n+CONFIG_DM_VIDEO=y\n+CONFIG_ATMEL_HLCD=y\ndiff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h\nindex 4f24a56899..545ba1740d 100644\n--- a/include/configs/sama5d2_xplained.h\n+++ b/include/configs/sama5d2_xplained.h\n@@ -35,18 +35,6 @@\n #define CONFIG_SF_DEFAULT_SPEED\t\t30000000\n #endif\n \n-/* LCD */\n-\n-#ifdef CONFIG_LCD\n-#define LCD_BPP\t\t\t\tLCD_COLOR16\n-#define LCD_OUTPUT_BPP 24\n-#define CONFIG_LCD_LOGO\n-#define CONFIG_LCD_INFO\n-#define CONFIG_LCD_INFO_BELOW_LOGO\n-#define CONFIG_ATMEL_HLCD\n-#define CONFIG_ATMEL_LCD_RGB565\n-#endif\n-\n #ifdef CONFIG_SD_BOOT\n \n /* bootstrap + u-boot + env in sd card */\n", "prefixes": [ "U-Boot", "v2", "1/5" ] }