public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Hans-Jürgen Koch" <hjk@linutronix.de>
To: Andy Herzig <andrew.herzig@ngc.com>
Cc: andrew@sanpeople.com, linux-kernel@vger.kernel.org,
	trivial@kernel.org,
	linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>
Subject: Re: [PATCH] at91 pm: Compilation fix for at91sam926x
Date: Thu, 9 Aug 2007 16:53:35 +0200	[thread overview]
Message-ID: <200708091653.35226.hjk@linutronix.de> (raw)
In-Reply-To: <1186661447.6370.19.camel@leoh9-18574.nges.northgrum.com>

(added linux-arm-kernel to CC)

Am Donnerstag 09 August 2007 14:10 schrieb Andy Herzig:
> Hello all,
> 
> This patch is intended to fix compilation errors when I tried to add in
> power management to my Atmel AT91SAM9260 board. First, there is no
> separate memory controller in the 9260 as there is in the 9200, so calls
> to do anything with it in pm.c fail.

Correct. I made the same discovery with my AT91SAM9263 board.

> 
> Secondly, at91_suspend_entering_slow_clock() is not declared extern by
> drivers that use it. This used to cause only a warning, but in
> 2.6.23-rc1 and beyond, it is an error.

Patch looks good to me. Kernel compiles for my 9263. Didn't test
suspend/resume yet, though.

> 
> Signed-off-by: Andrew J. Herzig <andrew.herzig@ngc.com>

Acked-by: Hans J. Koch <hjk@linutronix.de>


> ---
> arch/arm/mach-at91/pm.c       |    5 ++++-
> drivers/serial/atmel_serial.c |    2 ++
> drivers/usb/gadget/at91_udc.c |    2 ++
> drivers/usb/host/ohci-at91.c  |    1 +
> 4 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff -uprN -X linux-2.6.23-rc2/Documentation/dontdiff
> linux-2.6.23-rc2-vanilla/arch/arm/mach-at91/pm.c
> linux-2.6.23-rc2/arch/arm/mach-at91/pm.c
> --- linux-2.6.23-rc2-vanilla/arch/arm/mach-at91/pm.c    2007-08-08
> 13:28:37.000000000 -0400
> +++ linux-2.6.23-rc2/arch/arm/mach-at91/pm.c    2007-08-08
> 13:36:43.000000000 -0400
> @@ -176,7 +176,9 @@ static int at91_pm_enter(suspend_state_t
>                          */
>                         asm("b 1f; .align 5; 1:");
>                         asm("mcr p15, 0, r0, c7, c10, 4");      /* drain
> write buffer */
> +#if defined(CONFIG_ARCH_AT91RM9200)
>                         at91_sys_write(AT91_SDRAMC_SRR, 1);     /*
> self-refresh mode */
> +#endif
>                         /* fall though to next state */
>  
>                 case PM_SUSPEND_ON:
> @@ -218,8 +220,9 @@ static int __init at91_pm_init(void)
>  #endif
>  
>         /* Disable SDRAM low-power mode.  Cannot be used with
> self-refresh. */
> +#if defined(CONFIG_ARCH_AT91RM9200)
>         at91_sys_write(AT91_SDRAMC_LPR, 0);
> -
> +#endif
>         pm_set_ops(&at91_pm_ops);
>  
>         return 0;
> diff -uprN -X linux-2.6.23-rc2/Documentation/dontdiff
> linux-2.6.23-rc2-vanilla/drivers/serial/atmel_serial.c
> linux-2.6.23-rc2/drivers/serial/atmel_serial.c
> --- linux-2.6.23-rc2-vanilla/drivers/serial/atmel_serial.c
> 2007-08-08 13:28:33.000000000 -0400
> +++ linux-2.6.23-rc2/drivers/serial/atmel_serial.c      2007-08-08
> 13:32:52.000000000 -0400
> @@ -916,6 +916,8 @@ static struct uart_driver atmel_uart = {
>  };
>  
>  #ifdef CONFIG_PM
> +extern int at91_suspend_entering_slow_clock(void);
> +
>  static int atmel_serial_suspend(struct platform_device *pdev,
> pm_message_t state)
>  {
>         struct uart_port *port = platform_get_drvdata(pdev);
> diff -uprN -X linux-2.6.23-rc2/Documentation/dontdiff
> linux-2.6.23-rc2-vanilla/drivers/usb/gadget/at91_udc.c
> linux-2.6.23-rc2/drivers/usb/gadget/at91_udc.c 
> --- linux-2.6.23-rc2-vanilla/drivers/usb/gadget/at91_udc.c
> 2007-08-08 13:28:27.000000000 -0400
> +++ linux-2.6.23-rc2/drivers/usb/gadget/at91_udc.c      2007-08-08
> 13:33:21.000000000 -0400
> @@ -1770,6 +1770,8 @@ static int __exit at91udc_remove(struct 
>  }
>  
>  #ifdef CONFIG_PM
> +extern int at91_suspend_entering_slow_clock(void);
> +
>  static int at91udc_suspend(struct platform_device *pdev, pm_message_t
> mesg)
>  {
>         struct at91_udc *udc = platform_get_drvdata(pdev);
> diff -uprN -X linux-2.6.23-rc2/Documentation/dontdiff
> linux-2.6.23-rc2-vanilla/drivers/usb/host/ohci-at91.c
> linux-2.6.23-rc2/drivers/usb/host/ohci-at91.c
> --- linux-2.6.23-rc2-vanilla/drivers/usb/host/ohci-at91.c
> 2007-08-08 13:28:27.000000000 -0400
> +++ linux-2.6.23-rc2/drivers/usb/host/ohci-at91.c       2007-08-08
> 13:32:45.000000000 -0400
> @@ -282,6 +282,7 @@ static int ohci_hcd_at91_drv_remove(stru
>  }
>  
>  #ifdef CONFIG_PM
> +extern int at91_suspend_entering_slow_clock(void);
>  
>  static int
>  ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t
> mesg)
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

  parent reply	other threads:[~2007-08-09 14:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-09 12:10 [PATCH] at91 pm: Compilation fix for at91sam926x Andy Herzig
2007-08-09 14:39 ` Andy Herzig
2007-08-09 14:53 ` Hans-Jürgen Koch [this message]
2007-08-09 16:01   ` Marc Pignat
2007-08-09 17:17     ` Andy Herzig
2007-08-09 18:19       ` Hans-Jürgen Koch
2007-08-09 22:15     ` Ulf Samuelsson
2007-08-10  7:12       ` Hans-Jürgen Koch
2007-08-10  7:33         ` Marc Pignat
     [not found]           ` <3858727143598039860@unknownmsgid>
2007-08-10 10:00             ` Michel Benoit
2007-08-24  7:11               ` Andrew Victor
2007-08-10 13:54           ` Ulf Samuelsson

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=200708091653.35226.hjk@linutronix.de \
    --to=hjk@linutronix.de \
    --cc=andrew.herzig@ngc.com \
    --cc=andrew@sanpeople.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.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