Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-rmk' of git://git.marvell.com/orion

authored by

Russell King and committed by
Russell King
492c71dd f0af7245

+583 -60
+10 -3
arch/arm/configs/orion5x_defconfig
··· 757 757 # 758 758 # Input Device Drivers 759 759 # 760 - # CONFIG_INPUT_KEYBOARD is not set 760 + CONFIG_INPUT_KEYBOARD=y 761 + # CONFIG_KEYBOARD_ATKBD is not set 762 + # CONFIG_KEYBOARD_SUNKBD is not set 763 + # CONFIG_KEYBOARD_LKKBD is not set 764 + # CONFIG_KEYBOARD_XTKBD is not set 765 + # CONFIG_KEYBOARD_NEWTON is not set 766 + # CONFIG_KEYBOARD_STOWAWAY is not set 767 + CONFIG_KEYBOARD_GPIO=y 761 768 # CONFIG_INPUT_MOUSE is not set 762 769 # CONFIG_INPUT_JOYSTICK is not set 763 770 # CONFIG_INPUT_TABLET is not set ··· 1118 1111 CONFIG_RTC_DRV_RS5C372=y 1119 1112 # CONFIG_RTC_DRV_ISL1208 is not set 1120 1113 # CONFIG_RTC_DRV_X1205 is not set 1121 - # CONFIG_RTC_DRV_PCF8563 is not set 1114 + CONFIG_RTC_DRV_PCF8563=y 1122 1115 # CONFIG_RTC_DRV_PCF8583 is not set 1123 1116 CONFIG_RTC_DRV_M41T80=y 1124 1117 # CONFIG_RTC_DRV_M41T80_WDT is not set 1125 - # CONFIG_RTC_DRV_S35390A is not set 1118 + CONFIG_RTC_DRV_S35390A=y 1126 1119 1127 1120 # 1128 1121 # SPI RTC drivers
+8
arch/arm/include/asm/memory.h
··· 150 150 #endif 151 151 152 152 /* 153 + * Amount of memory reserved for the vmalloc() area, and minimum 154 + * address for vmalloc mappings. 155 + */ 156 + extern unsigned long vmalloc_reserve; 157 + 158 + #define VMALLOC_MIN (void *)(VMALLOC_END - vmalloc_reserve) 159 + 160 + /* 153 161 * PFNs are used to describe any physical page; this means 154 162 * PFN 0 == physical address 0. 155 163 *
+13
arch/arm/kernel/setup.c
··· 81 81 unsigned int elf_hwcap; 82 82 EXPORT_SYMBOL(elf_hwcap); 83 83 84 + unsigned long __initdata vmalloc_reserve = 128 << 20; 85 + 84 86 85 87 #ifdef MULTI_CPU 86 88 struct processor processor; ··· 501 499 arm_add_memory(start, size); 502 500 } 503 501 __early_param("mem=", early_mem); 502 + 503 + /* 504 + * vmalloc=size forces the vmalloc area to be exactly 'size' 505 + * bytes. This can be used to increase (or decrease) the vmalloc 506 + * area - the default is 128m. 507 + */ 508 + static void __init early_vmalloc(char **arg) 509 + { 510 + vmalloc_reserve = memparse(*arg, arg); 511 + } 512 + __early_param("vmalloc=", early_vmalloc); 504 513 505 514 /* 506 515 * Initial parsing of the command line.
+243 -4
arch/arm/mach-kirkwood/common.c
··· 15 15 #include <linux/mbus.h> 16 16 #include <linux/mv643xx_eth.h> 17 17 #include <linux/ata_platform.h> 18 + #include <linux/spi/orion_spi.h> 18 19 #include <asm/page.h> 19 20 #include <asm/timex.h> 20 21 #include <asm/mach/map.h> 21 22 #include <asm/mach/time.h> 22 23 #include <mach/kirkwood.h> 23 - #include <asm/plat-orion/cache-feroceon-l2.h> 24 - #include <asm/plat-orion/ehci-orion.h> 25 - #include <asm/plat-orion/orion_nand.h> 26 - #include <asm/plat-orion/time.h> 24 + #include <plat/cache-feroceon-l2.h> 25 + #include <plat/ehci-orion.h> 26 + #include <plat/mv_xor.h> 27 + #include <plat/orion_nand.h> 28 + #include <plat/time.h> 27 29 #include "common.h" 28 30 29 31 /***************************************************************************** ··· 198 196 199 197 200 198 /***************************************************************************** 199 + * SPI 200 + ****************************************************************************/ 201 + static struct orion_spi_info kirkwood_spi_plat_data = { 202 + .tclk = KIRKWOOD_TCLK, 203 + }; 204 + 205 + static struct resource kirkwood_spi_resources[] = { 206 + { 207 + .start = SPI_PHYS_BASE, 208 + .end = SPI_PHYS_BASE + SZ_512 - 1, 209 + .flags = IORESOURCE_MEM, 210 + }, 211 + }; 212 + 213 + static struct platform_device kirkwood_spi = { 214 + .name = "orion_spi", 215 + .id = 0, 216 + .resource = kirkwood_spi_resources, 217 + .dev = { 218 + .platform_data = &kirkwood_spi_plat_data, 219 + }, 220 + .num_resources = ARRAY_SIZE(kirkwood_spi_resources), 221 + }; 222 + 223 + void __init kirkwood_spi_init() 224 + { 225 + platform_device_register(&kirkwood_spi); 226 + } 227 + 228 + 229 + /***************************************************************************** 201 230 * UART0 202 231 ****************************************************************************/ 203 232 static struct plat_serial8250_port kirkwood_uart0_data[] = { ··· 313 280 void __init kirkwood_uart1_init(void) 314 281 { 315 282 platform_device_register(&kirkwood_uart1); 283 + } 284 + 285 + 286 + /***************************************************************************** 287 + * XOR 288 + ****************************************************************************/ 289 + static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = { 290 + .dram = &kirkwood_mbus_dram_info, 291 + }; 292 + 293 + static u64 kirkwood_xor_dmamask = DMA_32BIT_MASK; 294 + 295 + 296 + /***************************************************************************** 297 + * XOR0 298 + ****************************************************************************/ 299 + static struct resource kirkwood_xor0_shared_resources[] = { 300 + { 301 + .name = "xor 0 low", 302 + .start = XOR0_PHYS_BASE, 303 + .end = XOR0_PHYS_BASE + 0xff, 304 + .flags = IORESOURCE_MEM, 305 + }, { 306 + .name = "xor 0 high", 307 + .start = XOR0_HIGH_PHYS_BASE, 308 + .end = XOR0_HIGH_PHYS_BASE + 0xff, 309 + .flags = IORESOURCE_MEM, 310 + }, 311 + }; 312 + 313 + static struct platform_device kirkwood_xor0_shared = { 314 + .name = MV_XOR_SHARED_NAME, 315 + .id = 0, 316 + .dev = { 317 + .platform_data = &kirkwood_xor_shared_data, 318 + }, 319 + .num_resources = ARRAY_SIZE(kirkwood_xor0_shared_resources), 320 + .resource = kirkwood_xor0_shared_resources, 321 + }; 322 + 323 + static struct resource kirkwood_xor00_resources[] = { 324 + [0] = { 325 + .start = IRQ_KIRKWOOD_XOR_00, 326 + .end = IRQ_KIRKWOOD_XOR_00, 327 + .flags = IORESOURCE_IRQ, 328 + }, 329 + }; 330 + 331 + static struct mv_xor_platform_data kirkwood_xor00_data = { 332 + .shared = &kirkwood_xor0_shared, 333 + .hw_id = 0, 334 + .pool_size = PAGE_SIZE, 335 + }; 336 + 337 + static struct platform_device kirkwood_xor00_channel = { 338 + .name = MV_XOR_NAME, 339 + .id = 0, 340 + .num_resources = ARRAY_SIZE(kirkwood_xor00_resources), 341 + .resource = kirkwood_xor00_resources, 342 + .dev = { 343 + .dma_mask = &kirkwood_xor_dmamask, 344 + .coherent_dma_mask = DMA_64BIT_MASK, 345 + .platform_data = (void *)&kirkwood_xor00_data, 346 + }, 347 + }; 348 + 349 + static struct resource kirkwood_xor01_resources[] = { 350 + [0] = { 351 + .start = IRQ_KIRKWOOD_XOR_01, 352 + .end = IRQ_KIRKWOOD_XOR_01, 353 + .flags = IORESOURCE_IRQ, 354 + }, 355 + }; 356 + 357 + static struct mv_xor_platform_data kirkwood_xor01_data = { 358 + .shared = &kirkwood_xor0_shared, 359 + .hw_id = 1, 360 + .pool_size = PAGE_SIZE, 361 + }; 362 + 363 + static struct platform_device kirkwood_xor01_channel = { 364 + .name = MV_XOR_NAME, 365 + .id = 1, 366 + .num_resources = ARRAY_SIZE(kirkwood_xor01_resources), 367 + .resource = kirkwood_xor01_resources, 368 + .dev = { 369 + .dma_mask = &kirkwood_xor_dmamask, 370 + .coherent_dma_mask = DMA_64BIT_MASK, 371 + .platform_data = (void *)&kirkwood_xor01_data, 372 + }, 373 + }; 374 + 375 + void __init kirkwood_xor0_init(void) 376 + { 377 + platform_device_register(&kirkwood_xor0_shared); 378 + 379 + /* 380 + * two engines can't do memset simultaneously, this limitation 381 + * satisfied by removing memset support from one of the engines. 382 + */ 383 + dma_cap_set(DMA_MEMCPY, kirkwood_xor00_data.cap_mask); 384 + dma_cap_set(DMA_XOR, kirkwood_xor00_data.cap_mask); 385 + platform_device_register(&kirkwood_xor00_channel); 386 + 387 + dma_cap_set(DMA_MEMCPY, kirkwood_xor01_data.cap_mask); 388 + dma_cap_set(DMA_MEMSET, kirkwood_xor01_data.cap_mask); 389 + dma_cap_set(DMA_XOR, kirkwood_xor01_data.cap_mask); 390 + platform_device_register(&kirkwood_xor01_channel); 391 + } 392 + 393 + 394 + /***************************************************************************** 395 + * XOR1 396 + ****************************************************************************/ 397 + static struct resource kirkwood_xor1_shared_resources[] = { 398 + { 399 + .name = "xor 1 low", 400 + .start = XOR1_PHYS_BASE, 401 + .end = XOR1_PHYS_BASE + 0xff, 402 + .flags = IORESOURCE_MEM, 403 + }, { 404 + .name = "xor 1 high", 405 + .start = XOR1_HIGH_PHYS_BASE, 406 + .end = XOR1_HIGH_PHYS_BASE + 0xff, 407 + .flags = IORESOURCE_MEM, 408 + }, 409 + }; 410 + 411 + static struct platform_device kirkwood_xor1_shared = { 412 + .name = MV_XOR_SHARED_NAME, 413 + .id = 1, 414 + .dev = { 415 + .platform_data = &kirkwood_xor_shared_data, 416 + }, 417 + .num_resources = ARRAY_SIZE(kirkwood_xor1_shared_resources), 418 + .resource = kirkwood_xor1_shared_resources, 419 + }; 420 + 421 + static struct resource kirkwood_xor10_resources[] = { 422 + [0] = { 423 + .start = IRQ_KIRKWOOD_XOR_10, 424 + .end = IRQ_KIRKWOOD_XOR_10, 425 + .flags = IORESOURCE_IRQ, 426 + }, 427 + }; 428 + 429 + static struct mv_xor_platform_data kirkwood_xor10_data = { 430 + .shared = &kirkwood_xor1_shared, 431 + .hw_id = 0, 432 + .pool_size = PAGE_SIZE, 433 + }; 434 + 435 + static struct platform_device kirkwood_xor10_channel = { 436 + .name = MV_XOR_NAME, 437 + .id = 2, 438 + .num_resources = ARRAY_SIZE(kirkwood_xor10_resources), 439 + .resource = kirkwood_xor10_resources, 440 + .dev = { 441 + .dma_mask = &kirkwood_xor_dmamask, 442 + .coherent_dma_mask = DMA_64BIT_MASK, 443 + .platform_data = (void *)&kirkwood_xor10_data, 444 + }, 445 + }; 446 + 447 + static struct resource kirkwood_xor11_resources[] = { 448 + [0] = { 449 + .start = IRQ_KIRKWOOD_XOR_11, 450 + .end = IRQ_KIRKWOOD_XOR_11, 451 + .flags = IORESOURCE_IRQ, 452 + }, 453 + }; 454 + 455 + static struct mv_xor_platform_data kirkwood_xor11_data = { 456 + .shared = &kirkwood_xor1_shared, 457 + .hw_id = 1, 458 + .pool_size = PAGE_SIZE, 459 + }; 460 + 461 + static struct platform_device kirkwood_xor11_channel = { 462 + .name = MV_XOR_NAME, 463 + .id = 3, 464 + .num_resources = ARRAY_SIZE(kirkwood_xor11_resources), 465 + .resource = kirkwood_xor11_resources, 466 + .dev = { 467 + .dma_mask = &kirkwood_xor_dmamask, 468 + .coherent_dma_mask = DMA_64BIT_MASK, 469 + .platform_data = (void *)&kirkwood_xor11_data, 470 + }, 471 + }; 472 + 473 + void __init kirkwood_xor1_init(void) 474 + { 475 + platform_device_register(&kirkwood_xor1_shared); 476 + 477 + /* 478 + * two engines can't do memset simultaneously, this limitation 479 + * satisfied by removing memset support from one of the engines. 480 + */ 481 + dma_cap_set(DMA_MEMCPY, kirkwood_xor10_data.cap_mask); 482 + dma_cap_set(DMA_XOR, kirkwood_xor10_data.cap_mask); 483 + platform_device_register(&kirkwood_xor10_channel); 484 + 485 + dma_cap_set(DMA_MEMCPY, kirkwood_xor11_data.cap_mask); 486 + dma_cap_set(DMA_MEMSET, kirkwood_xor11_data.cap_mask); 487 + dma_cap_set(DMA_XOR, kirkwood_xor11_data.cap_mask); 488 + platform_device_register(&kirkwood_xor11_channel); 316 489 } 317 490 318 491
+3
arch/arm/mach-kirkwood/common.h
··· 33 33 void kirkwood_pcie_init(void); 34 34 void kirkwood_rtc_init(void); 35 35 void kirkwood_sata_init(struct mv_sata_platform_data *sata_data); 36 + void kirkwood_spi_init(void); 36 37 void kirkwood_uart0_init(void); 37 38 void kirkwood_uart1_init(void); 39 + void kirkwood_xor0_init(void); 40 + void kirkwood_xor1_init(void); 38 41 39 42 extern struct sys_timer kirkwood_timer; 40 43
+9
arch/arm/mach-kirkwood/include/mach/kirkwood.h
··· 88 88 89 89 #define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x50000) 90 90 91 + #define XOR0_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x60800) 92 + #define XOR0_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x60800) 93 + #define XOR1_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x60900) 94 + #define XOR1_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x60900) 95 + #define XOR0_HIGH_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x60A00) 96 + #define XOR0_HIGH_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x60A00) 97 + #define XOR1_HIGH_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x60B00) 98 + #define XOR1_HIGH_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x60B00) 99 + 91 100 #define GE00_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x70000) 92 101 #define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x74000) 93 102
+1 -1
arch/arm/mach-kirkwood/irq.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/irq.h> 14 14 #include <linux/io.h> 15 - #include <asm/plat-orion/irq.h> 15 + #include <plat/irq.h> 16 16 #include "common.h" 17 17 18 18 void __init kirkwood_init_irq(void)
+1 -1
arch/arm/mach-kirkwood/pcie.c
··· 12 12 #include <linux/pci.h> 13 13 #include <linux/mbus.h> 14 14 #include <asm/mach/pci.h> 15 - #include <asm/plat-orion/pcie.h> 15 + #include <plat/pcie.h> 16 16 #include "common.h" 17 17 18 18
+23
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
··· 18 18 #include <linux/timer.h> 19 19 #include <linux/ata_platform.h> 20 20 #include <linux/mv643xx_eth.h> 21 + #include <linux/spi/flash.h> 22 + #include <linux/spi/spi.h> 23 + #include <linux/spi/orion_spi.h> 21 24 #include <asm/mach-types.h> 22 25 #include <asm/mach/arch.h> 23 26 #include <asm/mach/pci.h> ··· 37 34 .n_ports = 2, 38 35 }; 39 36 37 + static const struct flash_platform_data rd88F6192_spi_slave_data = { 38 + .type = "m25p128", 39 + }; 40 + 41 + static struct spi_board_info __initdata rd88F6192_spi_slave_info[] = { 42 + { 43 + .modalias = "m25p80", 44 + .platform_data = &rd88F6192_spi_slave_data, 45 + .irq = -1, 46 + .max_speed_hz = 20000000, 47 + .bus_num = 0, 48 + .chip_select = 0, 49 + }, 50 + }; 51 + 40 52 static void __init rd88f6192_init(void) 41 53 { 42 54 /* ··· 63 45 kirkwood_ge00_init(&rd88f6192_ge00_data); 64 46 kirkwood_rtc_init(); 65 47 kirkwood_sata_init(&rd88f6192_sata_data); 48 + spi_register_board_info(rd88F6192_spi_slave_info, 49 + ARRAY_SIZE(rd88F6192_spi_slave_info)); 50 + kirkwood_spi_init(); 66 51 kirkwood_uart0_init(); 52 + kirkwood_xor0_init(); 53 + kirkwood_xor1_init(); 67 54 } 68 55 69 56 static int __init rd88f6192_pci_init(void)
+1 -1
arch/arm/mach-kirkwood/rd88f6281-setup.c
··· 23 23 #include <asm/mach/arch.h> 24 24 #include <asm/mach/pci.h> 25 25 #include <mach/kirkwood.h> 26 - #include <asm/plat-orion/orion_nand.h> 26 + #include <plat/orion_nand.h> 27 27 #include "common.h" 28 28 29 29 static struct mtd_partition rd88f6281_nand_parts[] = {
+2 -2
arch/arm/mach-loki/common.c
··· 19 19 #include <asm/mach/map.h> 20 20 #include <asm/mach/time.h> 21 21 #include <mach/loki.h> 22 - #include <asm/plat-orion/orion_nand.h> 23 - #include <asm/plat-orion/time.h> 22 + #include <plat/orion_nand.h> 23 + #include <plat/time.h> 24 24 #include "common.h" 25 25 26 26 /*****************************************************************************
+1 -1
arch/arm/mach-loki/irq.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/irq.h> 14 14 #include <asm/io.h> 15 - #include <asm/plat-orion/irq.h> 15 + #include <plat/irq.h> 16 16 #include "common.h" 17 17 18 18 void __init loki_init_irq(void)
+4 -4
arch/arm/mach-mv78xx0/common.c
··· 18 18 #include <asm/mach/map.h> 19 19 #include <asm/mach/time.h> 20 20 #include <mach/mv78xx0.h> 21 - #include <asm/plat-orion/cache-feroceon-l2.h> 22 - #include <asm/plat-orion/ehci-orion.h> 23 - #include <asm/plat-orion/orion_nand.h> 24 - #include <asm/plat-orion/time.h> 21 + #include <plat/cache-feroceon-l2.h> 22 + #include <plat/ehci-orion.h> 23 + #include <plat/orion_nand.h> 24 + #include <plat/time.h> 25 25 #include "common.h" 26 26 27 27
+1 -1
arch/arm/mach-mv78xx0/irq.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/pci.h> 14 14 #include <mach/mv78xx0.h> 15 - #include <asm/plat-orion/irq.h> 15 + #include <plat/irq.h> 16 16 #include "common.h" 17 17 18 18 void __init mv78xx0_init_irq(void)
+1 -1
arch/arm/mach-mv78xx0/pcie.c
··· 12 12 #include <linux/pci.h> 13 13 #include <linux/mbus.h> 14 14 #include <asm/mach/pci.h> 15 - #include <asm/plat-orion/pcie.h> 15 + #include <plat/pcie.h> 16 16 #include "common.h" 17 17 18 18 struct pcie_port {
+112 -3
arch/arm/mach-orion5x/common.c
··· 26 26 #include <asm/mach/time.h> 27 27 #include <mach/hardware.h> 28 28 #include <mach/orion5x.h> 29 - #include <asm/plat-orion/ehci-orion.h> 30 - #include <asm/plat-orion/orion_nand.h> 31 - #include <asm/plat-orion/time.h> 29 + #include <plat/ehci-orion.h> 30 + #include <plat/mv_xor.h> 31 + #include <plat/orion_nand.h> 32 + #include <plat/time.h> 32 33 #include "common.h" 33 34 34 35 /***************************************************************************** ··· 356 355 357 356 358 357 /***************************************************************************** 358 + * XOR engine 359 + ****************************************************************************/ 360 + static struct resource orion5x_xor_shared_resources[] = { 361 + { 362 + .name = "xor low", 363 + .start = ORION5X_XOR_PHYS_BASE, 364 + .end = ORION5X_XOR_PHYS_BASE + 0xff, 365 + .flags = IORESOURCE_MEM, 366 + }, { 367 + .name = "xor high", 368 + .start = ORION5X_XOR_PHYS_BASE + 0x200, 369 + .end = ORION5X_XOR_PHYS_BASE + 0x2ff, 370 + .flags = IORESOURCE_MEM, 371 + }, 372 + }; 373 + 374 + static struct platform_device orion5x_xor_shared = { 375 + .name = MV_XOR_SHARED_NAME, 376 + .id = 0, 377 + .num_resources = ARRAY_SIZE(orion5x_xor_shared_resources), 378 + .resource = orion5x_xor_shared_resources, 379 + }; 380 + 381 + static u64 orion5x_xor_dmamask = DMA_32BIT_MASK; 382 + 383 + static struct resource orion5x_xor0_resources[] = { 384 + [0] = { 385 + .start = IRQ_ORION5X_XOR0, 386 + .end = IRQ_ORION5X_XOR0, 387 + .flags = IORESOURCE_IRQ, 388 + }, 389 + }; 390 + 391 + static struct mv_xor_platform_data orion5x_xor0_data = { 392 + .shared = &orion5x_xor_shared, 393 + .hw_id = 0, 394 + .pool_size = PAGE_SIZE, 395 + }; 396 + 397 + static struct platform_device orion5x_xor0_channel = { 398 + .name = MV_XOR_NAME, 399 + .id = 0, 400 + .num_resources = ARRAY_SIZE(orion5x_xor0_resources), 401 + .resource = orion5x_xor0_resources, 402 + .dev = { 403 + .dma_mask = &orion5x_xor_dmamask, 404 + .coherent_dma_mask = DMA_64BIT_MASK, 405 + .platform_data = (void *)&orion5x_xor0_data, 406 + }, 407 + }; 408 + 409 + static struct resource orion5x_xor1_resources[] = { 410 + [0] = { 411 + .start = IRQ_ORION5X_XOR1, 412 + .end = IRQ_ORION5X_XOR1, 413 + .flags = IORESOURCE_IRQ, 414 + }, 415 + }; 416 + 417 + static struct mv_xor_platform_data orion5x_xor1_data = { 418 + .shared = &orion5x_xor_shared, 419 + .hw_id = 1, 420 + .pool_size = PAGE_SIZE, 421 + }; 422 + 423 + static struct platform_device orion5x_xor1_channel = { 424 + .name = MV_XOR_NAME, 425 + .id = 1, 426 + .num_resources = ARRAY_SIZE(orion5x_xor1_resources), 427 + .resource = orion5x_xor1_resources, 428 + .dev = { 429 + .dma_mask = &orion5x_xor_dmamask, 430 + .coherent_dma_mask = DMA_64BIT_MASK, 431 + .platform_data = (void *)&orion5x_xor1_data, 432 + }, 433 + }; 434 + 435 + void __init orion5x_xor_init(void) 436 + { 437 + platform_device_register(&orion5x_xor_shared); 438 + 439 + /* 440 + * two engines can't do memset simultaneously, this limitation 441 + * satisfied by removing memset support from one of the engines. 442 + */ 443 + dma_cap_set(DMA_MEMCPY, orion5x_xor0_data.cap_mask); 444 + dma_cap_set(DMA_XOR, orion5x_xor0_data.cap_mask); 445 + platform_device_register(&orion5x_xor0_channel); 446 + 447 + dma_cap_set(DMA_MEMCPY, orion5x_xor1_data.cap_mask); 448 + dma_cap_set(DMA_MEMSET, orion5x_xor1_data.cap_mask); 449 + dma_cap_set(DMA_XOR, orion5x_xor1_data.cap_mask); 450 + platform_device_register(&orion5x_xor1_channel); 451 + } 452 + 453 + 454 + /***************************************************************************** 359 455 * Time handling 360 456 ****************************************************************************/ 361 457 static void orion5x_timer_init(void) ··· 480 382 *dev_name = "MV88F5281-D2"; 481 383 } else if (*rev == MV88F5281_REV_D1) { 482 384 *dev_name = "MV88F5281-D1"; 385 + } else if (*rev == MV88F5281_REV_D0) { 386 + *dev_name = "MV88F5281-D0"; 483 387 } else { 484 388 *dev_name = "MV88F5281-Rev-Unsupported"; 485 389 } ··· 516 416 * Setup Orion address map 517 417 */ 518 418 orion5x_setup_cpu_mbus_bridge(); 419 + 420 + /* 421 + * Don't issue "Wait for Interrupt" instruction if we are 422 + * running on D0 5281 silicon. 423 + */ 424 + if (dev == MV88F5281_DEV_ID && rev == MV88F5281_REV_D0) { 425 + printk(KERN_INFO "Orion: Applying 5281 D0 WFI workaround.\n"); 426 + disable_hlt(); 427 + } 519 428 } 520 429 521 430 /*
+1
arch/arm/mach-orion5x/common.h
··· 32 32 void orion5x_sata_init(struct mv_sata_platform_data *sata_data); 33 33 void orion5x_uart0_init(void); 34 34 void orion5x_uart1_init(void); 35 + void orion5x_xor_init(void); 35 36 36 37 /* 37 38 * PCIe/PCI functions.
+1 -1
arch/arm/mach-orion5x/db88f5281-setup.c
··· 25 25 #include <asm/mach/arch.h> 26 26 #include <asm/mach/pci.h> 27 27 #include <mach/orion5x.h> 28 - #include <asm/plat-orion/orion_nand.h> 28 + #include <plat/orion_nand.h> 29 29 #include "common.h" 30 30 #include "mpp.h" 31 31
+5
arch/arm/mach-orion5x/include/mach/orion5x.h
··· 73 73 #define MV88F5182_REV_A2 2 74 74 /* Orion-2 (88F5281) */ 75 75 #define MV88F5281_DEV_ID 0x5281 76 + #define MV88F5281_REV_D0 4 76 77 #define MV88F5281_REV_D1 5 77 78 #define MV88F5281_REV_D2 6 78 79 ··· 105 104 #define ORION5X_USB0_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x50000) 106 105 #define ORION5X_USB0_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x50000) 107 106 #define ORION5X_USB0_REG(x) (ORION5X_USB0_VIRT_BASE | (x)) 107 + 108 + #define ORION5X_XOR_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x60900) 109 + #define ORION5X_XOR_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x60900) 110 + #define ORION5X_XOR_REG(x) (ORION5X_XOR_VIRT_BASE | (x)) 108 111 109 112 #define ORION5X_ETH_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x70000) 110 113 #define ORION5X_ETH_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x70000)
+1 -1
arch/arm/mach-orion5x/irq.c
··· 16 16 #include <asm/gpio.h> 17 17 #include <asm/io.h> 18 18 #include <mach/orion5x.h> 19 - #include <asm/plat-orion/irq.h> 19 + #include <plat/irq.h> 20 20 #include "common.h" 21 21 22 22 /*****************************************************************************
+2 -1
arch/arm/mach-orion5x/kurobox_pro-setup.c
··· 25 25 #include <asm/mach/arch.h> 26 26 #include <asm/mach/pci.h> 27 27 #include <mach/orion5x.h> 28 - #include <asm/plat-orion/orion_nand.h> 28 + #include <plat/orion_nand.h> 29 29 #include "common.h" 30 30 #include "mpp.h" 31 31 ··· 356 356 orion5x_sata_init(&kurobox_pro_sata_data); 357 357 orion5x_uart0_init(); 358 358 orion5x_uart1_init(); 359 + orion5x_xor_init(); 359 360 360 361 orion5x_setup_dev_boot_win(KUROBOX_PRO_NOR_BOOT_BASE, 361 362 KUROBOX_PRO_NOR_BOOT_SIZE);
+1
arch/arm/mach-orion5x/mss2-setup.c
··· 239 239 orion5x_i2c_init(); 240 240 orion5x_sata_init(&mss2_sata_data); 241 241 orion5x_uart0_init(); 242 + orion5x_xor_init(); 242 243 243 244 orion5x_setup_dev_boot_win(MSS2_NOR_BOOT_BASE, MSS2_NOR_BOOT_SIZE); 244 245 platform_device_register(&mss2_nor_flash);
+1
arch/arm/mach-orion5x/mv2120-setup.c
··· 203 203 orion5x_i2c_init(); 204 204 orion5x_sata_init(&mv2120_sata_data); 205 205 orion5x_uart0_init(); 206 + orion5x_xor_init(); 206 207 207 208 orion5x_setup_dev_boot_win(MV2120_NOR_BOOT_BASE, MV2120_NOR_BOOT_SIZE); 208 209 platform_device_register(&mv2120_nor_flash);
+1 -1
arch/arm/mach-orion5x/pci.c
··· 14 14 #include <linux/pci.h> 15 15 #include <linux/mbus.h> 16 16 #include <asm/mach/pci.h> 17 - #include <asm/plat-orion/pcie.h> 17 + #include <plat/pcie.h> 18 18 #include "common.h" 19 19 20 20 /*****************************************************************************
+1
arch/arm/mach-orion5x/rd88f5182-setup.c
··· 292 292 orion5x_i2c_init(); 293 293 orion5x_sata_init(&rd88f5182_sata_data); 294 294 orion5x_uart0_init(); 295 + orion5x_xor_init(); 295 296 296 297 orion5x_setup_dev_boot_win(RD88F5182_NOR_BOOT_BASE, 297 298 RD88F5182_NOR_BOOT_SIZE);
+3 -2
arch/arm/mach-orion5x/ts209-setup.c
··· 207 207 208 208 static struct gpio_keys_button qnap_ts209_buttons[] = { 209 209 { 210 - .code = KEY_RESTART, 210 + .code = KEY_COPY, 211 211 .gpio = QNAP_TS209_GPIO_KEY_MEDIA, 212 212 .desc = "USB Copy Button", 213 213 .active_low = 1, 214 214 }, { 215 - .code = KEY_POWER, 215 + .code = KEY_RESTART, 216 216 .gpio = QNAP_TS209_GPIO_KEY_RESET, 217 217 .desc = "Reset Button", 218 218 .active_low = 1, ··· 296 296 orion5x_i2c_init(); 297 297 orion5x_sata_init(&qnap_ts209_sata_data); 298 298 orion5x_uart0_init(); 299 + orion5x_xor_init(); 299 300 300 301 orion5x_setup_dev_boot_win(QNAP_TS209_NOR_BOOT_BASE, 301 302 QNAP_TS209_NOR_BOOT_SIZE);
+48
arch/arm/mach-orion5x/ts409-setup.c
··· 3 3 * 4 4 * Maintainer: Sylver Bruneau <sylver.bruneau@gmail.com> 5 5 * 6 + * Copyright (C) 2008 Sylver Bruneau <sylver.bruneau@gmail.com> 7 + * Copyright (C) 2008 Martin Michlmayr <tbm@cyrius.com> 8 + * 6 9 * This program is free software; you can redistribute it and/or 7 10 * modify it under the terms of the GNU General Public License 8 11 * as published by the Free Software Foundation; either version ··· 19 16 #include <linux/irq.h> 20 17 #include <linux/mtd/physmap.h> 21 18 #include <linux/mv643xx_eth.h> 19 + #include <linux/leds.h> 22 20 #include <linux/gpio_keys.h> 23 21 #include <linux/input.h> 24 22 #include <linux/i2c.h> ··· 166 162 I2C_BOARD_INFO("s35390a", 0x30), 167 163 }; 168 164 165 + /***************************************************************************** 166 + * LEDs attached to GPIO 167 + ****************************************************************************/ 168 + 169 + static struct gpio_led ts409_led_pins[] = { 170 + { 171 + .name = "ts409:red:sata1", 172 + .gpio = 4, 173 + .active_low = 1, 174 + }, { 175 + .name = "ts409:red:sata2", 176 + .gpio = 5, 177 + .active_low = 1, 178 + }, { 179 + .name = "ts409:red:sata3", 180 + .gpio = 6, 181 + .active_low = 1, 182 + }, { 183 + .name = "ts409:red:sata4", 184 + .gpio = 7, 185 + .active_low = 1, 186 + }, 187 + }; 188 + 189 + static struct gpio_led_platform_data ts409_led_data = { 190 + .leds = ts409_led_pins, 191 + .num_leds = ARRAY_SIZE(ts409_led_pins), 192 + }; 193 + 194 + static struct platform_device ts409_leds = { 195 + .name = "leds-gpio", 196 + .id = -1, 197 + .dev = { 198 + .platform_data = &ts409_led_data, 199 + }, 200 + }; 201 + 169 202 /**************************************************************************** 170 203 * GPIO Attached Keys 171 204 * Power button is attached to the PIC microcontroller 172 205 ****************************************************************************/ 173 206 207 + #define QNAP_TS409_GPIO_KEY_RESET 14 174 208 #define QNAP_TS409_GPIO_KEY_MEDIA 15 175 209 176 210 static struct gpio_keys_button qnap_ts409_buttons[] = { 177 211 { 178 212 .code = KEY_RESTART, 213 + .gpio = QNAP_TS409_GPIO_KEY_RESET, 214 + .desc = "Reset Button", 215 + .active_low = 1, 216 + }, { 217 + .code = KEY_COPY, 179 218 .gpio = QNAP_TS409_GPIO_KEY_MEDIA, 180 219 .desc = "USB Copy Button", 181 220 .active_low = 1, ··· 302 255 if (qnap_ts409_i2c_rtc.irq == 0) 303 256 pr_warning("qnap_ts409_init: failed to get RTC IRQ\n"); 304 257 i2c_register_board_info(0, &qnap_ts409_i2c_rtc, 1); 258 + platform_device_register(&ts409_leds); 305 259 306 260 /* register tsx09 specific power-off method */ 307 261 pm_power_off = qnap_tsx09_power_off;
+1
arch/arm/mach-orion5x/ts78xx-setup.c
··· 256 256 orion5x_sata_init(&ts78xx_sata_data); 257 257 orion5x_uart0_init(); 258 258 orion5x_uart1_init(); 259 + orion5x_xor_init(); 259 260 260 261 orion5x_setup_dev_boot_win(TS78XX_NOR_BOOT_BASE, 261 262 TS78XX_NOR_BOOT_SIZE);
+1 -1
arch/arm/mm/cache-feroceon-l2.c
··· 14 14 15 15 #include <linux/init.h> 16 16 #include <asm/cacheflush.h> 17 - #include <asm/plat-orion/cache-feroceon-l2.h> 17 + #include <plat/cache-feroceon-l2.h> 18 18 19 19 20 20 /*
+50
arch/arm/mm/mmu.c
··· 568 568 create_mapping(io_desc + i); 569 569 } 570 570 571 + static int __init check_membank_valid(struct membank *mb) 572 + { 573 + /* 574 + * Check whether this memory region has non-zero size. 575 + */ 576 + if (mb->size == 0) 577 + return 0; 578 + 579 + /* 580 + * Check whether this memory region would entirely overlap 581 + * the vmalloc area. 582 + */ 583 + if (phys_to_virt(mb->start) >= VMALLOC_MIN) { 584 + printk(KERN_NOTICE "Ignoring RAM at %.8lx-%.8lx " 585 + "(vmalloc region overlap).\n", 586 + mb->start, mb->start + mb->size - 1); 587 + return 0; 588 + } 589 + 590 + /* 591 + * Check whether this memory region would partially overlap 592 + * the vmalloc area. 593 + */ 594 + if (phys_to_virt(mb->start + mb->size) < phys_to_virt(mb->start) || 595 + phys_to_virt(mb->start + mb->size) > VMALLOC_MIN) { 596 + unsigned long newsize = VMALLOC_MIN - phys_to_virt(mb->start); 597 + 598 + printk(KERN_NOTICE "Truncating RAM at %.8lx-%.8lx " 599 + "to -%.8lx (vmalloc region overlap).\n", 600 + mb->start, mb->start + mb->size - 1, 601 + mb->start + newsize - 1); 602 + mb->size = newsize; 603 + } 604 + 605 + return 1; 606 + } 607 + 608 + static void __init sanity_check_meminfo(struct meminfo *mi) 609 + { 610 + int i; 611 + int j; 612 + 613 + for (i = 0, j = 0; i < mi->nr_banks; i++) { 614 + if (check_membank_valid(&mi->bank[i])) 615 + mi->bank[j++] = mi->bank[i]; 616 + } 617 + mi->nr_banks = j; 618 + } 619 + 571 620 static inline void prepare_page_table(struct meminfo *mi) 572 621 { 573 622 unsigned long addr; ··· 802 753 void *zero_page; 803 754 804 755 build_mem_type_table(); 756 + sanity_check_meminfo(mi); 805 757 prepare_page_table(mi); 806 758 bootmem_init(mi); 807 759 devicemaps_init(mdesc);
+1 -1
arch/arm/plat-orion/irq.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/irq.h> 14 14 #include <linux/io.h> 15 - #include <asm/plat-orion/irq.h> 15 + #include <plat/irq.h> 16 16 17 17 static void orion_irq_mask(u32 irq) 18 18 {
+1 -1
arch/arm/plat-orion/pcie.c
··· 12 12 #include <linux/pci.h> 13 13 #include <linux/mbus.h> 14 14 #include <asm/mach/pci.h> 15 - #include <asm/plat-orion/pcie.h> 15 + #include <plat/pcie.h> 16 16 17 17 /* 18 18 * PCIe unit register offsets.
+1 -1
drivers/dma/mv_xor.c
··· 25 25 #include <linux/interrupt.h> 26 26 #include <linux/platform_device.h> 27 27 #include <linux/memory.h> 28 - #include <asm/plat-orion/mv_xor.h> 28 + #include <plat/mv_xor.h> 29 29 #include "mv_xor.h" 30 30 31 31 static void mv_xor_issue_pending(struct dma_chan *chan);
+1 -1
drivers/mtd/nand/orion_nand.c
··· 19 19 #include <asm/io.h> 20 20 #include <asm/sizes.h> 21 21 #include <mach/hardware.h> 22 - #include <asm/plat-orion/orion_nand.h> 22 + #include <plat/orion_nand.h> 23 23 24 24 #ifdef CONFIG_MTD_CMDLINE_PARTS 25 25 static const char *part_probes[] = { "cmdlinepart", NULL };
+1 -1
drivers/usb/host/ehci-orion.c
··· 12 12 #include <linux/module.h> 13 13 #include <linux/platform_device.h> 14 14 #include <linux/mbus.h> 15 - #include <asm/plat-orion/ehci-orion.h> 15 + #include <plat/ehci-orion.h> 16 16 17 17 #define rdl(off) __raw_readl(hcd->regs + (off)) 18 18 #define wrl(off, val) __raw_writel((val), hcd->regs + (off))
+1 -1
include/asm-arm/plat-orion/cache-feroceon-l2.h arch/arm/plat-orion/include/plat/cache-feroceon-l2.h
··· 1 1 /* 2 - * include/asm-arm/plat-orion/cache-feroceon-l2.h 2 + * arch/arm/plat-orion/include/plat/cache-feroceon-l2.h 3 3 * 4 4 * Copyright (C) 2008 Marvell Semiconductor 5 5 *
+6 -8
include/asm-arm/plat-orion/ehci-orion.h arch/arm/plat-orion/include/plat/time.h
··· 1 1 /* 2 - * include/asm-arm/plat-orion/ehci-orion.h 2 + * arch/arm/plat-orion/include/plat/time.h 3 + * 4 + * Marvell Orion SoC time handling. 3 5 * 4 6 * This file is licensed under the terms of the GNU General Public 5 7 * License version 2. This program is licensed "as is" without any 6 8 * warranty of any kind, whether express or implied. 7 9 */ 8 10 9 - #ifndef __ASM_PLAT_ORION_EHCI_ORION_H 10 - #define __ASM_PLAT_ORION_EHCI_ORION_H 11 + #ifndef __PLAT_TIME_H 12 + #define __PLAT_TIME_H 11 13 12 - #include <linux/mbus.h> 13 - 14 - struct orion_ehci_data { 15 - struct mbus_dram_target_info *dram; 16 - }; 14 + void orion_time_init(unsigned int irq, unsigned int tclk); 17 15 18 16 19 17 #endif
+3 -3
include/asm-arm/plat-orion/irq.h arch/arm/plat-orion/include/plat/irq.h
··· 1 1 /* 2 - * include/asm-arm/plat-orion/irq.h 2 + * arch/arm/plat-orion/include/plat/irq.h 3 3 * 4 4 * Marvell Orion SoC IRQ handling. 5 5 * ··· 8 8 * warranty of any kind, whether express or implied. 9 9 */ 10 10 11 - #ifndef __ASM_PLAT_ORION_IRQ_H 12 - #define __ASM_PLAT_ORION_IRQ_H 11 + #ifndef __PLAT_IRQ_H 12 + #define __PLAT_IRQ_H 13 13 14 14 void orion_irq_init(unsigned int irq_start, void __iomem *maskaddr); 15 15
+4 -2
include/asm-arm/plat-orion/mv_xor.h arch/arm/plat-orion/include/plat/mv_xor.h
··· 1 1 /* 2 + * arch/arm/plat-orion/include/plat/mv_xor.h 3 + * 2 4 * Marvell XOR platform device data definition file. 3 5 */ 4 6 5 - #ifndef __ASM_PLAT_ORION_MV_XOR_H 6 - #define __ASM_PLAT_ORION_MV_XOR_H 7 + #ifndef __PLAT_MV_XOR_H 8 + #define __PLAT_MV_XOR_H 7 9 8 10 #include <linux/dmaengine.h> 9 11 #include <linux/mbus.h>
+3 -3
include/asm-arm/plat-orion/orion_nand.h arch/arm/plat-orion/include/plat/orion_nand.h
··· 1 1 /* 2 - * include/asm-arm/plat-orion/orion_nand.h 2 + * arch/arm/plat-orion/include/plat/orion_nand.h 3 3 * 4 4 * This file is licensed under the terms of the GNU General Public 5 5 * License version 2. This program is licensed "as is" without any 6 6 * warranty of any kind, whether express or implied. 7 7 */ 8 8 9 - #ifndef __ASM_PLAT_ORION_ORION_NAND_H 10 - #define __ASM_PLAT_ORION_ORION_NAND_H 9 + #ifndef __PLAT_ORION_NAND_H 10 + #define __PLAT_ORION_NAND_H 11 11 12 12 /* 13 13 * Device bus NAND private data
+3 -3
include/asm-arm/plat-orion/pcie.h arch/arm/plat-orion/include/plat/pcie.h
··· 1 1 /* 2 - * include/asm-arm/plat-orion/pcie.h 2 + * arch/arm/plat-orion/include/plat/pcie.h 3 3 * 4 4 * Marvell Orion SoC PCIe handling. 5 5 * ··· 8 8 * warranty of any kind, whether express or implied. 9 9 */ 10 10 11 - #ifndef __ASM_PLAT_ORION_PCIE_H 12 - #define __ASM_PLAT_ORION_PCIE_H 11 + #ifndef __PLAT_PCIE_H 12 + #define __PLAT_PCIE_H 13 13 14 14 u32 orion_pcie_dev_id(void __iomem *base); 15 15 u32 orion_pcie_rev(void __iomem *base);
+8 -6
include/asm-arm/plat-orion/time.h arch/arm/plat-orion/include/plat/ehci-orion.h
··· 1 1 /* 2 - * include/asm-arm/plat-orion/time.h 3 - * 4 - * Marvell Orion SoC time handling. 2 + * arch/arm/plat-orion/include/plat/ehci-orion.h 5 3 * 6 4 * This file is licensed under the terms of the GNU General Public 7 5 * License version 2. This program is licensed "as is" without any 8 6 * warranty of any kind, whether express or implied. 9 7 */ 10 8 11 - #ifndef __ASM_PLAT_ORION_TIME_H 12 - #define __ASM_PLAT_ORION_TIME_H 9 + #ifndef __PLAT_EHCI_ORION_H 10 + #define __PLAT_EHCI_ORION_H 13 11 14 - void orion_time_init(unsigned int irq, unsigned int tclk); 12 + #include <linux/mbus.h> 13 + 14 + struct orion_ehci_data { 15 + struct mbus_dram_target_info *dram; 16 + }; 15 17 16 18 17 19 #endif