Skip to content

Commit

Permalink
Merge tag 'dropmachtimexh-v2' of git://git.pengutronix.de/git/ukl/lin…
Browse files Browse the repository at this point in the history
…ux into next/cleanup

This cleanup series gets rid of <mach/timex.h> for platforms not using
ARCH_MULTIPLATFORM. (For multi-platform code it's already unused since
387798b (ARM: initial multiplatform support).)

To make this work some code out of arch/arm needed to be adapted. The
respective changes got acks by their maintainers to be taken via armsoc
(with Andrew Morton substituting for Alessandro Zummo as rtc maintainer).

Compared to the previous pull request there was another patch added that
fixes a (non-critical) regression on ixp4xx. Olof Johansson asked to not
squash this fix into the original commit to save him from the need to
reverify the series.

* tag 'dropmachtimexh-v2' of git://git.pengutronix.de/git/ukl/linux:
  ARM: ixp4xx: fix timer latch calculation
  ARM: drop <mach/timex.h> for !ARCH_MULTIPLATFORM, too
  ARM: rpc: stop using <mach/timex.h>
  ARM: ixp4xx: stop using <mach/timex.h>
  input: ixp4xx-beeper: don't use symbols from <mach/timex.h>
  ARM: at91: don't use <mach/timex.h>
  ARM: ep93xx: stop using mach/timex.h
  ARM: mmp: stop using mach/timex.h
  ARM: netx: stop using mach/timex.h
  ARM: sa1100: stop using mach/timex.h
  clocksource: sirf/marco+prima2: drop usage of CLOCK_TICK_RATE
  rtc: pxa: drop unused #define TIMER_FREQ
  rtc: at91sam9: include <mach/hardware.h> explicitly
  ARM/serial: at91: switch atmel serial to use gpiolib

Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
olofj committed Feb 19, 2014
2 parents 6d0abec + fb3174e commit 11d73c5
Show file tree
Hide file tree
Showing 74 changed files with 153 additions and 732 deletions.
3 changes: 3 additions & 0 deletions Documentation/devicetree/bindings/serial/atmel-usart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Required properties:
Optional properties:
- atmel,use-dma-rx: use of PDC or DMA for receiving data
- atmel,use-dma-tx: use of PDC or DMA for transmitting data
- rts-gpios: specify a GPIO for RTS line. It will use specified PIO instead of the peripheral
function pin for the USART RTS feature. If unsure, don't specify this property.
- add dma bindings for dma transfer:
- dmas: DMA specifier, consisting of a phandle to DMA controller node,
memory peripheral interface and USART DMA channel ID, FIFO configuration.
Expand All @@ -33,6 +35,7 @@ Example:
clock-names = "usart";
atmel,use-dma-rx;
atmel,use-dma-tx;
rts-gpios = <&pioD 15 0>;
};

- use DMA:
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/include/asm/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
#ifndef _ASMARM_TIMEX_H
#define _ASMARM_TIMEX_H

#ifdef CONFIG_ARCH_MULTIPLATFORM
#define CLOCK_TICK_RATE 1000000
#else
#include <mach/timex.h>
#endif

typedef unsigned long cycles_t;
#define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; })

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-at91/at91rm9200.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <mach/at91rm9200.h>
#include <mach/at91_st.h>
#include <mach/cpu.h>
#include <mach/hardware.h>

#include "at91_aic.h"
#include "soc.h"
Expand Down
11 changes: 9 additions & 2 deletions arch/arm/mach-at91/at91rm9200_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <mach/at91rm9200.h>
#include <mach/at91rm9200_mc.h>
#include <mach/at91_ramc.h>
#include <mach/hardware.h>

#include "board.h"
#include "generic.h"
Expand Down Expand Up @@ -922,6 +923,7 @@ 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);
Expand Down Expand Up @@ -960,6 +962,7 @@ 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);
Expand Down Expand Up @@ -987,9 +990,10 @@ static inline void configure_usart0_pins(unsigned pins)
if (pins & ATMEL_UART_RTS) {
/*
* AT91RM9200 Errata #39 - RTS0 is not internally connected to PA21.
* We need to drive the pin manually. Default is off (RTS is active low).
* We need to drive the pin manually. The serial driver will driver
* this to high when initializing.
*/
at91_set_gpio_output(AT91_PIN_PA21, 1);
uart0_data.rts_gpio = AT91_PIN_PA21;
}
}

Expand All @@ -1009,6 +1013,7 @@ 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);
Expand Down Expand Up @@ -1060,6 +1065,7 @@ 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);
Expand Down Expand Up @@ -1103,6 +1109,7 @@ 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);
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-at91/at91rm9200_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <asm/mach/time.h>

#include <mach/at91_st.h>
#include <mach/hardware.h>

