]> Git Repo - linux.git/commitdiff
Merge tag 'tty-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
authorLinus Torvalds <[email protected]>
Tue, 3 Jun 2014 16:01:02 +0000 (09:01 -0700)
committerLinus Torvalds <[email protected]>
Tue, 3 Jun 2014 16:01:02 +0000 (09:01 -0700)
Pull tty/serial driver updates from Greg KH:
 "Here is the big tty / serial driver pull request for 3.16-rc1.

  A variety of different serial driver fixes and updates and additions,
  nothing huge, and no real major core tty changes at all.

  All have been in linux-next for a while"

* tag 'tty-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (84 commits)
  Revert "serial: imx: remove the DMA wait queue"
  serial: kgdb_nmi: Improve console integration with KDB I/O
  serial: kgdb_nmi: Switch from tasklets to real timers
  serial: kgdb_nmi: Use container_of() to locate private data
  serial: cpm_uart: No LF conversion in put_poll_char()
  serial: sirf: Fix compilation failure
  console: Remove superfluous readonly check
  console: Use explicit pointer type for vc_uni_pagedir* fields
  vgacon: Fix & cleanup refcounting
  ARM: tty: Move HVC DCC assembly to arch/arm
  tty/hvc/hvc_console: Fix wakeup of HVC thread on hvc_kick()
  drivers/tty/n_hdlc.c: replace kmalloc/memset by kzalloc
  vt: emulate 8- and 24-bit colour codes.
  printk/of_serial: fix serial console cessation part way through boot.
  serial: 8250_dma: check the result of TX buffer mapping
  serial: uart: add hw flow control support configuration
  tty/serial: at91: add interrupts for modem control lines
  tty/serial: at91: use mctrl_gpio helpers
  tty/serial: Add GPIOLIB helpers for controlling modem lines
  ARM: at91: gpio: implement get_direction
  ...

13 files changed:
1  2 
Documentation/kernel-parameters.txt
arch/arm/mach-at91/at91rm9200_devices.c
arch/arm/mach-at91/at91sam9260_devices.c
arch/arm/mach-at91/at91sam9261_devices.c
arch/arm/mach-at91/at91sam9263_devices.c
arch/arm/mach-at91/at91sam9g45_devices.c
arch/arm/mach-at91/at91sam9rl_devices.c
arch/arm/mach-at91/gpio.c
arch/x86/Kconfig
drivers/tty/hvc/hvc_console.c
drivers/tty/serial/8250/8250_core.c
include/linux/platform_data/atmel.h
kernel/printk/printk.c

index 7da289ee058944da04243d818e3727a72c4747a6,4946d8e58d53433ac776f6ccf8c2fdccbc097c25..4ddcbf9496994c0617b443cf4134db7e3bde64d2
@@@ -883,6 -883,7 +883,7 @@@ bytes respectively. Such letter suffixe
                        which are not unmapped.
  
        earlycon=       [KNL] Output early console device and options.
                uart[8250],io,<addr>[,options]
                uart[8250],mmio,<addr>[,options]
                uart[8250],mmio32,<addr>[,options]
                        (mmio) or 32-bit (mmio32).
                        The options are the same as for ttyS, above.
  
 -      earlyprintk=    [X86,SH,BLACKFIN,ARM]
+               pl011,<addr>
+                       Start an early, polled-mode console on a pl011 serial
+                       port at the specified address. The pl011 serial port
+                       must already be setup and configured. Options are not
+                       yet supported.
+               smh     Use ARM semihosting calls for early console.
 +      earlyprintk=    [X86,SH,BLACKFIN,ARM,M68k]
                        earlyprintk=vga
                        earlyprintk=efi
                        earlyprintk=xen
        noreplace-smp   [X86-32,SMP] Don't replace SMP instructions
                        with UP alternatives
  
 -      nordrand        [X86] Disable the direct use of the RDRAND
 -                      instruction even if it is supported by the
 -                      processor.  RDRAND is still available to user
 -                      space applications.
 +      nordrand        [X86] Disable kernel use of the RDRAND and
 +                      RDSEED instructions even if they are supported
 +                      by the processor.  RDRAND and RDSEED are still
 +                      available to user space applications.
  
        noresume        [SWSUSP] Disables resume and restores original swap
                        space.
