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

sh: sh7724: Add SPU2 support

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

authored by

Kuninori Morimoto and committed by
Paul Mundt
2de33923 8820002c

+68
+68
arch/sh/kernel/cpu/sh4a/setup-sh7724.c
··· 525 525 }, 526 526 }; 527 527 528 + /* SPU2DSP0 */ 529 + static struct uio_info spu0_platform_data = { 530 + .name = "SPU2DSP0", 531 + .version = "0", 532 + .irq = 86, 533 + }; 534 + 535 + static struct resource spu0_resources[] = { 536 + [0] = { 537 + .name = "SPU2DSP0", 538 + .start = 0xFE200000, 539 + .end = 0xFE2FFFFF, 540 + .flags = IORESOURCE_MEM, 541 + }, 542 + [1] = { 543 + /* place holder for contiguous memory */ 544 + }, 545 + }; 546 + 547 + static struct platform_device spu0_device = { 548 + .name = "uio_pdrv_genirq", 549 + .id = 4, 550 + .dev = { 551 + .platform_data = &spu0_platform_data, 552 + }, 553 + .resource = spu0_resources, 554 + .num_resources = ARRAY_SIZE(spu0_resources), 555 + .archdata = { 556 + .hwblk_id = HWBLK_SPU, 557 + }, 558 + }; 559 + 560 + /* SPU2DSP1 */ 561 + static struct uio_info spu1_platform_data = { 562 + .name = "SPU2DSP1", 563 + .version = "0", 564 + .irq = 87, 565 + }; 566 + 567 + static struct resource spu1_resources[] = { 568 + [0] = { 569 + .name = "SPU2DSP1", 570 + .start = 0xFE300000, 571 + .end = 0xFE3FFFFF, 572 + .flags = IORESOURCE_MEM, 573 + }, 574 + [1] = { 575 + /* place holder for contiguous memory */ 576 + }, 577 + }; 578 + 579 + static struct platform_device spu1_device = { 580 + .name = "uio_pdrv_genirq", 581 + .id = 5, 582 + .dev = { 583 + .platform_data = &spu1_platform_data, 584 + }, 585 + .resource = spu1_resources, 586 + .num_resources = ARRAY_SIZE(spu1_resources), 587 + .archdata = { 588 + .hwblk_id = HWBLK_SPU, 589 + }, 590 + }; 591 + 528 592 static struct platform_device *sh7724_devices[] __initdata = { 529 593 &cmt_device, 530 594 &tmu0_device, ··· 605 541 &veu0_device, 606 542 &veu1_device, 607 543 &jpu_device, 544 + &spu0_device, 545 + &spu1_device, 608 546 }; 609 547 610 548 static int __init sh7724_devices_setup(void) ··· 615 549 platform_resource_setup_memory(&veu0_device, "veu0", 2 << 20); 616 550 platform_resource_setup_memory(&veu1_device, "veu1", 2 << 20); 617 551 platform_resource_setup_memory(&jpu_device, "jpu", 2 << 20); 552 + platform_resource_setup_memory(&spu0_device, "spu0", 2 << 20); 553 + platform_resource_setup_memory(&spu1_device, "spu1", 2 << 20); 618 554 619 555 return platform_add_devices(sh7724_devices, 620 556 ARRAY_SIZE(sh7724_devices));