diff options
author | Dave Jones <davej@redhat.com> | 2006-12-12 17:41:41 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-12-12 17:41:41 -0500 |
commit | c4366889dda8110247be59ca41fddb82951a8c26 (patch) | |
tree | 705c1a996bed8fd48ce94ff33ec9fd00f9b94875 /arch/avr32 | |
parent | db2fb9db5735cc532fd4fc55e94b9a3c3750378e (diff) | |
parent | e1036502e5263851259d147771226161e5ccc85a (diff) |
Merge ../linus
Conflicts:
drivers/cpufreq/cpufreq.c
Diffstat (limited to 'arch/avr32')
34 files changed, 616 insertions, 546 deletions
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 5f1694eea842..bb059a4e1df9 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig | |||
@@ -45,6 +45,14 @@ config GENERIC_TIME | |||
45 | config RWSEM_XCHGADD_ALGORITHM | 45 | config RWSEM_XCHGADD_ALGORITHM |
46 | bool | 46 | bool |
47 | 47 | ||
48 | config ARCH_HAS_ILOG2_U32 | ||
49 | bool | ||
50 | default n | ||
51 | |||
52 | config ARCH_HAS_ILOG2_U64 | ||
53 | bool | ||
54 | default n | ||
55 | |||
48 | config GENERIC_BUST_SPINLOCK | 56 | config GENERIC_BUST_SPINLOCK |
49 | bool | 57 | bool |
50 | 58 | ||
diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile index cefc95a73980..7b842e98efed 100644 --- a/arch/avr32/Makefile +++ b/arch/avr32/Makefile | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | # Default target when executing plain make | 8 | # Default target when executing plain make |
9 | .PHONY: all | 9 | .PHONY: all |
10 | all: uImage vmlinux.elf linux.lst | 10 | all: uImage vmlinux.elf |
11 | 11 | ||
12 | KBUILD_DEFCONFIG := atstk1002_defconfig | 12 | KBUILD_DEFCONFIG := atstk1002_defconfig |
13 | 13 | ||
@@ -21,9 +21,7 @@ cpuflags-$(CONFIG_CPU_AP7000) += -mcpu=ap7000 | |||
21 | CFLAGS += $(cpuflags-y) | 21 | CFLAGS += $(cpuflags-y) |
22 | AFLAGS += $(cpuflags-y) | 22 | AFLAGS += $(cpuflags-y) |
23 | 23 | ||
24 | CHECKFLAGS += -D__avr32__ | 24 | CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN |
25 | |||
26 | LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | ||
27 | 25 | ||
28 | head-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/head.o | 26 | head-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/head.o |
29 | head-y += arch/avr32/kernel/head.o | 27 | head-y += arch/avr32/kernel/head.o |
@@ -32,7 +30,7 @@ core-$(CONFIG_BOARD_ATSTK1000) += arch/avr32/boards/atstk1000/ | |||
32 | core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/ | 30 | core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/ |
33 | core-y += arch/avr32/kernel/ | 31 | core-y += arch/avr32/kernel/ |
34 | core-y += arch/avr32/mm/ | 32 | core-y += arch/avr32/mm/ |
35 | libs-y += arch/avr32/lib/ #$(LIBGCC) | 33 | libs-y += arch/avr32/lib/ |
36 | 34 | ||
37 | archincdir-$(CONFIG_PLATFORM_AT32AP) := arch-at32ap | 35 | archincdir-$(CONFIG_PLATFORM_AT32AP) := arch-at32ap |
38 | 36 | ||
@@ -48,6 +46,8 @@ endif | |||
48 | 46 | ||
49 | archprepare: include/asm-avr32/.arch | 47 | archprepare: include/asm-avr32/.arch |
50 | 48 | ||
49 | CLEAN_FILES += include/asm-avr32/.arch include/asm-avr32/arch | ||
50 | |||
51 | BOOT_TARGETS := vmlinux.elf vmlinux.bin uImage uImage.srec | 51 | BOOT_TARGETS := vmlinux.elf vmlinux.bin uImage uImage.srec |
52 | 52 | ||
53 | .PHONY: $(BOOT_TARGETS) install | 53 | .PHONY: $(BOOT_TARGETS) install |
@@ -71,14 +71,19 @@ vmlinux.elf vmlinux.bin uImage.srec uImage vmlinux.cso: vmlinux | |||
71 | install: vmlinux | 71 | install: vmlinux |
72 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@ | 72 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@ |
73 | 73 | ||
74 | linux.s: vmlinux | 74 | vmlinux.s: vmlinux |
75 | $(call if_changed,disasm) | 75 | $(call if_changed,disasm) |
76 | 76 | ||
77 | linux.lst: vmlinux | 77 | vmlinux.lst: vmlinux |
78 | $(call if_changed,listing) | 78 | $(call if_changed,listing) |
79 | 79 | ||
80 | CLEAN_FILES += vmlinux.s vmlinux.lst | ||
81 | |||
82 | archclean: | ||
83 | $(Q)$(MAKE) $(clean)=$(boot) | ||
84 | |||
80 | define archhelp | 85 | define archhelp |
81 | @echo '* vmlinux.elf - ELF image with load address 0' | 86 | @echo '* vmlinux.elf - ELF image with load address 0' |
82 | @echo ' vmlinux.cso - PathFinder CSO image' | 87 | @echo ' vmlinux.cso - PathFinder CSO image' |
83 | @echo ' uImage - Create a bootable image for U-Boot' | 88 | @echo '* uImage - Create a bootable image for U-Boot' |
84 | endef | 89 | endef |
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index cced73c58115..32b361f31c2c 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -7,20 +7,83 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/clk.h> | ||
11 | #include <linux/etherdevice.h> | ||
10 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/string.h> | ||
16 | #include <linux/types.h> | ||
11 | 17 | ||
18 | #include <asm/io.h> | ||
19 | #include <asm/setup.h> | ||
12 | #include <asm/arch/board.h> | 20 | #include <asm/arch/board.h> |
13 | #include <asm/arch/init.h> | 21 | #include <asm/arch/init.h> |
14 | 22 | ||
15 | struct eth_platform_data __initdata eth0_data = { | 23 | struct eth_addr { |
16 | .valid = 1, | 24 | u8 addr[6]; |
17 | .mii_phy_addr = 0x10, | ||
18 | .is_rmii = 0, | ||
19 | .hw_addr = { 0x6a, 0x87, 0x71, 0x14, 0xcd, 0xcb }, | ||
20 | }; | 25 | }; |
21 | 26 | ||
27 | static struct eth_addr __initdata hw_addr[2]; | ||
28 | |||
29 | static struct eth_platform_data __initdata eth_data[2]; | ||
22 | extern struct lcdc_platform_data atstk1000_fb0_data; | 30 | extern struct lcdc_platform_data atstk1000_fb0_data; |
23 | 31 | ||
32 | /* | ||
33 | * The next two functions should go away as the boot loader is | ||
34 | * supposed to initialize the macb address registers with a valid | ||
35 | * ethernet address. But we need to keep it around for a while until | ||
36 | * we can be reasonably sure the boot loader does this. | ||
37 | * | ||
38 | * The phy_id is ignored as the driver will probe for it. | ||
39 | */ | ||
40 | static int __init parse_tag_ethernet(struct tag *tag) | ||
41 | { | ||
42 | int i; | ||
43 | |||
44 | i = tag->u.ethernet.mac_index; | ||
45 | if (i < ARRAY_SIZE(hw_addr)) | ||
46 | memcpy(hw_addr[i].addr, tag->u.ethernet.hw_address, | ||
47 | sizeof(hw_addr[i].addr)); | ||
48 | |||
49 | return 0; | ||
50 | } | ||
51 | __tagtable(ATAG_ETHERNET, parse_tag_ethernet); | ||
52 | |||
53 | static void __init set_hw_addr(struct platform_device *pdev) | ||
54 | { | ||
55 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
56 | const u8 *addr; | ||
57 | void __iomem *regs; | ||
58 | struct clk *pclk; | ||
59 | |||
60 | if (!res) | ||
61 | return; | ||
62 | if (pdev->id >= ARRAY_SIZE(hw_addr)) | ||
63 | return; | ||
64 | |||
65 | addr = hw_addr[pdev->id].addr; | ||
66 | if (!is_valid_ether_addr(addr)) | ||
67 | return; | ||
68 | |||
69 | /* | ||
70 | * Since this is board-specific code, we'll cheat and use the | ||
71 | * physical address directly as we happen to know that it's | ||
72 | * the same as the virtual address. | ||
73 | */ | ||
74 | regs = (void __iomem __force *)res->start; | ||
75 | pclk = clk_get(&pdev->dev, "pclk"); | ||
76 | if (!pclk) | ||
77 | return; | ||
78 | |||
79 | clk_enable(pclk); | ||
80 | __raw_writel((addr[3] << 24) | (addr[2] << 16) | ||
81 | | (addr[1] << 8) | addr[0], regs + 0x98); | ||
82 | __raw_writel((addr[5] << 8) | addr[4], regs + 0x9c); | ||
83 | clk_disable(pclk); | ||
84 | clk_put(pclk); | ||
85 | } | ||
86 | |||
24 | void __init setup_board(void) | 87 | void __init setup_board(void) |
25 | { | 88 | { |
26 | at32_map_usart(1, 0); /* /dev/ttyS0 */ | 89 | at32_map_usart(1, 0); /* /dev/ttyS0 */ |
@@ -38,7 +101,8 @@ static int __init atstk1002_init(void) | |||
38 | at32_add_device_usart(1); | 101 | at32_add_device_usart(1); |
39 | at32_add_device_usart(2); | 102 | at32_add_device_usart(2); |
40 | 103 | ||
41 | at32_add_device_eth(0, ð0_data); | 104 | set_hw_addr(at32_add_device_eth(0, ð_data[0])); |
105 | |||
42 | at32_add_device_spi(0); | 106 | at32_add_device_spi(0); |
43 | at32_add_device_lcdc(0, &atstk1000_fb0_data); | 107 | at32_add_device_lcdc(0, &atstk1000_fb0_data); |
44 | 108 | ||
diff --git a/arch/avr32/boards/atstk1000/setup.c b/arch/avr32/boards/atstk1000/setup.c index 191ab85de9a3..272c011802a7 100644 --- a/arch/avr32/boards/atstk1000/setup.c +++ b/arch/avr32/boards/atstk1000/setup.c | |||
@@ -21,15 +21,6 @@ struct tag *bootloader_tags __initdata; | |||
21 | 21 | ||
22 | struct lcdc_platform_data __initdata atstk1000_fb0_data; | 22 | struct lcdc_platform_data __initdata atstk1000_fb0_data; |
23 | 23 | ||
24 | asmlinkage void __init board_early_init(void) | ||
25 | { | ||
26 | extern void sdram_init(void); | ||
27 | |||
28 | #ifdef CONFIG_LOADER_STANDALONE | ||
29 | sdram_init(); | ||
30 | #endif | ||
31 | } | ||
32 | |||
33 | void __init board_setup_fbmem(unsigned long fbmem_start, | 24 | void __init board_setup_fbmem(unsigned long fbmem_start, |
34 | unsigned long fbmem_size) | 25 | unsigned long fbmem_size) |
35 | { | 26 | { |
diff --git a/arch/avr32/boot/images/Makefile b/arch/avr32/boot/images/Makefile index ccd74eeecec3..219720a47bf9 100644 --- a/arch/avr32/boot/images/Makefile +++ b/arch/avr32/boot/images/Makefile | |||
@@ -37,14 +37,12 @@ OBJCOPYFLAGS_vmlinux.elf := --change-section-lma .text-0x80000000 \ | |||
37 | --change-section-lma .data-0x80000000 \ | 37 | --change-section-lma .data-0x80000000 \ |
38 | --change-section-lma .init-0x80000000 \ | 38 | --change-section-lma .init-0x80000000 \ |
39 | --change-section-lma .bss-0x80000000 \ | 39 | --change-section-lma .bss-0x80000000 \ |
40 | --change-section-lma .initrd-0x80000000 \ | ||
41 | --change-section-lma __param-0x80000000 \ | 40 | --change-section-lma __param-0x80000000 \ |
42 | --change-section-lma __ksymtab-0x80000000 \ | 41 | --change-section-lma __ksymtab-0x80000000 \ |
43 | --change-section-lma __ksymtab_gpl-0x80000000 \ | 42 | --change-section-lma __ksymtab_gpl-0x80000000 \ |
44 | --change-section-lma __kcrctab-0x80000000 \ | 43 | --change-section-lma __kcrctab-0x80000000 \ |
45 | --change-section-lma __kcrctab_gpl-0x80000000 \ | 44 | --change-section-lma __kcrctab_gpl-0x80000000 \ |
46 | --change-section-lma __ksymtab_strings-0x80000000 \ | 45 | --change-section-lma __ksymtab_strings-0x80000000 \ |
47 | --change-section-lma .got-0x80000000 \ | ||
48 | --set-start 0xa0000000 | 46 | --set-start 0xa0000000 |
49 | $(obj)/vmlinux.elf: vmlinux FORCE | 47 | $(obj)/vmlinux.elf: vmlinux FORCE |
50 | $(call if_changed,objcopy) | 48 | $(call if_changed,objcopy) |
@@ -59,4 +57,4 @@ install: $(BOOTIMAGE) | |||
59 | sh $(srctree)/install-kernel.sh $< | 57 | sh $(srctree)/install-kernel.sh $< |
60 | 58 | ||
61 | # Generated files to be removed upon make clean | 59 | # Generated files to be removed upon make clean |
62 | clean-files := vmlinux* uImage uImage.srec | 60 | clean-files := vmlinux.elf vmlinux.bin vmlinux.gz uImage uImage.srec |
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig index 6c2c5e00dfc7..ae92a14ef9a0 100644 --- a/arch/avr32/configs/atstk1002_defconfig +++ b/arch/avr32/configs/atstk1002_defconfig | |||
@@ -1,13 +1,14 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.18-rc1 | 3 | # Linux kernel version: 2.6.19-rc2 |
4 | # Tue Jul 11 12:41:36 2006 | 4 | # Fri Oct 20 11:52:37 2006 |
5 | # | 5 | # |
6 | CONFIG_AVR32=y | 6 | CONFIG_AVR32=y |
7 | CONFIG_GENERIC_HARDIRQS=y | 7 | CONFIG_GENERIC_HARDIRQS=y |
8 | CONFIG_HARDIRQS_SW_RESEND=y | 8 | CONFIG_HARDIRQS_SW_RESEND=y |
9 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
10 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 10 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
11 | CONFIG_GENERIC_TIME=y | ||
11 | CONFIG_GENERIC_HWEIGHT=y | 12 | CONFIG_GENERIC_HWEIGHT=y |
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 13 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
13 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 14 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
@@ -25,16 +26,23 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
25 | CONFIG_LOCALVERSION="" | 26 | CONFIG_LOCALVERSION="" |
26 | # CONFIG_LOCALVERSION_AUTO is not set | 27 | # CONFIG_LOCALVERSION_AUTO is not set |
27 | CONFIG_SWAP=y | 28 | CONFIG_SWAP=y |
28 | # CONFIG_SYSVIPC is not set | 29 | CONFIG_SYSVIPC=y |
29 | # CONFIG_POSIX_MQUEUE is not set | 30 | # CONFIG_IPC_NS is not set |
30 | # CONFIG_BSD_PROCESS_ACCT is not set | 31 | CONFIG_POSIX_MQUEUE=y |
31 | CONFIG_SYSCTL=y | 32 | CONFIG_BSD_PROCESS_ACCT=y |
32 | # CONFIG_AUDIT is not set | 33 | CONFIG_BSD_PROCESS_ACCT_V3=y |
34 | CONFIG_TASKSTATS=y | ||
35 | CONFIG_TASK_DELAY_ACCT=y | ||
36 | # CONFIG_UTS_NS is not set | ||
37 | CONFIG_AUDIT=y | ||
33 | # CONFIG_IKCONFIG is not set | 38 | # CONFIG_IKCONFIG is not set |
34 | # CONFIG_RELAY is not set | 39 | CONFIG_RELAY=y |
35 | CONFIG_INITRAMFS_SOURCE="" | 40 | CONFIG_INITRAMFS_SOURCE="" |
36 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 41 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
42 | # CONFIG_TASK_XACCT is not set | ||
43 | CONFIG_SYSCTL=y | ||
37 | CONFIG_EMBEDDED=y | 44 | CONFIG_EMBEDDED=y |
45 | # CONFIG_SYSCTL_SYSCALL is not set | ||
38 | CONFIG_KALLSYMS=y | 46 | CONFIG_KALLSYMS=y |
39 | # CONFIG_KALLSYMS_ALL is not set | 47 | # CONFIG_KALLSYMS_ALL is not set |
40 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 48 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -43,14 +51,15 @@ CONFIG_PRINTK=y | |||
43 | CONFIG_BUG=y | 51 | CONFIG_BUG=y |
44 | CONFIG_ELF_CORE=y | 52 | CONFIG_ELF_CORE=y |
45 | # CONFIG_BASE_FULL is not set | 53 | # CONFIG_BASE_FULL is not set |
46 | # CONFIG_FUTEX is not set | 54 | CONFIG_FUTEX=y |
47 | # CONFIG_EPOLL is not set | 55 | CONFIG_EPOLL=y |
48 | CONFIG_SHMEM=y | 56 | CONFIG_SHMEM=y |
49 | # CONFIG_SLAB is not set | 57 | CONFIG_SLAB=y |
50 | # CONFIG_VM_EVENT_COUNTERS is not set | 58 | CONFIG_VM_EVENT_COUNTERS=y |
59 | CONFIG_RT_MUTEXES=y | ||
51 | # CONFIG_TINY_SHMEM is not set | 60 | # CONFIG_TINY_SHMEM is not set |
52 | CONFIG_BASE_SMALL=1 | 61 | CONFIG_BASE_SMALL=1 |
53 | CONFIG_SLOB=y | 62 | # CONFIG_SLOB is not set |
54 | 63 | ||
55 | # | 64 | # |
56 | # Loadable module support | 65 | # Loadable module support |
@@ -65,6 +74,7 @@ CONFIG_MODULE_UNLOAD=y | |||
65 | # | 74 | # |
66 | # Block layer | 75 | # Block layer |
67 | # | 76 | # |
77 | CONFIG_BLOCK=y | ||
68 | # CONFIG_BLK_DEV_IO_TRACE is not set | 78 | # CONFIG_BLK_DEV_IO_TRACE is not set |
69 | 79 | ||
70 | # | 80 | # |
@@ -166,10 +176,12 @@ CONFIG_IP_PNP_DHCP=y | |||
166 | # CONFIG_INET_TUNNEL is not set | 176 | # CONFIG_INET_TUNNEL is not set |
167 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | 177 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set |
168 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | 178 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set |
179 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
169 | CONFIG_INET_DIAG=y | 180 | CONFIG_INET_DIAG=y |
170 | CONFIG_INET_TCP_DIAG=y | 181 | CONFIG_INET_TCP_DIAG=y |
171 | # CONFIG_TCP_CONG_ADVANCED is not set | 182 | # CONFIG_TCP_CONG_ADVANCED is not set |
172 | CONFIG_TCP_CONG_BIC=y | 183 | CONFIG_TCP_CONG_CUBIC=y |
184 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
173 | # CONFIG_IPV6 is not set | 185 | # CONFIG_IPV6 is not set |
174 | # CONFIG_INET6_XFRM_TUNNEL is not set | 186 | # CONFIG_INET6_XFRM_TUNNEL is not set |
175 | # CONFIG_INET6_TUNNEL is not set | 187 | # CONFIG_INET6_TUNNEL is not set |
@@ -199,7 +211,6 @@ CONFIG_TCP_CONG_BIC=y | |||
199 | # CONFIG_ATALK is not set | 211 | # CONFIG_ATALK is not set |
200 | # CONFIG_X25 is not set | 212 | # CONFIG_X25 is not set |
201 | # CONFIG_LAPB is not set | 213 | # CONFIG_LAPB is not set |
202 | # CONFIG_NET_DIVERT is not set | ||
203 | # CONFIG_ECONET is not set | 214 | # CONFIG_ECONET is not set |
204 | # CONFIG_WAN_ROUTER is not set | 215 | # CONFIG_WAN_ROUTER is not set |
205 | 216 | ||
@@ -212,7 +223,6 @@ CONFIG_TCP_CONG_BIC=y | |||
212 | # Network testing | 223 | # Network testing |
213 | # | 224 | # |
214 | # CONFIG_NET_PKTGEN is not set | 225 | # CONFIG_NET_PKTGEN is not set |
215 | # CONFIG_NET_TCPPROBE is not set | ||
216 | # CONFIG_HAMRADIO is not set | 226 | # CONFIG_HAMRADIO is not set |
217 | # CONFIG_IRDA is not set | 227 | # CONFIG_IRDA is not set |
218 | # CONFIG_BT is not set | 228 | # CONFIG_BT is not set |
@@ -239,7 +249,84 @@ CONFIG_STANDALONE=y | |||
239 | # | 249 | # |
240 | # Memory Technology Devices (MTD) | 250 | # Memory Technology Devices (MTD) |
241 | # | 251 | # |
242 | # CONFIG_MTD is not set | 252 | CONFIG_MTD=y |
253 | # CONFIG_MTD_DEBUG is not set | ||
254 | # CONFIG_MTD_CONCAT is not set | ||
255 | CONFIG_MTD_PARTITIONS=y | ||
256 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
257 | CONFIG_MTD_CMDLINE_PARTS=y | ||
258 | |||
259 | # | ||
260 | # User Modules And Translation Layers | ||
261 | # | ||
262 | CONFIG_MTD_CHAR=y | ||
263 | CONFIG_MTD_BLOCK=y | ||
264 | # CONFIG_FTL is not set | ||
265 | # CONFIG_NFTL is not set | ||
266 | # CONFIG_INFTL is not set | ||
267 | # CONFIG_RFD_FTL is not set | ||
268 | # CONFIG_SSFDC is not set | ||
269 | |||
270 | # | ||
271 | # RAM/ROM/Flash chip drivers | ||
272 | # | ||
273 | CONFIG_MTD_CFI=y | ||
274 | # CONFIG_MTD_JEDECPROBE is not set | ||
275 | CONFIG_MTD_GEN_PROBE=y | ||
276 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
277 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
278 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
279 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
280 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
281 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
282 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
283 | CONFIG_MTD_CFI_I1=y | ||
284 | CONFIG_MTD_CFI_I2=y | ||
285 | # CONFIG_MTD_CFI_I4 is not set | ||
286 | # CONFIG_MTD_CFI_I8 is not set | ||
287 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
288 | CONFIG_MTD_CFI_AMDSTD=y | ||
289 | # CONFIG_MTD_CFI_STAA is not set | ||
290 | CONFIG_MTD_CFI_UTIL=y | ||
291 | # CONFIG_MTD_RAM is not set | ||
292 | # CONFIG_MTD_ROM is not set | ||
293 | # CONFIG_MTD_ABSENT is not set | ||
294 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
295 | |||
296 | # | ||
297 | # Mapping drivers for chip access | ||
298 | # | ||
299 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
300 | CONFIG_MTD_PHYSMAP=y | ||
301 | CONFIG_MTD_PHYSMAP_START=0x8000000 | ||
302 | CONFIG_MTD_PHYSMAP_LEN=0x0 | ||
303 | CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | ||
304 | # CONFIG_MTD_PLATRAM is not set | ||
305 | |||
306 | # | ||
307 | # Self-contained MTD device drivers | ||
308 | # | ||
309 | # CONFIG_MTD_SLRAM is not set | ||
310 | # CONFIG_MTD_PHRAM is not set | ||
311 | # CONFIG_MTD_MTDRAM is not set | ||
312 | # CONFIG_MTD_BLOCK2MTD is not set | ||
313 | |||
314 | # | ||
315 | # Disk-On-Chip Device Drivers | ||
316 | # | ||
317 | # CONFIG_MTD_DOC2000 is not set | ||
318 | # CONFIG_MTD_DOC2001 is not set | ||
319 | # CONFIG_MTD_DOC2001PLUS is not set | ||
320 | |||
321 | # | ||
322 | # NAND Flash Device Drivers | ||
323 | # | ||
324 | # CONFIG_MTD_NAND is not set | ||
325 | |||
326 | # | ||
327 | # OneNAND Flash Device Drivers | ||
328 | # | ||
329 | # CONFIG_MTD_ONENAND is not set | ||
243 | 330 | ||
244 | # | 331 | # |
245 | # Parallel port support | 332 | # Parallel port support |
@@ -260,11 +347,18 @@ CONFIG_BLK_DEV_NBD=m | |||
260 | CONFIG_BLK_DEV_RAM=m | 347 | CONFIG_BLK_DEV_RAM=m |
261 | CONFIG_BLK_DEV_RAM_COUNT=16 | 348 | CONFIG_BLK_DEV_RAM_COUNT=16 |
262 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 349 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
350 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
263 | CONFIG_BLK_DEV_INITRD=y | 351 | CONFIG_BLK_DEV_INITRD=y |
264 | # CONFIG_CDROM_PKTCDVD is not set | 352 | # CONFIG_CDROM_PKTCDVD is not set |
265 | # CONFIG_ATA_OVER_ETH is not set | 353 | # CONFIG_ATA_OVER_ETH is not set |
266 | 354 | ||
267 | # | 355 | # |
356 | # Misc devices | ||
357 | # | ||
358 | # CONFIG_SGI_IOC4 is not set | ||
359 | # CONFIG_TIFM_CORE is not set | ||
360 | |||
361 | # | ||
268 | # ATA/ATAPI/MFM/RLL support | 362 | # ATA/ATAPI/MFM/RLL support |
269 | # | 363 | # |
270 | # CONFIG_IDE is not set | 364 | # CONFIG_IDE is not set |
@@ -274,6 +368,12 @@ CONFIG_BLK_DEV_INITRD=y | |||
274 | # | 368 | # |
275 | # CONFIG_RAID_ATTRS is not set | 369 | # CONFIG_RAID_ATTRS is not set |
276 | # CONFIG_SCSI is not set | 370 | # CONFIG_SCSI is not set |
371 | # CONFIG_SCSI_NETLINK is not set | ||
372 | |||
373 | # | ||
374 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
375 | # | ||
376 | # CONFIG_ATA is not set | ||
277 | 377 | ||
278 | # | 378 | # |
279 | # Multi-device support (RAID and LVM) | 379 | # Multi-device support (RAID and LVM) |
@@ -305,14 +405,11 @@ CONFIG_TUN=m | |||
305 | # | 405 | # |
306 | # PHY device support | 406 | # PHY device support |
307 | # | 407 | # |
308 | # CONFIG_PHYLIB is not set | ||
309 | 408 | ||
310 | # | 409 | # |
311 | # Ethernet (10 or 100Mbit) | 410 | # Ethernet (10 or 100Mbit) |
312 | # | 411 | # |
313 | CONFIG_NET_ETHERNET=y | 412 | # CONFIG_NET_ETHERNET is not set |
314 | CONFIG_MII=y | ||
315 | CONFIG_MACB=y | ||
316 | 413 | ||
317 | # | 414 | # |
318 | # Ethernet (1000 Mbit) | 415 | # Ethernet (1000 Mbit) |
@@ -341,10 +438,11 @@ CONFIG_PPP=m | |||
341 | CONFIG_PPP_ASYNC=m | 438 | CONFIG_PPP_ASYNC=m |
342 | # CONFIG_PPP_SYNC_TTY is not set | 439 | # CONFIG_PPP_SYNC_TTY is not set |
343 | CONFIG_PPP_DEFLATE=m | 440 | CONFIG_PPP_DEFLATE=m |
344 | # CONFIG_PPP_BSDCOMP is not set | 441 | CONFIG_PPP_BSDCOMP=m |
345 | # CONFIG_PPP_MPPE is not set | 442 | # CONFIG_PPP_MPPE is not set |
346 | # CONFIG_PPPOE is not set | 443 | # CONFIG_PPPOE is not set |
347 | # CONFIG_SLIP is not set | 444 | # CONFIG_SLIP is not set |
445 | CONFIG_SLHC=m | ||
348 | # CONFIG_SHAPER is not set | 446 | # CONFIG_SHAPER is not set |
349 | # CONFIG_NETCONSOLE is not set | 447 | # CONFIG_NETCONSOLE is not set |
350 | # CONFIG_NETPOLL is not set | 448 | # CONFIG_NETPOLL is not set |
@@ -417,7 +515,6 @@ CONFIG_UNIX98_PTYS=y | |||
417 | # TPM devices | 515 | # TPM devices |
418 | # | 516 | # |
419 | # CONFIG_TCG_TPM is not set | 517 | # CONFIG_TCG_TPM is not set |
420 | # CONFIG_TELCLOCK is not set | ||
421 | 518 | ||
422 | # | 519 | # |
423 | # I2C support | 520 | # I2C support |
@@ -427,23 +524,13 @@ CONFIG_UNIX98_PTYS=y | |||
427 | # | 524 | # |
428 | # SPI support | 525 | # SPI support |
429 | # | 526 | # |
430 | CONFIG_SPI=y | 527 | # CONFIG_SPI is not set |
431 | # CONFIG_SPI_DEBUG is not set | 528 | # CONFIG_SPI_MASTER is not set |
432 | CONFIG_SPI_MASTER=y | ||
433 | |||
434 | # | ||
435 | # SPI Master Controller Drivers | ||
436 | # | ||
437 | CONFIG_SPI_ATMEL=m | ||
438 | # CONFIG_SPI_BITBANG is not set | ||
439 | |||
440 | # | ||
441 | # SPI Protocol Masters | ||
442 | # | ||
443 | 529 | ||
444 | # | 530 | # |
445 | # Dallas's 1-wire bus | 531 | # Dallas's 1-wire bus |
446 | # | 532 | # |
533 | # CONFIG_W1 is not set | ||
447 | 534 | ||
448 | # | 535 | # |
449 | # Hardware Monitoring support | 536 | # Hardware Monitoring support |
@@ -452,14 +539,9 @@ CONFIG_SPI_ATMEL=m | |||
452 | # CONFIG_HWMON_VID is not set | 539 | # CONFIG_HWMON_VID is not set |
453 | 540 | ||
454 | # | 541 | # |
455 | # Misc devices | ||
456 | # | ||
457 | |||
458 | # | ||
459 | # Multimedia devices | 542 | # Multimedia devices |
460 | # | 543 | # |
461 | # CONFIG_VIDEO_DEV is not set | 544 | # CONFIG_VIDEO_DEV is not set |
462 | CONFIG_VIDEO_V4L2=y | ||
463 | 545 | ||
464 | # | 546 | # |
465 | # Digital Video Broadcasting Devices | 547 | # Digital Video Broadcasting Devices |
@@ -470,28 +552,8 @@ CONFIG_VIDEO_V4L2=y | |||
470 | # Graphics support | 552 | # Graphics support |
471 | # | 553 | # |
472 | # CONFIG_FIRMWARE_EDID is not set | 554 | # CONFIG_FIRMWARE_EDID is not set |
473 | CONFIG_FB=m | 555 | # CONFIG_FB is not set |
474 | CONFIG_FB_CFB_FILLRECT=m | 556 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
475 | CONFIG_FB_CFB_COPYAREA=m | ||
476 | CONFIG_FB_CFB_IMAGEBLIT=m | ||
477 | # CONFIG_FB_MACMODES is not set | ||
478 | # CONFIG_FB_BACKLIGHT is not set | ||
479 | # CONFIG_FB_MODE_HELPERS is not set | ||
480 | # CONFIG_FB_TILEBLITTING is not set | ||
481 | CONFIG_FB_SIDSA=m | ||
482 | CONFIG_FB_SIDSA_DEFAULT_BPP=24 | ||
483 | # CONFIG_FB_S1D13XXX is not set | ||
484 | # CONFIG_FB_VIRTUAL is not set | ||
485 | |||
486 | # | ||
487 | # Logo configuration | ||
488 | # | ||
489 | # CONFIG_LOGO is not set | ||
490 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
491 | # CONFIG_BACKLIGHT_CLASS_DEVICE is not set | ||
492 | CONFIG_LCD_CLASS_DEVICE=m | ||
493 | CONFIG_LCD_DEVICE=y | ||
494 | CONFIG_LCD_LTV350QV=m | ||
495 | 557 | ||
496 | # | 558 | # |
497 | # Sound | 559 | # Sound |
@@ -561,18 +623,21 @@ CONFIG_LCD_LTV350QV=m | |||
561 | # | 623 | # |
562 | # File systems | 624 | # File systems |
563 | # | 625 | # |
564 | CONFIG_EXT2_FS=y | 626 | CONFIG_EXT2_FS=m |
565 | # CONFIG_EXT2_FS_XATTR is not set | 627 | # CONFIG_EXT2_FS_XATTR is not set |
566 | # CONFIG_EXT2_FS_XIP is not set | 628 | # CONFIG_EXT2_FS_XIP is not set |
567 | # CONFIG_EXT3_FS is not set | 629 | # CONFIG_EXT3_FS is not set |
630 | # CONFIG_EXT4DEV_FS is not set | ||
568 | # CONFIG_REISERFS_FS is not set | 631 | # CONFIG_REISERFS_FS is not set |
569 | # CONFIG_JFS_FS is not set | 632 | # CONFIG_JFS_FS is not set |
570 | # CONFIG_FS_POSIX_ACL is not set | 633 | # CONFIG_FS_POSIX_ACL is not set |
571 | # CONFIG_XFS_FS is not set | 634 | # CONFIG_XFS_FS is not set |
635 | # CONFIG_GFS2_FS is not set | ||
572 | # CONFIG_OCFS2_FS is not set | 636 | # CONFIG_OCFS2_FS is not set |
573 | CONFIG_MINIX_FS=m | 637 | CONFIG_MINIX_FS=m |
574 | CONFIG_ROMFS_FS=m | 638 | # CONFIG_ROMFS_FS is not set |
575 | # CONFIG_INOTIFY is not set | 639 | CONFIG_INOTIFY=y |
640 | CONFIG_INOTIFY_USER=y | ||
576 | # CONFIG_QUOTA is not set | 641 | # CONFIG_QUOTA is not set |
577 | # CONFIG_DNOTIFY is not set | 642 | # CONFIG_DNOTIFY is not set |
578 | # CONFIG_AUTOFS_FS is not set | 643 | # CONFIG_AUTOFS_FS is not set |
@@ -600,8 +665,10 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
600 | # | 665 | # |
601 | CONFIG_PROC_FS=y | 666 | CONFIG_PROC_FS=y |
602 | CONFIG_PROC_KCORE=y | 667 | CONFIG_PROC_KCORE=y |
668 | CONFIG_PROC_SYSCTL=y | ||
603 | CONFIG_SYSFS=y | 669 | CONFIG_SYSFS=y |
604 | CONFIG_TMPFS=y | 670 | CONFIG_TMPFS=y |
671 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
605 | # CONFIG_HUGETLB_PAGE is not set | 672 | # CONFIG_HUGETLB_PAGE is not set |
606 | CONFIG_RAMFS=y | 673 | CONFIG_RAMFS=y |
607 | CONFIG_CONFIGFS_FS=m | 674 | CONFIG_CONFIGFS_FS=m |
@@ -616,6 +683,16 @@ CONFIG_CONFIGFS_FS=m | |||
616 | # CONFIG_BEFS_FS is not set | 683 | # CONFIG_BEFS_FS is not set |
617 | # CONFIG_BFS_FS is not set | 684 | # CONFIG_BFS_FS is not set |
618 | # CONFIG_EFS_FS is not set | 685 | # CONFIG_EFS_FS is not set |
686 | # CONFIG_JFFS_FS is not set | ||
687 | CONFIG_JFFS2_FS=y | ||
688 | CONFIG_JFFS2_FS_DEBUG=0 | ||
689 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
690 | # CONFIG_JFFS2_SUMMARY is not set | ||
691 | # CONFIG_JFFS2_FS_XATTR is not set | ||
692 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
693 | CONFIG_JFFS2_ZLIB=y | ||
694 | CONFIG_JFFS2_RTIME=y | ||
695 | # CONFIG_JFFS2_RUBIN is not set | ||
619 | # CONFIG_CRAMFS is not set | 696 | # CONFIG_CRAMFS is not set |
620 | # CONFIG_VXFS_FS is not set | 697 | # CONFIG_VXFS_FS is not set |
621 | # CONFIG_HPFS_FS is not set | 698 | # CONFIG_HPFS_FS is not set |
@@ -626,26 +703,10 @@ CONFIG_CONFIGFS_FS=m | |||
626 | # | 703 | # |
627 | # Network File Systems | 704 | # Network File Systems |
628 | # | 705 | # |
629 | CONFIG_NFS_FS=y | 706 | # CONFIG_NFS_FS is not set |
630 | CONFIG_NFS_V3=y | ||
631 | # CONFIG_NFS_V3_ACL is not set | ||
632 | # CONFIG_NFS_V4 is not set | ||
633 | # CONFIG_NFS_DIRECTIO is not set | ||
634 | # CONFIG_NFSD is not set | 707 | # CONFIG_NFSD is not set |
635 | CONFIG_ROOT_NFS=y | ||
636 | CONFIG_LOCKD=y | ||
637 | CONFIG_LOCKD_V4=y | ||
638 | CONFIG_NFS_COMMON=y | ||
639 | CONFIG_SUNRPC=y | ||
640 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
641 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
642 | # CONFIG_SMB_FS is not set | 708 | # CONFIG_SMB_FS is not set |
643 | CONFIG_CIFS=m | 709 | # CONFIG_CIFS is not set |
644 | # CONFIG_CIFS_STATS is not set | ||
645 | # CONFIG_CIFS_WEAK_PW_HASH is not set | ||
646 | # CONFIG_CIFS_XATTR is not set | ||
647 | # CONFIG_CIFS_DEBUG2 is not set | ||
648 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
649 | # CONFIG_NCP_FS is not set | 710 | # CONFIG_NCP_FS is not set |
650 | # CONFIG_CODA_FS is not set | 711 | # CONFIG_CODA_FS is not set |
651 | # CONFIG_AFS_FS is not set | 712 | # CONFIG_AFS_FS is not set |
@@ -665,7 +726,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
665 | CONFIG_NLS_CODEPAGE_437=m | 726 | CONFIG_NLS_CODEPAGE_437=m |
666 | # CONFIG_NLS_CODEPAGE_737 is not set | 727 | # CONFIG_NLS_CODEPAGE_737 is not set |
667 | # CONFIG_NLS_CODEPAGE_775 is not set | 728 | # CONFIG_NLS_CODEPAGE_775 is not set |
668 | CONFIG_NLS_CODEPAGE_850=m | 729 | # CONFIG_NLS_CODEPAGE_850 is not set |
669 | # CONFIG_NLS_CODEPAGE_852 is not set | 730 | # CONFIG_NLS_CODEPAGE_852 is not set |
670 | # CONFIG_NLS_CODEPAGE_855 is not set | 731 | # CONFIG_NLS_CODEPAGE_855 is not set |
671 | # CONFIG_NLS_CODEPAGE_857 is not set | 732 | # CONFIG_NLS_CODEPAGE_857 is not set |
@@ -705,13 +766,17 @@ CONFIG_NLS_UTF8=m | |||
705 | # Kernel hacking | 766 | # Kernel hacking |
706 | # | 767 | # |
707 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | 768 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y |
708 | CONFIG_PRINTK_TIME=y | 769 | # CONFIG_PRINTK_TIME is not set |
770 | CONFIG_ENABLE_MUST_CHECK=y | ||
709 | CONFIG_MAGIC_SYSRQ=y | 771 | CONFIG_MAGIC_SYSRQ=y |
710 | # CONFIG_UNUSED_SYMBOLS is not set | 772 | # CONFIG_UNUSED_SYMBOLS is not set |
711 | CONFIG_DEBUG_KERNEL=y | 773 | CONFIG_DEBUG_KERNEL=y |
712 | CONFIG_LOG_BUF_SHIFT=14 | 774 | CONFIG_LOG_BUF_SHIFT=14 |
713 | CONFIG_DETECT_SOFTLOCKUP=y | 775 | CONFIG_DETECT_SOFTLOCKUP=y |
714 | # CONFIG_SCHEDSTATS is not set | 776 | # CONFIG_SCHEDSTATS is not set |
777 | # CONFIG_DEBUG_SLAB is not set | ||
778 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
779 | # CONFIG_RT_MUTEX_TESTER is not set | ||
715 | # CONFIG_DEBUG_SPINLOCK is not set | 780 | # CONFIG_DEBUG_SPINLOCK is not set |
716 | # CONFIG_DEBUG_MUTEXES is not set | 781 | # CONFIG_DEBUG_MUTEXES is not set |
717 | # CONFIG_DEBUG_RWSEMS is not set | 782 | # CONFIG_DEBUG_RWSEMS is not set |
@@ -722,11 +787,13 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
722 | # CONFIG_DEBUG_INFO is not set | 787 | # CONFIG_DEBUG_INFO is not set |
723 | CONFIG_DEBUG_FS=y | 788 | CONFIG_DEBUG_FS=y |
724 | # CONFIG_DEBUG_VM is not set | 789 | # CONFIG_DEBUG_VM is not set |
790 | # CONFIG_DEBUG_LIST is not set | ||
725 | CONFIG_FRAME_POINTER=y | 791 | CONFIG_FRAME_POINTER=y |
726 | # CONFIG_UNWIND_INFO is not set | 792 | # CONFIG_UNWIND_INFO is not set |
727 | CONFIG_FORCED_INLINING=y | 793 | CONFIG_FORCED_INLINING=y |
794 | # CONFIG_HEADERS_CHECK is not set | ||
728 | # CONFIG_RCU_TORTURE_TEST is not set | 795 | # CONFIG_RCU_TORTURE_TEST is not set |
729 | CONFIG_KPROBES=y | 796 | # CONFIG_KPROBES is not set |
730 | 797 | ||
731 | # | 798 | # |
732 | # Security options | 799 | # Security options |
@@ -740,15 +807,13 @@ CONFIG_KPROBES=y | |||
740 | # CONFIG_CRYPTO is not set | 807 | # CONFIG_CRYPTO is not set |
741 | 808 | ||
742 | # | 809 | # |
743 | # Hardware crypto devices | ||
744 | # | ||
745 | |||
746 | # | ||
747 | # Library routines | 810 | # Library routines |
748 | # | 811 | # |
749 | CONFIG_CRC_CCITT=m | 812 | CONFIG_CRC_CCITT=m |
750 | # CONFIG_CRC16 is not set | 813 | # CONFIG_CRC16 is not set |
751 | CONFIG_CRC32=m | 814 | CONFIG_CRC32=y |
752 | # CONFIG_LIBCRC32C is not set | 815 | # CONFIG_LIBCRC32C is not set |
753 | CONFIG_ZLIB_INFLATE=m | 816 | CONFIG_AUDIT_GENERIC=y |
754 | CONFIG_ZLIB_DEFLATE=m | 817 | CONFIG_ZLIB_INFLATE=y |
818 | CONFIG_ZLIB_DEFLATE=y | ||
819 | CONFIG_PLIST=y | ||
diff --git a/arch/avr32/kernel/avr32_ksyms.c b/arch/avr32/kernel/avr32_ksyms.c index 04f767a272b7..7c4c76114bba 100644 --- a/arch/avr32/kernel/avr32_ksyms.c +++ b/arch/avr32/kernel/avr32_ksyms.c | |||
@@ -7,11 +7,12 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/delay.h> | ||
11 | #include <linux/io.h> | ||
10 | #include <linux/module.h> | 12 | #include <linux/module.h> |
11 | 13 | ||
12 | #include <asm/checksum.h> | 14 | #include <asm/checksum.h> |
13 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
14 | #include <asm/delay.h> | ||
15 | 16 | ||
16 | /* | 17 | /* |
17 | * GCC functions | 18 | * GCC functions |
@@ -53,3 +54,11 @@ EXPORT_SYMBOL(find_next_zero_bit); | |||
53 | EXPORT_SYMBOL(find_first_bit); | 54 | EXPORT_SYMBOL(find_first_bit); |
54 | EXPORT_SYMBOL(find_next_bit); | 55 | EXPORT_SYMBOL(find_next_bit); |
55 | EXPORT_SYMBOL(generic_find_next_zero_le_bit); | 56 | EXPORT_SYMBOL(generic_find_next_zero_le_bit); |
57 | |||
58 | /* I/O primitives (lib/io-*.S) */ | ||
59 | EXPORT_SYMBOL(__raw_readsb); | ||
60 | EXPORT_SYMBOL(__raw_readsw); | ||
61 | EXPORT_SYMBOL(__raw_readsl); | ||
62 | EXPORT_SYMBOL(__raw_writesb); | ||
63 | EXPORT_SYMBOL(__raw_writesw); | ||
64 | EXPORT_SYMBOL(__raw_writesl); | ||
diff --git a/arch/avr32/kernel/head.S b/arch/avr32/kernel/head.S index 773b7ad87be9..6163bd0acb95 100644 --- a/arch/avr32/kernel/head.S +++ b/arch/avr32/kernel/head.S | |||
@@ -30,9 +30,6 @@ kernel_entry: | |||
30 | mov r7, 0 | 30 | mov r7, 0 |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | /* Set up the PIO, SDRAM controller, early printk, etc. */ | ||
34 | rcall board_early_init | ||
35 | |||
36 | /* Start the show */ | 33 | /* Start the show */ |
37 | lddpc pc, kernel_start_addr | 34 | lddpc pc, kernel_start_addr |
38 | 35 | ||
diff --git a/arch/avr32/kernel/kprobes.c b/arch/avr32/kernel/kprobes.c index 6caf9e8d8080..d0abbcaf1c1e 100644 --- a/arch/avr32/kernel/kprobes.c +++ b/arch/avr32/kernel/kprobes.c | |||
@@ -109,7 +109,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) | |||
109 | void *addr = (void *)regs->pc; | 109 | void *addr = (void *)regs->pc; |
110 | int ret = 0; | 110 | int ret = 0; |
111 | 111 | ||
112 | pr_debug("kprobe_handler: kprobe_running=%d\n", | 112 | pr_debug("kprobe_handler: kprobe_running=%p\n", |
113 | kprobe_running()); | 113 | kprobe_running()); |
114 | 114 | ||
115 | /* | 115 | /* |
@@ -154,6 +154,7 @@ ss_probe: | |||
154 | return 1; | 154 | return 1; |
155 | 155 | ||
156 | no_kprobe: | 156 | no_kprobe: |
157 | preempt_enable_no_resched(); | ||
157 | return ret; | 158 | return ret; |
158 | } | 159 | } |
159 | 160 | ||
diff --git a/arch/avr32/kernel/module.c b/arch/avr32/kernel/module.c index dfc32f2817b6..b599eae64576 100644 --- a/arch/avr32/kernel/module.c +++ b/arch/avr32/kernel/module.c | |||
@@ -263,7 +263,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, | |||
263 | * value of PC. Just subtract the value of | 263 | * value of PC. Just subtract the value of |
264 | * GOT, and we're done. | 264 | * GOT, and we're done. |
265 | */ | 265 | */ |
266 | pr_debug("GOTPC: PC=0x%lx, got_offset=0x%lx, core=0x%p\n", | 266 | pr_debug("GOTPC: PC=0x%x, got_offset=0x%lx, core=0x%p\n", |
267 | relocation, module->arch.got_offset, | 267 | relocation, module->arch.got_offset, |
268 | module->module_core); | 268 | module->module_core); |
269 | relocation -= ((unsigned long)module->module_core | 269 | relocation -= ((unsigned long)module->module_core |
@@ -282,7 +282,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, | |||
282 | && (relocation & 0xffff0000) != 0xffff0000) | 282 | && (relocation & 0xffff0000) != 0xffff0000) |
283 | return reloc_overflow(module, "R_AVR32_GOT16S", | 283 | return reloc_overflow(module, "R_AVR32_GOT16S", |
284 | relocation); | 284 | relocation); |
285 | pr_debug("GOT reloc @ 0x%lx -> %lu\n", | 285 | pr_debug("GOT reloc @ 0x%x -> %u\n", |
286 | rel->r_offset, relocation); | 286 | rel->r_offset, relocation); |
287 | value = *location; | 287 | value = *location; |
288 | value = ((value & 0xffff0000) | 288 | value = ((value & 0xffff0000) |
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 317dc50945f2..0b4325946a41 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c | |||
@@ -38,6 +38,13 @@ void cpu_idle(void) | |||
38 | 38 | ||
39 | void machine_halt(void) | 39 | void machine_halt(void) |
40 | { | 40 | { |
41 | /* | ||
42 | * Enter Stop mode. The 32 kHz oscillator will keep running so | ||
43 | * the RTC will keep the time properly and the system will | ||
44 | * boot quickly. | ||
45 | */ | ||
46 | asm volatile("sleep 3\n\t" | ||
47 | "sub pc, -2"); | ||
41 | } | 48 | } |
42 | 49 | ||
43 | void machine_power_off(void) | 50 | void machine_power_off(void) |
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c index 3c89e59029ab..f2e81cd79002 100644 --- a/arch/avr32/kernel/ptrace.c +++ b/arch/avr32/kernel/ptrace.c | |||
@@ -157,7 +157,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
157 | unsigned long tmp; | 157 | unsigned long tmp; |
158 | int ret; | 158 | int ret; |
159 | 159 | ||
160 | pr_debug("arch_ptrace(%ld, %ld, %#lx, %#lx)\n", | 160 | pr_debug("arch_ptrace(%ld, %d, %#lx, %#lx)\n", |
161 | request, child->pid, addr, data); | 161 | request, child->pid, addr, data); |
162 | 162 | ||
163 | pr_debug("ptrace: Enabling monitor mode...\n"); | 163 | pr_debug("ptrace: Enabling monitor mode...\n"); |
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c index ea2d1ffee478..a34211601008 100644 --- a/arch/avr32/kernel/setup.c +++ b/arch/avr32/kernel/setup.c | |||
@@ -229,30 +229,6 @@ static int __init parse_tag_rsvd_mem(struct tag *tag) | |||
229 | } | 229 | } |
230 | __tagtable(ATAG_RSVD_MEM, parse_tag_rsvd_mem); | 230 | __tagtable(ATAG_RSVD_MEM, parse_tag_rsvd_mem); |
231 | 231 | ||
232 | static int __init parse_tag_ethernet(struct tag *tag) | ||
233 | { | ||
234 | #if 0 | ||
235 | const struct platform_device *pdev; | ||
236 | |||
237 | /* | ||
238 | * We really need a bus type that supports "classes"...this | ||
239 | * will do for now (until we must handle other kinds of | ||
240 | * ethernet controllers) | ||
241 | */ | ||
242 | pdev = platform_get_device("macb", tag->u.ethernet.mac_index); | ||
243 | if (pdev && pdev->dev.platform_data) { | ||
244 | struct eth_platform_data *data = pdev->dev.platform_data; | ||
245 | |||
246 | data->valid = 1; | ||
247 | data->mii_phy_addr = tag->u.ethernet.mii_phy_addr; | ||
248 | memcpy(data->hw_addr, tag->u.ethernet.hw_address, | ||
249 | sizeof(data->hw_addr)); | ||
250 | } | ||
251 | #endif | ||
252 | return 0; | ||
253 | } | ||
254 | __tagtable(ATAG_ETHERNET, parse_tag_ethernet); | ||
255 | |||
256 | /* | 232 | /* |
257 | * Scan the tag table for this tag, and call its parse function. The | 233 | * Scan the tag table for this tag, and call its parse function. The |
258 | * tag table is built by the linker from all the __tagtable | 234 | * tag table is built by the linker from all the __tagtable |
diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c index 33096651c24f..0ec14854a200 100644 --- a/arch/avr32/kernel/signal.c +++ b/arch/avr32/kernel/signal.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/ptrace.h> | 16 | #include <linux/ptrace.h> |
17 | #include <linux/unistd.h> | 17 | #include <linux/unistd.h> |
18 | #include <linux/suspend.h> | 18 | #include <linux/freezer.h> |
19 | 19 | ||
20 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
21 | #include <asm/ucontext.h> | 21 | #include <asm/ucontext.h> |
diff --git a/arch/avr32/kernel/syscall-stubs.S b/arch/avr32/kernel/syscall-stubs.S index 7589a9b426cb..890286a1e62b 100644 --- a/arch/avr32/kernel/syscall-stubs.S +++ b/arch/avr32/kernel/syscall-stubs.S | |||
@@ -100,3 +100,12 @@ __sys_splice: | |||
100 | rcall sys_splice | 100 | rcall sys_splice |
101 | sub sp, -4 | 101 | sub sp, -4 |
102 | popm pc | 102 | popm pc |
103 | |||
104 | .global __sys_epoll_pwait | ||
105 | .type __sys_epoll_pwait,@function | ||
106 | __sys_epoll_pwait: | ||
107 | pushm lr | ||
108 | st.w --sp, ARG6 | ||
109 | rcall sys_epoll_pwait | ||
110 | sub sp, -4 | ||
111 | popm pc | ||
diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S index 63b206965d05..db8f8b55ffdf 100644 --- a/arch/avr32/kernel/syscall_table.S +++ b/arch/avr32/kernel/syscall_table.S | |||
@@ -286,4 +286,5 @@ sys_call_table: | |||
286 | .long sys_sync_file_range | 286 | .long sys_sync_file_range |
287 | .long sys_tee | 287 | .long sys_tee |
288 | .long sys_vmsplice | 288 | .long sys_vmsplice |
289 | .long __sys_epoll_pwait /* 265 */ | ||
289 | .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ | 290 | .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ |
diff --git a/arch/avr32/kernel/vmlinux.lds.c b/arch/avr32/kernel/vmlinux.lds.c index cdd627c6b7dc..5c4424e362b5 100644 --- a/arch/avr32/kernel/vmlinux.lds.c +++ b/arch/avr32/kernel/vmlinux.lds.c | |||
@@ -38,13 +38,7 @@ SECTIONS | |||
38 | __setup_end = .; | 38 | __setup_end = .; |
39 | . = ALIGN(4); | 39 | . = ALIGN(4); |
40 | __initcall_start = .; | 40 | __initcall_start = .; |
41 | *(.initcall1.init) | 41 | INITCALLS |
42 | *(.initcall2.init) | ||
43 | *(.initcall3.init) | ||
44 | *(.initcall4.init) | ||
45 | *(.initcall5.init) | ||
46 | *(.initcall6.init) | ||
47 | *(.initcall7.init) | ||
48 | __initcall_end = .; | 42 | __initcall_end = .; |
49 | __con_initcall_start = .; | 43 | __con_initcall_start = .; |
50 | *(.con_initcall.init) | 44 | *(.con_initcall.init) |
diff --git a/arch/avr32/lib/Makefile b/arch/avr32/lib/Makefile index 09ac43e40522..084d95bac5e7 100644 --- a/arch/avr32/lib/Makefile +++ b/arch/avr32/lib/Makefile | |||
@@ -7,4 +7,5 @@ lib-y += strncpy_from_user.o strnlen_user.o | |||
7 | lib-y += delay.o memset.o memcpy.o findbit.o | 7 | lib-y += delay.o memset.o memcpy.o findbit.o |
8 | lib-y += csum_partial.o csum_partial_copy_generic.o | 8 | lib-y += csum_partial.o csum_partial_copy_generic.o |
9 | lib-y += io-readsw.o io-readsl.o io-writesw.o io-writesl.o | 9 | lib-y += io-readsw.o io-readsl.o io-writesw.o io-writesl.o |
10 | lib-y += io-readsb.o io-writesb.o | ||
10 | lib-y += __avr32_lsl64.o __avr32_lsr64.o __avr32_asr64.o | 11 | lib-y += __avr32_lsl64.o __avr32_lsr64.o __avr32_asr64.o |
diff --git a/arch/avr32/lib/delay.c b/arch/avr32/lib/delay.c index 462c8307b680..b3bc0b56e2c6 100644 --- a/arch/avr32/lib/delay.c +++ b/arch/avr32/lib/delay.c | |||
@@ -12,9 +12,9 @@ | |||
12 | 12 | ||
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/param.h> | ||
15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
16 | 17 | ||
17 | #include <asm/delay.h> | ||
18 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
19 | #include <asm/sysreg.h> | 19 | #include <asm/sysreg.h> |
20 | 20 | ||
diff --git a/arch/avr32/lib/findbit.S b/arch/avr32/lib/findbit.S index 2b4856f4bf7c..c6b91dee857c 100644 --- a/arch/avr32/lib/findbit.S +++ b/arch/avr32/lib/findbit.S | |||
@@ -136,6 +136,7 @@ ENTRY(generic_find_next_zero_le_bit) | |||
136 | /* offset is not word-aligned. Handle the first (32 - r10) bits */ | 136 | /* offset is not word-aligned. Handle the first (32 - r10) bits */ |
137 | ldswp.w r8, r12[0] | 137 | ldswp.w r8, r12[0] |
138 | sub r12, -4 | 138 | sub r12, -4 |
139 | com r8 | ||
139 | lsr r8, r8, r10 | 140 | lsr r8, r8, r10 |
140 | brne .L_found | 141 | brne .L_found |
141 | 142 | ||
@@ -146,7 +147,7 @@ ENTRY(generic_find_next_zero_le_bit) | |||
146 | 147 | ||
147 | /* Main loop. offset must be word-aligned */ | 148 | /* Main loop. offset must be word-aligned */ |
148 | 1: ldswp.w r8, r12[0] | 149 | 1: ldswp.w r8, r12[0] |
149 | cp.w r8, 0 | 150 | com r8 |
150 | brne .L_found | 151 | brne .L_found |
151 | sub r12, -4 | 152 | sub r12, -4 |
152 | sub r9, 32 | 153 | sub r9, 32 |
diff --git a/arch/avr32/lib/io-readsb.S b/arch/avr32/lib/io-readsb.S new file mode 100644 index 000000000000..2be5da7ed26b --- /dev/null +++ b/arch/avr32/lib/io-readsb.S | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004-2006 Atmel Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | .text | ||
10 | .Lnot_word_aligned: | ||
11 | 1: ld.ub r8, r12[0] | ||
12 | sub r10, 1 | ||
13 | st.b r11++, r8 | ||
14 | reteq r12 | ||
15 | tst r11, r9 | ||
16 | brne 1b | ||
17 | |||
18 | /* fall through */ | ||
19 | |||
20 | .global __raw_readsb | ||
21 | .type __raw_readsb,@function | ||
22 | __raw_readsb: | ||
23 | cp.w r10, 0 | ||
24 | mov r9, 3 | ||
25 | reteq r12 | ||
26 | |||
27 | tst r11, r9 | ||
28 | brne .Lnot_word_aligned | ||
29 | |||
30 | sub r10, 4 | ||
31 | brlt 2f | ||
32 | |||
33 | 1: ldins.b r8:t, r12[0] | ||
34 | ldins.b r8:u, r12[0] | ||
35 | ldins.b r8:l, r12[0] | ||
36 | ldins.b r8:b, r12[0] | ||
37 | st.w r11++, r8 | ||
38 | sub r10, 4 | ||
39 | brge 1b | ||
40 | |||
41 | 2: sub r10, -4 | ||
42 | reteq r12 | ||
43 | |||
44 | 3: ld.uh r8, r12[0] | ||
45 | sub r10, 1 | ||
46 | st.b r11++, r8 | ||
47 | brne 3b | ||
48 | |||
49 | retal r12 | ||
diff --git a/arch/avr32/lib/io-writesb.S b/arch/avr32/lib/io-writesb.S new file mode 100644 index 000000000000..b4ebaacccf68 --- /dev/null +++ b/arch/avr32/lib/io-writesb.S | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004-2006 Atmel Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | .text | ||
10 | .Lnot_word_aligned: | ||
11 | 1: ld.ub r8, r11++ | ||
12 | sub r10, 1 | ||
13 | st.b r12[0], r8 | ||
14 | reteq r12 | ||
15 | tst r11, r9 | ||
16 | brne 1b | ||
17 | |||
18 | /* fall through */ | ||
19 | |||
20 | .global __raw_writesb | ||
21 | .type __raw_writesb,@function | ||
22 | __raw_writesb: | ||
23 | cp.w r10, 0 | ||
24 | mov r9, 3 | ||
25 | reteq r12 | ||
26 | |||
27 | tst r11, r9 | ||
28 | brne .Lnot_word_aligned | ||
29 | |||
30 | sub r10, 4 | ||
31 | brlt 2f | ||
32 | |||
33 | 1: ld.w r8, r11++ | ||
34 | bfextu r9, r8, 24, 8 | ||
35 | st.b r12[0], r9 | ||
36 | bfextu r9, r8, 16, 8 | ||
37 | st.b r12[0], r9 | ||
38 | bfextu r9, r8, 8, 8 | ||
39 | st.b r12[0], r9 | ||
40 | st.b r12[0], r8 | ||
41 | sub r10, 4 | ||
42 | brge 1b | ||
43 | |||
44 | 2: sub r10, -4 | ||
45 | reteq r12 | ||
46 | |||
47 | 3: ld.ub r8, r11++ | ||
48 | sub r10, 1 | ||
49 | st.b r12[0], r8 | ||
50 | brne 3b | ||
51 | |||
52 | retal r12 | ||
diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap7000.c index 7ff6ad8bab5f..48f4ef38c70e 100644 --- a/arch/avr32/mach-at32ap/at32ap7000.c +++ b/arch/avr32/mach-at32ap/at32ap7000.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <asm/io.h> | 12 | #include <asm/io.h> |
13 | 13 | ||
14 | #include <asm/arch/at32ap7000.h> | ||
14 | #include <asm/arch/board.h> | 15 | #include <asm/arch/board.h> |
15 | #include <asm/arch/portmux.h> | 16 | #include <asm/arch/portmux.h> |
16 | #include <asm/arch/sm.h> | 17 | #include <asm/arch/sm.h> |
@@ -57,6 +58,9 @@ static struct platform_device _name##_id##_device = { \ | |||
57 | .num_resources = ARRAY_SIZE(_name##_id##_resource), \ | 58 | .num_resources = ARRAY_SIZE(_name##_id##_resource), \ |
58 | } | 59 | } |
59 | 60 | ||
61 | #define select_peripheral(pin, periph, flags) \ | ||
62 | at32_select_periph(GPIO_PIN_##pin, GPIO_##periph, flags) | ||
63 | |||
60 | #define DEV_CLK(_name, devname, bus, _index) \ | 64 | #define DEV_CLK(_name, devname, bus, _index) \ |
61 | static struct clk devname##_##_name = { \ | 65 | static struct clk devname##_##_name = { \ |
62 | .name = #_name, \ | 66 | .name = #_name, \ |
@@ -67,18 +71,6 @@ static struct clk devname##_##_name = { \ | |||
67 | .index = _index, \ | 71 | .index = _index, \ |
68 | } | 72 | } |
69 | 73 | ||
70 | enum { | ||
71 | PIOA, | ||
72 | PIOB, | ||
73 | PIOC, | ||
74 | PIOD, | ||
75 | }; | ||
76 | |||
77 | enum { | ||
78 | FUNC_A, | ||
79 | FUNC_B, | ||
80 | }; | ||
81 | |||
82 | unsigned long at32ap7000_osc_rates[3] = { | 74 | unsigned long at32ap7000_osc_rates[3] = { |
83 | [0] = 32768, | 75 | [0] = 32768, |
84 | /* FIXME: these are ATSTK1002-specific */ | 76 | /* FIXME: these are ATSTK1002-specific */ |
@@ -569,26 +561,26 @@ DEV_CLK(usart, atmel_usart3, pba, 6); | |||
569 | 561 | ||
570 | static inline void configure_usart0_pins(void) | 562 | static inline void configure_usart0_pins(void) |
571 | { | 563 | { |
572 | portmux_set_func(PIOA, 8, FUNC_B); /* RXD */ | 564 | select_peripheral(PA(8), PERIPH_B, 0); /* RXD */ |
573 | portmux_set_func(PIOA, 9, FUNC_B); /* TXD */ | 565 | select_peripheral(PA(9), PERIPH_B, 0); /* TXD */ |
574 | } | 566 | } |
575 | 567 | ||
576 | static inline void configure_usart1_pins(void) | 568 | static inline void configure_usart1_pins(void) |
577 | { | 569 | { |
578 | portmux_set_func(PIOA, 17, FUNC_A); /* RXD */ | 570 | select_peripheral(PA(17), PERIPH_A, 0); /* RXD */ |
579 | portmux_set_func(PIOA, 18, FUNC_A); /* TXD */ | 571 | select_peripheral(PA(18), PERIPH_A, 0); /* TXD */ |
580 | } | 572 | } |
581 | 573 | ||
582 | static inline void configure_usart2_pins(void) | 574 | static inline void configure_usart2_pins(void) |
583 | { | 575 | { |
584 | portmux_set_func(PIOB, 26, FUNC_B); /* RXD */ | 576 | select_peripheral(PB(26), PERIPH_B, 0); /* RXD */ |
585 | portmux_set_func(PIOB, 27, FUNC_B); /* TXD */ | 577 | select_peripheral(PB(27), PERIPH_B, 0); /* TXD */ |
586 | } | 578 | } |
587 | 579 | ||
588 | static inline void configure_usart3_pins(void) | 580 | static inline void configure_usart3_pins(void) |
589 | { | 581 | { |
590 | portmux_set_func(PIOB, 18, FUNC_B); /* RXD */ | 582 | select_peripheral(PB(18), PERIPH_B, 0); /* RXD */ |
591 | portmux_set_func(PIOB, 17, FUNC_B); /* TXD */ | 583 | select_peripheral(PB(17), PERIPH_B, 0); /* TXD */ |
592 | } | 584 | } |
593 | 585 | ||
594 | static struct platform_device *at32_usarts[4]; | 586 | static struct platform_device *at32_usarts[4]; |
@@ -654,6 +646,15 @@ DEFINE_DEV_DATA(macb, 0); | |||
654 | DEV_CLK(hclk, macb0, hsb, 8); | 646 | DEV_CLK(hclk, macb0, hsb, 8); |
655 | DEV_CLK(pclk, macb0, pbb, 6); | 647 | DEV_CLK(pclk, macb0, pbb, 6); |
656 | 648 | ||
649 | static struct eth_platform_data macb1_data; | ||
650 | static struct resource macb1_resource[] = { | ||
651 | PBMEM(0xfff01c00), | ||
652 | IRQ(26), | ||
653 | }; | ||
654 | DEFINE_DEV_DATA(macb, 1); | ||
655 | DEV_CLK(hclk, macb1, hsb, 9); | ||
656 | DEV_CLK(pclk, macb1, pbb, 7); | ||
657 | |||
657 | struct platform_device *__init | 658 | struct platform_device *__init |
658 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data) | 659 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data) |
659 | { | 660 | { |
@@ -663,27 +664,54 @@ at32_add_device_eth(unsigned int id, struct eth_platform_data *data) | |||
663 | case 0: | 664 | case 0: |
664 | pdev = &macb0_device; | 665 | pdev = &macb0_device; |
665 | 666 | ||
666 | portmux_set_func(PIOC, 3, FUNC_A); /* TXD0 */ | 667 | select_peripheral(PC(3), PERIPH_A, 0); /* TXD0 */ |
667 | portmux_set_func(PIOC, 4, FUNC_A); /* TXD1 */ | 668 | select_peripheral(PC(4), PERIPH_A, 0); /* TXD1 */ |
668 | portmux_set_func(PIOC, 7, FUNC_A); /* TXEN */ | 669 | select_peripheral(PC(7), PERIPH_A, 0); /* TXEN */ |
669 | portmux_set_func(PIOC, 8, FUNC_A); /* TXCK */ | 670 | select_peripheral(PC(8), PERIPH_A, 0); /* TXCK */ |
670 | portmux_set_func(PIOC, 9, FUNC_A); /* RXD0 */ | 671 | select_peripheral(PC(9), PERIPH_A, 0); /* RXD0 */ |
671 | portmux_set_func(PIOC, 10, FUNC_A); /* RXD1 */ | 672 | select_peripheral(PC(10), PERIPH_A, 0); /* RXD1 */ |
672 | portmux_set_func(PIOC, 13, FUNC_A); /* RXER */ | 673 | select_peripheral(PC(13), PERIPH_A, 0); /* RXER */ |
673 | portmux_set_func(PIOC, 15, FUNC_A); /* RXDV */ | 674 | select_peripheral(PC(15), PERIPH_A, 0); /* RXDV */ |
674 | portmux_set_func(PIOC, 16, FUNC_A); /* MDC */ | 675 | select_peripheral(PC(16), PERIPH_A, 0); /* MDC */ |
675 | portmux_set_func(PIOC, 17, FUNC_A); /* MDIO */ | 676 | select_peripheral(PC(17), PERIPH_A, 0); /* MDIO */ |
677 | |||
678 | if (!data->is_rmii) { | ||
679 | select_peripheral(PC(0), PERIPH_A, 0); /* COL */ | ||
680 | select_peripheral(PC(1), PERIPH_A, 0); /* CRS */ | ||
681 | select_peripheral(PC(2), PERIPH_A, 0); /* TXER */ | ||
682 | select_peripheral(PC(5), PERIPH_A, 0); /* TXD2 */ | ||
683 | select_peripheral(PC(6), PERIPH_A, 0); /* TXD3 */ | ||
684 | select_peripheral(PC(11), PERIPH_A, 0); /* RXD2 */ | ||
685 | select_peripheral(PC(12), PERIPH_A, 0); /* RXD3 */ | ||
686 | select_peripheral(PC(14), PERIPH_A, 0); /* RXCK */ | ||
687 | select_peripheral(PC(18), PERIPH_A, 0); /* SPD */ | ||
688 | } | ||
689 | break; | ||
690 | |||
691 | case 1: | ||
692 | pdev = &macb1_device; | ||
693 | |||
694 | select_peripheral(PD(13), PERIPH_B, 0); /* TXD0 */ | ||
695 | select_peripheral(PD(14), PERIPH_B, 0); /* TXD1 */ | ||
696 | select_peripheral(PD(11), PERIPH_B, 0); /* TXEN */ | ||
697 | select_peripheral(PD(12), PERIPH_B, 0); /* TXCK */ | ||
698 | select_peripheral(PD(10), PERIPH_B, 0); /* RXD0 */ | ||
699 | select_peripheral(PD(6), PERIPH_B, 0); /* RXD1 */ | ||
700 | select_peripheral(PD(5), PERIPH_B, 0); /* RXER */ | ||
701 | select_peripheral(PD(4), PERIPH_B, 0); /* RXDV */ | ||
702 | select_peripheral(PD(3), PERIPH_B, 0); /* MDC */ | ||
703 | select_peripheral(PD(2), PERIPH_B, 0); /* MDIO */ | ||
676 | 704 | ||
677 | if (!data->is_rmii) { | 705 | if (!data->is_rmii) { |
678 | portmux_set_func(PIOC, 0, FUNC_A); /* COL */ | 706 | select_peripheral(PC(19), PERIPH_B, 0); /* COL */ |
679 | portmux_set_func(PIOC, 1, FUNC_A); /* CRS */ | 707 | select_peripheral(PC(23), PERIPH_B, 0); /* CRS */ |
680 | portmux_set_func(PIOC, 2, FUNC_A); /* TXER */ | 708 | select_peripheral(PC(26), PERIPH_B, 0); /* TXER */ |
681 | portmux_set_func(PIOC, 5, FUNC_A); /* TXD2 */ | 709 | select_peripheral(PC(27), PERIPH_B, 0); /* TXD2 */ |
682 | portmux_set_func(PIOC, 6, FUNC_A); /* TXD3 */ | 710 | select_peripheral(PC(28), PERIPH_B, 0); /* TXD3 */ |
683 | portmux_set_func(PIOC, 11, FUNC_A); /* RXD2 */ | 711 | select_peripheral(PC(29), PERIPH_B, 0); /* RXD2 */ |
684 | portmux_set_func(PIOC, 12, FUNC_A); /* RXD3 */ | 712 | select_peripheral(PC(30), PERIPH_B, 0); /* RXD3 */ |
685 | portmux_set_func(PIOC, 14, FUNC_A); /* RXCK */ | 713 | select_peripheral(PC(24), PERIPH_B, 0); /* RXCK */ |
686 | portmux_set_func(PIOC, 18, FUNC_A); /* SPD */ | 714 | select_peripheral(PD(15), PERIPH_B, 0); /* SPD */ |
687 | } | 715 | } |
688 | break; | 716 | break; |
689 | 717 | ||
@@ -714,12 +742,12 @@ struct platform_device *__init at32_add_device_spi(unsigned int id) | |||
714 | switch (id) { | 742 | switch (id) { |
715 | case 0: | 743 | case 0: |
716 | pdev = &spi0_device; | 744 | pdev = &spi0_device; |
717 | portmux_set_func(PIOA, 0, FUNC_A); /* MISO */ | 745 | select_peripheral(PA(0), PERIPH_A, 0); /* MISO */ |
718 | portmux_set_func(PIOA, 1, FUNC_A); /* MOSI */ | 746 | select_peripheral(PA(1), PERIPH_A, 0); /* MOSI */ |
719 | portmux_set_func(PIOA, 2, FUNC_A); /* SCK */ | 747 | select_peripheral(PA(2), PERIPH_A, 0); /* SCK */ |
720 | portmux_set_func(PIOA, 3, FUNC_A); /* NPCS0 */ | 748 | select_peripheral(PA(3), PERIPH_A, 0); /* NPCS0 */ |
721 | portmux_set_func(PIOA, 4, FUNC_A); /* NPCS1 */ | 749 | select_peripheral(PA(4), PERIPH_A, 0); /* NPCS1 */ |
722 | portmux_set_func(PIOA, 5, FUNC_A); /* NPCS2 */ | 750 | select_peripheral(PA(5), PERIPH_A, 0); /* NPCS2 */ |
723 | break; | 751 | break; |
724 | 752 | ||
725 | default: | 753 | default: |
@@ -762,37 +790,37 @@ at32_add_device_lcdc(unsigned int id, struct lcdc_platform_data *data) | |||
762 | switch (id) { | 790 | switch (id) { |
763 | case 0: | 791 | case 0: |
764 | pdev = &lcdc0_device; | 792 | pdev = &lcdc0_device; |
765 | portmux_set_func(PIOC, 19, FUNC_A); /* CC */ | 793 | select_peripheral(PC(19), PERIPH_A, 0); /* CC */ |
766 | portmux_set_func(PIOC, 20, FUNC_A); /* HSYNC */ | 794 | select_peripheral(PC(20), PERIPH_A, 0); /* HSYNC */ |
767 | portmux_set_func(PIOC, 21, FUNC_A); /* PCLK */ | 795 | select_peripheral(PC(21), PERIPH_A, 0); /* PCLK */ |
768 | portmux_set_func(PIOC, 22, FUNC_A); /* VSYNC */ | 796 | select_peripheral(PC(22), PERIPH_A, 0); /* VSYNC */ |
769 | portmux_set_func(PIOC, 23, FUNC_A); /* DVAL */ | 797 | select_peripheral(PC(23), PERIPH_A, 0); /* DVAL */ |
770 | portmux_set_func(PIOC, 24, FUNC_A); /* MODE */ | 798 | select_peripheral(PC(24), PERIPH_A, 0); /* MODE */ |
771 | portmux_set_func(PIOC, 25, FUNC_A); /* PWR */ | 799 | select_peripheral(PC(25), PERIPH_A, 0); /* PWR */ |
772 | portmux_set_func(PIOC, 26, FUNC_A); /* DATA0 */ | 800 | select_peripheral(PC(26), PERIPH_A, 0); /* DATA0 */ |
773 | portmux_set_func(PIOC, 27, FUNC_A); /* DATA1 */ | 801 | select_peripheral(PC(27), PERIPH_A, 0); /* DATA1 */ |
774 | portmux_set_func(PIOC, 28, FUNC_A); /* DATA2 */ | 802 | select_peripheral(PC(28), PERIPH_A, 0); /* DATA2 */ |
775 | portmux_set_func(PIOC, 29, FUNC_A); /* DATA3 */ | 803 | select_peripheral(PC(29), PERIPH_A, 0); /* DATA3 */ |
776 | portmux_set_func(PIOC, 30, FUNC_A); /* DATA4 */ | 804 | select_peripheral(PC(30), PERIPH_A, 0); /* DATA4 */ |
777 | portmux_set_func(PIOC, 31, FUNC_A); /* DATA5 */ | 805 | select_peripheral(PC(31), PERIPH_A, 0); /* DATA5 */ |
778 | portmux_set_func(PIOD, 0, FUNC_A); /* DATA6 */ | 806 | select_peripheral(PD(0), PERIPH_A, 0); /* DATA6 */ |
779 | portmux_set_func(PIOD, 1, FUNC_A); /* DATA7 */ | 807 | select_peripheral(PD(1), PERIPH_A, 0); /* DATA7 */ |
780 | portmux_set_func(PIOD, 2, FUNC_A); /* DATA8 */ | 808 | select_peripheral(PD(2), PERIPH_A, 0); /* DATA8 */ |
781 | portmux_set_func(PIOD, 3, FUNC_A); /* DATA9 */ | 809 | select_peripheral(PD(3), PERIPH_A, 0); /* DATA9 */ |
782 | portmux_set_func(PIOD, 4, FUNC_A); /* DATA10 */ | 810 | select_peripheral(PD(4), PERIPH_A, 0); /* DATA10 */ |
783 | portmux_set_func(PIOD, 5, FUNC_A); /* DATA11 */ | 811 | select_peripheral(PD(5), PERIPH_A, 0); /* DATA11 */ |
784 | portmux_set_func(PIOD, 6, FUNC_A); /* DATA12 */ | 812 | select_peripheral(PD(6), PERIPH_A, 0); /* DATA12 */ |
785 | portmux_set_func(PIOD, 7, FUNC_A); /* DATA13 */ | 813 | select_peripheral(PD(7), PERIPH_A, 0); /* DATA13 */ |
786 | portmux_set_func(PIOD, 8, FUNC_A); /* DATA14 */ | 814 | select_peripheral(PD(8), PERIPH_A, 0); /* DATA14 */ |
787 | portmux_set_func(PIOD, 9, FUNC_A); /* DATA15 */ | 815 | select_peripheral(PD(9), PERIPH_A, 0); /* DATA15 */ |
788 | portmux_set_func(PIOD, 10, FUNC_A); /* DATA16 */ | 816 | select_peripheral(PD(10), PERIPH_A, 0); /* DATA16 */ |
789 | portmux_set_func(PIOD, 11, FUNC_A); /* DATA17 */ | 817 | select_peripheral(PD(11), PERIPH_A, 0); /* DATA17 */ |
790 | portmux_set_func(PIOD, 12, FUNC_A); /* DATA18 */ | 818 | select_peripheral(PD(12), PERIPH_A, 0); /* DATA18 */ |
791 | portmux_set_func(PIOD, 13, FUNC_A); /* DATA19 */ | 819 | select_peripheral(PD(13), PERIPH_A, 0); /* DATA19 */ |
792 | portmux_set_func(PIOD, 14, FUNC_A); /* DATA20 */ | 820 | select_peripheral(PD(14), PERIPH_A, 0); /* DATA20 */ |
793 | portmux_set_func(PIOD, 15, FUNC_A); /* DATA21 */ | 821 | select_peripheral(PD(15), PERIPH_A, 0); /* DATA21 */ |
794 | portmux_set_func(PIOD, 16, FUNC_A); /* DATA22 */ | 822 | select_peripheral(PD(16), PERIPH_A, 0); /* DATA22 */ |
795 | portmux_set_func(PIOD, 17, FUNC_A); /* DATA23 */ | 823 | select_peripheral(PD(17), PERIPH_A, 0); /* DATA23 */ |
796 | 824 | ||
797 | clk_set_parent(&lcdc0_pixclk, &pll0); | 825 | clk_set_parent(&lcdc0_pixclk, &pll0); |
798 | clk_set_rate(&lcdc0_pixclk, clk_get_rate(&pll0)); | 826 | clk_set_rate(&lcdc0_pixclk, clk_get_rate(&pll0)); |
@@ -838,6 +866,8 @@ struct clk *at32_clock_list[] = { | |||
838 | &atmel_usart3_usart, | 866 | &atmel_usart3_usart, |
839 | &macb0_hclk, | 867 | &macb0_hclk, |
840 | &macb0_pclk, | 868 | &macb0_pclk, |
869 | &macb1_hclk, | ||
870 | &macb1_pclk, | ||
841 | &spi0_mck, | 871 | &spi0_mck, |
842 | &lcdc0_hclk, | 872 | &lcdc0_hclk, |
843 | &lcdc0_pixclk, | 873 | &lcdc0_pixclk, |
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c index 4dff1f988900..b59272e81b9a 100644 --- a/arch/avr32/mach-at32ap/extint.c +++ b/arch/avr32/mach-at32ap/extint.c | |||
@@ -49,12 +49,25 @@ static void eim_unmask_irq(unsigned int irq) | |||
49 | static int eim_set_irq_type(unsigned int irq, unsigned int flow_type) | 49 | static int eim_set_irq_type(unsigned int irq, unsigned int flow_type) |
50 | { | 50 | { |
51 | struct at32_sm *sm = get_irq_chip_data(irq); | 51 | struct at32_sm *sm = get_irq_chip_data(irq); |
52 | struct irq_desc *desc; | ||
52 | unsigned int i = irq - sm->eim_first_irq; | 53 | unsigned int i = irq - sm->eim_first_irq; |
53 | u32 mode, edge, level; | 54 | u32 mode, edge, level; |
54 | unsigned long flags; | 55 | unsigned long flags; |
55 | int ret = 0; | 56 | int ret = 0; |
56 | 57 | ||
57 | flow_type &= IRQ_TYPE_SENSE_MASK; | 58 | if (flow_type == IRQ_TYPE_NONE) |
59 | flow_type = IRQ_TYPE_LEVEL_LOW; | ||
60 | |||
61 | desc = &irq_desc[irq]; | ||
62 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); | ||
63 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; | ||
64 | |||
65 | if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) { | ||
66 | desc->status |= IRQ_LEVEL; | ||
67 | set_irq_handler(irq, handle_level_irq); | ||
68 | } else { | ||
69 | set_irq_handler(irq, handle_edge_irq); | ||
70 | } | ||
58 | 71 | ||
59 | spin_lock_irqsave(&sm->lock, flags); | 72 | spin_lock_irqsave(&sm->lock, flags); |
60 | 73 | ||
@@ -148,10 +161,15 @@ static int __init eim_init(void) | |||
148 | pattern = sm_readl(sm, EIM_MODE); | 161 | pattern = sm_readl(sm, EIM_MODE); |
149 | nr_irqs = fls(pattern); | 162 | nr_irqs = fls(pattern); |
150 | 163 | ||
164 | /* Trigger on falling edge unless overridden by driver */ | ||
165 | sm_writel(sm, EIM_MODE, 0UL); | ||
166 | sm_writel(sm, EIM_EDGE, 0UL); | ||
167 | |||
151 | sm->eim_chip = &eim_chip; | 168 | sm->eim_chip = &eim_chip; |
152 | 169 | ||
153 | for (i = 0; i < nr_irqs; i++) { | 170 | for (i = 0; i < nr_irqs; i++) { |
154 | set_irq_chip(sm->eim_first_irq + i, &eim_chip); | 171 | set_irq_chip_and_handler(sm->eim_first_irq + i, &eim_chip, |
172 | handle_edge_irq); | ||
155 | set_irq_chip_data(sm->eim_first_irq + i, sm); | 173 | set_irq_chip_data(sm->eim_first_irq + i, sm); |
156 | } | 174 | } |
157 | 175 | ||
diff --git a/arch/avr32/mach-at32ap/hsmc.h b/arch/avr32/mach-at32ap/hsmc.h index 5681276fafdb..d1d48e26e393 100644 --- a/arch/avr32/mach-at32ap/hsmc.h +++ b/arch/avr32/mach-at32ap/hsmc.h | |||
@@ -120,8 +120,8 @@ | |||
120 | 120 | ||
121 | /* Register access macros */ | 121 | /* Register access macros */ |
122 | #define hsmc_readl(port,reg) \ | 122 | #define hsmc_readl(port,reg) \ |
123 | readl((port)->regs + HSMC_##reg) | 123 | __raw_readl((port)->regs + HSMC_##reg) |
124 | #define hsmc_writel(port,reg,value) \ | 124 | #define hsmc_writel(port,reg,value) \ |
125 | writel((value), (port)->regs + HSMC_##reg) | 125 | __raw_writel((value), (port)->regs + HSMC_##reg) |
126 | 126 | ||
127 | #endif /* __ASM_AVR32_HSMC_H__ */ | 127 | #endif /* __ASM_AVR32_HSMC_H__ */ |
diff --git a/arch/avr32/mach-at32ap/intc.c b/arch/avr32/mach-at32ap/intc.c index eb87a18ad7b2..dd5c009cf224 100644 --- a/arch/avr32/mach-at32ap/intc.c +++ b/arch/avr32/mach-at32ap/intc.c | |||
@@ -136,3 +136,7 @@ fail: | |||
136 | panic("Interrupt controller initialization failed!\n"); | 136 | panic("Interrupt controller initialization failed!\n"); |
137 | } | 137 | } |
138 | 138 | ||
139 | unsigned long intc_get_pending(int group) | ||
140 | { | ||
141 | return intc_readl(&intc0, INTREQ0 + 4 * group); | ||
142 | } | ||
diff --git a/arch/avr32/mach-at32ap/intc.h b/arch/avr32/mach-at32ap/intc.h index d289ca2fff13..4d3664e43a8e 100644 --- a/arch/avr32/mach-at32ap/intc.h +++ b/arch/avr32/mach-at32ap/intc.h | |||
@@ -321,7 +321,9 @@ | |||
321 | #define INTC_MKBF(name, value) (((value) & ((1 << INTC_##name##_SIZE) - 1)) << INTC_##name##_OFFSET) | 321 | #define INTC_MKBF(name, value) (((value) & ((1 << INTC_##name##_SIZE) - 1)) << INTC_##name##_OFFSET) |
322 | #define INTC_GETBF(name, value) (((value) >> INTC_##name##_OFFSET) & ((1 << INTC_##name##_SIZE) - 1)) | 322 | #define INTC_GETBF(name, value) (((value) >> INTC_##name##_OFFSET) & ((1 << INTC_##name##_SIZE) - 1)) |
323 | 323 | ||
324 | #define intc_readl(port,reg) readl((port)->regs + INTC_##reg) | 324 | #define intc_readl(port,reg) \ |
325 | #define intc_writel(port,reg,value) writel((value), (port)->regs + INTC_##reg) | 325 | __raw_readl((port)->regs + INTC_##reg) |
326 | #define intc_writel(port,reg,value) \ | ||
327 | __raw_writel((value), (port)->regs + INTC_##reg) | ||
326 | 328 | ||
327 | #endif /* __ASM_AVR32_PERIHP_INTC_H__ */ | 329 | #endif /* __ASM_AVR32_PERIHP_INTC_H__ */ |
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c index d3aabfca8598..f1280ed8ed6d 100644 --- a/arch/avr32/mach-at32ap/pio.c +++ b/arch/avr32/mach-at32ap/pio.c | |||
@@ -25,27 +25,98 @@ struct pio_device { | |||
25 | void __iomem *regs; | 25 | void __iomem *regs; |
26 | const struct platform_device *pdev; | 26 | const struct platform_device *pdev; |
27 | struct clk *clk; | 27 | struct clk *clk; |
28 | u32 alloc_mask; | 28 | u32 pinmux_mask; |
29 | char name[32]; | 29 | char name[32]; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | static struct pio_device pio_dev[MAX_NR_PIO_DEVICES]; | 32 | static struct pio_device pio_dev[MAX_NR_PIO_DEVICES]; |
33 | 33 | ||
34 | void portmux_set_func(unsigned int portmux_id, unsigned int pin_id, | 34 | static struct pio_device *gpio_to_pio(unsigned int gpio) |
35 | unsigned int function_id) | ||
36 | { | 35 | { |
37 | struct pio_device *pio; | 36 | struct pio_device *pio; |
38 | u32 mask = 1 << pin_id; | 37 | unsigned int index; |
39 | 38 | ||
40 | BUG_ON(portmux_id >= MAX_NR_PIO_DEVICES); | 39 | index = gpio >> 5; |
40 | if (index >= MAX_NR_PIO_DEVICES) | ||
41 | return NULL; | ||
42 | pio = &pio_dev[index]; | ||
43 | if (!pio->regs) | ||
44 | return NULL; | ||
41 | 45 | ||
42 | pio = &pio_dev[portmux_id]; | 46 | return pio; |
47 | } | ||
48 | |||
49 | /* Pin multiplexing API */ | ||
50 | |||
51 | void __init at32_select_periph(unsigned int pin, unsigned int periph, | ||
52 | unsigned long flags) | ||
53 | { | ||
54 | struct pio_device *pio; | ||
55 | unsigned int pin_index = pin & 0x1f; | ||
56 | u32 mask = 1 << pin_index; | ||
57 | |||
58 | pio = gpio_to_pio(pin); | ||
59 | if (unlikely(!pio)) { | ||
60 | printk("pio: invalid pin %u\n", pin); | ||
61 | goto fail; | ||
62 | } | ||
43 | 63 | ||
44 | if (function_id) | 64 | if (unlikely(test_and_set_bit(pin_index, &pio->pinmux_mask))) { |
65 | printk("%s: pin %u is busy\n", pio->name, pin_index); | ||
66 | goto fail; | ||
67 | } | ||
68 | |||
69 | pio_writel(pio, PUER, mask); | ||
70 | if (periph) | ||
45 | pio_writel(pio, BSR, mask); | 71 | pio_writel(pio, BSR, mask); |
46 | else | 72 | else |
47 | pio_writel(pio, ASR, mask); | 73 | pio_writel(pio, ASR, mask); |
74 | |||
48 | pio_writel(pio, PDR, mask); | 75 | pio_writel(pio, PDR, mask); |
76 | if (!(flags & AT32_GPIOF_PULLUP)) | ||
77 | pio_writel(pio, PUDR, mask); | ||
78 | |||
79 | return; | ||
80 | |||
81 | fail: | ||
82 | dump_stack(); | ||
83 | } | ||
84 | |||
85 | void __init at32_select_gpio(unsigned int pin, unsigned long flags) | ||
86 | { | ||
87 | struct pio_device *pio; | ||
88 | unsigned int pin_index = pin & 0x1f; | ||
89 | u32 mask = 1 << pin_index; | ||
90 | |||
91 | pio = gpio_to_pio(pin); | ||
92 | if (unlikely(!pio)) { | ||
93 | printk("pio: invalid pin %u\n", pin); | ||
94 | goto fail; | ||
95 | } | ||
96 | |||
97 | if (unlikely(test_and_set_bit(pin_index, &pio->pinmux_mask))) { | ||
98 | printk("%s: pin %u is busy\n", pio->name, pin_index); | ||
99 | goto fail; | ||
100 | } | ||
101 | |||
102 | pio_writel(pio, PUER, mask); | ||
103 | if (flags & AT32_GPIOF_HIGH) | ||
104 | pio_writel(pio, SODR, mask); | ||
105 | else | ||
106 | pio_writel(pio, CODR, mask); | ||
107 | if (flags & AT32_GPIOF_OUTPUT) | ||
108 | pio_writel(pio, OER, mask); | ||
109 | else | ||
110 | pio_writel(pio, ODR, mask); | ||
111 | |||
112 | pio_writel(pio, PER, mask); | ||
113 | if (!(flags & AT32_GPIOF_PULLUP)) | ||
114 | pio_writel(pio, PUDR, mask); | ||
115 | |||
116 | return; | ||
117 | |||
118 | fail: | ||
119 | dump_stack(); | ||
49 | } | 120 | } |
50 | 121 | ||
51 | static int __init pio_probe(struct platform_device *pdev) | 122 | static int __init pio_probe(struct platform_device *pdev) |
diff --git a/arch/avr32/mach-at32ap/pio.h b/arch/avr32/mach-at32ap/pio.h index cfea12351599..50fa3aca32c5 100644 --- a/arch/avr32/mach-at32ap/pio.h +++ b/arch/avr32/mach-at32ap/pio.h | |||
@@ -170,8 +170,10 @@ | |||
170 | #define PIO_BFINS(name,value,old) (((old) & ~(((1 << PIO_##name##_SIZE) - 1) << PIO_##name##_OFFSET)) | PIO_BF(name,value)) | 170 | #define PIO_BFINS(name,value,old) (((old) & ~(((1 << PIO_##name##_SIZE) - 1) << PIO_##name##_OFFSET)) | PIO_BF(name,value)) |
171 | 171 | ||
172 | /* Register access macros */ | 172 | /* Register access macros */ |
173 | #define pio_readl(port,reg) readl((port)->regs + PIO_##reg) | 173 | #define pio_readl(port,reg) \ |
174 | #define pio_writel(port,reg,value) writel((value), (port)->regs + PIO_##reg) | 174 | __raw_readl((port)->regs + PIO_##reg) |
175 | #define pio_writel(port,reg,value) \ | ||
176 | __raw_writel((value), (port)->regs + PIO_##reg) | ||
175 | 177 | ||
176 | void at32_init_pio(struct platform_device *pdev); | 178 | void at32_init_pio(struct platform_device *pdev); |
177 | 179 | ||
diff --git a/arch/avr32/mach-at32ap/sm.c b/arch/avr32/mach-at32ap/sm.c deleted file mode 100644 index 03306eb0345e..000000000000 --- a/arch/avr32/mach-at32ap/sm.c +++ /dev/null | |||
@@ -1,289 +0,0 @@ | |||
1 | /* | ||
2 | * System Manager driver for AT32AP CPUs | ||
3 | * | ||
4 | * Copyright (C) 2006 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/errno.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/random.h> | ||
17 | #include <linux/spinlock.h> | ||
18 | |||
19 | #include <asm/intc.h> | ||
20 | #include <asm/io.h> | ||
21 | #include <asm/irq.h> | ||
22 | |||
23 | #include <asm/arch/sm.h> | ||
24 | |||
25 | #include "sm.h" | ||
26 | |||
27 | #define SM_EIM_IRQ_RESOURCE 1 | ||
28 | #define SM_PM_IRQ_RESOURCE 2 | ||
29 | #define SM_RTC_IRQ_RESOURCE 3 | ||
30 | |||
31 | #define to_eim(irqc) container_of(irqc, struct at32_sm, irqc) | ||
32 | |||
33 | struct at32_sm system_manager; | ||
34 | |||
35 | int __init at32_sm_init(void) | ||
36 | { | ||
37 | struct resource *regs; | ||
38 | struct at32_sm *sm = &system_manager; | ||
39 | int ret = -ENXIO; | ||
40 | |||
41 | regs = platform_get_resource(&at32_sm_device, IORESOURCE_MEM, 0); | ||
42 | if (!regs) | ||
43 | goto fail; | ||
44 | |||
45 | spin_lock_init(&sm->lock); | ||
46 | sm->pdev = &at32_sm_device; | ||
47 | |||
48 | ret = -ENOMEM; | ||
49 | sm->regs = ioremap(regs->start, regs->end - regs->start + 1); | ||
50 | if (!sm->regs) | ||
51 | goto fail; | ||
52 | |||
53 | return 0; | ||
54 | |||
55 | fail: | ||
56 | printk(KERN_ERR "Failed to initialize System Manager: %d\n", ret); | ||
57 | return ret; | ||
58 | } | ||
59 | |||
60 | /* | ||
61 | * External Interrupt Module (EIM). | ||
62 | * | ||
63 | * EIM gets level- or edge-triggered interrupts of either polarity | ||
64 | * from the outside and converts it to active-high level-triggered | ||
65 | * interrupts that the internal interrupt controller can handle. EIM | ||
66 | * also provides masking/unmasking of interrupts, as well as | ||
67 | * acknowledging of edge-triggered interrupts. | ||
68 | */ | ||
69 | |||
70 | static irqreturn_t spurious_eim_interrupt(int irq, void *dev_id, | ||
71 | struct pt_regs *regs) | ||
72 | { | ||
73 | printk(KERN_WARNING "Spurious EIM interrupt %d\n", irq); | ||
74 | disable_irq(irq); | ||
75 | return IRQ_NONE; | ||
76 | } | ||
77 | |||
78 | static struct irqaction eim_spurious_action = { | ||
79 | .handler = spurious_eim_interrupt, | ||
80 | }; | ||
81 | |||
82 | static irqreturn_t eim_handle_irq(int irq, void *dev_id, struct pt_regs *regs) | ||
83 | { | ||
84 | struct irq_controller * irqc = dev_id; | ||
85 | struct at32_sm *sm = to_eim(irqc); | ||
86 | unsigned long pending; | ||
87 | |||
88 | /* | ||
89 | * No need to disable interrupts globally. The interrupt | ||
90 | * level relevant to this group must be masked all the time, | ||
91 | * so we know that this particular EIM instance will not be | ||
92 | * re-entered. | ||
93 | */ | ||
94 | spin_lock(&sm->lock); | ||
95 | |||
96 | pending = intc_get_pending(sm->irqc.irq_group); | ||
97 | if (unlikely(!pending)) { | ||
98 | printk(KERN_ERR "EIM (group %u): No interrupts pending!\n", | ||
99 | sm->irqc.irq_group); | ||
100 | goto unlock; | ||
101 | } | ||
102 | |||
103 | do { | ||
104 | struct irqaction *action; | ||
105 | unsigned int i; | ||
106 | |||
107 | i = fls(pending) - 1; | ||
108 | pending &= ~(1 << i); | ||
109 | action = sm->action[i]; | ||
110 | |||
111 | /* Acknowledge the interrupt */ | ||
112 | sm_writel(sm, EIM_ICR, 1 << i); | ||
113 | |||
114 | spin_unlock(&sm->lock); | ||
115 | |||
116 | if (action->flags & SA_INTERRUPT) | ||
117 | local_irq_disable(); | ||
118 | action->handler(sm->irqc.first_irq + i, action->dev_id, regs); | ||
119 | local_irq_enable(); | ||
120 | spin_lock(&sm->lock); | ||
121 | if (action->flags & SA_SAMPLE_RANDOM) | ||
122 | add_interrupt_randomness(sm->irqc.first_irq + i); | ||
123 | } while (pending); | ||
124 | |||
125 | unlock: | ||
126 | spin_unlock(&sm->lock); | ||
127 | return IRQ_HANDLED; | ||
128 | } | ||
129 | |||
130 | static void eim_mask(struct irq_controller *irqc, unsigned int irq) | ||
131 | { | ||
132 | struct at32_sm *sm = to_eim(irqc); | ||
133 | unsigned int i; | ||
134 | |||
135 | i = irq - sm->irqc.first_irq; | ||
136 | sm_writel(sm, EIM_IDR, 1 << i); | ||
137 | } | ||
138 | |||
139 | static void eim_unmask(struct irq_controller *irqc, unsigned int irq) | ||
140 | { | ||
141 | struct at32_sm *sm = to_eim(irqc); | ||
142 | unsigned int i; | ||
143 | |||
144 | i = irq - sm->irqc.first_irq; | ||
145 | sm_writel(sm, EIM_IER, 1 << i); | ||
146 | } | ||
147 | |||
148 | static int eim_setup(struct irq_controller *irqc, unsigned int irq, | ||
149 | struct irqaction *action) | ||
150 | { | ||
151 | struct at32_sm *sm = to_eim(irqc); | ||
152 | sm->action[irq - sm->irqc.first_irq] = action; | ||
153 | /* Acknowledge earlier interrupts */ | ||
154 | sm_writel(sm, EIM_ICR, (1<<(irq - sm->irqc.first_irq))); | ||
155 | eim_unmask(irqc, irq); | ||
156 | return 0; | ||
157 | } | ||
158 | |||
159 | static void eim_free(struct irq_controller *irqc, unsigned int irq, | ||
160 | void *dev) | ||
161 | { | ||
162 | struct at32_sm *sm = to_eim(irqc); | ||
163 | eim_mask(irqc, irq); | ||
164 | sm->action[irq - sm->irqc.first_irq] = &eim_spurious_action; | ||
165 | } | ||
166 | |||
167 | static int eim_set_type(struct irq_controller *irqc, unsigned int irq, | ||
168 | unsigned int type) | ||
169 | { | ||
170 | struct at32_sm *sm = to_eim(irqc); | ||
171 | unsigned long flags; | ||
172 | u32 value, pattern; | ||
173 | |||
174 | spin_lock_irqsave(&sm->lock, flags); | ||
175 | |||
176 | pattern = 1 << (irq - sm->irqc.first_irq); | ||
177 | |||
178 | value = sm_readl(sm, EIM_MODE); | ||
179 | if (type & IRQ_TYPE_LEVEL) | ||
180 | value |= pattern; | ||
181 | else | ||
182 | value &= ~pattern; | ||
183 | sm_writel(sm, EIM_MODE, value); | ||
184 | value = sm_readl(sm, EIM_EDGE); | ||
185 | if (type & IRQ_EDGE_RISING) | ||
186 | value |= pattern; | ||
187 | else | ||
188 | value &= ~pattern; | ||
189 | sm_writel(sm, EIM_EDGE, value); | ||
190 | value = sm_readl(sm, EIM_LEVEL); | ||
191 | if (type & IRQ_LEVEL_HIGH) | ||
192 | value |= pattern; | ||
193 | else | ||
194 | value &= ~pattern; | ||
195 | sm_writel(sm, EIM_LEVEL, value); | ||
196 | |||
197 | spin_unlock_irqrestore(&sm->lock, flags); | ||
198 | |||
199 | return 0; | ||
200 | } | ||
201 | |||
202 | static unsigned int eim_get_type(struct irq_controller *irqc, | ||
203 | unsigned int irq) | ||
204 | { | ||
205 | struct at32_sm *sm = to_eim(irqc); | ||
206 | unsigned long flags; | ||
207 | unsigned int type = 0; | ||
208 | u32 mode, edge, level, pattern; | ||
209 | |||
210 | pattern = 1 << (irq - sm->irqc.first_irq); | ||
211 | |||
212 | spin_lock_irqsave(&sm->lock, flags); | ||
213 | mode = sm_readl(sm, EIM_MODE); | ||
214 | edge = sm_readl(sm, EIM_EDGE); | ||
215 | level = sm_readl(sm, EIM_LEVEL); | ||
216 | spin_unlock_irqrestore(&sm->lock, flags); | ||
217 | |||
218 | if (mode & pattern) | ||
219 | type |= IRQ_TYPE_LEVEL; | ||
220 | if (edge & pattern) | ||
221 | type |= IRQ_EDGE_RISING; | ||
222 | if (level & pattern) | ||
223 | type |= IRQ_LEVEL_HIGH; | ||
224 | |||
225 | return type; | ||
226 | } | ||
227 | |||
228 | static struct irq_controller_class eim_irq_class = { | ||
229 | .typename = "EIM", | ||
230 | .handle = eim_handle_irq, | ||
231 | .setup = eim_setup, | ||
232 | .free = eim_free, | ||
233 | .mask = eim_mask, | ||
234 | .unmask = eim_unmask, | ||
235 | .set_type = eim_set_type, | ||
236 | .get_type = eim_get_type, | ||
237 | }; | ||
238 | |||
239 | static int __init eim_init(void) | ||
240 | { | ||
241 | struct at32_sm *sm = &system_manager; | ||
242 | unsigned int i; | ||
243 | u32 pattern; | ||
244 | int ret; | ||
245 | |||
246 | /* | ||
247 | * The EIM is really the same module as SM, so register | ||
248 | * mapping, etc. has been taken care of already. | ||
249 | */ | ||
250 | |||
251 | /* | ||
252 | * Find out how many interrupt lines that are actually | ||
253 | * implemented in hardware. | ||
254 | */ | ||
255 | sm_writel(sm, EIM_IDR, ~0UL); | ||
256 | sm_writel(sm, EIM_MODE, ~0UL); | ||
257 | pattern = sm_readl(sm, EIM_MODE); | ||
258 | sm->irqc.nr_irqs = fls(pattern); | ||
259 | |||
260 | ret = -ENOMEM; | ||
261 | sm->action = kmalloc(sizeof(*sm->action) * sm->irqc.nr_irqs, | ||
262 | GFP_KERNEL); | ||
263 | if (!sm->action) | ||
264 | goto out; | ||
265 | |||
266 | for (i = 0; i < sm->irqc.nr_irqs; i++) | ||
267 | sm->action[i] = &eim_spurious_action; | ||
268 | |||
269 | spin_lock_init(&sm->lock); | ||
270 | sm->irqc.irq_group = sm->pdev->resource[SM_EIM_IRQ_RESOURCE].start; | ||
271 | sm->irqc.class = &eim_irq_class; | ||
272 | |||
273 | ret = intc_register_controller(&sm->irqc); | ||
274 | if (ret < 0) | ||
275 | goto out_free_actions; | ||
276 | |||
277 | printk("EIM: External Interrupt Module at 0x%p, IRQ group %u\n", | ||
278 | sm->regs, sm->irqc.irq_group); | ||
279 | printk("EIM: Handling %u external IRQs, starting with IRQ%u\n", | ||
280 | sm->irqc.nr_irqs, sm->irqc.first_irq); | ||
281 | |||
282 | return 0; | ||
283 | |||
284 | out_free_actions: | ||
285 | kfree(sm->action); | ||
286 | out: | ||
287 | return ret; | ||
288 | } | ||
289 | arch_initcall(eim_init); | ||
diff --git a/arch/avr32/mach-at32ap/sm.h b/arch/avr32/mach-at32ap/sm.h index 27565822ae2a..cad02b512bcb 100644 --- a/arch/avr32/mach-at32ap/sm.h +++ b/arch/avr32/mach-at32ap/sm.h | |||
@@ -234,7 +234,9 @@ | |||
234 | #define SM_BFINS(name,value,old) (((old) & ~(((1 << SM_##name##_SIZE) - 1) << SM_##name##_OFFSET)) | SM_BF(name,value)) | 234 | #define SM_BFINS(name,value,old) (((old) & ~(((1 << SM_##name##_SIZE) - 1) << SM_##name##_OFFSET)) | SM_BF(name,value)) |
235 | 235 | ||
236 | /* Register access macros */ | 236 | /* Register access macros */ |
237 | #define sm_readl(port,reg) readl((port)->regs + SM_##reg) | 237 | #define sm_readl(port,reg) \ |
238 | #define sm_writel(port,reg,value) writel((value), (port)->regs + SM_##reg) | 238 | __raw_readl((port)->regs + SM_##reg) |
239 | #define sm_writel(port,reg,value) \ | ||
240 | __raw_writel((value), (port)->regs + SM_##reg) | ||
239 | 241 | ||
240 | #endif /* __ASM_AVR32_SM_H__ */ | 242 | #endif /* __ASM_AVR32_SM_H__ */ |
diff --git a/arch/avr32/mm/dma-coherent.c b/arch/avr32/mm/dma-coherent.c index 44ab8a7bdae2..b68d669f823d 100644 --- a/arch/avr32/mm/dma-coherent.c +++ b/arch/avr32/mm/dma-coherent.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/addrspace.h> | 11 | #include <asm/addrspace.h> |
12 | #include <asm/cacheflush.h> | 12 | #include <asm/cacheflush.h> |
13 | 13 | ||
14 | void dma_cache_sync(void *vaddr, size_t size, int direction) | 14 | void dma_cache_sync(struct device *dev, void *vaddr, size_t size, int direction) |
15 | { | 15 | { |
16 | /* | 16 | /* |
17 | * No need to sync an uncached area | 17 | * No need to sync an uncached area |
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c index 3e6c41039808..70da6894acc1 100644 --- a/arch/avr32/mm/init.c +++ b/arch/avr32/mm/init.c | |||
@@ -206,7 +206,7 @@ void __init setup_bootmem(void) | |||
206 | 206 | ||
207 | if (mem_ramdisk) { | 207 | if (mem_ramdisk) { |
208 | #ifdef CONFIG_BLK_DEV_INITRD | 208 | #ifdef CONFIG_BLK_DEV_INITRD |
209 | initrd_start = __va(mem_ramdisk->addr); | 209 | initrd_start = (unsigned long)__va(mem_ramdisk->addr); |
210 | initrd_end = initrd_start + mem_ramdisk->size; | 210 | initrd_end = initrd_start + mem_ramdisk->size; |
211 | 211 | ||
212 | print_memory_map("RAMDISK images", mem_ramdisk); | 212 | print_memory_map("RAMDISK images", mem_ramdisk); |
diff --git a/arch/avr32/mm/ioremap.c b/arch/avr32/mm/ioremap.c index 8cfec65e37f7..3437c82434ac 100644 --- a/arch/avr32/mm/ioremap.c +++ b/arch/avr32/mm/ioremap.c | |||
@@ -77,6 +77,8 @@ void __iounmap(void __iomem *addr) | |||
77 | 77 | ||
78 | if ((unsigned long)addr >= P4SEG) | 78 | if ((unsigned long)addr >= P4SEG) |
79 | return; | 79 | return; |
80 | if (PXSEG(addr) == P2SEG) | ||
81 | return; | ||
80 | 82 | ||
81 | p = remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr)); | 83 | p = remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr)); |
82 | if (unlikely(!p)) { | 84 | if (unlikely(!p)) { |