]> git.zerfleddert.de Git - ms2-kexec/commitdiff
serial seems to work, but produces no output on headphone jack
authorMichael Gernoth <michael@gernoth.net>
Thu, 26 May 2011 10:06:10 +0000 (12:06 +0200)
committerMichael Gernoth <michael@gernoth.net>
Thu, 26 May 2011 10:06:10 +0000 (12:06 +0200)
hs_cons.c
omap-hs-serial.c

index 7983db446a6b430f4adeff52975f92fe415d93a2..8ca5b801ce23d42d4db9910f12f8d59a5bb0bf79 100644 (file)
--- a/hs_cons.c
+++ b/hs_cons.c
@@ -44,9 +44,8 @@ static int __init headphone_cons_init(void)
        if (hs_switch < 0)
                return -EINVAL;
 
        if (hs_switch < 0)
                return -EINVAL;
 
-       printk(KERN_INFO "headset_uart_switch: %d\n", hs_switch);
+       printk(KERN_INFO "headset_uart_switch: %d, value: %d\n", hs_switch, gpio_get_value(hs_switch));
 
 
-       printk(KERN_INFO "value: %d\n", gpio_get_value(hs_switch));
        if (!gpio_get_value(hs_switch))
                return -ENODEV;
 
        if (!gpio_get_value(hs_switch))
                return -ENODEV;
 
@@ -59,7 +58,7 @@ static int __init headphone_cons_init(void)
 
        /* route kernel uart out headset jack */
        gpio_direction_output(hs_switch, 0);
 
        /* route kernel uart out headset jack */
        gpio_direction_output(hs_switch, 0);
-       printk(KERN_INFO "value: %d\n", gpio_get_value(hs_switch));
+       printk(KERN_INFO "headset_uart_switch: %d, value: %d\n", hs_switch, gpio_get_value(hs_switch));
 
        //add_preferred_console("ttyS", 2, "115200");
        return 0;
 
        //add_preferred_console("ttyS", 2, "115200");
        return 0;
index 8d2fbad6d20099110ef0619a865f03f2eefca537..8e44e87bd281e08cd9de39994c31ef9eb9411eca 100644 (file)
@@ -1060,7 +1060,7 @@ serial_omap_type(struct uart_port *port)
 {
        struct uart_omap_port *up = (struct uart_omap_port *)port;
 
 {
        struct uart_omap_port *up = (struct uart_omap_port *)port;
 
-       DPRINTK("serial_omap_type+%d\n", up->pdev->id);
+       DPRINTK("serial_omap_hs_type+%d\n", up->pdev->id);
        return up->name;
 }
 
        return up->name;
 }
 
@@ -1232,7 +1232,7 @@ static struct uart_driver serial_omap_reg = {
        .driver_name    = "OMAP-HS-SERIAL",
        .dev_name       = "ttyS",
        .major          = TTY_MAJOR,
        .driver_name    = "OMAP-HS-SERIAL",
        .dev_name       = "ttyS",
        .major          = TTY_MAJOR,
-       .minor          = 64,
+       .minor          = 128,
        .nr             = 4,
        .cons           = OMAP_CONSOLE,
 };
        .nr             = 4,
        .cons           = OMAP_CONSOLE,
 };
@@ -1454,7 +1454,9 @@ static int serial_omap_probe(struct platform_device *pdev)
        struct uart_omap_port   *up;
        struct resource         *mem, *irq;
        int ret = -ENOSPC;
        struct uart_omap_port   *up;
        struct resource         *mem, *irq;
        int ret = -ENOSPC;
+#if 0
        char str[7];
        char str[7];
+#endif
 
        if (!pdata) {
                dev_err(&pdev->dev, "no platform data?\n");
 
        if (!pdata) {
                dev_err(&pdev->dev, "no platform data?\n");
@@ -1488,7 +1490,7 @@ static int serial_omap_probe(struct platform_device *pdev)
                ret = -ENOMEM;
                goto do_release_region;
        }
                ret = -ENOMEM;
                goto do_release_region;
        }
-       sprintf(up->name, "OMAP UART%d", pdev->id);
+       sprintf(up->name, "OMAP HS UART%d", pdev->id);
 
        up->pdev = pdev;
        up->port.dev = &pdev->dev;
 
        up->pdev = pdev;
        up->port.dev = &pdev->dev;
@@ -1549,10 +1551,13 @@ static int serial_omap_probe(struct platform_device *pdev)
                up->uart_dma.tx_dma_channel = 0xFF;
                up->uart_dma.rx_dma_channel = 0xFF;
        }
                up->uart_dma.tx_dma_channel = 0xFF;
                up->uart_dma.rx_dma_channel = 0xFF;
        }
+#if 0
        if (console_detect(str))
                printk("Invalid console paramter. UART Library Init Failed!\n");
        if (console_detect(str))
                printk("Invalid console paramter. UART Library Init Failed!\n");
+#endif
        up->use_console = 0;
        fcr[pdev->id - 1] = 0;
        up->use_console = 0;
        fcr[pdev->id - 1] = 0;
+#if 0
        if (!strcmp(str, "ttyS0"))
                up->use_console = 1;
        else if (!strcmp(str, "ttyS1"))
        if (!strcmp(str, "ttyS0"))
                up->use_console = 1;
        else if (!strcmp(str, "ttyS1"))
@@ -1564,6 +1569,8 @@ static int serial_omap_probe(struct platform_device *pdev)
        else
                printk(KERN_INFO
                       "!!!!!!!! Unable to recongnize Console UART........\n");
        else
                printk(KERN_INFO
                       "!!!!!!!! Unable to recongnize Console UART........\n");
+#endif
+       up->use_console = 1;
        ui[pdev->id - 1] = up;
        serial_omap_add_console_port(up);
        serial_omap_clear_fifos(up);
        ui[pdev->id - 1] = up;
        serial_omap_add_console_port(up);
        serial_omap_clear_fifos(up);
@@ -1616,6 +1623,7 @@ int my_serial_omap_init(void)
 {
        int ret;
 
 {
        int ret;
 
+       printk(KERN_INFO "registering omap-hs-uart...\n");
        wake_lock_init(&omap_serial_wakelock, WAKE_LOCK_SUSPEND,
                       "omap_hs_serial");
        omap_serial_workqueue = create_singlethread_workqueue("omap_hs_serial");
        wake_lock_init(&omap_serial_wakelock, WAKE_LOCK_SUSPEND,
                       "omap_hs_serial");
        omap_serial_workqueue = create_singlethread_workqueue("omap_hs_serial");
Impressum, Datenschutz