index 4860918b411eaa1a348bc5a2570b02238cdbe08b,291a90a5b1d4a2880f30ce7b5fa16212c8d0b307..3f4bb58aea54d48a20e4b909a4999d1c1a8b0601
@@@ -15,6 -15,7 +15,7 @@@
  
  #include <linux/dma-mapping.h>
  #include <linux/gpio.h>
+ #include <linux/gpio/driver.h>
  #include <linux/platform_device.h>
  #include <linux/i2c-gpio.h>
  
@@@ -25,7 -26,6 +26,7 @@@
  
  #include "board.h"
  #include "generic.h"
 +#include "gpio.h"
  
  
  /* --------------------------------------------------------------------
@@@ -924,7 -924,6 +925,6 @@@ static struct resource dbgu_resources[
  static struct atmel_uart_data dbgu_data = {
        .use_dma_tx     = 0,
        .use_dma_rx     = 0,            /* DBGU not capable of receive DMA */
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@@ -963,7 -962,14 +963,14 @@@ static struct resource uart0_resources[
  static struct atmel_uart_data uart0_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
+ };
+ static struct gpiod_lookup_table uart0_gpios_table = {
+       .dev_id = "atmel_usart",
+       .table = {
+               GPIO_LOOKUP("pioA", 21, "rts", GPIO_ACTIVE_LOW),
+               { },
+       },
  };
  
  static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@@ -994,7 -1000,7 +1001,7 @@@ static inline void configure_usart0_pin
                 * We need to drive the pin manually. The serial driver will driver
                 * this to high when initializing.
                 */
-               uart0_data.rts_gpio = AT91_PIN_PA21;
+               gpiod_add_lookup_table(&uart0_gpios_table);
        }
  }
  
