linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tpm: TCG_ATMEL should depend on HAS_IOPORT
@ 2011-08-08 11:08 Geert Uytterhoeven
  2011-08-29  7:47 ` Geert Uytterhoeven
  2011-08-29 11:19 ` Arnd Bergmann
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2011-08-08 11:08 UTC (permalink / raw)
  To: Debora Velarde, Rajiv Andrade, Marcel Selhorst
  Cc: Jonas Bonn, Arnd Bergmann, tpmdd-devel, linux-kernel, Geert Uytterhoeven

On m68k, I get:

drivers/char/tpm/tpm_atmel.h: In function ‘atmel_get_base_addr’:
drivers/char/tpm/tpm_atmel.h:129: error: implicit declaration of function ‘ioport_map’
drivers/char/tpm/tpm_atmel.h:129: warning: return makes pointer from integer without a cast

The code in tpm_atmel.h supports PPC64 (using the device tree and ioremap())
and "anything else" (using ioport_map()). However, ioportmap() is only
available on platforms that set HAS_IOPORT.

Although PC64 seems to have HAS_IOPORT, a "depends on HAS_IOPORT" should work,
but I think it's better to expose the special PPC64 handling explicit using
"depends on PPC64 || HAS_IOPORT".

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/char/tpm/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig
index f6595ab..fa567f1 100644
--- a/drivers/char/tpm/Kconfig
+++ b/drivers/char/tpm/Kconfig
@@ -43,6 +43,7 @@ config TCG_NSC
 
 config TCG_ATMEL
 	tristate "Atmel TPM Interface"
+	depends on PPC64 || HAS_IOPORT
 	---help---
 	  If you have a TPM security chip from Atmel say Yes and it 
 	  will be accessible from within Linux.  To compile this driver 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tpm: TCG_ATMEL should depend on HAS_IOPORT
  2011-08-08 11:08 [PATCH] tpm: TCG_ATMEL should depend on HAS_IOPORT Geert Uytterhoeven
@ 2011-08-29  7:47 ` Geert Uytterhoeven
  2011-08-29 11:19 ` Arnd Bergmann
  1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2011-08-29  7:47 UTC (permalink / raw)
  To: Debora Velarde, Rajiv Andrade, Marcel Selhorst
  Cc: Jonas Bonn, Arnd Bergmann, tpmdd-devel, linux-kernel, Geert Uytterhoeven

On Mon, Aug 8, 2011 at 13:08, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On m68k, I get:
>
> drivers/char/tpm/tpm_atmel.h: In function ‘atmel_get_base_addr’:
> drivers/char/tpm/tpm_atmel.h:129: error: implicit declaration of function ‘ioport_map’
> drivers/char/tpm/tpm_atmel.h:129: warning: return makes pointer from integer without a cast
>
> The code in tpm_atmel.h supports PPC64 (using the device tree and ioremap())
> and "anything else" (using ioport_map()). However, ioportmap() is only
> available on platforms that set HAS_IOPORT.
>
> Although PC64 seems to have HAS_IOPORT, a "depends on HAS_IOPORT" should work,

Since ...

> but I think it's better to expose the special PPC64 handling explicit using

... explicitly ...

> "depends on PPC64 || HAS_IOPORT".
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>  drivers/char/tpm/Kconfig |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig
> index f6595ab..fa567f1 100644
> --- a/drivers/char/tpm/Kconfig
> +++ b/drivers/char/tpm/Kconfig
> @@ -43,6 +43,7 @@ config TCG_NSC
>
>  config TCG_ATMEL
>        tristate "Atmel TPM Interface"
> +       depends on PPC64 || HAS_IOPORT
>        ---help---
>          If you have a TPM security chip from Atmel say Yes and it
>          will be accessible from within Linux.  To compile this driver
> --
> 1.7.0.4

Ping? M68k allmodconfig breakage in 3.1-rc*.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tpm: TCG_ATMEL should depend on HAS_IOPORT
  2011-08-08 11:08 [PATCH] tpm: TCG_ATMEL should depend on HAS_IOPORT Geert Uytterhoeven
  2011-08-29  7:47 ` Geert Uytterhoeven
@ 2011-08-29 11:19 ` Arnd Bergmann
  1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2011-08-29 11:19 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Debora Velarde, Rajiv Andrade, Marcel Selhorst, Jonas Bonn,
	tpmdd-devel, linux-kernel

On Monday 08 August 2011, Geert Uytterhoeven wrote:
> drivers/char/tpm/tpm_atmel.h: In function ‘atmel_get_base_addr’:
> drivers/char/tpm/tpm_atmel.h:129: error: implicit declaration of function ‘ioport_map’
> drivers/char/tpm/tpm_atmel.h:129: warning: return makes pointer from integer without a cast
> 
> The code in tpm_atmel.h supports PPC64 (using the device tree and ioremap())
> and "anything else" (using ioport_map()). However, ioportmap() is only
> available on platforms that set HAS_IOPORT.
> 
> Although PC64 seems to have HAS_IOPORT, a "depends on HAS_IOPORT" should work,
> but I think it's better to expose the special PPC64 handling explicit using
> "depends on PPC64 || HAS_IOPORT".
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Acked-by: Arnd Bergmann <arnd@arndb.de>

FWIW, I've now got a first prototype of the HAS_IOPORT rework in
http://git.kernel.org/?p=linux/kernel/git/arm/linux-arm-soc.git;a=shortlog;h=refs/heads/tmp/randconfig3
along with a lot of bug fixes for ARM. Feel free to play with that on
other architectures.

Since your patch adds another use of HAS_IOPORT, I will have to rename
that as well to HAS_IOPORT_MAP as I do for all the other uses.

	Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-29 11:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-08 11:08 [PATCH] tpm: TCG_ATMEL should depend on HAS_IOPORT Geert Uytterhoeven
2011-08-29  7:47 ` Geert Uytterhoeven
2011-08-29 11:19 ` Arnd Bergmann

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).