17 #include <linux/i2c.h>
23 #include <asm/machvec.h>
25 #include <asm/sizes.h>
26 #include <asm/clock.h>
27 #include <asm/reboot.h>
28 #include <asm/smp-ops.h>
30 static struct resource heartbeat_resource = {
32 .end = 0x07fff8b0 +
sizeof(
u16) - 1,
40 .resource = &heartbeat_resource,
49 static struct resource smsc911x_resources[] = {
51 .name =
"smsc911x-memory",
53 .end = 0x07ffff00 +
SZ_256 - 1,
57 .name =
"smsc911x-irq",
74 .num_resources =
ARRAY_SIZE(smsc911x_resources),
75 .resource = smsc911x_resources,
77 .platform_data = &smsc911x_config,
81 static struct resource smbus_fpga_resource = {
83 .end = 0x07fff9e0 +
SZ_32 - 1,
88 .name =
"i2c-sdk7786",
91 .resource = &smbus_fpga_resource,
94 static struct resource smbus_pcie_resource = {
96 .end = 0x07fffc30 +
SZ_32 - 1,
101 .name =
"i2c-sdk7786",
104 .resource = &smbus_pcie_resource,
120 static int sdk7786_i2c_setup(
void)
127 tmp = fpga_read_reg(
SBCR);
130 fpga_write_reg(tmp,
SBCR);
136 static int __init sdk7786_devices_setup(
void)
144 return sdk7786_i2c_setup();
148 static int sdk7786_mode_pins(
void)
150 return fpga_read_reg(
MODSWR);
167 static int sdk7786_pcie_clk_enable(
struct clk *
clk)
173 static void sdk7786_pcie_clk_disable(
struct clk *clk)
178 static struct sh_clk_ops sdk7786_pcie_clk_ops = {
179 .enable = sdk7786_pcie_clk_enable,
180 .disable = sdk7786_pcie_clk_disable,
183 static struct clk sdk7786_pcie_clk = {
184 .ops = &sdk7786_pcie_clk_ops,
188 .con_id =
"pcie_plat_clk",
189 .clk = &sdk7786_pcie_clk,
192 static int sdk7786_clk_init(
void)
215 pr_err(
"FPGA clock registration failed\n");
224 static void sdk7786_restart(
char *
cmd)
226 fpga_write_reg(0xa5a5,
SRSTR);
229 static void sdk7786_power_off(
void)
243 static void __init sdk7786_setup(
char **cmdline_p)
245 pr_info(
"Renesas Technology Europe SDK7786 support:\n");
252 pr_info(
"\tPCB revision:\t%d\n", fpga_read_reg(
PCBRR) & 0xf);
264 .mv_name =
"SDK7786",
265 .mv_setup = sdk7786_setup,
266 .mv_mode_pins = sdk7786_mode_pins,
267 .mv_clk_init = sdk7786_clk_init,