Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How commit my patch? #16

Open
AlooGS opened this issue May 8, 2020 · 1 comment
Open

How commit my patch? #16

AlooGS opened this issue May 8, 2020 · 1 comment

Comments

@AlooGS
Copy link

AlooGS commented May 8, 2020

From 6f21f2dc57bb5b469e370946d998a6efce0c9c93 Mon Sep 17 00:00:00 2001
From: Ainux [email protected]
Date: Thu, 7 May 2020 14:57:08 +0800
Subject: [PATCH] console-server: Add sirq polarity support

Kernel upstream:
commit 8d310c9107a2a3f19dc7bb54dd50f70c65ef5409

drivers/tty/serial/8250: Make Aspeed VUART SIRQ polarity configurable

Make the SIRQ polarity for Aspeed AST24xx/25xx VUART configurable via
sysfs. This setting need to be changed on specific host platforms
depending on the selected host interface (LPC / eSPI).

The setting is configurable via sysfs rather than device-tree to stay in
line with other related configurable settings.

On AST2500 the VUART SIRQ polarity can be auto-configured by reading a
bit from a configuration register, e.g. the LPC/eSPI interface
configuration bit.

So we need add sirq polarity support.


console-server.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/console-server.c b/console-server.c
index d814dff..6e4925f 100644
--- a/console-server.c
+++ b/console-server.c
@@ -49,6 +49,7 @@ struct console {
char *tty_sysfs_devnode;
char *tty_dev;
int tty_sirq;

  • int tty_sirq_polarity;
    int tty_lpc_addr;
    speed_t tty_baud;
    int tty_fd;
    @@ -256,6 +257,8 @@ static int tty_init_io(struct console *console)
    {
    if (console->tty_sirq)
    tty_set_sysfs_attr(console, "sirq", console->tty_sirq);

  • if (console->tty_sirq_polarity)

  •   tty_set_sysfs_attr(console, "sirq_polarity", console->tty_sirq_polarity);
    

    if (console->tty_lpc_addr)
    tty_set_sysfs_attr(console, "lpc_address",
    console->tty_lpc_addr);
    @@ -301,6 +304,13 @@ static int tty_init(struct console *console, struct config *config)
    warn("Invalid sirq: '%s'", val);
    }

  • val = config_get_value(config, "sirq-polarity");

  • if (val) {

  •   console->tty_sirq_polarity = strtoul(val, &endp, 0);
    
  •   if (endp == optarg)
    
  •   	warn("Invalid sirq polarity: '%s'", val);
    
  • }

  • val = config_get_value(config, "baud");
    if (val) {
    if (config_parse_baud(&console->tty_baud, val))
    --
    2.18.1

@AlooGS AlooGS changed the title How commit i patch How commit my patch? May 8, 2020
@mdmillerii
Copy link

Please follow the instructions at openbmc/docs CONTRIBUTING.md. Please read the whole document for other considerations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants