1 // SPDX-License-Identifier: GPL-2.0
3 * Renesas Technology Europe RSK+ Support.
5 * Copyright (C) 2008 Paul Mundt
8 #include <linux/init.h>
9 #include <linux/types.h>
10 #include <linux/platform_device.h>
11 #include <linux/interrupt.h>
12 #include <linux/mtd/mtd.h>
13 #include <linux/mtd/partitions.h>
14 #include <linux/mtd/physmap.h>
15 #include <linux/mtd/map.h>
16 #include <linux/regulator/fixed.h>
17 #include <linux/regulator/machine.h>
18 #include <asm/machvec.h>
21 /* Dummy supplies, where voltage doesn't matter */
22 static struct regulator_consumer_supply dummy_supplies[] = {
23 REGULATOR_SUPPLY("vddvario", "smsc911x"),
24 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
27 static struct mtd_partition rsk_partitions[] = {
32 .mask_flags = MTD_WRITEABLE,
35 .offset = MTDPART_OFS_NXTBLK,
39 .offset = MTDPART_OFS_NXTBLK,
40 .size = MTDPART_SIZ_FULL,
44 static struct physmap_flash_data flash_data = {
45 .parts = rsk_partitions,
46 .nr_parts = ARRAY_SIZE(rsk_partitions),
50 static struct resource flash_resource = {
53 .flags = IORESOURCE_MEM,
56 static struct platform_device flash_device = {
57 .name = "physmap-flash",
59 .resource = &flash_resource,
62 .platform_data = &flash_data,
66 static struct platform_device *rsk_devices[] __initdata = {
70 static int __init rsk_devices_setup(void)
72 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
74 return platform_add_devices(rsk_devices,
75 ARRAY_SIZE(rsk_devices));
77 device_initcall(rsk_devices_setup);
82 static struct sh_machine_vector mv_rsk __initmv = {