diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:14:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:14:46 -0400 |
commit | 32f15dc5e6252f03aa2e04a2b140827a8297f21f (patch) | |
tree | 2898e6fd94c9e2f668dd76fb1b0290b84c6314e6 /arch/avr32/mach-at32ap/hsmc.c | |
parent | 07db59bd6b0f279c31044cba6787344f63be87ea (diff) | |
parent | 8224ca195874525533665bbcd23b6da1e575aa4d (diff) |
Merge branch 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32
* 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32: (21 commits)
[AVR32] Fix compile error with gcc 4.1
avr32: remove unneeded cast in atomic.h
AVR32: Remove useless config option "GENERIC_BUST_SPINLOCK".
[AVR32] Optimize the TLB miss handler
[AVR32] Board code for ATNGW100
[AVR32] Use memcpy/memset in memcpy_{from,to}_io and memset_io
[AVR32] Get rid of board_setup_fbmem()
[AVR32] Reserve framebuffer memory in early_parse_fbmem()
[AVR32] Simplify early handling of memory regions
[AVR32] Move setup_bootmem() from mm/init.c to kernel/setup.c
[AVR32] Make I/O access macros work with external devices
[AVR32] Fix NMI handler
[AVR32] Clean up exception handling code
[AVR32] Clean up cpu identification and add features bitmap
[AVR32] Clean up asm/sysreg.h
[AVR32] Don't enable clocks with no users
[AVR32] Put cpu in sleep 0 when idle.
[AVR32] Change system timer from count-compare to Timer/Counter 0
[AVR32] Add mach-specific Kconfig
[AVR32] Add nwait and tdf parameters to SMC configuration
...
Diffstat (limited to 'arch/avr32/mach-at32ap/hsmc.c')
-rw-r--r-- | arch/avr32/mach-at32ap/hsmc.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/avr32/mach-at32ap/hsmc.c b/arch/avr32/mach-at32ap/hsmc.c index 7691721928a7..5e22a750632b 100644 --- a/arch/avr32/mach-at32ap/hsmc.c +++ b/arch/avr32/mach-at32ap/hsmc.c | |||
@@ -75,12 +75,35 @@ int smc_set_configuration(int cs, const struct smc_config *config) | |||
75 | return -EINVAL; | 75 | return -EINVAL; |
76 | } | 76 | } |
77 | 77 | ||
78 | switch (config->nwait_mode) { | ||
79 | case 0: | ||
80 | mode |= HSMC_BF(EXNW_MODE, HSMC_EXNW_MODE_DISABLED); | ||
81 | break; | ||
82 | case 1: | ||
83 | mode |= HSMC_BF(EXNW_MODE, HSMC_EXNW_MODE_RESERVED); | ||
84 | break; | ||
85 | case 2: | ||
86 | mode |= HSMC_BF(EXNW_MODE, HSMC_EXNW_MODE_FROZEN); | ||
87 | break; | ||
88 | case 3: | ||
89 | mode |= HSMC_BF(EXNW_MODE, HSMC_EXNW_MODE_READY); | ||
90 | break; | ||
91 | default: | ||
92 | return -EINVAL; | ||
93 | } | ||
94 | |||
95 | if (config->tdf_cycles) { | ||
96 | mode |= HSMC_BF(TDF_CYCLES, config->tdf_cycles); | ||
97 | } | ||
98 | |||
78 | if (config->nrd_controlled) | 99 | if (config->nrd_controlled) |
79 | mode |= HSMC_BIT(READ_MODE); | 100 | mode |= HSMC_BIT(READ_MODE); |
80 | if (config->nwe_controlled) | 101 | if (config->nwe_controlled) |
81 | mode |= HSMC_BIT(WRITE_MODE); | 102 | mode |= HSMC_BIT(WRITE_MODE); |
82 | if (config->byte_write) | 103 | if (config->byte_write) |
83 | mode |= HSMC_BIT(BAT); | 104 | mode |= HSMC_BIT(BAT); |
105 | if (config->tdf_mode) | ||
106 | mode |= HSMC_BIT(TDF_MODE); | ||
84 | 107 | ||
85 | pr_debug("smc cs%d: setup/%08x pulse/%08x cycle/%08x mode/%08x\n", | 108 | pr_debug("smc cs%d: setup/%08x pulse/%08x cycle/%08x mode/%08x\n", |
86 | cs, setup, pulse, cycle, mode); | 109 | cs, setup, pulse, cycle, mode); |