All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] m68k: Add missing ioport_unmap()
@ 2014-09-14  9:45 Geert Uytterhoeven
  2014-09-15  1:07 ` Greg Ungerer
       [not found] ` <54163BC6.1080407@uclinux.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2014-09-14  9:45 UTC (permalink / raw)
  To: linux-m68k; +Cc: Greg Ungerer, uclinux-dev, Geert Uytterhoeven

drivers/net/ethernet/cirrus/cs89x0.c: In function ‘cs89x0_ioport_probe’:
drivers/net/ethernet/cirrus/cs89x0.c:1629: error: implicit declaration of function ‘ioport_unmap’

Add the missing ioport_unmap() implementation, and convert ioport_map()
from a macro to a static inline function while we're at it (both copied
from asm-generic).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/m68k/include/asm/io_mm.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h
index ffdf54f44bc6..8955b40a5dc4 100644
--- a/arch/m68k/include/asm/io_mm.h
+++ b/arch/m68k/include/asm/io_mm.h
@@ -510,6 +510,13 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int
  */
 #define xlate_dev_kmem_ptr(p)	p
 
-#define ioport_map(port, nr)	((void __iomem *)(port))
+static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
+{
+	return (void __iomem *) port;
+}
+
+static inline void ioport_unmap(void __iomem *p)
+{
+}
 
 #endif /* _IO_H */
-- 
1.9.1

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

* Re: [PATCH] m68k: Add missing ioport_unmap()
  2014-09-14  9:45 [PATCH] m68k: Add missing ioport_unmap() Geert Uytterhoeven
@ 2014-09-15  1:07 ` Greg Ungerer
       [not found] ` <54163BC6.1080407@uclinux.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Greg Ungerer @ 2014-09-15  1:07 UTC (permalink / raw)
  To: Geert Uytterhoeven, linux-m68k; +Cc: uclinux-dev

Hi Geert,

On 14/09/14 19:45, Geert Uytterhoeven wrote:
> drivers/net/ethernet/cirrus/cs89x0.c: In function ‘cs89x0_ioport_probe’:
> drivers/net/ethernet/cirrus/cs89x0.c:1629: error: implicit declaration of function ‘ioport_unmap’
> 
> Add the missing ioport_unmap() implementation, and convert ioport_map()
> from a macro to a static inline function while we're at it (both copied
> from asm-generic).

The non-mmu version of this, io_no.h, doesn't implement these either.
Should it?

Regards
Greg


> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>  arch/m68k/include/asm/io_mm.h | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h
> index ffdf54f44bc6..8955b40a5dc4 100644
> --- a/arch/m68k/include/asm/io_mm.h
> +++ b/arch/m68k/include/asm/io_mm.h
> @@ -510,6 +510,13 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int
>   */
>  #define xlate_dev_kmem_ptr(p)	p
>  
> -#define ioport_map(port, nr)	((void __iomem *)(port))
> +static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
> +{
> +	return (void __iomem *) port;
> +}
> +
> +static inline void ioport_unmap(void __iomem *p)
> +{
> +}
>  
>  #endif /* _IO_H */
> 

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

* Re: [PATCH] m68k: Add missing ioport_unmap()
       [not found] ` <54163BC6.1080407@uclinux.org>
@ 2014-09-15  7:36   ` Geert Uytterhoeven
  2014-09-16  6:25     ` Greg Ungerer
       [not found]     ` <5417D7D7.4080800@uclinux.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2014-09-15  7:36 UTC (permalink / raw)
  To: Greg Ungerer; +Cc: linux-m68k, uClinux development list

Hi Greg,

On Mon, Sep 15, 2014 at 3:07 AM, Greg Ungerer <gerg@uclinux.org> wrote:
> On 14/09/14 19:45, Geert Uytterhoeven wrote:
>> drivers/net/ethernet/cirrus/cs89x0.c: In function ‘cs89x0_ioport_probe’:
>> drivers/net/ethernet/cirrus/cs89x0.c:1629: error: implicit declaration of function ‘ioport_unmap’
>>
>> Add the missing ioport_unmap() implementation, and convert ioport_map()
>> from a macro to a static inline function while we're at it (both copied
>> from asm-generic).
>
> The non-mmu version of this, io_no.h, doesn't implement these either.
> Should it?

I think it should. However, you probably can't get there without PCI or ISA
enabled.

(doing some experiments with M548x/allmodconfig builds)

Currently PCI on M54xx is limited to MMU=y?
As soon as PCI can be enabled with MMU=n, you can get to:

lib/pci_iomap.c: In function ‘pci_iomap’:
lib/pci_iomap.c:37: error: implicit declaration of function ‘ioport_map’
lib/pci_iomap.c:37: warning: return makes pointer from integer without a cast

drivers/gpio/gpio-amd8111.c: In function ‘amd_gpio_init’:
drivers/gpio/gpio-amd8111.c:215: error: implicit declaration of
function ‘ioport_map’
drivers/gpio/gpio-amd8111.c:215: warning: assignment makes pointer
from integer without a cast
drivers/gpio/gpio-amd8111.c: In function ‘amd_gpio_exit’:
drivers/gpio/gpio-amd8111.c:236: error: implicit declaration of
function ‘ioport_unmap’

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] 5+ messages in thread

