Path: blob/master/arch/sh/boards/mach-se/7206/setup.c
15162 views
/*1*2* linux/arch/sh/boards/se/7206/setup.c3*4* Copyright (C) 2006 Yoshinori Sato5* Copyright (C) 2007 - 2008 Paul Mundt6*7* Hitachi 7206 SolutionEngine Support.8*/9#include <linux/init.h>10#include <linux/platform_device.h>11#include <linux/smc91x.h>12#include <mach-se/mach/se7206.h>13#include <asm/io.h>14#include <asm/machvec.h>15#include <asm/heartbeat.h>1617static struct resource smc91x_resources[] = {18[0] = {19.name = "smc91x-regs",20.start = PA_SMSC + 0x300,21.end = PA_SMSC + 0x300 + 0x020 - 1,22.flags = IORESOURCE_MEM,23},24[1] = {25.start = 64,26.end = 64,27.flags = IORESOURCE_IRQ,28},29};3031static struct smc91x_platdata smc91x_info = {32.flags = SMC91X_USE_16BIT,33};3435static struct platform_device smc91x_device = {36.name = "smc91x",37.id = -1,38.dev = {39.dma_mask = NULL,40.coherent_dma_mask = 0xffffffff,41.platform_data = &smc91x_info,42},43.num_resources = ARRAY_SIZE(smc91x_resources),44.resource = smc91x_resources,45};4647static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };4849static struct heartbeat_data heartbeat_data = {50.bit_pos = heartbeat_bit_pos,51.nr_bits = ARRAY_SIZE(heartbeat_bit_pos),52};5354static struct resource heartbeat_resource = {55.start = PA_LED,56.end = PA_LED,57.flags = IORESOURCE_MEM | IORESOURCE_MEM_32BIT,58};5960static struct platform_device heartbeat_device = {61.name = "heartbeat",62.id = -1,63.dev = {64.platform_data = &heartbeat_data,65},66.num_resources = 1,67.resource = &heartbeat_resource,68};6970static struct platform_device *se7206_devices[] __initdata = {71&smc91x_device,72&heartbeat_device,73};7475static int __init se7206_devices_setup(void)76{77return platform_add_devices(se7206_devices, ARRAY_SIZE(se7206_devices));78}79device_initcall(se7206_devices_setup);8081static int se7206_mode_pins(void)82{83return MODE_PIN1 | MODE_PIN2;84}8586/*87* The Machine Vector88*/8990static struct sh_machine_vector mv_se __initmv = {91.mv_name = "SolutionEngine",92.mv_nr_irqs = 256,93.mv_init_irq = init_se7206_IRQ,94.mv_mode_pins = se7206_mode_pins,95};969798