Skip to content

Commit

Permalink
sh: add platform_device for SPI
Browse files Browse the repository at this point in the history
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Yoshihiro Shimoda authored and Paul Mundt committed Mar 11, 2011
1 parent 0fe4860 commit d037166
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions arch/sh/kernel/cpu/sh4a/setup-sh7757.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,36 @@ static struct platform_device tmu1_device = {
.num_resources = ARRAY_SIZE(tmu1_resources),
};

static struct resource spi0_resources[] = {
[0] = {
.start = 0xfe002000,
.end = 0xfe0020ff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 86,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device spi0_device = {
.name = "sh_spi",
.id = 0,
.dev = {
.dma_mask = NULL,
.coherent_dma_mask = 0xffffffff,
},
.num_resources = ARRAY_SIZE(spi0_resources),
.resource = spi0_resources,
};

static struct platform_device *sh7757_devices[] __initdata = {
&scif2_device,
&scif3_device,
&scif4_device,
&tmu0_device,
&tmu1_device,
&spi0_device,
};

static int __init sh7757_devices_setup(void)
Expand Down

0 comments on commit d037166

Please sign in to comment.