From 57f3ebccaa560d1eeb40b5c719773bed5cb0df46 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 24 Mar 2006 03:15:41 -0800 Subject: [PATCH] remove ISA legacy functions: remove the helpers unused isa_...() helpers removed. Adrian Bunk: The asm-sh part was rediffed due to unrelated changes. Signed-off-by: Al Viro Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-parisc/io.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'include/asm-parisc/io.h') diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index 0db00adc942..be0c7234a6d 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h @@ -294,22 +294,6 @@ void memset_io(volatile void __iomem *addr, unsigned char val, int count); void memcpy_fromio(void *dst, const volatile void __iomem *src, int count); void memcpy_toio(volatile void __iomem *dst, const void *src, int count); -/* Support old drivers which don't ioremap. - * NB this interface is scheduled to disappear in 2.5 - */ - -#define __isa_addr(x) (void __iomem *)(F_EXTEND(0xfc000000) | (x)) -#define isa_readb(a) readb(__isa_addr(a)) -#define isa_readw(a) readw(__isa_addr(a)) -#define isa_readl(a) readl(__isa_addr(a)) -#define isa_writeb(b,a) writeb((b), __isa_addr(a)) -#define isa_writew(b,a) writew((b), __isa_addr(a)) -#define isa_writel(b,a) writel((b), __isa_addr(a)) -#define isa_memset_io(a,b,c) memset_io(__isa_addr(a), (b), (c)) -#define isa_memcpy_fromio(a,b,c) memcpy_fromio((a), __isa_addr(b), (c)) -#define isa_memcpy_toio(a,b,c) memcpy_toio(__isa_addr(a), (b), (c)) - - /* * XXX - We don't have csum_partial_copy_fromio() yet, so we cheat here and * just copy it. The net code will then do the checksum later. Presently @@ -318,8 +302,6 @@ void memcpy_toio(volatile void __iomem *dst, const void *src, int count); #define eth_io_copy_and_sum(skb,src,len,unused) \ memcpy_fromio((skb)->data,(src),(len)) -#define isa_eth_io_copy_and_sum(skb,src,len,unused) \ - isa_memcpy_fromio((skb)->data,(src),(len)) /* Port-space IO */ -- cgit v1.2.3 From b8ce0aadcdebbaf5ec013c57e2a0803060817bcc Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Tue, 7 Mar 2006 14:12:13 -0700 Subject: [PARISC] Add CONFIG_HPPA_IOREMAP to conditionally enable ioremap Instead of making it a #define in asm/io.h, allow user to select to turn on IOREMAP from the config menu. Signed-off-by: Helge Deller Signed-off-by: Kyle McMartin --- include/asm-parisc/io.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'include/asm-parisc/io.h') diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index be0c7234a6d..2fb25325510 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h @@ -26,11 +26,7 @@ extern unsigned long parisc_vmerge_max_size; */ #ifdef CONFIG_DEBUG_IOREMAP -#ifdef CONFIG_64BIT -#define NYBBLE_SHIFT 60 -#else -#define NYBBLE_SHIFT 28 -#endif +#define NYBBLE_SHIFT (BITS_PER_LONG - 4) extern void gsc_bad_addr(unsigned long addr); extern void __raw_bad_addr(const volatile void __iomem *addr); #define gsc_check_addr(addr) \ @@ -181,13 +177,11 @@ extern inline void * ioremap_nocache(unsigned long offset, unsigned long size) extern void iounmap(void __iomem *addr); /* - * USE_HPPA_IOREMAP is the magic flag to enable or disable real ioremap() + * CONFIG_HPPA_IOREMAP is the magic flag to enable or disable real ioremap() * functionality. It's currently disabled because it may not work on some * machines. */ -#define USE_HPPA_IOREMAP 0 - -#if USE_HPPA_IOREMAP +#ifdef CONFIG_HPPA_IOREMAP static inline unsigned char __raw_readb(const volatile void __iomem *addr) { return (*(volatile unsigned char __force *) (addr)); @@ -221,7 +215,7 @@ static inline void __raw_writeq(unsigned long long b, volatile void __iomem *add { *(volatile unsigned long long __force *) addr = b; } -#else /* !USE_HPPA_IOREMAP */ +#else /* !CONFIG_HPPA_IOREMAP */ static inline unsigned char __raw_readb(const volatile void __iomem *addr) { __raw_check_addr(addr); @@ -271,7 +265,7 @@ static inline void __raw_writeq(unsigned long long b, volatile void __iomem *add gsc_writeq(b, (unsigned long) addr); } -#endif /* !USE_HPPA_IOREMAP */ +#endif /* !CONFIG_HPPA_IOREMAP */ /* readb can never be const, so use __fswab instead of le*_to_cpu */ #define readb(addr) __raw_readb(addr) -- cgit v1.2.3 From 29ef8295327653ff09a56285c35213cd31fa54b3 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Thu, 23 Mar 2006 00:32:46 -0700 Subject: [PARISC] Enable ioremap functionality unconditionally Enable CONFIG_HPPA_IOREMAP by default and remove all now unnecessary code. Signed-off-by: Helge Deller Signed-off-by: Kyle McMartin --- include/asm-parisc/io.h | 58 +------------------------------------------------ 1 file changed, 1 insertion(+), 57 deletions(-) (limited to 'include/asm-parisc/io.h') diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index 2fb25325510..bcfe0b09c93 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h @@ -176,12 +176,7 @@ extern inline void * ioremap_nocache(unsigned long offset, unsigned long size) extern void iounmap(void __iomem *addr); -/* - * CONFIG_HPPA_IOREMAP is the magic flag to enable or disable real ioremap() - * functionality. It's currently disabled because it may not work on some - * machines. - */ -#ifdef CONFIG_HPPA_IOREMAP + static inline unsigned char __raw_readb(const volatile void __iomem *addr) { return (*(volatile unsigned char __force *) (addr)); @@ -215,57 +210,6 @@ static inline void __raw_writeq(unsigned long long b, volatile void __iomem *add { *(volatile unsigned long long __force *) addr = b; } -#else /* !CONFIG_HPPA_IOREMAP */ -static inline unsigned char __raw_readb(const volatile void __iomem *addr) -{ - __raw_check_addr(addr); - - return gsc_readb((unsigned long) addr); -} -static inline unsigned short __raw_readw(const volatile void __iomem *addr) -{ - __raw_check_addr(addr); - - return gsc_readw((unsigned long) addr); -} -static inline unsigned int __raw_readl(const volatile void __iomem *addr) -{ - __raw_check_addr(addr); - - return gsc_readl((unsigned long) addr); -} -static inline unsigned long long __raw_readq(const volatile void __iomem *addr) -{ - __raw_check_addr(addr); - - return gsc_readq((unsigned long) addr); -} - -static inline void __raw_writeb(unsigned char b, volatile void __iomem *addr) -{ - __raw_check_addr(addr); - - gsc_writeb(b, (unsigned long) addr); -} -static inline void __raw_writew(unsigned short b, volatile void __iomem *addr) -{ - __raw_check_addr(addr); - - gsc_writew(b, (unsigned long) addr); -} -static inline void __raw_writel(unsigned int b, volatile void __iomem *addr) -{ - __raw_check_addr(addr); - - gsc_writel(b, (unsigned long) addr); -} -static inline void __raw_writeq(unsigned long long b, volatile void __iomem *addr) -{ - __raw_check_addr(addr); - - gsc_writeq(b, (unsigned long) addr); -} -#endif /* !CONFIG_HPPA_IOREMAP */ /* readb can never be const, so use __fswab instead of le*_to_cpu */ #define readb(addr) __raw_readb(addr) -- cgit v1.2.3 From a41d3862dfd44a1b09a0f6243bb34773061fd9a2 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Thu, 23 Mar 2006 01:07:00 -0700 Subject: [PARISC] Remove obsolete CONFIG_DEBUG_IOREMAP Remove CONFIG_DEBUG_IOREMAP, it's now obsolete and won't work anyway. Remove it from lib/KConfig since it was only available on parisc. Signed-off-by: Helge Deller Signed-off-by: Kyle McMartin --- include/asm-parisc/io.h | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'include/asm-parisc/io.h') diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index bcfe0b09c93..29da31194b9 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h @@ -25,31 +25,11 @@ extern unsigned long parisc_vmerge_max_size; * eg dev->hpa or 0xfee00000. */ -#ifdef CONFIG_DEBUG_IOREMAP -#define NYBBLE_SHIFT (BITS_PER_LONG - 4) -extern void gsc_bad_addr(unsigned long addr); -extern void __raw_bad_addr(const volatile void __iomem *addr); -#define gsc_check_addr(addr) \ - if ((addr >> NYBBLE_SHIFT) != 0xf) { \ - gsc_bad_addr(addr); \ - addr |= 0xfUL << NYBBLE_SHIFT; \ - } -#define __raw_check_addr(addr) \ - if (((unsigned long)addr >> NYBBLE_SHIFT) != 0xe) \ - __raw_bad_addr(addr); \ - addr = (void __iomem *)((unsigned long)addr | (0xfUL << NYBBLE_SHIFT)); -#else -#define gsc_check_addr(addr) -#define __raw_check_addr(addr) -#endif - static inline unsigned char gsc_readb(unsigned long addr) { long flags; unsigned char ret; - gsc_check_addr(addr); - __asm__ __volatile__( " rsm 2,%0\n" " ldbx 0(%2),%1\n" @@ -64,8 +44,6 @@ static inline unsigned short gsc_readw(unsigned long addr) long flags; unsigned short ret; - gsc_check_addr(addr); - __asm__ __volatile__( " rsm 2,%0\n" " ldhx 0(%2),%1\n" @@ -79,8 +57,6 @@ static inline unsigned int gsc_readl(unsigned long addr) { u32 ret; - gsc_check_addr(addr); - __asm__ __volatile__( " ldwax 0(%1),%0\n" : "=r" (ret) : "r" (addr) ); @@ -91,7 +67,6 @@ static inline unsigned int gsc_readl(unsigned long addr) static inline unsigned long long gsc_readq(unsigned long addr) { unsigned long long ret; - gsc_check_addr(addr); #ifdef __LP64__ __asm__ __volatile__( @@ -108,8 +83,6 @@ static inline unsigned long long gsc_readq(unsigned long addr) static inline void gsc_writeb(unsigned char val, unsigned long addr) { long flags; - gsc_check_addr(addr); - __asm__ __volatile__( " rsm 2,%0\n" " stbs %1,0(%2)\n" @@ -120,8 +93,6 @@ static inline void gsc_writeb(unsigned char val, unsigned long addr) static inline void gsc_writew(unsigned short val, unsigned long addr) { long flags; - gsc_check_addr(addr); - __asm__ __volatile__( " rsm 2,%0\n" " sths %1,0(%2)\n" @@ -131,8 +102,6 @@ static inline void gsc_writew(unsigned short val, unsigned long addr) static inline void gsc_writel(unsigned int val, unsigned long addr) { - gsc_check_addr(addr); - __asm__ __volatile__( " stwas %0,0(%1)\n" : : "r" (val), "r" (addr) ); @@ -140,8 +109,6 @@ static inline void gsc_writel(unsigned int val, unsigned long addr) static inline void gsc_writeq(unsigned long long val, unsigned long addr) { - gsc_check_addr(addr); - #ifdef __LP64__ __asm__ __volatile__( " stda %0,0(%1)\n" -- cgit v1.2.3