24 #include <linux/kernel.h>
31 #include <linux/i2c.h>
33 #include <asm/bootinfo.h>
34 #include <asm/reboot.h>
45 unsigned char *memsize_str;
67 static void gpr_reset(
char *
c)
70 alchemy_gpio_direction_output(4, 0);
71 alchemy_gpio_direction_output(5, 0);
76 alchemy_gpio_direction_output(1, 0);
78 alchemy_gpio_set_value(1, 1);
83 static void gpr_power_off(
void)
102 alchemy_gpio_direction_output(215, 1);
108 static struct resource gpr_wdt_resource[] = {
112 .name =
"gpr-adm6320-wdt",
118 .name =
"adm6320-wdt",
120 .num_resources =
ARRAY_SIZE(gpr_wdt_resource),
121 .resource = gpr_wdt_resource,
149 .offset = 0x01d00000,
154 .offset = 0x01c00000,
157 .name =
"yamon env vars",
162 .name =
"kernel+rootfs",
171 .parts = gpr_mtd_partitions,
174 static struct resource gpr_mtd_resource = {
181 .name =
"physmap-flash",
183 .platform_data = &gpr_flash_data,
186 .resource = &gpr_mtd_resource,
192 static struct gpio_led gpr_gpio_leds[] = {
207 .leds = gpr_gpio_leds,
214 .platform_data = &gpr_led_data,
223 .sda_is_open_drain = 1,
225 .scl_is_open_drain = 1,
233 .dev.platform_data = &gpr_i2c_data,
245 static struct resource alchemy_pci_host_res[] = {
255 if ((slot == 0) && (pin == 1))
257 else if ((slot == 0) && (pin == 2))
264 .board_map_irq = gpr_map_pci_irq,
267 #if defined(__MIPSEB__)
275 .dev.platform_data = &gpr_pci_pd,
276 .name =
"alchemy-pci",
278 .num_resources =
ARRAY_SIZE(alchemy_pci_host_res),
279 .resource = alchemy_pci_host_res,
289 static int __init gpr_pci_init(
void)
297 static int __init gpr_dev_init(
void)