@@@ -1014,7 -1020,6 +1021,6 @@@ static struct resource uart1_resources[
  static struct atmel_uart_data uart1_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@@ -1066,7 -1071,6 +1072,6 @@@ static struct resource uart2_resources[
  static struct atmel_uart_data uart2_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@@ -1110,7 -1114,6 +1115,6 @@@ static struct resource uart3_resources[
  static struct atmel_uart_data uart3_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart3_dmamask = DMA_BIT_MASK(32);
index adcfb88a5d7d741f9e18c7a5ea34c115033e1635,526453ecdaff1c982d28e29ca77f79ad38f18394..ef88e0fe4e80266c5f7ae4abbda3a9548c62ec87
  #include <mach/at91sam9260_matrix.h>
  #include <mach/at91_matrix.h>
  #include <mach/at91sam9_smc.h>
 -#include <mach/at91_adc.h>
  #include <mach/hardware.h>
  
  #include "board.h"
  #include "generic.h"
 -
 +#include "gpio.h"
  
  /* --------------------------------------------------------------------
   *  USB Host
@@@ -819,7 -820,6 +819,6 @@@ static struct resource dbgu_resources[
  static struct atmel_uart_data dbgu_data = {
        .use_dma_tx     = 0,
        .use_dma_rx     = 0,            /* DBGU not capable of receive DMA */
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@@ -858,7 -858,6 +857,6 @@@ static struct resource uart0_resources[
  static struct atmel_uart_data uart0_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@@ -910,7 -909,6 +908,6 @@@ static struct resource uart1_resources[
  static struct atmel_uart_data uart1_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@@ -954,7 -952,6 +951,6 @@@ static struct resource uart2_resources[
  static struct atmel_uart_data uart2_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@@ -998,7 -995,6 +994,6 @@@ static struct resource uart3_resources[
  static struct atmel_uart_data uart3_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart3_dmamask = DMA_BIT_MASK(32);
@@@ -1042,7 -1038,6 +1037,6 @@@ static struct resource uart4_resources[
  static struct atmel_uart_data uart4_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart4_dmamask = DMA_BIT_MASK(32);
@@@ -1081,7 -1076,6 +1075,6 @@@ static struct resource uart5_resources[
  static struct atmel_uart_data uart5_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart5_dmamask = DMA_BIT_MASK(32);
@@@ -1307,23 -1301,30 +1300,23 @@@ static struct platform_device at91_adc_
  static struct at91_adc_trigger at91_adc_triggers[] = {
        [0] = {
                .name = "timer-counter-0",
 -              .value = AT91_ADC_TRGSEL_TC0 | AT91_ADC_TRGEN,
 +              .value = 0x1,
        },
        [1] = {
                .name = "timer-counter-1",
 -              .value = AT91_ADC_TRGSEL_TC1 | AT91_ADC_TRGEN,
 +              .value = 0x3,
        },
        [2] = {
                .name = "timer-counter-2",
 -              .value = AT91_ADC_TRGSEL_TC2 | AT91_ADC_TRGEN,
 +              .value = 0x5,
        },
        [3] = {
                .name = "external",
 -              .value = AT91_ADC_TRGSEL_EXTERNAL | AT91_ADC_TRGEN,
 +              .value = 0xd,
                .is_external = true,
        },
  };
  
 -static struct at91_adc_reg_desc at91_adc_register_g20 = {
 -      .channel_base = AT91_ADC_CHR(0),
 -      .drdy_mask = AT91_ADC_DRDY,
 -      .status_register = AT91_ADC_SR,
 -      .trigger_register = AT91_ADC_MR,
 -};
 -
  void __init at91_add_device_adc(struct at91_adc_data *data)
  {
        if (!data)
        if (data->use_external_triggers)
                at91_set_A_periph(AT91_PIN_PA22, 0);
  
 -      data->num_channels = 4;
        data->startup_time = 10;
 -      data->registers = &at91_adc_register_g20;
        data->trigger_number = 4;
        data->trigger_list = at91_adc_triggers;
  
index 43b21f456f6e65624971001820574e83c055afa2,b5f7a7226ff8b422d6b8c56bc14babe83361a6cd..29baacb5c3599dcdc46db301958828cb7f78a97d
@@@ -29,7 -29,7 +29,7 @@@
  
  #include "board.h"
  #include "generic.h"
 -
 +#include "gpio.h"
  
  /* --------------------------------------------------------------------
   *  USB Host
@@@ -881,7 -881,6 +881,6 @@@ static struct resource dbgu_resources[
  static struct atmel_uart_data dbgu_data = {
        .use_dma_tx     = 0,
        .use_dma_rx     = 0,            /* DBGU not capable of receive DMA */
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@@ -920,7 -919,6 +919,6 @@@ static struct resource uart0_resources[
  static struct atmel_uart_data uart0_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@@ -964,7 -962,6 +962,6 @@@ static struct resource uart1_resources[
  static struct atmel_uart_data uart1_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@@ -1008,7 -1005,6 +1005,6 @@@ static struct resource uart2_resources[
  static struct atmel_uart_data uart2_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart2_dmamask = DMA_BIT_MASK(32);
index 953616e5dbcb25a33f91172fd60e197c293922e2,39803c3296b211aa285000d24a6e2a9e4fe947ba..309390d8e2f8cebe71c09d5876d4dc89a20724f5
@@@ -28,7 -28,6 +28,7 @@@
  
  #include "board.h"
  #include "generic.h"
 +#include "gpio.h"
  
  
  /* --------------------------------------------------------------------
@@@ -1326,7 -1325,6 +1326,6 @@@ static struct resource dbgu_resources[
  static struct atmel_uart_data dbgu_data = {
        .use_dma_tx     = 0,
        .use_dma_rx     = 0,            /* DBGU not capable of receive DMA */
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@@ -1365,7 -1363,6 +1364,6 @@@ static struct resource uart0_resources[
  static struct atmel_uart_data uart0_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@@ -1409,7 -1406,6 +1407,6 @@@ static struct resource uart1_resources[
  static struct atmel_uart_data uart1_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@@ -1453,7 -1449,6 +1450,6 @@@ static struct resource uart2_resources[
  static struct atmel_uart_data uart2_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart2_dmamask = DMA_BIT_MASK(32);
index d943363c18454a3cce963c7ae824e68dd40fe366,4dfedd3f2e15a7841d3e1430f3e5638a2782ab22..391ab6bb536afd34abe6fb6cbbc2a7cc7299b221
@@@ -25,6 -25,7 +25,6 @@@
  #include <linux/fb.h>
  #include <video/atmel_lcdc.h>
  
 -#include <mach/at91_adc.h>
  #include <mach/at91sam9g45.h>
  #include <mach/at91sam9g45_matrix.h>
  #include <mach/at91_matrix.h>
@@@ -38,7 -39,6 +38,7 @@@
  #include "board.h"
  #include "generic.h"
  #include "clock.h"
 +#include "gpio.h"
  
  
  /* --------------------------------------------------------------------
@@@ -1133,7 -1133,58 +1133,7 @@@ static void __init at91_add_device_rtc(
  
  
  /* --------------------------------------------------------------------
 - *  Touchscreen
 - * -------------------------------------------------------------------- */
 -
 -#if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE)
 -static u64 tsadcc_dmamask = DMA_BIT_MASK(32);
 -static struct at91_tsadcc_data tsadcc_data;
 -
 -static struct resource tsadcc_resources[] = {
 -      [0] = {
 -              .start  = AT91SAM9G45_BASE_TSC,
 -              .end    = AT91SAM9G45_BASE_TSC + SZ_16K - 1,
 -              .flags  = IORESOURCE_MEM,
 -      },
 -      [1] = {
 -              .start  = NR_IRQS_LEGACY + AT91SAM9G45_ID_TSC,
 -              .end    = NR_IRQS_LEGACY + AT91SAM9G45_ID_TSC,
 -              .flags  = IORESOURCE_IRQ,
 -      }
 -};
 -
 -static struct platform_device at91sam9g45_tsadcc_device = {
 -      .name           = "atmel_tsadcc",
 -      .id             = -1,
 -      .dev            = {
 -                              .dma_mask               = &tsadcc_dmamask,
 -                              .coherent_dma_mask      = DMA_BIT_MASK(32),
 -                              .platform_data          = &tsadcc_data,
 -      },
 -      .resource       = tsadcc_resources,
 -      .num_resources  = ARRAY_SIZE(tsadcc_resources),
 -};
 -
 -void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data)
 -{
 -      if (!data)
 -              return;
 -
 -      at91_set_gpio_input(AT91_PIN_PD20, 0);  /* AD0_XR */
 -      at91_set_gpio_input(AT91_PIN_PD21, 0);  /* AD1_XL */
 -      at91_set_gpio_input(AT91_PIN_PD22, 0);  /* AD2_YT */
 -      at91_set_gpio_input(AT91_PIN_PD23, 0);  /* AD3_TB */
 -
 -      tsadcc_data = *data;
 -      platform_device_register(&at91sam9g45_tsadcc_device);
 -}
 -#else
 -void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {}
 -#endif
 -
 -
 -/* --------------------------------------------------------------------
 - *  ADC
 + *  ADC and touchscreen
   * -------------------------------------------------------------------- */
  
  #if IS_ENABLED(CONFIG_AT91_ADC)
@@@ -1185,6 -1236,13 +1185,6 @@@ static struct at91_adc_trigger at91_adc
        },
  };
  
 -static struct at91_adc_reg_desc at91_adc_register_g45 = {
 -      .channel_base = AT91_ADC_CHR(0),
 -      .drdy_mask = AT91_ADC_DRDY,
 -      .status_register = AT91_ADC_SR,
 -      .trigger_register = 0x08,
 -};
 -
  void __init at91_add_device_adc(struct at91_adc_data *data)
  {
        if (!data)
        if (data->use_external_triggers)
                at91_set_A_periph(AT91_PIN_PD28, 0);
  
 -      data->num_channels = 8;
        data->startup_time = 40;
 -      data->registers = &at91_adc_register_g45;
        data->trigger_number = 4;
        data->trigger_list = at91_adc_triggers;
  
@@@ -1528,7 -1588,6 +1528,6 @@@ static struct resource dbgu_resources[
  static struct atmel_uart_data dbgu_data = {
        .use_dma_tx     = 0,
        .use_dma_rx     = 0,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@@ -1567,7 -1626,6 +1566,6 @@@ static struct resource uart0_resources[
  static struct atmel_uart_data uart0_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@@ -1611,7 -1669,6 +1609,6 @@@ static struct resource uart1_resources[
  static struct atmel_uart_data uart1_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@@ -1655,7 -1712,6 +1652,6 @@@ static struct resource uart2_resources[
  static struct atmel_uart_data uart2_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@@ -1699,7 -1755,6 +1695,6 @@@ static struct resource uart3_resources[
  static struct atmel_uart_data uart3_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart3_dmamask = DMA_BIT_MASK(32);
index 044ad8bc69632c8866249cb4410a70dd8d029664,f75985062913abf1cb83a53d1781ce53dbceec7a..0b1d71a7d9bf5b0650de1fdd6c74f394f87cfdd3
  #include <mach/at91sam9_smc.h>
  #include <mach/hardware.h>
  #include <linux/platform_data/dma-atmel.h>
 +#include <linux/platform_data/at91_adc.h>
  
  #include "board.h"
  #include "generic.h"
 +#include "gpio.h"
  
  
  /* --------------------------------------------------------------------
@@@ -610,13 -608,14 +610,13 @@@ static void __init at91_add_device_tc(v
  
  
  /* --------------------------------------------------------------------
 - *  Touchscreen
 + *  ADC and Touchscreen
   * -------------------------------------------------------------------- */
  
 -#if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE)
 -static u64 tsadcc_dmamask = DMA_BIT_MASK(32);
 -static struct at91_tsadcc_data tsadcc_data;
 +#if IS_ENABLED(CONFIG_AT91_ADC)
 +static struct at91_adc_data adc_data;
  
 -static struct resource tsadcc_resources[] = {
 +static struct resource adc_resources[] = {
        [0] = {
                .start  = AT91SAM9RL_BASE_TSC,
                .end    = AT91SAM9RL_BASE_TSC + SZ_16K - 1,
        }
  };
  
 -static struct platform_device at91sam9rl_tsadcc_device = {
 -      .name           = "atmel_tsadcc",
 -      .id             = -1,
 -      .dev            = {
 -                              .dma_mask               = &tsadcc_dmamask,
 -                              .coherent_dma_mask      = DMA_BIT_MASK(32),
 -                              .platform_data          = &tsadcc_data,
 +static struct platform_device at91_adc_device = {
 +      .name           = "at91sam9rl-adc",
 +      .id             = -1,
 +      .dev            = {
 +              .platform_data  = &adc_data,
        },
 -      .resource       = tsadcc_resources,
 -      .num_resources  = ARRAY_SIZE(tsadcc_resources),
 +      .resource       = adc_resources,
 +      .num_resources  = ARRAY_SIZE(adc_resources),
  };
  
 -void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data)
 +static struct at91_adc_trigger at91_adc_triggers[] = {
 +      [0] = {
 +              .name = "external-rising",
 +              .value = 1,
 +              .is_external = true,
 +      },
 +      [1] = {
 +              .name = "external-falling",
 +              .value = 2,
 +              .is_external = true,
 +      },
 +      [2] = {
 +              .name = "external-any",
 +              .value = 3,
 +              .is_external = true,
 +      },
 +      [3] = {
 +              .name = "continuous",
 +              .value = 6,
 +              .is_external = false,
 +      },
 +};
 +
 +void __init at91_add_device_adc(struct at91_adc_data *data)
  {
        if (!data)
                return;
  
 -      at91_set_A_periph(AT91_PIN_PA17, 0);    /* AD0_XR */
 -      at91_set_A_periph(AT91_PIN_PA18, 0);    /* AD1_XL */
 -      at91_set_A_periph(AT91_PIN_PA19, 0);    /* AD2_YT */
 -      at91_set_A_periph(AT91_PIN_PA20, 0);    /* AD3_TB */
 -
 -      tsadcc_data = *data;
 -      platform_device_register(&at91sam9rl_tsadcc_device);
 +      if (test_bit(0, &data->channels_used))
 +              at91_set_A_periph(AT91_PIN_PA17, 0);
 +      if (test_bit(1, &data->channels_used))
 +              at91_set_A_periph(AT91_PIN_PA18, 0);
 +      if (test_bit(2, &data->channels_used))
 +              at91_set_A_periph(AT91_PIN_PA19, 0);
 +      if (test_bit(3, &data->channels_used))
 +              at91_set_A_periph(AT91_PIN_PA20, 0);
 +      if (test_bit(4, &data->channels_used))
 +              at91_set_A_periph(AT91_PIN_PD6, 0);
 +      if (test_bit(5, &data->channels_used))
 +              at91_set_A_periph(AT91_PIN_PD7, 0);
 +
 +      if (data->use_external_triggers)
 +              at91_set_A_periph(AT91_PIN_PB15, 0);
 +
 +      data->startup_time = 40;
 +      data->trigger_number = 4;
 +      data->trigger_list = at91_adc_triggers;
 +
 +      adc_data = *data;
 +      platform_device_register(&at91_adc_device);
  }
  #else
 -void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {}
 +void __init at91_add_device_adc(struct at91_adc_data *data) {}
  #endif
  
 -
  /* --------------------------------------------------------------------
   *  RTC
   * -------------------------------------------------------------------- */
@@@ -993,7 -957,6 +993,6 @@@ static struct resource dbgu_resources[
  static struct atmel_uart_data dbgu_data = {
        .use_dma_tx     = 0,
        .use_dma_rx     = 0,            /* DBGU not capable of receive DMA */
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@@ -1032,7 -995,6 +1031,6 @@@ static struct resource uart0_resources[
  static struct atmel_uart_data uart0_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@@ -1084,7 -1046,6 +1082,6 @@@ static struct resource uart1_resources[
  static struct atmel_uart_data uart1_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@@ -1128,7 -1089,6 +1125,6 @@@ static struct resource uart2_resources[
  static struct atmel_uart_data uart2_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@@ -1172,7 -1132,6 +1168,6 @@@ static struct resource uart3_resources[
  static struct atmel_uart_data uart3_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
-       .rts_gpio       = -EINVAL,
  };
  
  static u64 uart3_dmamask = DMA_BIT_MASK(32);
index 12ed05bbdc5c7a6ba57cd466c0879b3cde49149f,afbe34027e628d6b4b2548509424c1bb44495337..d3f05aaad8ba1df979b4d3176557bb49d5f5a3c3
@@@ -29,7 -29,6 +29,7 @@@
  #include <mach/at91_pio.h>
  
  #include "generic.h"
 +#include "gpio.h"
  
  #define MAX_NB_GPIO_PER_BANK  32
  
@@@ -50,6 -49,7 +50,7 @@@ static int at91_gpiolib_request(struct 
  static void at91_gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip);
  static void at91_gpiolib_set(struct gpio_chip *chip, unsigned offset, int val);
  static int at91_gpiolib_get(struct gpio_chip *chip, unsigned offset);
+ static int at91_gpiolib_get_direction(struct gpio_chip *chip, unsigned offset);
  static int at91_gpiolib_direction_output(struct gpio_chip *chip,
                                         unsigned offset, int val);
  static int at91_gpiolib_direction_input(struct gpio_chip *chip,
@@@ -61,6 -61,7 +62,7 @@@ static int at91_gpiolib_to_irq(struct g
                .chip = {                                               \
                        .label            = name,                       \
                        .request          = at91_gpiolib_request,       \
+                       .get_direction    = at91_gpiolib_get_direction, \
                        .direction_input  = at91_gpiolib_direction_input, \
                        .direction_output = at91_gpiolib_direction_output, \
                        .get              = at91_gpiolib_get,           \
@@@ -799,6 -800,17 +801,17 @@@ static int at91_gpiolib_request(struct 
        __raw_writel(mask, pio + PIO_PER);
        return 0;
  }
+ static int at91_gpiolib_get_direction(struct gpio_chip *chip, unsigned offset)
+ {
+       struct at91_gpio_chip *at91_gpio = to_at91_gpio_chip(chip);
+       void __iomem *pio = at91_gpio->regbase;
+       unsigned mask = 1 << offset;
+       u32 osr;
+       osr = __raw_readl(pio + PIO_OSR);
+       return !(osr & mask);
+ }
  
  static int at91_gpiolib_direction_input(struct gpio_chip *chip,
                                        unsigned offset)
diff --combined arch/x86/Kconfig
index 9c43ea3cf510f08c8d242327363ce29e812ce3fe,0fb6cfd50e75c8c9e1736c47e22b94e0fe0d6e33..650433ab184fa445bdb2cc3a3a3106e87a0f767f
@@@ -261,6 -261,9 +261,9 @@@ config ARCH_HWEIGHT_CFLAG
  config ARCH_SUPPORTS_UPROBES
        def_bool y
  
+ config FIX_EARLYCON_MEM
+       def_bool y
  source "init/Kconfig"
  source "kernel/Kconfig.freezer"
  
@@@ -415,6 -418,7 +418,6 @@@ config X86_U
  
  config X86_GOLDFISH
         bool "Goldfish (Virtual Platform)"
 -       depends on X86_32
         depends on X86_EXTENDED_PLATFORM
         ---help---
         Enable support for the Goldfish virtual platform used primarily
index 0ff7fda0742f4326113cf82f8a72cb355c840319,10942655a79db3a5bd630e0fb1b58257255b8890..4fcec1d793a7f6ca0b2271c5b770dbd92554f623
@@@ -190,7 -190,7 +190,7 @@@ static struct tty_driver *hvc_console_d
        return hvc_driver;
  }
  
 -static int __init hvc_console_setup(struct console *co, char *options)
 +static int hvc_console_setup(struct console *co, char *options)
  {     
        if (co->index < 0 || co->index >= MAX_NR_HVC_CONSOLES)
                return -ENODEV;
@@@ -760,10 -760,17 +760,17 @@@ static int khvcd(void *unused
                        if (poll_mask == 0)
                                schedule();
                        else {
+                               unsigned long j_timeout;
                                if (timeout < MAX_TIMEOUT)
                                        timeout += (timeout >> 6) + 1;
  
-                               msleep_interruptible(timeout);
+                               /*
+                                * We don't use msleep_interruptible otherwise
+                                * "kick" will fail to wake us up
+                                */
+                               j_timeout = msecs_to_jiffies(timeout) + 1;
+                               schedule_timeout_interruptible(j_timeout);
                        }
                }
                __set_current_state(TASK_RUNNING);
index 2d4bd3929e507376f7d4b25f788fbba3b61af1a4,65556fc57d5606259d343f458d367e50660f8f1d..27f7ad6b74c158f78193f394bf1636c2a870af28
@@@ -555,7 -555,7 +555,7 @@@ static void serial8250_set_sleep(struc
         */
        if ((p->port.type == PORT_XR17V35X) ||
           (p->port.type == PORT_XR17D15X)) {
 -              serial_out(p, UART_EXAR_SLEEP, 0xff);
 +              serial_out(p, UART_EXAR_SLEEP, sleep ? 0xff : 0);
                return;
        }
  
@@@ -1926,13 -1926,8 +1926,8 @@@ static void serial8250_put_poll_char(st
        wait_for_xmitr(up, BOTH_EMPTY);
        /*
         *      Send the character out.
-        *      If a LF, also do CR...
         */
        serial_port_out(port, UART_TX, c);
-       if (c == 10) {
-               wait_for_xmitr(up, BOTH_EMPTY);
-               serial_port_out(port, UART_TX, 13);
-       }
  
        /*
         *      Finally, wait for transmitter to become empty
@@@ -2338,9 -2333,11 +2333,11 @@@ serial8250_do_set_termios(struct uart_p
         * the trigger, or the MCR RTS bit is cleared.  In the case where
         * the remote UART is not using CTS auto flow control, we must
         * have sufficient FIFO entries for the latency of the remote
-        * UART to respond.  IOW, at least 32 bytes of FIFO.
+        * UART to respond.  IOW, at least 32 bytes of FIFO. Also enable
+        * AFE if hw flow control is supported
         */
-       if (up->capabilities & UART_CAP_AFE && port->fifosize >= 32) {
+       if ((up->capabilities & UART_CAP_AFE && (port->fifosize >= 32)) ||
+           (port->flags & UPF_HARD_FLOW)) {
                up->mcr &= ~UART_MCR_AFE;
                if (termios->c_cflag & CRTSCTS)
                        up->mcr |= UART_MCR_AFE;
index 1466443797d74a96214e803b95dc397f86319fc4,cea9f70133c521f1d5fb2a0d459f3e30ca3f9576..4b452c6a2f7be58b65214c3c6b6002e00d23bacd
@@@ -84,9 -84,15 +84,8 @@@ struct atmel_uart_data 
        short                   use_dma_rx;     /* use receive DMA? */
        void __iomem            *regs;          /* virt. base address, if any */
        struct serial_rs485     rs485;          /* rs485 settings */
-       int                     rts_gpio;       /* optional RTS GPIO */
  };
  
 - /* Touchscreen Controller */
 -struct at91_tsadcc_data {
 -      unsigned int    adc_clock;
 -      u8              pendet_debounce;
 -      u8              ts_sample_hold_time;
 -};
 -
  /* CAN */
  struct at91_can_data {
        void (*transceiver_switch)(int on);
diff --combined kernel/printk/printk.c
index 7228258b85eca19e105df60bf3101bbc8a5e30b4,81c71617ea28fbe9f178fb2e328fffe74dc210e7..221229cf019020838faaa697102e58fe6d36e2dc
@@@ -1674,7 -1674,7 +1674,7 @@@ EXPORT_SYMBOL(printk_emit)
   *
   * See the vsnprintf() documentation for format string extensions over C99.
   */
 -asmlinkage int printk(const char *fmt, ...)
 +asmlinkage __visible int printk(const char *fmt, ...)
  {
        va_list args;
        int r;
@@@ -1737,7 -1737,7 +1737,7 @@@ void early_vprintk(const char *fmt, va_
        }
  }
  
 -asmlinkage void early_printk(const char *fmt, ...)
 +asmlinkage __visible void early_printk(const char *fmt, ...)
  {
        va_list ap;
  
@@@ -2413,6 -2413,7 +2413,7 @@@ int unregister_console(struct console *
        if (console_drivers != NULL && console->flags & CON_CONSDEV)
                console_drivers->flags |= CON_CONSDEV;
  
+       console->flags &= ~CON_ENABLED;
        console_unlock();
        console_sysfs_notify();
        return res;
This page took 0.124335 seconds and 4 git commands to generate.