* Re: [PATCH] m68k: Add missing ioport_unmap()
  2014-09-15  7:36   ` Geert Uytterhoeven
@ 2014-09-16  6:25     ` Greg Ungerer
       [not found]     ` <5417D7D7.4080800@uclinux.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Greg Ungerer @ 2014-09-16  6:25 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, uClinux development list

Hi Geert,

On 15/09/14 17:36, Geert Uytterhoeven wrote:
> On Mon, Sep 15, 2014 at 3:07 AM, Greg Ungerer <gerg@uclinux.org> wrote:
>> On 14/09/14 19:45, Geert Uytterhoeven wrote:
>>> drivers/net/ethernet/cirrus/cs89x0.c: In function ‘cs89x0_ioport_probe’:
>>> drivers/net/ethernet/cirrus/cs89x0.c:1629: error: implicit declaration of function ‘ioport_unmap’
>>>
>>> Add the missing ioport_unmap() implementation, and convert ioport_map()
>>> from a macro to a static inline function while we're at it (both copied
>>> from asm-generic).
>>
>> The non-mmu version of this, io_no.h, doesn't implement these either.
>> Should it?
> 
> I think it should. However, you probably can't get there without PCI or ISA
> enabled.
> 
> (doing some experiments with M548x/allmodconfig builds)
> 
> Currently PCI on M54xx is limited to MMU=y?

Yes, though I am not sure why we have it limited to that case.


> As soon as PCI can be enabled with MMU=n, you can get to:
> 
> lib/pci_iomap.c: In function ‘pci_iomap’:
> lib/pci_iomap.c:37: error: implicit declaration of function ‘ioport_map’
> lib/pci_iomap.c:37: warning: return makes pointer from integer without a cast
> 
> drivers/gpio/gpio-amd8111.c: In function ‘amd_gpio_init’:
> drivers/gpio/gpio-amd8111.c:215: error: implicit declaration of
> function ‘ioport_map’
> drivers/gpio/gpio-amd8111.c:215: warning: assignment makes pointer
> from integer without a cast
> drivers/gpio/gpio-amd8111.c: In function ‘amd_gpio_exit’:
> drivers/gpio/gpio-amd8111.c:236: error: implicit declaration of
> function ‘ioport_unmap’

Ok, I say yes we need it for non-MMU too. Do you want to come up with
another patch for the non-MMU case, or do you want me to do it?

Regards
Greg

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

* Re: [PATCH] m68k: Add missing ioport_unmap()
       [not found]     ` <5417D7D7.4080800@uclinux.org>
@ 2014-09-16  6:47       ` Geert Uytterhoeven
  0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2014-09-16  6:47 UTC (permalink / raw)
  To: Greg Ungerer; +Cc: linux-m68k, uClinux development list

Hi Greg,

On Tue, Sep 16, 2014 at 8:25 AM, Greg Ungerer <gerg@uclinux.org> wrote:
> On 15/09/14 17:36, Geert Uytterhoeven wrote:
>> On Mon, Sep 15, 2014 at 3:07 AM, Greg Ungerer <gerg@uclinux.org> wrote:
>>> On 14/09/14 19:45, Geert Uytterhoeven wrote:
>>>> drivers/net/ethernet/cirrus/cs89x0.c: In function ‘cs89x0_ioport_probe’:
>>>> drivers/net/ethernet/cirrus/cs89x0.c:1629: error: implicit declaration of function ‘ioport_unmap’
>>>>
>>>> Add the missing ioport_unmap() implementation, and convert ioport_map()
>>>> from a macro to a static inline function while we're at it (both copied
>>>> from asm-generic).
>>>
>>> The non-mmu version of this, io_no.h, doesn't implement these either.
>>> Should it?
>>
>> I think it should. However, you probably can't get there without PCI or ISA
>> enabled.
>>
>> (doing some experiments with M548x/allmodconfig builds)
>>
>> Currently PCI on M54xx is limited to MMU=y?
>
> Yes, though I am not sure why we have it limited to that case.

Yeah, I was wondering the same...

>> As soon as PCI can be enabled with MMU=n, you can get to:
>>
>> lib/pci_iomap.c: In function ‘pci_iomap’:
>> lib/pci_iomap.c:37: error: implicit declaration of function ‘ioport_map’
>> lib/pci_iomap.c:37: warning: return makes pointer from integer without a cast
>>
>> drivers/gpio/gpio-amd8111.c: In function ‘amd_gpio_init’:
>> drivers/gpio/gpio-amd8111.c:215: error: implicit declaration of
>> function ‘ioport_map’
>> drivers/gpio/gpio-amd8111.c:215: warning: assignment makes pointer
>> from integer without a cast
>> drivers/gpio/gpio-amd8111.c: In function ‘amd_gpio_exit’:
>> drivers/gpio/gpio-amd8111.c:236: error: implicit declaration of
>> function ‘ioport_unmap’
>
> Ok, I say yes we need it for non-MMU too. Do you want to come up with
> another patch for the non-MMU case, or do you want me to do it?

Feel free to write a patch when you have time...

Groetje,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] 5+ messages in thread

end of thread, other threads:[~2014-09-16  6:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-14  9:45 [PATCH] m68k: Add missing ioport_unmap() Geert Uytterhoeven
2014-09-15  1:07 ` Greg Ungerer
     [not found] ` <54163BC6.1080407@uclinux.org>
2014-09-15  7:36   ` Geert Uytterhoeven
2014-09-16  6:25     ` Greg Ungerer
     [not found]     ` <5417D7D7.4080800@uclinux.org>
2014-09-16  6:47       ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.