setup.c (a9de18eb761f7c1c860964b2e5addc1a35c7e861) | setup.c (c2e0090c668fc99f5be65fd9907da781cb6a2ef5) |
---|---|
1/* 2 * Renesas Technology Sales RTS7751R2D Support. 3 * 4 * Copyright (C) 2002 - 2006 Atom Create Engineering Co., Ltd. 5 * Copyright (C) 2004 - 2007 Paul Mundt 6 * 7 * This file is subject to the terms and conditions of the GNU General Public 8 * License. See the file "COPYING" in the main directory of this archive 9 * for more details. 10 */ 11#include <linux/init.h> 12#include <linux/platform_device.h> | 1/* 2 * Renesas Technology Sales RTS7751R2D Support. 3 * 4 * Copyright (C) 2002 - 2006 Atom Create Engineering Co., Ltd. 5 * Copyright (C) 2004 - 2007 Paul Mundt 6 * 7 * This file is subject to the terms and conditions of the GNU General Public 8 * License. See the file "COPYING" in the main directory of this archive 9 * for more details. 10 */ 11#include <linux/init.h> 12#include <linux/platform_device.h> |
13#include <linux/mtd/mtd.h> 14#include <linux/mtd/partitions.h> 15#include <linux/mtd/physmap.h> |
|
13#include <linux/ata_platform.h> 14#include <linux/sm501.h> 15#include <linux/sm501-regs.h> 16#include <linux/pm.h> 17#include <linux/fb.h> 18#include <linux/spi/spi.h> 19#include <linux/spi/spi_bitbang.h> 20#include <asm/machvec.h> --- 155 unchanged lines hidden (view full) --- 176 .id = -1, 177 .dev = { 178 .platform_data = &sm501_platform_data, 179 }, 180 .num_resources = ARRAY_SIZE(sm501_resources), 181 .resource = sm501_resources, 182}; 183 | 16#include <linux/ata_platform.h> 17#include <linux/sm501.h> 18#include <linux/sm501-regs.h> 19#include <linux/pm.h> 20#include <linux/fb.h> 21#include <linux/spi/spi.h> 22#include <linux/spi/spi_bitbang.h> 23#include <asm/machvec.h> --- 155 unchanged lines hidden (view full) --- 179 .id = -1, 180 .dev = { 181 .platform_data = &sm501_platform_data, 182 }, 183 .num_resources = ARRAY_SIZE(sm501_resources), 184 .resource = sm501_resources, 185}; 186 |
187static struct mtd_partition r2d_partitions[] = { 188 { 189 .name = "U-Boot", 190 .offset = 0x00000000, 191 .size = 0x00040000, 192 .mask_flags = MTD_WRITEABLE, 193 }, { 194 .name = "Environment", 195 .offset = MTDPART_OFS_NXTBLK, 196 .size = 0x00040000, 197 .mask_flags = MTD_WRITEABLE, 198 }, { 199 .name = "Kernel", 200 .offset = MTDPART_OFS_NXTBLK, 201 .size = 0x001c0000, 202 }, { 203 .name = "Flash_FS", 204 .offset = MTDPART_OFS_NXTBLK, 205 .size = MTDPART_SIZ_FULL, 206 } 207}; 208 209static struct physmap_flash_data flash_data = { 210 .width = 2, 211 .nr_parts = ARRAY_SIZE(r2d_partitions), 212 .parts = r2d_partitions, 213}; 214 215static struct resource flash_resource = { 216 .start = 0x00000000, 217 .end = 0x02000000, 218 .flags = IORESOURCE_MEM, 219}; 220 221static struct platform_device flash_device = { 222 .name = "physmap-flash", 223 .id = -1, 224 .resource = &flash_resource, 225 .num_resources = 1, 226 .dev = { 227 .platform_data = &flash_data, 228 }, 229}; 230 |
|
184static struct platform_device *rts7751r2d_devices[] __initdata = { 185 &sm501_device, 186 &heartbeat_device, 187 &spi_sh_sci_device, 188}; 189 190/* 191 * The CF is connected with a 16-bit bus where 8-bit operations are --- 6 unchanged lines hidden (view full) --- 198 .minimum_bus_width = 16, 199}; 200 201static int __init rts7751r2d_devices_setup(void) 202{ 203 if (register_trapped_io(&cf_trapped_io) == 0) 204 platform_device_register(&cf_ide_device); 205 | 231static struct platform_device *rts7751r2d_devices[] __initdata = { 232 &sm501_device, 233 &heartbeat_device, 234 &spi_sh_sci_device, 235}; 236 237/* 238 * The CF is connected with a 16-bit bus where 8-bit operations are --- 6 unchanged lines hidden (view full) --- 245 .minimum_bus_width = 16, 246}; 247 248static int __init rts7751r2d_devices_setup(void) 249{ 250 if (register_trapped_io(&cf_trapped_io) == 0) 251 platform_device_register(&cf_ide_device); 252 |
253 if (mach_is_r2d_plus()) 254 platform_device_register(&flash_device); 255 |
|
206 spi_register_board_info(spi_bus, ARRAY_SIZE(spi_bus)); 207 208 return platform_add_devices(rts7751r2d_devices, 209 ARRAY_SIZE(rts7751r2d_devices)); 210} 211__initcall(rts7751r2d_devices_setup); 212 213static void rts7751r2d_power_off(void) --- 45 unchanged lines hidden --- | 256 spi_register_board_info(spi_bus, ARRAY_SIZE(spi_bus)); 257 258 return platform_add_devices(rts7751r2d_devices, 259 ARRAY_SIZE(rts7751r2d_devices)); 260} 261__initcall(rts7751r2d_devices_setup); 262 263static void rts7751r2d_power_off(void) --- 45 unchanged lines hidden --- |