get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/814055/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 814055,
    "url": "http://patchwork.ozlabs.org/api/patches/814055/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170915051519.25327-5-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-5-wenyou.yang@microchip.com>",
    "list_archive_url": null,
    "date": "2017-09-15T05:15:18",
    "name": "[U-Boot,v2,4/5] board: sama5d4_xplained: Convert to CONFIG_DM_VIDEO",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "e43ace7743d29e9242e3b6f71d32f7e2a4bca5e1",
    "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-5-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/814055/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/814055/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 3xtkGy55tCz9sPs\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 15:19:38 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 6A7B3C21F12; Fri, 15 Sep 2017 05:18:36 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 1FB40C21F5B;\n\tFri, 15 Sep 2017 05:17:50 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid C592DC21F73; Fri, 15 Sep 2017 05:17:44 +0000 (UTC)",
            "from eusmtp01.atmel.com (eusmtp01.atmel.com [212.144.249.242])\n\tby lists.denx.de (Postfix) with ESMTPS id E9D8AC21F7C\n\tfor <u-boot@lists.denx.de>; Fri, 15 Sep 2017 05:17:43 +0000 (UTC)",
            "from apsmtp01.atmel.com (10.168.254.30) by eusmtp01.atmel.com\n\t(10.145.145.30) with Microsoft SMTP Server id 14.3.235.1;\n\tFri, 15 Sep 2017 07:16:53 +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:21:52 +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:18 +0800",
        "Message-ID": "<20170915051519.25327-5-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 4/5] board: sama5d4_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": "From: Wenyou Yang <wenyou.yang@atmel.com>\n\nConvert 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-sama5d4_xplained.dts          |  25 ++++++\n arch/arm/dts/sama5d4.dtsi                       |  21 +----\n arch/arm/mach-at91/Kconfig                      |   1 +\n board/atmel/common/video_display.c              |   2 +-\n board/atmel/sama5d4_xplained/sama5d4_xplained.c | 102 ++----------------------\n configs/sama5d4_xplained_mmc_defconfig          |   2 +\n configs/sama5d4_xplained_nandflash_defconfig    |   2 +\n configs/sama5d4_xplained_spiflash_defconfig     |   2 +\n include/configs/sama5d4_xplained.h              |  11 ---\n 9 files changed, 40 insertions(+), 128 deletions(-)",
    "diff": "diff --git a/arch/arm/dts/at91-sama5d4_xplained.dts b/arch/arm/dts/at91-sama5d4_xplained.dts\nindex 0592b31b91..ea35dc21b6 100644\n--- a/arch/arm/dts/at91-sama5d4_xplained.dts\n+++ b/arch/arm/dts/at91-sama5d4_xplained.dts\n@@ -74,6 +74,31 @@\n \n \tahb {\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_rgb888>;\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\tspi0: spi@f8010000 {\n \t\t\t\tu-boot,dm-pre-reloc;\n \t\t\t\tcs-gpios = <&pioC 3 0>, <0>, <0>, <0>;\ndiff --git a/arch/arm/dts/sama5d4.dtsi b/arch/arm/dts/sama5d4.dtsi\nindex c6512ae437..8072b8a4f2 100644\n--- a/arch/arm/dts/sama5d4.dtsi\n+++ b/arch/arm/dts/sama5d4.dtsi\n@@ -320,31 +320,12 @@\n \t\t\tu-boot,dm-pre-reloc;\n \n \t\t\thlcdc: hlcdc@f0000000 {\n-\t\t\t\tcompatible = \"atmel,sama5d4-hlcdc\";\n+\t\t\t\tcompatible = \"atmel,at91sam9x5-hlcdc\";\n \t\t\t\treg = <0xf0000000 0x4000>;\n \t\t\t\tinterrupts = <51 IRQ_TYPE_LEVEL_HIGH 0>;\n \t\t\t\tclocks = <&lcdc_clk>, <&lcdck>, <&clk32k>;\n \t\t\t\tclock-names = \"periph_clk\",\"sys_clk\", \"slow_clk\";\n \t\t\t\tstatus = \"disabled\";\n-\n-\t\t\t\thlcdc-display-controller {\n-\t\t\t\t\tcompatible = \"atmel,hlcdc-display-controller\";\n-\t\t\t\t\t#address-cells = <1>;\n-\t\t\t\t\t#size-cells = <0>;\n-\n-\t\t\t\t\tport@0 {\n-\t\t\t\t\t\t#address-cells = <1>;\n-\t\t\t\t\t\t#size-cells = <0>;\n-\t\t\t\t\t\treg = <0>;\n-\t\t\t\t\t};\n-\t\t\t\t};\n-\n-\t\t\t\thlcdc_pwm: hlcdc-pwm {\n-\t\t\t\t\tcompatible = \"atmel,hlcdc-pwm\";\n-\t\t\t\t\tpinctrl-names = \"default\";\n-\t\t\t\t\tpinctrl-0 = <&pinctrl_lcd_pwm>;\n-\t\t\t\t\t#pwm-cells = <3>;\n-\t\t\t\t};\n \t\t\t};\n \n \t\t\tdma1: dma-controller@f0004000 {\ndiff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig\nindex b4967f9203..ebd865ab5b 100644\n--- a/arch/arm/mach-at91/Kconfig\n+++ b/arch/arm/mach-at91/Kconfig\n@@ -186,6 +186,7 @@ config TARGET_SAMA5D4_XPLAINED\n \tselect SAMA5D4\n \tselect SUPPORT_SPL\n \tselect BOARD_EARLY_INIT_F\n+\tselect BOARD_LATE_INIT\n \n config TARGET_SAMA5D4EK\n \tbool \"SAMA5D4 Evaluation Kit\"\ndiff --git a/board/atmel/common/video_display.c b/board/atmel/common/video_display.c\nindex 39ad619819..b20abc7386 100644\n--- a/board/atmel/common/video_display.c\n+++ b/board/atmel/common/video_display.c\n@@ -43,7 +43,7 @@ int at91_video_show_board_info(void)\n \tnand_size = 0;\n #ifdef CONFIG_NAND_ATMEL\n \tfor (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++)\n-\t\tnand_size += nand_info[i]->size;\n+\t\tnand_size += get_nand_dev_by_index(i)->size;\n #endif\n \n \tlen += sprintf(&buf[len], \"%ld MB SDRAM, %ld MB NAND\\n\",\ndiff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c\nindex 9236a28549..78eddb8beb 100644\n--- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c\n+++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c\n@@ -14,11 +14,7 @@\n #include <asm/arch/clk.h>\n #include <asm/arch/sama5d3_smc.h>\n #include <asm/arch/sama5d4.h>\n-#include <atmel_hlcdc.h>\n #include <debug_uart.h>\n-#include <lcd.h>\n-#include <nand.h>\n-#include <version.h>\n \n DECLARE_GLOBAL_DATA_PTR;\n \n@@ -73,98 +69,15 @@ static void sama5d4_xplained_usb_hw_init(void)\n }\n #endif\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 sama5d4_xplained_lcd_hw_init(void)\n-{\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 24, 0);\t/* LCDPWM */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 25, 0);\t/* LCDDISP */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 26, 0);\t/* LCDVSYNC */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 27, 0);\t/* LCDHSYNC */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 28, 0);\t/* LCDDOTCK */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 29, 0);\t/* LCDDEN */\n-\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA,  0, 0);\t/* LCDD0 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA,  1, 0);\t/* LCDD1 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA,  2, 0);\t/* LCDD2 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA,  3, 0);\t/* LCDD3 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA,  4, 0);\t/* LCDD4 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA,  5, 0);\t/* LCDD5 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA,  6, 0);\t/* LCDD6 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA,  7, 0);\t/* LCDD7 */\n-\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA,  8, 0);\t/* LCDD9 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA,  9, 0);\t/* LCDD8 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 10, 0);\t/* LCDD10 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 11, 0);\t/* LCDD11 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 12, 0);\t/* LCDD12 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 13, 0);\t/* LCDD13 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 14, 0);\t/* LCDD14 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 15, 0);\t/* LCDD15 */\n-\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 16, 0);\t/* LCDD16 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 17, 0);\t/* LCDD17 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 18, 0);\t/* LCDD18 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 19, 0);\t/* LCDD19 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 20, 0);\t/* LCDD20 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 21, 0);\t/* LCDD21 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 22, 0);\t/* LCDD22 */\n-\tat91_pio3_set_a_periph(AT91_PIO_PORTA, 23, 0);\t/* LCDD23 */\n-\n-\t/* Enable clock */\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, nand_size;\n-\tint i;\n-\tchar temp[32];\n-\n-\tlcd_printf(\"%s\\n\", U_BOOT_VERSION);\n-\tlcd_printf(\"2014 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-\tnand_size = 0;\n-#ifdef CONFIG_NAND_ATMEL\n-\tfor (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++)\n-\t\tnand_size += get_nand_dev_by_index(i)->size;\n+#ifdef CONFIG_DM_VIDEO\n+\tat91_video_show_board_info();\n #endif\n-\tlcd_printf(\"%ld MB SDRAM, %ld MB NAND\\n\",\n-\t\t   dram_size >> 20, nand_size >> 20);\n+\treturn 0;\n }\n-#endif /* CONFIG_LCD_INFO */\n-\n-#endif /* CONFIG_LCD */\n+#endif\n \n #ifdef CONFIG_DEBUG_UART_BOARD_INIT\n static void sama5d4_xplained_serial3_hw_init(void)\n@@ -212,9 +125,6 @@ int board_init(void)\n #ifdef CONFIG_NAND_ATMEL\n \tsama5d4_xplained_nand_hw_init();\n #endif\n-#ifdef CONFIG_LCD\n-\tsama5d4_xplained_lcd_hw_init();\n-#endif\n #ifdef CONFIG_CMD_USB\n \tsama5d4_xplained_usb_hw_init();\n #endif\ndiff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig\nindex dabbf605c5..8ecba5b7d4 100644\n--- a/configs/sama5d4_xplained_mmc_defconfig\n+++ b/configs/sama5d4_xplained_mmc_defconfig\n@@ -78,3 +78,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/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig\nindex 85157878cd..bd3131f4cc 100644\n--- a/configs/sama5d4_xplained_nandflash_defconfig\n+++ b/configs/sama5d4_xplained_nandflash_defconfig\n@@ -75,3 +75,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/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig\nindex 4061720b3a..d37be67eb6 100644\n--- a/configs/sama5d4_xplained_spiflash_defconfig\n+++ b/configs/sama5d4_xplained_spiflash_defconfig\n@@ -77,3 +77,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/sama5d4_xplained.h b/include/configs/sama5d4_xplained.h\nindex 5dc5e7dd0c..6aa4bcc5c5 100644\n--- a/include/configs/sama5d4_xplained.h\n+++ b/include/configs/sama5d4_xplained.h\n@@ -47,17 +47,6 @@\n #define CONFIG_ATMEL_NAND_HW_PMECC\n #endif\n \n-/* LCD */\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 /* SPL */\n #define CONFIG_SPL_FRAMEWORK\n #define CONFIG_SPL_TEXT_BASE\t\t0x200000\n",
    "prefixes": [
        "U-Boot",
        "v2",
        "4/5"
    ]
}