diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-15 16:16:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-15 16:16:31 -0700 |
commit | 902233ee494f9d9da6dbb818316fcbf892bebbed (patch) | |
tree | b3fcfbd1c757851a562ef0921cab4e1b3e2d9f19 /include | |
parent | e871e3c268a26c35ad805196a01d84a55bb755c6 (diff) | |
parent | c5760abde715dcd9ead66769e45d1896332e9d9c (diff) | |
download | linux-3.10-902233ee494f9d9da6dbb818316fcbf892bebbed.tar.gz linux-3.10-902233ee494f9d9da6dbb818316fcbf892bebbed.tar.bz2 linux-3.10-902233ee494f9d9da6dbb818316fcbf892bebbed.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (30 commits)
Blackfin SMC91X ethernet supporting driver: SMC91C111 LEDs are note drived in the kernel like in uboot
Blackfin SPI driver: fix bug SPI DMA incomplete transmission
Blackfin SPI driver: tweak spi cleanup function to match newer kernel changes
Blackfin RTC drivers: update MAINTAINERS information
Blackfin serial driver: decouple PARODD and CMSPAR checking from PARENB
Blackfin serial driver: actually implement the break_ctl() function
Blackfin serial driver: ignore framing and parity errors
Blackfin serial driver: hook up our UARTs STP bit with userspaces CMSPAR
Blackfin arch: move HI/LO macros into blackfin.h and punt the rest of macros.h as it includes VDSP macros we never use
Blackfin arch: redo our linker script a bit
Blackfin arch: make sure we initialize our L1 Data B section properly based on the linked kernel
Blackfin arch: fix bug can not wakeup from sleep via push buttons
Blackfin arch: add support for Alon Bar-Lev's dynamic kernel command-line
Blackfin arch: add missing gpio.h header to fix compiling in some pm configurations
Blackfin arch: As Mike pointed out range goes form m..MAX_BLACKFIN_GPIO -1
Blackfin arch: fix spelling typo in output
Blackfin arch: try to split up functions like this into smaller units according to LKML review
Blackfin arch: add proper ENDPROC()
Blackfin arch: move more of our startup code to .init so it can be freed once we are up and running
Blackfin arch: unify differences between our diff head.S files -- no functional changes
...
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-blackfin/blackfin.h | 6 | ||||
-rw-r--r-- | include/asm-blackfin/gpio.h | 1 | ||||
-rw-r--r-- | include/asm-blackfin/mach-common/def_LPBlackfin.h | 22 | ||||
-rw-r--r-- | include/asm-blackfin/macros.h | 95 |
4 files changed, 28 insertions, 96 deletions
diff --git a/include/asm-blackfin/blackfin.h b/include/asm-blackfin/blackfin.h index 14e58de7397..db3b615ffba 100644 --- a/include/asm-blackfin/blackfin.h +++ b/include/asm-blackfin/blackfin.h @@ -6,7 +6,11 @@ #ifndef _BLACKFIN_H_ #define _BLACKFIN_H_ -#include <asm/macros.h> +#define LO(con32) ((con32) & 0xFFFF) +#define lo(con32) ((con32) & 0xFFFF) +#define HI(con32) (((con32) >> 16) & 0xFFFF) +#define hi(con32) (((con32) >> 16) & 0xFFFF) + #include <asm/mach/blackfin.h> #include <asm/bfin-global.h> diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h index aa0d5503e23..d98d77ad71f 100644 --- a/include/asm-blackfin/gpio.h +++ b/include/asm-blackfin/gpio.h @@ -332,6 +332,7 @@ struct gpio_port_s { unsigned short inen; unsigned short fer; + unsigned short reserved; }; #endif /*CONFIG_PM*/ diff --git a/include/asm-blackfin/mach-common/def_LPBlackfin.h b/include/asm-blackfin/mach-common/def_LPBlackfin.h index 76103526aec..be1ece8c0c2 100644 --- a/include/asm-blackfin/mach-common/def_LPBlackfin.h +++ b/include/asm-blackfin/mach-common/def_LPBlackfin.h @@ -42,6 +42,12 @@ #if defined(ANOMALY_05000198) +#define bfin_read8(addr) ({ unsigned char __v; \ + __asm__ __volatile__ ("NOP;\n\t" \ + "%0 = b[%1] (z);\n\t" \ + : "=d"(__v) : "a"(addr)); \ + __v; }) + #define bfin_read16(addr) ({ unsigned __v; \ __asm__ __volatile__ ("NOP;\n\t"\ "%0 = w[%1] (z);\n\t"\ @@ -52,6 +58,11 @@ "%0 = [%1];\n\t"\ : "=d"(__v) : "a"(addr)); __v; }) +#define bfin_write8(addr, val) ({ \ + __asm__ __volatile__ ("NOP;\n\t" \ + "b[%0] = %1;\n\t" \ + : : "a"(addr), "d"(val) : "memory");}) + #define bfin_write16(addr,val) ({\ __asm__ __volatile__ ("NOP;\n\t"\ "w[%0] = %1;\n\t"\ @@ -64,6 +75,12 @@ #else +#define bfin_read8(addr) ({ unsigned char __v; \ + __asm__ __volatile__ ( \ + "%0 = b[%1] (z);\n\t" \ + :"=d"(__v) : "a"(addr)); \ + __v; }) + #define bfin_read16(addr) ({ unsigned __v; \ __asm__ __volatile__ (\ "%0 = w[%1] (z);\n\t"\ @@ -74,6 +91,11 @@ "%0 = [%1];\n\t"\ : "=d"(__v) : "a"(addr)); __v; }) +#define bfin_write8(addr, val) ({ \ + __asm__ __volatile__ ( \ + "b[%0] = %1; \n\t" \ + ::"a"(addr), "d"(val) : "memory");}) + #define bfin_write16(addr,val) ({\ __asm__ __volatile__ (\ "w[%0] = %1;\n\t"\ diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h index c0c04a2f2dd..e69de29bb2d 100644 --- a/include/asm-blackfin/macros.h +++ b/include/asm-blackfin/macros.h @@ -1,95 +0,0 @@ -/************************************************************************ - * - * macros.h - * - * (c) Copyright 2001-2003 Analog Devices, Inc. All rights reserved. - * - ************************************************************************/ - -/* Defines various assembly macros. */ - -#ifndef _MACROS_H -#define _MACROS_H - -#define LO(con32) ((con32) & 0xFFFF) -#define lo(con32) ((con32) & 0xFFFF) -#define HI(con32) (((con32) >> 16) & 0xFFFF) -#define hi(con32) (((con32) >> 16) & 0xFFFF) - -/* - * Set the corresponding bits in a System Register (SR); - * All bits set in "mask" will be set in the system register - * specified by "sys_reg" bitset_SR(sys_reg, mask), where - * sys_reg is the system register and mask are the bits to be set. - */ -#define bitset_SR(sys_reg, mask)\ - [--SP] = (R7:6);\ - r7 = sys_reg;\ - r6.l = (mask) & 0xffff;\ - r6.h = (mask) >> 16;\ - r7 = r7 | r6;\ - sys_reg = r7;\ - csync;\ - (R7:6) = [SP++] - -/* - * Clear the corresponding bits in a System Register (SR); - * All bits set in "mask" will be cleared in the SR - * specified by "sys_reg" bitclr_SR(sys_reg, mask), where - * sys_reg is the SR and mask are the bits to be cleared. - */ -#define bitclr_SR(sys_reg, mask)\ - [--SP] = (R7:6);\ - r7 = sys_reg;\ - r7 =~ r7;\ - r6.l = (mask) & 0xffff;\ - r6.h = (mask) >> 16;\ - r7 = r7 | r6;\ - r7 =~ r7;\ - sys_reg = r7;\ - csync;\ - (R7:6) = [SP++] - -/* - * Set the corresponding bits in a Memory Mapped Register (MMR); - * All bits set in "mask" will be set in the MMR specified by "mmr_reg" - * bitset_MMR(mmr_reg, mask), where mmr_reg is the MMR and mask are - * the bits to be set. - */ -#define bitset_MMR(mmr_reg, mask)\ - [--SP] = (R7:6);\ - [--SP] = P5;\ - p5.l = mmr_reg & 0xffff;\ - p5.h = mmr_reg >> 16;\ - r7 = [p5];\ - r6.l = (mask) & 0xffff;\ - r6.h = (mask) >> 16;\ - r7 = r7 | r6;\ - [p5] = r7;\ - csync;\ - p5 = [SP++];\ - (R7:6) = [SP++] - -/* - * Clear the corresponding bits in a Memory Mapped Register (MMR); - * All bits set in "mask" will be cleared in the MMR specified by "mmr_reg" - * bitclr_MMRreg(mmr_reg, mask), where sys_reg is the MMR and mask are - * the bits to be cleared. - */ -#define bitclr_MMR(mmr_reg, mask)\ - [--SP] = (R7:6);\ - [--SP] = P5;\ - p5.l = mmr_reg & 0xffff;\ - p5.h = mmr_reg >> 16;\ - r7 = [p5];\ - r7 =~ r7;\ - r6.l = (mask) & 0xffff;\ - r6.h = (mask) >> 16;\ - r7 = r7 | r6;\ - r7 =~ r7;\ - [p5] = r7;\ - csync;\ - p5 = [SP++];\ - (R7:6) = [SP++] - -#endif /* _MACROS_H */ |