linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: avictor.za@gmail.com (Andrew Victor)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 10/12] ARM: at91: make watchdog drivers soc independent
Date: Mon, 14 Nov 2011 22:24:52 +0200	[thread overview]
Message-ID: <CAFumwP0ExjSoPfM1B8d0TeMys3M9vtfz8hfXoJKqwVXWHNQt=Q@mail.gmail.com> (raw)
In-Reply-To: <1321207952-13556-10-git-send-email-plagnioj@jcrosoft.com>

hi,

> switch the watchdog drivers to resource and pass it via platform_device

What's this at91_devices.c ?
It looks like some unrelated code was included with a watchdog patch...

Regards,
  Andrew Victor



> +++ b/arch/arm/mach-at91/at91_devices.c
> @@ -0,0 +1,122 @@
> +/*
> + * arch/arm/mach-at91/at91cap9_devices.c
> + *
> + * ?Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com>
> + * ?Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com>
> + * ?Copyright (C) 2007 Atmel Corporation.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + */
> +
> +#include <mach/gpio.h>
> +
> +#include "generic.h"
> +
> +void at91cap9_configure_dbgu_pins(void)
> +{
> + ? ? ? at91_set_A_periph(AT91_PIN_PC30, 0); ? ? ? ? ? ?/* DRXD */
> + ? ? ? at91_set_A_periph(AT91_PIN_PC31, 1); ? ? ? ? ? ?/* DTXD */
> +}
> +
> +void at91cap9_configure_usart0_pins(unsigned pins)
> +{
> + ? ? ? at91_set_A_periph(AT91_PIN_PA22, 1); ? ? ? ? ? ?/* TXD0 */
> + ? ? ? at91_set_A_periph(AT91_PIN_PA23, 0); ? ? ? ? ? ?/* RXD0 */
> +
> + ? ? ? if (pins & ATMEL_UART_RTS)
> + ? ? ? ? ? ? ? at91_set_A_periph(AT91_PIN_PA24, 0); ? ?/* RTS0 */
> + ? ? ? if (pins & ATMEL_UART_CTS)
> + ? ? ? ? ? ? ? at91_set_A_periph(AT91_PIN_PA25, 0); ? ?/* CTS0 */
> +}
> +
> +void at91cap9_configure_usart1_pins(unsigned pins)
> +{
> + ? ? ? at91_set_A_periph(AT91_PIN_PD0, 1); ? ? ? ? ? ? /* TXD1 */
> + ? ? ? at91_set_A_periph(AT91_PIN_PD1, 0); ? ? ? ? ? ? /* RXD1 */
> +
> + ? ? ? if (pins & ATMEL_UART_RTS)
> + ? ? ? ? ? ? ? at91_set_B_periph(AT91_PIN_PD7, 0); ? ? /* RTS1 */
> + ? ? ? if (pins & ATMEL_UART_CTS)
> + ? ? ? ? ? ? ? at91_set_B_periph(AT91_PIN_PD8, 0); ? ? /* CTS1 */
> +}
> +
> +void at91cap9_configure_usart2_pins(unsigned pins)
> +{
> + ? ? ? at91_set_A_periph(AT91_PIN_PD2, 1); ? ? ? ? ? ? /* TXD2 */
> + ? ? ? at91_set_A_periph(AT91_PIN_PD3, 0); ? ? ? ? ? ? /* RXD2 */
> +
> + ? ? ? if (pins & ATMEL_UART_RTS)
> + ? ? ? ? ? ? ? at91_set_B_periph(AT91_PIN_PD5, 0); ? ? /* RTS2 */
> + ? ? ? if (pins & ATMEL_UART_CTS)
> + ? ? ? ? ? ? ? at91_set_B_periph(AT91_PIN_PD6, 0); ? ? /* CTS2 */
> +}
> +
> +void at91rm9200_configure_dbgu_pins(void)
> +{
> + ? ? ? at91_set_A_periph(AT91_PIN_PA30, 0); ? ? ? ? ? ?/* DRXD */
> + ? ? ? at91_set_A_periph(AT91_PIN_PA31, 1); ? ? ? ? ? ?/* DTXD */
> +}
> +
> +void at91rm9200_configure_usart0_pins(unsigned pins)
> +{
> + ? ? ? at91_set_A_periph(AT91_PIN_PA17, 1); ? ? ? ? ? ?/* TXD0 */
> + ? ? ? at91_set_A_periph(AT91_PIN_PA18, 0); ? ? ? ? ? ?/* RXD0 */
> +
> + ? ? ? if (pins & ATMEL_UART_CTS)
> + ? ? ? ? ? ? ? at91_set_A_periph(AT91_PIN_PA20, 0); ? ?/* CTS0 */
> +
> + ? ? ? 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).
> + ? ? ? ? ? ? ? ?*/
> + ? ? ? ? ? ? ? at91_set_gpio_output(AT91_PIN_PA21, 1);
> + ? ? ? }
> +}
> +
> +void at91rm9200_configure_usart1_pins(unsigned pins)
> +{
> + ? ? ? at91_set_A_periph(AT91_PIN_PB20, 1); ? ? ? ? ? ?/* TXD1 */
> + ? ? ? at91_set_A_periph(AT91_PIN_PB21, 0); ? ? ? ? ? ?/* RXD1 */
> +
> + ? ? ? if (pins & ATMEL_UART_RI)
> + ? ? ? ? ? ? ? at91_set_A_periph(AT91_PIN_PB18, 0); ? ?/* RI1 */
> + ? ? ? if (pins & ATMEL_UART_DTR)
> + ? ? ? ? ? ? ? at91_set_A_periph(AT91_PIN_PB19, 0); ? ?/* DTR1 */
> + ? ? ? if (pins & ATMEL_UART_DCD)
> + ? ? ? ? ? ? ? at91_set_A_periph(AT91_PIN_PB23, 0); ? ?/* DCD1 */
> + ? ? ? if (pins & ATMEL_UART_CTS)
> + ? ? ? ? ? ? ? at91_set_A_periph(AT91_PIN_PB24, 0); ? ?/* CTS1 */
> + ? ? ? if (pins & ATMEL_UART_DSR)
> + ? ? ? ? ? ? ? at91_set_A_periph(AT91_PIN_PB25, 0); ? ?/* DSR1 */
> + ? ? ? if (pins & ATMEL_UART_RTS)
> + ? ? ? ? ? ? ? at91_set_A_periph(AT91_PIN_PB26, 0); ? ?/* RTS1 */
> +}
> +
> +void at91rm9200_configure_usart2_pins(unsigned pins)
> +{
> + ? ? ? at91_set_A_periph(AT91_PIN_PA22, 0); ? ? ? ? ? ?/* RXD2 */
> + ? ? ? at91_set_A_periph(AT91_PIN_PA23, 1); ? ? ? ? ? ?/* TXD2 */
> +
> + ? ? ? if (pins & ATMEL_UART_CTS)
> + ? ? ? ? ? ? ? at91_set_B_periph(AT91_PIN_PA30, 0); ? ?/* CTS2 */
> + ? ? ? if (pins & ATMEL_UART_RTS)
> + ? ? ? ? ? ? ? at91_set_B_periph(AT91_PIN_PA31, 0); ? ?/* RTS2 */
> +}
> +
> +void at91rm9200_configure_usart3_pins(unsigned pins)
> +{
> + ? ? ? at91_set_B_periph(AT91_PIN_PA5, 1); ? ? ? ? ? ? /* TXD3 */
> + ? ? ? at91_set_B_periph(AT91_PIN_PA6, 0); ? ? ? ? ? ? /* RXD3 */
> +
> + ? ? ? if (pins & ATMEL_UART_CTS)
> + ? ? ? ? ? ? ? at91_set_B_periph(AT91_PIN_PB1, 0); ? ? /* CTS3 */
> + ? ? ? if (pins & ATMEL_UART_RTS)
> + ? ? ? ? ? ? ? at91_set_B_periph(AT91_PIN_PB0, 0); ? ? /* RTS3 */
> +}
> +
> +

  parent reply	other threads:[~2011-11-14 20:24 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-13 18:09 [PATCH 0/12] ARM: at91: make aic/ccfg/dbgu/dma/ecc/gpio/pit/rtt/smc/watchdog register base soc.h independant Jean-Christophe PLAGNIOL-VILLARD
2011-11-13 18:12 ` [PATCH 01/12] ARM: at91: make gpio register base soc independent Jean-Christophe PLAGNIOL-VILLARD
2011-11-13 18:12 ` [PATCH 02/12] ARM: at91: make ecc " Jean-Christophe PLAGNIOL-VILLARD
2011-11-14 14:36   ` Nicolas Ferre
2011-11-13 18:12 ` [PATCH 03/12] ARM: at91: make dma " Jean-Christophe PLAGNIOL-VILLARD
2011-11-14 14:36   ` Nicolas Ferre
2011-11-13 18:12 ` [PATCH 04/12] ARM: at91: make rtt " Jean-Christophe PLAGNIOL-VILLARD
2011-11-14 14:37   ` Nicolas Ferre
2011-11-13 18:12 ` [PATCH 05/12] ARM: at91: add ioremap_registers entry point to soc setup Jean-Christophe PLAGNIOL-VILLARD
2011-11-14 14:38   ` Nicolas Ferre
2011-11-13 18:12 ` [PATCH 06/12] ARM: at91: make pit register base soc independent Jean-Christophe PLAGNIOL-VILLARD
2011-11-14 14:43   ` Nicolas Ferre
2011-11-13 18:12 ` [PATCH 07/12] ARM: at91: make smc " Jean-Christophe PLAGNIOL-VILLARD
2011-11-14 14:50   ` Nicolas Ferre
2011-11-13 18:12 ` [PATCH 08/12] ARM: at91: make CCFG " Jean-Christophe PLAGNIOL-VILLARD
2011-11-14 14:52   ` Nicolas Ferre
2011-11-13 18:12 ` [PATCH 09/12] ARM: at91: make shutdown controler " Jean-Christophe PLAGNIOL-VILLARD
2011-11-14 15:16   ` Nicolas Ferre
2011-11-13 18:12 ` [PATCH 10/12] ARM: at91: make watchdog drivers " Jean-Christophe PLAGNIOL-VILLARD
2011-11-14 12:39   ` Wim Van Sebroeck
2011-11-14 15:20   ` Nicolas Ferre
2011-11-14 20:24   ` Andrew Victor [this message]
2011-11-13 18:12 ` [PATCH 11/12] ARM: at91: make DBGU " Jean-Christophe PLAGNIOL-VILLARD
2011-11-14 15:29   ` Nicolas Ferre
2011-11-13 18:12 ` [PATCH 12/12] ARM: at91: make aic " Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 01/13 v2] ARM: at91: make gpio register base soc independant Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 1/2] ARM: at91: switch gpio clock to clkdev Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 2/2] ARM: at91: gpio make struct at91_gpio_bank an initdata Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 02/13 v2] ARM: at91: make ecc register base soc independant Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 03/13 v2] ARM: at91: make dma " Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 04/13 v2] ARM: at91: make rtt " Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 05/13 v2] ARM: at91: add ioremap_registers entry point to soc setup Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 06/13 v2] ARM: at91: make pit register base soc independent Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 07/13 v2] ARM: at91: make smc " Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 08/13 v2] ARM: at91: drop CCFG Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 09/13 v2] ARM: at91: make shutdown controler soc independent Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 10/13 v2] ARM: at91: make watchdog drivers " Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 11/13 v2] ARM: at91: make DBGU " Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 12/13] ARM: at91: make aic " Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 20:40 ` [PATCH 13/13] ARM: at91: make rm9200 rtc drivers " Jean-Christophe PLAGNIOL-VILLARD
2011-11-21 13:47   ` Nicolas Ferre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFumwP0ExjSoPfM1B8d0TeMys3M9vtfz8hfXoJKqwVXWHNQt=Q@mail.gmail.com' \
    --to=avictor.za@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).