-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 116100 b: refs/heads/master c: 3db9170 h: refs/heads/master v: v3
- Loading branch information
Luca Santini
authored and
Paul Mundt
committed
Sep 8, 2008
1 parent
2276a0a
commit 959ed90
Showing
5 changed files
with
1,203 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 53abf911fa6753dfbd6775ae541fb2f8b9f5b825 | ||
refs/heads/master: 3db9170880241d63aae7ab86a03aa15418c3e5c6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
/* | ||
* Renesas Europe EDOSK7760 Board Support | ||
* | ||
* Copyright (C) 2008 SPES Societa' Progettazione Elettronica e Software Ltd. | ||
* Author: Luca Santini <luca.santini@spesonline.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
*/ | ||
#include <linux/init.h> | ||
#include <linux/types.h> | ||
#include <linux/platform_device.h> | ||
#include <linux/smc91x.h> | ||
#include <linux/interrupt.h> | ||
#include <linux/i2c.h> | ||
#include <asm/machvec.h> | ||
#include <asm/io.h> | ||
#include <asm/addrspace.h> | ||
#include <asm/delay.h> | ||
#include <asm/i2c-sh7760.h> | ||
|
||
/* Bus state controller registers for CS4 area */ | ||
#define BSC_CS4BCR 0xA4FD0010 | ||
#define BSC_CS4WCR 0xA4FD0030 | ||
|
||
#define SMC_IOBASE 0xA2000000 | ||
#define SMC_IO_OFFSET 0x300 | ||
#define SMC_IOADDR (SMC_IOBASE + SMC_IO_OFFSET) | ||
|
||
#define ETHERNET_IRQ 5 | ||
|
||
/* i2c initialization functions */ | ||
static struct sh7760_i2c_platdata i2c_pd = { | ||
.speed_khz = 400, | ||
}; | ||
|
||
static struct resource sh7760_i2c1_res[] = { | ||
{ | ||
.start = SH7760_I2C1_MMIO, | ||
.end = SH7760_I2C1_MMIOEND, | ||
.flags = IORESOURCE_MEM, | ||
},{ | ||
.start = SH7760_I2C1_IRQ, | ||
.end = SH7760_I2C1_IRQ, | ||
.flags = IORESOURCE_IRQ, | ||
}, | ||
}; | ||
|
||
static struct platform_device sh7760_i2c1_dev = { | ||
.dev = { | ||
.platform_data = &i2c_pd, | ||
}, | ||
|
||
.name = SH7760_I2C_DEVNAME, | ||
.id = 1, | ||
.resource = sh7760_i2c1_res, | ||
.num_resources = ARRAY_SIZE(sh7760_i2c1_res), | ||
}; | ||
|
||
static struct resource sh7760_i2c0_res[] = { | ||
{ | ||
.start = SH7760_I2C0_MMIO, | ||
.end = SH7760_I2C0_MMIOEND, | ||
.flags = IORESOURCE_MEM, | ||
}, { | ||
.start = SH7760_I2C0_IRQ, | ||
.end = SH7760_I2C0_IRQ, | ||
.flags = IORESOURCE_IRQ, | ||
}, | ||
}; | ||
|
||
static struct platform_device sh7760_i2c0_dev = { | ||
.dev = { | ||
.platform_data = &i2c_pd, | ||
}, | ||
.name = SH7760_I2C_DEVNAME, | ||
.id = 0, | ||
.resource = sh7760_i2c0_res, | ||
.num_resources = ARRAY_SIZE(sh7760_i2c0_res), | ||
}; | ||
|
||
/* eth initialization functions */ | ||
static struct smc91x_platdata smc91x_info = { | ||
.flags = SMC91X_USE_16BIT | SMC91X_IO_SHIFT_1 | IORESOURCE_IRQ_LOWLEVEL, | ||
}; | ||
|
||
static struct resource smc91x_res[] = { | ||
[0] = { | ||
.start = SMC_IOADDR, | ||
.end = SMC_IOADDR + 0x1f, | ||
.flags = IORESOURCE_MEM, | ||
}, | ||
[1] = { | ||
.start = ETHERNET_IRQ, | ||
.end = ETHERNET_IRQ, | ||
.flags = IORESOURCE_IRQ , | ||
} | ||
}; | ||
|
||
static struct platform_device smc91x_dev = { | ||
.name = "smc91x", | ||
.id = -1, | ||
.num_resources = ARRAY_SIZE(smc91x_res), | ||
.resource = smc91x_res, | ||
|
||
.dev = { | ||
.platform_data = &smc91x_info, | ||
}, | ||
}; | ||
|
||
/* platform init code */ | ||
static struct platform_device *edosk7760_devices[] __initdata = { | ||
&sh7760_i2c0_dev, | ||
&sh7760_i2c1_dev, | ||
&smc91x_dev, | ||
}; | ||
|
||
static int __init init_edosk7760_devices(void) | ||
{ | ||
plat_irq_setup_pins(IRQ_MODE_IRQ); | ||
|
||
return platform_add_devices(edosk7760_devices, | ||
ARRAY_SIZE(edosk7760_devices)); | ||
} | ||
__initcall(init_edosk7760_devices); | ||
|
||
/* | ||
* The Machine Vector | ||
*/ | ||
struct sh_machine_vector mv_edosk7760 __initmv = { | ||
.mv_name = "EDOSK7760", | ||
.mv_nr_irqs = 128, | ||
}; |
Oops, something went wrong.