3 * (Compatible with Algo System ., LTD. - AP-320A)
5 * Copyright (C) 2008 Renesas Solutions Corp.
6 * Author : Yusuke Goda <goda.yuske@renesas.com>
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
13 #include <linux/init.h>
14 #include <linux/device.h>
15 #include <linux/platform_device.h>
16 #include <linux/mtd/physmap.h>
17 #include <linux/delay.h>
18 #include <linux/i2c.h>
21 static struct resource smc9118_resources
[] = {
25 .flags
= IORESOURCE_MEM
,
30 .flags
= IORESOURCE_IRQ
,
34 static struct platform_device smc9118_device
= {
37 .num_resources
= ARRAY_SIZE(smc9118_resources
),
38 .resource
= smc9118_resources
,
41 static struct mtd_partition ap325rxa_nor_flash_partitions
[] = {
45 .size
= (1 * 1024 * 1024),
46 .mask_flags
= MTD_WRITEABLE
, /* Read-only */
49 .offset
= MTDPART_OFS_APPEND
,
50 .size
= (2 * 1024 * 1024),
53 .offset
= MTDPART_OFS_APPEND
,
54 .size
= MTDPART_SIZ_FULL
,
58 static struct physmap_flash_data ap325rxa_nor_flash_data
= {
60 .parts
= ap325rxa_nor_flash_partitions
,
61 .nr_parts
= ARRAY_SIZE(ap325rxa_nor_flash_partitions
),
64 static struct resource ap325rxa_nor_flash_resources
[] = {
69 .flags
= IORESOURCE_MEM
,
73 static struct platform_device ap325rxa_nor_flash_device
= {
74 .name
= "physmap-flash",
75 .resource
= ap325rxa_nor_flash_resources
,
76 .num_resources
= ARRAY_SIZE(ap325rxa_nor_flash_resources
),
78 .platform_data
= &ap325rxa_nor_flash_data
,
82 static struct platform_device
*ap325rxa_devices
[] __initdata
= {
84 &ap325rxa_nor_flash_device
87 static struct i2c_board_info __initdata ap325rxa_i2c_devices
[] = {
90 static int __init
ap325rxa_devices_setup(void)
92 i2c_register_board_info(0, ap325rxa_i2c_devices
,
93 ARRAY_SIZE(ap325rxa_i2c_devices
));
95 return platform_add_devices(ap325rxa_devices
,
96 ARRAY_SIZE(ap325rxa_devices
));
98 device_initcall(ap325rxa_devices_setup
);
100 static void __init
ap325rxa_setup(char **cmdline_p
)
104 static struct sh_machine_vector mv_ap325rxa __initmv
= {
105 .mv_name
= "AP-325RXA",
106 .mv_setup
= ap325rxa_setup
,