{"action":"created","comment":{"url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/comments/65038039","id":65038039,"diff_hunk":"@@ -0,0 +1,99 @@\n+/*\n+ * Copyright (c) 2016, Xilinx Inc.\n+ * All rights reserved.\n+ *\n+ * Redistribution and use in source and binary forms, with or without\n+ * modification, are permitted provided that the following conditions are met:\n+ *\n+ * 1. Redistributions of source code must retain the above copyright notice,\n+ * this list of conditions and the following disclaimer.\n+ *\n+ * 2. Redistributions in binary form must reproduce the above copyright notice,\n+ * this list of conditions and the following disclaimer in the documentation\n+ * and/or other materials provided with the distribution.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n+ * POSSIBILITY OF SUCH DAMAGE.\n+ */\n+#include <compiler.h>\n+#include <drivers/cdns_uart.h>\n+#include <io.h>\n+\n+#define BIT(n)\t\t(1 << n)\n+\n+#define CDNS_UART_CONTROL\t\t0\n+#define CDNS_UART_MODE\t\t\t4\n+#define CDNS_UART_IEN\t\t\t8\n+#define CDNS_UART_IRQ_STATUS\t\t0x14\n+#define CDNS_UART_CHANNEL_STATUS\t0x2c\n+#define CDNS_UART_FIFO\t\t\t0x30\n+\n+#define CDNS_UART_CONTROL_RXRES\t\tBIT(0)\n+#define CDNS_UART_CONTROL_TXRES\t\tBIT(1)\n+#define CDNS_UART_CONTROL_RXEN\t\tBIT(2)\n+#define CDNS_UART_CONTROL_TXEN\t\tBIT(4)\n+\n+#define CDNS_UART_MODE_8BIT\t\t(0 << 1)\n+#define CDNS_UART_MODE_PARITY_NONE\t(0x4 << 3)\n+#define CDNS_UART_MODE_1STP\t\t(0 << 6)\n+\n+#define CDNS_UART_CHANNEL_STATUS_TFUL\tBIT(4)\n+#define CDNS_UART_CHANNEL_STATUS_TEMPTY\tBIT(3)\n+#define CDNS_UART_CHANNEL_STATUS_REMPTY\tBIT(1)\n+\n+#define CDNS_UART_IRQ_RXTRIG\t\tBIT(0)\n+#define CDNS_UART_IRQ_RXTOUT\t\tBIT(8)\n+\n+void cdns_uart_flush(vaddr_t base)\n+{\n+\twhile (!(read32(base + CDNS_UART_CHANNEL_STATUS) & CDNS_UART_CHANNEL_STATUS_TEMPTY))","path":"core/drivers/cdns_uart.c","position":58,"original_position":58,"commit_id":"afabdc1af6d438de30c2e73de67a9adfe56658b0","original_commit_id":"2a3b4000f2891019e332cc8510f40d5a63fb7278","user":{"login":"jforissier","id":8288195,"avatar_url":"https://avatars.githubusercontent.com/u/8288195?v=3","gravatar_id":"","url":"https://api.github.com/users/jforissier","html_url":"https://github.com/jforissier","followers_url":"https://api.github.com/users/jforissier/followers","following_url":"https://api.github.com/users/jforissier/following{/other_user}","gists_url":"https://api.github.com/users/jforissier/gists{/gist_id}","starred_url":"https://api.github.com/users/jforissier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jforissier/subscriptions","organizations_url":"https://api.github.com/users/jforissier/orgs","repos_url":"https://api.github.com/users/jforissier/repos","events_url":"https://api.github.com/users/jforissier/events{/privacy}","received_events_url":"https://api.github.com/users/jforissier/received_events","type":"User","site_admin":false},"body":"Line too long","created_at":"2016-05-30T08:06:46Z","updated_at":"2016-05-30T08:06:46Z","html_url":"https://github.com/OP-TEE/optee_os/pull/819#discussion_r65038039","pull_request_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/819","_links":{"self":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/comments/65038039"},"html":{"href":"https://github.com/OP-TEE/optee_os/pull/819#discussion_r65038039"},"pull_request":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/819"}}},"pull_request":{"url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/819","id":71807281,"html_url":"https://github.com/OP-TEE/optee_os/pull/819","diff_url":"https://github.com/OP-TEE/optee_os/pull/819.diff","patch_url":"https://github.com/OP-TEE/optee_os/pull/819.patch","issue_url":"https://api.github.com/repos/OP-TEE/optee_os/issues/819","number":819,"state":"open","locked":false,"title":"Zynqmp support","user":{"login":"sorenb-xlnx","id":3967646,"avatar_url":"https://avatars.githubusercontent.com/u/3967646?v=3","gravatar_id":"","url":"https://api.github.com/users/sorenb-xlnx","html_url":"https://github.com/sorenb-xlnx","followers_url":"https://api.github.com/users/sorenb-xlnx/followers","following_url":"https://api.github.com/users/sorenb-xlnx/following{/other_user}","gists_url":"https://api.github.com/users/sorenb-xlnx/gists{/gist_id}","starred_url":"https://api.github.com/users/sorenb-xlnx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorenb-xlnx/subscriptions","organizations_url":"https://api.github.com/users/sorenb-xlnx/orgs","repos_url":"https://api.github.com/users/sorenb-xlnx/repos","events_url":"https://api.github.com/users/sorenb-xlnx/events{/privacy}","received_events_url":"https://api.github.com/users/sorenb-xlnx/received_events","type":"User","site_admin":false},"body":"Support for Xilinx Zynq UltraScale+ MPSOC.\r\nThis PR includes  platform support for the A53 cluster of the ZynqMP SoC and a driver for the Cadence UART found in that SoC.\r\nThe zynqmp port is based on the vexpress platform port.","created_at":"2016-05-28T17:25:32Z","updated_at":"2016-05-30T08:06:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9072fba6dcb64100e3dbbb52b885400ee53cf781","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/819/commits","review_comments_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/819/comments","review_comment_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OP-TEE/optee_os/issues/819/comments","statuses_url":"https://api.github.com/repos/OP-TEE/optee_os/statuses/afabdc1af6d438de30c2e73de67a9adfe56658b0","head":{"label":"sorenb-xlnx:zynqmp","ref":"zynqmp","sha":"afabdc1af6d438de30c2e73de67a9adfe56658b0","user":{"login":"sorenb-xlnx","id":3967646,"avatar_url":"https://avatars.githubusercontent.com/u/3967646?v=3","gravatar_id":"","url":"https://api.github.com/users/sorenb-xlnx","html_url":"https://github.com/sorenb-xlnx","followers_url":"https://api.github.com/users/sorenb-xlnx/followers","following_url":"https://api.github.com/users/sorenb-xlnx/following{/other_user}","gists_url":"https://api.github.com/users/sorenb-xlnx/gists{/gist_id}","starred_url":"https://api.github.com/users/sorenb-xlnx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorenb-xlnx/subscriptions","organizations_url":"https://api.github.com/users/sorenb-xlnx/orgs","repos_url":"https://api.github.com/users/sorenb-xlnx/repos","events_url":"https://api.github.com/users/sorenb-xlnx/events{/privacy}","received_events_url":"https://api.github.com/users/sorenb-xlnx/received_events","type":"User","site_admin":false},"repo":{"id":59906116,"name":"optee_os","full_name":"sorenb-xlnx/optee_os","owner":{"login":"sorenb-xlnx","id":3967646,"avatar_url":"https://avatars.githubusercontent.com/u/3967646?v=3","gravatar_id":"","url":"https://api.github.com/users/sorenb-xlnx","html_url":"https://github.com/sorenb-xlnx","followers_url":"https://api.github.com/users/sorenb-xlnx/followers","following_url":"https://api.github.com/users/sorenb-xlnx/following{/other_user}","gists_url":"https://api.github.com/users/sorenb-xlnx/gists{/gist_id}","starred_url":"https://api.github.com/users/sorenb-xlnx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorenb-xlnx/subscriptions","organizations_url":"https://api.github.com/users/sorenb-xlnx/orgs","repos_url":"https://api.github.com/users/sorenb-xlnx/repos","events_url":"https://api.github.com/users/sorenb-xlnx/events{/privacy}","received_events_url":"https://api.github.com/users/sorenb-xlnx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sorenb-xlnx/optee_os","description":"Trusted side of the TEE","fork":true,"url":"https://api.github.com/repos/sorenb-xlnx/optee_os","forks_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/forks","keys_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/teams","hooks_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/hooks","issue_events_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/issues/events{/number}","events_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/events","assignees_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/assignees{/user}","branches_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/branches{/branch}","tags_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/tags","blobs_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/git/refs{/sha}","trees_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/statuses/{sha}","languages_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/languages","stargazers_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/stargazers","contributors_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/contributors","subscribers_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/subscribers","subscription_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/subscription","commits_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/commits{/sha}","git_commits_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/git/commits{/sha}","comments_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/comments{/number}","issue_comment_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/issues/comments{/number}","contents_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/contents/{+path}","compare_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/merges","archive_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/downloads","issues_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/issues{/number}","pulls_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/pulls{/number}","milestones_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/milestones{/number}","notifications_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/labels{/name}","releases_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/releases{/id}","deployments_url":"https://api.github.com/repos/sorenb-xlnx/optee_os/deployments","created_at":"2016-05-28T17:16:37Z","updated_at":"2016-05-28T17:16:41Z","pushed_at":"2016-05-28T18:29:54Z","git_url":"git://github.com/sorenb-xlnx/optee_os.git","ssh_url":"git@github.com:sorenb-xlnx/optee_os.git","clone_url":"https://github.com/sorenb-xlnx/optee_os.git","svn_url":"https://github.com/sorenb-xlnx/optee_os","homepage":null,"size":5512,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OP-TEE:master","ref":"master","sha":"a117382083ee2c26a98629d1626e0503030ec780","user":{"login":"OP-TEE","id":7488961,"avatar_url":"https://avatars.githubusercontent.com/u/7488961?v=3","gravatar_id":"","url":"https://api.github.com/users/OP-TEE","html_url":"https://github.com/OP-TEE","followers_url":"https://api.github.com/users/OP-TEE/followers","following_url":"https://api.github.com/users/OP-TEE/following{/other_user}","gists_url":"https://api.github.com/users/OP-TEE/gists{/gist_id}","starred_url":"https://api.github.com/users/OP-TEE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OP-TEE/subscriptions","organizations_url":"https://api.github.com/users/OP-TEE/orgs","repos_url":"https://api.github.com/users/OP-TEE/repos","events_url":"https://api.github.com/users/OP-TEE/events{/privacy}","received_events_url":"https://api.github.com/users/OP-TEE/received_events","type":"Organization","site_admin":false},"repo":{"id":20193261,"name":"optee_os","full_name":"OP-TEE/optee_os","owner":{"login":"OP-TEE","id":7488961,"avatar_url":"https://avatars.githubusercontent.com/u/7488961?v=3","gravatar_id":"","url":"https://api.github.com/users/OP-TEE","html_url":"https://github.com/OP-TEE","followers_url":"https://api.github.com/users/OP-TEE/followers","following_url":"https://api.github.com/users/OP-TEE/following{/other_user}","gists_url":"https://api.github.com/users/OP-TEE/gists{/gist_id}","starred_url":"https://api.github.com/users/OP-TEE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OP-TEE/subscriptions","organizations_url":"https://api.github.com/users/OP-TEE/orgs","repos_url":"https://api.github.com/users/OP-TEE/repos","events_url":"https://api.github.com/users/OP-TEE/events{/privacy}","received_events_url":"https://api.github.com/users/OP-TEE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OP-TEE/optee_os","description":"Trusted side of the TEE","fork":false,"url":"https://api.github.com/repos/OP-TEE/optee_os","forks_url":"https://api.github.com/repos/OP-TEE/optee_os/forks","keys_url":"https://api.github.com/repos/OP-TEE/optee_os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OP-TEE/optee_os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OP-TEE/optee_os/teams","hooks_url":"https://api.github.com/repos/OP-TEE/optee_os/hooks","issue_events_url":"https://api.github.com/repos/OP-TEE/optee_os/issues/events{/number}","events_url":"https://api.github.com/repos/OP-TEE/optee_os/events","assignees_url":"https://api.github.com/repos/OP-TEE/optee_os/assignees{/user}","branches_url":"https://api.github.com/repos/OP-TEE/optee_os/branches{/branch}","tags_url":"https://api.github.com/repos/OP-TEE/optee_os/tags","blobs_url":"https://api.github.com/repos/OP-TEE/optee_os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OP-TEE/optee_os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OP-TEE/optee_os/git/refs{/sha}","trees_url":"https://api.github.com/repos/OP-TEE/optee_os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OP-TEE/optee_os/statuses/{sha}","languages_url":"https://api.github.com/repos/OP-TEE/optee_os/languages","stargazers_url":"https://api.github.com/repos/OP-TEE/optee_os/stargazers","contributors_url":"https://api.github.com/repos/OP-TEE/optee_os/contributors","subscribers_url":"https://api.github.com/repos/OP-TEE/optee_os/subscribers","subscription_url":"https://api.github.com/repos/OP-TEE/optee_os/subscription","commits_url":"https://api.github.com/repos/OP-TEE/optee_os/commits{/sha}","git_commits_url":"https://api.github.com/repos/OP-TEE/optee_os/git/commits{/sha}","comments_url":"https://api.github.com/repos/OP-TEE/optee_os/comments{/number}","issue_comment_url":"https://api.github.com/repos/OP-TEE/optee_os/issues/comments{/number}","contents_url":"https://api.github.com/repos/OP-TEE/optee_os/contents/{+path}","compare_url":"https://api.github.com/repos/OP-TEE/optee_os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OP-TEE/optee_os/merges","archive_url":"https://api.github.com/repos/OP-TEE/optee_os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OP-TEE/optee_os/downloads","issues_url":"https://api.github.com/repos/OP-TEE/optee_os/issues{/number}","pulls_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls{/number}","milestones_url":"https://api.github.com/repos/OP-TEE/optee_os/milestones{/number}","notifications_url":"https://api.github.com/repos/OP-TEE/optee_os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OP-TEE/optee_os/labels{/name}","releases_url":"https://api.github.com/repos/OP-TEE/optee_os/releases{/id}","deployments_url":"https://api.github.com/repos/OP-TEE/optee_os/deployments","created_at":"2014-05-26T17:18:57Z","updated_at":"2016-05-25T03:21:38Z","pushed_at":"2016-05-28T18:29:55Z","git_url":"git://github.com/OP-TEE/optee_os.git","ssh_url":"git@github.com:OP-TEE/optee_os.git","clone_url":"https://github.com/OP-TEE/optee_os.git","svn_url":"https://github.com/OP-TEE/optee_os","homepage":null,"size":10208,"stargazers_count":116,"watchers_count":116,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":121,"mirror_url":null,"open_issues_count":28,"forks":121,"open_issues":28,"watchers":116,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/819"},"html":{"href":"https://github.com/OP-TEE/optee_os/pull/819"},"issue":{"href":"https://api.github.com/repos/OP-TEE/optee_os/issues/819"},"comments":{"href":"https://api.github.com/repos/OP-TEE/optee_os/issues/819/comments"},"review_comments":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/819/comments"},"review_comment":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/819/commits"},"statuses":{"href":"https://api.github.com/repos/OP-TEE/optee_os/statuses/afabdc1af6d438de30c2e73de67a9adfe56658b0"}}}}
{"actor":{"display_login":"jforissier"}}