static unsigned long last_crtr;
static u32 irqmask;
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-at91/at91sam9260.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <mach/cpu.h>
#include <mach/at91_dbgu.h>
#include <mach/at91sam9260.h>
#include <mach/hardware.h>

#include "at91_aic.h"
#include "at91_rstc.h"
Expand Down
8 changes: 8 additions & 0 deletions arch/arm/mach-at91/at91sam9260_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#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"
Expand Down Expand Up @@ -819,6 +820,7 @@ 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);
Expand Down Expand Up @@ -857,6 +859,7 @@ 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);
Expand Down Expand Up @@ -908,6 +911,7 @@ 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);
Expand Down Expand Up @@ -951,6 +955,7 @@ 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);
Expand Down Expand Up @@ -994,6 +999,7 @@ 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);
Expand Down Expand Up @@ -1037,6 +1043,7 @@ 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);
Expand Down Expand Up @@ -1075,6 +1082,7 @@ 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);
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-at91/at91sam9261.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <asm/system_misc.h>
#include <mach/cpu.h>
#include <mach/at91sam9261.h>
#include <mach/hardware.h>

#include "at91_aic.h"
#include "at91_rstc.h"
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/mach-at91/at91sam9261_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <mach/at91sam9261_matrix.h>
#include <mach/at91_matrix.h>
#include <mach/at91sam9_smc.h>
#include <mach/hardware.h>

#include "board.h"
#include "generic.h"
Expand Down Expand Up @@ -880,6 +881,7 @@ 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);
Expand Down Expand Up @@ -918,6 +920,7 @@ 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);
Expand Down Expand Up @@ -961,6 +964,7 @@ 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);
Expand Down Expand Up @@ -1004,6 +1008,7 @@ 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);
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-at91/at91sam9263.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <asm/mach/map.h>
#include <asm/system_misc.h>
#include <mach/at91sam9263.h>
#include <mach/hardware.h>

#include "at91_aic.h"
#include "at91_rstc.h"
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/mach-at91/at91sam9263_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <mach/at91sam9263_matrix.h>
#include <mach/at91_matrix.h>
#include <mach/at91sam9_smc.h>
#include <mach/hardware.h>

#include "board.h"
#include "generic.h"
Expand Down Expand Up @@ -1324,6 +1325,7 @@ 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);
Expand Down Expand Up @@ -1362,6 +1364,7 @@ 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);
Expand Down Expand Up @@ -1405,6 +1408,7 @@ 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);
Expand Down Expand Up @@ -1448,6 +1452,7 @@ 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);
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-at91/at91sam926x_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/of_irq.h>

#include <asm/mach/time.h>
#include <mach/hardware.h>

#define AT91_PIT_MR 0x00 /* Mode Register */
#define AT91_PIT_PITIEN (1 << 25) /* Timer Interrupt Enable */
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-at91/at91sam9g45.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <asm/system_misc.h>
#include <mach/at91sam9g45.h>
#include <mach/cpu.h>
#include <mach/hardware.h>

#include "at91_aic.h"
#include "soc.h"
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/mach-at91/at91sam9g45_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <mach/at91sam9_smc.h>
#include <linux/platform_data/dma-atmel.h>
#include <mach/atmel-mci.h>
#include <mach/hardware.h>

#include <media/atmel-isi.h>

Expand Down Expand Up @@ -1587,6 +1588,7 @@ 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);
Expand Down Expand Up @@ -1625,6 +1627,7 @@ 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);
Expand Down Expand Up @@ -1668,6 +1671,7 @@ 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);
Expand Down Expand Up @@ -1711,6 +1715,7 @@ 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);
Expand Down Expand Up @@ -1754,6 +1759,7 @@ 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);
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-at91/at91sam9rl.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <mach/cpu.h>
#include <mach/at91_dbgu.h>
#include <mach/at91sam9rl.h>
#include <mach/hardware.h>

#include "at91_aic.h"
#include "at91_rstc.h"
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/mach-at91/at91sam9rl_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <mach/at91sam9rl_matrix.h>
#include <mach/at91_matrix.h>
#include <mach/at91sam9_smc.h>
#include <mach/hardware.h>
#include <linux/platform_data/dma-atmel.h>

#include "board.h"
Expand Down Expand Up @@ -956,6 +957,7 @@ 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);
Expand Down Expand Up @@ -994,6 +996,7 @@ 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);
Expand Down Expand Up @@ -1045,6 +1048,7 @@ 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);
Expand Down Expand Up @@ -1088,6 +1092,7 @@ 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);
Expand Down Expand Up @@ -1131,6 +1136,7 @@ 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);
Expand Down
Loading

0 comments on commit 11d73c5

Please sign in to comment.